diff --git a/week-1/Week-1-assignment-with-tests/01-js/easy/anagram.js b/week-1/Week-1-assignment-with-tests/01-js/easy/anagram.js
index fff614278..789a9301b 100644
--- a/week-1/Week-1-assignment-with-tests/01-js/easy/anagram.js
+++ b/week-1/Week-1-assignment-with-tests/01-js/easy/anagram.js
@@ -8,7 +8,27 @@
*/
function isAnagram(str1, str2) {
+ ///check if both the strings are of same length
+ ///order it and then use == operator
+ if (str1.length != str2.length) {
+ return false;
+ }
+
+ ///There is no direct method to order so,
+ str1 = str1.toLowerCase();
+ str2 = str2.toLowerCase();
+
+
+ ///split the string into array,sort the array then join the array
+ str1 = str1.split('').sort().join('');
+ str2 = str2.split('').sort().join('');
+
+ if (str1 == str2) {
+ return true;
+ } else {
+ return false;
+ }
}
module.exports = isAnagram;
diff --git a/week-1/Week-1-assignment-with-tests/01-js/easy/expenditure-analysis.js b/week-1/Week-1-assignment-with-tests/01-js/easy/expenditure-analysis.js
index 20fbb9435..8b10a6ebd 100644
--- a/week-1/Week-1-assignment-with-tests/01-js/easy/expenditure-analysis.js
+++ b/week-1/Week-1-assignment-with-tests/01-js/easy/expenditure-analysis.js
@@ -9,7 +9,59 @@
*/
function calculateTotalSpentByCategory(transactions) {
- return [];
-}
+ // var transactions = [
+ // {
+ // id: 1,
+ // timestamp: 1656076800000,
+ // price: 10,
+ // category: 'Food',
+ // itemName: 'Pizza',
+ // },
+ // {
+ // id: 2,
+ // timestamp: 1656259600000,
+ // price: 20,
+ // category: 'Food',
+ // itemName: 'Burger',
+ // },
+ // {
+ // id: 3,
+ // timestamp: 1656019200000,
+ // price: 15,
+ // category: 'Clothing',
+ // itemName: 'T-Shirt',
+ // },
+ // {
+ // id: 4,
+ // timestamp: 1656364800000,
+ // price: 30,
+ // category: 'Electronics',
+ // itemName: 'Headphones',
+ // },
+ // {
+ // id: 5,
+ // timestamp: 1656105600000,
+ // price: 25,
+ // category: 'Clothing',
+ // itemName: 'Jeans',
+ // },
+ // ];
+ ///[returnElement] contains{category: 'Food', totalSpent: 30}
+ var returnElement = [];
+
+ transactions.forEach((traEle) => {
+ ///go through each and every element in transactions
+ var elemen = returnElement.find((ele) => (ele.category === traEle.category));
+ ///check if that element is present
+ if (elemen) {
+ elemen.totalSpent = elemen.totalSpent + traEle.price;
+ returnElement.push({ category: traEle.category, totalSpent: traEle.price });
+ }
+ });
+
+
+ return returnElement;
+}
+// calculateTotalSpentByCategory();
module.exports = calculateTotalSpentByCategory;
diff --git a/week-1/Week-1-assignment-with-tests/01-js/hard/calculator.js b/week-1/Week-1-assignment-with-tests/01-js/hard/calculator.js
index 82d48229a..0cfe216f2 100644
--- a/week-1/Week-1-assignment-with-tests/01-js/hard/calculator.js
+++ b/week-1/Week-1-assignment-with-tests/01-js/hard/calculator.js
@@ -17,6 +17,40 @@
- `npm run test-calculator`
*/
-class Calculator {}
+class Calculator {
+ constructor() {
+ this.result = 0;
+ }
+ add(addVar) {
+ this.result = this.result + addVar;
+ }
+ subtract(addVar) {
+ this.result = this.result - addVar;
+ }
+ multiply(addVar) {
+ this.result = this.result * addVar;
+ }
+ divide(addVar) {
+ if (addVar <= 0) {
+ throw Error;
+ } else {
+
+ this.result = this.result / addVar;
+ }
+ }
+ clear() {
+ this.result = 0;
+ }
+ getResult() {
+ // console.log(this.result);
+ return this.result;
+ }
+}
+var calc = new Calculator();
+// calc.add(12);
+
+// calc.divide(4);
+// calc.getResult();
+// calc.divide(0);
module.exports = Calculator;
diff --git a/week-1/Week-1-assignment-with-tests/01-js/hard/todo-list.js b/week-1/Week-1-assignment-with-tests/01-js/hard/todo-list.js
index 7c9c18064..b3d69e60e 100644
--- a/week-1/Week-1-assignment-with-tests/01-js/hard/todo-list.js
+++ b/week-1/Week-1-assignment-with-tests/01-js/hard/todo-list.js
@@ -12,7 +12,50 @@
*/
class Todo {
+ constructor() {
+ this.todoList = [];
+ }
+ add(addEle) {
+ this.todoList = [...this.todoList, addEle];
+ }
+ remove(popInIndex) {
+ // if (popInIndex >= this.todoList.length) {
+ // throw (Error);
+ // } else {
+ this.todoList = this.todoList.slice(0, popInIndex).concat(this.todoList.slice(popInIndex + 1, this.todoList.length));
+ // }
+ }
+ update(popInIndex, ele) {
+ // if (popInIndex < 0 || popInIndex >= this.todoList.length) {
+ // throw (Error);
+ // } else {
+
+ this.todoList[popInIndex] = ele;
+
+ // }
+ }
+
+ getAll() {
+ return this.todoList;
+ }
+
+ get(indexOfTodo) {
+ // if (popInIndex < 0 || popInIndex >= this.todoList.length) {
+ // throw (Error);
+ // } else {
+ return this.todoList[indexOfTodo + 1];
+
+
+
+ // }
+
+ }
+ clear() {
+ this.todoList = [];
+ return this.todoList;
+
+ }
}
module.exports = Todo;
diff --git a/week-1/Week-1-assignment-with-tests/01-js/medium/palindrome.js b/week-1/Week-1-assignment-with-tests/01-js/medium/palindrome.js
index d8fe2d8f8..78bc5f412 100644
--- a/week-1/Week-1-assignment-with-tests/01-js/medium/palindrome.js
+++ b/week-1/Week-1-assignment-with-tests/01-js/medium/palindrome.js
@@ -7,7 +7,26 @@
*/
function isPalindrome(str) {
- return true;
+ var isPali = true;
+
+
+ for (var i = 0; i < (str.length) / 2; i++) {
+ if (str[i].toLowerCase() != str[str.length - 1 - i].toLowerCase()) {
+ isPali = false;
+
+ }
+ }
+ if (isPali) {
+
+ return true;
+
+
+ } else {
+ isPali = true;
+
+ return false;
+ }
+
}
module.exports = isPalindrome;
diff --git a/week-1/Week-1-assignment-with-tests/01-js/medium/times.js b/week-1/Week-1-assignment-with-tests/01-js/medium/times.js
index eb125cc26..00625793a 100644
--- a/week-1/Week-1-assignment-with-tests/01-js/medium/times.js
+++ b/week-1/Week-1-assignment-with-tests/01-js/medium/times.js
@@ -8,5 +8,16 @@ Hint - use Date class exposed in JS
*/
function calculateTime(n) {
- return 0.01;
-}
\ No newline at end of file
+ var initialSum = 0;
+ ///will get start time
+ const startTime = new Date().getTime();
+ ///lets go through all the elements
+ for (var initial = 0; initial < n; initial++) {
+ initialSum = initialSum + initial;
+ }
+ ///here will get end time
+ const endTime = new Date().getTime();
+ console.log(initialSum);
+ return endTime - startTime;
+
+}
\ No newline at end of file
diff --git a/week-1/Week-1-assignment-with-tests/01-js/package.json b/week-1/Week-1-assignment-with-tests/01-js/package.json
index a3b592da7..dd2f9bcde 100644
--- a/week-1/Week-1-assignment-with-tests/01-js/package.json
+++ b/week-1/Week-1-assignment-with-tests/01-js/package.json
@@ -18,4 +18,4 @@
"keywords": [],
"author": "",
"license": "ISC"
-}
+}
\ No newline at end of file
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/easy/1-counter.js b/week-1/Week-1-assignment-with-tests/02-async-js/easy/1-counter.js
new file mode 100644
index 000000000..c9d88c949
--- /dev/null
+++ b/week-1/Week-1-assignment-with-tests/02-async-js/easy/1-counter.js
@@ -0,0 +1,9 @@
+// ## Create a counter in JavaScript
+
+// We have already covered this in the second lesson, but as an easy recap try to code a counter in Javascript
+// It should go up as time goes by in intervals of 1 second
+
+///Here the word "Hello" will be printed every 1 seconds
+setInterval(() => {
+ console.log("Hello")
+}, 1000);
\ No newline at end of file
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/easy/1-counter.md b/week-1/Week-1-assignment-with-tests/02-async-js/easy/1-counter.md
deleted file mode 100644
index 54483eabc..000000000
--- a/week-1/Week-1-assignment-with-tests/02-async-js/easy/1-counter.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## Create a counter in JavaScript
-
-We have already covered this in the second lesson, but as an easy recap try to code a counter in Javascript
-It should go up as time goes by in intervals of 1 second
\ No newline at end of file
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/easy/2-counter.js b/week-1/Week-1-assignment-with-tests/02-async-js/easy/2-counter.js
new file mode 100644
index 000000000..dd1af83d5
--- /dev/null
+++ b/week-1/Week-1-assignment-with-tests/02-async-js/easy/2-counter.js
@@ -0,0 +1,81 @@
+// ## Counter without setInterval
+
+// Without using setInterval, try to code a counter in Javascript. There is a hint at the bottom of the file if you get stuck.
+
+
+///Here we are not using setInterval but setTimeout ,it will run after 1 seconds
+
+function counter() {
+ console.log("Hello");
+ setTimeout(counter, 1000);
+}
+counter()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// (Hint: setTimeout)
\ No newline at end of file
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/easy/2-counter.md b/week-1/Week-1-assignment-with-tests/02-async-js/easy/2-counter.md
deleted file mode 100644
index db5f2fffa..000000000
--- a/week-1/Week-1-assignment-with-tests/02-async-js/easy/2-counter.md
+++ /dev/null
@@ -1,76 +0,0 @@
-## Counter without setInterval
-
-Without using setInterval, try to code a counter in Javascript. There is a hint at the bottom of the file if you get stuck.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-(Hint: setTimeout)
\ No newline at end of file
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/easy/3-read-from-file.js b/week-1/Week-1-assignment-with-tests/02-async-js/easy/3-read-from-file.js
new file mode 100644
index 000000000..9cbada8da
--- /dev/null
+++ b/week-1/Week-1-assignment-with-tests/02-async-js/easy/3-read-from-file.js
@@ -0,0 +1,6 @@
+// ## Reading the contents of a file
+
+// Write code to read contents of a file and print it to the console.
+// You can use the fs library to as a black box, the goal is to understand async tasks.
+// Try to do an expensive operation below the file read and see how it affects the output.
+// Make the expensive operation more and more expensive and see how it affects the output.
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/easy/3-read-from-file.md b/week-1/Week-1-assignment-with-tests/02-async-js/easy/3-read-from-file.md
deleted file mode 100644
index f619d71ae..000000000
--- a/week-1/Week-1-assignment-with-tests/02-async-js/easy/3-read-from-file.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## Reading the contents of a file
-
-Write code to read contents of a file and print it to the console.
-You can use the fs library to as a black box, the goal is to understand async tasks.
-Try to do an expensive operation below the file read and see how it affects the output.
-Make the expensive operation more and more expensive and see how it affects the output.
-
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/easy/4-write-to-file.md b/week-1/Week-1-assignment-with-tests/02-async-js/easy/4-write-to-file.js
similarity index 100%
rename from week-1/Week-1-assignment-with-tests/02-async-js/easy/4-write-to-file.md
rename to week-1/Week-1-assignment-with-tests/02-async-js/easy/4-write-to-file.js
diff --git a/week-1/Week-1-assignment-with-tests/02-async-js/hard (promises)/1-promisify-setTimeout.js b/week-1/Week-1-assignment-with-tests/02-async-js/hard (promises)/1-promisify-setTimeout.js
index cc0b7dd72..71467756d 100644
--- a/week-1/Week-1-assignment-with-tests/02-async-js/hard (promises)/1-promisify-setTimeout.js
+++ b/week-1/Week-1-assignment-with-tests/02-async-js/hard (promises)/1-promisify-setTimeout.js
@@ -3,4 +3,14 @@
*/
function wait(n) {
-}
\ No newline at end of file
+ return new Promise((a) => {
+ setTimeout(() => {
+ a('What is This');
+ }, n + 5000);
+ },)
+}
+async function runn() {
+ var aa = await wait(1000);
+ console.log(aa);
+}
+runn()
\ No newline at end of file
diff --git a/week-2/Week-2-Assignments/02-nodejs/authenticationServer.js b/week-2/Week-2-Assignments/02-nodejs/authenticationServer.js
index c5278b94f..ca1602f10 100644
--- a/week-2/Week-2-Assignments/02-nodejs/authenticationServer.js
+++ b/week-2/Week-2-Assignments/02-nodejs/authenticationServer.js
@@ -29,9 +29,88 @@
Testing the server - run `npm run test-authenticationServer` command in terminal
*/
-const express = require("express")
+// const express = require("express")
+import express from "express";
+import body_parser from "body-parser";
+import jwt from "jsonwebtoken";
const PORT = 3000;
const app = express();
+app.use(body_parser.json());
+app.use(express.json())
+const jwt_secret = "dumy$ecREt";
+var allUsersList = [];
+var allAdminList = [{
+ id: "132a456", username: "Admin", password: "Password", firstName: "firstName", lastName: "lastName"
+
+}];
+// app.use(express().)
+
// write your logic here, DONT WRITE app.listen(3000) when you're running tests, the tests will automatically start the server
-module.exports = app;
+///Generating token
+function generateToken(data) {
+ return jwt.sign(data, jwt_secret);
+}
+
+app.post("/signup", (req, res) => {
+ const passwordNew = req.body.password;
+
+
+ const { username, password, firstName, lastName } = req.body;
+
+ if ((username && username.length === 0) || (password && password.length === 0) || (lastName && lastName.length === 0)) {
+ res.status(400).send({ "statusCode": 0, "message": "One or More fields are empty" });
+ return;
+ }
+ const newUser = {
+ id: Date().valueOf(), name: username, password: password, firstName: firstName, lastName: lastName
+ };
+ allUsersList.push(newUser);
+ res.status(200).send({ "statusCode": 1, "message": "Account successfully created", "userId": newUser.id, "token": generateToken(newUser) });
+})
+
+app.post("/login", (req, res) => {
+ const { username, password } = req.body;
+
+
+ if ((username && username.length === 0) || (password && password.length === 0)) {
+ res.status(400).send({ "statusCode": 0, "message": "One or More fields are empty" });
+ return;
+ }
+ var userDetails = allUsersList.find((singleUserDetails) => (singleUserDetails.name == username && singleUserDetails.password == password));
+
+ console.log(userDetails);
+ if (userDetails) {
+ res.status(200).send({ "statusCode": 1, data: userDetails });
+
+ } else {
+
+ res.status(400).send({ "statusCode": 0, "message": "User Not Fould" });
+ }
+})
+
+const adminAuth = (req, res, next) => {
+ const { username, password } = req.headers;
+
+ var isAdmin = allAdminList.find((ele) => (ele.username == username && ele.password == password)
+ );
+ if (isAdmin) {
+ next();
+ } else {
+ res.status(401).send("Unauthorized");
+ }
+}
+
+app.get("/data", adminAuth, (req, res) => {
+ if (allUsersList.length > 0) {
+ res.send({ "statusCode": 1, "data": allUsersList });
+ } else {
+
+ res.send({ "statusCode": 0, "message": "No User Record Found", });
+ }
+});
+
+app.listen(3000, () => {
+ console.log("server started at 3000")
+})
+// module.exports = app;
diff --git a/week-2/Week-2-Assignments/02-nodejs/fileServer.js b/week-2/Week-2-Assignments/02-nodejs/fileServer.js
index 82e7719b4..1c6b8c6a0 100644
--- a/week-2/Week-2-Assignments/02-nodejs/fileServer.js
+++ b/week-2/Week-2-Assignments/02-nodejs/fileServer.js
@@ -16,10 +16,17 @@
Testing the server - run `npm run test-fileServer` command in terminal
*/
-const express = require('express');
-const fs = require('fs');
-const path = require('path');
+import express from "express"
+import fs from "fs"
+import path from "path"
+
+
+// const express = require('express');
+// const fs = require('fs');
+// const path = require('path');
const app = express();
+//GET /files - Returns a list of files present in `./files/` directory
+
-module.exports = app;
+// module.exports = app;
diff --git a/week-2/Week-2-Assignments/02-nodejs/package-lock.json b/week-2/Week-2-Assignments/02-nodejs/package-lock.json
index b13088b72..ecaf54736 100644
--- a/week-2/Week-2-Assignments/02-nodejs/package-lock.json
+++ b/week-2/Week-2-Assignments/02-nodejs/package-lock.json
@@ -9,7 +9,10 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
- "express": "^4.18.2",
+ "body-parser": "1.20.2",
+ "express": "^4.19.2",
+ "jsonwebtoken": "^9.0.2",
+ "nodemon": "^3.1.4",
"uuid": "^9.0.0"
},
"devDependencies": {
@@ -1132,7 +1135,6 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "dev": true,
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
@@ -1261,16 +1263,26 @@
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
"node_modules/body-parser": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
- "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
+ "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
"dependencies": {
"bytes": "3.1.2",
- "content-type": "~1.0.4",
+ "content-type": "~1.0.5",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
@@ -1278,7 +1290,7 @@
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
"qs": "6.11.0",
- "raw-body": "2.5.1",
+ "raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
},
@@ -1318,7 +1330,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -1328,7 +1339,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
- "dev": true,
"dependencies": {
"fill-range": "^7.0.1"
},
@@ -1377,6 +1387,11 @@
"node-int64": "^0.4.0"
}
},
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
+ },
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
@@ -1466,6 +1481,29 @@
"node": ">=10"
}
},
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
"node_modules/ci-info": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
@@ -1556,8 +1594,7 @@
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"node_modules/content-disposition": {
"version": "0.5.4",
@@ -1585,9 +1622,9 @@
"dev": true
},
"node_modules/cookie": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
- "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
+ "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
"engines": {
"node": ">= 0.6"
}
@@ -1621,7 +1658,6 @@
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
"dependencies": {
"ms": "2.1.2"
},
@@ -1703,6 +1739,14 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -1842,16 +1886,16 @@
}
},
"node_modules/express": {
- "version": "4.18.2",
- "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
- "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
+ "version": "4.19.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
+ "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
"dependencies": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
- "body-parser": "1.20.1",
+ "body-parser": "1.20.2",
"content-disposition": "0.5.4",
"content-type": "~1.0.4",
- "cookie": "0.5.0",
+ "cookie": "0.6.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "2.0.0",
@@ -1934,7 +1978,6 @@
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
- "dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
},
@@ -2040,7 +2083,6 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
@@ -2128,6 +2170,17 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
@@ -2235,6 +2288,11 @@
"node": ">=0.10.0"
}
},
+ "node_modules/ignore-by-default": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="
+ },
"node_modules/import-local": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
@@ -2292,6 +2350,17 @@
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"dev": true
},
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/is-core-module": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
@@ -2304,6 +2373,14 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -2322,11 +2399,21 @@
"node": ">=6"
}
},
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true,
"engines": {
"node": ">=0.12.0"
}
@@ -3055,6 +3142,57 @@
"node": ">=6"
}
},
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
+ "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/jsonwebtoken/node_modules/semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@@ -3091,6 +3229,41 @@
"node": ">=8"
}
},
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
+ },
"node_modules/lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@@ -3208,7 +3381,6 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
@@ -3219,8 +3391,7 @@
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/natural-compare": {
"version": "1.4.0",
@@ -3248,11 +3419,67 @@
"integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==",
"dev": true
},
+ "node_modules/nodemon": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.4.tgz",
+ "integrity": "sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ==",
+ "dependencies": {
+ "chokidar": "^3.5.2",
+ "debug": "^4",
+ "ignore-by-default": "^1.0.1",
+ "minimatch": "^3.1.2",
+ "pstree.remy": "^1.1.8",
+ "semver": "^7.5.3",
+ "simple-update-notifier": "^2.0.0",
+ "supports-color": "^5.5.0",
+ "touch": "^3.1.0",
+ "undefsafe": "^2.0.5"
+ },
+ "bin": {
+ "nodemon": "bin/nodemon.js"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/nodemon"
+ }
+ },
+ "node_modules/nodemon/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/nodemon/node_modules/semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/nodemon/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "dev": true,
"engines": {
"node": ">=0.10.0"
}
@@ -3437,7 +3664,6 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true,
"engines": {
"node": ">=8.6"
},
@@ -3517,6 +3743,11 @@
"node": ">= 0.10"
}
},
+ "node_modules/pstree.remy": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
+ },
"node_modules/pure-rand": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz",
@@ -3557,9 +3788,9 @@
}
},
"node_modules/raw-body": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
- "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
"dependencies": {
"bytes": "3.1.2",
"http-errors": "2.0.0",
@@ -3576,6 +3807,17 @@
"integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==",
"dev": true
},
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -3776,6 +4018,28 @@
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true
},
+ "node_modules/simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "dependencies": {
+ "semver": "^7.5.3"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/simple-update-notifier/node_modules/semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/sisteransi": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
@@ -4029,7 +4293,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
"dependencies": {
"is-number": "^7.0.0"
},
@@ -4045,6 +4308,14 @@
"node": ">=0.6"
}
},
+ "node_modules/touch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
+ "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
+ "bin": {
+ "nodetouch": "bin/nodetouch.js"
+ }
+ },
"node_modules/type-detect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
@@ -4078,6 +4349,11 @@
"node": ">= 0.6"
}
},
+ "node_modules/undefsafe": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
+ },
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -5161,7 +5437,6 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "dev": true,
"requires": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
@@ -5266,16 +5541,20 @@
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="
},
"body-parser": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
- "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
+ "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
"requires": {
"bytes": "3.1.2",
- "content-type": "~1.0.4",
+ "content-type": "~1.0.5",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
@@ -5283,7 +5562,7 @@
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
"qs": "6.11.0",
- "raw-body": "2.5.1",
+ "raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
},
@@ -5315,7 +5594,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -5325,7 +5603,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
- "dev": true,
"requires": {
"fill-range": "^7.0.1"
}
@@ -5351,6 +5628,11 @@
"node-int64": "^0.4.0"
}
},
+ "buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
+ },
"buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
@@ -5405,6 +5687,21 @@
"integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==",
"dev": true
},
+ "chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "requires": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ }
+ },
"ci-info": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
@@ -5473,8 +5770,7 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"content-disposition": {
"version": "0.5.4",
@@ -5496,9 +5792,9 @@
"dev": true
},
"cookie": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
- "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw=="
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
+ "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw=="
},
"cookie-signature": {
"version": "1.0.6",
@@ -5526,7 +5822,6 @@
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
"requires": {
"ms": "2.1.2"
}
@@ -5581,6 +5876,14 @@
"integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==",
"dev": true
},
+ "ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "requires": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -5683,16 +5986,16 @@
}
},
"express": {
- "version": "4.18.2",
- "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
- "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
+ "version": "4.19.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
+ "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
"requires": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
- "body-parser": "1.20.1",
+ "body-parser": "1.20.2",
"content-disposition": "0.5.4",
"content-type": "~1.0.4",
- "cookie": "0.5.0",
+ "cookie": "0.6.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "2.0.0",
@@ -5768,7 +6071,6 @@
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
- "dev": true,
"requires": {
"to-regex-range": "^5.0.1"
}
@@ -5855,7 +6157,6 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
"optional": true
},
"function-bind": {
@@ -5912,6 +6213,14 @@
"path-is-absolute": "^1.0.0"
}
},
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
"globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
@@ -5986,6 +6295,11 @@
"safer-buffer": ">= 2.1.2 < 3"
}
},
+ "ignore-by-default": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="
+ },
"import-local": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
@@ -6028,6 +6342,14 @@
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"dev": true
},
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
"is-core-module": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
@@ -6037,6 +6359,11 @@
"has": "^1.0.3"
}
},
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
+ },
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -6049,11 +6376,18 @@
"integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==",
"dev": true
},
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
"is-stream": {
"version": "2.0.1",
@@ -6607,6 +6941,49 @@
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true
},
+ "jsonwebtoken": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
+ "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
+ "requires": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w=="
+ }
+ }
+ },
+ "jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "requires": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "requires": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
"kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@@ -6634,6 +7011,41 @@
"p-locate": "^4.1.0"
}
},
+ "lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
+ },
+ "lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
+ },
+ "lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
+ },
+ "lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
+ },
+ "lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
+ },
+ "lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
+ },
+ "lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
+ },
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@@ -6721,7 +7133,6 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -6729,8 +7140,7 @@
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"natural-compare": {
"version": "1.4.0",
@@ -6755,11 +7165,47 @@
"integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==",
"dev": true
},
+ "nodemon": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.4.tgz",
+ "integrity": "sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ==",
+ "requires": {
+ "chokidar": "^3.5.2",
+ "debug": "^4",
+ "ignore-by-default": "^1.0.1",
+ "minimatch": "^3.1.2",
+ "pstree.remy": "^1.1.8",
+ "semver": "^7.5.3",
+ "simple-update-notifier": "^2.0.0",
+ "supports-color": "^5.5.0",
+ "touch": "^3.1.0",
+ "undefsafe": "^2.0.5"
+ },
+ "dependencies": {
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
+ },
+ "semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w=="
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "dev": true
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"npm-run-path": {
"version": "4.0.1",
@@ -6891,8 +7337,7 @@
"picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
},
"pirates": {
"version": "4.0.5",
@@ -6947,6 +7392,11 @@
"ipaddr.js": "1.9.1"
}
},
+ "pstree.remy": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
+ },
"pure-rand": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz",
@@ -6968,9 +7418,9 @@
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
},
"raw-body": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
- "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
"requires": {
"bytes": "3.1.2",
"http-errors": "2.0.0",
@@ -6984,6 +7434,14 @@
"integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==",
"dev": true
},
+ "readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "requires": {
+ "picomatch": "^2.2.1"
+ }
+ },
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -7132,6 +7590,21 @@
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true
},
+ "simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "requires": {
+ "semver": "^7.5.3"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w=="
+ }
+ }
+ },
"sisteransi": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
@@ -7324,7 +7797,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
"requires": {
"is-number": "^7.0.0"
}
@@ -7334,6 +7806,11 @@
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
},
+ "touch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
+ "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA=="
+ },
"type-detect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
@@ -7355,6 +7832,11 @@
"mime-types": "~2.1.24"
}
},
+ "undefsafe": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
+ },
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
diff --git a/week-2/Week-2-Assignments/02-nodejs/package.json b/week-2/Week-2-Assignments/02-nodejs/package.json
index 4858530a6..9db6fa9ac 100644
--- a/week-2/Week-2-Assignments/02-nodejs/package.json
+++ b/week-2/Week-2-Assignments/02-nodejs/package.json
@@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
+ "type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test-fileServer": "./node_modules/jest/bin/jest.js ./tests/fileServer.test.js",
@@ -21,7 +22,10 @@
"testTimeout": 10000
},
"dependencies": {
- "express": "^4.18.2",
+ "body-parser": "1.20.2",
+ "express": "^4.19.2",
+ "jsonwebtoken": "^9.0.2",
+ "nodemon": "^3.1.4",
"uuid": "^9.0.0"
}
}
diff --git a/week-2/Week-2-Assignments/02-nodejs/tempCodeRunnerFile.js b/week-2/Week-2-Assignments/02-nodejs/tempCodeRunnerFile.js
new file mode 100644
index 000000000..5cbdc2ae7
--- /dev/null
+++ b/week-2/Week-2-Assignments/02-nodejs/tempCodeRunnerFile.js
@@ -0,0 +1 @@
+uuiv4
\ No newline at end of file
diff --git a/week-2/Week-2-Assignments/02-nodejs/todoServer.js b/week-2/Week-2-Assignments/02-nodejs/todoServer.js
index cffc7d600..5dac71547 100644
--- a/week-2/Week-2-Assignments/02-nodejs/todoServer.js
+++ b/week-2/Week-2-Assignments/02-nodejs/todoServer.js
@@ -39,11 +39,117 @@
Testing the server - run `npm run test-todoServer` command in terminal
*/
-const express = require('express');
-const bodyParser = require('body-parser');
-
+// const express = require('express');
+// const bodyParser = require('body-parser');
+import express from "express"
+import body_parser from "body-parser"
+import jwt from "jsonwebtoken"
+import { v4 as uuidv4 } from "uuid"
const app = express();
+app.use(body_parser.json())
+var allData = [{ id: 12345, name: "Name", password: "Password", todos: [{ id: 1, title: "title", description: "description" }] }];
+var allTodos = [{ "id": 1, "title": "title", "description": "description" }];
+const jwt_secret_code = "tOdo@JWt"
+
+function generateToken(dataTosign) {
+ return jwt.sign(dataTosign, jwt_secret_code);
+}
+function verifyToken(dataToVerify) {
+ var userverify = jwt.verify(dataToVerify, jwt_secret_code);
+ return userverify;
+
+}
+
+///User middleware
+const userMiddleware = (req, res, next) => {
+ const { token } = req.headers;
+ var tokenExpiry = verifyToken(token);
+ const { name, password } = tokenExpiry;
+
+ console.log(tokenExpiry);
+ var user = allData.find((ele) => (ele.name === name && ele.password === password));
+
+ if (user) {
+ req.user = user;
+ next();
+ } else {
+ res.status(403).send({
+ statusCode: 0, message: "Session Expired Please Login"
+ });
+ }
+};
+
+app.post("/signup", (req, res) => {
+ const { name, password } = req.body;
+ var checkUser = allData.find((ele) => (ele.name === name && ele.password === password));
+ if (checkUser) {
+ res.send({ statusCode: 0, message: "User Already Exist", token: generateToken({ name: name, password: password }) });
+ } else {
+ allData.push({
+ id: uuidv4(),
+ name: name, password: password, todos: []
+ });
+ res.status(200).send({ statusCode: 1, message: "Account Created Successfully", token: generateToken({ name: name, password: password }) })
+ }
+
+});
+
+// GET /todos
+app.get("/todos", userMiddleware, (req, res) => {
+ if (req.user.todos.length > 0) {
+ res.send({ statusCode: 1, data: req.user.todos });
+ } else {
+ res.send({ statusCode: 0, message: "No Records Found" });
+ }
+});
+
+// POST /todos - Create a new todo item
+app.post("/todos", userMiddleware, (req, res) => {
+ const { title, description } = req.body;
+ req.user.todos.push({
+ id: uuidv4(), title: title, description: description
+ });
+ res.send({ statusCode: 1, message: "Todo Added" })
+});
+
+// .GET /todos/:id - Retrieve a specific todo item by ID
+app.get("/todos/:id", userMiddleware, (req, res) => {
+ var id = req.params.id;
+ var checkTodoWithId = req.user.todos.find((eachTodo) => (eachTodo.id === id));
+ if (checkTodoWithId) {
+ res.send({ statusCode: 1, data: checkTodoWithId })
+ } else {
+ res.send({ statusCode: 0, message: "Todo Not Found" });
+ }
+});
+
+// PUT /todos/:id - Update an existing todo item by ID
+app.put("/todos/:id", userMiddleware, (req, res) => {
+ const id = req.params.id;
+ const { title, description } = req.body;
+
+ var updateTodoIdData = req.user.todos.find((eachTodo) => (eachTodo.id === id));
+ if (updateTodoIdData) {
+ updateTodoIdData.title = title;
+ updateTodoIdData.description = description;
+ res.send({ statusCode: 1, message: "Updated Successfully" });
+ } else {
+ res.send({ statusCode: 0, message: "Todo Not Found" });
+ }
+
+
+})
+//DELETE /todos/:id - Delete a todo item by IDs
+app.delete("/todos/:id", userMiddleware, (req, res) => {
+ var id = req.params.id;
+ var newList = req.user.todos.filter(ele => ele.id != id);
+ req.user.todos = newList;
+ res.send({ statusCode: 1, message: "Deleted successfully" });
+});
+
+app.listen(3000, () => {
+ console.log("Server Started At 3000");
+})
-app.use(bodyParser.json());
-module.exports = app;
+// module.exports = app;
diff --git a/week-3/02-course-app-easy-2/index.js b/week-3/02-course-app-easy-2/index.js
index 32fff61e9..f42a5b8b5 100644
--- a/week-3/02-course-app-easy-2/index.js
+++ b/week-3/02-course-app-easy-2/index.js
@@ -1,52 +1,279 @@
-const express = require('express');
+// const express = require('express');
+// const app = express();
+
+// app.use(express.json());
+
+// let ADMINS = [];
+// let USERS = [];
+// let COURSES = [];
+
+// // Admin routes
+// app.post('/admin/signup', (req, res) => {
+// // logic to sign up admin
+// });
+
+// app.post('/admin/login', (req, res) => {
+// // logic to log in admin
+// });
+
+// app.post('/admin/courses', (req, res) => {
+// // logic to create a course
+// });
+
+// app.put('/admin/courses/:courseId', (req, res) => {
+// // logic to edit a course
+// });
+
+// app.get('/admin/courses', (req, res) => {
+// // logic to get all courses
+// });
+
+// // User routes
+// app.post('/users/signup', (req, res) => {
+// // logic to sign up user
+// });
+
+// app.post('/users/login', (req, res) => {
+// // logic to log in user
+// });
+
+// app.get('/users/courses', (req, res) => {
+// // logic to list all courses
+// });
+
+// app.post('/users/courses/:courseId', (req, res) => {
+// // logic to purchase a course
+// });
+
+// app.get('/users/purchasedCourses', (req, res) => {
+// // logic to view purchased courses
+// });
+
+// app.listen(3000, () => {
+// console.log('Server is listening on port 3000');
+// });
+
+///I have already done jwt in easy assignment only
+// const express = require('express');
+import express from "express";
+import { v4 as uuidv4 } from "uuid"
+import jwt from "jsonwebtoken"
const app = express();
app.use(express.json());
-let ADMINS = [];
-let USERS = [];
-let COURSES = [];
+let ADMINS = [{
+ id: 1, adminName: "adminName", adminPassword: "adminPassword", courses: [], amount: 0
+}];
+let USERS = [{
+ id: 1, userName: "userName", userPassword: "userPassword", courses: []
+}
+];
+let COURSES = [{
+ id: 1, courseName: "courseName", courseDetails: "courseDetails", authorId: 1, amount: 10
+}];
+const jwt_secret_token = "CoUr$eTOkeN";
+
+function generateToken(data) {
+ return jwt.sign(data, jwt_secret_token);
+}
+
+function verifyToken(data) {
+ return jwt.verify(data, jwt_secret_token);
+}
// Admin routes
app.post('/admin/signup', (req, res) => {
// logic to sign up admin
+ const { adminName, adminPassword } = req.body;
+
+ if ((adminName && adminName.length <= 0) || (adminPassword && adminPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more Fields are Empty" });
+ return;
+ }
+ var isAlreadyAdmin = ADMINS.find((eachEle => eachEle.adminName == adminName));
+ if (isAlreadyAdmin) {
+ res.send({ statusCode: 0, message: "User Name Already Exist Please Login", });
+ return;
+ }
+ var adminData = {
+ id: uuidv4(),
+ adminName: adminName,
+ adminPassword: adminPassword,
+ courses: [],
+ amount: 0
+ };
+ ADMINS.push(adminData);
+ res.send({ statusCode: 1, message: "User Signup successfully", id: adminData.id, token: generateToken({ adminName: adminData.adminName, adminPassword: adminData.adminPassword }) });
+
+
});
+
app.post('/admin/login', (req, res) => {
// logic to log in admin
+ const { adminName, adminPassword } = req.body;
+ var isAdmin = ADMINS.find((admin => (admin.adminName === adminName && admin.adminPassword == adminPassword)));
+ if (isAdmin) {
+ res.send({ statusCode: 1, data: isAdmin, token: generateToken(isAdmin) })
+ } else {
+
+ res.send({ statusCode: 0, message: "User Not Found" });
+ }
});
-app.post('/admin/courses', (req, res) => {
+const adminMidddleware = (req, res, next) => {
+ const token = req.headers.token;
+ const { adminName, adminPassword } = verifyToken(token);
+ var admin = ADMINS.find((adm => adm.adminName === adminName && adm.adminPassword === adminPassword));
+ if (admin) {
+ req.user = admin;
+ next();
+ } else {
+ res.status(403).send({ statusCode: 0, message: "Unauthorised" });
+ }
+}
+
+app.post('/admin/courses', adminMidddleware, (req, res) => {
// logic to create a course
+ const { courseName, courseDetails, amount } = req.body;
+ var createdCourse = {
+ id: uuidv4(), courseName: courseName, courseDetails: courseDetails, authorId: req.user.id, amount: amount
+ };
+
+ COURSES.push(createdCourse);
+ req.user.courses.push(createdCourse.id);
+
+ res.send({ statusCode: 1, message: "Added", data: req.user })
});
-app.put('/admin/courses/:courseId', (req, res) => {
+app.put('/admin/courses/:courseId', adminMidddleware, (req, res) => {
// logic to edit a course
+ const courseId = req.params.courseId;
+ const { courseName, courseDetails } = req.body;
+
+ var isHisCourseId = req.user.courses.find((cou) => (cou === courseId));
+ if (isHisCourseId) {
+ var broughtCourse = COURSES.find((cous) => (cous.id === courseId));
+ broughtCourse.courseName = courseName;
+ broughtCourse.courseDetails = courseDetails;
+
+ res.send({ statusCode: 1, data: broughtCourse })
+ } else {
+ res.send({ statusCode: 0, message: "You Have not brought this course" })
+ }
});
-app.get('/admin/courses', (req, res) => {
+app.get('/admin/courses', adminMidddleware, (req, res) => {
// logic to get all courses
+ if (req.user.courses.length > 0) {
+ var adminCoursesId = req.user.courses;
+ let allCoursesDetails = [];
+ var allAdminCourses = adminCoursesId.forEach((eachCour => {
+ var courseFinded = COURSES.find((cour) => (eachCour === cour.id));
+ if (courseFinded) {
+ allCoursesDetails.push(courseFinded);
+ }
+ }))
+ res.send({ statusCode: 1, data: allCoursesDetails });
+ } else {
+ res.send({ statusCode: 0, message: "Make Courses to see here" })
+ }
});
// User routes
app.post('/users/signup', (req, res) => {
// logic to sign up user
+ const { userName, userPassword } = req.body;
+
+ if ((userName && userName.length <= 0) || (userPassword && userPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more fields are Empty" });
+ return;
+ }
+ var userPresent = USERS.find((usr) => (usr.userName === userName));
+ if (userPresent) {
+ res.send({ statusCode: 0, message: "User Aleady Found" });
+ } else {
+ let userData = {
+ id: uuidv4(),
+ userName: userName,
+ userPassword: userPassword,
+ courses: []
+ }
+ USERS.push(userData);
+ res.send({ statusCode: 1, id: userData.id, token: generateToken({ userName: userData.userName, userPassword: userData.userPassword }) })
+ }
+
+
});
app.post('/users/login', (req, res) => {
// logic to log in user
+ const { userName, userPassword } = req.body;
+ if ((userName && userName.length <= 0) || (userPassword && userPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more fields are Empty" });
+ return;
+ }
+ var isUserPresent = USERS.find((urs) => (urs.userName === userName && urs.userPassword === userPassword));
+ if (isUserPresent) {
+ res.send({ statusCode: 1, data: isUserPresent, token: generateToken({ userName: isUserPresent.userName, userPassword: isUserPresent.userPassword }) })
+
+ } else {
+ res.send({ statusCode: 0, message: "Invalid User Details" })
+ }
});
-app.get('/users/courses', (req, res) => {
+const userMiddleware = (req, res, next) => {
+ const token = req.headers.token;
+ const { userName, userPassword } = verifyToken(token);
+
+ let isUserPresent = USERS.find((urs) => (urs.userName === userName && urs.userPassword === userPassword));
+ if (isUserPresent) {
+ req.user = isUserPresent;
+ next();
+ } else {
+ res.status(403).send({ statusCode: 0, message: "Unauthorised" });
+ }
+}
+
+app.get('/users/courses', userMiddleware, (req, res) => {
// logic to list all courses
+ res.send({ statusCode: 1, data: COURSES });
});
-app.post('/users/courses/:courseId', (req, res) => {
+app.post('/users/courses/:courseId', userMiddleware, (req, res) => {
// logic to purchase a course
+ const courseId = req.params.courseId;
+ req.user.courses.push(courseId);
+
+ var courseDetail = COURSES.find((cor) => (cor.id === courseId));
+ if (courseDetail) {
+ var author = ADMINS.find((adm) => (adm.id === courseDetail.authorId));
+ author.amount = author.amount + courseDetail.amount;
+ }
+
+ res.send({ statusCode: 1, message: "Course Added Successfully" });
});
-app.get('/users/purchasedCourses', (req, res) => {
+app.get('/users/purchasedCourses', userMiddleware, (req, res) => {
// logic to view purchased courses
+ var purchasedCoursesId = req.user.courses;
+ if (purchasedCoursesId.length > 0) {
+
+ let purchasedCourses = [];
+ purchasedCoursesId.forEach((cour) => {
+ var isPurched = COURSES.find((ele) => ele.id === cour);
+ if (isPurched) {
+ purchasedCourses.push(isPurched);
+ }
+ });
+ res.send({ statusCode: 1, data: purchasedCourses });
+
+ } else {
+
+ res.send({ statusCode: 0, message: "Buy some courses to see heres" });
+ }
+
});
app.listen(3000, () => {
diff --git a/week-3/02-course-app-easy/index.js b/week-3/02-course-app-easy/index.js
index 32fff61e9..86e3b0d91 100644
--- a/week-3/02-course-app-easy/index.js
+++ b/week-3/02-course-app-easy/index.js
@@ -1,52 +1,223 @@
-const express = require('express');
+// const express = require('express');
+import express from "express";
+import { v4 as uuidv4 } from "uuid"
+import jwt from "jsonwebtoken"
const app = express();
app.use(express.json());
-let ADMINS = [];
-let USERS = [];
-let COURSES = [];
+let ADMINS = [{
+ id: 1, adminName: "adminName", adminPassword: "adminPassword", courses: [], amount: 0
+}];
+let USERS = [{
+ id: 1, userName: "userName", userPassword: "userPassword", courses: []
+}
+];
+let COURSES = [{
+ id: 1, courseName: "courseName", courseDetails: "courseDetails", authorId: 1, amount: 10
+}];
+const jwt_secret_token = "CoUr$eTOkeN";
+
+function generateToken(data) {
+ return jwt.sign(data, jwt_secret_token);
+}
+
+function verifyToken(data) {
+ return jwt.verify(data, jwt_secret_token);
+}
// Admin routes
app.post('/admin/signup', (req, res) => {
// logic to sign up admin
+ const { adminName, adminPassword } = req.body;
+
+ if ((adminName && adminName.length <= 0) || (adminPassword && adminPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more Fields are Empty" });
+ return;
+ }
+ var isAlreadyAdmin = ADMINS.find((eachEle => eachEle.adminName == adminName));
+ if (isAlreadyAdmin) {
+ res.send({ statusCode: 0, message: "User Name Already Exist Please Login", });
+ return;
+ }
+ var adminData = {
+ id: uuidv4(),
+ adminName: adminName,
+ adminPassword: adminPassword,
+ courses: [],
+ amount: 0
+ };
+ ADMINS.push(adminData);
+ res.send({ statusCode: 1, message: "User Signup successfully", id: adminData.id, token: generateToken({ adminName: adminData.adminName, adminPassword: adminData.adminPassword }) });
+
+
});
+
app.post('/admin/login', (req, res) => {
// logic to log in admin
+ const { adminName, adminPassword } = req.body;
+ var isAdmin = ADMINS.find((admin => (admin.adminName === adminName && admin.adminPassword == adminPassword)));
+ if (isAdmin) {
+ res.send({ statusCode: 1, data: isAdmin, token: generateToken(isAdmin) })
+ } else {
+
+ res.send({ statusCode: 0, message: "User Not Found" });
+ }
});
-app.post('/admin/courses', (req, res) => {
+const adminMidddleware = (req, res, next) => {
+ const token = req.headers.token;
+ const { adminName, adminPassword } = verifyToken(token);
+ var admin = ADMINS.find((adm => adm.adminName === adminName && adm.adminPassword === adminPassword));
+ if (admin) {
+ req.user = admin;
+ next();
+ } else {
+ res.status(403).send({ statusCode: 0, message: "Unauthorised" });
+ }
+}
+
+app.post('/admin/courses', adminMidddleware, (req, res) => {
// logic to create a course
+ const { courseName, courseDetails, amount } = req.body;
+ var createdCourse = {
+ id: uuidv4(), courseName: courseName, courseDetails: courseDetails, authorId: req.user.id, amount: amount
+ };
+
+ COURSES.push(createdCourse);
+ req.user.courses.push(createdCourse.id);
+
+ res.send({ statusCode: 1, message: "Added", data: req.user })
});
-app.put('/admin/courses/:courseId', (req, res) => {
+app.put('/admin/courses/:courseId', adminMidddleware, (req, res) => {
// logic to edit a course
+ const courseId = req.params.courseId;
+ const { courseName, courseDetails } = req.body;
+
+ var isHisCourseId = req.user.courses.find((cou) => (cou === courseId));
+ if (isHisCourseId) {
+ var broughtCourse = COURSES.find((cous) => (cous.id === courseId));
+ broughtCourse.courseName = courseName;
+ broughtCourse.courseDetails = courseDetails;
+
+ res.send({ statusCode: 1, data: broughtCourse })
+ } else {
+ res.send({ statusCode: 0, message: "You Have not brought this course" })
+ }
});
-app.get('/admin/courses', (req, res) => {
+app.get('/admin/courses', adminMidddleware, (req, res) => {
// logic to get all courses
+ if (req.user.courses.length > 0) {
+ var adminCoursesId = req.user.courses;
+ let allCoursesDetails = [];
+ var allAdminCourses = adminCoursesId.forEach((eachCour => {
+ var courseFinded = COURSES.find((cour) => (eachCour === cour.id));
+ if (courseFinded) {
+ allCoursesDetails.push(courseFinded);
+ }
+ }))
+ res.send({ statusCode: 1, data: allCoursesDetails });
+ } else {
+ res.send({ statusCode: 0, message: "Make Courses to see here" })
+ }
});
// User routes
app.post('/users/signup', (req, res) => {
// logic to sign up user
+ const { userName, userPassword } = req.body;
+
+ if ((userName && userName.length <= 0) || (userPassword && userPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more fields are Empty" });
+ return;
+ }
+ var userPresent = USERS.find((usr) => (usr.userName === userName));
+ if (userPresent) {
+ res.send({ statusCode: 0, message: "User Aleady Found" });
+ } else {
+ let userData = {
+ id: uuidv4(),
+ userName: userName,
+ userPassword: userPassword,
+ courses: []
+ }
+ USERS.push(userData);
+ res.send({ statusCode: 1, id: userData.id, token: generateToken({ userName: userData.userName, userPassword: userData.userPassword }) })
+ }
+
+
});
app.post('/users/login', (req, res) => {
// logic to log in user
+ const { userName, userPassword } = req.body;
+ if ((userName && userName.length <= 0) || (userPassword && userPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more fields are Empty" });
+ return;
+ }
+ var isUserPresent = USERS.find((urs) => (urs.userName === userName && urs.userPassword === userPassword));
+ if (isUserPresent) {
+ res.send({ statusCode: 1, data: isUserPresent, token: generateToken({ userName: isUserPresent.userName, userPassword: isUserPresent.userPassword }) })
+
+ } else {
+ res.send({ statusCode: 0, message: "Invalid User Details" })
+ }
});
-app.get('/users/courses', (req, res) => {
+const userMiddleware = (req, res, next) => {
+ const token = req.headers.token;
+ const { userName, userPassword } = verifyToken(token);
+
+ let isUserPresent = USERS.find((urs) => (urs.userName === userName && urs.userPassword === userPassword));
+ if (isUserPresent) {
+ req.user = isUserPresent;
+ next();
+ } else {
+ res.status(403).send({ statusCode: 0, message: "Unauthorised" });
+ }
+}
+
+app.get('/users/courses', userMiddleware, (req, res) => {
// logic to list all courses
+ res.send({ statusCode: 1, data: COURSES });
});
-app.post('/users/courses/:courseId', (req, res) => {
+app.post('/users/courses/:courseId', userMiddleware, (req, res) => {
// logic to purchase a course
+ const courseId = req.params.courseId;
+ req.user.courses.push(courseId);
+
+ var courseDetail = COURSES.find((cor) => (cor.id === courseId));
+ if (courseDetail) {
+ var author = ADMINS.find((adm) => (adm.id === courseDetail.authorId));
+ author.amount = author.amount + courseDetail.amount;
+ }
+
+ res.send({ statusCode: 1, message: "Course Added Successfully" });
});
-app.get('/users/purchasedCourses', (req, res) => {
+app.get('/users/purchasedCourses', userMiddleware, (req, res) => {
// logic to view purchased courses
+ var purchasedCoursesId = req.user.courses;
+ if (purchasedCoursesId.length > 0) {
+
+ let purchasedCourses = [];
+ purchasedCoursesId.forEach((cour) => {
+ var isPurched = COURSES.find((ele) => ele.id === cour);
+ if (isPurched) {
+ purchasedCourses.push(isPurched);
+ }
+ });
+ res.send({ statusCode: 1, data: purchasedCourses });
+
+ } else {
+
+ res.send({ statusCode: 0, message: "Buy some courses to see heres" });
+ }
+
});
app.listen(3000, () => {
diff --git a/week-3/02-course-app-easy/node_modules/.bin/semver b/week-3/02-course-app-easy/node_modules/.bin/semver
new file mode 100644
index 000000000..77443e787
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/.bin/semver
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
+else
+ exec node "$basedir/../semver/bin/semver.js" "$@"
+fi
diff --git a/week-3/02-course-app-easy/node_modules/.bin/semver.cmd b/week-3/02-course-app-easy/node_modules/.bin/semver.cmd
new file mode 100644
index 000000000..9913fa9d0
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/.bin/semver.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
diff --git a/week-3/02-course-app-easy/node_modules/.bin/semver.ps1 b/week-3/02-course-app-easy/node_modules/.bin/semver.ps1
new file mode 100644
index 000000000..314717ad4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/.bin/semver.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
+ } else {
+ & "node$exe" "$basedir/../semver/bin/semver.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/week-3/02-course-app-easy/node_modules/.bin/uuid b/week-3/02-course-app-easy/node_modules/.bin/uuid
new file mode 100644
index 000000000..c3ec0035f
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/.bin/uuid
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@"
+else
+ exec node "$basedir/../uuid/dist/bin/uuid" "$@"
+fi
diff --git a/week-3/02-course-app-easy/node_modules/.bin/uuid.cmd b/week-3/02-course-app-easy/node_modules/.bin/uuid.cmd
new file mode 100644
index 000000000..0f2376eaf
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/.bin/uuid.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %*
diff --git a/week-3/02-course-app-easy/node_modules/.bin/uuid.ps1 b/week-3/02-course-app-easy/node_modules/.bin/uuid.ps1
new file mode 100644
index 000000000..78046284b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/.bin/uuid.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ } else {
+ & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/week-3/02-course-app-easy/node_modules/.package-lock.json b/week-3/02-course-app-easy/node_modules/.package-lock.json
new file mode 100644
index 000000000..85e4b51d6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/.package-lock.json
@@ -0,0 +1,143 @@
+{
+ "name": "02-course-app-easy",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
+ },
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
+ "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ }
+ }
+}
diff --git a/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/.npmignore b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/.npmignore
new file mode 100644
index 000000000..34e4f5c29
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/.npmignore
@@ -0,0 +1,2 @@
+.*.sw[mnop]
+node_modules/
diff --git a/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/.travis.yml b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/.travis.yml
new file mode 100644
index 000000000..78e1c0146
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+- "0.11"
+- "0.10"
diff --git a/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/LICENSE.txt b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/LICENSE.txt
new file mode 100644
index 000000000..9a064f3f4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/LICENSE.txt
@@ -0,0 +1,12 @@
+Copyright (c) 2013, GoInstant Inc., a salesforce.com company
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/README.md b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/README.md
new file mode 100644
index 000000000..4f227f58b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/README.md
@@ -0,0 +1,50 @@
+# buffer-equal-constant-time
+
+Constant-time `Buffer` comparison for node.js. Should work with browserify too.
+
+[![Build Status](https://travis-ci.org/goinstant/buffer-equal-constant-time.png?branch=master)](https://travis-ci.org/goinstant/buffer-equal-constant-time)
+
+```sh
+ npm install buffer-equal-constant-time
+```
+
+# Usage
+
+```js
+ var bufferEq = require('buffer-equal-constant-time');
+
+ var a = new Buffer('asdf');
+ var b = new Buffer('asdf');
+ if (bufferEq(a,b)) {
+ // the same!
+ } else {
+ // different in at least one byte!
+ }
+```
+
+If you'd like to install an `.equal()` method onto the node.js `Buffer` and
+`SlowBuffer` prototypes:
+
+```js
+ require('buffer-equal-constant-time').install();
+
+ var a = new Buffer('asdf');
+ var b = new Buffer('asdf');
+ if (a.equal(b)) {
+ // the same!
+ } else {
+ // different in at least one byte!
+ }
+```
+
+To get rid of the installed `.equal()` method, call `.restore()`:
+
+```js
+ require('buffer-equal-constant-time').restore();
+```
+
+# Legal
+
+© 2013 GoInstant Inc., a salesforce.com company
+
+Licensed under the BSD 3-clause license.
diff --git a/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/index.js b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/index.js
new file mode 100644
index 000000000..5462c1f83
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/index.js
@@ -0,0 +1,41 @@
+/*jshint node:true */
+'use strict';
+var Buffer = require('buffer').Buffer; // browserify
+var SlowBuffer = require('buffer').SlowBuffer;
+
+module.exports = bufferEq;
+
+function bufferEq(a, b) {
+
+ // shortcutting on type is necessary for correctness
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ return false;
+ }
+
+ // buffer sizes should be well-known information, so despite this
+ // shortcutting, it doesn't leak any information about the *contents* of the
+ // buffers.
+ if (a.length !== b.length) {
+ return false;
+ }
+
+ var c = 0;
+ for (var i = 0; i < a.length; i++) {
+ /*jshint bitwise:false */
+ c |= a[i] ^ b[i]; // XOR
+ }
+ return c === 0;
+}
+
+bufferEq.install = function() {
+ Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
+ return bufferEq(this, that);
+ };
+};
+
+var origBufEqual = Buffer.prototype.equal;
+var origSlowBufEqual = SlowBuffer.prototype.equal;
+bufferEq.restore = function() {
+ Buffer.prototype.equal = origBufEqual;
+ SlowBuffer.prototype.equal = origSlowBufEqual;
+};
diff --git a/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/package.json b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/package.json
new file mode 100644
index 000000000..17c7de22c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "buffer-equal-constant-time",
+ "version": "1.0.1",
+ "description": "Constant-time comparison of Buffers",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha test.js"
+ },
+ "repository": "git@github.com:goinstant/buffer-equal-constant-time.git",
+ "keywords": [
+ "buffer",
+ "equal",
+ "constant-time",
+ "crypto"
+ ],
+ "author": "GoInstant Inc., a salesforce.com company",
+ "license": "BSD-3-Clause",
+ "devDependencies": {
+ "mocha": "~1.15.1"
+ }
+}
diff --git a/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/test.js b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/test.js
new file mode 100644
index 000000000..0bc972d84
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/buffer-equal-constant-time/test.js
@@ -0,0 +1,42 @@
+/*jshint node:true */
+'use strict';
+
+var bufferEq = require('./index');
+var assert = require('assert');
+
+describe('buffer-equal-constant-time', function() {
+ var a = new Buffer('asdfasdf123456');
+ var b = new Buffer('asdfasdf123456');
+ var c = new Buffer('asdfasdf');
+
+ describe('bufferEq', function() {
+ it('says a == b', function() {
+ assert.strictEqual(bufferEq(a, b), true);
+ });
+
+ it('says a != c', function() {
+ assert.strictEqual(bufferEq(a, c), false);
+ });
+ });
+
+ describe('install/restore', function() {
+ before(function() {
+ bufferEq.install();
+ });
+ after(function() {
+ bufferEq.restore();
+ });
+
+ it('installed an .equal method', function() {
+ var SlowBuffer = require('buffer').SlowBuffer;
+ assert.ok(Buffer.prototype.equal);
+ assert.ok(SlowBuffer.prototype.equal);
+ });
+
+ it('infected existing Buffers', function() {
+ assert.strictEqual(a.equal(b), true);
+ assert.strictEqual(a.equal(c), false);
+ });
+ });
+
+});
diff --git a/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/CODEOWNERS b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/CODEOWNERS
new file mode 100644
index 000000000..4451d3d83
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/CODEOWNERS
@@ -0,0 +1 @@
+* @omsmith
diff --git a/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/LICENSE b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/LICENSE
new file mode 100644
index 000000000..8754ed630
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2015 D2L Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/README.md b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/README.md
new file mode 100644
index 000000000..daa95d6e4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/README.md
@@ -0,0 +1,65 @@
+# ecdsa-sig-formatter
+
+[![Build Status](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter.svg?branch=master)](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter) [![Coverage Status](https://coveralls.io/repos/Brightspace/node-ecdsa-sig-formatter/badge.svg)](https://coveralls.io/r/Brightspace/node-ecdsa-sig-formatter)
+
+Translate between JOSE and ASN.1/DER encodings for ECDSA signatures
+
+## Install
+```sh
+npm install ecdsa-sig-formatter --save
+```
+
+## Usage
+```js
+var format = require('ecdsa-sig-formatter');
+
+var derSignature = '..'; // asn.1/DER encoded ecdsa signature
+
+var joseSignature = format.derToJose(derSignature);
+
+```
+
+### API
+
+---
+
+#### `.derToJose(Buffer|String signature, String alg)` -> `String`
+
+Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature.
+Returns a _base64 url_ encoded `String`.
+
+* If _signature_ is a `String`, it should be _base64_ encoded
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
+
+---
+
+#### `.joseToDer(Buffer|String signature, String alg)` -> `Buffer`
+
+Convert the JOSE-style concatenated signature to an ASN.1/DER encoded
+signature. Returns a `Buffer`
+
+* If _signature_ is a `String`, it should be _base64 url_ encoded
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
+
+## Contributing
+
+1. **Fork** the repository. Committing directly against this repository is
+ highly discouraged.
+
+2. Make your modifications in a branch, updating and writing new unit tests
+ as necessary in the `spec` directory.
+
+3. Ensure that all tests pass with `npm test`
+
+4. `rebase` your changes against master. *Do not merge*.
+
+5. Submit a pull request to this repository. Wait for tests to run and someone
+ to chime in.
+
+### Code Style
+
+This repository is configured with [EditorConfig][EditorConfig] and
+[ESLint][ESLint] rules.
+
+[EditorConfig]: http://editorconfig.org/
+[ESLint]: http://eslint.org
diff --git a/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/package.json b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/package.json
new file mode 100644
index 000000000..6fb5ebfe6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "ecdsa-sig-formatter",
+ "version": "1.0.11",
+ "description": "Translate ECDSA signatures between ASN.1/DER and JOSE-style concatenation",
+ "main": "src/ecdsa-sig-formatter.js",
+ "scripts": {
+ "check-style": "eslint .",
+ "pretest": "npm run check-style",
+ "test": "istanbul cover --root src _mocha -- spec",
+ "report-cov": "cat ./coverage/lcov.info | coveralls"
+ },
+ "typings": "./src/ecdsa-sig-formatter.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/Brightspace/node-ecdsa-sig-formatter.git"
+ },
+ "keywords": [
+ "ecdsa",
+ "der",
+ "asn.1",
+ "jwt",
+ "jwa",
+ "jsonwebtoken",
+ "jose"
+ ],
+ "author": "D2L Corporation",
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/Brightspace/node-ecdsa-sig-formatter/issues"
+ },
+ "homepage": "https://github.com/Brightspace/node-ecdsa-sig-formatter#readme",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "devDependencies": {
+ "bench": "^0.3.6",
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.9",
+ "eslint": "^2.12.0",
+ "eslint-config-brightspace": "^0.2.1",
+ "istanbul": "^0.4.3",
+ "jwk-to-pem": "^1.2.5",
+ "mocha": "^2.5.3",
+ "native-crypto": "^1.7.0"
+ }
+}
diff --git a/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts
new file mode 100644
index 000000000..9693aa030
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts
@@ -0,0 +1,17 @@
+///
+
+declare module "ecdsa-sig-formatter" {
+ /**
+ * Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. Returns a base64 url encoded String.
+ * If signature is a String, it should be base64 encoded
+ * alg must be one of ES256, ES384 or ES512
+ */
+ export function derToJose(signature: Buffer | string, alg: string): string;
+
+ /**
+ * Convert the JOSE-style concatenated signature to an ASN.1/DER encoded signature. Returns a Buffer
+ * If signature is a String, it should be base64 url encoded
+ * alg must be one of ES256, ES384 or ES512
+ */
+ export function joseToDer(signature: Buffer | string, alg: string): Buffer
+}
diff --git a/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
new file mode 100644
index 000000000..38eeb9b97
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
@@ -0,0 +1,187 @@
+'use strict';
+
+var Buffer = require('safe-buffer').Buffer;
+
+var getParamBytesForAlg = require('./param-bytes-for-alg');
+
+var MAX_OCTET = 0x80,
+ CLASS_UNIVERSAL = 0,
+ PRIMITIVE_BIT = 0x20,
+ TAG_SEQ = 0x10,
+ TAG_INT = 0x02,
+ ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6),
+ ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6);
+
+function base64Url(base64) {
+ return base64
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function signatureAsBuffer(signature) {
+ if (Buffer.isBuffer(signature)) {
+ return signature;
+ } else if ('string' === typeof signature) {
+ return Buffer.from(signature, 'base64');
+ }
+
+ throw new TypeError('ECDSA signature must be a Base64 string or a Buffer');
+}
+
+function derToJose(signature, alg) {
+ signature = signatureAsBuffer(signature);
+ var paramBytes = getParamBytesForAlg(alg);
+
+ // the DER encoded param should at most be the param size, plus a padding
+ // zero, since due to being a signed integer
+ var maxEncodedParamLength = paramBytes + 1;
+
+ var inputLength = signature.length;
+
+ var offset = 0;
+ if (signature[offset++] !== ENCODED_TAG_SEQ) {
+ throw new Error('Could not find expected "seq"');
+ }
+
+ var seqLength = signature[offset++];
+ if (seqLength === (MAX_OCTET | 1)) {
+ seqLength = signature[offset++];
+ }
+
+ if (inputLength - offset < seqLength) {
+ throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining');
+ }
+
+ if (signature[offset++] !== ENCODED_TAG_INT) {
+ throw new Error('Could not find expected "int" for "r"');
+ }
+
+ var rLength = signature[offset++];
+
+ if (inputLength - offset - 2 < rLength) {
+ throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available');
+ }
+
+ if (maxEncodedParamLength < rLength) {
+ throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
+ }
+
+ var rOffset = offset;
+ offset += rLength;
+
+ if (signature[offset++] !== ENCODED_TAG_INT) {
+ throw new Error('Could not find expected "int" for "s"');
+ }
+
+ var sLength = signature[offset++];
+
+ if (inputLength - offset !== sLength) {
+ throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"');
+ }
+
+ if (maxEncodedParamLength < sLength) {
+ throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
+ }
+
+ var sOffset = offset;
+ offset += sLength;
+
+ if (offset !== inputLength) {
+ throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain');
+ }
+
+ var rPadding = paramBytes - rLength,
+ sPadding = paramBytes - sLength;
+
+ var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength);
+
+ for (offset = 0; offset < rPadding; ++offset) {
+ dst[offset] = 0;
+ }
+ signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength);
+
+ offset = paramBytes;
+
+ for (var o = offset; offset < o + sPadding; ++offset) {
+ dst[offset] = 0;
+ }
+ signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength);
+
+ dst = dst.toString('base64');
+ dst = base64Url(dst);
+
+ return dst;
+}
+
+function countPadding(buf, start, stop) {
+ var padding = 0;
+ while (start + padding < stop && buf[start + padding] === 0) {
+ ++padding;
+ }
+
+ var needsSign = buf[start + padding] >= MAX_OCTET;
+ if (needsSign) {
+ --padding;
+ }
+
+ return padding;
+}
+
+function joseToDer(signature, alg) {
+ signature = signatureAsBuffer(signature);
+ var paramBytes = getParamBytesForAlg(alg);
+
+ var signatureBytes = signature.length;
+ if (signatureBytes !== paramBytes * 2) {
+ throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"');
+ }
+
+ var rPadding = countPadding(signature, 0, paramBytes);
+ var sPadding = countPadding(signature, paramBytes, signature.length);
+ var rLength = paramBytes - rPadding;
+ var sLength = paramBytes - sPadding;
+
+ var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength;
+
+ var shortLength = rsBytes < MAX_OCTET;
+
+ var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes);
+
+ var offset = 0;
+ dst[offset++] = ENCODED_TAG_SEQ;
+ if (shortLength) {
+ // Bit 8 has value "0"
+ // bits 7-1 give the length.
+ dst[offset++] = rsBytes;
+ } else {
+ // Bit 8 of first octet has value "1"
+ // bits 7-1 give the number of additional length octets.
+ dst[offset++] = MAX_OCTET | 1;
+ // length, base 256
+ dst[offset++] = rsBytes & 0xff;
+ }
+ dst[offset++] = ENCODED_TAG_INT;
+ dst[offset++] = rLength;
+ if (rPadding < 0) {
+ dst[offset++] = 0;
+ offset += signature.copy(dst, offset, 0, paramBytes);
+ } else {
+ offset += signature.copy(dst, offset, rPadding, paramBytes);
+ }
+ dst[offset++] = ENCODED_TAG_INT;
+ dst[offset++] = sLength;
+ if (sPadding < 0) {
+ dst[offset++] = 0;
+ signature.copy(dst, offset, paramBytes);
+ } else {
+ signature.copy(dst, offset, paramBytes + sPadding);
+ }
+
+ return dst;
+}
+
+module.exports = {
+ derToJose: derToJose,
+ joseToDer: joseToDer
+};
diff --git a/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
new file mode 100644
index 000000000..9fe67accd
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
@@ -0,0 +1,23 @@
+'use strict';
+
+function getParamSize(keySize) {
+ var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1);
+ return result;
+}
+
+var paramBytesForAlg = {
+ ES256: getParamSize(256),
+ ES384: getParamSize(384),
+ ES512: getParamSize(521)
+};
+
+function getParamBytesForAlg(alg) {
+ var paramBytes = paramBytesForAlg[alg];
+ if (paramBytes) {
+ return paramBytes;
+ }
+
+ throw new Error('Unknown algorithm "' + alg + '"');
+}
+
+module.exports = getParamBytesForAlg;
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/LICENSE b/week-3/02-course-app-easy/node_modules/jsonwebtoken/LICENSE
new file mode 100644
index 000000000..bcd1854c4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Auth0, Inc. (http://auth0.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/README.md b/week-3/02-course-app-easy/node_modules/jsonwebtoken/README.md
new file mode 100644
index 000000000..4e20dd9c7
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/README.md
@@ -0,0 +1,396 @@
+# jsonwebtoken
+
+| **Build** | **Dependency** |
+|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
+| [![Build Status](https://secure.travis-ci.org/auth0/node-jsonwebtoken.svg?branch=master)](http://travis-ci.org/auth0/node-jsonwebtoken) | [![Dependency Status](https://david-dm.org/auth0/node-jsonwebtoken.svg)](https://david-dm.org/auth0/node-jsonwebtoken) |
+
+
+An implementation of [JSON Web Tokens](https://tools.ietf.org/html/rfc7519).
+
+This was developed against `draft-ietf-oauth-json-web-token-08`. It makes use of [node-jws](https://github.com/brianloveswords/node-jws)
+
+# Install
+
+```bash
+$ npm install jsonwebtoken
+```
+
+# Migration notes
+
+* [From v8 to v9](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9)
+* [From v7 to v8](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v7-to-v8)
+
+# Usage
+
+### jwt.sign(payload, secretOrPrivateKey, [options, callback])
+
+(Asynchronous) If a callback is supplied, the callback is called with the `err` or the JWT.
+
+(Synchronous) Returns the JsonWebToken as string
+
+`payload` could be an object literal, buffer or string representing valid JSON.
+> **Please _note_ that** `exp` or any other claim is only set if the payload is an object literal. Buffer or string payloads are not checked for JSON validity.
+
+> If `payload` is not a buffer or a string, it will be coerced into a string using `JSON.stringify`.
+
+`secretOrPrivateKey` is a string (utf-8 encoded), buffer, object, or KeyObject containing either the secret for HMAC algorithms or the PEM
+encoded private key for RSA and ECDSA. In case of a private key with passphrase an object `{ key, passphrase }` can be used (based on [crypto documentation](https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format)), in this case be sure you pass the `algorithm` option.
+When signing with RSA algorithms the minimum modulus length is 2048 except when the allowInsecureKeySizes option is set to true. Private keys below this size will be rejected with an error.
+
+`options`:
+
+* `algorithm` (default: `HS256`)
+* `expiresIn`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms).
+ > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`).
+* `notBefore`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms).
+ > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`).
+* `audience`
+* `issuer`
+* `jwtid`
+* `subject`
+* `noTimestamp`
+* `header`
+* `keyid`
+* `mutatePayload`: if true, the sign function will modify the payload object directly. This is useful if you need a raw reference to the payload after claims have been applied to it but before it has been encoded into a token.
+* `allowInsecureKeySizes`: if true allows private keys with a modulus below 2048 to be used for RSA
+* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided.
+
+
+
+> There are no default values for `expiresIn`, `notBefore`, `audience`, `subject`, `issuer`. These claims can also be provided in the payload directly with `exp`, `nbf`, `aud`, `sub` and `iss` respectively, but you **_can't_** include in both places.
+
+Remember that `exp`, `nbf` and `iat` are **NumericDate**, see related [Token Expiration (exp claim)](#token-expiration-exp-claim)
+
+
+The header can be customized via the `options.header` object.
+
+Generated jwts will include an `iat` (issued at) claim by default unless `noTimestamp` is specified. If `iat` is inserted in the payload, it will be used instead of the real timestamp for calculating other things like `exp` given a timespan in `options.expiresIn`.
+
+Synchronous Sign with default (HMAC SHA256)
+
+```js
+var jwt = require('jsonwebtoken');
+var token = jwt.sign({ foo: 'bar' }, 'shhhhh');
+```
+
+Synchronous Sign with RSA SHA256
+```js
+// sign with RSA SHA256
+var privateKey = fs.readFileSync('private.key');
+var token = jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' });
+```
+
+Sign asynchronously
+```js
+jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' }, function(err, token) {
+ console.log(token);
+});
+```
+
+Backdate a jwt 30 seconds
+```js
+var older_token = jwt.sign({ foo: 'bar', iat: Math.floor(Date.now() / 1000) - 30 }, 'shhhhh');
+```
+
+#### Token Expiration (exp claim)
+
+The standard for JWT defines an `exp` claim for expiration. The expiration is represented as a **NumericDate**:
+
+> A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. This is equivalent to the IEEE Std 1003.1, 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in which each day is accounted for by exactly 86400 seconds, other than that non-integer values can be represented. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular.
+
+This means that the `exp` field should contain the number of seconds since the epoch.
+
+Signing a token with 1 hour of expiration:
+
+```javascript
+jwt.sign({
+ exp: Math.floor(Date.now() / 1000) + (60 * 60),
+ data: 'foobar'
+}, 'secret');
+```
+
+Another way to generate a token like this with this library is:
+
+```javascript
+jwt.sign({
+ data: 'foobar'
+}, 'secret', { expiresIn: 60 * 60 });
+
+//or even better:
+
+jwt.sign({
+ data: 'foobar'
+}, 'secret', { expiresIn: '1h' });
+```
+
+### jwt.verify(token, secretOrPublicKey, [options, callback])
+
+(Asynchronous) If a callback is supplied, function acts asynchronously. The callback is called with the decoded payload if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will be called with the error.
+
+(Synchronous) If a callback is not supplied, function acts synchronously. Returns the payload decoded if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will throw the error.
+
+> __Warning:__ When the token comes from an untrusted source (e.g. user input or external requests), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected
+
+`token` is the JsonWebToken string
+
+`secretOrPublicKey` is a string (utf-8 encoded), buffer, or KeyObject containing either the secret for HMAC algorithms, or the PEM
+encoded public key for RSA and ECDSA.
+If `jwt.verify` is called asynchronous, `secretOrPublicKey` can be a function that should fetch the secret or public key. See below for a detailed example
+
+As mentioned in [this comment](https://github.com/auth0/node-jsonwebtoken/issues/208#issuecomment-231861138), there are other libraries that expect base64 encoded secrets (random bytes encoded using base64), if that is your case you can pass `Buffer.from(secret, 'base64')`, by doing this the secret will be decoded using base64 and the token verification will use the original random bytes.
+
+`options`
+
+* `algorithms`: List of strings with the names of the allowed algorithms. For instance, `["HS256", "HS384"]`.
+ > If not specified a defaults will be used based on the type of key provided
+ > * secret - ['HS256', 'HS384', 'HS512']
+ > * rsa - ['RS256', 'RS384', 'RS512']
+ > * ec - ['ES256', 'ES384', 'ES512']
+ > * default - ['RS256', 'RS384', 'RS512']
+* `audience`: if you want to check audience (`aud`), provide a value here. The audience can be checked against a string, a regular expression or a list of strings and/or regular expressions.
+ > Eg: `"urn:foo"`, `/urn:f[o]{2}/`, `[/urn:f[o]{2}/, "urn:bar"]`
+* `complete`: return an object with the decoded `{ payload, header, signature }` instead of only the usual content of the payload.
+* `issuer` (optional): string or array of strings of valid values for the `iss` field.
+* `jwtid` (optional): if you want to check JWT ID (`jti`), provide a string value here.
+* `ignoreExpiration`: if `true` do not validate the expiration of the token.
+* `ignoreNotBefore`...
+* `subject`: if you want to check subject (`sub`), provide a value here
+* `clockTolerance`: number of seconds to tolerate when checking the `nbf` and `exp` claims, to deal with small clock differences among different servers
+* `maxAge`: the maximum allowed age for tokens to still be valid. It is expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms).
+ > Eg: `1000`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`).
+* `clockTimestamp`: the time in seconds that should be used as the current time for all necessary comparisons.
+* `nonce`: if you want to check `nonce` claim, provide a string value here. It is used on Open ID for the ID Tokens. ([Open ID implementation notes](https://openid.net/specs/openid-connect-core-1_0.html#NonceNotes))
+* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided.
+
+```js
+// verify a token symmetric - synchronous
+var decoded = jwt.verify(token, 'shhhhh');
+console.log(decoded.foo) // bar
+
+// verify a token symmetric
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ console.log(decoded.foo) // bar
+});
+
+// invalid token - synchronous
+try {
+ var decoded = jwt.verify(token, 'wrong-secret');
+} catch(err) {
+ // err
+}
+
+// invalid token
+jwt.verify(token, 'wrong-secret', function(err, decoded) {
+ // err
+ // decoded undefined
+});
+
+// verify a token asymmetric
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, function(err, decoded) {
+ console.log(decoded.foo) // bar
+});
+
+// verify audience
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo' }, function(err, decoded) {
+ // if audience mismatch, err == invalid audience
+});
+
+// verify issuer
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(err, decoded) {
+ // if issuer mismatch, err == invalid issuer
+});
+
+// verify jwt id
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid' }, function(err, decoded) {
+ // if jwt id mismatch, err == invalid jwt id
+});
+
+// verify subject
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid', subject: 'subject' }, function(err, decoded) {
+ // if subject mismatch, err == invalid subject
+});
+
+// alg mismatch
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { algorithms: ['RS256'] }, function (err, payload) {
+ // if token alg != RS256, err == invalid signature
+});
+
+// Verify using getKey callback
+// Example uses https://github.com/auth0/node-jwks-rsa as a way to fetch the keys.
+var jwksClient = require('jwks-rsa');
+var client = jwksClient({
+ jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json'
+});
+function getKey(header, callback){
+ client.getSigningKey(header.kid, function(err, key) {
+ var signingKey = key.publicKey || key.rsaPublicKey;
+ callback(null, signingKey);
+ });
+}
+
+jwt.verify(token, getKey, options, function(err, decoded) {
+ console.log(decoded.foo) // bar
+});
+
+```
+
+
+Need to peek into a JWT without verifying it? (Click to expand)
+
+### jwt.decode(token [, options])
+
+(Synchronous) Returns the decoded payload without verifying if the signature is valid.
+
+> __Warning:__ This will __not__ verify whether the signature is valid. You should __not__ use this for untrusted messages. You most likely want to use `jwt.verify` instead.
+
+> __Warning:__ When the token comes from an untrusted source (e.g. user input or external request), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected
+
+
+`token` is the JsonWebToken string
+
+`options`:
+
+* `json`: force JSON.parse on the payload even if the header doesn't contain `"typ":"JWT"`.
+* `complete`: return an object with the decoded payload and header.
+
+Example
+
+```js
+// get the decoded payload ignoring signature, no secretOrPrivateKey needed
+var decoded = jwt.decode(token);
+
+// get the decoded payload and header
+var decoded = jwt.decode(token, {complete: true});
+console.log(decoded.header);
+console.log(decoded.payload)
+```
+
+
+
+## Errors & Codes
+Possible thrown errors during verification.
+Error is the first argument of the verification callback.
+
+### TokenExpiredError
+
+Thrown error if the token is expired.
+
+Error object:
+
+* name: 'TokenExpiredError'
+* message: 'jwt expired'
+* expiredAt: [ExpDate]
+
+```js
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ if (err) {
+ /*
+ err = {
+ name: 'TokenExpiredError',
+ message: 'jwt expired',
+ expiredAt: 1408621000
+ }
+ */
+ }
+});
+```
+
+### JsonWebTokenError
+Error object:
+
+* name: 'JsonWebTokenError'
+* message:
+ * 'invalid token' - the header or payload could not be parsed
+ * 'jwt malformed' - the token does not have three components (delimited by a `.`)
+ * 'jwt signature is required'
+ * 'invalid signature'
+ * 'jwt audience invalid. expected: [OPTIONS AUDIENCE]'
+ * 'jwt issuer invalid. expected: [OPTIONS ISSUER]'
+ * 'jwt id invalid. expected: [OPTIONS JWT ID]'
+ * 'jwt subject invalid. expected: [OPTIONS SUBJECT]'
+
+```js
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ if (err) {
+ /*
+ err = {
+ name: 'JsonWebTokenError',
+ message: 'jwt malformed'
+ }
+ */
+ }
+});
+```
+
+### NotBeforeError
+Thrown if current time is before the nbf claim.
+
+Error object:
+
+* name: 'NotBeforeError'
+* message: 'jwt not active'
+* date: 2018-10-04T16:10:44.000Z
+
+```js
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ if (err) {
+ /*
+ err = {
+ name: 'NotBeforeError',
+ message: 'jwt not active',
+ date: 2018-10-04T16:10:44.000Z
+ }
+ */
+ }
+});
+```
+
+
+## Algorithms supported
+
+Array of supported algorithms. The following algorithms are currently supported.
+
+| alg Parameter Value | Digital Signature or MAC Algorithm |
+|---------------------|------------------------------------------------------------------------|
+| HS256 | HMAC using SHA-256 hash algorithm |
+| HS384 | HMAC using SHA-384 hash algorithm |
+| HS512 | HMAC using SHA-512 hash algorithm |
+| RS256 | RSASSA-PKCS1-v1_5 using SHA-256 hash algorithm |
+| RS384 | RSASSA-PKCS1-v1_5 using SHA-384 hash algorithm |
+| RS512 | RSASSA-PKCS1-v1_5 using SHA-512 hash algorithm |
+| PS256 | RSASSA-PSS using SHA-256 hash algorithm (only node ^6.12.0 OR >=8.0.0) |
+| PS384 | RSASSA-PSS using SHA-384 hash algorithm (only node ^6.12.0 OR >=8.0.0) |
+| PS512 | RSASSA-PSS using SHA-512 hash algorithm (only node ^6.12.0 OR >=8.0.0) |
+| ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm |
+| ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm |
+| ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm |
+| none | No digital signature or MAC value included |
+
+## Refreshing JWTs
+
+First of all, we recommend you to think carefully if auto-refreshing a JWT will not introduce any vulnerability in your system.
+
+We are not comfortable including this as part of the library, however, you can take a look at [this example](https://gist.github.com/ziluvatar/a3feb505c4c0ec37059054537b38fc48) to show how this could be accomplished.
+Apart from that example there are [an issue](https://github.com/auth0/node-jsonwebtoken/issues/122) and [a pull request](https://github.com/auth0/node-jsonwebtoken/pull/172) to get more knowledge about this topic.
+
+# TODO
+
+* X.509 certificate chain is not checked
+
+## Issue Reporting
+
+If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
+
+## Author
+
+[Auth0](https://auth0.com)
+
+## License
+
+This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/decode.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/decode.js
new file mode 100644
index 000000000..8fe1adcd3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/decode.js
@@ -0,0 +1,30 @@
+var jws = require('jws');
+
+module.exports = function (jwt, options) {
+ options = options || {};
+ var decoded = jws.decode(jwt, options);
+ if (!decoded) { return null; }
+ var payload = decoded.payload;
+
+ //try parse the payload
+ if(typeof payload === 'string') {
+ try {
+ var obj = JSON.parse(payload);
+ if(obj !== null && typeof obj === 'object') {
+ payload = obj;
+ }
+ } catch (e) { }
+ }
+
+ //return header if `complete` option is enabled. header includes claims
+ //such as `kid` and `alg` used to select the key within a JWKS needed to
+ //verify the signature
+ if (options.complete === true) {
+ return {
+ header: decoded.header,
+ payload: payload,
+ signature: decoded.signature
+ };
+ }
+ return payload;
+};
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/index.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/index.js
new file mode 100644
index 000000000..161eb2dd1
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/index.js
@@ -0,0 +1,8 @@
+module.exports = {
+ decode: require('./decode'),
+ verify: require('./verify'),
+ sign: require('./sign'),
+ JsonWebTokenError: require('./lib/JsonWebTokenError'),
+ NotBeforeError: require('./lib/NotBeforeError'),
+ TokenExpiredError: require('./lib/TokenExpiredError'),
+};
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/JsonWebTokenError.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/JsonWebTokenError.js
new file mode 100644
index 000000000..e068222a0
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/JsonWebTokenError.js
@@ -0,0 +1,14 @@
+var JsonWebTokenError = function (message, error) {
+ Error.call(this, message);
+ if(Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+ this.name = 'JsonWebTokenError';
+ this.message = message;
+ if (error) this.inner = error;
+};
+
+JsonWebTokenError.prototype = Object.create(Error.prototype);
+JsonWebTokenError.prototype.constructor = JsonWebTokenError;
+
+module.exports = JsonWebTokenError;
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/NotBeforeError.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/NotBeforeError.js
new file mode 100644
index 000000000..7b30084fb
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/NotBeforeError.js
@@ -0,0 +1,13 @@
+var JsonWebTokenError = require('./JsonWebTokenError');
+
+var NotBeforeError = function (message, date) {
+ JsonWebTokenError.call(this, message);
+ this.name = 'NotBeforeError';
+ this.date = date;
+};
+
+NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype);
+
+NotBeforeError.prototype.constructor = NotBeforeError;
+
+module.exports = NotBeforeError;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/TokenExpiredError.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/TokenExpiredError.js
new file mode 100644
index 000000000..abb704f23
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/TokenExpiredError.js
@@ -0,0 +1,13 @@
+var JsonWebTokenError = require('./JsonWebTokenError');
+
+var TokenExpiredError = function (message, expiredAt) {
+ JsonWebTokenError.call(this, message);
+ this.name = 'TokenExpiredError';
+ this.expiredAt = expiredAt;
+};
+
+TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype);
+
+TokenExpiredError.prototype.constructor = TokenExpiredError;
+
+module.exports = TokenExpiredError;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
new file mode 100644
index 000000000..a6ede56e3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
@@ -0,0 +1,3 @@
+const semver = require('semver');
+
+module.exports = semver.satisfies(process.version, '>=15.7.0');
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/psSupported.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/psSupported.js
new file mode 100644
index 000000000..8c04144a1
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/psSupported.js
@@ -0,0 +1,3 @@
+var semver = require('semver');
+
+module.exports = semver.satisfies(process.version, '^6.12.0 || >=8.0.0');
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
new file mode 100644
index 000000000..7fcf36846
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
@@ -0,0 +1,3 @@
+const semver = require('semver');
+
+module.exports = semver.satisfies(process.version, '>=16.9.0');
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/timespan.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/timespan.js
new file mode 100644
index 000000000..e50986908
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/timespan.js
@@ -0,0 +1,18 @@
+var ms = require('ms');
+
+module.exports = function (time, iat) {
+ var timestamp = iat || Math.floor(Date.now() / 1000);
+
+ if (typeof time === 'string') {
+ var milliseconds = ms(time);
+ if (typeof milliseconds === 'undefined') {
+ return;
+ }
+ return Math.floor(timestamp + milliseconds / 1000);
+ } else if (typeof time === 'number') {
+ return timestamp + time;
+ } else {
+ return;
+ }
+
+};
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js
new file mode 100644
index 000000000..c10340b03
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js
@@ -0,0 +1,66 @@
+const ASYMMETRIC_KEY_DETAILS_SUPPORTED = require('./asymmetricKeyDetailsSupported');
+const RSA_PSS_KEY_DETAILS_SUPPORTED = require('./rsaPssKeyDetailsSupported');
+
+const allowedAlgorithmsForKeys = {
+ 'ec': ['ES256', 'ES384', 'ES512'],
+ 'rsa': ['RS256', 'PS256', 'RS384', 'PS384', 'RS512', 'PS512'],
+ 'rsa-pss': ['PS256', 'PS384', 'PS512']
+};
+
+const allowedCurves = {
+ ES256: 'prime256v1',
+ ES384: 'secp384r1',
+ ES512: 'secp521r1',
+};
+
+module.exports = function(algorithm, key) {
+ if (!algorithm || !key) return;
+
+ const keyType = key.asymmetricKeyType;
+ if (!keyType) return;
+
+ const allowedAlgorithms = allowedAlgorithmsForKeys[keyType];
+
+ if (!allowedAlgorithms) {
+ throw new Error(`Unknown key type "${keyType}".`);
+ }
+
+ if (!allowedAlgorithms.includes(algorithm)) {
+ throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(', ')}.`)
+ }
+
+ /*
+ * Ignore the next block from test coverage because it gets executed
+ * conditionally depending on the Node version. Not ignoring it would
+ * prevent us from reaching the target % of coverage for versions of
+ * Node under 15.7.0.
+ */
+ /* istanbul ignore next */
+ if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) {
+ switch (keyType) {
+ case 'ec':
+ const keyCurve = key.asymmetricKeyDetails.namedCurve;
+ const allowedCurve = allowedCurves[algorithm];
+
+ if (keyCurve !== allowedCurve) {
+ throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`);
+ }
+ break;
+
+ case 'rsa-pss':
+ if (RSA_PSS_KEY_DETAILS_SUPPORTED) {
+ const length = parseInt(algorithm.slice(-3), 10);
+ const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails;
+
+ if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) {
+ throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`);
+ }
+
+ if (saltLength !== undefined && saltLength > length >> 3) {
+ throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`)
+ }
+ }
+ break;
+ }
+ }
+}
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/package.json b/week-3/02-course-app-easy/node_modules/jsonwebtoken/package.json
new file mode 100644
index 000000000..81f78da07
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "jsonwebtoken",
+ "version": "9.0.2",
+ "description": "JSON Web Token implementation (symmetric and asymmetric)",
+ "main": "index.js",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 95,
+ "statements": 95,
+ "functions": 100,
+ "branches": 95,
+ "exclude": [
+ "./test/**"
+ ],
+ "reporter": [
+ "json",
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "coverage": "nyc mocha --use_strict",
+ "test": "npm run lint && npm run coverage && cost-of-modules"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/auth0/node-jsonwebtoken"
+ },
+ "keywords": [
+ "jwt"
+ ],
+ "author": "auth0",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/auth0/node-jsonwebtoken/issues"
+ },
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "devDependencies": {
+ "atob": "^2.1.2",
+ "chai": "^4.1.2",
+ "conventional-changelog": "~1.1.0",
+ "cost-of-modules": "^1.0.1",
+ "eslint": "^4.19.1",
+ "mocha": "^5.2.0",
+ "nsp": "^2.6.2",
+ "nyc": "^11.9.0",
+ "sinon": "^6.0.0"
+ },
+ "engines": {
+ "npm": ">=6",
+ "node": ">=12"
+ },
+ "files": [
+ "lib",
+ "decode.js",
+ "sign.js",
+ "verify.js"
+ ]
+}
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/sign.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/sign.js
new file mode 100644
index 000000000..82bf526e2
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/sign.js
@@ -0,0 +1,253 @@
+const timespan = require('./lib/timespan');
+const PS_SUPPORTED = require('./lib/psSupported');
+const validateAsymmetricKey = require('./lib/validateAsymmetricKey');
+const jws = require('jws');
+const includes = require('lodash.includes');
+const isBoolean = require('lodash.isboolean');
+const isInteger = require('lodash.isinteger');
+const isNumber = require('lodash.isnumber');
+const isPlainObject = require('lodash.isplainobject');
+const isString = require('lodash.isstring');
+const once = require('lodash.once');
+const { KeyObject, createSecretKey, createPrivateKey } = require('crypto')
+
+const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none'];
+if (PS_SUPPORTED) {
+ SUPPORTED_ALGS.splice(3, 0, 'PS256', 'PS384', 'PS512');
+}
+
+const sign_options_schema = {
+ expiresIn: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"expiresIn" should be a number of seconds or string representing a timespan' },
+ notBefore: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"notBefore" should be a number of seconds or string representing a timespan' },
+ audience: { isValid: function(value) { return isString(value) || Array.isArray(value); }, message: '"audience" must be a string or array' },
+ algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' },
+ header: { isValid: isPlainObject, message: '"header" must be an object' },
+ encoding: { isValid: isString, message: '"encoding" must be a string' },
+ issuer: { isValid: isString, message: '"issuer" must be a string' },
+ subject: { isValid: isString, message: '"subject" must be a string' },
+ jwtid: { isValid: isString, message: '"jwtid" must be a string' },
+ noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' },
+ keyid: { isValid: isString, message: '"keyid" must be a string' },
+ mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' },
+ allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean'},
+ allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean'}
+};
+
+const registered_claims_schema = {
+ iat: { isValid: isNumber, message: '"iat" should be a number of seconds' },
+ exp: { isValid: isNumber, message: '"exp" should be a number of seconds' },
+ nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' }
+};
+
+function validate(schema, allowUnknown, object, parameterName) {
+ if (!isPlainObject(object)) {
+ throw new Error('Expected "' + parameterName + '" to be a plain object.');
+ }
+ Object.keys(object)
+ .forEach(function(key) {
+ const validator = schema[key];
+ if (!validator) {
+ if (!allowUnknown) {
+ throw new Error('"' + key + '" is not allowed in "' + parameterName + '"');
+ }
+ return;
+ }
+ if (!validator.isValid(object[key])) {
+ throw new Error(validator.message);
+ }
+ });
+}
+
+function validateOptions(options) {
+ return validate(sign_options_schema, false, options, 'options');
+}
+
+function validatePayload(payload) {
+ return validate(registered_claims_schema, true, payload, 'payload');
+}
+
+const options_to_payload = {
+ 'audience': 'aud',
+ 'issuer': 'iss',
+ 'subject': 'sub',
+ 'jwtid': 'jti'
+};
+
+const options_for_objects = [
+ 'expiresIn',
+ 'notBefore',
+ 'noTimestamp',
+ 'audience',
+ 'issuer',
+ 'subject',
+ 'jwtid',
+];
+
+module.exports = function (payload, secretOrPrivateKey, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ } else {
+ options = options || {};
+ }
+
+ const isObjectPayload = typeof payload === 'object' &&
+ !Buffer.isBuffer(payload);
+
+ const header = Object.assign({
+ alg: options.algorithm || 'HS256',
+ typ: isObjectPayload ? 'JWT' : undefined,
+ kid: options.keyid
+ }, options.header);
+
+ function failure(err) {
+ if (callback) {
+ return callback(err);
+ }
+ throw err;
+ }
+
+ if (!secretOrPrivateKey && options.algorithm !== 'none') {
+ return failure(new Error('secretOrPrivateKey must have a value'));
+ }
+
+ if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) {
+ try {
+ secretOrPrivateKey = createPrivateKey(secretOrPrivateKey)
+ } catch (_) {
+ try {
+ secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === 'string' ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey)
+ } catch (_) {
+ return failure(new Error('secretOrPrivateKey is not valid key material'));
+ }
+ }
+ }
+
+ if (header.alg.startsWith('HS') && secretOrPrivateKey.type !== 'secret') {
+ return failure(new Error((`secretOrPrivateKey must be a symmetric key when using ${header.alg}`)))
+ } else if (/^(?:RS|PS|ES)/.test(header.alg)) {
+ if (secretOrPrivateKey.type !== 'private') {
+ return failure(new Error((`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`)))
+ }
+ if (!options.allowInsecureKeySizes &&
+ !header.alg.startsWith('ES') &&
+ secretOrPrivateKey.asymmetricKeyDetails !== undefined && //KeyObject.asymmetricKeyDetails is supported in Node 15+
+ secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) {
+ return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`));
+ }
+ }
+
+ if (typeof payload === 'undefined') {
+ return failure(new Error('payload is required'));
+ } else if (isObjectPayload) {
+ try {
+ validatePayload(payload);
+ }
+ catch (error) {
+ return failure(error);
+ }
+ if (!options.mutatePayload) {
+ payload = Object.assign({},payload);
+ }
+ } else {
+ const invalid_options = options_for_objects.filter(function (opt) {
+ return typeof options[opt] !== 'undefined';
+ });
+
+ if (invalid_options.length > 0) {
+ return failure(new Error('invalid ' + invalid_options.join(',') + ' option for ' + (typeof payload ) + ' payload'));
+ }
+ }
+
+ if (typeof payload.exp !== 'undefined' && typeof options.expiresIn !== 'undefined') {
+ return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));
+ }
+
+ if (typeof payload.nbf !== 'undefined' && typeof options.notBefore !== 'undefined') {
+ return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));
+ }
+
+ try {
+ validateOptions(options);
+ }
+ catch (error) {
+ return failure(error);
+ }
+
+ if (!options.allowInvalidAsymmetricKeyTypes) {
+ try {
+ validateAsymmetricKey(header.alg, secretOrPrivateKey);
+ } catch (error) {
+ return failure(error);
+ }
+ }
+
+ const timestamp = payload.iat || Math.floor(Date.now() / 1000);
+
+ if (options.noTimestamp) {
+ delete payload.iat;
+ } else if (isObjectPayload) {
+ payload.iat = timestamp;
+ }
+
+ if (typeof options.notBefore !== 'undefined') {
+ try {
+ payload.nbf = timespan(options.notBefore, timestamp);
+ }
+ catch (err) {
+ return failure(err);
+ }
+ if (typeof payload.nbf === 'undefined') {
+ return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
+ }
+ }
+
+ if (typeof options.expiresIn !== 'undefined' && typeof payload === 'object') {
+ try {
+ payload.exp = timespan(options.expiresIn, timestamp);
+ }
+ catch (err) {
+ return failure(err);
+ }
+ if (typeof payload.exp === 'undefined') {
+ return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
+ }
+ }
+
+ Object.keys(options_to_payload).forEach(function (key) {
+ const claim = options_to_payload[key];
+ if (typeof options[key] !== 'undefined') {
+ if (typeof payload[claim] !== 'undefined') {
+ return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.'));
+ }
+ payload[claim] = options[key];
+ }
+ });
+
+ const encoding = options.encoding || 'utf8';
+
+ if (typeof callback === 'function') {
+ callback = callback && once(callback);
+
+ jws.createSign({
+ header: header,
+ privateKey: secretOrPrivateKey,
+ payload: payload,
+ encoding: encoding
+ }).once('error', callback)
+ .once('done', function (signature) {
+ // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version
+ if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) {
+ return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`))
+ }
+ callback(null, signature);
+ });
+ } else {
+ let signature = jws.sign({header: header, payload: payload, secret: secretOrPrivateKey, encoding: encoding});
+ // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version
+ if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) {
+ throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)
+ }
+ return signature
+ }
+};
diff --git a/week-3/02-course-app-easy/node_modules/jsonwebtoken/verify.js b/week-3/02-course-app-easy/node_modules/jsonwebtoken/verify.js
new file mode 100644
index 000000000..cdbfdc45f
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jsonwebtoken/verify.js
@@ -0,0 +1,263 @@
+const JsonWebTokenError = require('./lib/JsonWebTokenError');
+const NotBeforeError = require('./lib/NotBeforeError');
+const TokenExpiredError = require('./lib/TokenExpiredError');
+const decode = require('./decode');
+const timespan = require('./lib/timespan');
+const validateAsymmetricKey = require('./lib/validateAsymmetricKey');
+const PS_SUPPORTED = require('./lib/psSupported');
+const jws = require('jws');
+const {KeyObject, createSecretKey, createPublicKey} = require("crypto");
+
+const PUB_KEY_ALGS = ['RS256', 'RS384', 'RS512'];
+const EC_KEY_ALGS = ['ES256', 'ES384', 'ES512'];
+const RSA_KEY_ALGS = ['RS256', 'RS384', 'RS512'];
+const HS_ALGS = ['HS256', 'HS384', 'HS512'];
+
+if (PS_SUPPORTED) {
+ PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512');
+ RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512');
+}
+
+module.exports = function (jwtString, secretOrPublicKey, options, callback) {
+ if ((typeof options === 'function') && !callback) {
+ callback = options;
+ options = {};
+ }
+
+ if (!options) {
+ options = {};
+ }
+
+ //clone this object since we are going to mutate it.
+ options = Object.assign({}, options);
+
+ let done;
+
+ if (callback) {
+ done = callback;
+ } else {
+ done = function(err, data) {
+ if (err) throw err;
+ return data;
+ };
+ }
+
+ if (options.clockTimestamp && typeof options.clockTimestamp !== 'number') {
+ return done(new JsonWebTokenError('clockTimestamp must be a number'));
+ }
+
+ if (options.nonce !== undefined && (typeof options.nonce !== 'string' || options.nonce.trim() === '')) {
+ return done(new JsonWebTokenError('nonce must be a non-empty string'));
+ }
+
+ if (options.allowInvalidAsymmetricKeyTypes !== undefined && typeof options.allowInvalidAsymmetricKeyTypes !== 'boolean') {
+ return done(new JsonWebTokenError('allowInvalidAsymmetricKeyTypes must be a boolean'));
+ }
+
+ const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1000);
+
+ if (!jwtString){
+ return done(new JsonWebTokenError('jwt must be provided'));
+ }
+
+ if (typeof jwtString !== 'string') {
+ return done(new JsonWebTokenError('jwt must be a string'));
+ }
+
+ const parts = jwtString.split('.');
+
+ if (parts.length !== 3){
+ return done(new JsonWebTokenError('jwt malformed'));
+ }
+
+ let decodedToken;
+
+ try {
+ decodedToken = decode(jwtString, { complete: true });
+ } catch(err) {
+ return done(err);
+ }
+
+ if (!decodedToken) {
+ return done(new JsonWebTokenError('invalid token'));
+ }
+
+ const header = decodedToken.header;
+ let getSecret;
+
+ if(typeof secretOrPublicKey === 'function') {
+ if(!callback) {
+ return done(new JsonWebTokenError('verify must be called asynchronous if secret or public key is provided as a callback'));
+ }
+
+ getSecret = secretOrPublicKey;
+ }
+ else {
+ getSecret = function(header, secretCallback) {
+ return secretCallback(null, secretOrPublicKey);
+ };
+ }
+
+ return getSecret(header, function(err, secretOrPublicKey) {
+ if(err) {
+ return done(new JsonWebTokenError('error in secret or public key callback: ' + err.message));
+ }
+
+ const hasSignature = parts[2].trim() !== '';
+
+ if (!hasSignature && secretOrPublicKey){
+ return done(new JsonWebTokenError('jwt signature is required'));
+ }
+
+ if (hasSignature && !secretOrPublicKey) {
+ return done(new JsonWebTokenError('secret or public key must be provided'));
+ }
+
+ if (!hasSignature && !options.algorithms) {
+ return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens'));
+ }
+
+ if (secretOrPublicKey != null && !(secretOrPublicKey instanceof KeyObject)) {
+ try {
+ secretOrPublicKey = createPublicKey(secretOrPublicKey);
+ } catch (_) {
+ try {
+ secretOrPublicKey = createSecretKey(typeof secretOrPublicKey === 'string' ? Buffer.from(secretOrPublicKey) : secretOrPublicKey);
+ } catch (_) {
+ return done(new JsonWebTokenError('secretOrPublicKey is not valid key material'))
+ }
+ }
+ }
+
+ if (!options.algorithms) {
+ if (secretOrPublicKey.type === 'secret') {
+ options.algorithms = HS_ALGS;
+ } else if (['rsa', 'rsa-pss'].includes(secretOrPublicKey.asymmetricKeyType)) {
+ options.algorithms = RSA_KEY_ALGS
+ } else if (secretOrPublicKey.asymmetricKeyType === 'ec') {
+ options.algorithms = EC_KEY_ALGS
+ } else {
+ options.algorithms = PUB_KEY_ALGS
+ }
+ }
+
+ if (options.algorithms.indexOf(decodedToken.header.alg) === -1) {
+ return done(new JsonWebTokenError('invalid algorithm'));
+ }
+
+ if (header.alg.startsWith('HS') && secretOrPublicKey.type !== 'secret') {
+ return done(new JsonWebTokenError((`secretOrPublicKey must be a symmetric key when using ${header.alg}`)))
+ } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey.type !== 'public') {
+ return done(new JsonWebTokenError((`secretOrPublicKey must be an asymmetric key when using ${header.alg}`)))
+ }
+
+ if (!options.allowInvalidAsymmetricKeyTypes) {
+ try {
+ validateAsymmetricKey(header.alg, secretOrPublicKey);
+ } catch (e) {
+ return done(e);
+ }
+ }
+
+ let valid;
+
+ try {
+ valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey);
+ } catch (e) {
+ return done(e);
+ }
+
+ if (!valid) {
+ return done(new JsonWebTokenError('invalid signature'));
+ }
+
+ const payload = decodedToken.payload;
+
+ if (typeof payload.nbf !== 'undefined' && !options.ignoreNotBefore) {
+ if (typeof payload.nbf !== 'number') {
+ return done(new JsonWebTokenError('invalid nbf value'));
+ }
+ if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) {
+ return done(new NotBeforeError('jwt not active', new Date(payload.nbf * 1000)));
+ }
+ }
+
+ if (typeof payload.exp !== 'undefined' && !options.ignoreExpiration) {
+ if (typeof payload.exp !== 'number') {
+ return done(new JsonWebTokenError('invalid exp value'));
+ }
+ if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) {
+ return done(new TokenExpiredError('jwt expired', new Date(payload.exp * 1000)));
+ }
+ }
+
+ if (options.audience) {
+ const audiences = Array.isArray(options.audience) ? options.audience : [options.audience];
+ const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud];
+
+ const match = target.some(function (targetAudience) {
+ return audiences.some(function (audience) {
+ return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience;
+ });
+ });
+
+ if (!match) {
+ return done(new JsonWebTokenError('jwt audience invalid. expected: ' + audiences.join(' or ')));
+ }
+ }
+
+ if (options.issuer) {
+ const invalid_issuer =
+ (typeof options.issuer === 'string' && payload.iss !== options.issuer) ||
+ (Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1);
+
+ if (invalid_issuer) {
+ return done(new JsonWebTokenError('jwt issuer invalid. expected: ' + options.issuer));
+ }
+ }
+
+ if (options.subject) {
+ if (payload.sub !== options.subject) {
+ return done(new JsonWebTokenError('jwt subject invalid. expected: ' + options.subject));
+ }
+ }
+
+ if (options.jwtid) {
+ if (payload.jti !== options.jwtid) {
+ return done(new JsonWebTokenError('jwt jwtid invalid. expected: ' + options.jwtid));
+ }
+ }
+
+ if (options.nonce) {
+ if (payload.nonce !== options.nonce) {
+ return done(new JsonWebTokenError('jwt nonce invalid. expected: ' + options.nonce));
+ }
+ }
+
+ if (options.maxAge) {
+ if (typeof payload.iat !== 'number') {
+ return done(new JsonWebTokenError('iat required when maxAge is specified'));
+ }
+
+ const maxAgeTimestamp = timespan(options.maxAge, payload.iat);
+ if (typeof maxAgeTimestamp === 'undefined') {
+ return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
+ }
+ if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) {
+ return done(new TokenExpiredError('maxAge exceeded', new Date(maxAgeTimestamp * 1000)));
+ }
+ }
+
+ if (options.complete === true) {
+ const signature = decodedToken.signature;
+
+ return done(null, {
+ header: header,
+ payload: payload,
+ signature: signature
+ });
+ }
+
+ return done(null, payload);
+ });
+};
diff --git a/week-3/02-course-app-easy/node_modules/jwa/LICENSE b/week-3/02-course-app-easy/node_modules/jwa/LICENSE
new file mode 100644
index 000000000..caeb8495c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jwa/LICENSE
@@ -0,0 +1,17 @@
+Copyright (c) 2013 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/jwa/README.md b/week-3/02-course-app-easy/node_modules/jwa/README.md
new file mode 100644
index 000000000..fb433e238
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jwa/README.md
@@ -0,0 +1,150 @@
+# node-jwa [![Build Status](https://travis-ci.org/brianloveswords/node-jwa.svg?branch=master)](https://travis-ci.org/brianloveswords/node-jwa)
+
+A
+[JSON Web Algorithms](http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html)
+implementation focusing (exclusively, at this point) on the algorithms necessary for
+[JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html).
+
+This library supports all of the required, recommended and optional cryptographic algorithms for JWS:
+
+alg Parameter Value | Digital Signature or MAC Algorithm
+----------------|----------------------------
+HS256 | HMAC using SHA-256 hash algorithm
+HS384 | HMAC using SHA-384 hash algorithm
+HS512 | HMAC using SHA-512 hash algorithm
+RS256 | RSASSA using SHA-256 hash algorithm
+RS384 | RSASSA using SHA-384 hash algorithm
+RS512 | RSASSA using SHA-512 hash algorithm
+PS256 | RSASSA-PSS using SHA-256 hash algorithm
+PS384 | RSASSA-PSS using SHA-384 hash algorithm
+PS512 | RSASSA-PSS using SHA-512 hash algorithm
+ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm
+ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm
+ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm
+none | No digital signature or MAC value included
+
+Please note that PS* only works on Node 6.12+ (excluding 7.x).
+
+# Requirements
+
+In order to run the tests, a recent version of OpenSSL is
+required. **The version that comes with OS X (OpenSSL 0.9.8r 8 Feb
+2011) is not recent enough**, as it does not fully support ECDSA
+keys. You'll need to use a version > 1.0.0; I tested with OpenSSL 1.0.1c 10 May 2012.
+
+# Testing
+
+To run the tests, do
+
+```bash
+$ npm test
+```
+
+This will generate a bunch of keypairs to use in testing. If you want to
+generate new keypairs, do `make clean` before running `npm test` again.
+
+## Methodology
+
+I spawn `openssl dgst -sign` to test OpenSSL sign → JS verify and
+`openssl dgst -verify` to test JS sign → OpenSSL verify for each of the
+RSA and ECDSA algorithms.
+
+# Usage
+
+## jwa(algorithm)
+
+Creates a new `jwa` object with `sign` and `verify` methods for the
+algorithm. Valid values for algorithm can be found in the table above
+(`'HS256'`, `'HS384'`, etc) and are case-insensitive. Passing an invalid
+algorithm value will throw a `TypeError`.
+
+
+## jwa#sign(input, secretOrPrivateKey)
+
+Sign some input with either a secret for HMAC algorithms, or a private
+key for RSA and ECDSA algorithms.
+
+If input is not already a string or buffer, `JSON.stringify` will be
+called on it to attempt to coerce it.
+
+For the HMAC algorithm, `secretOrPrivateKey` should be a string or a
+buffer. For ECDSA and RSA, the value should be a string representing a
+PEM encoded **private** key.
+
+Output [base64url](http://en.wikipedia.org/wiki/Base64#URL_applications)
+formatted. This is for convenience as JWS expects the signature in this
+format. If your application needs the output in a different format,
+[please open an issue](https://github.com/brianloveswords/node-jwa/issues). In
+the meantime, you can use
+[brianloveswords/base64url](https://github.com/brianloveswords/base64url)
+to decode the signature.
+
+As of nodejs *v0.11.8*, SPKAC support was introduce. If your nodeJs
+version satisfies, then you can pass an object `{ key: '..', passphrase: '...' }`
+
+
+## jwa#verify(input, signature, secretOrPublicKey)
+
+Verify a signature. Returns `true` or `false`.
+
+`signature` should be a base64url encoded string.
+
+For the HMAC algorithm, `secretOrPublicKey` should be a string or a
+buffer. For ECDSA and RSA, the value should be a string represented a
+PEM encoded **public** key.
+
+
+# Example
+
+HMAC
+```js
+const jwa = require('jwa');
+
+const hmac = jwa('HS256');
+const input = 'super important stuff';
+const secret = 'shhhhhh';
+
+const signature = hmac.sign(input, secret);
+hmac.verify(input, signature, secret) // === true
+hmac.verify(input, signature, 'trickery!') // === false
+```
+
+With keys
+```js
+const fs = require('fs');
+const jwa = require('jwa');
+const privateKey = fs.readFileSync(__dirname + '/ecdsa-p521-private.pem');
+const publicKey = fs.readFileSync(__dirname + '/ecdsa-p521-public.pem');
+
+const ecdsa = jwa('ES512');
+const input = 'very important stuff';
+
+const signature = ecdsa.sign(input, privateKey);
+ecdsa.verify(input, signature, publicKey) // === true
+```
+## License
+
+MIT
+
+```
+Copyright (c) 2013 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+```
diff --git a/week-3/02-course-app-easy/node_modules/jwa/index.js b/week-3/02-course-app-easy/node_modules/jwa/index.js
new file mode 100644
index 000000000..e71e6d19e
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jwa/index.js
@@ -0,0 +1,252 @@
+var bufferEqual = require('buffer-equal-constant-time');
+var Buffer = require('safe-buffer').Buffer;
+var crypto = require('crypto');
+var formatEcdsa = require('ecdsa-sig-formatter');
+var util = require('util');
+
+var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".'
+var MSG_INVALID_SECRET = 'secret must be a string or buffer';
+var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer';
+var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object';
+
+var supportsKeyObjects = typeof crypto.createPublicKey === 'function';
+if (supportsKeyObjects) {
+ MSG_INVALID_VERIFIER_KEY += ' or a KeyObject';
+ MSG_INVALID_SECRET += 'or a KeyObject';
+}
+
+function checkIsPublicKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return;
+ }
+
+ if (!supportsKeyObjects) {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key !== 'object') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.type !== 'string') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.asymmetricKeyType !== 'string') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.export !== 'function') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+};
+
+function checkIsPrivateKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return;
+ }
+
+ if (typeof key === 'object') {
+ return;
+ }
+
+ throw typeError(MSG_INVALID_SIGNER_KEY);
+};
+
+function checkIsSecretKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return key;
+ }
+
+ if (!supportsKeyObjects) {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (typeof key !== 'object') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (key.type !== 'secret') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (typeof key.export !== 'function') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+}
+
+function fromBase64(base64) {
+ return base64
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function toBase64(base64url) {
+ base64url = base64url.toString();
+
+ var padding = 4 - base64url.length % 4;
+ if (padding !== 4) {
+ for (var i = 0; i < padding; ++i) {
+ base64url += '=';
+ }
+ }
+
+ return base64url
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+}
+
+function typeError(template) {
+ var args = [].slice.call(arguments, 1);
+ var errMsg = util.format.bind(util, template).apply(null, args);
+ return new TypeError(errMsg);
+}
+
+function bufferOrString(obj) {
+ return Buffer.isBuffer(obj) || typeof obj === 'string';
+}
+
+function normalizeInput(thing) {
+ if (!bufferOrString(thing))
+ thing = JSON.stringify(thing);
+ return thing;
+}
+
+function createHmacSigner(bits) {
+ return function sign(thing, secret) {
+ checkIsSecretKey(secret);
+ thing = normalizeInput(thing);
+ var hmac = crypto.createHmac('sha' + bits, secret);
+ var sig = (hmac.update(thing), hmac.digest('base64'))
+ return fromBase64(sig);
+ }
+}
+
+function createHmacVerifier(bits) {
+ return function verify(thing, signature, secret) {
+ var computedSig = createHmacSigner(bits)(thing, secret);
+ return bufferEqual(Buffer.from(signature), Buffer.from(computedSig));
+ }
+}
+
+function createKeySigner(bits) {
+ return function sign(thing, privateKey) {
+ checkIsPrivateKey(privateKey);
+ thing = normalizeInput(thing);
+ // Even though we are specifying "RSA" here, this works with ECDSA
+ // keys as well.
+ var signer = crypto.createSign('RSA-SHA' + bits);
+ var sig = (signer.update(thing), signer.sign(privateKey, 'base64'));
+ return fromBase64(sig);
+ }
+}
+
+function createKeyVerifier(bits) {
+ return function verify(thing, signature, publicKey) {
+ checkIsPublicKey(publicKey);
+ thing = normalizeInput(thing);
+ signature = toBase64(signature);
+ var verifier = crypto.createVerify('RSA-SHA' + bits);
+ verifier.update(thing);
+ return verifier.verify(publicKey, signature, 'base64');
+ }
+}
+
+function createPSSKeySigner(bits) {
+ return function sign(thing, privateKey) {
+ checkIsPrivateKey(privateKey);
+ thing = normalizeInput(thing);
+ var signer = crypto.createSign('RSA-SHA' + bits);
+ var sig = (signer.update(thing), signer.sign({
+ key: privateKey,
+ padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
+ saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
+ }, 'base64'));
+ return fromBase64(sig);
+ }
+}
+
+function createPSSKeyVerifier(bits) {
+ return function verify(thing, signature, publicKey) {
+ checkIsPublicKey(publicKey);
+ thing = normalizeInput(thing);
+ signature = toBase64(signature);
+ var verifier = crypto.createVerify('RSA-SHA' + bits);
+ verifier.update(thing);
+ return verifier.verify({
+ key: publicKey,
+ padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
+ saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
+ }, signature, 'base64');
+ }
+}
+
+function createECDSASigner(bits) {
+ var inner = createKeySigner(bits);
+ return function sign() {
+ var signature = inner.apply(null, arguments);
+ signature = formatEcdsa.derToJose(signature, 'ES' + bits);
+ return signature;
+ };
+}
+
+function createECDSAVerifer(bits) {
+ var inner = createKeyVerifier(bits);
+ return function verify(thing, signature, publicKey) {
+ signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64');
+ var result = inner(thing, signature, publicKey);
+ return result;
+ };
+}
+
+function createNoneSigner() {
+ return function sign() {
+ return '';
+ }
+}
+
+function createNoneVerifier() {
+ return function verify(thing, signature) {
+ return signature === '';
+ }
+}
+
+module.exports = function jwa(algorithm) {
+ var signerFactories = {
+ hs: createHmacSigner,
+ rs: createKeySigner,
+ ps: createPSSKeySigner,
+ es: createECDSASigner,
+ none: createNoneSigner,
+ }
+ var verifierFactories = {
+ hs: createHmacVerifier,
+ rs: createKeyVerifier,
+ ps: createPSSKeyVerifier,
+ es: createECDSAVerifer,
+ none: createNoneVerifier,
+ }
+ var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);
+ if (!match)
+ throw typeError(MSG_INVALID_ALGORITHM, algorithm);
+ var algo = (match[1] || match[3]).toLowerCase();
+ var bits = match[2];
+
+ return {
+ sign: signerFactories[algo](bits),
+ verify: verifierFactories[algo](bits),
+ }
+};
diff --git a/week-3/02-course-app-easy/node_modules/jwa/package.json b/week-3/02-course-app-easy/node_modules/jwa/package.json
new file mode 100644
index 000000000..0777d5339
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jwa/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "jwa",
+ "version": "1.4.1",
+ "description": "JWA implementation (supports all JWS algorithms)",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ },
+ "devDependencies": {
+ "base64url": "^2.0.0",
+ "jwk-to-pem": "^2.0.1",
+ "semver": "4.3.6",
+ "tap": "6.2.0"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/brianloveswords/node-jwa.git"
+ },
+ "keywords": [
+ "jwa",
+ "jws",
+ "jwt",
+ "rsa",
+ "ecdsa",
+ "hmac"
+ ],
+ "author": "Brian J. Brennan ",
+ "license": "MIT"
+}
diff --git a/week-3/02-course-app-easy/node_modules/jws/CHANGELOG.md b/week-3/02-course-app-easy/node_modules/jws/CHANGELOG.md
new file mode 100644
index 000000000..af8fc2876
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/CHANGELOG.md
@@ -0,0 +1,34 @@
+# Change Log
+All notable changes to this project will be documented in this file.
+
+## [3.0.0]
+### Changed
+- **BREAKING**: `jwt.verify` now requires an `algorithm` parameter, and
+ `jws.createVerify` requires an `algorithm` option. The `"alg"` field
+ signature headers is ignored. This mitigates a critical security flaw
+ in the library which would allow an attacker to generate signatures with
+ arbitrary contents that would be accepted by `jwt.verify`. See
+ https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
+ for details.
+
+## [2.0.0] - 2015-01-30
+### Changed
+- **BREAKING**: Default payload encoding changed from `binary` to
+ `utf8`. `utf8` is a is a more sensible default than `binary` because
+ many payloads, as far as I can tell, will contain user-facing
+ strings that could be in any language. ([6b6de48]
)
+
+- Code reorganization, thanks [@fearphage]! ([7880050]
)
+
+### Added
+- Option in all relevant methods for `encoding`. For those few users
+ that might be depending on a `binary` encoding of the messages, this
+ is for them. ([6b6de48]
)
+
+[unreleased]: https://github.com/brianloveswords/node-jws/compare/v2.0.0...HEAD
+[2.0.0]: https://github.com/brianloveswords/node-jws/compare/v1.0.1...v2.0.0
+
+[7880050]: https://github.com/brianloveswords/node-jws/commit/7880050
+[6b6de48]: https://github.com/brianloveswords/node-jws/commit/6b6de48
+
+[@fearphage]: https://github.com/fearphage
diff --git a/week-3/02-course-app-easy/node_modules/jws/LICENSE b/week-3/02-course-app-easy/node_modules/jws/LICENSE
new file mode 100644
index 000000000..caeb8495c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/LICENSE
@@ -0,0 +1,17 @@
+Copyright (c) 2013 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/jws/index.js b/week-3/02-course-app-easy/node_modules/jws/index.js
new file mode 100644
index 000000000..8c8da9304
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/index.js
@@ -0,0 +1,22 @@
+/*global exports*/
+var SignStream = require('./lib/sign-stream');
+var VerifyStream = require('./lib/verify-stream');
+
+var ALGORITHMS = [
+ 'HS256', 'HS384', 'HS512',
+ 'RS256', 'RS384', 'RS512',
+ 'PS256', 'PS384', 'PS512',
+ 'ES256', 'ES384', 'ES512'
+];
+
+exports.ALGORITHMS = ALGORITHMS;
+exports.sign = SignStream.sign;
+exports.verify = VerifyStream.verify;
+exports.decode = VerifyStream.decode;
+exports.isValid = VerifyStream.isValid;
+exports.createSign = function createSign(opts) {
+ return new SignStream(opts);
+};
+exports.createVerify = function createVerify(opts) {
+ return new VerifyStream(opts);
+};
diff --git a/week-3/02-course-app-easy/node_modules/jws/lib/data-stream.js b/week-3/02-course-app-easy/node_modules/jws/lib/data-stream.js
new file mode 100644
index 000000000..3535d31d9
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/lib/data-stream.js
@@ -0,0 +1,55 @@
+/*global module, process*/
+var Buffer = require('safe-buffer').Buffer;
+var Stream = require('stream');
+var util = require('util');
+
+function DataStream(data) {
+ this.buffer = null;
+ this.writable = true;
+ this.readable = true;
+
+ // No input
+ if (!data) {
+ this.buffer = Buffer.alloc(0);
+ return this;
+ }
+
+ // Stream
+ if (typeof data.pipe === 'function') {
+ this.buffer = Buffer.alloc(0);
+ data.pipe(this);
+ return this;
+ }
+
+ // Buffer or String
+ // or Object (assumedly a passworded key)
+ if (data.length || typeof data === 'object') {
+ this.buffer = data;
+ this.writable = false;
+ process.nextTick(function () {
+ this.emit('end', data);
+ this.readable = false;
+ this.emit('close');
+ }.bind(this));
+ return this;
+ }
+
+ throw new TypeError('Unexpected data type ('+ typeof data + ')');
+}
+util.inherits(DataStream, Stream);
+
+DataStream.prototype.write = function write(data) {
+ this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]);
+ this.emit('data', data);
+};
+
+DataStream.prototype.end = function end(data) {
+ if (data)
+ this.write(data);
+ this.emit('end', data);
+ this.emit('close');
+ this.writable = false;
+ this.readable = false;
+};
+
+module.exports = DataStream;
diff --git a/week-3/02-course-app-easy/node_modules/jws/lib/sign-stream.js b/week-3/02-course-app-easy/node_modules/jws/lib/sign-stream.js
new file mode 100644
index 000000000..6a7ee42f2
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/lib/sign-stream.js
@@ -0,0 +1,78 @@
+/*global module*/
+var Buffer = require('safe-buffer').Buffer;
+var DataStream = require('./data-stream');
+var jwa = require('jwa');
+var Stream = require('stream');
+var toString = require('./tostring');
+var util = require('util');
+
+function base64url(string, encoding) {
+ return Buffer
+ .from(string, encoding)
+ .toString('base64')
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function jwsSecuredInput(header, payload, encoding) {
+ encoding = encoding || 'utf8';
+ var encodedHeader = base64url(toString(header), 'binary');
+ var encodedPayload = base64url(toString(payload), encoding);
+ return util.format('%s.%s', encodedHeader, encodedPayload);
+}
+
+function jwsSign(opts) {
+ var header = opts.header;
+ var payload = opts.payload;
+ var secretOrKey = opts.secret || opts.privateKey;
+ var encoding = opts.encoding;
+ var algo = jwa(header.alg);
+ var securedInput = jwsSecuredInput(header, payload, encoding);
+ var signature = algo.sign(securedInput, secretOrKey);
+ return util.format('%s.%s', securedInput, signature);
+}
+
+function SignStream(opts) {
+ var secret = opts.secret||opts.privateKey||opts.key;
+ var secretStream = new DataStream(secret);
+ this.readable = true;
+ this.header = opts.header;
+ this.encoding = opts.encoding;
+ this.secret = this.privateKey = this.key = secretStream;
+ this.payload = new DataStream(opts.payload);
+ this.secret.once('close', function () {
+ if (!this.payload.writable && this.readable)
+ this.sign();
+ }.bind(this));
+
+ this.payload.once('close', function () {
+ if (!this.secret.writable && this.readable)
+ this.sign();
+ }.bind(this));
+}
+util.inherits(SignStream, Stream);
+
+SignStream.prototype.sign = function sign() {
+ try {
+ var signature = jwsSign({
+ header: this.header,
+ payload: this.payload.buffer,
+ secret: this.secret.buffer,
+ encoding: this.encoding
+ });
+ this.emit('done', signature);
+ this.emit('data', signature);
+ this.emit('end');
+ this.readable = false;
+ return signature;
+ } catch (e) {
+ this.readable = false;
+ this.emit('error', e);
+ this.emit('close');
+ }
+};
+
+SignStream.sign = jwsSign;
+
+module.exports = SignStream;
diff --git a/week-3/02-course-app-easy/node_modules/jws/lib/tostring.js b/week-3/02-course-app-easy/node_modules/jws/lib/tostring.js
new file mode 100644
index 000000000..f5a49a365
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/lib/tostring.js
@@ -0,0 +1,10 @@
+/*global module*/
+var Buffer = require('buffer').Buffer;
+
+module.exports = function toString(obj) {
+ if (typeof obj === 'string')
+ return obj;
+ if (typeof obj === 'number' || Buffer.isBuffer(obj))
+ return obj.toString();
+ return JSON.stringify(obj);
+};
diff --git a/week-3/02-course-app-easy/node_modules/jws/lib/verify-stream.js b/week-3/02-course-app-easy/node_modules/jws/lib/verify-stream.js
new file mode 100644
index 000000000..39f7c73e2
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/lib/verify-stream.js
@@ -0,0 +1,120 @@
+/*global module*/
+var Buffer = require('safe-buffer').Buffer;
+var DataStream = require('./data-stream');
+var jwa = require('jwa');
+var Stream = require('stream');
+var toString = require('./tostring');
+var util = require('util');
+var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
+
+function isObject(thing) {
+ return Object.prototype.toString.call(thing) === '[object Object]';
+}
+
+function safeJsonParse(thing) {
+ if (isObject(thing))
+ return thing;
+ try { return JSON.parse(thing); }
+ catch (e) { return undefined; }
+}
+
+function headerFromJWS(jwsSig) {
+ var encodedHeader = jwsSig.split('.', 1)[0];
+ return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary'));
+}
+
+function securedInputFromJWS(jwsSig) {
+ return jwsSig.split('.', 2).join('.');
+}
+
+function signatureFromJWS(jwsSig) {
+ return jwsSig.split('.')[2];
+}
+
+function payloadFromJWS(jwsSig, encoding) {
+ encoding = encoding || 'utf8';
+ var payload = jwsSig.split('.')[1];
+ return Buffer.from(payload, 'base64').toString(encoding);
+}
+
+function isValidJws(string) {
+ return JWS_REGEX.test(string) && !!headerFromJWS(string);
+}
+
+function jwsVerify(jwsSig, algorithm, secretOrKey) {
+ if (!algorithm) {
+ var err = new Error("Missing algorithm parameter for jws.verify");
+ err.code = "MISSING_ALGORITHM";
+ throw err;
+ }
+ jwsSig = toString(jwsSig);
+ var signature = signatureFromJWS(jwsSig);
+ var securedInput = securedInputFromJWS(jwsSig);
+ var algo = jwa(algorithm);
+ return algo.verify(securedInput, signature, secretOrKey);
+}
+
+function jwsDecode(jwsSig, opts) {
+ opts = opts || {};
+ jwsSig = toString(jwsSig);
+
+ if (!isValidJws(jwsSig))
+ return null;
+
+ var header = headerFromJWS(jwsSig);
+
+ if (!header)
+ return null;
+
+ var payload = payloadFromJWS(jwsSig);
+ if (header.typ === 'JWT' || opts.json)
+ payload = JSON.parse(payload, opts.encoding);
+
+ return {
+ header: header,
+ payload: payload,
+ signature: signatureFromJWS(jwsSig)
+ };
+}
+
+function VerifyStream(opts) {
+ opts = opts || {};
+ var secretOrKey = opts.secret||opts.publicKey||opts.key;
+ var secretStream = new DataStream(secretOrKey);
+ this.readable = true;
+ this.algorithm = opts.algorithm;
+ this.encoding = opts.encoding;
+ this.secret = this.publicKey = this.key = secretStream;
+ this.signature = new DataStream(opts.signature);
+ this.secret.once('close', function () {
+ if (!this.signature.writable && this.readable)
+ this.verify();
+ }.bind(this));
+
+ this.signature.once('close', function () {
+ if (!this.secret.writable && this.readable)
+ this.verify();
+ }.bind(this));
+}
+util.inherits(VerifyStream, Stream);
+VerifyStream.prototype.verify = function verify() {
+ try {
+ var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
+ var obj = jwsDecode(this.signature.buffer, this.encoding);
+ this.emit('done', valid, obj);
+ this.emit('data', valid);
+ this.emit('end');
+ this.readable = false;
+ return valid;
+ } catch (e) {
+ this.readable = false;
+ this.emit('error', e);
+ this.emit('close');
+ }
+};
+
+VerifyStream.decode = jwsDecode;
+VerifyStream.isValid = isValidJws;
+VerifyStream.verify = jwsVerify;
+
+module.exports = VerifyStream;
diff --git a/week-3/02-course-app-easy/node_modules/jws/package.json b/week-3/02-course-app-easy/node_modules/jws/package.json
new file mode 100644
index 000000000..3fb283757
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "jws",
+ "version": "3.2.2",
+ "description": "Implementation of JSON Web Signatures",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/brianloveswords/node-jws.git"
+ },
+ "keywords": [
+ "jws",
+ "json",
+ "web",
+ "signatures"
+ ],
+ "author": "Brian J Brennan",
+ "license": "MIT",
+ "readmeFilename": "readme.md",
+ "gitHead": "c0f6b27bcea5a2ad2e304d91c2e842e4076a6b03",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ },
+ "devDependencies": {
+ "semver": "^5.1.0",
+ "tape": "~2.14.0"
+ }
+}
diff --git a/week-3/02-course-app-easy/node_modules/jws/readme.md b/week-3/02-course-app-easy/node_modules/jws/readme.md
new file mode 100644
index 000000000..1910c9a84
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/jws/readme.md
@@ -0,0 +1,255 @@
+# node-jws [![Build Status](https://secure.travis-ci.org/brianloveswords/node-jws.png)](http://travis-ci.org/brianloveswords/node-jws)
+
+An implementation of [JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html).
+
+This was developed against `draft-ietf-jose-json-web-signature-08` and
+implements the entire spec **except** X.509 Certificate Chain
+signing/verifying (patches welcome).
+
+There are both synchronous (`jws.sign`, `jws.verify`) and streaming
+(`jws.createSign`, `jws.createVerify`) APIs.
+
+# Install
+
+```bash
+$ npm install jws
+```
+
+# Usage
+
+## jws.ALGORITHMS
+
+Array of supported algorithms. The following algorithms are currently supported.
+
+alg Parameter Value | Digital Signature or MAC Algorithm
+----------------|----------------------------
+HS256 | HMAC using SHA-256 hash algorithm
+HS384 | HMAC using SHA-384 hash algorithm
+HS512 | HMAC using SHA-512 hash algorithm
+RS256 | RSASSA using SHA-256 hash algorithm
+RS384 | RSASSA using SHA-384 hash algorithm
+RS512 | RSASSA using SHA-512 hash algorithm
+PS256 | RSASSA-PSS using SHA-256 hash algorithm
+PS384 | RSASSA-PSS using SHA-384 hash algorithm
+PS512 | RSASSA-PSS using SHA-512 hash algorithm
+ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm
+ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm
+ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm
+none | No digital signature or MAC value included
+
+## jws.sign(options)
+
+(Synchronous) Return a JSON Web Signature for a header and a payload.
+
+Options:
+
+* `header`
+* `payload`
+* `secret` or `privateKey`
+* `encoding` (Optional, defaults to 'utf8')
+
+`header` must be an object with an `alg` property. `header.alg` must be
+one a value found in `jws.ALGORITHMS`. See above for a table of
+supported algorithms.
+
+If `payload` is not a buffer or a string, it will be coerced into a string
+using `JSON.stringify`.
+
+Example
+
+```js
+const signature = jws.sign({
+ header: { alg: 'HS256' },
+ payload: 'h. jon benjamin',
+ secret: 'has a van',
+});
+```
+
+## jws.verify(signature, algorithm, secretOrKey)
+
+(Synchronous) Returns `true` or `false` for whether a signature matches a
+secret or key.
+
+`signature` is a JWS Signature. `header.alg` must be a value found in `jws.ALGORITHMS`.
+See above for a table of supported algorithms. `secretOrKey` is a string or
+buffer containing either the secret for HMAC algorithms, or the PEM
+encoded public key for RSA and ECDSA.
+
+Note that the `"alg"` value from the signature header is ignored.
+
+
+## jws.decode(signature)
+
+(Synchronous) Returns the decoded header, decoded payload, and signature
+parts of the JWS Signature.
+
+Returns an object with three properties, e.g.
+```js
+{ header: { alg: 'HS256' },
+ payload: 'h. jon benjamin',
+ signature: 'YOWPewyGHKu4Y_0M_vtlEnNlqmFOclqp4Hy6hVHfFT4'
+}
+```
+
+## jws.createSign(options)
+
+Returns a new SignStream object.
+
+Options:
+
+* `header` (required)
+* `payload`
+* `key` || `privateKey` || `secret`
+* `encoding` (Optional, defaults to 'utf8')
+
+Other than `header`, all options expect a string or a buffer when the
+value is known ahead of time, or a stream for convenience.
+`key`/`privateKey`/`secret` may also be an object when using an encrypted
+private key, see the [crypto documentation][encrypted-key-docs].
+
+Example:
+
+```js
+
+// This...
+jws.createSign({
+ header: { alg: 'RS256' },
+ privateKey: privateKeyStream,
+ payload: payloadStream,
+}).on('done', function(signature) {
+ // ...
+});
+
+// is equivalent to this:
+const signer = jws.createSign({
+ header: { alg: 'RS256' },
+});
+privateKeyStream.pipe(signer.privateKey);
+payloadStream.pipe(signer.payload);
+signer.on('done', function(signature) {
+ // ...
+});
+```
+
+## jws.createVerify(options)
+
+Returns a new VerifyStream object.
+
+Options:
+
+* `signature`
+* `algorithm`
+* `key` || `publicKey` || `secret`
+* `encoding` (Optional, defaults to 'utf8')
+
+All options expect a string or a buffer when the value is known ahead of
+time, or a stream for convenience.
+
+Example:
+
+```js
+
+// This...
+jws.createVerify({
+ publicKey: pubKeyStream,
+ signature: sigStream,
+}).on('done', function(verified, obj) {
+ // ...
+});
+
+// is equivilant to this:
+const verifier = jws.createVerify();
+pubKeyStream.pipe(verifier.publicKey);
+sigStream.pipe(verifier.signature);
+verifier.on('done', function(verified, obj) {
+ // ...
+});
+```
+
+## Class: SignStream
+
+A `Readable Stream` that emits a single data event (the calculated
+signature) when done.
+
+### Event: 'done'
+`function (signature) { }`
+
+### signer.payload
+
+A `Writable Stream` that expects the JWS payload. Do *not* use if you
+passed a `payload` option to the constructor.
+
+Example:
+
+```js
+payloadStream.pipe(signer.payload);
+```
+
+### signer.secret
signer.key
signer.privateKey
+
+A `Writable Stream`. Expects the JWS secret for HMAC, or the privateKey
+for ECDSA and RSA. Do *not* use if you passed a `secret` or `key` option
+to the constructor.
+
+Example:
+
+```js
+privateKeyStream.pipe(signer.privateKey);
+```
+
+## Class: VerifyStream
+
+This is a `Readable Stream` that emits a single data event, the result
+of whether or not that signature was valid.
+
+### Event: 'done'
+`function (valid, obj) { }`
+
+`valid` is a boolean for whether or not the signature is valid.
+
+### verifier.signature
+
+A `Writable Stream` that expects a JWS Signature. Do *not* use if you
+passed a `signature` option to the constructor.
+
+### verifier.secret
verifier.key
verifier.publicKey
+
+A `Writable Stream` that expects a public key or secret. Do *not* use if you
+passed a `key` or `secret` option to the constructor.
+
+# TODO
+
+* It feels like there should be some convenience options/APIs for
+ defining the algorithm rather than having to define a header object
+ with `{ alg: 'ES512' }` or whatever every time.
+
+* X.509 support, ugh
+
+# License
+
+MIT
+
+```
+Copyright (c) 2013-2015 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+```
+
+[encrypted-key-docs]: https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format
diff --git a/week-3/02-course-app-easy/node_modules/lodash.includes/LICENSE b/week-3/02-course-app-easy/node_modules/lodash.includes/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.includes/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.includes/README.md b/week-3/02-course-app-easy/node_modules/lodash.includes/README.md
new file mode 100644
index 000000000..26e93775f
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.includes/README.md
@@ -0,0 +1,18 @@
+# lodash.includes v4.3.0
+
+The [lodash](https://lodash.com/) method `_.includes` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.includes
+```
+
+In Node.js:
+```js
+var includes = require('lodash.includes');
+```
+
+See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.includes) for more details.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.includes/index.js b/week-3/02-course-app-easy/node_modules/lodash.includes/index.js
new file mode 100644
index 000000000..e88d53380
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.includes/index.js
@@ -0,0 +1,745 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array ? array.length : 0,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
+
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+
+/**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+}
+
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
+ var result = (isArray(value) || isArguments(value))
+ ? baseTimes(value.length, String)
+ : [];
+
+ var length = result.length,
+ skipIndexes = !!length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
+/**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+}
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+function isArguments(value) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+}
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
+
+/**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+function values(object) {
+ return object ? baseValues(object, keys(object)) : [];
+}
+
+module.exports = includes;
diff --git a/week-3/02-course-app-easy/node_modules/lodash.includes/package.json b/week-3/02-course-app-easy/node_modules/lodash.includes/package.json
new file mode 100644
index 000000000..a02e645d6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.includes/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.includes",
+ "version": "4.3.0",
+ "description": "The lodash method `_.includes` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, includes",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isboolean/LICENSE b/week-3/02-course-app-easy/node_modules/lodash.isboolean/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isboolean/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isboolean/README.md b/week-3/02-course-app-easy/node_modules/lodash.isboolean/README.md
new file mode 100644
index 000000000..b3c476b02
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isboolean/README.md
@@ -0,0 +1,18 @@
+# lodash.isboolean v3.0.3
+
+The [lodash](https://lodash.com/) method `_.isBoolean` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isboolean
+```
+
+In Node.js:
+```js
+var isBoolean = require('lodash.isboolean');
+```
+
+See the [documentation](https://lodash.com/docs#isBoolean) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isboolean) for more details.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isboolean/index.js b/week-3/02-course-app-easy/node_modules/lodash.isboolean/index.js
new file mode 100644
index 000000000..23bbabdc3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isboolean/index.js
@@ -0,0 +1,70 @@
+/**
+ * lodash 3.0.3 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && objectToString.call(value) == boolTag);
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+module.exports = isBoolean;
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isboolean/package.json b/week-3/02-course-app-easy/node_modules/lodash.isboolean/package.json
new file mode 100644
index 000000000..01d6e8b91
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isboolean/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isboolean",
+ "version": "3.0.3",
+ "description": "The lodash method `_.isBoolean` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isboolean",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isinteger/LICENSE b/week-3/02-course-app-easy/node_modules/lodash.isinteger/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isinteger/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isinteger/README.md b/week-3/02-course-app-easy/node_modules/lodash.isinteger/README.md
new file mode 100644
index 000000000..3a78567b6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isinteger/README.md
@@ -0,0 +1,18 @@
+# lodash.isinteger v4.0.4
+
+The [lodash](https://lodash.com/) method `_.isInteger` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isinteger
+```
+
+In Node.js:
+```js
+var isInteger = require('lodash.isinteger');
+```
+
+See the [documentation](https://lodash.com/docs#isInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash.isinteger) for more details.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isinteger/index.js b/week-3/02-course-app-easy/node_modules/lodash.isinteger/index.js
new file mode 100644
index 000000000..3bf06f007
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isinteger/index.js
@@ -0,0 +1,265 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = isInteger;
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isinteger/package.json b/week-3/02-course-app-easy/node_modules/lodash.isinteger/package.json
new file mode 100644
index 000000000..92db256f1
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isinteger/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isinteger",
+ "version": "4.0.4",
+ "description": "The lodash method `_.isInteger` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isinteger",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isnumber/LICENSE b/week-3/02-course-app-easy/node_modules/lodash.isnumber/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isnumber/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isnumber/README.md b/week-3/02-course-app-easy/node_modules/lodash.isnumber/README.md
new file mode 100644
index 000000000..a1d434dd6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isnumber/README.md
@@ -0,0 +1,18 @@
+# lodash.isnumber v3.0.3
+
+The [lodash](https://lodash.com/) method `_.isNumber` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isnumber
+```
+
+In Node.js:
+```js
+var isNumber = require('lodash.isnumber');
+```
+
+See the [documentation](https://lodash.com/docs#isNumber) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isnumber) for more details.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isnumber/index.js b/week-3/02-course-app-easy/node_modules/lodash.isnumber/index.js
new file mode 100644
index 000000000..35a85732b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isnumber/index.js
@@ -0,0 +1,79 @@
+/**
+ * lodash 3.0.3 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var numberTag = '[object Number]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
+ * as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && objectToString.call(value) == numberTag);
+}
+
+module.exports = isNumber;
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isnumber/package.json b/week-3/02-course-app-easy/node_modules/lodash.isnumber/package.json
new file mode 100644
index 000000000..4c33c2a31
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isnumber/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isnumber",
+ "version": "3.0.3",
+ "description": "The lodash method `_.isNumber` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isnumber",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isplainobject/LICENSE b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isplainobject/README.md b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/README.md
new file mode 100644
index 000000000..aeefd74da
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/README.md
@@ -0,0 +1,18 @@
+# lodash.isplainobject v4.0.6
+
+The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isplainobject
+```
+
+In Node.js:
+```js
+var isPlainObject = require('lodash.isplainobject');
+```
+
+See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isplainobject/index.js b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/index.js
new file mode 100644
index 000000000..0f820ee7a
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/index.js
@@ -0,0 +1,139 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** `Object#toString` result references. */
+var objectTag = '[object Object]';
+
+/**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+}
+
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+}
+
+module.exports = isPlainObject;
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isplainobject/package.json b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/package.json
new file mode 100644
index 000000000..86f6a07e7
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isplainobject/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isplainobject",
+ "version": "4.0.6",
+ "description": "The lodash method `_.isPlainObject` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isplainobject",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isstring/LICENSE b/week-3/02-course-app-easy/node_modules/lodash.isstring/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isstring/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isstring/README.md b/week-3/02-course-app-easy/node_modules/lodash.isstring/README.md
new file mode 100644
index 000000000..f184029aa
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isstring/README.md
@@ -0,0 +1,18 @@
+# lodash.isstring v4.0.1
+
+The [lodash](https://lodash.com/) method `_.isString` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isstring
+```
+
+In Node.js:
+```js
+var isString = require('lodash.isstring');
+```
+
+See the [documentation](https://lodash.com/docs#isString) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.isstring) for more details.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isstring/index.js b/week-3/02-course-app-easy/node_modules/lodash.isstring/index.js
new file mode 100644
index 000000000..408225c52
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isstring/index.js
@@ -0,0 +1,95 @@
+/**
+ * lodash 4.0.1 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @type Function
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+}
+
+module.exports = isString;
diff --git a/week-3/02-course-app-easy/node_modules/lodash.isstring/package.json b/week-3/02-course-app-easy/node_modules/lodash.isstring/package.json
new file mode 100644
index 000000000..1331535d6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.isstring/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isstring",
+ "version": "4.0.1",
+ "description": "The lodash method `_.isString` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isstring",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/02-course-app-easy/node_modules/lodash.once/LICENSE b/week-3/02-course-app-easy/node_modules/lodash.once/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.once/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.once/README.md b/week-3/02-course-app-easy/node_modules/lodash.once/README.md
new file mode 100644
index 000000000..c4a2f1698
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.once/README.md
@@ -0,0 +1,18 @@
+# lodash.once v4.1.1
+
+The [lodash](https://lodash.com/) method `_.once` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.once
+```
+
+In Node.js:
+```js
+var once = require('lodash.once');
+```
+
+See the [documentation](https://lodash.com/docs#once) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.once) for more details.
diff --git a/week-3/02-course-app-easy/node_modules/lodash.once/index.js b/week-3/02-course-app-easy/node_modules/lodash.once/index.js
new file mode 100644
index 000000000..414ceb331
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.once/index.js
@@ -0,0 +1,294 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+}
+
+/**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+function once(func) {
+ return before(2, func);
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = once;
diff --git a/week-3/02-course-app-easy/node_modules/lodash.once/package.json b/week-3/02-course-app-easy/node_modules/lodash.once/package.json
new file mode 100644
index 000000000..fae782c22
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/lodash.once/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.once",
+ "version": "4.1.1",
+ "description": "The lodash method `_.once` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, once",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/02-course-app-easy/node_modules/ms/index.js b/week-3/02-course-app-easy/node_modules/ms/index.js
new file mode 100644
index 000000000..ea734fb73
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function (val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/week-3/02-course-app-easy/node_modules/ms/license.md b/week-3/02-course-app-easy/node_modules/ms/license.md
new file mode 100644
index 000000000..fa5d39b62
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 Vercel, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/ms/package.json b/week-3/02-course-app-easy/node_modules/ms/package.json
new file mode 100644
index 000000000..49971890d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ms/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "ms",
+ "version": "2.1.3",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "vercel/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.18.2",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1",
+ "prettier": "2.0.5"
+ }
+}
diff --git a/week-3/02-course-app-easy/node_modules/ms/readme.md b/week-3/02-course-app-easy/node_modules/ms/readme.md
new file mode 100644
index 000000000..0fc1abb3b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/ms/readme.md
@@ -0,0 +1,59 @@
+# ms
+
+![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/week-3/02-course-app-easy/node_modules/safe-buffer/LICENSE b/week-3/02-course-app-easy/node_modules/safe-buffer/LICENSE
new file mode 100644
index 000000000..0c068ceec
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/safe-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/safe-buffer/README.md b/week-3/02-course-app-easy/node_modules/safe-buffer/README.md
new file mode 100644
index 000000000..e9a81afd0
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/safe-buffer/README.md
@@ -0,0 +1,584 @@
+# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a `TypedArray` instance,
+the newly created `Buffer` will share the same allocated memory as the
+TypedArray.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints:
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints:
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `str`. If
+provided, the `encoding` parameter identifies the character encoding.
+If not provided, `encoding` defaults to `'utf8'`.
+
+```js
+const buf1 = Buffer.from('this is a tést');
+console.log(buf1.toString());
+ // prints: this is a tést
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tést
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ //
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ //
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ //
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ //
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ //
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/week-3/02-course-app-easy/node_modules/safe-buffer/index.d.ts b/week-3/02-course-app-easy/node_modules/safe-buffer/index.d.ts
new file mode 100644
index 000000000..e9fed809a
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/safe-buffer/index.d.ts
@@ -0,0 +1,187 @@
+declare module "safe-buffer" {
+ export class Buffer {
+ length: number
+ write(string: string, offset?: number, length?: number, encoding?: string): number;
+ toString(encoding?: string, start?: number, end?: number): string;
+ toJSON(): { type: 'Buffer', data: any[] };
+ equals(otherBuffer: Buffer): boolean;
+ compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+ copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ slice(start?: number, end?: number): Buffer;
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUInt8(offset: number, noAssert?: boolean): number;
+ readUInt16LE(offset: number, noAssert?: boolean): number;
+ readUInt16BE(offset: number, noAssert?: boolean): number;
+ readUInt32LE(offset: number, noAssert?: boolean): number;
+ readUInt32BE(offset: number, noAssert?: boolean): number;
+ readInt8(offset: number, noAssert?: boolean): number;
+ readInt16LE(offset: number, noAssert?: boolean): number;
+ readInt16BE(offset: number, noAssert?: boolean): number;
+ readInt32LE(offset: number, noAssert?: boolean): number;
+ readInt32BE(offset: number, noAssert?: boolean): number;
+ readFloatLE(offset: number, noAssert?: boolean): number;
+ readFloatBE(offset: number, noAssert?: boolean): number;
+ readDoubleLE(offset: number, noAssert?: boolean): number;
+ readDoubleBE(offset: number, noAssert?: boolean): number;
+ swap16(): Buffer;
+ swap32(): Buffer;
+ swap64(): Buffer;
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
+ fill(value: any, offset?: number, end?: number): this;
+ indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
+
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ */
+ constructor (str: string, encoding?: string);
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ */
+ constructor (size: number);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: Uint8Array);
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ */
+ constructor (arrayBuffer: ArrayBuffer);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: any[]);
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ */
+ constructor (buffer: Buffer);
+ prototype: Buffer;
+ /**
+ * Allocates a new Buffer using an {array} of octets.
+ *
+ * @param array
+ */
+ static from(array: any[]): Buffer;
+ /**
+ * When passed a reference to the .buffer property of a TypedArray instance,
+ * the newly created Buffer will share the same allocated memory as the TypedArray.
+ * The optional {byteOffset} and {length} arguments specify a memory range
+ * within the {arrayBuffer} that will be shared by the Buffer.
+ *
+ * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
+ * @param byteOffset
+ * @param length
+ */
+ static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new Buffer instance.
+ *
+ * @param buffer
+ */
+ static from(buffer: Buffer): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ *
+ * @param str
+ */
+ static from(str: string, encoding?: string): Buffer;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ static isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns true if {encoding} is a valid encoding argument.
+ * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ *
+ * @param encoding string to test.
+ */
+ static isEncoding(encoding: string): boolean;
+ /**
+ * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+ * This is not the same as String.prototype.length since that returns the number of characters in a string.
+ *
+ * @param string string to test.
+ * @param encoding encoding used to evaluate (defaults to 'utf8')
+ */
+ static byteLength(string: string, encoding?: string): number;
+ /**
+ * Returns a buffer which is the result of concatenating all the buffers in the list together.
+ *
+ * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+ * If the list has exactly one item, then the first item of the list is returned.
+ * If the list has more than one item, then a new Buffer is created.
+ *
+ * @param list An array of Buffer objects to concatenate
+ * @param totalLength Total length of the buffers when concatenated.
+ * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+ */
+ static concat(list: Buffer[], totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ static compare(buf1: Buffer, buf2: Buffer): number;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
+ * If parameter is omitted, buffer will be filled with zeros.
+ * @param encoding encoding used for call to buf.fill while initalizing
+ */
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafeSlow(size: number): Buffer;
+ }
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/safe-buffer/index.js b/week-3/02-course-app-easy/node_modules/safe-buffer/index.js
new file mode 100644
index 000000000..f8d3ec988
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/safe-buffer/index.js
@@ -0,0 +1,65 @@
+/*! safe-buffer. MIT License. Feross Aboukhadijeh */
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.prototype = Object.create(Buffer.prototype)
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/week-3/02-course-app-easy/node_modules/safe-buffer/package.json b/week-3/02-course-app-easy/node_modules/safe-buffer/package.json
new file mode 100644
index 000000000..f2869e256
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/safe-buffer/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "safe-buffer",
+ "description": "Safer Node.js Buffer API",
+ "version": "5.2.1",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "https://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^5.0.0"
+ },
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/*.js"
+ },
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/LICENSE b/week-3/02-course-app-easy/node_modules/semver/LICENSE
new file mode 100644
index 000000000..19129e315
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/semver/README.md b/week-3/02-course-app-easy/node_modules/semver/README.md
new file mode 100644
index 000000000..673e9c35c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/README.md
@@ -0,0 +1,654 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+You can also just load the module for the function that you care about if
+you'd like to minimize your footprint.
+
+```js
+// load the whole API at once in a single object
+const semver = require('semver')
+
+// or just load the bits you need
+// all of them listed here, just pick and choose what you want
+
+// classes
+const SemVer = require('semver/classes/semver')
+const Comparator = require('semver/classes/comparator')
+const Range = require('semver/classes/range')
+
+// functions for working with versions
+const semverParse = require('semver/functions/parse')
+const semverValid = require('semver/functions/valid')
+const semverClean = require('semver/functions/clean')
+const semverInc = require('semver/functions/inc')
+const semverDiff = require('semver/functions/diff')
+const semverMajor = require('semver/functions/major')
+const semverMinor = require('semver/functions/minor')
+const semverPatch = require('semver/functions/patch')
+const semverPrerelease = require('semver/functions/prerelease')
+const semverCompare = require('semver/functions/compare')
+const semverRcompare = require('semver/functions/rcompare')
+const semverCompareLoose = require('semver/functions/compare-loose')
+const semverCompareBuild = require('semver/functions/compare-build')
+const semverSort = require('semver/functions/sort')
+const semverRsort = require('semver/functions/rsort')
+
+// low-level comparators between versions
+const semverGt = require('semver/functions/gt')
+const semverLt = require('semver/functions/lt')
+const semverEq = require('semver/functions/eq')
+const semverNeq = require('semver/functions/neq')
+const semverGte = require('semver/functions/gte')
+const semverLte = require('semver/functions/lte')
+const semverCmp = require('semver/functions/cmp')
+const semverCoerce = require('semver/functions/coerce')
+
+// working with ranges
+const semverSatisfies = require('semver/functions/satisfies')
+const semverMaxSatisfying = require('semver/ranges/max-satisfying')
+const semverMinSatisfying = require('semver/ranges/min-satisfying')
+const semverToComparators = require('semver/ranges/to-comparators')
+const semverMinVersion = require('semver/ranges/min-version')
+const semverValidRange = require('semver/ranges/valid')
+const semverOutside = require('semver/ranges/outside')
+const semverGtr = require('semver/ranges/gtr')
+const semverLtr = require('semver/ranges/ltr')
+const semverIntersects = require('semver/ranges/intersects')
+const semverSimplifyRange = require('semver/ranges/simplify')
+const semverRangeSubset = require('semver/ranges/subset')
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] [ [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range
+ Print versions that match the specified range.
+
+-i --increment []
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-n <0|1>
+ This is the base to be used for the prerelease identifier.
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` that specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`. The comparator `>1` is equivalent to `>=2.0.0` and
+would match the versions `2.0.0` and `3.1.0`, but not the versions
+`1.0.1` or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version.
+Version `3.4.5` *would* satisfy the range because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose of this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range-matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for range-matching)
+by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+#### Prerelease Identifier Base
+
+The method `.inc` takes an optional parameter 'identifierBase' string
+that will let you let your prerelease number as zero-based or one-based.
+Set to `false` to omit the prerelease number altogether.
+If you do not specify this parameter, it will default to zero-based.
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta', '1')
+// '1.2.4-beta.1'
+```
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta', false)
+// '1.2.4-beta'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta -n 1
+1.2.4-beta.1
+```
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta -n false
+1.2.4-beta
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless
+ `includePrerelease` is specified, in which case any version at all
+ satisfies)
+* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero element in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0-0`
+* `^0.2.3` := `>=0.2.3 <0.3.0-0`
+* `^0.0.3` := `>=0.0.3 <0.0.4-0`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0-0`
+* `^0.0.x` := `>=0.0.0 <0.1.0-0`
+* `^0.0` := `>=0.0.0 <0.1.0-0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0-0`
+* `^0.x` := `>=0.0.0 <1.0.0-0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose`: Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease`: Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release, options, identifier, identifierBase)`:
+ Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, `prerelease` will work the
+ same as `prepatch`. It increments the patch version and then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+ * `identifier` can be used to prefix `premajor`, `preminor`,
+ `prepatch`, or `prerelease` version increments. `identifierBase`
+ is the base to be used for the `prerelease` identifier.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of `compare`. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
+ are equal. Sorts in ascending order if passed to `Array.sort()`.
+* `compareLoose(v1, v2)`: Short for ``compare(v1, v2, { loose: true })`.
+* `diff(v1, v2)`: Returns the difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Sorting
+
+* `sort(versions)`: Returns a sorted array of versions based on the `compareBuild`
+ function.
+* `rsort(versions)`: The reverse of `sort`. Returns an array of versions based on
+ the `compareBuild` function in descending order.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can match
+ the given range.
+* `gtr(version, range)`: Return `true` if the version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if the version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the range comparators intersect.
+* `simplifyRange(versions, range)`: Return a "simplified" range that
+ matches the same items in the `versions` list as the range specified. Note
+ that it does *not* guarantee that it would match the same versions in all
+ cases, only for the set of versions provided. This is useful when
+ generating ranges by joining together multiple versions with `||`
+ programmatically, to provide the user with something a bit more
+ ergonomic. If the provided range is shorter in string-length than the
+ generated range, then that is returned.
+* `subset(subRange, superRange)`: Return `true` if the `subRange` range is
+ entirely contained by the `superRange` range.
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version, options)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
+
+If the `options.rtl` flag is set, then `coerce` will return the right-most
+coercible tuple that does not share an ending index with a longer coercible
+tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
+`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
+any other overlapping SemVer tuple.
+
+If the `options.includePrerelease` flag is set, then the `coerce` result will contain
+prerelease and build parts of a version. For example, `1.2.3.4-rc.1+rev.2`
+will preserve prerelease `rc.1` and build `rev.2` in the result.
+
+### Clean
+
+* `clean(version)`: Clean a string to be a valid semver if possible
+
+This will return a cleaned and trimmed semver version. If the provided
+version is not valid a null will be returned. This does not work for
+ranges.
+
+ex.
+* `s.clean(' = v 2.1.5foo')`: `null`
+* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean(' = v 2.1.5-foo')`: `null`
+* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean('=v2.1.5')`: `'2.1.5'`
+* `s.clean(' =v2.1.5')`: `'2.1.5'`
+* `s.clean(' 2.1.5 ')`: `'2.1.5'`
+* `s.clean('~1.0.0')`: `null`
+
+## Constants
+
+As a convenience, helper constants are exported to provide information about what `node-semver` supports:
+
+### `RELEASE_TYPES`
+
+- major
+- premajor
+- minor
+- preminor
+- patch
+- prepatch
+- prerelease
+
+```
+const semver = require('semver');
+
+if (semver.RELEASE_TYPES.includes(arbitraryUserInput)) {
+ console.log('This is a valid release type!');
+} else {
+ console.warn('This is NOT a valid release type!');
+}
+```
+
+### `SEMVER_SPEC_VERSION`
+
+2.0.0
+
+```
+const semver = require('semver');
+
+console.log('We are currently using the semver specification version:', semver.SEMVER_SPEC_VERSION);
+```
+
+## Exported Modules
+
+
+
+You may pull in just the part of this semver utility that you need if you
+are sensitive to packing and tree-shaking concerns. The main
+`require('semver')` export uses getter functions to lazily load the parts
+of the API that are used.
+
+The following modules are available:
+
+* `require('semver')`
+* `require('semver/classes')`
+* `require('semver/classes/comparator')`
+* `require('semver/classes/range')`
+* `require('semver/classes/semver')`
+* `require('semver/functions/clean')`
+* `require('semver/functions/cmp')`
+* `require('semver/functions/coerce')`
+* `require('semver/functions/compare')`
+* `require('semver/functions/compare-build')`
+* `require('semver/functions/compare-loose')`
+* `require('semver/functions/diff')`
+* `require('semver/functions/eq')`
+* `require('semver/functions/gt')`
+* `require('semver/functions/gte')`
+* `require('semver/functions/inc')`
+* `require('semver/functions/lt')`
+* `require('semver/functions/lte')`
+* `require('semver/functions/major')`
+* `require('semver/functions/minor')`
+* `require('semver/functions/neq')`
+* `require('semver/functions/parse')`
+* `require('semver/functions/patch')`
+* `require('semver/functions/prerelease')`
+* `require('semver/functions/rcompare')`
+* `require('semver/functions/rsort')`
+* `require('semver/functions/satisfies')`
+* `require('semver/functions/sort')`
+* `require('semver/functions/valid')`
+* `require('semver/ranges/gtr')`
+* `require('semver/ranges/intersects')`
+* `require('semver/ranges/ltr')`
+* `require('semver/ranges/max-satisfying')`
+* `require('semver/ranges/min-satisfying')`
+* `require('semver/ranges/min-version')`
+* `require('semver/ranges/outside')`
+* `require('semver/ranges/simplify')`
+* `require('semver/ranges/subset')`
+* `require('semver/ranges/to-comparators')`
+* `require('semver/ranges/valid')`
+
diff --git a/week-3/02-course-app-easy/node_modules/semver/bin/semver.js b/week-3/02-course-app-easy/node_modules/semver/bin/semver.js
new file mode 100644
index 000000000..f62b566f7
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/bin/semver.js
@@ -0,0 +1,188 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+const argv = process.argv.slice(2)
+
+let versions = []
+
+const range = []
+
+let inc = null
+
+const version = require('../package.json').version
+
+let loose = false
+
+let includePrerelease = false
+
+let coerce = false
+
+let rtl = false
+
+let identifier
+
+let identifierBase
+
+const semver = require('../')
+const parseOptions = require('../internal/parse-options')
+
+let reverse = false
+
+let options = {}
+
+const main = () => {
+ if (!argv.length) {
+ return help()
+ }
+ while (argv.length) {
+ let a = argv.shift()
+ const indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ const value = a.slice(indexOfEqualSign + 1)
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(value)
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-n':
+ identifierBase = argv.shift()
+ if (identifierBase === 'false') {
+ identifierBase = false
+ }
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '--rtl':
+ rtl = true
+ break
+ case '--ltr':
+ rtl = false
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ options = parseOptions({ loose, includePrerelease, rtl })
+
+ versions = versions.map((v) => {
+ return coerce ? (semver.coerce(v, options) || { version: v }).version : v
+ }).filter((v) => {
+ return semver.valid(v)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ if (inc && (versions.length !== 1 || range.length)) {
+ return failInc()
+ }
+
+ for (let i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter((v) => {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ }
+ versions
+ .sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options))
+ .map(v => semver.clean(v, options))
+ .map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v)
+ .forEach(v => console.log(v))
+}
+
+const failInc = () => {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+const fail = () => process.exit(1)
+
+const help = () => console.log(
+`SemVer ${version}
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] [ [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range
+ Print versions that match the specified range.
+
+-i --increment []
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+-n
+ Base number to be used for the prerelease identifier.
+ Can be either 0 or 1, or false to omit the number altogether.
+ Defaults to 0.
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.`)
+
+main()
diff --git a/week-3/02-course-app-easy/node_modules/semver/classes/comparator.js b/week-3/02-course-app-easy/node_modules/semver/classes/comparator.js
new file mode 100644
index 000000000..3d39c0eef
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/classes/comparator.js
@@ -0,0 +1,141 @@
+const ANY = Symbol('SemVer ANY')
+// hoisted class for cyclic dependency
+class Comparator {
+ static get ANY () {
+ return ANY
+ }
+
+ constructor (comp, options) {
+ options = parseOptions(options)
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ comp = comp.trim().split(/\s+/).join(' ')
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+ }
+
+ parse (comp) {
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ const m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError(`Invalid comparator: ${comp}`)
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : ''
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+ }
+
+ toString () {
+ return this.value
+ }
+
+ test (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY || version === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+ }
+
+ intersects (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true
+ }
+ return new Range(comp.value, options).test(this.value)
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true
+ }
+ return new Range(this.value, options).test(comp.semver)
+ }
+
+ options = parseOptions(options)
+
+ // Special cases where nothing can possibly be lower
+ if (options.includePrerelease &&
+ (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
+ return false
+ }
+ if (!options.includePrerelease &&
+ (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
+ return false
+ }
+
+ // Same direction increasing (> or >=)
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
+ return true
+ }
+ // Same direction decreasing (< or <=)
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
+ return true
+ }
+ // same SemVer and both sides are inclusive (<= or >=)
+ if (
+ (this.semver.version === comp.semver.version) &&
+ this.operator.includes('=') && comp.operator.includes('=')) {
+ return true
+ }
+ // opposite directions less than
+ if (cmp(this.semver, '<', comp.semver, options) &&
+ this.operator.startsWith('>') && comp.operator.startsWith('<')) {
+ return true
+ }
+ // opposite directions greater than
+ if (cmp(this.semver, '>', comp.semver, options) &&
+ this.operator.startsWith('<') && comp.operator.startsWith('>')) {
+ return true
+ }
+ return false
+ }
+}
+
+module.exports = Comparator
+
+const parseOptions = require('../internal/parse-options')
+const { safeRe: re, t } = require('../internal/re')
+const cmp = require('../functions/cmp')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const Range = require('./range')
diff --git a/week-3/02-course-app-easy/node_modules/semver/classes/index.js b/week-3/02-course-app-easy/node_modules/semver/classes/index.js
new file mode 100644
index 000000000..5e3f5c9b1
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/classes/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ SemVer: require('./semver.js'),
+ Range: require('./range.js'),
+ Comparator: require('./comparator.js'),
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/classes/range.js b/week-3/02-course-app-easy/node_modules/semver/classes/range.js
new file mode 100644
index 000000000..117b45a2b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/classes/range.js
@@ -0,0 +1,540 @@
+// hoisted class for cyclic dependency
+class Range {
+ constructor (range, options) {
+ options = parseOptions(options)
+
+ if (range instanceof Range) {
+ if (
+ range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease
+ ) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ // just put it in the set and return
+ this.raw = range.value
+ this.set = [[range]]
+ this.format()
+ return this
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First reduce all whitespace as much as possible so we do not have to rely
+ // on potentially slow regexes like \s*. This is then stored and used for
+ // future error messages as well.
+ this.raw = range
+ .trim()
+ .split(/\s+/)
+ .join(' ')
+
+ // First, split on ||
+ this.set = this.raw
+ .split('||')
+ // map the range to a 2d array of comparators
+ .map(r => this.parseRange(r.trim()))
+ // throw out any comparator lists that are empty
+ // this generally means that it was not a valid range, which is allowed
+ // in loose mode, but will still throw if the WHOLE range is invalid.
+ .filter(c => c.length)
+
+ if (!this.set.length) {
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
+ }
+
+ // if we have any that are not the null set, throw out null sets.
+ if (this.set.length > 1) {
+ // keep the first one, in case they're all null sets
+ const first = this.set[0]
+ this.set = this.set.filter(c => !isNullSet(c[0]))
+ if (this.set.length === 0) {
+ this.set = [first]
+ } else if (this.set.length > 1) {
+ // if we have any that are *, then the range is just *
+ for (const c of this.set) {
+ if (c.length === 1 && isAny(c[0])) {
+ this.set = [c]
+ break
+ }
+ }
+ }
+ }
+
+ this.format()
+ }
+
+ format () {
+ this.range = this.set
+ .map((comps) => comps.join(' ').trim())
+ .join('||')
+ .trim()
+ return this.range
+ }
+
+ toString () {
+ return this.range
+ }
+
+ parseRange (range) {
+ // memoize range parsing for performance.
+ // this is a very hot path, and fully deterministic.
+ const memoOpts =
+ (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
+ (this.options.loose && FLAG_LOOSE)
+ const memoKey = memoOpts + ':' + range
+ const cached = cache.get(memoKey)
+ if (cached) {
+ return cached
+ }
+
+ const loose = this.options.loose
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
+ debug('hyphen replace', range)
+
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range)
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
+ debug('tilde trim', range)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
+ debug('caret trim', range)
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ let rangeList = range
+ .split(' ')
+ .map(comp => parseComparator(comp, this.options))
+ .join(' ')
+ .split(/\s+/)
+ // >=0.0.0 is equivalent to *
+ .map(comp => replaceGTE0(comp, this.options))
+
+ if (loose) {
+ // in loose mode, throw out any that are not valid comparators
+ rangeList = rangeList.filter(comp => {
+ debug('loose invalid filter', comp, this.options)
+ return !!comp.match(re[t.COMPARATORLOOSE])
+ })
+ }
+ debug('range list', rangeList)
+
+ // if any comparators are the null set, then replace with JUST null set
+ // if more than one comparator, remove any * comparators
+ // also, don't include the same comparator more than once
+ const rangeMap = new Map()
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
+ for (const comp of comparators) {
+ if (isNullSet(comp)) {
+ return [comp]
+ }
+ rangeMap.set(comp.value, comp)
+ }
+ if (rangeMap.size > 1 && rangeMap.has('')) {
+ rangeMap.delete('')
+ }
+
+ const result = [...rangeMap.values()]
+ cache.set(memoKey, result)
+ return result
+ }
+
+ intersects (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some((thisComparators) => {
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some((rangeComparators) => {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every((thisComparator) => {
+ return rangeComparators.every((rangeComparator) => {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
+ })
+ )
+ })
+ }
+
+ // if ANY of the sets match ALL of its comparators, then pass
+ test (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ for (let i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+ }
+}
+
+module.exports = Range
+
+const LRU = require('../internal/lrucache')
+const cache = new LRU()
+
+const parseOptions = require('../internal/parse-options')
+const Comparator = require('./comparator')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const {
+ safeRe: re,
+ t,
+ comparatorTrimReplace,
+ tildeTrimReplace,
+ caretTrimReplace,
+} = require('../internal/re')
+const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')
+
+const isNullSet = c => c.value === '<0.0.0-0'
+const isAny = c => c.value === ''
+
+// take a set of comparators and determine whether there
+// exists a version which can satisfy it
+const isSatisfiable = (comparators, options) => {
+ let result = true
+ const remainingComparators = comparators.slice()
+ let testComparator = remainingComparators.pop()
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every((otherComparator) => {
+ return testComparator.intersects(otherComparator, options)
+ })
+
+ testComparator = remainingComparators.pop()
+ }
+
+ return result
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+const parseComparator = (comp, options) => {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
+// ~0.0.1 --> >=0.0.1 <0.1.0-0
+const replaceTildes = (comp, options) => {
+ return comp
+ .trim()
+ .split(/\s+/)
+ .map((c) => replaceTilde(c, options))
+ .join(' ')
+}
+
+const replaceTilde = (comp, options) => {
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('tilde', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0-0
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
+ ret = `>=${M}.${m}.${p
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
+// ^1.2.3 --> >=1.2.3 <2.0.0-0
+// ^1.2.0 --> >=1.2.0 <2.0.0-0
+// ^0.0.1 --> >=0.0.1 <0.0.2-0
+// ^0.1.0 --> >=0.1.0 <0.2.0-0
+const replaceCarets = (comp, options) => {
+ return comp
+ .trim()
+ .split(/\s+/)
+ .map((c) => replaceCaret(c, options))
+ .join(' ')
+}
+
+const replaceCaret = (comp, options) => {
+ debug('caret', comp, options)
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
+ const z = options.includePrerelease ? '-0' : ''
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('caret', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
+ } else {
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${+M + 1}.0.0-0`
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p
+ } <${+M + 1}.0.0-0`
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+const replaceXRanges = (comp, options) => {
+ debug('replaceXRanges', comp, options)
+ return comp
+ .split(/\s+/)
+ .map((c) => replaceXRange(c, options))
+ .join(' ')
+}
+
+const replaceXRange = (comp, options) => {
+ comp = comp.trim()
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ const xM = isX(M)
+ const xm = xM || isX(m)
+ const xp = xm || isX(p)
+ const anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+ pr = options.includePrerelease ? '-0' : ''
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ if (gtlt === '<') {
+ pr = '-0'
+ }
+
+ ret = `${gtlt + M}.${m}.${p}${pr}`
+ } else if (xm) {
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
+ } else if (xp) {
+ ret = `>=${M}.${m}.0${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+const replaceStars = (comp, options) => {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp
+ .trim()
+ .replace(re[t.STAR], '')
+}
+
+const replaceGTE0 = (comp, options) => {
+ debug('replaceGTE0', comp, options)
+ return comp
+ .trim()
+ .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
+}
+
+// This function is passed to string.replace(re[t.HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
+// TODO build?
+const hyphenReplace = incPr => ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr) => {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`
+ } else if (isX(fp)) {
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
+ } else if (fpr) {
+ from = `>=${from}`
+ } else {
+ from = `>=${from}${incPr ? '-0' : ''}`
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = `<${+tM + 1}.0.0-0`
+ } else if (isX(tp)) {
+ to = `<${tM}.${+tm + 1}.0-0`
+ } else if (tpr) {
+ to = `<=${tM}.${tm}.${tp}-${tpr}`
+ } else if (incPr) {
+ to = `<${tM}.${tm}.${+tp + 1}-0`
+ } else {
+ to = `<=${to}`
+ }
+
+ return `${from} ${to}`.trim()
+}
+
+const testSet = (set, version, options) => {
+ for (let i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (let i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === Comparator.ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ const allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/classes/semver.js b/week-3/02-course-app-easy/node_modules/semver/classes/semver.js
new file mode 100644
index 000000000..13e66ce44
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/classes/semver.js
@@ -0,0 +1,302 @@
+const debug = require('../internal/debug')
+const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
+const { safeRe: re, t } = require('../internal/re')
+
+const parseOptions = require('../internal/parse-options')
+const { compareIdentifiers } = require('../internal/identifiers')
+class SemVer {
+ constructor (version, options) {
+ options = parseOptions(options)
+
+ if (version instanceof SemVer) {
+ if (version.loose === !!options.loose &&
+ version.includePrerelease === !!options.includePrerelease) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError(
+ `version is longer than ${MAX_LENGTH} characters`
+ )
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+ // this isn't actually relevant for versions, but keep it so that we
+ // don't run into trouble passing this.options around.
+ this.includePrerelease = !!options.includePrerelease
+
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
+
+ if (!m) {
+ throw new TypeError(`Invalid Version: ${version}`)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map((id) => {
+ if (/^[0-9]+$/.test(id)) {
+ const num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+ }
+
+ format () {
+ this.version = `${this.major}.${this.minor}.${this.patch}`
+ if (this.prerelease.length) {
+ this.version += `-${this.prerelease.join('.')}`
+ }
+ return this.version
+ }
+
+ toString () {
+ return this.version
+ }
+
+ compare (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ if (typeof other === 'string' && other === this.version) {
+ return 0
+ }
+ other = new SemVer(other, this.options)
+ }
+
+ if (other.version === this.version) {
+ return 0
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+ }
+
+ compareMain (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return (
+ compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+ )
+ }
+
+ comparePre (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ let i = 0
+ do {
+ const a = this.prerelease[i]
+ const b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ compareBuild (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ let i = 0
+ do {
+ const a = this.build[i]
+ const b = other.build[i]
+ debug('build compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ // preminor will bump the version up to the next minor release, and immediately
+ // down to pre-release. premajor and prepatch work the same way.
+ inc (release, identifier, identifierBase) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier, identifierBase)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier, identifierBase)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier, identifierBase)
+ this.inc('pre', identifier, identifierBase)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier, identifierBase)
+ }
+ this.inc('pre', identifier, identifierBase)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (
+ this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0
+ ) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
+ case 'pre': {
+ const base = Number(identifierBase) ? 1 : 0
+
+ if (!identifier && identifierBase === false) {
+ throw new Error('invalid increment argument: identifier is empty')
+ }
+
+ if (this.prerelease.length === 0) {
+ this.prerelease = [base]
+ } else {
+ let i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ if (identifier === this.prerelease.join('.') && identifierBase === false) {
+ throw new Error('invalid increment argument: identifier already exists')
+ }
+ this.prerelease.push(base)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ let prerelease = [identifier, base]
+ if (identifierBase === false) {
+ prerelease = [identifier]
+ }
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = prerelease
+ }
+ } else {
+ this.prerelease = prerelease
+ }
+ }
+ break
+ }
+ default:
+ throw new Error(`invalid increment argument: ${release}`)
+ }
+ this.raw = this.format()
+ if (this.build.length) {
+ this.raw += `+${this.build.join('.')}`
+ }
+ return this
+ }
+}
+
+module.exports = SemVer
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/clean.js b/week-3/02-course-app-easy/node_modules/semver/functions/clean.js
new file mode 100644
index 000000000..811fe6b82
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/clean.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const clean = (version, options) => {
+ const s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+module.exports = clean
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/cmp.js b/week-3/02-course-app-easy/node_modules/semver/functions/cmp.js
new file mode 100644
index 000000000..401190947
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/cmp.js
@@ -0,0 +1,52 @@
+const eq = require('./eq')
+const neq = require('./neq')
+const gt = require('./gt')
+const gte = require('./gte')
+const lt = require('./lt')
+const lte = require('./lte')
+
+const cmp = (a, op, b, loose) => {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError(`Invalid operator: ${op}`)
+ }
+}
+module.exports = cmp
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/coerce.js b/week-3/02-course-app-easy/node_modules/semver/functions/coerce.js
new file mode 100644
index 000000000..b378dcea4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/coerce.js
@@ -0,0 +1,60 @@
+const SemVer = require('../classes/semver')
+const parse = require('./parse')
+const { safeRe: re, t } = require('../internal/re')
+
+const coerce = (version, options) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version === 'number') {
+ version = String(version)
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ options = options || {}
+
+ let match = null
+ if (!options.rtl) {
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
+ let next
+ while ((next = coerceRtlRegex.exec(version)) &&
+ (!match || match.index + match[0].length !== version.length)
+ ) {
+ if (!match ||
+ next.index + next[0].length !== match.index + match[0].length) {
+ match = next
+ }
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
+ }
+ // leave it in a clean state
+ coerceRtlRegex.lastIndex = -1
+ }
+
+ if (match === null) {
+ return null
+ }
+
+ const major = match[2]
+ const minor = match[3] || '0'
+ const patch = match[4] || '0'
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
+
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
+}
+module.exports = coerce
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/compare-build.js b/week-3/02-course-app-easy/node_modules/semver/functions/compare-build.js
new file mode 100644
index 000000000..9eb881bef
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/compare-build.js
@@ -0,0 +1,7 @@
+const SemVer = require('../classes/semver')
+const compareBuild = (a, b, loose) => {
+ const versionA = new SemVer(a, loose)
+ const versionB = new SemVer(b, loose)
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
+}
+module.exports = compareBuild
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/compare-loose.js b/week-3/02-course-app-easy/node_modules/semver/functions/compare-loose.js
new file mode 100644
index 000000000..4881fbe00
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/compare-loose.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const compareLoose = (a, b) => compare(a, b, true)
+module.exports = compareLoose
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/compare.js b/week-3/02-course-app-easy/node_modules/semver/functions/compare.js
new file mode 100644
index 000000000..748b7afa5
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/compare.js
@@ -0,0 +1,5 @@
+const SemVer = require('../classes/semver')
+const compare = (a, b, loose) =>
+ new SemVer(a, loose).compare(new SemVer(b, loose))
+
+module.exports = compare
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/diff.js b/week-3/02-course-app-easy/node_modules/semver/functions/diff.js
new file mode 100644
index 000000000..fc224e302
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/diff.js
@@ -0,0 +1,65 @@
+const parse = require('./parse.js')
+
+const diff = (version1, version2) => {
+ const v1 = parse(version1, null, true)
+ const v2 = parse(version2, null, true)
+ const comparison = v1.compare(v2)
+
+ if (comparison === 0) {
+ return null
+ }
+
+ const v1Higher = comparison > 0
+ const highVersion = v1Higher ? v1 : v2
+ const lowVersion = v1Higher ? v2 : v1
+ const highHasPre = !!highVersion.prerelease.length
+ const lowHasPre = !!lowVersion.prerelease.length
+
+ if (lowHasPre && !highHasPre) {
+ // Going from prerelease -> no prerelease requires some special casing
+
+ // If the low version has only a major, then it will always be a major
+ // Some examples:
+ // 1.0.0-1 -> 1.0.0
+ // 1.0.0-1 -> 1.1.1
+ // 1.0.0-1 -> 2.0.0
+ if (!lowVersion.patch && !lowVersion.minor) {
+ return 'major'
+ }
+
+ // Otherwise it can be determined by checking the high version
+
+ if (highVersion.patch) {
+ // anything higher than a patch bump would result in the wrong version
+ return 'patch'
+ }
+
+ if (highVersion.minor) {
+ // anything higher than a minor bump would result in the wrong version
+ return 'minor'
+ }
+
+ // bumping major/minor/patch all have same result
+ return 'major'
+ }
+
+ // add the `pre` prefix if we are going to a prerelease version
+ const prefix = highHasPre ? 'pre' : ''
+
+ if (v1.major !== v2.major) {
+ return prefix + 'major'
+ }
+
+ if (v1.minor !== v2.minor) {
+ return prefix + 'minor'
+ }
+
+ if (v1.patch !== v2.patch) {
+ return prefix + 'patch'
+ }
+
+ // high and low are preleases
+ return 'prerelease'
+}
+
+module.exports = diff
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/eq.js b/week-3/02-course-app-easy/node_modules/semver/functions/eq.js
new file mode 100644
index 000000000..271fed976
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/eq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const eq = (a, b, loose) => compare(a, b, loose) === 0
+module.exports = eq
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/gt.js b/week-3/02-course-app-easy/node_modules/semver/functions/gt.js
new file mode 100644
index 000000000..d9b2156d8
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/gt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gt = (a, b, loose) => compare(a, b, loose) > 0
+module.exports = gt
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/gte.js b/week-3/02-course-app-easy/node_modules/semver/functions/gte.js
new file mode 100644
index 000000000..5aeaa6347
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/gte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gte = (a, b, loose) => compare(a, b, loose) >= 0
+module.exports = gte
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/inc.js b/week-3/02-course-app-easy/node_modules/semver/functions/inc.js
new file mode 100644
index 000000000..7670b1bea
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/inc.js
@@ -0,0 +1,19 @@
+const SemVer = require('../classes/semver')
+
+const inc = (version, release, options, identifier, identifierBase) => {
+ if (typeof (options) === 'string') {
+ identifierBase = identifier
+ identifier = options
+ options = undefined
+ }
+
+ try {
+ return new SemVer(
+ version instanceof SemVer ? version.version : version,
+ options
+ ).inc(release, identifier, identifierBase).version
+ } catch (er) {
+ return null
+ }
+}
+module.exports = inc
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/lt.js b/week-3/02-course-app-easy/node_modules/semver/functions/lt.js
new file mode 100644
index 000000000..b440ab7d4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/lt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lt = (a, b, loose) => compare(a, b, loose) < 0
+module.exports = lt
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/lte.js b/week-3/02-course-app-easy/node_modules/semver/functions/lte.js
new file mode 100644
index 000000000..6dcc95650
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/lte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lte = (a, b, loose) => compare(a, b, loose) <= 0
+module.exports = lte
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/major.js b/week-3/02-course-app-easy/node_modules/semver/functions/major.js
new file mode 100644
index 000000000..4283165e9
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/major.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const major = (a, loose) => new SemVer(a, loose).major
+module.exports = major
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/minor.js b/week-3/02-course-app-easy/node_modules/semver/functions/minor.js
new file mode 100644
index 000000000..57b3455f8
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/minor.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const minor = (a, loose) => new SemVer(a, loose).minor
+module.exports = minor
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/neq.js b/week-3/02-course-app-easy/node_modules/semver/functions/neq.js
new file mode 100644
index 000000000..f944c0157
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/neq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const neq = (a, b, loose) => compare(a, b, loose) !== 0
+module.exports = neq
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/parse.js b/week-3/02-course-app-easy/node_modules/semver/functions/parse.js
new file mode 100644
index 000000000..459b3b173
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/parse.js
@@ -0,0 +1,16 @@
+const SemVer = require('../classes/semver')
+const parse = (version, options, throwErrors = false) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ if (!throwErrors) {
+ return null
+ }
+ throw er
+ }
+}
+
+module.exports = parse
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/patch.js b/week-3/02-course-app-easy/node_modules/semver/functions/patch.js
new file mode 100644
index 000000000..63afca252
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/patch.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const patch = (a, loose) => new SemVer(a, loose).patch
+module.exports = patch
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/prerelease.js b/week-3/02-course-app-easy/node_modules/semver/functions/prerelease.js
new file mode 100644
index 000000000..06aa13248
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/prerelease.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const prerelease = (version, options) => {
+ const parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+module.exports = prerelease
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/rcompare.js b/week-3/02-course-app-easy/node_modules/semver/functions/rcompare.js
new file mode 100644
index 000000000..0ac509e79
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/rcompare.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const rcompare = (a, b, loose) => compare(b, a, loose)
+module.exports = rcompare
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/rsort.js b/week-3/02-course-app-easy/node_modules/semver/functions/rsort.js
new file mode 100644
index 000000000..82404c5cf
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/rsort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
+module.exports = rsort
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/satisfies.js b/week-3/02-course-app-easy/node_modules/semver/functions/satisfies.js
new file mode 100644
index 000000000..50af1c199
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/satisfies.js
@@ -0,0 +1,10 @@
+const Range = require('../classes/range')
+const satisfies = (version, range, options) => {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+module.exports = satisfies
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/sort.js b/week-3/02-course-app-easy/node_modules/semver/functions/sort.js
new file mode 100644
index 000000000..4d10917ab
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/sort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
+module.exports = sort
diff --git a/week-3/02-course-app-easy/node_modules/semver/functions/valid.js b/week-3/02-course-app-easy/node_modules/semver/functions/valid.js
new file mode 100644
index 000000000..f27bae107
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/functions/valid.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const valid = (version, options) => {
+ const v = parse(version, options)
+ return v ? v.version : null
+}
+module.exports = valid
diff --git a/week-3/02-course-app-easy/node_modules/semver/index.js b/week-3/02-course-app-easy/node_modules/semver/index.js
new file mode 100644
index 000000000..86d42ac16
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/index.js
@@ -0,0 +1,89 @@
+// just pre-load all the stuff that index.js lazily exports
+const internalRe = require('./internal/re')
+const constants = require('./internal/constants')
+const SemVer = require('./classes/semver')
+const identifiers = require('./internal/identifiers')
+const parse = require('./functions/parse')
+const valid = require('./functions/valid')
+const clean = require('./functions/clean')
+const inc = require('./functions/inc')
+const diff = require('./functions/diff')
+const major = require('./functions/major')
+const minor = require('./functions/minor')
+const patch = require('./functions/patch')
+const prerelease = require('./functions/prerelease')
+const compare = require('./functions/compare')
+const rcompare = require('./functions/rcompare')
+const compareLoose = require('./functions/compare-loose')
+const compareBuild = require('./functions/compare-build')
+const sort = require('./functions/sort')
+const rsort = require('./functions/rsort')
+const gt = require('./functions/gt')
+const lt = require('./functions/lt')
+const eq = require('./functions/eq')
+const neq = require('./functions/neq')
+const gte = require('./functions/gte')
+const lte = require('./functions/lte')
+const cmp = require('./functions/cmp')
+const coerce = require('./functions/coerce')
+const Comparator = require('./classes/comparator')
+const Range = require('./classes/range')
+const satisfies = require('./functions/satisfies')
+const toComparators = require('./ranges/to-comparators')
+const maxSatisfying = require('./ranges/max-satisfying')
+const minSatisfying = require('./ranges/min-satisfying')
+const minVersion = require('./ranges/min-version')
+const validRange = require('./ranges/valid')
+const outside = require('./ranges/outside')
+const gtr = require('./ranges/gtr')
+const ltr = require('./ranges/ltr')
+const intersects = require('./ranges/intersects')
+const simplifyRange = require('./ranges/simplify')
+const subset = require('./ranges/subset')
+module.exports = {
+ parse,
+ valid,
+ clean,
+ inc,
+ diff,
+ major,
+ minor,
+ patch,
+ prerelease,
+ compare,
+ rcompare,
+ compareLoose,
+ compareBuild,
+ sort,
+ rsort,
+ gt,
+ lt,
+ eq,
+ neq,
+ gte,
+ lte,
+ cmp,
+ coerce,
+ Comparator,
+ Range,
+ satisfies,
+ toComparators,
+ maxSatisfying,
+ minSatisfying,
+ minVersion,
+ validRange,
+ outside,
+ gtr,
+ ltr,
+ intersects,
+ simplifyRange,
+ subset,
+ SemVer,
+ re: internalRe.re,
+ src: internalRe.src,
+ tokens: internalRe.t,
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
+ RELEASE_TYPES: constants.RELEASE_TYPES,
+ compareIdentifiers: identifiers.compareIdentifiers,
+ rcompareIdentifiers: identifiers.rcompareIdentifiers,
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/internal/constants.js b/week-3/02-course-app-easy/node_modules/semver/internal/constants.js
new file mode 100644
index 000000000..94be1c570
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/internal/constants.js
@@ -0,0 +1,35 @@
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+const SEMVER_SPEC_VERSION = '2.0.0'
+
+const MAX_LENGTH = 256
+const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+/* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+const MAX_SAFE_COMPONENT_LENGTH = 16
+
+// Max safe length for a build identifier. The max length minus 6 characters for
+// the shortest version with a build 0.0.0+BUILD.
+const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
+
+const RELEASE_TYPES = [
+ 'major',
+ 'premajor',
+ 'minor',
+ 'preminor',
+ 'patch',
+ 'prepatch',
+ 'prerelease',
+]
+
+module.exports = {
+ MAX_LENGTH,
+ MAX_SAFE_COMPONENT_LENGTH,
+ MAX_SAFE_BUILD_LENGTH,
+ MAX_SAFE_INTEGER,
+ RELEASE_TYPES,
+ SEMVER_SPEC_VERSION,
+ FLAG_INCLUDE_PRERELEASE: 0b001,
+ FLAG_LOOSE: 0b010,
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/internal/debug.js b/week-3/02-course-app-easy/node_modules/semver/internal/debug.js
new file mode 100644
index 000000000..1c00e1369
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/internal/debug.js
@@ -0,0 +1,9 @@
+const debug = (
+ typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)
+) ? (...args) => console.error('SEMVER', ...args)
+ : () => {}
+
+module.exports = debug
diff --git a/week-3/02-course-app-easy/node_modules/semver/internal/identifiers.js b/week-3/02-course-app-easy/node_modules/semver/internal/identifiers.js
new file mode 100644
index 000000000..e612d0a3d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/internal/identifiers.js
@@ -0,0 +1,23 @@
+const numeric = /^[0-9]+$/
+const compareIdentifiers = (a, b) => {
+ const anum = numeric.test(a)
+ const bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
+
+module.exports = {
+ compareIdentifiers,
+ rcompareIdentifiers,
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/internal/lrucache.js b/week-3/02-course-app-easy/node_modules/semver/internal/lrucache.js
new file mode 100644
index 000000000..6d89ec948
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/internal/lrucache.js
@@ -0,0 +1,40 @@
+class LRUCache {
+ constructor () {
+ this.max = 1000
+ this.map = new Map()
+ }
+
+ get (key) {
+ const value = this.map.get(key)
+ if (value === undefined) {
+ return undefined
+ } else {
+ // Remove the key from the map and add it to the end
+ this.map.delete(key)
+ this.map.set(key, value)
+ return value
+ }
+ }
+
+ delete (key) {
+ return this.map.delete(key)
+ }
+
+ set (key, value) {
+ const deleted = this.delete(key)
+
+ if (!deleted && value !== undefined) {
+ // If cache is full, delete the least recently used item
+ if (this.map.size >= this.max) {
+ const firstKey = this.map.keys().next().value
+ this.delete(firstKey)
+ }
+
+ this.map.set(key, value)
+ }
+
+ return this
+ }
+}
+
+module.exports = LRUCache
diff --git a/week-3/02-course-app-easy/node_modules/semver/internal/parse-options.js b/week-3/02-course-app-easy/node_modules/semver/internal/parse-options.js
new file mode 100644
index 000000000..10d64ce06
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/internal/parse-options.js
@@ -0,0 +1,15 @@
+// parse out just the options we care about
+const looseOption = Object.freeze({ loose: true })
+const emptyOpts = Object.freeze({ })
+const parseOptions = options => {
+ if (!options) {
+ return emptyOpts
+ }
+
+ if (typeof options !== 'object') {
+ return looseOption
+ }
+
+ return options
+}
+module.exports = parseOptions
diff --git a/week-3/02-course-app-easy/node_modules/semver/internal/re.js b/week-3/02-course-app-easy/node_modules/semver/internal/re.js
new file mode 100644
index 000000000..fd8920e7b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/internal/re.js
@@ -0,0 +1,217 @@
+const {
+ MAX_SAFE_COMPONENT_LENGTH,
+ MAX_SAFE_BUILD_LENGTH,
+ MAX_LENGTH,
+} = require('./constants')
+const debug = require('./debug')
+exports = module.exports = {}
+
+// The actual regexps go on exports.re
+const re = exports.re = []
+const safeRe = exports.safeRe = []
+const src = exports.src = []
+const t = exports.t = {}
+let R = 0
+
+const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
+
+// Replace some greedy regex tokens to prevent regex dos issues. These regex are
+// used internally via the safeRe object since all inputs in this library get
+// normalized first to trim and collapse all extra whitespace. The original
+// regexes are exported for userland consumption and lower level usage. A
+// future breaking change could export the safer regex only with a note that
+// all input should have extra whitespace removed.
+const safeRegexReplacements = [
+ ['\\s', 1],
+ ['\\d', MAX_LENGTH],
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
+]
+
+const makeSafeRegex = (value) => {
+ for (const [token, max] of safeRegexReplacements) {
+ value = value
+ .split(`${token}*`).join(`${token}{0,${max}}`)
+ .split(`${token}+`).join(`${token}{1,${max}}`)
+ }
+ return value
+}
+
+const createToken = (name, value, isGlobal) => {
+ const safe = makeSafeRegex(value)
+ const index = R++
+ debug(name, index, value)
+ t[name] = index
+ src[index] = value
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
+ safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
+}
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
+createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})`)
+
+createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
+}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
+
+createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
+}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
+}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
+}${src[t.PRERELEASE]}?${
+ src[t.BUILD]}?`)
+
+createToken('FULL', `^${src[t.FULLPLAIN]}$`)
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
+}${src[t.PRERELEASELOOSE]}?${
+ src[t.BUILD]}?`)
+
+createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
+
+createToken('GTLT', '((?:<|>)?=?)')
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
+createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
+
+createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:${src[t.PRERELEASE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:${src[t.PRERELEASELOOSE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
+createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+createToken('COERCEPLAIN', `${'(^|[^\\d])' +
+ '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
+createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
+createToken('COERCEFULL', src[t.COERCEPLAIN] +
+ `(?:${src[t.PRERELEASE]})?` +
+ `(?:${src[t.BUILD]})?` +
+ `(?:$|[^\\d])`)
+createToken('COERCERTL', src[t.COERCE], true)
+createToken('COERCERTLFULL', src[t.COERCEFULL], true)
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+createToken('LONETILDE', '(?:~>?)')
+
+createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
+exports.tildeTrimReplace = '$1~'
+
+createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
+createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+createToken('LONECARET', '(?:\\^)')
+
+createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
+exports.caretTrimReplace = '$1^'
+
+createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
+createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
+createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
+}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
+exports.comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAIN]})` +
+ `\\s*$`)
+
+createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s*$`)
+
+// Star ranges basically just allow anything at all.
+createToken('STAR', '(<|>)?=?\\s*\\*')
+// >=0.0.0 is like a star
+createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
+createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
diff --git a/week-3/02-course-app-easy/node_modules/semver/package.json b/week-3/02-course-app-easy/node_modules/semver/package.json
new file mode 100644
index 000000000..cb8def451
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/package.json
@@ -0,0 +1,77 @@
+{
+ "name": "semver",
+ "version": "7.6.2",
+ "description": "The semantic version parser used by npm.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run lint -- --fix",
+ "posttest": "npm run lint",
+ "template-oss-apply": "template-oss-apply --force"
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^4.0.0",
+ "@npmcli/template-oss": "4.22.0",
+ "benchmark": "^2.1.4",
+ "tap": "^16.0.0"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "files": [
+ "bin/",
+ "lib/",
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "tap": {
+ "timeout": 30,
+ "coverage-map": "map.js",
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "4.22.0",
+ "engines": ">=10",
+ "distPaths": [
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "allowPaths": [
+ "/classes/",
+ "/functions/",
+ "/internal/",
+ "/ranges/",
+ "/index.js",
+ "/preload.js",
+ "/range.bnf",
+ "/benchmarks"
+ ],
+ "publish": "true"
+ }
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/preload.js b/week-3/02-course-app-easy/node_modules/semver/preload.js
new file mode 100644
index 000000000..947cd4f79
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/preload.js
@@ -0,0 +1,2 @@
+// XXX remove in v8 or beyond
+module.exports = require('./index.js')
diff --git a/week-3/02-course-app-easy/node_modules/semver/range.bnf b/week-3/02-course-app-easy/node_modules/semver/range.bnf
new file mode 100644
index 000000000..d4c6ae0d7
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/gtr.js b/week-3/02-course-app-easy/node_modules/semver/ranges/gtr.js
new file mode 100644
index 000000000..db7e35599
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/gtr.js
@@ -0,0 +1,4 @@
+// Determine if version is greater than all the versions possible in the range.
+const outside = require('./outside')
+const gtr = (version, range, options) => outside(version, range, '>', options)
+module.exports = gtr
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/intersects.js b/week-3/02-course-app-easy/node_modules/semver/ranges/intersects.js
new file mode 100644
index 000000000..e0e9b7ce0
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/intersects.js
@@ -0,0 +1,7 @@
+const Range = require('../classes/range')
+const intersects = (r1, r2, options) => {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2, options)
+}
+module.exports = intersects
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/ltr.js b/week-3/02-course-app-easy/node_modules/semver/ranges/ltr.js
new file mode 100644
index 000000000..528a885eb
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/ltr.js
@@ -0,0 +1,4 @@
+const outside = require('./outside')
+// Determine if version is less than all the versions possible in the range
+const ltr = (version, range, options) => outside(version, range, '<', options)
+module.exports = ltr
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/max-satisfying.js b/week-3/02-course-app-easy/node_modules/semver/ranges/max-satisfying.js
new file mode 100644
index 000000000..6e3d993c6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/max-satisfying.js
@@ -0,0 +1,25 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+
+const maxSatisfying = (versions, range, options) => {
+ let max = null
+ let maxSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+module.exports = maxSatisfying
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/min-satisfying.js b/week-3/02-course-app-easy/node_modules/semver/ranges/min-satisfying.js
new file mode 100644
index 000000000..9b60974e2
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/min-satisfying.js
@@ -0,0 +1,24 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const minSatisfying = (versions, range, options) => {
+ let min = null
+ let minSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+module.exports = minSatisfying
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/min-version.js b/week-3/02-course-app-easy/node_modules/semver/ranges/min-version.js
new file mode 100644
index 000000000..350e1f783
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/min-version.js
@@ -0,0 +1,61 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const gt = require('../functions/gt')
+
+const minVersion = (range, loose) => {
+ range = new Range(range, loose)
+
+ let minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let setMin = null
+ comparators.forEach((comparator) => {
+ // Clone to avoid manipulating the comparator's semver object.
+ const compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!setMin || gt(compver, setMin)) {
+ setMin = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected operation: ${comparator.operator}`)
+ }
+ })
+ if (setMin && (!minver || gt(minver, setMin))) {
+ minver = setMin
+ }
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+module.exports = minVersion
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/outside.js b/week-3/02-course-app-easy/node_modules/semver/ranges/outside.js
new file mode 100644
index 000000000..ae99b10a5
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/outside.js
@@ -0,0 +1,80 @@
+const SemVer = require('../classes/semver')
+const Comparator = require('../classes/comparator')
+const { ANY } = Comparator
+const Range = require('../classes/range')
+const satisfies = require('../functions/satisfies')
+const gt = require('../functions/gt')
+const lt = require('../functions/lt')
+const lte = require('../functions/lte')
+const gte = require('../functions/gte')
+
+const outside = (version, range, hilo, options) => {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ let gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisfies the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let high = null
+ let low = null
+
+ comparators.forEach((comparator) => {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+module.exports = outside
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/simplify.js b/week-3/02-course-app-easy/node_modules/semver/ranges/simplify.js
new file mode 100644
index 000000000..618d5b627
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/simplify.js
@@ -0,0 +1,47 @@
+// given a set of versions and a range, create a "simplified" range
+// that includes the same versions that the original range does
+// If the original range is shorter than the simplified one, return that.
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+module.exports = (versions, range, options) => {
+ const set = []
+ let first = null
+ let prev = null
+ const v = versions.sort((a, b) => compare(a, b, options))
+ for (const version of v) {
+ const included = satisfies(version, range, options)
+ if (included) {
+ prev = version
+ if (!first) {
+ first = version
+ }
+ } else {
+ if (prev) {
+ set.push([first, prev])
+ }
+ prev = null
+ first = null
+ }
+ }
+ if (first) {
+ set.push([first, null])
+ }
+
+ const ranges = []
+ for (const [min, max] of set) {
+ if (min === max) {
+ ranges.push(min)
+ } else if (!max && min === v[0]) {
+ ranges.push('*')
+ } else if (!max) {
+ ranges.push(`>=${min}`)
+ } else if (min === v[0]) {
+ ranges.push(`<=${max}`)
+ } else {
+ ranges.push(`${min} - ${max}`)
+ }
+ }
+ const simplified = ranges.join(' || ')
+ const original = typeof range.raw === 'string' ? range.raw : String(range)
+ return simplified.length < original.length ? simplified : range
+}
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/subset.js b/week-3/02-course-app-easy/node_modules/semver/ranges/subset.js
new file mode 100644
index 000000000..1e5c26837
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/subset.js
@@ -0,0 +1,247 @@
+const Range = require('../classes/range.js')
+const Comparator = require('../classes/comparator.js')
+const { ANY } = Comparator
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+
+// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
+// - Every simple range `r1, r2, ...` is a null set, OR
+// - Every simple range `r1, r2, ...` which is not a null set is a subset of
+// some `R1, R2, ...`
+//
+// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
+// - If c is only the ANY comparator
+// - If C is only the ANY comparator, return true
+// - Else if in prerelease mode, return false
+// - else replace c with `[>=0.0.0]`
+// - If C is only the ANY comparator
+// - if in prerelease mode, return true
+// - else replace C with `[>=0.0.0]`
+// - Let EQ be the set of = comparators in c
+// - If EQ is more than one, return true (null set)
+// - Let GT be the highest > or >= comparator in c
+// - Let LT be the lowest < or <= comparator in c
+// - If GT and LT, and GT.semver > LT.semver, return true (null set)
+// - If any C is a = range, and GT or LT are set, return false
+// - If EQ
+// - If GT, and EQ does not satisfy GT, return true (null set)
+// - If LT, and EQ does not satisfy LT, return true (null set)
+// - If EQ satisfies every C, return true
+// - Else return false
+// - If GT
+// - If GT.semver is lower than any > or >= comp in C, return false
+// - If GT is >=, and GT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the GT.semver tuple, return false
+// - If LT
+// - If LT.semver is greater than any < or <= comp in C, return false
+// - If LT is <=, and LT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the LT.semver tuple, return false
+// - Else return true
+
+const subset = (sub, dom, options = {}) => {
+ if (sub === dom) {
+ return true
+ }
+
+ sub = new Range(sub, options)
+ dom = new Range(dom, options)
+ let sawNonNull = false
+
+ OUTER: for (const simpleSub of sub.set) {
+ for (const simpleDom of dom.set) {
+ const isSub = simpleSubset(simpleSub, simpleDom, options)
+ sawNonNull = sawNonNull || isSub !== null
+ if (isSub) {
+ continue OUTER
+ }
+ }
+ // the null set is a subset of everything, but null simple ranges in
+ // a complex range should be ignored. so if we saw a non-null range,
+ // then we know this isn't a subset, but if EVERY simple range was null,
+ // then it is a subset.
+ if (sawNonNull) {
+ return false
+ }
+ }
+ return true
+}
+
+const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
+const minimumVersion = [new Comparator('>=0.0.0')]
+
+const simpleSubset = (sub, dom, options) => {
+ if (sub === dom) {
+ return true
+ }
+
+ if (sub.length === 1 && sub[0].semver === ANY) {
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ return true
+ } else if (options.includePrerelease) {
+ sub = minimumVersionWithPreRelease
+ } else {
+ sub = minimumVersion
+ }
+ }
+
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ if (options.includePrerelease) {
+ return true
+ } else {
+ dom = minimumVersion
+ }
+ }
+
+ const eqSet = new Set()
+ let gt, lt
+ for (const c of sub) {
+ if (c.operator === '>' || c.operator === '>=') {
+ gt = higherGT(gt, c, options)
+ } else if (c.operator === '<' || c.operator === '<=') {
+ lt = lowerLT(lt, c, options)
+ } else {
+ eqSet.add(c.semver)
+ }
+ }
+
+ if (eqSet.size > 1) {
+ return null
+ }
+
+ let gtltComp
+ if (gt && lt) {
+ gtltComp = compare(gt.semver, lt.semver, options)
+ if (gtltComp > 0) {
+ return null
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
+ return null
+ }
+ }
+
+ // will iterate one or zero times
+ for (const eq of eqSet) {
+ if (gt && !satisfies(eq, String(gt), options)) {
+ return null
+ }
+
+ if (lt && !satisfies(eq, String(lt), options)) {
+ return null
+ }
+
+ for (const c of dom) {
+ if (!satisfies(eq, String(c), options)) {
+ return false
+ }
+ }
+
+ return true
+ }
+
+ let higher, lower
+ let hasDomLT, hasDomGT
+ // if the subset has a prerelease, we need a comparator in the superset
+ // with the same tuple and a prerelease, or it's not a subset
+ let needDomLTPre = lt &&
+ !options.includePrerelease &&
+ lt.semver.prerelease.length ? lt.semver : false
+ let needDomGTPre = gt &&
+ !options.includePrerelease &&
+ gt.semver.prerelease.length ? gt.semver : false
+ // exception: <1.2.3-0 is the same as <1.2.3
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
+ lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
+ needDomLTPre = false
+ }
+
+ for (const c of dom) {
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
+ if (gt) {
+ if (needDomGTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomGTPre.major &&
+ c.semver.minor === needDomGTPre.minor &&
+ c.semver.patch === needDomGTPre.patch) {
+ needDomGTPre = false
+ }
+ }
+ if (c.operator === '>' || c.operator === '>=') {
+ higher = higherGT(gt, c, options)
+ if (higher === c && higher !== gt) {
+ return false
+ }
+ } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (lt) {
+ if (needDomLTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomLTPre.major &&
+ c.semver.minor === needDomLTPre.minor &&
+ c.semver.patch === needDomLTPre.patch) {
+ needDomLTPre = false
+ }
+ }
+ if (c.operator === '<' || c.operator === '<=') {
+ lower = lowerLT(lt, c, options)
+ if (lower === c && lower !== lt) {
+ return false
+ }
+ } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
+ return false
+ }
+ }
+
+ // if there was a < or >, and nothing in the dom, then must be false
+ // UNLESS it was limited by another range in the other direction.
+ // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
+ return false
+ }
+
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
+ return false
+ }
+
+ // we needed a prerelease range in a specific tuple, but didn't get one
+ // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
+ // because it includes prereleases in the 1.2.3 tuple
+ if (needDomGTPre || needDomLTPre) {
+ return false
+ }
+
+ return true
+}
+
+// >=1.2.3 is lower than >1.2.3
+const higherGT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp > 0 ? a
+ : comp < 0 ? b
+ : b.operator === '>' && a.operator === '>=' ? b
+ : a
+}
+
+// <=1.2.3 is higher than <1.2.3
+const lowerLT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp < 0 ? a
+ : comp > 0 ? b
+ : b.operator === '<' && a.operator === '<=' ? b
+ : a
+}
+
+module.exports = subset
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/to-comparators.js b/week-3/02-course-app-easy/node_modules/semver/ranges/to-comparators.js
new file mode 100644
index 000000000..6c8bc7e6f
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/to-comparators.js
@@ -0,0 +1,8 @@
+const Range = require('../classes/range')
+
+// Mostly just for testing and legacy API reasons
+const toComparators = (range, options) =>
+ new Range(range, options).set
+ .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
+
+module.exports = toComparators
diff --git a/week-3/02-course-app-easy/node_modules/semver/ranges/valid.js b/week-3/02-course-app-easy/node_modules/semver/ranges/valid.js
new file mode 100644
index 000000000..365f35689
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/semver/ranges/valid.js
@@ -0,0 +1,11 @@
+const Range = require('../classes/range')
+const validRange = (range, options) => {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+module.exports = validRange
diff --git a/week-3/02-course-app-easy/node_modules/uuid/CHANGELOG.md b/week-3/02-course-app-easy/node_modules/uuid/CHANGELOG.md
new file mode 100644
index 000000000..f0ba9e1ba
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/CHANGELOG.md
@@ -0,0 +1,292 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [10.0.0](https://github.com/uuidjs/uuid/compare/v9.0.0...v10.0.0) (2024-06-07)
+
+### ⚠ BREAKING CHANGES
+
+- update node support (drop node@12, node@14, add node@20) (#750)
+
+### Features
+
+- support support rfc9562 MAX uuid (new in RFC9562) ([#714](https://github.com/uuidjs/uuid/issues/714)) ([0385cd3](https://github.com/uuidjs/uuid/commit/0385cd3f18ae9920678b2849932fa7a9d9aee7d0))
+- support rfc9562 v6 uuids ([#754](https://github.com/uuidjs/uuid/issues/754)) ([c4ed13e](https://github.com/uuidjs/uuid/commit/c4ed13e7159d87c9e42a349bdd9dc955f1af46b6))
+- support rfc9562 v7 uuids ([#681](https://github.com/uuidjs/uuid/issues/681)) ([db76a12](https://github.com/uuidjs/uuid/commit/db76a1284760c441438f50a57924b322dae08891))
+- update node support matrix (only support node 16-20) ([#750](https://github.com/uuidjs/uuid/issues/750)) ([883b163](https://github.com/uuidjs/uuid/commit/883b163b9ab9d6655bfbd8a35e61a3c71674dfe1))
+- support rfc9562 v8 uuids ([#759](https://github.com/uuidjs/uuid/issues/759)) ([35a5342](https://github.com/uuidjs/uuid/commit/35a53428202657e402e6b4aa68f56c08194541bf))
+
+### Bug Fixes
+
+- revert "perf: remove superfluous call to toLowerCase ([#677](https://github.com/uuidjs/uuid/issues/677))" ([#738](https://github.com/uuidjs/uuid/issues/738)) ([e267b90](https://github.com/uuidjs/uuid/commit/e267b9073df1d0ce119ee53c0487fe76acb2be37))
+
+## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12)
+
+### build
+
+- Fix CI to work with Node.js 20.x
+
+## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05)
+
+### ⚠ BREAKING CHANGES
+
+- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022.
+
+- Remove the minified UMD build from the package.
+
+ Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays.
+
+ For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished.
+
+- Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015.
+
+ This also removes the fallback on msCrypto instead of the crypto API.
+
+ Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack.
+
+### Features
+
+- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc))
+- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620)
+- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4))
+
+### Bug Fixes
+
+- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd))
+- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a))
+- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091))
+- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353))
+- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6))
+
+### build
+
+- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5))
+- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148))
+
+- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643)
+
+### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08)
+
+### Bug Fixes
+
+- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536)
+
+### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04)
+
+### Bug Fixes
+
+- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375)
+
+## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27)
+
+### Features
+
+- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180)
+
+## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23)
+
+### Features
+
+- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5))
+- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437)
+- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659))
+
+### Bug Fixes
+
+- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8))
+
+## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20)
+
+### Features
+
+- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d))
+- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2))
+
+### Bug Fixes
+
+- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444)
+
+## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29)
+
+### ⚠ BREAKING CHANGES
+
+- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export.
+
+ ```diff
+ -import uuid from 'uuid';
+ -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869'
+ +import { v4 as uuidv4 } from 'uuid';
+ +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
+ ```
+
+- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported.
+
+ Instead use the named exports that this module exports.
+
+ For ECMAScript Modules (ESM):
+
+ ```diff
+ -import uuidv4 from 'uuid/v4';
+ +import { v4 as uuidv4 } from 'uuid';
+ uuidv4();
+ ```
+
+ For CommonJS:
+
+ ```diff
+ -const uuidv4 = require('uuid/v4');
+ +const { v4: uuidv4 } = require('uuid');
+ uuidv4();
+ ```
+
+### Features
+
+- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342)
+- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba))
+
+### Bug Fixes
+
+- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0))
+
+### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31)
+
+### Bug Fixes
+
+- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408)
+
+### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04)
+
+### Bug Fixes
+
+- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c))
+- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7))
+- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4))
+
+### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25)
+
+### Bug Fixes
+
+- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc))
+- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378)
+
+## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24)
+
+### ⚠ BREAKING CHANGES
+
+- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed.
+- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants.
+- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function.
+- Remove support for generating v3 and v5 UUIDs in Node.js<4.x
+- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers.
+
+### Features
+
+- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345)
+- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555))
+- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b))
+- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0))
+- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173)
+- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627))
+- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
+
+### Bug Fixes
+
+- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48))
+- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370)
+- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23))
+
+## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16)
+
+### Features
+
+- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
+
+## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19)
+
+### Bug Fixes
+
+- no longer run ci tests on node v4
+- upgrade dependencies
+
+## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
+
+### Bug Fixes
+
+- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877))
+
+## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
+
+### Bug Fixes
+
+- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2))
+
+# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
+
+### Bug Fixes
+
+- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc))
+- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4))
+- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331))
+- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c))
+
+### Features
+
+- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182))
+
+## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
+
+### Bug Fixes
+
+- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
+
+# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
+
+### Bug Fixes
+
+- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824))
+- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
+
+### Features
+
+- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))
+
+# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
+
+### Bug Fixes
+
+- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183)
+- Fix typo (#178)
+- Simple typo fix (#165)
+
+### Features
+
+- v5 support in CLI (#197)
+- V5 support (#188)
+
+# 3.0.1 (2016-11-28)
+
+- split uuid versions into separate files
+
+# 3.0.0 (2016-11-17)
+
+- remove .parse and .unparse
+
+# 2.0.0
+
+- Removed uuid.BufferClass
+
+# 1.4.0
+
+- Improved module context detection
+- Removed public RNG functions
+
+# 1.3.2
+
+- Improve tests and handling of v1() options (Issue #24)
+- Expose RNG option to allow for perf testing with different generators
+
+# 1.3.0
+
+- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
+- Support for node.js crypto API
+- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/week-3/02-course-app-easy/node_modules/uuid/CONTRIBUTING.md b/week-3/02-course-app-easy/node_modules/uuid/CONTRIBUTING.md
new file mode 100644
index 000000000..4a4503d02
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/CONTRIBUTING.md
@@ -0,0 +1,18 @@
+# Contributing
+
+Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library!
+
+## Testing
+
+```shell
+npm test
+```
+
+## Releasing
+
+Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version):
+
+```shell
+npm run release -- --dry-run # verify output manually
+npm run release # follow the instructions from the output of this command
+```
diff --git a/week-3/02-course-app-easy/node_modules/uuid/LICENSE.md b/week-3/02-course-app-easy/node_modules/uuid/LICENSE.md
new file mode 100644
index 000000000..393416836
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/LICENSE.md
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (c) 2010-2020 Robert Kieffer and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/02-course-app-easy/node_modules/uuid/README.md b/week-3/02-course-app-easy/node_modules/uuid/README.md
new file mode 100644
index 000000000..b9079b699
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/README.md
@@ -0,0 +1,584 @@
+
+
+
+# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)
+
+For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formally [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs
+
+- **Complete** - Support for all RFC9562 (nee RFC4122) UUID versions
+- **Cross-platform** - Support for ...
+ - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
+ - NodeJS 16+ ([LTS releases](https://github.com/nodejs/Release))
+ - Chrome, Safari, Firefox, Edge browsers
+ - Webpack and rollup.js module bundlers
+ - [React Native / Expo](#react-native--expo)
+- **Secure** - Cryptographically-strong random values
+- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
+- **CLI** - Includes the [`uuid` command line](#command-line) utility
+
+
+> [!NOTE]
+> Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
+
+
+> [!NOTE]
+> Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library.
+
+## Quickstart
+
+To create a random UUID...
+
+**1. Install**
+
+```shell
+npm install uuid
+```
+
+**2. Create a UUID** (ES6 module syntax)
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
+```
+
+... or using CommonJS syntax:
+
+```javascript
+const { v4: uuidv4 } = require('uuid');
+uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+```
+
+For timestamp UUIDs, namespace UUIDs, and other options read on ...
+
+## API Summary
+
+| | | |
+| --- | --- | --- |
+| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` |
+| [`uuid.MAX`](#uuidmax) | The max UUID string (all ones) | New in `uuid@9.1` |
+| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` |
+| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` |
+| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | |
+| [`uuid.v1ToV6()`](#uuidv1tov6uuid) | Create a version 6 UUID from a version 1 UUID | New in `uuid@10` |
+| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | |
+| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | |
+| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | |
+| [`uuid.v6()`](#uuidv6options-buffer-offset) | Create a version 6 (timestamp, reordered) UUID | New in `uuid@10` |
+| [`uuid.v6ToV1()`](#uuidv6tov1uuid) | Create a version 1 UUID from a version 6 UUID | New in `uuid@10` |
+| [`uuid.v7()`](#uuidv7options-buffer-offset) | Create a version 7 (Unix Epoch time-based) UUID | New in `uuid@10` |
+| ~~[`uuid.v8()`](#uuidv8)~~ | "Intentionally left blank" | |
+| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` |
+| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` |
+
+## API
+
+### uuid.NIL
+
+The nil UUID string (all zeros).
+
+Example:
+
+```javascript
+import { NIL as NIL_UUID } from 'uuid';
+
+NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000'
+```
+
+### uuid.MAX
+
+The max UUID string (all ones).
+
+Example:
+
+```javascript
+import { MAX as MAX_UUID } from 'uuid';
+
+MAX_UUID; // ⇨ 'ffffffff-ffff-ffff-ffff-ffffffffffff'
+```
+
+### uuid.parse(str)
+
+Convert UUID string to array of bytes
+
+| | |
+| --------- | ---------------------------------------- |
+| `str` | A valid UUID `String` |
+| _returns_ | `Uint8Array[16]` |
+| _throws_ | `TypeError` if `str` is not a valid UUID |
+
+
+> [!NOTE]
+> Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below.
+
+Example:
+
+```javascript
+import { parse as uuidParse } from 'uuid';
+
+// Parse a UUID
+const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b');
+
+// Convert to hex strings to show byte order (for documentation purposes)
+[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨
+ // [
+ // '6e', 'c0', 'bd', '7f',
+ // '11', 'c0', '43', 'da',
+ // '97', '5e', '2a', '8a',
+ // 'd9', 'eb', 'ae', '0b'
+ // ]
+```
+
+### uuid.stringify(arr[, offset])
+
+Convert array of bytes to UUID string
+
+| | |
+| -------------- | ---------------------------------------------------------------------------- |
+| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. |
+| [`offset` = 0] | `Number` Starting index in the Array |
+| _returns_ | `String` |
+| _throws_ | `TypeError` if a valid UUID string cannot be generated |
+
+
+> [!NOTE]
+> Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below.
+
+Example:
+
+```javascript
+import { stringify as uuidStringify } from 'uuid';
+
+const uuidBytes = [
+ 0x6e, 0xc0, 0xbd, 0x7f, 0x11, 0xc0, 0x43, 0xda, 0x97, 0x5e, 0x2a, 0x8a, 0xd9, 0xeb, 0xae, 0x0b,
+];
+
+uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'
+```
+
+### uuid.v1([options[, buffer[, offset]]])
+
+Create an RFC version 1 (timestamp) UUID
+
+| | |
+| --- | --- |
+| [`options`] | `Object` with one or more of the following properties: |
+| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) |
+| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff |
+| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
+| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) |
+| [`options.random`] | `Array` of 16 random bytes (0-255) |
+| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
+| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
+| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
+| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
+| _throws_ | `Error` if more than 10M UUIDs/sec are requested |
+
+
+> [!NOTE]
+> The default [node id](https://datatracker.ietf.org/doc/html/rfc9562#section-5.1) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
+
+
+> [!NOTE]
+> `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields.
+
+Example:
+
+```javascript
+import { v1 as uuidv1 } from 'uuid';
+
+uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d'
+```
+
+Example using `options`:
+
+```javascript
+import { v1 as uuidv1 } from 'uuid';
+
+const options = {
+ node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+ clockseq: 0x1234,
+ msecs: new Date('2011-11-01').getTime(),
+ nsecs: 5678,
+};
+uuidv1(options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab'
+```
+
+### uuid.v1ToV6(uuid)
+
+Convert a UUID from version 1 to version 6
+
+```javascript
+import { v1ToV6 } from 'uuid';
+
+v1ToV6('92f62d9e-22c4-11ef-97e9-325096b39f47'); // ⇨ '1ef22c49-2f62-6d9e-97e9-325096b39f47'
+```
+
+### uuid.v3(name, namespace[, buffer[, offset]])
+
+Create an RFC version 3 (namespace w/ MD5) UUID
+
+API is identical to `v5()`, but uses "v3" instead.
+
+
+> [!IMPORTANT]
+> Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_."
+
+### uuid.v4([options[, buffer[, offset]]])
+
+Create an RFC version 4 (random) UUID
+
+| | |
+| --- | --- |
+| [`options`] | `Object` with one or more of the following properties: |
+| [`options.random`] | `Array` of 16 random bytes (0-255) |
+| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
+| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
+| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
+| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
+
+Example:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+
+uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+```
+
+Example using predefined `random` values:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+
+const v4options = {
+ random: [
+ 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36,
+ ],
+};
+uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836'
+```
+
+### uuid.v5(name, namespace[, buffer[, offset]])
+
+Create an RFC version 5 (namespace w/ SHA-1) UUID
+
+| | |
+| --- | --- |
+| `name` | `String \| Array` |
+| `namespace` | `String \| Array[16]` Namespace UUID |
+| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
+| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
+| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
+
+
+> [!NOTE]
+> The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`.
+
+Example with custom namespace:
+
+```javascript
+import { v5 as uuidv5 } from 'uuid';
+
+// Define a custom namespace. Readers, create your own using something like
+// https://www.uuidgenerator.net/
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+
+uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681'
+```
+
+Example with RFC `URL` namespace:
+
+```javascript
+import { v5 as uuidv5 } from 'uuid';
+
+uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1'
+```
+
+### uuid.v6([options[, buffer[, offset]]])
+
+Create an RFC version 6 (timestamp, reordered) UUID
+
+This method takes the same arguments as uuid.v1().
+
+```javascript
+import { v6 as uuidv6 } from 'uuid';
+
+uuidv6(); // ⇨ '1e940672-c5ea-64c0-8bad-9b1deb4d3b7d'
+```
+
+Example using `options`:
+
+```javascript
+import { v6 as uuidv6 } from 'uuid';
+
+const options = {
+ node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+ clockseq: 0x1234,
+ msecs: new Date('2011-11-01').getTime(),
+ nsecs: 5678,
+};
+uuidv6(options); // ⇨ '1e1041c7-10b9-662e-9234-0123456789ab'
+```
+
+### uuid.v6ToV1(uuid)
+
+Convert a UUID from version 6 to version 1
+
+```javascript
+import { v6ToV1 } from 'uuid';
+
+v6ToV1('1ef22c49-2f62-6d9e-97e9-325096b39f47'); // ⇨ '92f62d9e-22c4-11ef-97e9-325096b39f47'
+```
+
+### uuid.v7([options[, buffer[, offset]]])
+
+Create an RFC version 7 (random) UUID
+
+| | |
+| --- | --- |
+| [`options`] | `Object` with one or more of the following properties: |
+| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
+| [`options.random`] | `Array` of 16 random bytes (0-255) |
+| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
+| [`options.seq`] | 31 bit monotonic sequence counter as `Number` between 0 - 0x7fffffff |
+| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
+| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
+| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
+
+Example:
+
+```javascript
+import { v7 as uuidv7 } from 'uuid';
+
+uuidv7(); // ⇨ '01695553-c90c-722d-9b5d-b38dfbbd4bed'
+```
+
+### ~~uuid.v8()~~
+
+**_"Intentionally left blank"_**
+
+
+> [!NOTE]
+> Version 8 (experimental) UUIDs are "[for experimental or vendor-specific use cases](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-8)". The RFC does not define a creation algorithm for them, which is why this package does not offer a `v8()` method. The `validate()` and `version()` methods do work with such UUIDs, however.
+
+### uuid.validate(str)
+
+Test a string to see if it is a valid UUID
+
+| | |
+| --------- | --------------------------------------------------- |
+| `str` | `String` to validate |
+| _returns_ | `true` if string is a valid UUID, `false` otherwise |
+
+Example:
+
+```javascript
+import { validate as uuidValidate } from 'uuid';
+
+uuidValidate('not a UUID'); // ⇨ false
+uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true
+```
+
+Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds.
+
+```javascript
+import { version as uuidVersion } from 'uuid';
+import { validate as uuidValidate } from 'uuid';
+
+function uuidValidateV4(uuid) {
+ return uuidValidate(uuid) && uuidVersion(uuid) === 4;
+}
+
+const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210';
+const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836';
+
+uuidValidateV4(v4Uuid); // ⇨ true
+uuidValidateV4(v1Uuid); // ⇨ false
+```
+
+### uuid.version(str)
+
+Detect RFC version of a UUID
+
+| | |
+| --------- | ---------------------------------------- |
+| `str` | A valid UUID `String` |
+| _returns_ | `Number` The RFC version of the UUID |
+| _throws_ | `TypeError` if `str` is not a valid UUID |
+
+Example:
+
+```javascript
+import { version as uuidVersion } from 'uuid';
+
+uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1
+uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4
+```
+
+
+> [!NOTE]
+> This method returns `0` for the `NIL` UUID, and `15` for the `MAX` UUID.
+
+## Command Line
+
+UUIDs can be generated from the command line using `uuid`.
+
+```shell
+$ npx uuid
+ddeb27fb-d9a0-4624-be4d-4615062daed4
+```
+
+The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details:
+
+```shell
+$ npx uuid --help
+
+Usage:
+ uuid
+ uuid v1
+ uuid v3
+ uuid v4
+ uuid v5
+ uuid v7
+ uuid --help
+
+Note: may be "URL" or "DNS" to use the corresponding UUIDs
+defined by RFC9562
+```
+
+## ECMAScript Modules
+
+This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments).
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+```
+
+To run the examples you must first create a dist build of this library in the module root:
+
+```shell
+npm run build
+```
+
+## CDN Builds
+
+### ECMAScript Modules
+
+To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/):
+
+```html
+
+```
+
+### UMD
+
+As of `uuid@9` [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds are no longer shipped with this library.
+
+If you need a UMD build of this library, use a bundler like Webpack or Rollup. Alternatively, refer to the documentation of [`uuid@8.3.2`](https://github.com/uuidjs/uuid/blob/v8.3.2/README.md#umd) which was the last version that shipped UMD builds.
+
+## Known issues
+
+### Duplicate UUIDs (Googlebot)
+
+This module may generate duplicate UUIDs when run in clients with _deterministic_ random number generators, such as [Googlebot crawlers](https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers). This can cause problems for apps that expect client-generated UUIDs to always be unique. Developers should be prepared for this and have a strategy for dealing with possible collisions, such as:
+
+- Check for duplicate UUIDs, fail gracefully
+- Disable write operations for Googlebot clients
+
+### "getRandomValues() not supported"
+
+This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill:
+
+### React Native / Expo
+
+1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
+1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point:
+
+```javascript
+import 'react-native-get-random-values';
+import { v4 as uuidv4 } from 'uuid';
+```
+
+
+> [!NOTE]
+> If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`.
+
+### Web Workers / Service Workers (Edge <= 18)
+
+[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please).
+
+### IE 11 (Internet Explorer)
+
+Support for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)).
+
+## Upgrading From `uuid@7`
+
+### Only Named Exports Supported When Using with Node.js ESM
+
+`uuid@7` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports.
+
+Instead of doing:
+
+```javascript
+import uuid from 'uuid';
+uuid.v4();
+```
+
+you will now have to use the named exports:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4();
+```
+
+### Deep Requires No Longer Supported
+
+Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7`](#deep-requires-now-deprecated) are no longer supported.
+
+## Upgrading From `uuid@3`
+
+"_Wait... what happened to `uuid@4` thru `uuid@6`?!?_"
+
+In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped.
+
+### Deep Requires Now Deprecated
+
+`uuid@3` encouraged the use of deep requires to minimize the bundle size of browser builds:
+
+```javascript
+const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED!
+uuidv4();
+```
+
+As of `uuid@7` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4();
+```
+
+... or for CommonJS:
+
+```javascript
+const { v4: uuidv4 } = require('uuid');
+uuidv4();
+```
+
+### Default Export Removed
+
+`uuid@3` was exporting the Version 4 UUID method as a default export:
+
+```javascript
+const uuid = require('uuid'); // <== REMOVED!
+```
+
+This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`.
+
+---
+
+Markdown generated from [README_js.md](README_js.md) by
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/bin/uuid b/week-3/02-course-app-easy/node_modules/uuid/dist/bin/uuid
new file mode 100644
index 000000000..f38d2ee19
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/bin/uuid
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../uuid-bin');
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/index.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/index.js
new file mode 100644
index 000000000..3e909f49d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/index.js
@@ -0,0 +1,104 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "MAX", {
+ enumerable: true,
+ get: function get() {
+ return _max.default;
+ }
+});
+Object.defineProperty(exports, "NIL", {
+ enumerable: true,
+ get: function get() {
+ return _nil.default;
+ }
+});
+Object.defineProperty(exports, "parse", {
+ enumerable: true,
+ get: function get() {
+ return _parse.default;
+ }
+});
+Object.defineProperty(exports, "stringify", {
+ enumerable: true,
+ get: function get() {
+ return _stringify.default;
+ }
+});
+Object.defineProperty(exports, "v1", {
+ enumerable: true,
+ get: function get() {
+ return _v.default;
+ }
+});
+Object.defineProperty(exports, "v1ToV6", {
+ enumerable: true,
+ get: function get() {
+ return _v1ToV.default;
+ }
+});
+Object.defineProperty(exports, "v3", {
+ enumerable: true,
+ get: function get() {
+ return _v2.default;
+ }
+});
+Object.defineProperty(exports, "v4", {
+ enumerable: true,
+ get: function get() {
+ return _v3.default;
+ }
+});
+Object.defineProperty(exports, "v5", {
+ enumerable: true,
+ get: function get() {
+ return _v4.default;
+ }
+});
+Object.defineProperty(exports, "v6", {
+ enumerable: true,
+ get: function get() {
+ return _v5.default;
+ }
+});
+Object.defineProperty(exports, "v6ToV1", {
+ enumerable: true,
+ get: function get() {
+ return _v6ToV.default;
+ }
+});
+Object.defineProperty(exports, "v7", {
+ enumerable: true,
+ get: function get() {
+ return _v6.default;
+ }
+});
+Object.defineProperty(exports, "validate", {
+ enumerable: true,
+ get: function get() {
+ return _validate.default;
+ }
+});
+Object.defineProperty(exports, "version", {
+ enumerable: true,
+ get: function get() {
+ return _version.default;
+ }
+});
+var _max = _interopRequireDefault(require("./max.js"));
+var _nil = _interopRequireDefault(require("./nil.js"));
+var _parse = _interopRequireDefault(require("./parse.js"));
+var _stringify = _interopRequireDefault(require("./stringify.js"));
+var _v = _interopRequireDefault(require("./v1.js"));
+var _v1ToV = _interopRequireDefault(require("./v1ToV6.js"));
+var _v2 = _interopRequireDefault(require("./v3.js"));
+var _v3 = _interopRequireDefault(require("./v4.js"));
+var _v4 = _interopRequireDefault(require("./v5.js"));
+var _v5 = _interopRequireDefault(require("./v6.js"));
+var _v6ToV = _interopRequireDefault(require("./v6ToV1.js"));
+var _v6 = _interopRequireDefault(require("./v7.js"));
+var _validate = _interopRequireDefault(require("./validate.js"));
+var _version = _interopRequireDefault(require("./version.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/max.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/max.js
new file mode 100644
index 000000000..8de76f84e
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/max.js
@@ -0,0 +1,7 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = exports.default = 'ffffffff-ffff-ffff-ffff-ffffffffffff';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/md5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/md5.js
new file mode 100644
index 000000000..a3bf60dec
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/md5.js
@@ -0,0 +1,200 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+/*
+ * Browser-compatible JavaScript MD5
+ *
+ * Modification of JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * https://opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+function md5(bytes) {
+ if (typeof bytes === 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = new Uint8Array(msg.length);
+ for (var i = 0; i < msg.length; ++i) {
+ bytes[i] = msg.charCodeAt(i);
+ }
+ }
+ return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
+}
+
+/*
+ * Convert an array of little-endian words to an array of bytes
+ */
+function md5ToHexEncodedArray(input) {
+ var output = [];
+ var length32 = input.length * 32;
+ var hexTab = '0123456789abcdef';
+ for (var i = 0; i < length32; i += 8) {
+ var x = input[i >> 5] >>> i % 32 & 0xff;
+ var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
+ output.push(hex);
+ }
+ return output;
+}
+
+/**
+ * Calculate output length with padding and bit length
+ */
+function getOutputLength(inputLength8) {
+ return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
+}
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
+ */
+function wordsToMd5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << len % 32;
+ x[getOutputLength(len) - 1] = len;
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+ for (var i = 0; i < x.length; i += 16) {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+ a = safeAdd(a, olda);
+ b = safeAdd(b, oldb);
+ c = safeAdd(c, oldc);
+ d = safeAdd(d, oldd);
+ }
+ return [a, b, c, d];
+}
+
+/*
+ * Convert an array bytes to an array of little-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+function bytesToWords(input) {
+ if (input.length === 0) {
+ return [];
+ }
+ var length8 = input.length * 8;
+ var output = new Uint32Array(getOutputLength(length8));
+ for (var i = 0; i < length8; i += 8) {
+ output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
+ }
+ return output;
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safeAdd(x, y) {
+ var lsw = (x & 0xffff) + (y & 0xffff);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return msw << 16 | lsw & 0xffff;
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bitRotateLeft(num, cnt) {
+ return num << cnt | num >>> 32 - cnt;
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5cmn(q, a, b, x, s, t) {
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
+}
+function md5ff(a, b, c, d, x, s, t) {
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
+}
+function md5gg(a, b, c, d, x, s, t) {
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
+}
+function md5hh(a, b, c, d, x, s, t) {
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5ii(a, b, c, d, x, s, t) {
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
+}
+var _default = exports.default = md5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/native.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/native.js
new file mode 100644
index 000000000..b48d539db
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/native.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
+var _default = exports.default = {
+ randomUUID
+};
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/nil.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/nil.js
new file mode 100644
index 000000000..f7967e90c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/nil.js
@@ -0,0 +1,7 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = exports.default = '00000000-0000-0000-0000-000000000000';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/parse.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/parse.js
new file mode 100644
index 000000000..8ba8f5007
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/parse.js
@@ -0,0 +1,44 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _validate = _interopRequireDefault(require("./validate.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function parse(uuid) {
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ var v;
+ var arr = new Uint8Array(16);
+
+ // Parse ########-....-....-....-............
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
+ arr[1] = v >>> 16 & 0xff;
+ arr[2] = v >>> 8 & 0xff;
+ arr[3] = v & 0xff;
+
+ // Parse ........-####-....-....-............
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
+ arr[5] = v & 0xff;
+
+ // Parse ........-....-####-....-............
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
+ arr[7] = v & 0xff;
+
+ // Parse ........-....-....-####-............
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
+ arr[9] = v & 0xff;
+
+ // Parse ........-....-....-....-############
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
+ arr[11] = v / 0x100000000 & 0xff;
+ arr[12] = v >>> 24 & 0xff;
+ arr[13] = v >>> 16 & 0xff;
+ arr[14] = v >>> 8 & 0xff;
+ arr[15] = v & 0xff;
+ return arr;
+}
+var _default = exports.default = parse;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/regex.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/regex.js
new file mode 100644
index 000000000..fc02a88e8
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/regex.js
@@ -0,0 +1,7 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = exports.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/rng.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/rng.js
new file mode 100644
index 000000000..6cf7e98a4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/rng.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rng;
+// Unique ID creation requires a high quality random # generator. In the browser we therefore
+// require the crypto API and do not support built-in fallback to lower quality random number
+// generators (like Math.random()).
+
+var getRandomValues;
+var rnds8 = new Uint8Array(16);
+function rng() {
+ // lazy load so that environments that need to polyfill have a chance to do so
+ if (!getRandomValues) {
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
+ if (!getRandomValues) {
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
+ }
+ }
+ return getRandomValues(rnds8);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/sha1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/sha1.js
new file mode 100644
index 000000000..ae1cf630b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/sha1.js
@@ -0,0 +1,82 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+// Adapted from Chris Veness' SHA1 code at
+// http://www.movable-type.co.uk/scripts/sha1.html
+function f(s, x, y, z) {
+ switch (s) {
+ case 0:
+ return x & y ^ ~x & z;
+ case 1:
+ return x ^ y ^ z;
+ case 2:
+ return x & y ^ x & z ^ y & z;
+ case 3:
+ return x ^ y ^ z;
+ }
+}
+function ROTL(x, n) {
+ return x << n | x >>> 32 - n;
+}
+function sha1(bytes) {
+ var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
+ var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
+ if (typeof bytes === 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = [];
+ for (var i = 0; i < msg.length; ++i) {
+ bytes.push(msg.charCodeAt(i));
+ }
+ } else if (!Array.isArray(bytes)) {
+ // Convert Array-like to Array
+ bytes = Array.prototype.slice.call(bytes);
+ }
+ bytes.push(0x80);
+ var l = bytes.length / 4 + 2;
+ var N = Math.ceil(l / 16);
+ var M = new Array(N);
+ for (var _i = 0; _i < N; ++_i) {
+ var arr = new Uint32Array(16);
+ for (var j = 0; j < 16; ++j) {
+ arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
+ }
+ M[_i] = arr;
+ }
+ M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
+ M[N - 1][14] = Math.floor(M[N - 1][14]);
+ M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
+ for (var _i2 = 0; _i2 < N; ++_i2) {
+ var W = new Uint32Array(80);
+ for (var t = 0; t < 16; ++t) {
+ W[t] = M[_i2][t];
+ }
+ for (var _t = 16; _t < 80; ++_t) {
+ W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
+ }
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+ for (var _t2 = 0; _t2 < 80; ++_t2) {
+ var s = Math.floor(_t2 / 20);
+ var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
+ e = d;
+ d = c;
+ c = ROTL(b, 30) >>> 0;
+ b = a;
+ a = T;
+ }
+ H[0] = H[0] + a >>> 0;
+ H[1] = H[1] + b >>> 0;
+ H[2] = H[2] + c >>> 0;
+ H[3] = H[3] + d >>> 0;
+ H[4] = H[4] + e >>> 0;
+ }
+ return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
+}
+var _default = exports.default = sha1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/stringify.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/stringify.js
new file mode 100644
index 000000000..92dec9e04
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/stringify.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+exports.unsafeStringify = unsafeStringify;
+var _validate = _interopRequireDefault(require("./validate.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+var byteToHex = [];
+for (var i = 0; i < 256; ++i) {
+ byteToHex.push((i + 0x100).toString(16).slice(1));
+}
+function unsafeStringify(arr, offset = 0) {
+ // Note: Be careful editing this code! It's been tuned for performance
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+ //
+ // Note to future-self: No, you can't remove the `toLowerCase()` call.
+ // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
+}
+function stringify(arr, offset = 0) {
+ var uuid = unsafeStringify(arr, offset);
+ // Consistency check for valid UUID. If this throws, it's likely due to one
+ // of the following:
+ // - One or more input array values don't map to a hex octet (leading to
+ // "undefined" in the uuid)
+ // - Invalid input values for the RFC `version` or `variant` fields
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Stringified UUID is invalid');
+ }
+ return uuid;
+}
+var _default = exports.default = stringify;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v1.js
new file mode 100644
index 000000000..978925168
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v1.js
@@ -0,0 +1,131 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _rng = _interopRequireDefault(require("./rng.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+var _nodeId;
+var _clockseq;
+
+// Previous uuid creation time
+var _lastMSecs = 0;
+var _lastNSecs = 0;
+
+// See https://github.com/uuidjs/uuid for API details
+function v1(options, buf, offset) {
+ var i = buf && offset || 0;
+ var b = buf || new Array(16);
+ options = options || {};
+ var node = options.node;
+ var clockseq = options.clockseq;
+
+ // v1 only: Use cached `node` and `clockseq` values
+ if (!options._v6) {
+ if (!node) {
+ node = _nodeId;
+ }
+ if (clockseq == null) {
+ clockseq = _clockseq;
+ }
+ }
+
+ // Handle cases where we need entropy. We do this lazily to minimize issues
+ // related to insufficient system entropy. See #189
+ if (node == null || clockseq == null) {
+ var seedBytes = options.random || (options.rng || _rng.default)();
+
+ // Randomize node
+ if (node == null) {
+ node = [seedBytes[0], seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
+
+ // v1 only: cache node value for reuse
+ if (!_nodeId && !options._v6) {
+ // per RFC4122 4.5: Set MAC multicast bit (v1 only)
+ node[0] |= 0x01; // Set multicast bit
+
+ _nodeId = node;
+ }
+ }
+
+ // Randomize clockseq
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ if (_clockseq === undefined && !options._v6) {
+ _clockseq = clockseq;
+ }
+ }
+ }
+
+ // v1 & v6 timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so time is
+ // handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ var msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
+ }
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ for (var n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+ return buf || (0, _stringify.unsafeStringify)(b);
+}
+var _default = exports.default = v1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v1ToV6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v1ToV6.js
new file mode 100644
index 000000000..0b4319973
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v1ToV6.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = v1ToV6;
+var _parse = _interopRequireDefault(require("./parse.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * Convert a v1 UUID to a v6 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v1 UUID to convert to v6
+ * @returns {string|Uint8Array} The v6 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+function v1ToV6(uuid) {
+ var v1Bytes = typeof uuid === 'string' ? (0, _parse.default)(uuid) : uuid;
+ var v6Bytes = _v1ToV6(v1Bytes);
+ return typeof uuid === 'string' ? (0, _stringify.unsafeStringify)(v6Bytes) : v6Bytes;
+}
+
+// Do the field transformation needed for v1 -> v6
+function _v1ToV6(v1Bytes, randomize = false) {
+ return Uint8Array.of((v1Bytes[6] & 0x0f) << 4 | v1Bytes[7] >> 4 & 0x0f, (v1Bytes[7] & 0x0f) << 4 | (v1Bytes[4] & 0xf0) >> 4, (v1Bytes[4] & 0x0f) << 4 | (v1Bytes[5] & 0xf0) >> 4, (v1Bytes[5] & 0x0f) << 4 | (v1Bytes[0] & 0xf0) >> 4, (v1Bytes[0] & 0x0f) << 4 | (v1Bytes[1] & 0xf0) >> 4, (v1Bytes[1] & 0x0f) << 4 | (v1Bytes[2] & 0xf0) >> 4, 0x60 | v1Bytes[2] & 0x0f, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v3.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v3.js
new file mode 100644
index 000000000..8761fc3b9
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v3.js
@@ -0,0 +1,11 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _v = _interopRequireDefault(require("./v35.js"));
+var _md = _interopRequireDefault(require("./md5.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+var v3 = (0, _v.default)('v3', 0x30, _md.default);
+var _default = exports.default = v3;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v35.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v35.js
new file mode 100644
index 000000000..c22c23c09
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v35.js
@@ -0,0 +1,63 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.URL = exports.DNS = void 0;
+exports.default = v35;
+var _stringify = require("./stringify.js");
+var _parse = _interopRequireDefault(require("./parse.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+
+ var bytes = [];
+ for (var i = 0; i < str.length; ++i) {
+ bytes.push(str.charCodeAt(i));
+ }
+ return bytes;
+}
+var DNS = exports.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+var URL = exports.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+function v35(name, version, hashfunc) {
+ function generateUUID(value, namespace, buf, offset) {
+ var _namespace;
+ if (typeof value === 'string') {
+ value = stringToBytes(value);
+ }
+ if (typeof namespace === 'string') {
+ namespace = (0, _parse.default)(namespace);
+ }
+ if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
+ }
+
+ // Compute hash of namespace and value, Per 4.3
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
+ // hashfunc([...namespace, ... value])`
+ var bytes = new Uint8Array(16 + value.length);
+ bytes.set(namespace);
+ bytes.set(value, namespace.length);
+ bytes = hashfunc(bytes);
+ bytes[6] = bytes[6] & 0x0f | version;
+ bytes[8] = bytes[8] & 0x3f | 0x80;
+ if (buf) {
+ offset = offset || 0;
+ for (var i = 0; i < 16; ++i) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return (0, _stringify.unsafeStringify)(bytes);
+ }
+
+ // Function#name is not settable on some platforms (#270)
+ try {
+ generateUUID.name = name;
+ } catch (err) {}
+
+ // For CommonJS default export support
+ generateUUID.DNS = DNS;
+ generateUUID.URL = URL;
+ return generateUUID;
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v4.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v4.js
new file mode 100644
index 000000000..2242a3ae3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v4.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _native = _interopRequireDefault(require("./native.js"));
+var _rng = _interopRequireDefault(require("./rng.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function v4(options, buf, offset) {
+ if (_native.default.randomUUID && !buf && !options) {
+ return _native.default.randomUUID();
+ }
+ options = options || {};
+ var rnds = options.random || (options.rng || _rng.default)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = rnds[6] & 0x0f | 0x40;
+ rnds[8] = rnds[8] & 0x3f | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ offset = offset || 0;
+ for (var i = 0; i < 16; ++i) {
+ buf[offset + i] = rnds[i];
+ }
+ return buf;
+ }
+ return (0, _stringify.unsafeStringify)(rnds);
+}
+var _default = exports.default = v4;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v5.js
new file mode 100644
index 000000000..54ad2cbec
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v5.js
@@ -0,0 +1,11 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _v = _interopRequireDefault(require("./v35.js"));
+var _sha = _interopRequireDefault(require("./sha1.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+var v5 = (0, _v.default)('v5', 0x50, _sha.default);
+var _default = exports.default = v5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v6.js
new file mode 100644
index 000000000..cc4ece9c0
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v6.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = v6;
+var _stringify = require("./stringify.js");
+var _v = _interopRequireDefault(require("./v1.js"));
+var _v1ToV = _interopRequireDefault(require("./v1ToV6.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
+function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
+function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
+function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
+function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
+/**
+ *
+ * @param {object} options
+ * @param {Uint8Array=} buf
+ * @param {number=} offset
+ * @returns
+ */
+function v6(options = {}, buf, offset = 0) {
+ // v6 is v1 with different field layout, so we start with a v1 UUID, albeit
+ // with slightly different behavior around how the clock_seq and node fields
+ // are randomized, which is why we call v1 with _v6: true.
+ var bytes = (0, _v.default)(_objectSpread(_objectSpread({}, options), {}, {
+ _v6: true
+ }), new Uint8Array(16));
+
+ // Reorder the fields to v6 layout.
+ bytes = (0, _v1ToV.default)(bytes);
+
+ // Return as a byte array if requested
+ if (buf) {
+ for (var i = 0; i < 16; i++) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return (0, _stringify.unsafeStringify)(bytes);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v6ToV1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v6ToV1.js
new file mode 100644
index 000000000..3c8350a98
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v6ToV1.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = v6ToV1;
+var _parse = _interopRequireDefault(require("./parse.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * Convert a v6 UUID to a v1 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v6 UUID to convert to v6
+ * @returns {string|Uint8Array} The v1 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+function v6ToV1(uuid) {
+ var v6Bytes = typeof uuid === 'string' ? (0, _parse.default)(uuid) : uuid;
+ var v1Bytes = _v6ToV1(v6Bytes);
+ return typeof uuid === 'string' ? (0, _stringify.unsafeStringify)(v1Bytes) : v1Bytes;
+}
+
+// Do the field transformation needed for v6 -> v1
+function _v6ToV1(v6Bytes) {
+ return Uint8Array.of((v6Bytes[3] & 0x0f) << 4 | v6Bytes[4] >> 4 & 0x0f, (v6Bytes[4] & 0x0f) << 4 | (v6Bytes[5] & 0xf0) >> 4, (v6Bytes[5] & 0x0f) << 4 | v6Bytes[6] & 0x0f, v6Bytes[7], (v6Bytes[1] & 0x0f) << 4 | (v6Bytes[2] & 0xf0) >> 4, (v6Bytes[2] & 0x0f) << 4 | (v6Bytes[3] & 0xf0) >> 4, 0x10 | (v6Bytes[0] & 0xf0) >> 4, (v6Bytes[0] & 0x0f) << 4 | (v6Bytes[1] & 0xf0) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v7.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v7.js
new file mode 100644
index 000000000..2e42801cb
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/v7.js
@@ -0,0 +1,152 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _rng = _interopRequireDefault(require("./rng.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * UUID V7 - Unix Epoch time-based UUID
+ *
+ * The IETF has published RFC9562, introducing 3 new UUID versions (6,7,8). This
+ * implementation of V7 is based on the accepted, though not yet approved,
+ * revisions.
+ *
+ * RFC 9562:https://www.rfc-editor.org/rfc/rfc9562.html Universally Unique
+ * IDentifiers (UUIDs)
+
+ *
+ * Sample V7 value:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#name-example-of-a-uuidv7-value
+ *
+ * Monotonic Bit Layout: RFC rfc9562.6.2 Method 1, Dedicated Counter Bits ref:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#section-6.2-5.1
+ *
+ * 0 1 2 3 0 1 2 3 4 5 6
+ * 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms | ver | seq_hi |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |var| seq_low | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * seq is a 31 bit serialized counter; comprised of 12 bit seq_hi and 19 bit
+ * seq_low, and randomly initialized upon timestamp change. 31 bit counter size
+ * was selected as any bitwise operations in node are done as _signed_ 32 bit
+ * ints. we exclude the sign bit.
+ */
+
+var _seqLow = null;
+var _seqHigh = null;
+var _msecs = 0;
+function v7(options, buf, offset) {
+ options = options || {};
+
+ // initialize buffer and pointer
+ var i = buf && offset || 0;
+ var b = buf || new Uint8Array(16);
+
+ // rnds is Uint8Array(16) filled with random bytes
+ var rnds = options.random || (options.rng || _rng.default)();
+
+ // milliseconds since unix epoch, 1970-01-01 00:00
+ var msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // seq is user provided 31 bit counter
+ var seq = options.seq !== undefined ? options.seq : null;
+
+ // initialize local seq high/low parts
+ var seqHigh = _seqHigh;
+ var seqLow = _seqLow;
+
+ // check if clock has advanced and user has not provided msecs
+ if (msecs > _msecs && options.msecs === undefined) {
+ _msecs = msecs;
+
+ // unless user provided seq, reset seq parts
+ if (seq !== null) {
+ seqHigh = null;
+ seqLow = null;
+ }
+ }
+
+ // if we have a user provided seq
+ if (seq !== null) {
+ // trim provided seq to 31 bits of value, avoiding overflow
+ if (seq > 0x7fffffff) {
+ seq = 0x7fffffff;
+ }
+
+ // split provided seq into high/low parts
+ seqHigh = seq >>> 19 & 0xfff;
+ seqLow = seq & 0x7ffff;
+ }
+
+ // randomly initialize seq
+ if (seqHigh === null || seqLow === null) {
+ seqHigh = rnds[6] & 0x7f;
+ seqHigh = seqHigh << 8 | rnds[7];
+ seqLow = rnds[8] & 0x3f; // pad for var
+ seqLow = seqLow << 8 | rnds[9];
+ seqLow = seqLow << 5 | rnds[10] >>> 3;
+ }
+
+ // increment seq if within msecs window
+ if (msecs + 10000 > _msecs && seq === null) {
+ if (++seqLow > 0x7ffff) {
+ seqLow = 0;
+ if (++seqHigh > 0xfff) {
+ seqHigh = 0;
+
+ // increment internal _msecs. this allows us to continue incrementing
+ // while staying monotonic. Note, once we hit 10k milliseconds beyond system
+ // clock, we will reset breaking monotonicity (after (2^31)*10000 generations)
+ _msecs++;
+ }
+ }
+ } else {
+ // resetting; we have advanced more than
+ // 10k milliseconds beyond system clock
+ _msecs = msecs;
+ }
+ _seqHigh = seqHigh;
+ _seqLow = seqLow;
+
+ // [bytes 0-5] 48 bits of local timestamp
+ b[i++] = _msecs / 0x10000000000 & 0xff;
+ b[i++] = _msecs / 0x100000000 & 0xff;
+ b[i++] = _msecs / 0x1000000 & 0xff;
+ b[i++] = _msecs / 0x10000 & 0xff;
+ b[i++] = _msecs / 0x100 & 0xff;
+ b[i++] = _msecs & 0xff;
+
+ // [byte 6] - set 4 bits of version (7) with first 4 bits seq_hi
+ b[i++] = seqHigh >>> 4 & 0x0f | 0x70;
+
+ // [byte 7] remaining 8 bits of seq_hi
+ b[i++] = seqHigh & 0xff;
+
+ // [byte 8] - variant (2 bits), first 6 bits seq_low
+ b[i++] = seqLow >>> 13 & 0x3f | 0x80;
+
+ // [byte 9] 8 bits seq_low
+ b[i++] = seqLow >>> 5 & 0xff;
+
+ // [byte 10] remaining 5 bits seq_low, 3 bits random
+ b[i++] = seqLow << 3 & 0xff | rnds[10] & 0x07;
+
+ // [bytes 11-15] always random
+ b[i++] = rnds[11];
+ b[i++] = rnds[12];
+ b[i++] = rnds[13];
+ b[i++] = rnds[14];
+ b[i++] = rnds[15];
+ return buf || (0, _stringify.unsafeStringify)(b);
+}
+var _default = exports.default = v7;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/validate.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/validate.js
new file mode 100644
index 000000000..d47181aad
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/validate.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _regex = _interopRequireDefault(require("./regex.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function validate(uuid) {
+ return typeof uuid === 'string' && _regex.default.test(uuid);
+}
+var _default = exports.default = validate;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/version.js b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/version.js
new file mode 100644
index 000000000..0c6bbdd5d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/commonjs-browser/version.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _validate = _interopRequireDefault(require("./validate.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function version(uuid) {
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ return parseInt(uuid.slice(14, 15), 16);
+}
+var _default = exports.default = version;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/index.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/index.js
new file mode 100644
index 000000000..45214b37b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/index.js
@@ -0,0 +1,14 @@
+export { default as MAX } from './max.js';
+export { default as NIL } from './nil.js';
+export { default as parse } from './parse.js';
+export { default as stringify } from './stringify.js';
+export { default as v1 } from './v1.js';
+export { default as v1ToV6 } from './v1ToV6.js';
+export { default as v3 } from './v3.js';
+export { default as v4 } from './v4.js';
+export { default as v5 } from './v5.js';
+export { default as v6 } from './v6.js';
+export { default as v6ToV1 } from './v6ToV1.js';
+export { default as v7 } from './v7.js';
+export { default as validate } from './validate.js';
+export { default as version } from './version.js';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/max.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/max.js
new file mode 100644
index 000000000..f46a281f5
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/max.js
@@ -0,0 +1 @@
+export default 'ffffffff-ffff-ffff-ffff-ffffffffffff';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/md5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/md5.js
new file mode 100644
index 000000000..82d170e70
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/md5.js
@@ -0,0 +1,194 @@
+/*
+ * Browser-compatible JavaScript MD5
+ *
+ * Modification of JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * https://opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+function md5(bytes) {
+ if (typeof bytes === 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = new Uint8Array(msg.length);
+ for (var i = 0; i < msg.length; ++i) {
+ bytes[i] = msg.charCodeAt(i);
+ }
+ }
+ return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
+}
+
+/*
+ * Convert an array of little-endian words to an array of bytes
+ */
+function md5ToHexEncodedArray(input) {
+ var output = [];
+ var length32 = input.length * 32;
+ var hexTab = '0123456789abcdef';
+ for (var i = 0; i < length32; i += 8) {
+ var x = input[i >> 5] >>> i % 32 & 0xff;
+ var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
+ output.push(hex);
+ }
+ return output;
+}
+
+/**
+ * Calculate output length with padding and bit length
+ */
+function getOutputLength(inputLength8) {
+ return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
+}
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
+ */
+function wordsToMd5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << len % 32;
+ x[getOutputLength(len) - 1] = len;
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+ for (var i = 0; i < x.length; i += 16) {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+ a = safeAdd(a, olda);
+ b = safeAdd(b, oldb);
+ c = safeAdd(c, oldc);
+ d = safeAdd(d, oldd);
+ }
+ return [a, b, c, d];
+}
+
+/*
+ * Convert an array bytes to an array of little-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+function bytesToWords(input) {
+ if (input.length === 0) {
+ return [];
+ }
+ var length8 = input.length * 8;
+ var output = new Uint32Array(getOutputLength(length8));
+ for (var i = 0; i < length8; i += 8) {
+ output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
+ }
+ return output;
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safeAdd(x, y) {
+ var lsw = (x & 0xffff) + (y & 0xffff);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return msw << 16 | lsw & 0xffff;
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bitRotateLeft(num, cnt) {
+ return num << cnt | num >>> 32 - cnt;
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5cmn(q, a, b, x, s, t) {
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
+}
+function md5ff(a, b, c, d, x, s, t) {
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
+}
+function md5gg(a, b, c, d, x, s, t) {
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
+}
+function md5hh(a, b, c, d, x, s, t) {
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5ii(a, b, c, d, x, s, t) {
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
+}
+export default md5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/native.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/native.js
new file mode 100644
index 000000000..ba09dec7d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/native.js
@@ -0,0 +1,4 @@
+var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
+export default {
+ randomUUID
+};
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/nil.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/nil.js
new file mode 100644
index 000000000..b36324c2a
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/nil.js
@@ -0,0 +1 @@
+export default '00000000-0000-0000-0000-000000000000';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/parse.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/parse.js
new file mode 100644
index 000000000..87588317f
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/parse.js
@@ -0,0 +1,37 @@
+import validate from './validate.js';
+function parse(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ var v;
+ var arr = new Uint8Array(16);
+
+ // Parse ########-....-....-....-............
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
+ arr[1] = v >>> 16 & 0xff;
+ arr[2] = v >>> 8 & 0xff;
+ arr[3] = v & 0xff;
+
+ // Parse ........-####-....-....-............
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
+ arr[5] = v & 0xff;
+
+ // Parse ........-....-####-....-............
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
+ arr[7] = v & 0xff;
+
+ // Parse ........-....-....-####-............
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
+ arr[9] = v & 0xff;
+
+ // Parse ........-....-....-....-############
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
+ arr[11] = v / 0x100000000 & 0xff;
+ arr[12] = v >>> 24 & 0xff;
+ arr[13] = v >>> 16 & 0xff;
+ arr[14] = v >>> 8 & 0xff;
+ arr[15] = v & 0xff;
+ return arr;
+}
+export default parse;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/regex.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/regex.js
new file mode 100644
index 000000000..848a1fea3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/regex.js
@@ -0,0 +1 @@
+export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/rng.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/rng.js
new file mode 100644
index 000000000..e54d3888a
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/rng.js
@@ -0,0 +1,17 @@
+// Unique ID creation requires a high quality random # generator. In the browser we therefore
+// require the crypto API and do not support built-in fallback to lower quality random number
+// generators (like Math.random()).
+
+var getRandomValues;
+var rnds8 = new Uint8Array(16);
+export default function rng() {
+ // lazy load so that environments that need to polyfill have a chance to do so
+ if (!getRandomValues) {
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
+ if (!getRandomValues) {
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
+ }
+ }
+ return getRandomValues(rnds8);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/sha1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/sha1.js
new file mode 100644
index 000000000..bd8831157
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/sha1.js
@@ -0,0 +1,76 @@
+// Adapted from Chris Veness' SHA1 code at
+// http://www.movable-type.co.uk/scripts/sha1.html
+function f(s, x, y, z) {
+ switch (s) {
+ case 0:
+ return x & y ^ ~x & z;
+ case 1:
+ return x ^ y ^ z;
+ case 2:
+ return x & y ^ x & z ^ y & z;
+ case 3:
+ return x ^ y ^ z;
+ }
+}
+function ROTL(x, n) {
+ return x << n | x >>> 32 - n;
+}
+function sha1(bytes) {
+ var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
+ var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
+ if (typeof bytes === 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = [];
+ for (var i = 0; i < msg.length; ++i) {
+ bytes.push(msg.charCodeAt(i));
+ }
+ } else if (!Array.isArray(bytes)) {
+ // Convert Array-like to Array
+ bytes = Array.prototype.slice.call(bytes);
+ }
+ bytes.push(0x80);
+ var l = bytes.length / 4 + 2;
+ var N = Math.ceil(l / 16);
+ var M = new Array(N);
+ for (var _i = 0; _i < N; ++_i) {
+ var arr = new Uint32Array(16);
+ for (var j = 0; j < 16; ++j) {
+ arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
+ }
+ M[_i] = arr;
+ }
+ M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
+ M[N - 1][14] = Math.floor(M[N - 1][14]);
+ M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
+ for (var _i2 = 0; _i2 < N; ++_i2) {
+ var W = new Uint32Array(80);
+ for (var t = 0; t < 16; ++t) {
+ W[t] = M[_i2][t];
+ }
+ for (var _t = 16; _t < 80; ++_t) {
+ W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
+ }
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+ for (var _t2 = 0; _t2 < 80; ++_t2) {
+ var s = Math.floor(_t2 / 20);
+ var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
+ e = d;
+ d = c;
+ c = ROTL(b, 30) >>> 0;
+ b = a;
+ a = T;
+ }
+ H[0] = H[0] + a >>> 0;
+ H[1] = H[1] + b >>> 0;
+ H[2] = H[2] + c >>> 0;
+ H[3] = H[3] + d >>> 0;
+ H[4] = H[4] + e >>> 0;
+ }
+ return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
+}
+export default sha1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/stringify.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/stringify.js
new file mode 100644
index 000000000..0a9cf4081
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/stringify.js
@@ -0,0 +1,31 @@
+import validate from './validate.js';
+
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+var byteToHex = [];
+for (var i = 0; i < 256; ++i) {
+ byteToHex.push((i + 0x100).toString(16).slice(1));
+}
+export function unsafeStringify(arr, offset = 0) {
+ // Note: Be careful editing this code! It's been tuned for performance
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+ //
+ // Note to future-self: No, you can't remove the `toLowerCase()` call.
+ // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
+}
+function stringify(arr, offset = 0) {
+ var uuid = unsafeStringify(arr, offset);
+ // Consistency check for valid UUID. If this throws, it's likely due to one
+ // of the following:
+ // - One or more input array values don't map to a hex octet (leading to
+ // "undefined" in the uuid)
+ // - Invalid input values for the RFC `version` or `variant` fields
+ if (!validate(uuid)) {
+ throw TypeError('Stringified UUID is invalid');
+ }
+ return uuid;
+}
+export default stringify;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v1.js
new file mode 100644
index 000000000..d42a904e0
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v1.js
@@ -0,0 +1,125 @@
+import rng from './rng.js';
+import { unsafeStringify } from './stringify.js';
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+var _nodeId;
+var _clockseq;
+
+// Previous uuid creation time
+var _lastMSecs = 0;
+var _lastNSecs = 0;
+
+// See https://github.com/uuidjs/uuid for API details
+function v1(options, buf, offset) {
+ var i = buf && offset || 0;
+ var b = buf || new Array(16);
+ options = options || {};
+ var node = options.node;
+ var clockseq = options.clockseq;
+
+ // v1 only: Use cached `node` and `clockseq` values
+ if (!options._v6) {
+ if (!node) {
+ node = _nodeId;
+ }
+ if (clockseq == null) {
+ clockseq = _clockseq;
+ }
+ }
+
+ // Handle cases where we need entropy. We do this lazily to minimize issues
+ // related to insufficient system entropy. See #189
+ if (node == null || clockseq == null) {
+ var seedBytes = options.random || (options.rng || rng)();
+
+ // Randomize node
+ if (node == null) {
+ node = [seedBytes[0], seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
+
+ // v1 only: cache node value for reuse
+ if (!_nodeId && !options._v6) {
+ // per RFC4122 4.5: Set MAC multicast bit (v1 only)
+ node[0] |= 0x01; // Set multicast bit
+
+ _nodeId = node;
+ }
+ }
+
+ // Randomize clockseq
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ if (_clockseq === undefined && !options._v6) {
+ _clockseq = clockseq;
+ }
+ }
+ }
+
+ // v1 & v6 timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so time is
+ // handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ var msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
+ }
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ for (var n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+ return buf || unsafeStringify(b);
+}
+export default v1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v1ToV6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v1ToV6.js
new file mode 100644
index 000000000..e4ecc2917
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v1ToV6.js
@@ -0,0 +1,20 @@
+import parse from './parse.js';
+import { unsafeStringify } from './stringify.js';
+
+/**
+ * Convert a v1 UUID to a v6 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v1 UUID to convert to v6
+ * @returns {string|Uint8Array} The v6 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+export default function v1ToV6(uuid) {
+ var v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;
+ var v6Bytes = _v1ToV6(v1Bytes);
+ return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes;
+}
+
+// Do the field transformation needed for v1 -> v6
+function _v1ToV6(v1Bytes, randomize = false) {
+ return Uint8Array.of((v1Bytes[6] & 0x0f) << 4 | v1Bytes[7] >> 4 & 0x0f, (v1Bytes[7] & 0x0f) << 4 | (v1Bytes[4] & 0xf0) >> 4, (v1Bytes[4] & 0x0f) << 4 | (v1Bytes[5] & 0xf0) >> 4, (v1Bytes[5] & 0x0f) << 4 | (v1Bytes[0] & 0xf0) >> 4, (v1Bytes[0] & 0x0f) << 4 | (v1Bytes[1] & 0xf0) >> 4, (v1Bytes[1] & 0x0f) << 4 | (v1Bytes[2] & 0xf0) >> 4, 0x60 | v1Bytes[2] & 0x0f, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v3.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v3.js
new file mode 100644
index 000000000..c9ab9a4cd
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v3.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import md5 from './md5.js';
+var v3 = v35('v3', 0x30, md5);
+export default v3;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v35.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v35.js
new file mode 100644
index 000000000..e5fd93fb7
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v35.js
@@ -0,0 +1,55 @@
+import { unsafeStringify } from './stringify.js';
+import parse from './parse.js';
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+
+ var bytes = [];
+ for (var i = 0; i < str.length; ++i) {
+ bytes.push(str.charCodeAt(i));
+ }
+ return bytes;
+}
+export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+export default function v35(name, version, hashfunc) {
+ function generateUUID(value, namespace, buf, offset) {
+ var _namespace;
+ if (typeof value === 'string') {
+ value = stringToBytes(value);
+ }
+ if (typeof namespace === 'string') {
+ namespace = parse(namespace);
+ }
+ if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
+ }
+
+ // Compute hash of namespace and value, Per 4.3
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
+ // hashfunc([...namespace, ... value])`
+ var bytes = new Uint8Array(16 + value.length);
+ bytes.set(namespace);
+ bytes.set(value, namespace.length);
+ bytes = hashfunc(bytes);
+ bytes[6] = bytes[6] & 0x0f | version;
+ bytes[8] = bytes[8] & 0x3f | 0x80;
+ if (buf) {
+ offset = offset || 0;
+ for (var i = 0; i < 16; ++i) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return unsafeStringify(bytes);
+ }
+
+ // Function#name is not settable on some platforms (#270)
+ try {
+ generateUUID.name = name;
+ } catch (err) {}
+
+ // For CommonJS default export support
+ generateUUID.DNS = DNS;
+ generateUUID.URL = URL;
+ return generateUUID;
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v4.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v4.js
new file mode 100644
index 000000000..f107002b8
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v4.js
@@ -0,0 +1,25 @@
+import native from './native.js';
+import rng from './rng.js';
+import { unsafeStringify } from './stringify.js';
+function v4(options, buf, offset) {
+ if (native.randomUUID && !buf && !options) {
+ return native.randomUUID();
+ }
+ options = options || {};
+ var rnds = options.random || (options.rng || rng)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = rnds[6] & 0x0f | 0x40;
+ rnds[8] = rnds[8] & 0x3f | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ offset = offset || 0;
+ for (var i = 0; i < 16; ++i) {
+ buf[offset + i] = rnds[i];
+ }
+ return buf;
+ }
+ return unsafeStringify(rnds);
+}
+export default v4;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v5.js
new file mode 100644
index 000000000..c08d96ba0
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v5.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import sha1 from './sha1.js';
+var v5 = v35('v5', 0x50, sha1);
+export default v5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v6.js
new file mode 100644
index 000000000..13f9e916c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v6.js
@@ -0,0 +1,36 @@
+function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
+function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
+function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
+function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
+function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
+import { unsafeStringify } from './stringify.js';
+import v1 from './v1.js';
+import v1ToV6 from './v1ToV6.js';
+
+/**
+ *
+ * @param {object} options
+ * @param {Uint8Array=} buf
+ * @param {number=} offset
+ * @returns
+ */
+export default function v6(options = {}, buf, offset = 0) {
+ // v6 is v1 with different field layout, so we start with a v1 UUID, albeit
+ // with slightly different behavior around how the clock_seq and node fields
+ // are randomized, which is why we call v1 with _v6: true.
+ var bytes = v1(_objectSpread(_objectSpread({}, options), {}, {
+ _v6: true
+ }), new Uint8Array(16));
+
+ // Reorder the fields to v6 layout.
+ bytes = v1ToV6(bytes);
+
+ // Return as a byte array if requested
+ if (buf) {
+ for (var i = 0; i < 16; i++) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return unsafeStringify(bytes);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v6ToV1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v6ToV1.js
new file mode 100644
index 000000000..3dd1058fc
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v6ToV1.js
@@ -0,0 +1,20 @@
+import parse from './parse.js';
+import { unsafeStringify } from './stringify.js';
+
+/**
+ * Convert a v6 UUID to a v1 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v6 UUID to convert to v6
+ * @returns {string|Uint8Array} The v1 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+export default function v6ToV1(uuid) {
+ var v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;
+ var v1Bytes = _v6ToV1(v6Bytes);
+ return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes;
+}
+
+// Do the field transformation needed for v6 -> v1
+function _v6ToV1(v6Bytes) {
+ return Uint8Array.of((v6Bytes[3] & 0x0f) << 4 | v6Bytes[4] >> 4 & 0x0f, (v6Bytes[4] & 0x0f) << 4 | (v6Bytes[5] & 0xf0) >> 4, (v6Bytes[5] & 0x0f) << 4 | v6Bytes[6] & 0x0f, v6Bytes[7], (v6Bytes[1] & 0x0f) << 4 | (v6Bytes[2] & 0xf0) >> 4, (v6Bytes[2] & 0x0f) << 4 | (v6Bytes[3] & 0xf0) >> 4, 0x10 | (v6Bytes[0] & 0xf0) >> 4, (v6Bytes[0] & 0x0f) << 4 | (v6Bytes[1] & 0xf0) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v7.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v7.js
new file mode 100644
index 000000000..324153b69
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/v7.js
@@ -0,0 +1,146 @@
+import rng from './rng.js';
+import { unsafeStringify } from './stringify.js';
+
+/**
+ * UUID V7 - Unix Epoch time-based UUID
+ *
+ * The IETF has published RFC9562, introducing 3 new UUID versions (6,7,8). This
+ * implementation of V7 is based on the accepted, though not yet approved,
+ * revisions.
+ *
+ * RFC 9562:https://www.rfc-editor.org/rfc/rfc9562.html Universally Unique
+ * IDentifiers (UUIDs)
+
+ *
+ * Sample V7 value:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#name-example-of-a-uuidv7-value
+ *
+ * Monotonic Bit Layout: RFC rfc9562.6.2 Method 1, Dedicated Counter Bits ref:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#section-6.2-5.1
+ *
+ * 0 1 2 3 0 1 2 3 4 5 6
+ * 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms | ver | seq_hi |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |var| seq_low | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * seq is a 31 bit serialized counter; comprised of 12 bit seq_hi and 19 bit
+ * seq_low, and randomly initialized upon timestamp change. 31 bit counter size
+ * was selected as any bitwise operations in node are done as _signed_ 32 bit
+ * ints. we exclude the sign bit.
+ */
+
+var _seqLow = null;
+var _seqHigh = null;
+var _msecs = 0;
+function v7(options, buf, offset) {
+ options = options || {};
+
+ // initialize buffer and pointer
+ var i = buf && offset || 0;
+ var b = buf || new Uint8Array(16);
+
+ // rnds is Uint8Array(16) filled with random bytes
+ var rnds = options.random || (options.rng || rng)();
+
+ // milliseconds since unix epoch, 1970-01-01 00:00
+ var msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // seq is user provided 31 bit counter
+ var seq = options.seq !== undefined ? options.seq : null;
+
+ // initialize local seq high/low parts
+ var seqHigh = _seqHigh;
+ var seqLow = _seqLow;
+
+ // check if clock has advanced and user has not provided msecs
+ if (msecs > _msecs && options.msecs === undefined) {
+ _msecs = msecs;
+
+ // unless user provided seq, reset seq parts
+ if (seq !== null) {
+ seqHigh = null;
+ seqLow = null;
+ }
+ }
+
+ // if we have a user provided seq
+ if (seq !== null) {
+ // trim provided seq to 31 bits of value, avoiding overflow
+ if (seq > 0x7fffffff) {
+ seq = 0x7fffffff;
+ }
+
+ // split provided seq into high/low parts
+ seqHigh = seq >>> 19 & 0xfff;
+ seqLow = seq & 0x7ffff;
+ }
+
+ // randomly initialize seq
+ if (seqHigh === null || seqLow === null) {
+ seqHigh = rnds[6] & 0x7f;
+ seqHigh = seqHigh << 8 | rnds[7];
+ seqLow = rnds[8] & 0x3f; // pad for var
+ seqLow = seqLow << 8 | rnds[9];
+ seqLow = seqLow << 5 | rnds[10] >>> 3;
+ }
+
+ // increment seq if within msecs window
+ if (msecs + 10000 > _msecs && seq === null) {
+ if (++seqLow > 0x7ffff) {
+ seqLow = 0;
+ if (++seqHigh > 0xfff) {
+ seqHigh = 0;
+
+ // increment internal _msecs. this allows us to continue incrementing
+ // while staying monotonic. Note, once we hit 10k milliseconds beyond system
+ // clock, we will reset breaking monotonicity (after (2^31)*10000 generations)
+ _msecs++;
+ }
+ }
+ } else {
+ // resetting; we have advanced more than
+ // 10k milliseconds beyond system clock
+ _msecs = msecs;
+ }
+ _seqHigh = seqHigh;
+ _seqLow = seqLow;
+
+ // [bytes 0-5] 48 bits of local timestamp
+ b[i++] = _msecs / 0x10000000000 & 0xff;
+ b[i++] = _msecs / 0x100000000 & 0xff;
+ b[i++] = _msecs / 0x1000000 & 0xff;
+ b[i++] = _msecs / 0x10000 & 0xff;
+ b[i++] = _msecs / 0x100 & 0xff;
+ b[i++] = _msecs & 0xff;
+
+ // [byte 6] - set 4 bits of version (7) with first 4 bits seq_hi
+ b[i++] = seqHigh >>> 4 & 0x0f | 0x70;
+
+ // [byte 7] remaining 8 bits of seq_hi
+ b[i++] = seqHigh & 0xff;
+
+ // [byte 8] - variant (2 bits), first 6 bits seq_low
+ b[i++] = seqLow >>> 13 & 0x3f | 0x80;
+
+ // [byte 9] 8 bits seq_low
+ b[i++] = seqLow >>> 5 & 0xff;
+
+ // [byte 10] remaining 5 bits seq_low, 3 bits random
+ b[i++] = seqLow << 3 & 0xff | rnds[10] & 0x07;
+
+ // [bytes 11-15] always random
+ b[i++] = rnds[11];
+ b[i++] = rnds[12];
+ b[i++] = rnds[13];
+ b[i++] = rnds[14];
+ b[i++] = rnds[15];
+ return buf || unsafeStringify(b);
+}
+export default v7;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/validate.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/validate.js
new file mode 100644
index 000000000..6e40fa587
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/validate.js
@@ -0,0 +1,5 @@
+import REGEX from './regex.js';
+function validate(uuid) {
+ return typeof uuid === 'string' && REGEX.test(uuid);
+}
+export default validate;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/version.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/version.js
new file mode 100644
index 000000000..4ca924eed
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-browser/version.js
@@ -0,0 +1,8 @@
+import validate from './validate.js';
+function version(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ return parseInt(uuid.slice(14, 15), 16);
+}
+export default version;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/index.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/index.js
new file mode 100644
index 000000000..45214b37b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/index.js
@@ -0,0 +1,14 @@
+export { default as MAX } from './max.js';
+export { default as NIL } from './nil.js';
+export { default as parse } from './parse.js';
+export { default as stringify } from './stringify.js';
+export { default as v1 } from './v1.js';
+export { default as v1ToV6 } from './v1ToV6.js';
+export { default as v3 } from './v3.js';
+export { default as v4 } from './v4.js';
+export { default as v5 } from './v5.js';
+export { default as v6 } from './v6.js';
+export { default as v6ToV1 } from './v6ToV1.js';
+export { default as v7 } from './v7.js';
+export { default as validate } from './validate.js';
+export { default as version } from './version.js';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/max.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/max.js
new file mode 100644
index 000000000..f46a281f5
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/max.js
@@ -0,0 +1 @@
+export default 'ffffffff-ffff-ffff-ffff-ffffffffffff';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/md5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/md5.js
new file mode 100644
index 000000000..b3d890ea4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/md5.js
@@ -0,0 +1,10 @@
+import crypto from 'node:crypto';
+function md5(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ return crypto.createHash('md5').update(bytes).digest();
+}
+export default md5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/native.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/native.js
new file mode 100644
index 000000000..d688de1d3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/native.js
@@ -0,0 +1,4 @@
+import crypto from 'node:crypto';
+export default {
+ randomUUID: crypto.randomUUID
+};
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/nil.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/nil.js
new file mode 100644
index 000000000..b36324c2a
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/nil.js
@@ -0,0 +1 @@
+export default '00000000-0000-0000-0000-000000000000';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/parse.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/parse.js
new file mode 100644
index 000000000..80851ffab
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/parse.js
@@ -0,0 +1,37 @@
+import validate from './validate.js';
+function parse(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ let v;
+ const arr = new Uint8Array(16);
+
+ // Parse ########-....-....-....-............
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
+ arr[1] = v >>> 16 & 0xff;
+ arr[2] = v >>> 8 & 0xff;
+ arr[3] = v & 0xff;
+
+ // Parse ........-####-....-....-............
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
+ arr[5] = v & 0xff;
+
+ // Parse ........-....-####-....-............
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
+ arr[7] = v & 0xff;
+
+ // Parse ........-....-....-####-............
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
+ arr[9] = v & 0xff;
+
+ // Parse ........-....-....-....-############
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
+ arr[11] = v / 0x100000000 & 0xff;
+ arr[12] = v >>> 24 & 0xff;
+ arr[13] = v >>> 16 & 0xff;
+ arr[14] = v >>> 8 & 0xff;
+ arr[15] = v & 0xff;
+ return arr;
+}
+export default parse;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/regex.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/regex.js
new file mode 100644
index 000000000..848a1fea3
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/regex.js
@@ -0,0 +1 @@
+export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/rng.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/rng.js
new file mode 100644
index 000000000..69ee52417
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/rng.js
@@ -0,0 +1,10 @@
+import crypto from 'node:crypto';
+const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
+let poolPtr = rnds8Pool.length;
+export default function rng() {
+ if (poolPtr > rnds8Pool.length - 16) {
+ crypto.randomFillSync(rnds8Pool);
+ poolPtr = 0;
+ }
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/sha1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/sha1.js
new file mode 100644
index 000000000..22217871d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/sha1.js
@@ -0,0 +1,10 @@
+import crypto from 'node:crypto';
+function sha1(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ return crypto.createHash('sha1').update(bytes).digest();
+}
+export default sha1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/stringify.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/stringify.js
new file mode 100644
index 000000000..7792d4e1e
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/stringify.js
@@ -0,0 +1,31 @@
+import validate from './validate.js';
+
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+const byteToHex = [];
+for (let i = 0; i < 256; ++i) {
+ byteToHex.push((i + 0x100).toString(16).slice(1));
+}
+export function unsafeStringify(arr, offset = 0) {
+ // Note: Be careful editing this code! It's been tuned for performance
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+ //
+ // Note to future-self: No, you can't remove the `toLowerCase()` call.
+ // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
+}
+function stringify(arr, offset = 0) {
+ const uuid = unsafeStringify(arr, offset);
+ // Consistency check for valid UUID. If this throws, it's likely due to one
+ // of the following:
+ // - One or more input array values don't map to a hex octet (leading to
+ // "undefined" in the uuid)
+ // - Invalid input values for the RFC `version` or `variant` fields
+ if (!validate(uuid)) {
+ throw TypeError('Stringified UUID is invalid');
+ }
+ return uuid;
+}
+export default stringify;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v1.js
new file mode 100644
index 000000000..6bf0b1c6d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v1.js
@@ -0,0 +1,125 @@
+import rng from './rng.js';
+import { unsafeStringify } from './stringify.js';
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+let _nodeId;
+let _clockseq;
+
+// Previous uuid creation time
+let _lastMSecs = 0;
+let _lastNSecs = 0;
+
+// See https://github.com/uuidjs/uuid for API details
+function v1(options, buf, offset) {
+ let i = buf && offset || 0;
+ const b = buf || new Array(16);
+ options = options || {};
+ let node = options.node;
+ let clockseq = options.clockseq;
+
+ // v1 only: Use cached `node` and `clockseq` values
+ if (!options._v6) {
+ if (!node) {
+ node = _nodeId;
+ }
+ if (clockseq == null) {
+ clockseq = _clockseq;
+ }
+ }
+
+ // Handle cases where we need entropy. We do this lazily to minimize issues
+ // related to insufficient system entropy. See #189
+ if (node == null || clockseq == null) {
+ const seedBytes = options.random || (options.rng || rng)();
+
+ // Randomize node
+ if (node == null) {
+ node = [seedBytes[0], seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
+
+ // v1 only: cache node value for reuse
+ if (!_nodeId && !options._v6) {
+ // per RFC4122 4.5: Set MAC multicast bit (v1 only)
+ node[0] |= 0x01; // Set multicast bit
+
+ _nodeId = node;
+ }
+ }
+
+ // Randomize clockseq
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ if (_clockseq === undefined && !options._v6) {
+ _clockseq = clockseq;
+ }
+ }
+ }
+
+ // v1 & v6 timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so time is
+ // handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ let msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
+ }
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ for (let n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+ return buf || unsafeStringify(b);
+}
+export default v1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v1ToV6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v1ToV6.js
new file mode 100644
index 000000000..15aea2fb2
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v1ToV6.js
@@ -0,0 +1,20 @@
+import parse from './parse.js';
+import { unsafeStringify } from './stringify.js';
+
+/**
+ * Convert a v1 UUID to a v6 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v1 UUID to convert to v6
+ * @returns {string|Uint8Array} The v6 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+export default function v1ToV6(uuid) {
+ const v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;
+ const v6Bytes = _v1ToV6(v1Bytes);
+ return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes;
+}
+
+// Do the field transformation needed for v1 -> v6
+function _v1ToV6(v1Bytes, randomize = false) {
+ return Uint8Array.of((v1Bytes[6] & 0x0f) << 4 | v1Bytes[7] >> 4 & 0x0f, (v1Bytes[7] & 0x0f) << 4 | (v1Bytes[4] & 0xf0) >> 4, (v1Bytes[4] & 0x0f) << 4 | (v1Bytes[5] & 0xf0) >> 4, (v1Bytes[5] & 0x0f) << 4 | (v1Bytes[0] & 0xf0) >> 4, (v1Bytes[0] & 0x0f) << 4 | (v1Bytes[1] & 0xf0) >> 4, (v1Bytes[1] & 0x0f) << 4 | (v1Bytes[2] & 0xf0) >> 4, 0x60 | v1Bytes[2] & 0x0f, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v3.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v3.js
new file mode 100644
index 000000000..09063b860
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v3.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import md5 from './md5.js';
+const v3 = v35('v3', 0x30, md5);
+export default v3;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v35.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v35.js
new file mode 100644
index 000000000..013c86962
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v35.js
@@ -0,0 +1,55 @@
+import { unsafeStringify } from './stringify.js';
+import parse from './parse.js';
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+
+ const bytes = [];
+ for (let i = 0; i < str.length; ++i) {
+ bytes.push(str.charCodeAt(i));
+ }
+ return bytes;
+}
+export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+export default function v35(name, version, hashfunc) {
+ function generateUUID(value, namespace, buf, offset) {
+ var _namespace;
+ if (typeof value === 'string') {
+ value = stringToBytes(value);
+ }
+ if (typeof namespace === 'string') {
+ namespace = parse(namespace);
+ }
+ if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
+ }
+
+ // Compute hash of namespace and value, Per 4.3
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
+ // hashfunc([...namespace, ... value])`
+ let bytes = new Uint8Array(16 + value.length);
+ bytes.set(namespace);
+ bytes.set(value, namespace.length);
+ bytes = hashfunc(bytes);
+ bytes[6] = bytes[6] & 0x0f | version;
+ bytes[8] = bytes[8] & 0x3f | 0x80;
+ if (buf) {
+ offset = offset || 0;
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return unsafeStringify(bytes);
+ }
+
+ // Function#name is not settable on some platforms (#270)
+ try {
+ generateUUID.name = name;
+ } catch (err) {}
+
+ // For CommonJS default export support
+ generateUUID.DNS = DNS;
+ generateUUID.URL = URL;
+ return generateUUID;
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v4.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v4.js
new file mode 100644
index 000000000..ed1db71ed
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v4.js
@@ -0,0 +1,25 @@
+import native from './native.js';
+import rng from './rng.js';
+import { unsafeStringify } from './stringify.js';
+function v4(options, buf, offset) {
+ if (native.randomUUID && !buf && !options) {
+ return native.randomUUID();
+ }
+ options = options || {};
+ const rnds = options.random || (options.rng || rng)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = rnds[6] & 0x0f | 0x40;
+ rnds[8] = rnds[8] & 0x3f | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ offset = offset || 0;
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = rnds[i];
+ }
+ return buf;
+ }
+ return unsafeStringify(rnds);
+}
+export default v4;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v5.js
new file mode 100644
index 000000000..e87fe317d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v5.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import sha1 from './sha1.js';
+const v5 = v35('v5', 0x50, sha1);
+export default v5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v6.js
new file mode 100644
index 000000000..673d025ef
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v6.js
@@ -0,0 +1,32 @@
+import { unsafeStringify } from './stringify.js';
+import v1 from './v1.js';
+import v1ToV6 from './v1ToV6.js';
+
+/**
+ *
+ * @param {object} options
+ * @param {Uint8Array=} buf
+ * @param {number=} offset
+ * @returns
+ */
+export default function v6(options = {}, buf, offset = 0) {
+ // v6 is v1 with different field layout, so we start with a v1 UUID, albeit
+ // with slightly different behavior around how the clock_seq and node fields
+ // are randomized, which is why we call v1 with _v6: true.
+ let bytes = v1({
+ ...options,
+ _v6: true
+ }, new Uint8Array(16));
+
+ // Reorder the fields to v6 layout.
+ bytes = v1ToV6(bytes);
+
+ // Return as a byte array if requested
+ if (buf) {
+ for (let i = 0; i < 16; i++) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return unsafeStringify(bytes);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v6ToV1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v6ToV1.js
new file mode 100644
index 000000000..e2fdfff68
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v6ToV1.js
@@ -0,0 +1,20 @@
+import parse from './parse.js';
+import { unsafeStringify } from './stringify.js';
+
+/**
+ * Convert a v6 UUID to a v1 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v6 UUID to convert to v6
+ * @returns {string|Uint8Array} The v1 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+export default function v6ToV1(uuid) {
+ const v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;
+ const v1Bytes = _v6ToV1(v6Bytes);
+ return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes;
+}
+
+// Do the field transformation needed for v6 -> v1
+function _v6ToV1(v6Bytes) {
+ return Uint8Array.of((v6Bytes[3] & 0x0f) << 4 | v6Bytes[4] >> 4 & 0x0f, (v6Bytes[4] & 0x0f) << 4 | (v6Bytes[5] & 0xf0) >> 4, (v6Bytes[5] & 0x0f) << 4 | v6Bytes[6] & 0x0f, v6Bytes[7], (v6Bytes[1] & 0x0f) << 4 | (v6Bytes[2] & 0xf0) >> 4, (v6Bytes[2] & 0x0f) << 4 | (v6Bytes[3] & 0xf0) >> 4, 0x10 | (v6Bytes[0] & 0xf0) >> 4, (v6Bytes[0] & 0x0f) << 4 | (v6Bytes[1] & 0xf0) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v7.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v7.js
new file mode 100644
index 000000000..18159e19b
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/v7.js
@@ -0,0 +1,146 @@
+import rng from './rng.js';
+import { unsafeStringify } from './stringify.js';
+
+/**
+ * UUID V7 - Unix Epoch time-based UUID
+ *
+ * The IETF has published RFC9562, introducing 3 new UUID versions (6,7,8). This
+ * implementation of V7 is based on the accepted, though not yet approved,
+ * revisions.
+ *
+ * RFC 9562:https://www.rfc-editor.org/rfc/rfc9562.html Universally Unique
+ * IDentifiers (UUIDs)
+
+ *
+ * Sample V7 value:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#name-example-of-a-uuidv7-value
+ *
+ * Monotonic Bit Layout: RFC rfc9562.6.2 Method 1, Dedicated Counter Bits ref:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#section-6.2-5.1
+ *
+ * 0 1 2 3 0 1 2 3 4 5 6
+ * 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms | ver | seq_hi |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |var| seq_low | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * seq is a 31 bit serialized counter; comprised of 12 bit seq_hi and 19 bit
+ * seq_low, and randomly initialized upon timestamp change. 31 bit counter size
+ * was selected as any bitwise operations in node are done as _signed_ 32 bit
+ * ints. we exclude the sign bit.
+ */
+
+let _seqLow = null;
+let _seqHigh = null;
+let _msecs = 0;
+function v7(options, buf, offset) {
+ options = options || {};
+
+ // initialize buffer and pointer
+ let i = buf && offset || 0;
+ const b = buf || new Uint8Array(16);
+
+ // rnds is Uint8Array(16) filled with random bytes
+ const rnds = options.random || (options.rng || rng)();
+
+ // milliseconds since unix epoch, 1970-01-01 00:00
+ const msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // seq is user provided 31 bit counter
+ let seq = options.seq !== undefined ? options.seq : null;
+
+ // initialize local seq high/low parts
+ let seqHigh = _seqHigh;
+ let seqLow = _seqLow;
+
+ // check if clock has advanced and user has not provided msecs
+ if (msecs > _msecs && options.msecs === undefined) {
+ _msecs = msecs;
+
+ // unless user provided seq, reset seq parts
+ if (seq !== null) {
+ seqHigh = null;
+ seqLow = null;
+ }
+ }
+
+ // if we have a user provided seq
+ if (seq !== null) {
+ // trim provided seq to 31 bits of value, avoiding overflow
+ if (seq > 0x7fffffff) {
+ seq = 0x7fffffff;
+ }
+
+ // split provided seq into high/low parts
+ seqHigh = seq >>> 19 & 0xfff;
+ seqLow = seq & 0x7ffff;
+ }
+
+ // randomly initialize seq
+ if (seqHigh === null || seqLow === null) {
+ seqHigh = rnds[6] & 0x7f;
+ seqHigh = seqHigh << 8 | rnds[7];
+ seqLow = rnds[8] & 0x3f; // pad for var
+ seqLow = seqLow << 8 | rnds[9];
+ seqLow = seqLow << 5 | rnds[10] >>> 3;
+ }
+
+ // increment seq if within msecs window
+ if (msecs + 10000 > _msecs && seq === null) {
+ if (++seqLow > 0x7ffff) {
+ seqLow = 0;
+ if (++seqHigh > 0xfff) {
+ seqHigh = 0;
+
+ // increment internal _msecs. this allows us to continue incrementing
+ // while staying monotonic. Note, once we hit 10k milliseconds beyond system
+ // clock, we will reset breaking monotonicity (after (2^31)*10000 generations)
+ _msecs++;
+ }
+ }
+ } else {
+ // resetting; we have advanced more than
+ // 10k milliseconds beyond system clock
+ _msecs = msecs;
+ }
+ _seqHigh = seqHigh;
+ _seqLow = seqLow;
+
+ // [bytes 0-5] 48 bits of local timestamp
+ b[i++] = _msecs / 0x10000000000 & 0xff;
+ b[i++] = _msecs / 0x100000000 & 0xff;
+ b[i++] = _msecs / 0x1000000 & 0xff;
+ b[i++] = _msecs / 0x10000 & 0xff;
+ b[i++] = _msecs / 0x100 & 0xff;
+ b[i++] = _msecs & 0xff;
+
+ // [byte 6] - set 4 bits of version (7) with first 4 bits seq_hi
+ b[i++] = seqHigh >>> 4 & 0x0f | 0x70;
+
+ // [byte 7] remaining 8 bits of seq_hi
+ b[i++] = seqHigh & 0xff;
+
+ // [byte 8] - variant (2 bits), first 6 bits seq_low
+ b[i++] = seqLow >>> 13 & 0x3f | 0x80;
+
+ // [byte 9] 8 bits seq_low
+ b[i++] = seqLow >>> 5 & 0xff;
+
+ // [byte 10] remaining 5 bits seq_low, 3 bits random
+ b[i++] = seqLow << 3 & 0xff | rnds[10] & 0x07;
+
+ // [bytes 11-15] always random
+ b[i++] = rnds[11];
+ b[i++] = rnds[12];
+ b[i++] = rnds[13];
+ b[i++] = rnds[14];
+ b[i++] = rnds[15];
+ return buf || unsafeStringify(b);
+}
+export default v7;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/validate.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/validate.js
new file mode 100644
index 000000000..6e40fa587
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/validate.js
@@ -0,0 +1,5 @@
+import REGEX from './regex.js';
+function validate(uuid) {
+ return typeof uuid === 'string' && REGEX.test(uuid);
+}
+export default validate;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/version.js b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/version.js
new file mode 100644
index 000000000..4ca924eed
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/esm-node/version.js
@@ -0,0 +1,8 @@
+import validate from './validate.js';
+function version(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ return parseInt(uuid.slice(14, 15), 16);
+}
+export default version;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/index.js b/week-3/02-course-app-easy/node_modules/uuid/dist/index.js
new file mode 100644
index 000000000..cd6eb746e
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/index.js
@@ -0,0 +1,104 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "MAX", {
+ enumerable: true,
+ get: function () {
+ return _max.default;
+ }
+});
+Object.defineProperty(exports, "NIL", {
+ enumerable: true,
+ get: function () {
+ return _nil.default;
+ }
+});
+Object.defineProperty(exports, "parse", {
+ enumerable: true,
+ get: function () {
+ return _parse.default;
+ }
+});
+Object.defineProperty(exports, "stringify", {
+ enumerable: true,
+ get: function () {
+ return _stringify.default;
+ }
+});
+Object.defineProperty(exports, "v1", {
+ enumerable: true,
+ get: function () {
+ return _v.default;
+ }
+});
+Object.defineProperty(exports, "v1ToV6", {
+ enumerable: true,
+ get: function () {
+ return _v1ToV.default;
+ }
+});
+Object.defineProperty(exports, "v3", {
+ enumerable: true,
+ get: function () {
+ return _v2.default;
+ }
+});
+Object.defineProperty(exports, "v4", {
+ enumerable: true,
+ get: function () {
+ return _v3.default;
+ }
+});
+Object.defineProperty(exports, "v5", {
+ enumerable: true,
+ get: function () {
+ return _v4.default;
+ }
+});
+Object.defineProperty(exports, "v6", {
+ enumerable: true,
+ get: function () {
+ return _v5.default;
+ }
+});
+Object.defineProperty(exports, "v6ToV1", {
+ enumerable: true,
+ get: function () {
+ return _v6ToV.default;
+ }
+});
+Object.defineProperty(exports, "v7", {
+ enumerable: true,
+ get: function () {
+ return _v6.default;
+ }
+});
+Object.defineProperty(exports, "validate", {
+ enumerable: true,
+ get: function () {
+ return _validate.default;
+ }
+});
+Object.defineProperty(exports, "version", {
+ enumerable: true,
+ get: function () {
+ return _version.default;
+ }
+});
+var _max = _interopRequireDefault(require("./max.js"));
+var _nil = _interopRequireDefault(require("./nil.js"));
+var _parse = _interopRequireDefault(require("./parse.js"));
+var _stringify = _interopRequireDefault(require("./stringify.js"));
+var _v = _interopRequireDefault(require("./v1.js"));
+var _v1ToV = _interopRequireDefault(require("./v1ToV6.js"));
+var _v2 = _interopRequireDefault(require("./v3.js"));
+var _v3 = _interopRequireDefault(require("./v4.js"));
+var _v4 = _interopRequireDefault(require("./v5.js"));
+var _v5 = _interopRequireDefault(require("./v6.js"));
+var _v6ToV = _interopRequireDefault(require("./v6ToV1.js"));
+var _v6 = _interopRequireDefault(require("./v7.js"));
+var _validate = _interopRequireDefault(require("./validate.js"));
+var _version = _interopRequireDefault(require("./version.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/max.js b/week-3/02-course-app-easy/node_modules/uuid/dist/max.js
new file mode 100644
index 000000000..8de76f84e
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/max.js
@@ -0,0 +1,7 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = exports.default = 'ffffffff-ffff-ffff-ffff-ffffffffffff';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/md5-browser.js b/week-3/02-course-app-easy/node_modules/uuid/dist/md5-browser.js
new file mode 100644
index 000000000..f0d31f5a4
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/md5-browser.js
@@ -0,0 +1,200 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+/*
+ * Browser-compatible JavaScript MD5
+ *
+ * Modification of JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * https://opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+function md5(bytes) {
+ if (typeof bytes === 'string') {
+ const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = new Uint8Array(msg.length);
+ for (let i = 0; i < msg.length; ++i) {
+ bytes[i] = msg.charCodeAt(i);
+ }
+ }
+ return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
+}
+
+/*
+ * Convert an array of little-endian words to an array of bytes
+ */
+function md5ToHexEncodedArray(input) {
+ const output = [];
+ const length32 = input.length * 32;
+ const hexTab = '0123456789abcdef';
+ for (let i = 0; i < length32; i += 8) {
+ const x = input[i >> 5] >>> i % 32 & 0xff;
+ const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
+ output.push(hex);
+ }
+ return output;
+}
+
+/**
+ * Calculate output length with padding and bit length
+ */
+function getOutputLength(inputLength8) {
+ return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
+}
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
+ */
+function wordsToMd5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << len % 32;
+ x[getOutputLength(len) - 1] = len;
+ let a = 1732584193;
+ let b = -271733879;
+ let c = -1732584194;
+ let d = 271733878;
+ for (let i = 0; i < x.length; i += 16) {
+ const olda = a;
+ const oldb = b;
+ const oldc = c;
+ const oldd = d;
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+ a = safeAdd(a, olda);
+ b = safeAdd(b, oldb);
+ c = safeAdd(c, oldc);
+ d = safeAdd(d, oldd);
+ }
+ return [a, b, c, d];
+}
+
+/*
+ * Convert an array bytes to an array of little-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+function bytesToWords(input) {
+ if (input.length === 0) {
+ return [];
+ }
+ const length8 = input.length * 8;
+ const output = new Uint32Array(getOutputLength(length8));
+ for (let i = 0; i < length8; i += 8) {
+ output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
+ }
+ return output;
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safeAdd(x, y) {
+ const lsw = (x & 0xffff) + (y & 0xffff);
+ const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return msw << 16 | lsw & 0xffff;
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bitRotateLeft(num, cnt) {
+ return num << cnt | num >>> 32 - cnt;
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5cmn(q, a, b, x, s, t) {
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
+}
+function md5ff(a, b, c, d, x, s, t) {
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
+}
+function md5gg(a, b, c, d, x, s, t) {
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
+}
+function md5hh(a, b, c, d, x, s, t) {
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5ii(a, b, c, d, x, s, t) {
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
+}
+var _default = exports.default = md5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/md5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/md5.js
new file mode 100644
index 000000000..135b24df6
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/md5.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _nodeCrypto = _interopRequireDefault(require("node:crypto"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function md5(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ return _nodeCrypto.default.createHash('md5').update(bytes).digest();
+}
+var _default = exports.default = md5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/native-browser.js b/week-3/02-course-app-easy/node_modules/uuid/dist/native-browser.js
new file mode 100644
index 000000000..bc5d3830c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/native-browser.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
+var _default = exports.default = {
+ randomUUID
+};
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/native.js b/week-3/02-course-app-easy/node_modules/uuid/dist/native.js
new file mode 100644
index 000000000..4c273c559
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/native.js
@@ -0,0 +1,11 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _nodeCrypto = _interopRequireDefault(require("node:crypto"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+var _default = exports.default = {
+ randomUUID: _nodeCrypto.default.randomUUID
+};
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/nil.js b/week-3/02-course-app-easy/node_modules/uuid/dist/nil.js
new file mode 100644
index 000000000..f7967e90c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/nil.js
@@ -0,0 +1,7 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = exports.default = '00000000-0000-0000-0000-000000000000';
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/parse.js b/week-3/02-course-app-easy/node_modules/uuid/dist/parse.js
new file mode 100644
index 000000000..1707c9080
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/parse.js
@@ -0,0 +1,44 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _validate = _interopRequireDefault(require("./validate.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function parse(uuid) {
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ let v;
+ const arr = new Uint8Array(16);
+
+ // Parse ########-....-....-....-............
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
+ arr[1] = v >>> 16 & 0xff;
+ arr[2] = v >>> 8 & 0xff;
+ arr[3] = v & 0xff;
+
+ // Parse ........-####-....-....-............
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
+ arr[5] = v & 0xff;
+
+ // Parse ........-....-####-....-............
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
+ arr[7] = v & 0xff;
+
+ // Parse ........-....-....-####-............
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
+ arr[9] = v & 0xff;
+
+ // Parse ........-....-....-....-############
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
+ arr[11] = v / 0x100000000 & 0xff;
+ arr[12] = v >>> 24 & 0xff;
+ arr[13] = v >>> 16 & 0xff;
+ arr[14] = v >>> 8 & 0xff;
+ arr[15] = v & 0xff;
+ return arr;
+}
+var _default = exports.default = parse;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/regex.js b/week-3/02-course-app-easy/node_modules/uuid/dist/regex.js
new file mode 100644
index 000000000..fc02a88e8
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/regex.js
@@ -0,0 +1,7 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = exports.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/rng-browser.js b/week-3/02-course-app-easy/node_modules/uuid/dist/rng-browser.js
new file mode 100644
index 000000000..e257738fe
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/rng-browser.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rng;
+// Unique ID creation requires a high quality random # generator. In the browser we therefore
+// require the crypto API and do not support built-in fallback to lower quality random number
+// generators (like Math.random()).
+
+let getRandomValues;
+const rnds8 = new Uint8Array(16);
+function rng() {
+ // lazy load so that environments that need to polyfill have a chance to do so
+ if (!getRandomValues) {
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
+ if (!getRandomValues) {
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
+ }
+ }
+ return getRandomValues(rnds8);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/rng.js b/week-3/02-course-app-easy/node_modules/uuid/dist/rng.js
new file mode 100644
index 000000000..f5eb9a1d5
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/rng.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rng;
+var _nodeCrypto = _interopRequireDefault(require("node:crypto"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
+let poolPtr = rnds8Pool.length;
+function rng() {
+ if (poolPtr > rnds8Pool.length - 16) {
+ _nodeCrypto.default.randomFillSync(rnds8Pool);
+ poolPtr = 0;
+ }
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/sha1-browser.js b/week-3/02-course-app-easy/node_modules/uuid/dist/sha1-browser.js
new file mode 100644
index 000000000..ded98db2c
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/sha1-browser.js
@@ -0,0 +1,82 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+// Adapted from Chris Veness' SHA1 code at
+// http://www.movable-type.co.uk/scripts/sha1.html
+function f(s, x, y, z) {
+ switch (s) {
+ case 0:
+ return x & y ^ ~x & z;
+ case 1:
+ return x ^ y ^ z;
+ case 2:
+ return x & y ^ x & z ^ y & z;
+ case 3:
+ return x ^ y ^ z;
+ }
+}
+function ROTL(x, n) {
+ return x << n | x >>> 32 - n;
+}
+function sha1(bytes) {
+ const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
+ const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
+ if (typeof bytes === 'string') {
+ const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = [];
+ for (let i = 0; i < msg.length; ++i) {
+ bytes.push(msg.charCodeAt(i));
+ }
+ } else if (!Array.isArray(bytes)) {
+ // Convert Array-like to Array
+ bytes = Array.prototype.slice.call(bytes);
+ }
+ bytes.push(0x80);
+ const l = bytes.length / 4 + 2;
+ const N = Math.ceil(l / 16);
+ const M = new Array(N);
+ for (let i = 0; i < N; ++i) {
+ const arr = new Uint32Array(16);
+ for (let j = 0; j < 16; ++j) {
+ arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
+ }
+ M[i] = arr;
+ }
+ M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
+ M[N - 1][14] = Math.floor(M[N - 1][14]);
+ M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
+ for (let i = 0; i < N; ++i) {
+ const W = new Uint32Array(80);
+ for (let t = 0; t < 16; ++t) {
+ W[t] = M[i][t];
+ }
+ for (let t = 16; t < 80; ++t) {
+ W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
+ }
+ let a = H[0];
+ let b = H[1];
+ let c = H[2];
+ let d = H[3];
+ let e = H[4];
+ for (let t = 0; t < 80; ++t) {
+ const s = Math.floor(t / 20);
+ const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
+ e = d;
+ d = c;
+ c = ROTL(b, 30) >>> 0;
+ b = a;
+ a = T;
+ }
+ H[0] = H[0] + a >>> 0;
+ H[1] = H[1] + b >>> 0;
+ H[2] = H[2] + c >>> 0;
+ H[3] = H[3] + d >>> 0;
+ H[4] = H[4] + e >>> 0;
+ }
+ return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
+}
+var _default = exports.default = sha1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/sha1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/sha1.js
new file mode 100644
index 000000000..3b9ded990
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/sha1.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _nodeCrypto = _interopRequireDefault(require("node:crypto"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function sha1(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ return _nodeCrypto.default.createHash('sha1').update(bytes).digest();
+}
+var _default = exports.default = sha1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/stringify.js b/week-3/02-course-app-easy/node_modules/uuid/dist/stringify.js
new file mode 100644
index 000000000..2522dc978
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/stringify.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+exports.unsafeStringify = unsafeStringify;
+var _validate = _interopRequireDefault(require("./validate.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+const byteToHex = [];
+for (let i = 0; i < 256; ++i) {
+ byteToHex.push((i + 0x100).toString(16).slice(1));
+}
+function unsafeStringify(arr, offset = 0) {
+ // Note: Be careful editing this code! It's been tuned for performance
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+ //
+ // Note to future-self: No, you can't remove the `toLowerCase()` call.
+ // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
+}
+function stringify(arr, offset = 0) {
+ const uuid = unsafeStringify(arr, offset);
+ // Consistency check for valid UUID. If this throws, it's likely due to one
+ // of the following:
+ // - One or more input array values don't map to a hex octet (leading to
+ // "undefined" in the uuid)
+ // - Invalid input values for the RFC `version` or `variant` fields
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Stringified UUID is invalid');
+ }
+ return uuid;
+}
+var _default = exports.default = stringify;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/uuid-bin.js b/week-3/02-course-app-easy/node_modules/uuid/dist/uuid-bin.js
new file mode 100644
index 000000000..d039dfe01
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/uuid-bin.js
@@ -0,0 +1,75 @@
+"use strict";
+
+var _assert = _interopRequireDefault(require("assert"));
+var _v = _interopRequireDefault(require("./v1.js"));
+var _v2 = _interopRequireDefault(require("./v3.js"));
+var _v3 = _interopRequireDefault(require("./v4.js"));
+var _v4 = _interopRequireDefault(require("./v5.js"));
+var _v5 = _interopRequireDefault(require("./v6.js"));
+var _v6 = _interopRequireDefault(require("./v7.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function usage() {
+ console.log('Usage:');
+ console.log(' uuid');
+ console.log(' uuid v1');
+ console.log(' uuid v3 ');
+ console.log(' uuid v4');
+ console.log(' uuid v5 ');
+ console.log(' uuid v6');
+ console.log(' uuid v7');
+ console.log(' uuid --help');
+ console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562');
+}
+const args = process.argv.slice(2);
+if (args.indexOf('--help') >= 0) {
+ usage();
+ process.exit(0);
+}
+const version = args.shift() || 'v4';
+switch (version) {
+ case 'v1':
+ console.log((0, _v.default)());
+ break;
+ case 'v3':
+ {
+ const name = args.shift();
+ let namespace = args.shift();
+ (0, _assert.default)(name != null, 'v3 name not specified');
+ (0, _assert.default)(namespace != null, 'v3 namespace not specified');
+ if (namespace === 'URL') {
+ namespace = _v2.default.URL;
+ }
+ if (namespace === 'DNS') {
+ namespace = _v2.default.DNS;
+ }
+ console.log((0, _v2.default)(name, namespace));
+ break;
+ }
+ case 'v4':
+ console.log((0, _v3.default)());
+ break;
+ case 'v5':
+ {
+ const name = args.shift();
+ let namespace = args.shift();
+ (0, _assert.default)(name != null, 'v5 name not specified');
+ (0, _assert.default)(namespace != null, 'v5 namespace not specified');
+ if (namespace === 'URL') {
+ namespace = _v4.default.URL;
+ }
+ if (namespace === 'DNS') {
+ namespace = _v4.default.DNS;
+ }
+ console.log((0, _v4.default)(name, namespace));
+ break;
+ }
+ case 'v6':
+ console.log((0, _v5.default)());
+ break;
+ case 'v7':
+ console.log((0, _v6.default)());
+ break;
+ default:
+ usage();
+ process.exit(1);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v1.js
new file mode 100644
index 000000000..c6b9344ad
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v1.js
@@ -0,0 +1,131 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _rng = _interopRequireDefault(require("./rng.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+let _nodeId;
+let _clockseq;
+
+// Previous uuid creation time
+let _lastMSecs = 0;
+let _lastNSecs = 0;
+
+// See https://github.com/uuidjs/uuid for API details
+function v1(options, buf, offset) {
+ let i = buf && offset || 0;
+ const b = buf || new Array(16);
+ options = options || {};
+ let node = options.node;
+ let clockseq = options.clockseq;
+
+ // v1 only: Use cached `node` and `clockseq` values
+ if (!options._v6) {
+ if (!node) {
+ node = _nodeId;
+ }
+ if (clockseq == null) {
+ clockseq = _clockseq;
+ }
+ }
+
+ // Handle cases where we need entropy. We do this lazily to minimize issues
+ // related to insufficient system entropy. See #189
+ if (node == null || clockseq == null) {
+ const seedBytes = options.random || (options.rng || _rng.default)();
+
+ // Randomize node
+ if (node == null) {
+ node = [seedBytes[0], seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
+
+ // v1 only: cache node value for reuse
+ if (!_nodeId && !options._v6) {
+ // per RFC4122 4.5: Set MAC multicast bit (v1 only)
+ node[0] |= 0x01; // Set multicast bit
+
+ _nodeId = node;
+ }
+ }
+
+ // Randomize clockseq
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ if (_clockseq === undefined && !options._v6) {
+ _clockseq = clockseq;
+ }
+ }
+ }
+
+ // v1 & v6 timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so time is
+ // handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ let msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
+ }
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ for (let n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+ return buf || (0, _stringify.unsafeStringify)(b);
+}
+var _default = exports.default = v1;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v1ToV6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v1ToV6.js
new file mode 100644
index 000000000..ce5637347
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v1ToV6.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = v1ToV6;
+var _parse = _interopRequireDefault(require("./parse.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * Convert a v1 UUID to a v6 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v1 UUID to convert to v6
+ * @returns {string|Uint8Array} The v6 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+function v1ToV6(uuid) {
+ const v1Bytes = typeof uuid === 'string' ? (0, _parse.default)(uuid) : uuid;
+ const v6Bytes = _v1ToV6(v1Bytes);
+ return typeof uuid === 'string' ? (0, _stringify.unsafeStringify)(v6Bytes) : v6Bytes;
+}
+
+// Do the field transformation needed for v1 -> v6
+function _v1ToV6(v1Bytes, randomize = false) {
+ return Uint8Array.of((v1Bytes[6] & 0x0f) << 4 | v1Bytes[7] >> 4 & 0x0f, (v1Bytes[7] & 0x0f) << 4 | (v1Bytes[4] & 0xf0) >> 4, (v1Bytes[4] & 0x0f) << 4 | (v1Bytes[5] & 0xf0) >> 4, (v1Bytes[5] & 0x0f) << 4 | (v1Bytes[0] & 0xf0) >> 4, (v1Bytes[0] & 0x0f) << 4 | (v1Bytes[1] & 0xf0) >> 4, (v1Bytes[1] & 0x0f) << 4 | (v1Bytes[2] & 0xf0) >> 4, 0x60 | v1Bytes[2] & 0x0f, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v3.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v3.js
new file mode 100644
index 000000000..a3eed7e56
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v3.js
@@ -0,0 +1,11 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _v = _interopRequireDefault(require("./v35.js"));
+var _md = _interopRequireDefault(require("./md5.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+const v3 = (0, _v.default)('v3', 0x30, _md.default);
+var _default = exports.default = v3;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v35.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v35.js
new file mode 100644
index 000000000..f2e35ae22
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v35.js
@@ -0,0 +1,63 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.URL = exports.DNS = void 0;
+exports.default = v35;
+var _stringify = require("./stringify.js");
+var _parse = _interopRequireDefault(require("./parse.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+
+ const bytes = [];
+ for (let i = 0; i < str.length; ++i) {
+ bytes.push(str.charCodeAt(i));
+ }
+ return bytes;
+}
+const DNS = exports.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+const URL = exports.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+function v35(name, version, hashfunc) {
+ function generateUUID(value, namespace, buf, offset) {
+ var _namespace;
+ if (typeof value === 'string') {
+ value = stringToBytes(value);
+ }
+ if (typeof namespace === 'string') {
+ namespace = (0, _parse.default)(namespace);
+ }
+ if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
+ }
+
+ // Compute hash of namespace and value, Per 4.3
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
+ // hashfunc([...namespace, ... value])`
+ let bytes = new Uint8Array(16 + value.length);
+ bytes.set(namespace);
+ bytes.set(value, namespace.length);
+ bytes = hashfunc(bytes);
+ bytes[6] = bytes[6] & 0x0f | version;
+ bytes[8] = bytes[8] & 0x3f | 0x80;
+ if (buf) {
+ offset = offset || 0;
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return (0, _stringify.unsafeStringify)(bytes);
+ }
+
+ // Function#name is not settable on some platforms (#270)
+ try {
+ generateUUID.name = name;
+ } catch (err) {}
+
+ // For CommonJS default export support
+ generateUUID.DNS = DNS;
+ generateUUID.URL = URL;
+ return generateUUID;
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v4.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v4.js
new file mode 100644
index 000000000..6f2744b89
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v4.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _native = _interopRequireDefault(require("./native.js"));
+var _rng = _interopRequireDefault(require("./rng.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function v4(options, buf, offset) {
+ if (_native.default.randomUUID && !buf && !options) {
+ return _native.default.randomUUID();
+ }
+ options = options || {};
+ const rnds = options.random || (options.rng || _rng.default)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = rnds[6] & 0x0f | 0x40;
+ rnds[8] = rnds[8] & 0x3f | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ offset = offset || 0;
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = rnds[i];
+ }
+ return buf;
+ }
+ return (0, _stringify.unsafeStringify)(rnds);
+}
+var _default = exports.default = v4;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v5.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v5.js
new file mode 100644
index 000000000..63063bb27
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v5.js
@@ -0,0 +1,11 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _v = _interopRequireDefault(require("./v35.js"));
+var _sha = _interopRequireDefault(require("./sha1.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+const v5 = (0, _v.default)('v5', 0x50, _sha.default);
+var _default = exports.default = v5;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v6.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v6.js
new file mode 100644
index 000000000..627c6a7bb
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v6.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = v6;
+var _stringify = require("./stringify.js");
+var _v = _interopRequireDefault(require("./v1.js"));
+var _v1ToV = _interopRequireDefault(require("./v1ToV6.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ *
+ * @param {object} options
+ * @param {Uint8Array=} buf
+ * @param {number=} offset
+ * @returns
+ */
+function v6(options = {}, buf, offset = 0) {
+ // v6 is v1 with different field layout, so we start with a v1 UUID, albeit
+ // with slightly different behavior around how the clock_seq and node fields
+ // are randomized, which is why we call v1 with _v6: true.
+ let bytes = (0, _v.default)({
+ ...options,
+ _v6: true
+ }, new Uint8Array(16));
+
+ // Reorder the fields to v6 layout.
+ bytes = (0, _v1ToV.default)(bytes);
+
+ // Return as a byte array if requested
+ if (buf) {
+ for (let i = 0; i < 16; i++) {
+ buf[offset + i] = bytes[i];
+ }
+ return buf;
+ }
+ return (0, _stringify.unsafeStringify)(bytes);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v6ToV1.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v6ToV1.js
new file mode 100644
index 000000000..a01986100
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v6ToV1.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = v6ToV1;
+var _parse = _interopRequireDefault(require("./parse.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * Convert a v6 UUID to a v1 UUID
+ *
+ * @param {string|Uint8Array} uuid - The v6 UUID to convert to v6
+ * @returns {string|Uint8Array} The v1 UUID as the same type as the `uuid` arg
+ * (string or Uint8Array)
+ */
+function v6ToV1(uuid) {
+ const v6Bytes = typeof uuid === 'string' ? (0, _parse.default)(uuid) : uuid;
+ const v1Bytes = _v6ToV1(v6Bytes);
+ return typeof uuid === 'string' ? (0, _stringify.unsafeStringify)(v1Bytes) : v1Bytes;
+}
+
+// Do the field transformation needed for v6 -> v1
+function _v6ToV1(v6Bytes) {
+ return Uint8Array.of((v6Bytes[3] & 0x0f) << 4 | v6Bytes[4] >> 4 & 0x0f, (v6Bytes[4] & 0x0f) << 4 | (v6Bytes[5] & 0xf0) >> 4, (v6Bytes[5] & 0x0f) << 4 | v6Bytes[6] & 0x0f, v6Bytes[7], (v6Bytes[1] & 0x0f) << 4 | (v6Bytes[2] & 0xf0) >> 4, (v6Bytes[2] & 0x0f) << 4 | (v6Bytes[3] & 0xf0) >> 4, 0x10 | (v6Bytes[0] & 0xf0) >> 4, (v6Bytes[0] & 0x0f) << 4 | (v6Bytes[1] & 0xf0) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
+}
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/v7.js b/week-3/02-course-app-easy/node_modules/uuid/dist/v7.js
new file mode 100644
index 000000000..85831e12d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/v7.js
@@ -0,0 +1,152 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _rng = _interopRequireDefault(require("./rng.js"));
+var _stringify = require("./stringify.js");
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+/**
+ * UUID V7 - Unix Epoch time-based UUID
+ *
+ * The IETF has published RFC9562, introducing 3 new UUID versions (6,7,8). This
+ * implementation of V7 is based on the accepted, though not yet approved,
+ * revisions.
+ *
+ * RFC 9562:https://www.rfc-editor.org/rfc/rfc9562.html Universally Unique
+ * IDentifiers (UUIDs)
+
+ *
+ * Sample V7 value:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#name-example-of-a-uuidv7-value
+ *
+ * Monotonic Bit Layout: RFC rfc9562.6.2 Method 1, Dedicated Counter Bits ref:
+ * https://www.rfc-editor.org/rfc/rfc9562.html#section-6.2-5.1
+ *
+ * 0 1 2 3 0 1 2 3 4 5 6
+ * 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | unix_ts_ms | ver | seq_hi |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |var| seq_low | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | rand |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * seq is a 31 bit serialized counter; comprised of 12 bit seq_hi and 19 bit
+ * seq_low, and randomly initialized upon timestamp change. 31 bit counter size
+ * was selected as any bitwise operations in node are done as _signed_ 32 bit
+ * ints. we exclude the sign bit.
+ */
+
+let _seqLow = null;
+let _seqHigh = null;
+let _msecs = 0;
+function v7(options, buf, offset) {
+ options = options || {};
+
+ // initialize buffer and pointer
+ let i = buf && offset || 0;
+ const b = buf || new Uint8Array(16);
+
+ // rnds is Uint8Array(16) filled with random bytes
+ const rnds = options.random || (options.rng || _rng.default)();
+
+ // milliseconds since unix epoch, 1970-01-01 00:00
+ const msecs = options.msecs !== undefined ? options.msecs : Date.now();
+
+ // seq is user provided 31 bit counter
+ let seq = options.seq !== undefined ? options.seq : null;
+
+ // initialize local seq high/low parts
+ let seqHigh = _seqHigh;
+ let seqLow = _seqLow;
+
+ // check if clock has advanced and user has not provided msecs
+ if (msecs > _msecs && options.msecs === undefined) {
+ _msecs = msecs;
+
+ // unless user provided seq, reset seq parts
+ if (seq !== null) {
+ seqHigh = null;
+ seqLow = null;
+ }
+ }
+
+ // if we have a user provided seq
+ if (seq !== null) {
+ // trim provided seq to 31 bits of value, avoiding overflow
+ if (seq > 0x7fffffff) {
+ seq = 0x7fffffff;
+ }
+
+ // split provided seq into high/low parts
+ seqHigh = seq >>> 19 & 0xfff;
+ seqLow = seq & 0x7ffff;
+ }
+
+ // randomly initialize seq
+ if (seqHigh === null || seqLow === null) {
+ seqHigh = rnds[6] & 0x7f;
+ seqHigh = seqHigh << 8 | rnds[7];
+ seqLow = rnds[8] & 0x3f; // pad for var
+ seqLow = seqLow << 8 | rnds[9];
+ seqLow = seqLow << 5 | rnds[10] >>> 3;
+ }
+
+ // increment seq if within msecs window
+ if (msecs + 10000 > _msecs && seq === null) {
+ if (++seqLow > 0x7ffff) {
+ seqLow = 0;
+ if (++seqHigh > 0xfff) {
+ seqHigh = 0;
+
+ // increment internal _msecs. this allows us to continue incrementing
+ // while staying monotonic. Note, once we hit 10k milliseconds beyond system
+ // clock, we will reset breaking monotonicity (after (2^31)*10000 generations)
+ _msecs++;
+ }
+ }
+ } else {
+ // resetting; we have advanced more than
+ // 10k milliseconds beyond system clock
+ _msecs = msecs;
+ }
+ _seqHigh = seqHigh;
+ _seqLow = seqLow;
+
+ // [bytes 0-5] 48 bits of local timestamp
+ b[i++] = _msecs / 0x10000000000 & 0xff;
+ b[i++] = _msecs / 0x100000000 & 0xff;
+ b[i++] = _msecs / 0x1000000 & 0xff;
+ b[i++] = _msecs / 0x10000 & 0xff;
+ b[i++] = _msecs / 0x100 & 0xff;
+ b[i++] = _msecs & 0xff;
+
+ // [byte 6] - set 4 bits of version (7) with first 4 bits seq_hi
+ b[i++] = seqHigh >>> 4 & 0x0f | 0x70;
+
+ // [byte 7] remaining 8 bits of seq_hi
+ b[i++] = seqHigh & 0xff;
+
+ // [byte 8] - variant (2 bits), first 6 bits seq_low
+ b[i++] = seqLow >>> 13 & 0x3f | 0x80;
+
+ // [byte 9] 8 bits seq_low
+ b[i++] = seqLow >>> 5 & 0xff;
+
+ // [byte 10] remaining 5 bits seq_low, 3 bits random
+ b[i++] = seqLow << 3 & 0xff | rnds[10] & 0x07;
+
+ // [bytes 11-15] always random
+ b[i++] = rnds[11];
+ b[i++] = rnds[12];
+ b[i++] = rnds[13];
+ b[i++] = rnds[14];
+ b[i++] = rnds[15];
+ return buf || (0, _stringify.unsafeStringify)(b);
+}
+var _default = exports.default = v7;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/validate.js b/week-3/02-course-app-easy/node_modules/uuid/dist/validate.js
new file mode 100644
index 000000000..d47181aad
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/validate.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _regex = _interopRequireDefault(require("./regex.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function validate(uuid) {
+ return typeof uuid === 'string' && _regex.default.test(uuid);
+}
+var _default = exports.default = validate;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/dist/version.js b/week-3/02-course-app-easy/node_modules/uuid/dist/version.js
new file mode 100644
index 000000000..0c6bbdd5d
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/dist/version.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _validate = _interopRequireDefault(require("./validate.js"));
+function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
+function version(uuid) {
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+ return parseInt(uuid.slice(14, 15), 16);
+}
+var _default = exports.default = version;
\ No newline at end of file
diff --git a/week-3/02-course-app-easy/node_modules/uuid/package.json b/week-3/02-course-app-easy/node_modules/uuid/package.json
new file mode 100644
index 000000000..dea12c6e9
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/package.json
@@ -0,0 +1,142 @@
+{
+ "name": "uuid",
+ "version": "10.0.0",
+ "description": "RFC9562 UUIDs",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
+ "keywords": [
+ "uuid",
+ "guid",
+ "rfc4122",
+ "rfc9562"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ },
+ "sideEffects": false,
+ "main": "./dist/index.js",
+ "exports": {
+ ".": {
+ "node": {
+ "module": "./dist/esm-node/index.js",
+ "require": "./dist/index.js",
+ "import": "./wrapper.mjs"
+ },
+ "browser": {
+ "import": "./dist/esm-browser/index.js",
+ "require": "./dist/commonjs-browser/index.js"
+ },
+ "default": "./dist/esm-browser/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "module": "./dist/esm-node/index.js",
+ "browser": {
+ "./dist/esm-node/index.js": "./dist/esm-browser/index.js",
+ "./dist/md5.js": "./dist/md5-browser.js",
+ "./dist/native.js": "./dist/native-browser.js",
+ "./dist/rng.js": "./dist/rng-browser.js",
+ "./dist/sha1.js": "./dist/sha1-browser.js"
+ },
+ "files": [
+ "CHANGELOG.md",
+ "CONTRIBUTING.md",
+ "LICENSE.md",
+ "README.md",
+ "dist",
+ "wrapper.mjs"
+ ],
+ "devDependencies": {
+ "@babel/cli": "7.24.6",
+ "@babel/core": "7.24.6",
+ "@babel/eslint-parser": "7.24.6",
+ "@babel/plugin-syntax-import-attributes": "7.24.6",
+ "@babel/preset-env": "7.24.6",
+ "@commitlint/cli": "19.3.0",
+ "@commitlint/config-conventional": "19.2.2",
+ "@wdio/browserstack-service": "7.16.10",
+ "@wdio/cli": "7.16.10",
+ "@wdio/jasmine-framework": "7.16.6",
+ "@wdio/local-runner": "7.16.10",
+ "@wdio/spec-reporter": "7.16.9",
+ "@wdio/static-server-service": "7.16.6",
+ "bundlewatch": "0.3.3",
+ "eslint": "9.4.0",
+ "eslint-plugin-prettier": "5.1.3",
+ "globals": "15.3.0",
+ "husky": "9.0.11",
+ "jest": "29.7.0",
+ "lint-staged": "15.2.5",
+ "neostandard": "0.5.1",
+ "npm-run-all": "4.1.5",
+ "optional-dev-dependency": "2.0.1",
+ "prettier": "3.3.0",
+ "random-seed": "0.3.0",
+ "runmd": "1.3.9",
+ "standard-version": "9.5.0"
+ },
+ "optionalDevDependencies": {
+ "@wdio/browserstack-service": "7.16.10",
+ "@wdio/cli": "7.16.10",
+ "@wdio/jasmine-framework": "7.16.6",
+ "@wdio/local-runner": "7.16.10",
+ "@wdio/spec-reporter": "7.16.9",
+ "@wdio/static-server-service": "7.16.6"
+ },
+ "scripts": {
+ "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
+ "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
+ "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
+ "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
+ "examples:node:jest:test": "cd examples/node-jest && npm install && npm test",
+ "prepare": "husky install",
+ "lint": "npm run eslint:check && npm run prettier:check",
+ "eslint:check": "eslint src/ test/ examples/ *.js",
+ "eslint:fix": "eslint --fix src/ test/ examples/ *.js",
+ "pretest": "npm run build",
+ "test": "BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/",
+ "test:matching": "BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/ -t",
+ "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**",
+ "test:browser": "wdio run ./wdio.conf.js",
+ "pretest:node": "npm run build",
+ "test:node": "npm-run-all --parallel examples:node:**",
+ "test:pack": "./scripts/testpack.sh",
+ "pretest:benchmark": "npm run build",
+ "test:benchmark": "cd examples/benchmark && HUSKY=0 npm install && npm test",
+ "prettier:check": "prettier --check .",
+ "prettier:fix": "prettier --write .",
+ "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
+ "md": "runmd --watch --output=README.md README_js.md",
+ "docs": "npm run build && npx runmd --output=README.md README_js.md",
+ "docs:diff": "npm run docs && git diff --quiet README.md",
+ "build": "./scripts/build.sh",
+ "prepack": "npm run build",
+ "release": "standard-version --no-verify"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/uuidjs/uuid.git"
+ },
+ "lint-staged": {
+ "*": [
+ "prettier --no-error-on-unmatched-pattern --write"
+ ],
+ "*.{js,jsx}": [
+ "eslint --no-error-on-unmatched-pattern --fix"
+ ]
+ },
+ "standard-version": {
+ "scripts": {
+ "postchangelog": "prettier --write CHANGELOG.md"
+ }
+ },
+ "packageManager": "npm@10.8.1+sha256.b8807aebb9656758e2872fa6e7c564b506aa2faa9297439a478d471d2fe32483"
+}
diff --git a/week-3/02-course-app-easy/node_modules/uuid/wrapper.mjs b/week-3/02-course-app-easy/node_modules/uuid/wrapper.mjs
new file mode 100644
index 000000000..fba64f6eb
--- /dev/null
+++ b/week-3/02-course-app-easy/node_modules/uuid/wrapper.mjs
@@ -0,0 +1,15 @@
+import uuid from './dist/index.js';
+export const v1 = uuid.v1;
+export const v1ToV6 = uuid.v1ToV6;
+export const v3 = uuid.v3;
+export const v4 = uuid.v4;
+export const v5 = uuid.v5;
+export const v6 = uuid.v6;
+export const v6ToV1 = uuid.v6ToV1;
+export const v7 = uuid.v7;
+export const NIL = uuid.NIL;
+export const MAX = uuid.MAX;
+export const version = uuid.version;
+export const validate = uuid.validate;
+export const stringify = uuid.stringify;
+export const parse = uuid.parse;
diff --git a/week-3/02-course-app-easy/package-lock.json b/week-3/02-course-app-easy/package-lock.json
new file mode 100644
index 000000000..5f8bf596d
--- /dev/null
+++ b/week-3/02-course-app-easy/package-lock.json
@@ -0,0 +1,152 @@
+{
+ "name": "02-course-app-easy",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "02-course-app-easy",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "jsonwebtoken": "^9.0.2",
+ "uuid": "^10.0.0"
+ }
+ },
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
+ },
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
+ "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ }
+ }
+}
diff --git a/week-3/02-course-app-easy/package.json b/week-3/02-course-app-easy/package.json
index ef6ffdc36..d17e332d4 100644
--- a/week-3/02-course-app-easy/package.json
+++ b/week-3/02-course-app-easy/package.json
@@ -3,10 +3,15 @@
"version": "1.0.0",
"description": "### Description 1. Admins should be able to sign up 2. Admins should be able to create courses 1. Course has a title, description, price, and image link 2. Course should be able to be published or unpublished 3. Admins should be able to edit courses 4. Users should be able to sign up 5. Users should be able to purchase courses 6. Users should be able to view purchased courses 7. Users should be able to view all courses",
"main": "index.js",
+ "type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
- "license": "ISC"
+ "license": "ISC",
+ "dependencies": {
+ "jsonwebtoken": "^9.0.2",
+ "uuid": "^10.0.0"
+ }
}
diff --git a/week-3/04-course-app-hard/frontend/admin/admin.html b/week-3/04-course-app-hard/frontend/admin/admin.html
new file mode 100644
index 000000000..eb8ea1397
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/admin/admin.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+ Admin
+
+
+
+
+ Admin Auth
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/admin/admin.js b/week-3/04-course-app-hard/frontend/admin/admin.js
new file mode 100644
index 000000000..55d965e95
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/admin/admin.js
@@ -0,0 +1,93 @@
+const _BASE_URL = "http://localhost:3000";
+console.log("Bhaiii");
+
+async function onSignUp() {
+ let adminName = document.getElementById("AdmName").value;
+ let adminPassword = document.getElementById("AdmPassword").value;
+ // console.log(adminName);
+ // console.log(adminPassword);
+
+ let uploadJson = JSON.stringify(
+ {
+ "adminName": adminName,
+ "adminPassword": adminPassword
+ }
+ );
+ let admSignUpRes = await fetch(_BASE_URL + "/admin/signup", {
+ method: "POST", body: uploadJson, headers: {
+ "Content-Type": "application/json"
+ }
+ })
+ // then((value) => {
+
+ // console.log(admSignUpRes.type);
+ // });
+ // admSignUpRes.json().then(ele => {
+ // console.log(ele.message);
+ // })
+ let data = await admSignUpRes.json();
+ let parentId = document.getElementById("parent");
+ parentId.innerHTML = "";
+ let child = document.createElement("p");
+ if (data.statusCode == 1) {
+ child.innerHTML = "Account Created";
+ localStorage.setItem("token", data.token);
+ // window.location.href = "./admin_course/admin_course.html"
+ } else {
+ child.innerHTML = data.message;
+ // window.location.href = "./admin/admin.html"
+ setTimeout(() => {
+ child.innerHTML = "";
+
+ }, 2000);
+ }
+ parentId.append(child);
+
+}
+
+
+
+async function onSignIn() {
+ let adminName = document.getElementById("AdmName").value;
+ let adminPassword = document.getElementById("AdmPassword").value;
+ // console.log(adminName);
+ // console.log(adminPassword);
+
+ let uploadJson = JSON.stringify(
+ {
+ "adminName": adminName,
+ "adminPassword": adminPassword
+ }
+ );
+ let admSignUpRes = await fetch(_BASE_URL + "/admin/login", {
+ method: "POST", body: uploadJson, headers: {
+ "Content-Type": "application/json"
+ }
+ })
+ // then((value) => {
+
+ // console.log(admSignUpRes.type);
+ // });
+ // admSignUpRes.json().then(ele => {
+ // console.log(ele.message);
+ // })
+ let data = await admSignUpRes.json();
+ let parentId = document.getElementById("parent");
+ parentId.innerHTML = "";
+ let child = document.createElement("p");
+ if (data.statusCode == 1) {
+ child.innerHTML = "You are now signed in to your account.";
+ localStorage.setItem("token", data.token);
+ // window.location.href = "./admin_course/admin_course.html"
+ } else {
+ child.innerHTML = data.message;
+ // window.location.href = "./admin/admin.html"
+ setTimeout(() => {
+ child.innerHTML = "";
+
+ }, 2000);
+ }
+ parentId.append(child);
+
+}
+
diff --git a/week-3/04-course-app-hard/frontend/admin/admin_add_course/admin_add_course.html b/week-3/04-course-app-hard/frontend/admin/admin_add_course/admin_add_course.html
new file mode 100644
index 000000000..61b6dbf66
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/admin/admin_add_course/admin_add_course.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ Add Course
+
+
+
+
+ Add Course
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/admin/admin_add_course/admin_add_course.js b/week-3/04-course-app-hard/frontend/admin/admin_add_course/admin_add_course.js
new file mode 100644
index 000000000..eed38ec8d
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/admin/admin_add_course/admin_add_course.js
@@ -0,0 +1,39 @@
+const token = localStorage.getItem("token");
+const _BASE_URL = "http://localhost:3000";
+
+let content = document.getElementById("content");
+let loadingChild = document.createElement("p");
+loadingChild.innerHTML = "";
+content.appendChild(loadingChild);
+
+async function onCourseCreatedPressed() {
+ loadingChild.innerHTML = "Loading...";
+
+ let courseName = document.getElementById("courseNameInput").value;
+ let courseDetails = document.getElementById("courseDetailsInput").value;
+ let amount = document.getElementById("amountInput").value;
+
+
+ let rendData = {
+ "courseName": courseName,
+ "courseDetails": courseDetails,
+ "amount": amount,
+ }
+ let res = await fetch(_BASE_URL + "/admin/courses", {
+ method: "POST",
+ body: JSON.stringify(rendData),
+ headers: {
+ "Content-Type": "application/json",
+ "token": token
+ }
+ });
+
+
+ let resData = await res.json();
+ if (resData.statusCode == 1) {
+ loadingChild.innerHTML = resData.message;
+ setTimeout(() => {
+ loadingChild.innerHTML = "";
+ }, 2000)
+ }
+}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/admin/admin_course/admin_course.html b/week-3/04-course-app-hard/frontend/admin/admin_course/admin_course.html
new file mode 100644
index 000000000..f37be7a12
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/admin/admin_course/admin_course.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+ My Cources
+
+
+
+
+ My Cources
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/admin/admin_course/admin_course.js b/week-3/04-course-app-hard/frontend/admin/admin_course/admin_course.js
new file mode 100644
index 000000000..81bf1dfac
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/admin/admin_course/admin_course.js
@@ -0,0 +1,47 @@
+let adminToken = localStorage.getItem("token");
+const _BASE_URL = "http://localhost:3000";
+
+let divContent = document.getElementById("mainContent");
+let loadingChild = document.createElement("p");
+loadingChild.innerHTML = "Loading...";
+divContent.appendChild(loadingChild);
+getUserData();
+async function getUserData() {
+ let res = await fetch(_BASE_URL + "/admin/courses", {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ "token": adminToken
+ }
+ });
+ console.log(res);
+ let courses = await res.json();
+ console.log(courses);
+
+ if (courses.statusCode == 1) {
+ if (courses.data.length > 0) {
+ divContent.innerHTML = "";
+
+ for (let i = 0; i < courses.data.length; i++) {
+ let childBr = document.createElement("br");
+ let childName = document.createElement("p");
+ let childDetails = document.createElement("p");
+ let childamount = document.createElement("p");
+ childName.innerHTML = ("Name :" + courses.data[i].courseName);
+ childDetails.innerHTML = ("Details :" + courses.data[i].courseDetails);
+ childamount.innerHTML = ("Rs :" + courses.data[i].amount);
+ divContent.appendChild(childName);
+ divContent.appendChild(childDetails);
+ divContent.appendChild(childamount);
+ divContent.appendChild(childBr);
+ divContent.appendChild(childBr);
+ }
+ } else {
+ loadingChild.innerHTML = "No Course Fould";
+ }
+
+ } else {
+ loadingChild.innerHTML = "No course Found";
+ }
+
+}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/main.css b/week-3/04-course-app-hard/frontend/main.css
new file mode 100644
index 000000000..7cde41daf
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/main.css
@@ -0,0 +1,101 @@
+* {
+ /* color: antiquewhite; */
+}
+
+body {
+ /* background-color: grey; */
+ background: -webkit-linear-gradient(right, #2254df, #5bb5f0);
+
+}
+
+.card {
+ background: #fbfbfb;
+ border-radius: 8px;
+ /* box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.65); */
+ height: 410px;
+ margin: 6rem auto 8.1rem auto;
+ width: 329px;
+ padding: 10px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+
+.signUp_button,
+.signIn_button,
+.admin_add_course,
+button {
+ width: 200px;
+ height: 40px;
+ border-radius: 10px;
+ transition: .3;
+ margin-top: 30px;
+ background-color: lightcyan;
+
+}
+
+/* .nameInput,
+.passInput */
+input {
+ /* width: 200px;
+ height: 40px; */
+ padding: 10px;
+ margin-top: 10px;
+ margin-bottom: 15px;
+
+ border-radius: 10px;
+ border: 5px;
+ border-color: black;
+ background-color: lightcyan;
+ display: flex;
+
+}
+
+.boxx {
+ border-width: 5px;
+ padding-left: 50%;
+ margin-left: 50px;
+ margin-top: 500px;
+
+
+}
+
+nav {
+ /* background: lightblue; */
+ width: 500px;
+ height: 70px;
+ font-size: large;
+ /* justify-content: space-between; */
+}
+
+/* .navBar {
+ height: 50px;
+ background-color: aquamarine;
+} */
+
+a {
+ /* padding: 18px; */
+ padding-right: 18px;
+ padding-left: 18px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+
+
+ text-decoration: none;
+ /* height: 10px; */
+ border-radius: 20px;
+ background-color: lightcyan;
+
+}
+
+.navBar {
+ padding-top: 23px;
+ padding-left: 20px;
+
+ /* width: 500px;
+
+ height: 500px;
+ background-color: antiquewhite;
+ justify-content: space-between; */
+}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/main.html b/week-3/04-course-app-hard/frontend/main.html
new file mode 100644
index 000000000..e0a75784d
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/main.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ Courses
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/main.js b/week-3/04-course-app-hard/frontend/main.js
new file mode 100644
index 000000000..218f1a3fd
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/main.js
@@ -0,0 +1,87 @@
+// const _BASE_URL = "http://localhost:3000";
+// console.log("Bhaiii");
+
+// async function onSignUp() {
+// let adminName = document.getElementById("AdmName").value;
+// let adminPassword = document.getElementById("AdmPassword").value;
+// // console.log(adminName);
+// // console.log(adminPassword);
+
+// let uploadJson = JSON.stringify(
+// {
+// "adminName": adminName,
+// "adminPassword": adminPassword
+// }
+// );
+// let admSignUpRes = await fetch(_BASE_URL + "/admin/signup", {
+// method: "POST", body: uploadJson, headers: {
+// "Content-Type": "application/json"
+// }
+// })
+// // then((value) => {
+
+// // console.log(admSignUpRes.type);
+// // });
+// // admSignUpRes.json().then(ele => {
+// // console.log(ele.message);
+// // })
+// let data = await admSignUpRes.json();
+// let parentId = document.getElementById("parent");
+// parentId.innerHTML = "";
+// let child = document.createElement("p");
+// if (data.statusCode == 1) {
+// child.innerHTML = "Account Created";
+// localStorage.setItem("token", data.token);
+// window.location.href = "./admin/admin.html"
+// } else {
+// child.innerHTML = data.message;
+// // window.location.href = "./admin/admin.html"
+
+// }
+// parentId.append(child);
+
+// }
+
+
+
+// async function onSignIn() {
+// let adminName = document.getElementById("AdmName").value;
+// let adminPassword = document.getElementById("AdmPassword").value;
+// // console.log(adminName);
+// // console.log(adminPassword);
+
+// let uploadJson = JSON.stringify(
+// {
+// "adminName": adminName,
+// "adminPassword": adminPassword
+// }
+// );
+// let admSignUpRes = await fetch(_BASE_URL + "/admin/login", {
+// method: "POST", body: uploadJson, headers: {
+// "Content-Type": "application/json"
+// }
+// })
+// // then((value) => {
+
+// // console.log(admSignUpRes.type);
+// // });
+// // admSignUpRes.json().then(ele => {
+// // console.log(ele.message);
+// // })
+// let data = await admSignUpRes.json();
+// let parentId = document.getElementById("parent");
+// parentId.innerHTML = "";
+// let child = document.createElement("p");
+// if (data.statusCode == 1) {
+// child.innerHTML = "Account Created";
+// localStorage.setItem("token", data.token);
+// window.location.href = "./admin/admin.html"
+// } else {
+// child.innerHTML = data.message;
+// // window.location.href = "./admin/admin.html"
+
+// }
+// parentId.append(child);
+
+// }
+
diff --git a/week-3/04-course-app-hard/frontend/user/all_courses/all_courses.html b/week-3/04-course-app-hard/frontend/user/all_courses/all_courses.html
new file mode 100644
index 000000000..6a6d2733c
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/user/all_courses/all_courses.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+ Document
+
+
+
+ All Courses
+
+
+
+
+
+
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/user/all_courses/all_courses.js b/week-3/04-course-app-hard/frontend/user/all_courses/all_courses.js
new file mode 100644
index 000000000..ac71f87ae
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/user/all_courses/all_courses.js
@@ -0,0 +1,81 @@
+const token = localStorage.getItem("token");
+const _BASE_URL = "http://localhost:3000";
+
+let content = document.getElementById("content");
+let loadingChild = document.createElement("p");
+loadingChild.innerHTML = "Loading ...";
+content.appendChild(loadingChild);
+getAllCourses();
+
+async function buyCourse(courseId) {
+ loadingChild.innerHTML = "";
+
+ console.log(_BASE_URL + "/users/courses/" + courseId);
+ let res = await fetch(_BASE_URL + "/users/courses/" + courseId, {
+ method: "POST",
+ headers: {
+ "Content-type": "application/json",
+ "token": token
+ }
+ });
+ console.log(res);
+ let resJson1 = await res.json();
+
+ if (resJson1.statusCode == 1) {
+ setTimeout(() => {
+ loadingChild.innerHTML = "";
+ }, 2000);
+ } else {
+ loadingChild.innerHTML = resJson1.message;
+ setTimeout(() => {
+ loadingChild.innerHTML = "";
+ }, 2000);
+ }
+}
+async function getAllCourses() {
+ let res = await fetch(_BASE_URL + "/users/courses", {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ "token": token
+ }
+ });
+ let resJson = await res.json();
+ if (resJson.statusCode == 1) {
+ loadingChild.innerHTML = "";
+ for (let i = 0; i < resJson.data.length; i++) {
+ console.log(resJson.data[i]._id);
+ let brChild = document.createElement("br");
+ let nameChild = document.createElement("p");
+ let detailsChild = document.createElement("p");
+ let amountChild = document.createElement("p");
+ let buyButton = document.createElement("button");
+ buyButton.innerHTML = "Buy Now"
+ // buyButton.setAttribute("onclick", "buyCourse(resJson.data[i]._id);");
+ // button.setAttribute("name", "Buy Now");
+ buyButton.onclick = function () {
+ buyCourse(resJson.data[i]._id);
+ };
+ nameChild.innerHTML = resJson.data[i].courseName;
+ detailsChild.innerHTML = resJson.data[i].courseDetails;
+ amountChild.innerHTML = resJson.data[i].amount;
+
+ content.appendChild(nameChild);
+ content.appendChild(detailsChild);
+ content.appendChild(amountChild);
+ content.appendChild(buyButton);
+
+ content.appendChild(brChild);
+ content.appendChild(brChild);
+ content.appendChild(brChild);
+
+ }
+
+ } else {
+ loadingChild.innerHTML = resJson.message;
+ // setTimeout(() => {
+ // loadingChild.innerHTML = "";
+ // }, 2000);
+ }
+
+}
diff --git a/week-3/04-course-app-hard/frontend/user/purchsed_courses/purchsed_courses.html b/week-3/04-course-app-hard/frontend/user/purchsed_courses/purchsed_courses.html
new file mode 100644
index 000000000..d44f4d609
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/user/purchsed_courses/purchsed_courses.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+ Purchsed Courses
+
+
+
+ My Purchsed Courses
+
+
+
+
+
+
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/user/purchsed_courses/purchsed_courses.js b/week-3/04-course-app-hard/frontend/user/purchsed_courses/purchsed_courses.js
new file mode 100644
index 000000000..22d5bef60
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/user/purchsed_courses/purchsed_courses.js
@@ -0,0 +1,52 @@
+const token = localStorage.getItem("token");
+const _BASE_URL = "http://localhost:3000";
+
+let content = document.getElementById("content");
+let loadingChild = document.createElement("p");
+loadingChild.innerHTML = "Loading...";
+content.appendChild(loadingChild);
+purchsed_courses();
+async function purchsed_courses() {
+ let purchsedCourseRes = await fetch(_BASE_URL + "/users/purchasedCourses", {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ "token": token
+ }
+ });
+
+ let purchasedCoursesJson = await purchsedCourseRes.json();
+ if (purchasedCoursesJson.statusCode == 1) {
+ loadingChild.innerHTML = "";
+ console.log(purchasedCoursesJson.data.length);
+
+ for (let i = 0; i < purchasedCoursesJson.data.length; i++) {
+ let brChild = document.createElement("br");
+
+ let nameChild = document.createElement("p");
+ let detailsChild = document.createElement("p");
+ let amountChild = document.createElement("p");
+ nameChild.innerHTML = "Name : " + purchasedCoursesJson.data[i].courseName;
+ detailsChild.innerHTML = "Details : " + purchasedCoursesJson.data[i].courseDetails;
+ amountChild.innerHTML = "Rs : " + purchasedCoursesJson.data[i].amount;
+
+ content.appendChild(nameChild);
+ content.appendChild(detailsChild);
+ content.appendChild(amountChild);
+ content.appendChild(brChild);
+ content.appendChild(brChild);
+ content.appendChild(brChild);
+ content.appendChild(brChild);
+
+
+
+
+ }
+
+ } else {
+ loadingChild.innerHTML = purchasedCoursesJson.message;
+ // setTimeout(() => {
+ // loadingChild.innerHTML = "";
+ // }, 2000)
+ }
+}
diff --git a/week-3/04-course-app-hard/frontend/user/user.html b/week-3/04-course-app-hard/frontend/user/user.html
new file mode 100644
index 000000000..121ae5045
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/user/user.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+ User
+
+
+
+
+ Welcome User
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/frontend/user/user.js b/week-3/04-course-app-hard/frontend/user/user.js
new file mode 100644
index 000000000..2f624f56c
--- /dev/null
+++ b/week-3/04-course-app-hard/frontend/user/user.js
@@ -0,0 +1,63 @@
+let content = document.getElementById("content");
+let loadingChild = document.createElement("p");
+loadingChild.innerHTML = "Loading ...";
+const _BASE_URL = "http://localhost:3000";
+
+
+async function onSignUp() {
+ content.appendChild(loadingChild);
+ let userName = document.getElementById("UrsName").value;
+ let userPassword = document.getElementById("UrsPassword").value;
+ let sendJson = {
+ "userName": userName,
+ "userPassword": userPassword
+ }
+ let resAllCourses = await fetch(_BASE_URL + "/users/signup", {
+ method: "POST", body: JSON.stringify(sendJson),
+ headers: {
+ "Content-Type": "application/json"
+ }
+
+ });
+ let resJson = await resAllCourses.json();
+ if (resJson.statusCode == 1) {
+ localStorage.setItem("token", resJson.token);
+ loadingChild.innerHTML = "Account SignIn Successfully";
+ // window.location.href = ("./all_courses/all_courses.html");
+ } else {
+ loadingChild.innerHTML = resJson.message;
+ setTimeout(() => {
+ loadingChild.innerHTML = "";
+
+ }, 2000);
+ }
+}
+async function onSignIn() {
+ content.appendChild(loadingChild);
+
+ let userName = document.getElementById("UrsName").value;
+ let userPassword = document.getElementById("UrsPassword").value;
+ let sendJson = {
+ "userName": userName,
+ "userPassword": userPassword
+ }
+ let resAllCourses = await fetch(_BASE_URL + "/users/login", {
+ method: "POST", body: JSON.stringify(sendJson),
+ headers: {
+ "Content-Type": "application/json"
+ }
+
+ });
+ let resJson = await resAllCourses.json();
+ if (resJson.statusCode == 1) {
+ localStorage.setItem("token", resJson.token);
+ loadingChild.innerHTML = "You are now signed in to your account.";
+ // window.location.href = ("./all_courses/all_courses.html");
+ } else {
+ loadingChild.innerHTML = resJson.message;
+ setTimeout(() => {
+ loadingChild.innerHTML = "";
+
+ }, 2000);
+ }
+}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/index.js b/week-3/04-course-app-hard/index.js
index 32fff61e9..a06e604fc 100644
--- a/week-3/04-course-app-hard/index.js
+++ b/week-3/04-course-app-hard/index.js
@@ -1,52 +1,280 @@
-const express = require('express');
+// const express = require('express');
+import express from "express";
+import body_parser from "body-parser";
+import mongoose from "mongoose";
+import { v4 as uuid4 } from "uuid";
+import jwt from "jsonwebtoken";
+import cors from "cors";
const app = express();
+app.use(cors());
+app.use(body_parser.json());
-app.use(express.json());
+const JWT_SECRET_TOKEN = "M@n@oDemO";
+// let ADMINS = [];
+// let USERS = [];
+// let COURSES = [];
-let ADMINS = [];
-let USERS = [];
-let COURSES = [];
+function generateToken(data) {
+ return jwt.sign(data, JWT_SECRET_TOKEN,);
+}
+function verifyToken(data) {
+ return jwt.verify(data, JWT_SECRET_TOKEN);
+}
+
+///First define the schema
+const adminSchema = new mongoose.Schema({
+ // id: String,
+ adminName: String,
+ adminPassword: String,
+ courses: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Course' }],
+ amount: Number,
+});
+
+const userSchema = new mongoose.Schema({
+ // id: String,
+ userName: String,
+ userPassword: String,
+ courses: [{ type: mongoose.Schema.Types.ObjectId, ref: "Course" }]
+})
+
+const courseSchema = new mongoose.Schema({
+ // id: String,
+ courseName: String,
+ courseDetails: String,
+ authorId: String,
+ amount: Number
+});
+
+///Second define models
+const User = mongoose.model("User", userSchema);
+const Admin = mongoose.model("Admin", adminSchema);
+const Course = mongoose.model("Course", courseSchema);
+
+async function connectMongoDb() {
+ console.log("mongodb://localhost:27017/courses");
+ ///Third Connection with DB
+ await mongoose.connect("mongodb://127.0.0.1:27017/courses", {
+ // useNewUrlParser: true,
+ // useUnifiedTopology: true
+ });
+}
+connectMongoDb();
// Admin routes
-app.post('/admin/signup', (req, res) => {
- // logic to sign up admin
+app.post('/admin/signup', async (req, res) => {
+ // logic to sign up admin\
+
+ const { adminName, adminPassword } = req.body;
+ if ((adminName && adminName.length <= 0) || (adminPassword && adminPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more fields are Empty" });
+ return;
+ }
+
+ var isAlreadyAdmin = await Admin.find({ adminName, adminPassword });
+ console.log(isAlreadyAdmin);
+ if (isAlreadyAdmin.length > 0) {
+ res.status(403).send({ statusCode: 0, message: "User Already Present" });
+ return;
+ } else {
+ const newAdmin = new Admin({
+ id: uuid4(),
+ adminName: adminName,
+ adminPassword: adminPassword,
+ courses: [],
+ amount: 0
+ });
+ newAdmin.save();
+ res.send({ statusCode: 1, id: newAdmin.id, token: generateToken({ adminName: adminName, adminPassword: adminPassword }) });
+ }
});
-app.post('/admin/login', (req, res) => {
+app.post('/admin/login', async (req, res) => {
// logic to log in admin
+ const { adminName, adminPassword } = req.body;
+ const isUserLogin = await Admin.find({ adminName, adminPassword });
+ if (isUserLogin.length > 0) {
+ res.send({ statusCode: 1, data: isUserLogin[0], token: generateToken({ adminName: adminName, adminPassword: adminPassword }) });
+ } else {
+ res.status(403).send({ statusCode: 0, message: "User Details Invalid" })
+
+ }
+
});
-app.post('/admin/courses', (req, res) => {
+const adminMidddleware = async (req, res, next) => {
+ const token = req.headers.token;
+ const { adminName, adminPassword } = verifyToken(token);
+
+ const isUserValid = await Admin.find({ adminName, adminPassword });
+ if (isUserValid.length > 0) {
+ req.user = isUserValid[0];
+ next();
+ } else {
+ res.status(403).send({ statusCode: 0, message: "Unauthorized" });
+ }
+};
+app.post('/admin/courses', adminMidddleware, async (req, res) => {
// logic to create a course
+ const { courseName, courseDetails, amount } = req.body;
+ const newCourse = new Course({
+ courseName: courseName,
+ courseDetails: courseDetails,
+ amount: amount,
+ authorId: req.user._id
+ });
+ const courseId = await newCourse.save();
+ req.user.courses.push(newCourse);
+ await Admin.findByIdAndUpdate(req.user._id, req.user);
+ res.send({ statusCode: 1, message: "Course Added" });
});
-app.put('/admin/courses/:courseId', (req, res) => {
+app.put('/admin/courses/:courseId', adminMidddleware, async (req, res) => {
// logic to edit a course
+ const courseId = req.params.courseId;
+ const { courseName, courseDetails } = req.body;
+ const updatedCourse = await Course.findByIdAndUpdate({ _id: courseId }, { courseName: courseName, courseDetails: courseDetails }, { new: true });
+ res.send({ statusCode: 1, data: updatedCourse })
+
});
-app.get('/admin/courses', (req, res) => {
+app.get('/admin/courses', adminMidddleware, async (req, res) => {
+ let allCourse1 = [];
// logic to get all courses
+ // const allCourseId = req.user;
+ // console.log(allCourseId.length);
+ // const allCourse = await Promise.all(
+ // allCourseId.forEach(async (singleCourseId) => {
+
+ let adminCourses = await Course.find({ authorId: req.user._id });
+ // console.log(singleCourseId);
+
+ // // if (ele) {
+
+ // allCourse1.push(allCourse);
+ // // }
+ // return allCourse1;
+ // }));
+
+
+
+ res.send({ statusCode: 1, data: adminCourses });
+
+
+
});
// User routes
-app.post('/users/signup', (req, res) => {
+app.post('/users/signup', async (req, res) => {
// logic to sign up user
+ const { userName, userPassword } = req.body;
+ if ((userName && userName.length <= 0) || (userPassword && userPassword.length <= 0)) {
+ res.status(400).send({ statusCode: 0, message: "One or more fields are Empty" });
+ return;
+ }
+ var isUserPresent = await User.findOne({ userName });
+ if (isUserPresent) {
+ res.send({ statusCode: 0, message: "User Data Already Present" });
+ } else {
+ let newUser = new User({
+ userName: userName,
+ userPassword: userPassword,
+ courses: []
+ });
+ let userId = await newUser.save();
+
+ res.send({
+ statusCode: 1, message: "User Account Created Successfully", id: userId._id, token: generateToken({
+ userName: userName,
+ userPassword: userPassword
+ })
+ });
+ }
});
-app.post('/users/login', (req, res) => {
+app.post('/users/login', async (req, res) => {
// logic to log in user
+ const { userName, userPassword } = req.body;
+ if ((userName && userName.length <= 0) || (userName && userName.length <= 0)) {
+ res.status(403).send({ statusCode: 0, message: "One or more fields are Empty" });
+ return;
+ }
+
+ let isUserPresent = await User.findOne({ userName, userPassword });
+ if (isUserPresent) {
+ res.send({
+ statusCode: 1, data: isUserPresent, token: generateToken({
+ userName: userName,
+ userPassword: userPassword
+ })
+ })
+ } else {
+ res.status(403).send({ statusCode: 0, message: "User Details Invalid" });
+ }
});
-app.get('/users/courses', (req, res) => {
+const userMiddleware = async (req, res, next) => {
+ const token = req.headers.token;
+ const { userName, userPassword } = verifyToken(token);
+ let user = await User.findOne({ userName, userPassword });
+ if (user) {
+ req.user = user;
+ next();
+ } else {
+ res.status(403).send({ statusCode: 0, message: "Unauthorized" })
+ }
+};
+
+app.get('/users/courses', userMiddleware,async (req, res) => {
// logic to list all courses
+ let allCourses = await Course.find({});
+ if (allCourses.length > 0) {
+ res.send({ statusCode: 1, data: allCourses });
+ } else {
+ res.send({ statusCode: 0, message: "No Courses Found" });
+ }
+
});
-app.post('/users/courses/:courseId', (req, res) => {
+app.post('/users/courses/:courseId', userMiddleware, async (req, res) => {
// logic to purchase a course
+ const courseId = req.params.courseId;
+
+ let course = await Course.findOne({ _id: courseId });
+
+
+ if (course) {
+ req.user.courses.push(course._id);
+ let isUserALredyPresent = User.findById({ _id: req.user._id });
+ if (isUserALredyPresent) {
+ res.send({ statusCode: 0, message: "You have already bought the Course" })
+
+ return;
+ }
+ await User.findByIdAndUpdate({ _id: req.user._id }, req.user);
+ let adminData = await Admin.findOne({ _id: course.authorId });
+ adminData.amount = (adminData.amount + course.amount);
+ // await Admin.findByIdAndUpdate({ _id: course.authorId }, { $set: { amount: (amount + course.amount) } });
+ await Admin.findByIdAndUpdate({ _id: course.authorId }, adminData);
+
+ res.send({ statusCode: 1, message: "Course Added Successfully" });
+ } else {
+ res.send({ statusCode: 0, message: "Course Not Found" })
+ }
});
-app.get('/users/purchasedCourses', (req, res) => {
+app.get('/users/purchasedCourses', userMiddleware, async (req, res) => {
// logic to view purchased courses
+ let allPurchasedCourseId = req.user.courses;
+ if (allPurchasedCourseId.length > 0) {
+ let allPurchasedCourse = [];
+ for (let i = 0; i < allPurchasedCourseId.length; i++) {
+ let singleCourses = await Course.findById(allPurchasedCourseId[i]);
+ allPurchasedCourse.push(singleCourses);
+ }
+ res.send({ statusCode: 1, data: allPurchasedCourse });
+ } else {
+ res.send({ statusCode: 0, message: "Buy Courses to see here" })
+ }
});
app.listen(3000, () => {
diff --git a/week-3/04-course-app-hard/node_modules/.bin/semver b/week-3/04-course-app-hard/node_modules/.bin/semver
new file mode 100644
index 000000000..77443e787
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/.bin/semver
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
+else
+ exec node "$basedir/../semver/bin/semver.js" "$@"
+fi
diff --git a/week-3/04-course-app-hard/node_modules/.bin/semver.cmd b/week-3/04-course-app-hard/node_modules/.bin/semver.cmd
new file mode 100644
index 000000000..9913fa9d0
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/.bin/semver.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
diff --git a/week-3/04-course-app-hard/node_modules/.bin/semver.ps1 b/week-3/04-course-app-hard/node_modules/.bin/semver.ps1
new file mode 100644
index 000000000..314717ad4
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/.bin/semver.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
+ } else {
+ & "node$exe" "$basedir/../semver/bin/semver.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/week-3/04-course-app-hard/node_modules/.bin/uuid b/week-3/04-course-app-hard/node_modules/.bin/uuid
new file mode 100644
index 000000000..c3ec0035f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/.bin/uuid
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@"
+else
+ exec node "$basedir/../uuid/dist/bin/uuid" "$@"
+fi
diff --git a/week-3/04-course-app-hard/node_modules/.bin/uuid.cmd b/week-3/04-course-app-hard/node_modules/.bin/uuid.cmd
new file mode 100644
index 000000000..0f2376eaf
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/.bin/uuid.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %*
diff --git a/week-3/04-course-app-hard/node_modules/.bin/uuid.ps1 b/week-3/04-course-app-hard/node_modules/.bin/uuid.ps1
new file mode 100644
index 000000000..78046284b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/.bin/uuid.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ } else {
+ & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/week-3/04-course-app-hard/node_modules/.package-lock.json b/week-3/04-course-app-hard/node_modules/.package-lock.json
new file mode 100644
index 000000000..6bcd377a2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/.package-lock.json
@@ -0,0 +1,380 @@
+{
+ "name": "02-course-app-easy",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@mongodb-js/saslprep": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.7.tgz",
+ "integrity": "sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==",
+ "dependencies": {
+ "sparse-bitfield": "^3.0.3"
+ }
+ },
+ "node_modules/@types/webidl-conversions": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
+ "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="
+ },
+ "node_modules/@types/whatwg-url": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",
+ "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",
+ "dependencies": {
+ "@types/webidl-conversions": "*"
+ }
+ },
+ "node_modules/bson": {
+ "version": "6.8.0",
+ "resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz",
+ "integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ==",
+ "engines": {
+ "node": ">=16.20.1"
+ }
+ },
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
+ },
+ "node_modules/cors": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
+ "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/debug/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
+ "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/kareem": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz",
+ "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
+ },
+ "node_modules/memory-pager": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
+ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="
+ },
+ "node_modules/mongodb": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.6.2.tgz",
+ "integrity": "sha512-ZF9Ugo2JCG/GfR7DEb4ypfyJJyiKbg5qBYKRintebj8+DNS33CyGMkWbrS9lara+u+h+yEOGSRiLhFO/g1s1aw==",
+ "dependencies": {
+ "@mongodb-js/saslprep": "^1.1.5",
+ "bson": "^6.7.0",
+ "mongodb-connection-string-url": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "peerDependencies": {
+ "@aws-sdk/credential-providers": "^3.188.0",
+ "@mongodb-js/zstd": "^1.1.0",
+ "gcp-metadata": "^5.2.0",
+ "kerberos": "^2.0.1",
+ "mongodb-client-encryption": ">=6.0.0 <7",
+ "snappy": "^7.2.2",
+ "socks": "^2.7.1"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/credential-providers": {
+ "optional": true
+ },
+ "@mongodb-js/zstd": {
+ "optional": true
+ },
+ "gcp-metadata": {
+ "optional": true
+ },
+ "kerberos": {
+ "optional": true
+ },
+ "mongodb-client-encryption": {
+ "optional": true
+ },
+ "snappy": {
+ "optional": true
+ },
+ "socks": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mongodb-connection-string-url": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz",
+ "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==",
+ "dependencies": {
+ "@types/whatwg-url": "^11.0.2",
+ "whatwg-url": "^13.0.0"
+ }
+ },
+ "node_modules/mongoose": {
+ "version": "8.4.4",
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.4.4.tgz",
+ "integrity": "sha512-Nya808odIJoHP4JuJKbWA2eIaerXieu59kE8pQlvJpUBoSKWUyhLji0g1WMVaYXWmzPYXP2Jd6XdR4KJE8RELw==",
+ "dependencies": {
+ "bson": "^6.7.0",
+ "kareem": "2.6.3",
+ "mongodb": "6.6.2",
+ "mpath": "0.9.0",
+ "mquery": "5.0.0",
+ "ms": "2.1.3",
+ "sift": "17.1.3"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mongoose"
+ }
+ },
+ "node_modules/mpath": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
+ "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/mquery": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
+ "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
+ "dependencies": {
+ "debug": "4.x"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/semver": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
+ "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sift": {
+ "version": "17.1.3",
+ "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz",
+ "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ=="
+ },
+ "node_modules/sparse-bitfield": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
+ "dependencies": {
+ "memory-pager": "^1.0.2"
+ }
+ },
+ "node_modules/tr46": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
+ "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
+ "dependencies": {
+ "punycode": "^2.3.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz",
+ "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==",
+ "dependencies": {
+ "tr46": "^4.1.1",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ }
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/LICENSE b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/LICENSE
new file mode 100644
index 000000000..481c7a50f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2014 Dmitry Tsvettsikh
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/.esm-wrapper.mjs b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/.esm-wrapper.mjs
new file mode 100644
index 000000000..0b46bfa63
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/.esm-wrapper.mjs
@@ -0,0 +1,4 @@
+import mod from "./node.js";
+
+export default mod;
+export const saslprep = mod.saslprep;
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.d.ts
new file mode 100644
index 000000000..70a71a5a0
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.d.ts
@@ -0,0 +1,5 @@
+declare const saslprep: (args_0: string, args_1?: {
+ allowUnassigned?: boolean | undefined;
+} | undefined) => string;
+export = saslprep;
+//# sourceMappingURL=browser.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.d.ts.map
new file mode 100644
index 000000000..669fc6433
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;wBAAmC,CAAC;AAIlD,SAAS,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.js
new file mode 100644
index 000000000..1bedd860e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.js
@@ -0,0 +1,12 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+const index_1 = __importDefault(require("./index"));
+const memory_code_points_1 = require("./memory-code-points");
+const code_points_data_browser_1 = __importDefault(require("./code-points-data-browser"));
+const codePoints = (0, memory_code_points_1.createMemoryCodePoints)(code_points_data_browser_1.default);
+const saslprep = index_1.default.bind(null, codePoints);
+Object.assign(saslprep, { saslprep, default: saslprep });
+module.exports = saslprep;
+//# sourceMappingURL=browser.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.js.map
new file mode 100644
index 000000000..40edf44be
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/browser.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":";;;;AAAA,oDAAgC;AAChC,6DAA8D;AAC9D,0FAA8C;AAE9C,MAAM,UAAU,GAAG,IAAA,2CAAsB,EAAC,kCAAI,CAAC,CAAC;AAEhD,MAAM,QAAQ,GAAG,eAAS,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;AAEzD,iBAAS,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts
new file mode 100644
index 000000000..f85af5b8b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts
@@ -0,0 +1,4 @@
+///
+declare const data: Buffer;
+export default data;
+//# sourceMappingURL=code-points-data-browser.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts.map
new file mode 100644
index 000000000..617b217b8
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"code-points-data-browser.d.ts","sourceRoot":"","sources":["../src/code-points-data-browser.ts"],"names":[],"mappings":";AAAA,QAAA,MAAM,IAAI,QAGT,CAAC;AACF,eAAe,IAAI,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js
new file mode 100644
index 000000000..5ea963551
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const data = Buffer.from('AAHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAP////AAAAAAAAAAAAAAADAAAAAAAAAAH//wAAAAAAAAAAAAD//wAA893wFAAAIAAAAAABAAAAAAH/AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAEAAAAAAz8AAP////+AAAAAAYCAAAAAAJ+AACAAACAH/wAAAB8H///3/+6AAAAfAAAD/wAAAAAAAAAAAAAAAAAAAAAAAwABAAIAAAAHAAAAH////////wAAAAAAAD///////////////////////////////////////////////////////4gAAAAAAAAwAAMHAAAAf/+IBmAAAEBcNAZj/vIMAAAf2B5gAABASTQeY/+F/AAH/4gKIAAAQEgwAiN//3wA//+IBmAAAEBMMA5j/PI8AH//yBxDlOccAjwcQ/7//gAf/4gEQAAAQAg8BEP5/zwA///IBEAAAEAIPARD+f08AP//yARAAABAADwMQ/7/PAD//8gAAcAAACALAd4FAP//x/+AAAAAAAAAHgAAAA//////llvwgIrIACMFAwAz/////wAAAAAAAAAAAIAAAAAfgAAADwCAAAAABAAG////////AAAAACCQHD8AAAA///////////8AAAAAA/8AAAAAAG8AAAAAAAAAAAAAAD4AAAAAAAAAAB8AAAAAAAAAAAAAPwEAAAAAAAAAAUMBQwAAAAABQwAAAAFDAUMBAQAAAQAAAAFDAQAAAAABAAAfgAAAB/////8AAAAAAAAAAAAAB/+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/wAAAAcAAAAAAAAAAAAAf/8ABAf/AAAB/wAAD/8ABE//AAAAAAAAAAAAAAAHAD///wABAD8AAAAAAAAAAAAAAP8AAAAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAA/AAADAwAAAAADAwCqAAAAAwAAAAAAAAQABAAMCAAAxAEAAAAAAAAAAAAAHv4PwDAAAAH//wAAP////wAAAB///wAAAAAAAAAYAA/gAAAAAAAP/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf///////wAAAAAB////AB///wAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAAAAAAAAAAAAAAAADAD///////////////////4QwAAAAgAAAAAodAYAAAAAAAAcAAACAAf//AAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wAAACAAAAAAAAAAAAAAD/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///8ADwAAAAAAAAAAgAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAA+AAAAAAHgAAAAAAAAAAAAAABAAAAAAD/////////AAAAAAAHAAAAAA//gAAAAAAOAAAAAAAAAAAADwAAAAAAAQAAAAAAAAAAAAAAAAAAAeAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAB////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAB////////////////////////8B/+D4AAABBSQAAAAAAAAAAAAAAAAAP////+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAwAAAAAAAAP8AAAAAAAcAAP//D/8AAAGAEAABDwQAAAAAAAAAAAAAAAAAAAAABoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcDAwMcBAf+A////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAQ//AAAAH/////////////////////////////8AAAAAAwAAAAAD//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/wAAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////////////////////////////////////////////////////////////////////wAAAAAAAAAAAAAEAAAAAAAAAAAE2YQAKEgAAAAAAAAAAhgEBAAAACEFwEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////P/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////z//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////P/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////z//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////P/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////z//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////P/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////y/////AAAAAAAAAAAAAAAA/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////P//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKQAP///+D4AAAAABF////g/+AAAAAHf////////////////AQGAAA+//y////4AAAAAAAAAAAAAP/////8AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF/7/++tv/////////////////wAAAAB////////////////////////////////////////////////////////////wAAP//////////P////////wAAAAAA//gAAAAAAAAAAAAAAAAAAPv/////////////////////+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIgAAAAAAAAAAAAf///4H///+AAAAAAACAEIP///v////7/////////////////////////////////////////////////v//wAAAA///////////////8/5/AAMAA+AIAAAAAAAAAAAAAAAAAAAAAACAC6///3//////+//////wA/////////////////////+A///////////7//////MD//wAAAAB//////n9//////0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABf////////HgHiA/8//gAA3+Z///7+jw4GYAQ3D/8/gB+Gf//+/tsOAAAB6A/84ABf13///v7fHgFiAAIP/AAA3+Z///7+zxoGYAQ3D/4AAF+O8axjj/cNjuAEAAf/gAHf7v///v/fAeAAAAMP/AAA3+7///7/3wvmwBgLD/wAAN/u///+//8ODuAEAw/8AADf//j///9/0/gHA/wAAOAB///////+wAP4B//AAAAAAaaQPf3U3sAT6AP/MAAAAAP///z////qD/3/////gAAEE8AAAAAAAA/35AAAAAAAA/////99oQID///8AAAAAAAAAAAD//////AD//////5D//////////////8H//////////+D/////////////wP7//////////rz+vP/////+vP////68/rz+/v///v////68/v/////+///gf///+AAAAAD/////////////+AB////////////////////////////////////////////////////////////////////////////////////////////////////////+AH///+D/////////////gAD/+8AA///GAP//wAD/+4AA/////////gP9gA/o/8AAAAAA/8D//////////////wD//////4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/////////////////////////w///////////////A///8/P/////8/P9V/////P////////v6O/jz8P/4O/gAAgAAAAAAAAAAAAAAAEABAAAAAAAAAAAAAAAAAAAAACE/9HwKvd/HB8AAAP/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////gAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAB/wHz4f/////////////4Hf//////////////vB//////4f//////////////+//////8AAAAAAAAA///////4//////AAAAD////x////////gAD/8P///////v///////////////////h////////////////z////+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAP/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8/////////+AAAAAAAAAAAAAAAAAAAAAAAAD+AB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB////gf///4AP//////////////j8/PzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////8AP/////+P/////////4/4AAYD////8P///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/////////////7///////////7Jnv/17f//////////ef7+////976P7////////////////////////////////////////////////////////D////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////w=', 'base64');
+exports.default = data;
+//# sourceMappingURL=code-points-data-browser.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js.map
new file mode 100644
index 000000000..feba4779b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"code-points-data-browser.js","sourceRoot":"","sources":["../src/code-points-data-browser.ts"],"names":[],"mappings":";;AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CACtB,8sliBAA8sliB,EAC9sliB,QAAQ,CACT,CAAC;AACF,kBAAe,IAAI,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts
new file mode 100644
index 000000000..cc908ec59
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts
@@ -0,0 +1,4 @@
+///
+declare const _default: Buffer;
+export default _default;
+//# sourceMappingURL=code-points-data.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts.map
new file mode 100644
index 000000000..772442e0b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"code-points-data.d.ts","sourceRoot":"","sources":["../src/code-points-data.ts"],"names":[],"mappings":";;AAEA,wBAKE"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.js
new file mode 100644
index 000000000..6af9a89b9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const zlib_1 = require("zlib");
+exports.default = (0, zlib_1.gunzipSync)(Buffer.from('H4sIAAAAAAACA+3dTYgcaRkA4LemO9Mhxm0FITnE9Cwr4jHgwgZ22B6YywqCJ0HQg5CL4sGTuOjCtGSF4CkHEW856MlTQHD3EJnWkU0Owh5VxE3LHlYQdNxd2U6mU59UV/d09fw4M2EySSXPAzNdP1/9fX/99bzVNZEN4jisRDulVFnQmLxm1aXF9Id/2/xMxNJ4XZlg576yuYlGt9gupV6xoFf8jhu9YvulVrFlp5XSx+lfvYhORGPXvqIRWSxERKtIm8bKFd10WNfKDS5Fo9jJWrq2+M2IlW+8uHgl/+BsROfPF4v5L7148Ur68Sha6dqZpYiVVy8tvLCWXo80Sf/lS89dGX2wHGvpzoXVn75/YWH5wmqe8uika82ViJXTy83Ve2k5Urozm38wm4/ls6t5uT6yfsTSJ7J3T0VKt8c5ExEXI8aFkH729c3eT+7EC6ca8cVULZUiYacX0R5PNWNxlh9L1y90q5kyzrpyy+9WcvOV6URntqw7La9sNVstXyczWVaWYbaaTYqzOHpr7pyiNT3/YzKuT63Z/FqKZlFTiuXtFM2vVOtIq7jiyKJbWZaOWD0euz0yoV2Z7kY0xq2x0YhfzVpmM5px9nTEH7JZ0ot5u39p0ma75Z472/s/H+2yr2inYyuq7fMvJivH2rM72N/Z3lyL31F2b1ya1P0zn816k2KP6JU9UzseucdQH5YqVeH/lFajSN2udg+TLJ9rksNxlvV2lki19rXKI43TPLejFu4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ouNH/08++RGemfQ+nsx/5uNXsQPGulynPvv3ZTW37zd+1ovrqaYpP/122X6Xpx779Z3zr/3YOPKW1lkaRDf31pPaf3j/msRsVGkL+d/f+/m4sJsPm1cfSsr16e8m9Ldj/KsnyIuR3nXw83Is3EhxLd/2V773ks3m/cj/THKUummdP9qKhIOImuOU0Xjwb3y+oqt735rpTetVbF9n8R4x9crRfO77TKqVOZpDclv5bfK18lMnk+q0K18UpxF/RrGXE0Zxtqx3tWSj+vxbL4XaasfKb0dRbtLW73JsfPGg177H+OmGKlfvS1msllt7JEJm9XOJqXR+Fkfo1H66uy5H1v3Xx5+uJmGLw9jro2u7Loj4PnuR6+f+e3d261+eazNhzrL7X83MohoHpS4PddV8ki1it61//pw1g7z6p1U/26Nm2llST57B5rUvuG0XqSU/rPd7jYrqWcbd+beJQ77BgPMDwn37/8BAGCf0eMTOH4cPlufv9VGgJOzqf8Fjm1APXkd7B7f5dF57GPMaWy/MTvjvNvtXj6h8W2+GXvnzXaseeeHEgAAAAAAAB7aQXeKlcGiadBoEOeLb2dtpGOL2MyOtf391a3P/zD96c3JzIP3t4oV797vrh8+vn+YRL5bBuj/AQAAAABqJvfHXQAAHkX82zfXAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACeAgkAAAAAAAAAqLuRLAAAAAAAAACA2hv9D1iu/VAYaAYA', 'base64'));
+//# sourceMappingURL=code-points-data.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.js.map
new file mode 100644
index 000000000..1da1c5500
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-data.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"code-points-data.js","sourceRoot":"","sources":["../src/code-points-data.ts"],"names":[],"mappings":";;AAAA,+BAAkC;AAElC,kBAAe,IAAA,iBAAU,EACvB,MAAM,CAAC,IAAI,CACT,knFAAknF,EAClnF,QAAQ,CACT,CACF,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts
new file mode 100644
index 000000000..36b6c5650
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts
@@ -0,0 +1,7 @@
+export declare const unassigned_code_points: Set;
+export declare const commonly_mapped_to_nothing: Set;
+export declare const non_ASCII_space_characters: Set;
+export declare const prohibited_characters: Set;
+export declare const bidirectional_r_al: Set;
+export declare const bidirectional_l: Set;
+//# sourceMappingURL=code-points-src.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts.map
new file mode 100644
index 000000000..ef0e6947b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"code-points-src.d.ts","sourceRoot":"","sources":["../src/code-points-src.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB,aA6YjC,CAAC;AAMH,eAAO,MAAM,0BAA0B,aAIrC,CAAC;AAMH,eAAO,MAAM,0BAA0B,aASrC,CAAC;AAMH,eAAO,MAAM,qBAAqB,aA6GhC,CAAC;AAMH,eAAO,MAAM,kBAAkB,aAmC7B,CAAC;AAMH,eAAO,MAAM,eAAe,aAyW1B,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.js
new file mode 100644
index 000000000..2caa62978
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.js
@@ -0,0 +1,881 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.bidirectional_l = exports.bidirectional_r_al = exports.prohibited_characters = exports.non_ASCII_space_characters = exports.commonly_mapped_to_nothing = exports.unassigned_code_points = void 0;
+const util_1 = require("./util");
+exports.unassigned_code_points = new Set([
+ 0x0221,
+ ...(0, util_1.range)(0x0234, 0x024f),
+ ...(0, util_1.range)(0x02ae, 0x02af),
+ ...(0, util_1.range)(0x02ef, 0x02ff),
+ ...(0, util_1.range)(0x0350, 0x035f),
+ ...(0, util_1.range)(0x0370, 0x0373),
+ ...(0, util_1.range)(0x0376, 0x0379),
+ ...(0, util_1.range)(0x037b, 0x037d),
+ ...(0, util_1.range)(0x037f, 0x0383),
+ 0x038b,
+ 0x038d,
+ 0x03a2,
+ 0x03cf,
+ ...(0, util_1.range)(0x03f7, 0x03ff),
+ 0x0487,
+ 0x04cf,
+ ...(0, util_1.range)(0x04f6, 0x04f7),
+ ...(0, util_1.range)(0x04fa, 0x04ff),
+ ...(0, util_1.range)(0x0510, 0x0530),
+ ...(0, util_1.range)(0x0557, 0x0558),
+ 0x0560,
+ 0x0588,
+ ...(0, util_1.range)(0x058b, 0x0590),
+ 0x05a2,
+ 0x05ba,
+ ...(0, util_1.range)(0x05c5, 0x05cf),
+ ...(0, util_1.range)(0x05eb, 0x05ef),
+ ...(0, util_1.range)(0x05f5, 0x060b),
+ ...(0, util_1.range)(0x060d, 0x061a),
+ ...(0, util_1.range)(0x061c, 0x061e),
+ 0x0620,
+ ...(0, util_1.range)(0x063b, 0x063f),
+ ...(0, util_1.range)(0x0656, 0x065f),
+ ...(0, util_1.range)(0x06ee, 0x06ef),
+ 0x06ff,
+ 0x070e,
+ ...(0, util_1.range)(0x072d, 0x072f),
+ ...(0, util_1.range)(0x074b, 0x077f),
+ ...(0, util_1.range)(0x07b2, 0x0900),
+ 0x0904,
+ ...(0, util_1.range)(0x093a, 0x093b),
+ ...(0, util_1.range)(0x094e, 0x094f),
+ ...(0, util_1.range)(0x0955, 0x0957),
+ ...(0, util_1.range)(0x0971, 0x0980),
+ 0x0984,
+ ...(0, util_1.range)(0x098d, 0x098e),
+ ...(0, util_1.range)(0x0991, 0x0992),
+ 0x09a9,
+ 0x09b1,
+ ...(0, util_1.range)(0x09b3, 0x09b5),
+ ...(0, util_1.range)(0x09ba, 0x09bb),
+ 0x09bd,
+ ...(0, util_1.range)(0x09c5, 0x09c6),
+ ...(0, util_1.range)(0x09c9, 0x09ca),
+ ...(0, util_1.range)(0x09ce, 0x09d6),
+ ...(0, util_1.range)(0x09d8, 0x09db),
+ 0x09de,
+ ...(0, util_1.range)(0x09e4, 0x09e5),
+ ...(0, util_1.range)(0x09fb, 0x0a01),
+ ...(0, util_1.range)(0x0a03, 0x0a04),
+ ...(0, util_1.range)(0x0a0b, 0x0a0e),
+ ...(0, util_1.range)(0x0a11, 0x0a12),
+ 0x0a29,
+ 0x0a31,
+ 0x0a34,
+ 0x0a37,
+ ...(0, util_1.range)(0x0a3a, 0x0a3b),
+ 0x0a3d,
+ ...(0, util_1.range)(0x0a43, 0x0a46),
+ ...(0, util_1.range)(0x0a49, 0x0a4a),
+ ...(0, util_1.range)(0x0a4e, 0x0a58),
+ 0x0a5d,
+ ...(0, util_1.range)(0x0a5f, 0x0a65),
+ ...(0, util_1.range)(0x0a75, 0x0a80),
+ 0x0a84,
+ 0x0a8c,
+ 0x0a8e,
+ 0x0a92,
+ 0x0aa9,
+ 0x0ab1,
+ 0x0ab4,
+ ...(0, util_1.range)(0x0aba, 0x0abb),
+ 0x0ac6,
+ 0x0aca,
+ ...(0, util_1.range)(0x0ace, 0x0acf),
+ ...(0, util_1.range)(0x0ad1, 0x0adf),
+ ...(0, util_1.range)(0x0ae1, 0x0ae5),
+ ...(0, util_1.range)(0x0af0, 0x0b00),
+ 0x0b04,
+ ...(0, util_1.range)(0x0b0d, 0x0b0e),
+ ...(0, util_1.range)(0x0b11, 0x0b12),
+ 0x0b29,
+ 0x0b31,
+ ...(0, util_1.range)(0x0b34, 0x0b35),
+ ...(0, util_1.range)(0x0b3a, 0x0b3b),
+ ...(0, util_1.range)(0x0b44, 0x0b46),
+ ...(0, util_1.range)(0x0b49, 0x0b4a),
+ ...(0, util_1.range)(0x0b4e, 0x0b55),
+ ...(0, util_1.range)(0x0b58, 0x0b5b),
+ 0x0b5e,
+ ...(0, util_1.range)(0x0b62, 0x0b65),
+ ...(0, util_1.range)(0x0b71, 0x0b81),
+ 0x0b84,
+ ...(0, util_1.range)(0x0b8b, 0x0b8d),
+ 0x0b91,
+ ...(0, util_1.range)(0x0b96, 0x0b98),
+ 0x0b9b,
+ 0x0b9d,
+ ...(0, util_1.range)(0x0ba0, 0x0ba2),
+ ...(0, util_1.range)(0x0ba5, 0x0ba7),
+ ...(0, util_1.range)(0x0bab, 0x0bad),
+ 0x0bb6,
+ ...(0, util_1.range)(0x0bba, 0x0bbd),
+ ...(0, util_1.range)(0x0bc3, 0x0bc5),
+ 0x0bc9,
+ ...(0, util_1.range)(0x0bce, 0x0bd6),
+ ...(0, util_1.range)(0x0bd8, 0x0be6),
+ ...(0, util_1.range)(0x0bf3, 0x0c00),
+ 0x0c04,
+ 0x0c0d,
+ 0x0c11,
+ 0x0c29,
+ 0x0c34,
+ ...(0, util_1.range)(0x0c3a, 0x0c3d),
+ 0x0c45,
+ 0x0c49,
+ ...(0, util_1.range)(0x0c4e, 0x0c54),
+ ...(0, util_1.range)(0x0c57, 0x0c5f),
+ ...(0, util_1.range)(0x0c62, 0x0c65),
+ ...(0, util_1.range)(0x0c70, 0x0c81),
+ 0x0c84,
+ 0x0c8d,
+ 0x0c91,
+ 0x0ca9,
+ 0x0cb4,
+ ...(0, util_1.range)(0x0cba, 0x0cbd),
+ 0x0cc5,
+ 0x0cc9,
+ ...(0, util_1.range)(0x0cce, 0x0cd4),
+ ...(0, util_1.range)(0x0cd7, 0x0cdd),
+ 0x0cdf,
+ ...(0, util_1.range)(0x0ce2, 0x0ce5),
+ ...(0, util_1.range)(0x0cf0, 0x0d01),
+ 0x0d04,
+ 0x0d0d,
+ 0x0d11,
+ 0x0d29,
+ ...(0, util_1.range)(0x0d3a, 0x0d3d),
+ ...(0, util_1.range)(0x0d44, 0x0d45),
+ 0x0d49,
+ ...(0, util_1.range)(0x0d4e, 0x0d56),
+ ...(0, util_1.range)(0x0d58, 0x0d5f),
+ ...(0, util_1.range)(0x0d62, 0x0d65),
+ ...(0, util_1.range)(0x0d70, 0x0d81),
+ 0x0d84,
+ ...(0, util_1.range)(0x0d97, 0x0d99),
+ 0x0db2,
+ 0x0dbc,
+ ...(0, util_1.range)(0x0dbe, 0x0dbf),
+ ...(0, util_1.range)(0x0dc7, 0x0dc9),
+ ...(0, util_1.range)(0x0dcb, 0x0dce),
+ 0x0dd5,
+ 0x0dd7,
+ ...(0, util_1.range)(0x0de0, 0x0df1),
+ ...(0, util_1.range)(0x0df5, 0x0e00),
+ ...(0, util_1.range)(0x0e3b, 0x0e3e),
+ ...(0, util_1.range)(0x0e5c, 0x0e80),
+ 0x0e83,
+ ...(0, util_1.range)(0x0e85, 0x0e86),
+ 0x0e89,
+ ...(0, util_1.range)(0x0e8b, 0x0e8c),
+ ...(0, util_1.range)(0x0e8e, 0x0e93),
+ 0x0e98,
+ 0x0ea0,
+ 0x0ea4,
+ 0x0ea6,
+ ...(0, util_1.range)(0x0ea8, 0x0ea9),
+ 0x0eac,
+ 0x0eba,
+ ...(0, util_1.range)(0x0ebe, 0x0ebf),
+ 0x0ec5,
+ 0x0ec7,
+ ...(0, util_1.range)(0x0ece, 0x0ecf),
+ ...(0, util_1.range)(0x0eda, 0x0edb),
+ ...(0, util_1.range)(0x0ede, 0x0eff),
+ 0x0f48,
+ ...(0, util_1.range)(0x0f6b, 0x0f70),
+ ...(0, util_1.range)(0x0f8c, 0x0f8f),
+ 0x0f98,
+ 0x0fbd,
+ ...(0, util_1.range)(0x0fcd, 0x0fce),
+ ...(0, util_1.range)(0x0fd0, 0x0fff),
+ 0x1022,
+ 0x1028,
+ 0x102b,
+ ...(0, util_1.range)(0x1033, 0x1035),
+ ...(0, util_1.range)(0x103a, 0x103f),
+ ...(0, util_1.range)(0x105a, 0x109f),
+ ...(0, util_1.range)(0x10c6, 0x10cf),
+ ...(0, util_1.range)(0x10f9, 0x10fa),
+ ...(0, util_1.range)(0x10fc, 0x10ff),
+ ...(0, util_1.range)(0x115a, 0x115e),
+ ...(0, util_1.range)(0x11a3, 0x11a7),
+ ...(0, util_1.range)(0x11fa, 0x11ff),
+ 0x1207,
+ 0x1247,
+ 0x1249,
+ ...(0, util_1.range)(0x124e, 0x124f),
+ 0x1257,
+ 0x1259,
+ ...(0, util_1.range)(0x125e, 0x125f),
+ 0x1287,
+ 0x1289,
+ ...(0, util_1.range)(0x128e, 0x128f),
+ 0x12af,
+ 0x12b1,
+ ...(0, util_1.range)(0x12b6, 0x12b7),
+ 0x12bf,
+ 0x12c1,
+ ...(0, util_1.range)(0x12c6, 0x12c7),
+ 0x12cf,
+ 0x12d7,
+ 0x12ef,
+ 0x130f,
+ 0x1311,
+ ...(0, util_1.range)(0x1316, 0x1317),
+ 0x131f,
+ 0x1347,
+ ...(0, util_1.range)(0x135b, 0x1360),
+ ...(0, util_1.range)(0x137d, 0x139f),
+ ...(0, util_1.range)(0x13f5, 0x1400),
+ ...(0, util_1.range)(0x1677, 0x167f),
+ ...(0, util_1.range)(0x169d, 0x169f),
+ ...(0, util_1.range)(0x16f1, 0x16ff),
+ 0x170d,
+ ...(0, util_1.range)(0x1715, 0x171f),
+ ...(0, util_1.range)(0x1737, 0x173f),
+ ...(0, util_1.range)(0x1754, 0x175f),
+ 0x176d,
+ 0x1771,
+ ...(0, util_1.range)(0x1774, 0x177f),
+ ...(0, util_1.range)(0x17dd, 0x17df),
+ ...(0, util_1.range)(0x17ea, 0x17ff),
+ 0x180f,
+ ...(0, util_1.range)(0x181a, 0x181f),
+ ...(0, util_1.range)(0x1878, 0x187f),
+ ...(0, util_1.range)(0x18aa, 0x1dff),
+ ...(0, util_1.range)(0x1e9c, 0x1e9f),
+ ...(0, util_1.range)(0x1efa, 0x1eff),
+ ...(0, util_1.range)(0x1f16, 0x1f17),
+ ...(0, util_1.range)(0x1f1e, 0x1f1f),
+ ...(0, util_1.range)(0x1f46, 0x1f47),
+ ...(0, util_1.range)(0x1f4e, 0x1f4f),
+ 0x1f58,
+ 0x1f5a,
+ 0x1f5c,
+ 0x1f5e,
+ ...(0, util_1.range)(0x1f7e, 0x1f7f),
+ 0x1fb5,
+ 0x1fc5,
+ ...(0, util_1.range)(0x1fd4, 0x1fd5),
+ 0x1fdc,
+ ...(0, util_1.range)(0x1ff0, 0x1ff1),
+ 0x1ff5,
+ 0x1fff,
+ ...(0, util_1.range)(0x2053, 0x2056),
+ ...(0, util_1.range)(0x2058, 0x205e),
+ ...(0, util_1.range)(0x2064, 0x2069),
+ ...(0, util_1.range)(0x2072, 0x2073),
+ ...(0, util_1.range)(0x208f, 0x209f),
+ ...(0, util_1.range)(0x20b2, 0x20cf),
+ ...(0, util_1.range)(0x20eb, 0x20ff),
+ ...(0, util_1.range)(0x213b, 0x213c),
+ ...(0, util_1.range)(0x214c, 0x2152),
+ ...(0, util_1.range)(0x2184, 0x218f),
+ ...(0, util_1.range)(0x23cf, 0x23ff),
+ ...(0, util_1.range)(0x2427, 0x243f),
+ ...(0, util_1.range)(0x244b, 0x245f),
+ 0x24ff,
+ ...(0, util_1.range)(0x2614, 0x2615),
+ 0x2618,
+ ...(0, util_1.range)(0x267e, 0x267f),
+ ...(0, util_1.range)(0x268a, 0x2700),
+ 0x2705,
+ ...(0, util_1.range)(0x270a, 0x270b),
+ 0x2728,
+ 0x274c,
+ 0x274e,
+ ...(0, util_1.range)(0x2753, 0x2755),
+ 0x2757,
+ ...(0, util_1.range)(0x275f, 0x2760),
+ ...(0, util_1.range)(0x2795, 0x2797),
+ 0x27b0,
+ ...(0, util_1.range)(0x27bf, 0x27cf),
+ ...(0, util_1.range)(0x27ec, 0x27ef),
+ ...(0, util_1.range)(0x2b00, 0x2e7f),
+ 0x2e9a,
+ ...(0, util_1.range)(0x2ef4, 0x2eff),
+ ...(0, util_1.range)(0x2fd6, 0x2fef),
+ ...(0, util_1.range)(0x2ffc, 0x2fff),
+ 0x3040,
+ ...(0, util_1.range)(0x3097, 0x3098),
+ ...(0, util_1.range)(0x3100, 0x3104),
+ ...(0, util_1.range)(0x312d, 0x3130),
+ 0x318f,
+ ...(0, util_1.range)(0x31b8, 0x31ef),
+ ...(0, util_1.range)(0x321d, 0x321f),
+ ...(0, util_1.range)(0x3244, 0x3250),
+ ...(0, util_1.range)(0x327c, 0x327e),
+ ...(0, util_1.range)(0x32cc, 0x32cf),
+ 0x32ff,
+ ...(0, util_1.range)(0x3377, 0x337a),
+ ...(0, util_1.range)(0x33de, 0x33df),
+ 0x33ff,
+ ...(0, util_1.range)(0x4db6, 0x4dff),
+ ...(0, util_1.range)(0x9fa6, 0x9fff),
+ ...(0, util_1.range)(0xa48d, 0xa48f),
+ ...(0, util_1.range)(0xa4c7, 0xabff),
+ ...(0, util_1.range)(0xd7a4, 0xd7ff),
+ ...(0, util_1.range)(0xfa2e, 0xfa2f),
+ ...(0, util_1.range)(0xfa6b, 0xfaff),
+ ...(0, util_1.range)(0xfb07, 0xfb12),
+ ...(0, util_1.range)(0xfb18, 0xfb1c),
+ 0xfb37,
+ 0xfb3d,
+ 0xfb3f,
+ 0xfb42,
+ 0xfb45,
+ ...(0, util_1.range)(0xfbb2, 0xfbd2),
+ ...(0, util_1.range)(0xfd40, 0xfd4f),
+ ...(0, util_1.range)(0xfd90, 0xfd91),
+ ...(0, util_1.range)(0xfdc8, 0xfdcf),
+ ...(0, util_1.range)(0xfdfd, 0xfdff),
+ ...(0, util_1.range)(0xfe10, 0xfe1f),
+ ...(0, util_1.range)(0xfe24, 0xfe2f),
+ ...(0, util_1.range)(0xfe47, 0xfe48),
+ 0xfe53,
+ 0xfe67,
+ ...(0, util_1.range)(0xfe6c, 0xfe6f),
+ 0xfe75,
+ ...(0, util_1.range)(0xfefd, 0xfefe),
+ 0xff00,
+ ...(0, util_1.range)(0xffbf, 0xffc1),
+ ...(0, util_1.range)(0xffc8, 0xffc9),
+ ...(0, util_1.range)(0xffd0, 0xffd1),
+ ...(0, util_1.range)(0xffd8, 0xffd9),
+ ...(0, util_1.range)(0xffdd, 0xffdf),
+ 0xffe7,
+ ...(0, util_1.range)(0xffef, 0xfff8),
+ ...(0, util_1.range)(0x10000, 0x102ff),
+ 0x1031f,
+ ...(0, util_1.range)(0x10324, 0x1032f),
+ ...(0, util_1.range)(0x1034b, 0x103ff),
+ ...(0, util_1.range)(0x10426, 0x10427),
+ ...(0, util_1.range)(0x1044e, 0x1cfff),
+ ...(0, util_1.range)(0x1d0f6, 0x1d0ff),
+ ...(0, util_1.range)(0x1d127, 0x1d129),
+ ...(0, util_1.range)(0x1d1de, 0x1d3ff),
+ 0x1d455,
+ 0x1d49d,
+ ...(0, util_1.range)(0x1d4a0, 0x1d4a1),
+ ...(0, util_1.range)(0x1d4a3, 0x1d4a4),
+ ...(0, util_1.range)(0x1d4a7, 0x1d4a8),
+ 0x1d4ad,
+ 0x1d4ba,
+ 0x1d4bc,
+ 0x1d4c1,
+ 0x1d4c4,
+ 0x1d506,
+ ...(0, util_1.range)(0x1d50b, 0x1d50c),
+ 0x1d515,
+ 0x1d51d,
+ 0x1d53a,
+ 0x1d53f,
+ 0x1d545,
+ ...(0, util_1.range)(0x1d547, 0x1d549),
+ 0x1d551,
+ ...(0, util_1.range)(0x1d6a4, 0x1d6a7),
+ ...(0, util_1.range)(0x1d7ca, 0x1d7cd),
+ ...(0, util_1.range)(0x1d800, 0x1fffd),
+ ...(0, util_1.range)(0x2a6d7, 0x2f7ff),
+ ...(0, util_1.range)(0x2fa1e, 0x2fffd),
+ ...(0, util_1.range)(0x30000, 0x3fffd),
+ ...(0, util_1.range)(0x40000, 0x4fffd),
+ ...(0, util_1.range)(0x50000, 0x5fffd),
+ ...(0, util_1.range)(0x60000, 0x6fffd),
+ ...(0, util_1.range)(0x70000, 0x7fffd),
+ ...(0, util_1.range)(0x80000, 0x8fffd),
+ ...(0, util_1.range)(0x90000, 0x9fffd),
+ ...(0, util_1.range)(0xa0000, 0xafffd),
+ ...(0, util_1.range)(0xb0000, 0xbfffd),
+ ...(0, util_1.range)(0xc0000, 0xcfffd),
+ ...(0, util_1.range)(0xd0000, 0xdfffd),
+ 0xe0000,
+ ...(0, util_1.range)(0xe0002, 0xe001f),
+ ...(0, util_1.range)(0xe0080, 0xefffd),
+]);
+exports.commonly_mapped_to_nothing = new Set([
+ 0x00ad, 0x034f, 0x1806, 0x180b, 0x180c, 0x180d, 0x200b, 0x200c, 0x200d,
+ 0x2060, 0xfe00, 0xfe01, 0xfe02, 0xfe03, 0xfe04, 0xfe05, 0xfe06, 0xfe07,
+ 0xfe08, 0xfe09, 0xfe0a, 0xfe0b, 0xfe0c, 0xfe0d, 0xfe0e, 0xfe0f, 0xfeff,
+]);
+exports.non_ASCII_space_characters = new Set([
+ 0x00a0, 0x1680,
+ 0x2000, 0x2001, 0x2002,
+ 0x2003, 0x2004,
+ 0x2005, 0x2006,
+ 0x2007, 0x2008,
+ 0x2009, 0x200a,
+ 0x200b, 0x202f,
+ 0x205f, 0x3000,
+]);
+exports.prohibited_characters = new Set([
+ ...exports.non_ASCII_space_characters,
+ ...(0, util_1.range)(0, 0x001f),
+ 0x007f,
+ ...(0, util_1.range)(0x0080, 0x009f),
+ 0x06dd,
+ 0x070f,
+ 0x180e,
+ 0x200c,
+ 0x200d,
+ 0x2028,
+ 0x2029,
+ 0x2060,
+ 0x2061,
+ 0x2062,
+ 0x2063,
+ ...(0, util_1.range)(0x206a, 0x206f),
+ 0xfeff,
+ ...(0, util_1.range)(0xfff9, 0xfffc),
+ ...(0, util_1.range)(0x1d173, 0x1d17a),
+ ...(0, util_1.range)(0xe000, 0xf8ff),
+ ...(0, util_1.range)(0xf0000, 0xffffd),
+ ...(0, util_1.range)(0x100000, 0x10fffd),
+ ...(0, util_1.range)(0xfdd0, 0xfdef),
+ ...(0, util_1.range)(0xfffe, 0xffff),
+ ...(0, util_1.range)(0x1fffe, 0x1ffff),
+ ...(0, util_1.range)(0x2fffe, 0x2ffff),
+ ...(0, util_1.range)(0x3fffe, 0x3ffff),
+ ...(0, util_1.range)(0x4fffe, 0x4ffff),
+ ...(0, util_1.range)(0x5fffe, 0x5ffff),
+ ...(0, util_1.range)(0x6fffe, 0x6ffff),
+ ...(0, util_1.range)(0x7fffe, 0x7ffff),
+ ...(0, util_1.range)(0x8fffe, 0x8ffff),
+ ...(0, util_1.range)(0x9fffe, 0x9ffff),
+ ...(0, util_1.range)(0xafffe, 0xaffff),
+ ...(0, util_1.range)(0xbfffe, 0xbffff),
+ ...(0, util_1.range)(0xcfffe, 0xcffff),
+ ...(0, util_1.range)(0xdfffe, 0xdffff),
+ ...(0, util_1.range)(0xefffe, 0xeffff),
+ ...(0, util_1.range)(0x10fffe, 0x10ffff),
+ ...(0, util_1.range)(0xd800, 0xdfff),
+ 0xfff9,
+ 0xfffa,
+ 0xfffb,
+ 0xfffc,
+ 0xfffd,
+ ...(0, util_1.range)(0x2ff0, 0x2ffb),
+ 0x0340,
+ 0x0341,
+ 0x200e,
+ 0x200f,
+ 0x202a,
+ 0x202b,
+ 0x202c,
+ 0x202d,
+ 0x202e,
+ 0x206a,
+ 0x206b,
+ 0x206c,
+ 0x206d,
+ 0x206e,
+ 0x206f,
+ 0xe0001,
+ ...(0, util_1.range)(0xe0020, 0xe007f),
+]);
+exports.bidirectional_r_al = new Set([
+ 0x05be,
+ 0x05c0,
+ 0x05c3,
+ ...(0, util_1.range)(0x05d0, 0x05ea),
+ ...(0, util_1.range)(0x05f0, 0x05f4),
+ 0x061b,
+ 0x061f,
+ ...(0, util_1.range)(0x0621, 0x063a),
+ ...(0, util_1.range)(0x0640, 0x064a),
+ ...(0, util_1.range)(0x066d, 0x066f),
+ ...(0, util_1.range)(0x0671, 0x06d5),
+ 0x06dd,
+ ...(0, util_1.range)(0x06e5, 0x06e6),
+ ...(0, util_1.range)(0x06fa, 0x06fe),
+ ...(0, util_1.range)(0x0700, 0x070d),
+ 0x0710,
+ ...(0, util_1.range)(0x0712, 0x072c),
+ ...(0, util_1.range)(0x0780, 0x07a5),
+ 0x07b1,
+ 0x200f,
+ 0xfb1d,
+ ...(0, util_1.range)(0xfb1f, 0xfb28),
+ ...(0, util_1.range)(0xfb2a, 0xfb36),
+ ...(0, util_1.range)(0xfb38, 0xfb3c),
+ 0xfb3e,
+ ...(0, util_1.range)(0xfb40, 0xfb41),
+ ...(0, util_1.range)(0xfb43, 0xfb44),
+ ...(0, util_1.range)(0xfb46, 0xfbb1),
+ ...(0, util_1.range)(0xfbd3, 0xfd3d),
+ ...(0, util_1.range)(0xfd50, 0xfd8f),
+ ...(0, util_1.range)(0xfd92, 0xfdc7),
+ ...(0, util_1.range)(0xfdf0, 0xfdfc),
+ ...(0, util_1.range)(0xfe70, 0xfe74),
+ ...(0, util_1.range)(0xfe76, 0xfefc),
+]);
+exports.bidirectional_l = new Set([
+ ...(0, util_1.range)(0x0041, 0x005a),
+ ...(0, util_1.range)(0x0061, 0x007a),
+ 0x00aa,
+ 0x00b5,
+ 0x00ba,
+ ...(0, util_1.range)(0x00c0, 0x00d6),
+ ...(0, util_1.range)(0x00d8, 0x00f6),
+ ...(0, util_1.range)(0x00f8, 0x0220),
+ ...(0, util_1.range)(0x0222, 0x0233),
+ ...(0, util_1.range)(0x0250, 0x02ad),
+ ...(0, util_1.range)(0x02b0, 0x02b8),
+ ...(0, util_1.range)(0x02bb, 0x02c1),
+ ...(0, util_1.range)(0x02d0, 0x02d1),
+ ...(0, util_1.range)(0x02e0, 0x02e4),
+ 0x02ee,
+ 0x037a,
+ 0x0386,
+ ...(0, util_1.range)(0x0388, 0x038a),
+ 0x038c,
+ ...(0, util_1.range)(0x038e, 0x03a1),
+ ...(0, util_1.range)(0x03a3, 0x03ce),
+ ...(0, util_1.range)(0x03d0, 0x03f5),
+ ...(0, util_1.range)(0x0400, 0x0482),
+ ...(0, util_1.range)(0x048a, 0x04ce),
+ ...(0, util_1.range)(0x04d0, 0x04f5),
+ ...(0, util_1.range)(0x04f8, 0x04f9),
+ ...(0, util_1.range)(0x0500, 0x050f),
+ ...(0, util_1.range)(0x0531, 0x0556),
+ ...(0, util_1.range)(0x0559, 0x055f),
+ ...(0, util_1.range)(0x0561, 0x0587),
+ 0x0589,
+ 0x0903,
+ ...(0, util_1.range)(0x0905, 0x0939),
+ ...(0, util_1.range)(0x093d, 0x0940),
+ ...(0, util_1.range)(0x0949, 0x094c),
+ 0x0950,
+ ...(0, util_1.range)(0x0958, 0x0961),
+ ...(0, util_1.range)(0x0964, 0x0970),
+ ...(0, util_1.range)(0x0982, 0x0983),
+ ...(0, util_1.range)(0x0985, 0x098c),
+ ...(0, util_1.range)(0x098f, 0x0990),
+ ...(0, util_1.range)(0x0993, 0x09a8),
+ ...(0, util_1.range)(0x09aa, 0x09b0),
+ 0x09b2,
+ ...(0, util_1.range)(0x09b6, 0x09b9),
+ ...(0, util_1.range)(0x09be, 0x09c0),
+ ...(0, util_1.range)(0x09c7, 0x09c8),
+ ...(0, util_1.range)(0x09cb, 0x09cc),
+ 0x09d7,
+ ...(0, util_1.range)(0x09dc, 0x09dd),
+ ...(0, util_1.range)(0x09df, 0x09e1),
+ ...(0, util_1.range)(0x09e6, 0x09f1),
+ ...(0, util_1.range)(0x09f4, 0x09fa),
+ ...(0, util_1.range)(0x0a05, 0x0a0a),
+ ...(0, util_1.range)(0x0a0f, 0x0a10),
+ ...(0, util_1.range)(0x0a13, 0x0a28),
+ ...(0, util_1.range)(0x0a2a, 0x0a30),
+ ...(0, util_1.range)(0x0a32, 0x0a33),
+ ...(0, util_1.range)(0x0a35, 0x0a36),
+ ...(0, util_1.range)(0x0a38, 0x0a39),
+ ...(0, util_1.range)(0x0a3e, 0x0a40),
+ ...(0, util_1.range)(0x0a59, 0x0a5c),
+ 0x0a5e,
+ ...(0, util_1.range)(0x0a66, 0x0a6f),
+ ...(0, util_1.range)(0x0a72, 0x0a74),
+ 0x0a83,
+ ...(0, util_1.range)(0x0a85, 0x0a8b),
+ 0x0a8d,
+ ...(0, util_1.range)(0x0a8f, 0x0a91),
+ ...(0, util_1.range)(0x0a93, 0x0aa8),
+ ...(0, util_1.range)(0x0aaa, 0x0ab0),
+ ...(0, util_1.range)(0x0ab2, 0x0ab3),
+ ...(0, util_1.range)(0x0ab5, 0x0ab9),
+ ...(0, util_1.range)(0x0abd, 0x0ac0),
+ 0x0ac9,
+ ...(0, util_1.range)(0x0acb, 0x0acc),
+ 0x0ad0,
+ 0x0ae0,
+ ...(0, util_1.range)(0x0ae6, 0x0aef),
+ ...(0, util_1.range)(0x0b02, 0x0b03),
+ ...(0, util_1.range)(0x0b05, 0x0b0c),
+ ...(0, util_1.range)(0x0b0f, 0x0b10),
+ ...(0, util_1.range)(0x0b13, 0x0b28),
+ ...(0, util_1.range)(0x0b2a, 0x0b30),
+ ...(0, util_1.range)(0x0b32, 0x0b33),
+ ...(0, util_1.range)(0x0b36, 0x0b39),
+ ...(0, util_1.range)(0x0b3d, 0x0b3e),
+ 0x0b40,
+ ...(0, util_1.range)(0x0b47, 0x0b48),
+ ...(0, util_1.range)(0x0b4b, 0x0b4c),
+ 0x0b57,
+ ...(0, util_1.range)(0x0b5c, 0x0b5d),
+ ...(0, util_1.range)(0x0b5f, 0x0b61),
+ ...(0, util_1.range)(0x0b66, 0x0b70),
+ 0x0b83,
+ ...(0, util_1.range)(0x0b85, 0x0b8a),
+ ...(0, util_1.range)(0x0b8e, 0x0b90),
+ ...(0, util_1.range)(0x0b92, 0x0b95),
+ ...(0, util_1.range)(0x0b99, 0x0b9a),
+ 0x0b9c,
+ ...(0, util_1.range)(0x0b9e, 0x0b9f),
+ ...(0, util_1.range)(0x0ba3, 0x0ba4),
+ ...(0, util_1.range)(0x0ba8, 0x0baa),
+ ...(0, util_1.range)(0x0bae, 0x0bb5),
+ ...(0, util_1.range)(0x0bb7, 0x0bb9),
+ ...(0, util_1.range)(0x0bbe, 0x0bbf),
+ ...(0, util_1.range)(0x0bc1, 0x0bc2),
+ ...(0, util_1.range)(0x0bc6, 0x0bc8),
+ ...(0, util_1.range)(0x0bca, 0x0bcc),
+ 0x0bd7,
+ ...(0, util_1.range)(0x0be7, 0x0bf2),
+ ...(0, util_1.range)(0x0c01, 0x0c03),
+ ...(0, util_1.range)(0x0c05, 0x0c0c),
+ ...(0, util_1.range)(0x0c0e, 0x0c10),
+ ...(0, util_1.range)(0x0c12, 0x0c28),
+ ...(0, util_1.range)(0x0c2a, 0x0c33),
+ ...(0, util_1.range)(0x0c35, 0x0c39),
+ ...(0, util_1.range)(0x0c41, 0x0c44),
+ ...(0, util_1.range)(0x0c60, 0x0c61),
+ ...(0, util_1.range)(0x0c66, 0x0c6f),
+ ...(0, util_1.range)(0x0c82, 0x0c83),
+ ...(0, util_1.range)(0x0c85, 0x0c8c),
+ ...(0, util_1.range)(0x0c8e, 0x0c90),
+ ...(0, util_1.range)(0x0c92, 0x0ca8),
+ ...(0, util_1.range)(0x0caa, 0x0cb3),
+ ...(0, util_1.range)(0x0cb5, 0x0cb9),
+ 0x0cbe,
+ ...(0, util_1.range)(0x0cc0, 0x0cc4),
+ ...(0, util_1.range)(0x0cc7, 0x0cc8),
+ ...(0, util_1.range)(0x0cca, 0x0ccb),
+ ...(0, util_1.range)(0x0cd5, 0x0cd6),
+ 0x0cde,
+ ...(0, util_1.range)(0x0ce0, 0x0ce1),
+ ...(0, util_1.range)(0x0ce6, 0x0cef),
+ ...(0, util_1.range)(0x0d02, 0x0d03),
+ ...(0, util_1.range)(0x0d05, 0x0d0c),
+ ...(0, util_1.range)(0x0d0e, 0x0d10),
+ ...(0, util_1.range)(0x0d12, 0x0d28),
+ ...(0, util_1.range)(0x0d2a, 0x0d39),
+ ...(0, util_1.range)(0x0d3e, 0x0d40),
+ ...(0, util_1.range)(0x0d46, 0x0d48),
+ ...(0, util_1.range)(0x0d4a, 0x0d4c),
+ 0x0d57,
+ ...(0, util_1.range)(0x0d60, 0x0d61),
+ ...(0, util_1.range)(0x0d66, 0x0d6f),
+ ...(0, util_1.range)(0x0d82, 0x0d83),
+ ...(0, util_1.range)(0x0d85, 0x0d96),
+ ...(0, util_1.range)(0x0d9a, 0x0db1),
+ ...(0, util_1.range)(0x0db3, 0x0dbb),
+ 0x0dbd,
+ ...(0, util_1.range)(0x0dc0, 0x0dc6),
+ ...(0, util_1.range)(0x0dcf, 0x0dd1),
+ ...(0, util_1.range)(0x0dd8, 0x0ddf),
+ ...(0, util_1.range)(0x0df2, 0x0df4),
+ ...(0, util_1.range)(0x0e01, 0x0e30),
+ ...(0, util_1.range)(0x0e32, 0x0e33),
+ ...(0, util_1.range)(0x0e40, 0x0e46),
+ ...(0, util_1.range)(0x0e4f, 0x0e5b),
+ ...(0, util_1.range)(0x0e81, 0x0e82),
+ 0x0e84,
+ ...(0, util_1.range)(0x0e87, 0x0e88),
+ 0x0e8a,
+ 0x0e8d,
+ ...(0, util_1.range)(0x0e94, 0x0e97),
+ ...(0, util_1.range)(0x0e99, 0x0e9f),
+ ...(0, util_1.range)(0x0ea1, 0x0ea3),
+ 0x0ea5,
+ 0x0ea7,
+ ...(0, util_1.range)(0x0eaa, 0x0eab),
+ ...(0, util_1.range)(0x0ead, 0x0eb0),
+ ...(0, util_1.range)(0x0eb2, 0x0eb3),
+ 0x0ebd,
+ ...(0, util_1.range)(0x0ec0, 0x0ec4),
+ 0x0ec6,
+ ...(0, util_1.range)(0x0ed0, 0x0ed9),
+ ...(0, util_1.range)(0x0edc, 0x0edd),
+ ...(0, util_1.range)(0x0f00, 0x0f17),
+ ...(0, util_1.range)(0x0f1a, 0x0f34),
+ 0x0f36,
+ 0x0f38,
+ ...(0, util_1.range)(0x0f3e, 0x0f47),
+ ...(0, util_1.range)(0x0f49, 0x0f6a),
+ 0x0f7f,
+ 0x0f85,
+ ...(0, util_1.range)(0x0f88, 0x0f8b),
+ ...(0, util_1.range)(0x0fbe, 0x0fc5),
+ ...(0, util_1.range)(0x0fc7, 0x0fcc),
+ 0x0fcf,
+ ...(0, util_1.range)(0x1000, 0x1021),
+ ...(0, util_1.range)(0x1023, 0x1027),
+ ...(0, util_1.range)(0x1029, 0x102a),
+ 0x102c,
+ 0x1031,
+ 0x1038,
+ ...(0, util_1.range)(0x1040, 0x1057),
+ ...(0, util_1.range)(0x10a0, 0x10c5),
+ ...(0, util_1.range)(0x10d0, 0x10f8),
+ 0x10fb,
+ ...(0, util_1.range)(0x1100, 0x1159),
+ ...(0, util_1.range)(0x115f, 0x11a2),
+ ...(0, util_1.range)(0x11a8, 0x11f9),
+ ...(0, util_1.range)(0x1200, 0x1206),
+ ...(0, util_1.range)(0x1208, 0x1246),
+ 0x1248,
+ ...(0, util_1.range)(0x124a, 0x124d),
+ ...(0, util_1.range)(0x1250, 0x1256),
+ 0x1258,
+ ...(0, util_1.range)(0x125a, 0x125d),
+ ...(0, util_1.range)(0x1260, 0x1286),
+ 0x1288,
+ ...(0, util_1.range)(0x128a, 0x128d),
+ ...(0, util_1.range)(0x1290, 0x12ae),
+ 0x12b0,
+ ...(0, util_1.range)(0x12b2, 0x12b5),
+ ...(0, util_1.range)(0x12b8, 0x12be),
+ 0x12c0,
+ ...(0, util_1.range)(0x12c2, 0x12c5),
+ ...(0, util_1.range)(0x12c8, 0x12ce),
+ ...(0, util_1.range)(0x12d0, 0x12d6),
+ ...(0, util_1.range)(0x12d8, 0x12ee),
+ ...(0, util_1.range)(0x12f0, 0x130e),
+ 0x1310,
+ ...(0, util_1.range)(0x1312, 0x1315),
+ ...(0, util_1.range)(0x1318, 0x131e),
+ ...(0, util_1.range)(0x1320, 0x1346),
+ ...(0, util_1.range)(0x1348, 0x135a),
+ ...(0, util_1.range)(0x1361, 0x137c),
+ ...(0, util_1.range)(0x13a0, 0x13f4),
+ ...(0, util_1.range)(0x1401, 0x1676),
+ ...(0, util_1.range)(0x1681, 0x169a),
+ ...(0, util_1.range)(0x16a0, 0x16f0),
+ ...(0, util_1.range)(0x1700, 0x170c),
+ ...(0, util_1.range)(0x170e, 0x1711),
+ ...(0, util_1.range)(0x1720, 0x1731),
+ ...(0, util_1.range)(0x1735, 0x1736),
+ ...(0, util_1.range)(0x1740, 0x1751),
+ ...(0, util_1.range)(0x1760, 0x176c),
+ ...(0, util_1.range)(0x176e, 0x1770),
+ ...(0, util_1.range)(0x1780, 0x17b6),
+ ...(0, util_1.range)(0x17be, 0x17c5),
+ ...(0, util_1.range)(0x17c7, 0x17c8),
+ ...(0, util_1.range)(0x17d4, 0x17da),
+ 0x17dc,
+ ...(0, util_1.range)(0x17e0, 0x17e9),
+ ...(0, util_1.range)(0x1810, 0x1819),
+ ...(0, util_1.range)(0x1820, 0x1877),
+ ...(0, util_1.range)(0x1880, 0x18a8),
+ ...(0, util_1.range)(0x1e00, 0x1e9b),
+ ...(0, util_1.range)(0x1ea0, 0x1ef9),
+ ...(0, util_1.range)(0x1f00, 0x1f15),
+ ...(0, util_1.range)(0x1f18, 0x1f1d),
+ ...(0, util_1.range)(0x1f20, 0x1f45),
+ ...(0, util_1.range)(0x1f48, 0x1f4d),
+ ...(0, util_1.range)(0x1f50, 0x1f57),
+ 0x1f59,
+ 0x1f5b,
+ 0x1f5d,
+ ...(0, util_1.range)(0x1f5f, 0x1f7d),
+ ...(0, util_1.range)(0x1f80, 0x1fb4),
+ ...(0, util_1.range)(0x1fb6, 0x1fbc),
+ 0x1fbe,
+ ...(0, util_1.range)(0x1fc2, 0x1fc4),
+ ...(0, util_1.range)(0x1fc6, 0x1fcc),
+ ...(0, util_1.range)(0x1fd0, 0x1fd3),
+ ...(0, util_1.range)(0x1fd6, 0x1fdb),
+ ...(0, util_1.range)(0x1fe0, 0x1fec),
+ ...(0, util_1.range)(0x1ff2, 0x1ff4),
+ ...(0, util_1.range)(0x1ff6, 0x1ffc),
+ 0x200e,
+ 0x2071,
+ 0x207f,
+ 0x2102,
+ 0x2107,
+ ...(0, util_1.range)(0x210a, 0x2113),
+ 0x2115,
+ ...(0, util_1.range)(0x2119, 0x211d),
+ 0x2124,
+ 0x2126,
+ 0x2128,
+ ...(0, util_1.range)(0x212a, 0x212d),
+ ...(0, util_1.range)(0x212f, 0x2131),
+ ...(0, util_1.range)(0x2133, 0x2139),
+ ...(0, util_1.range)(0x213d, 0x213f),
+ ...(0, util_1.range)(0x2145, 0x2149),
+ ...(0, util_1.range)(0x2160, 0x2183),
+ ...(0, util_1.range)(0x2336, 0x237a),
+ 0x2395,
+ ...(0, util_1.range)(0x249c, 0x24e9),
+ ...(0, util_1.range)(0x3005, 0x3007),
+ ...(0, util_1.range)(0x3021, 0x3029),
+ ...(0, util_1.range)(0x3031, 0x3035),
+ ...(0, util_1.range)(0x3038, 0x303c),
+ ...(0, util_1.range)(0x3041, 0x3096),
+ ...(0, util_1.range)(0x309d, 0x309f),
+ ...(0, util_1.range)(0x30a1, 0x30fa),
+ ...(0, util_1.range)(0x30fc, 0x30ff),
+ ...(0, util_1.range)(0x3105, 0x312c),
+ ...(0, util_1.range)(0x3131, 0x318e),
+ ...(0, util_1.range)(0x3190, 0x31b7),
+ ...(0, util_1.range)(0x31f0, 0x321c),
+ ...(0, util_1.range)(0x3220, 0x3243),
+ ...(0, util_1.range)(0x3260, 0x327b),
+ ...(0, util_1.range)(0x327f, 0x32b0),
+ ...(0, util_1.range)(0x32c0, 0x32cb),
+ ...(0, util_1.range)(0x32d0, 0x32fe),
+ ...(0, util_1.range)(0x3300, 0x3376),
+ ...(0, util_1.range)(0x337b, 0x33dd),
+ ...(0, util_1.range)(0x33e0, 0x33fe),
+ ...(0, util_1.range)(0x3400, 0x4db5),
+ ...(0, util_1.range)(0x4e00, 0x9fa5),
+ ...(0, util_1.range)(0xa000, 0xa48c),
+ ...(0, util_1.range)(0xac00, 0xd7a3),
+ ...(0, util_1.range)(0xd800, 0xfa2d),
+ ...(0, util_1.range)(0xfa30, 0xfa6a),
+ ...(0, util_1.range)(0xfb00, 0xfb06),
+ ...(0, util_1.range)(0xfb13, 0xfb17),
+ ...(0, util_1.range)(0xff21, 0xff3a),
+ ...(0, util_1.range)(0xff41, 0xff5a),
+ ...(0, util_1.range)(0xff66, 0xffbe),
+ ...(0, util_1.range)(0xffc2, 0xffc7),
+ ...(0, util_1.range)(0xffca, 0xffcf),
+ ...(0, util_1.range)(0xffd2, 0xffd7),
+ ...(0, util_1.range)(0xffda, 0xffdc),
+ ...(0, util_1.range)(0x10300, 0x1031e),
+ ...(0, util_1.range)(0x10320, 0x10323),
+ ...(0, util_1.range)(0x10330, 0x1034a),
+ ...(0, util_1.range)(0x10400, 0x10425),
+ ...(0, util_1.range)(0x10428, 0x1044d),
+ ...(0, util_1.range)(0x1d000, 0x1d0f5),
+ ...(0, util_1.range)(0x1d100, 0x1d126),
+ ...(0, util_1.range)(0x1d12a, 0x1d166),
+ ...(0, util_1.range)(0x1d16a, 0x1d172),
+ ...(0, util_1.range)(0x1d183, 0x1d184),
+ ...(0, util_1.range)(0x1d18c, 0x1d1a9),
+ ...(0, util_1.range)(0x1d1ae, 0x1d1dd),
+ ...(0, util_1.range)(0x1d400, 0x1d454),
+ ...(0, util_1.range)(0x1d456, 0x1d49c),
+ ...(0, util_1.range)(0x1d49e, 0x1d49f),
+ 0x1d4a2,
+ ...(0, util_1.range)(0x1d4a5, 0x1d4a6),
+ ...(0, util_1.range)(0x1d4a9, 0x1d4ac),
+ ...(0, util_1.range)(0x1d4ae, 0x1d4b9),
+ 0x1d4bb,
+ ...(0, util_1.range)(0x1d4bd, 0x1d4c0),
+ ...(0, util_1.range)(0x1d4c2, 0x1d4c3),
+ ...(0, util_1.range)(0x1d4c5, 0x1d505),
+ ...(0, util_1.range)(0x1d507, 0x1d50a),
+ ...(0, util_1.range)(0x1d50d, 0x1d514),
+ ...(0, util_1.range)(0x1d516, 0x1d51c),
+ ...(0, util_1.range)(0x1d51e, 0x1d539),
+ ...(0, util_1.range)(0x1d53b, 0x1d53e),
+ ...(0, util_1.range)(0x1d540, 0x1d544),
+ 0x1d546,
+ ...(0, util_1.range)(0x1d54a, 0x1d550),
+ ...(0, util_1.range)(0x1d552, 0x1d6a3),
+ ...(0, util_1.range)(0x1d6a8, 0x1d7c9),
+ ...(0, util_1.range)(0x20000, 0x2a6d6),
+ ...(0, util_1.range)(0x2f800, 0x2fa1d),
+ ...(0, util_1.range)(0xf0000, 0xffffd),
+ ...(0, util_1.range)(0x100000, 0x10fffd),
+]);
+//# sourceMappingURL=code-points-src.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.js.map
new file mode 100644
index 000000000..dfb14ea82
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/code-points-src.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"code-points-src.js","sourceRoot":"","sources":["../src/code-points-src.ts"],"names":[],"mappings":";;;AAAA,iCAA+B;AAMlB,QAAA,sBAAsB,GAAG,IAAI,GAAG,CAAC;IAC5C,MAAM;IACN,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,GAAG,IAAA,YAAK,EAAC,MAAM,EAAE,MAAM,CAAC;IACxB,MAAM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GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,OAAO;IACP,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,GAAG,IAAA,YAAK,EAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B,CAAC,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts
new file mode 100644
index 000000000..5a83ab249
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=generate-code-points.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts.map
new file mode 100644
index 000000000..b102903ec
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"generate-code-points.d.ts","sourceRoot":"","sources":["../src/generate-code-points.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js
new file mode 100644
index 000000000..5dbf94849
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js
@@ -0,0 +1,73 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const zlib_1 = require("zlib");
+const sparse_bitfield_1 = __importDefault(require("sparse-bitfield"));
+const codePoints = __importStar(require("./code-points-src"));
+const fs_1 = require("fs");
+const prettier = __importStar(require("prettier"));
+const unassigned_code_points = (0, sparse_bitfield_1.default)();
+const commonly_mapped_to_nothing = (0, sparse_bitfield_1.default)();
+const non_ascii_space_characters = (0, sparse_bitfield_1.default)();
+const prohibited_characters = (0, sparse_bitfield_1.default)();
+const bidirectional_r_al = (0, sparse_bitfield_1.default)();
+const bidirectional_l = (0, sparse_bitfield_1.default)();
+function traverse(bits, src) {
+ for (const code of src.keys()) {
+ bits.set(code, true);
+ }
+ const buffer = bits.toBuffer();
+ return Buffer.concat([createSize(buffer), buffer]);
+}
+function createSize(buffer) {
+ const buf = Buffer.alloc(4);
+ buf.writeUInt32BE(buffer.length);
+ return buf;
+}
+const memory = [];
+memory.push(traverse(unassigned_code_points, codePoints.unassigned_code_points), traverse(commonly_mapped_to_nothing, codePoints.commonly_mapped_to_nothing), traverse(non_ascii_space_characters, codePoints.non_ASCII_space_characters), traverse(prohibited_characters, codePoints.prohibited_characters), traverse(bidirectional_r_al, codePoints.bidirectional_r_al), traverse(bidirectional_l, codePoints.bidirectional_l));
+async function writeCodepoints() {
+ const config = await prettier.resolveConfig(__dirname);
+ const formatOptions = { ...config, parser: 'typescript' };
+ function write(stream, chunk) {
+ return new Promise((resolve) => stream.write(chunk, () => resolve()));
+ }
+ await write((0, fs_1.createWriteStream)(process.argv[2]), prettier.format(`import { gunzipSync } from 'zlib';
+
+ export default gunzipSync(
+ Buffer.from(
+ '${(0, zlib_1.gzipSync)(Buffer.concat(memory), { level: 9 }).toString('base64')}',
+ 'base64'
+ )
+ );
+ `, formatOptions));
+ const fsStreamUncompressedData = (0, fs_1.createWriteStream)(process.argv[3]);
+ await write(fsStreamUncompressedData, prettier.format(`const data = Buffer.from('${Buffer.concat(memory).toString('base64')}', 'base64');\nexport default data;\n`, formatOptions));
+}
+writeCodepoints().catch((error) => console.error('error occurred generating saslprep codepoint data', { error }));
+//# sourceMappingURL=generate-code-points.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js.map
new file mode 100644
index 000000000..ba3002334
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"generate-code-points.js","sourceRoot":"","sources":["../src/generate-code-points.ts"],"names":[],"mapp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AAC,CAC9E,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.d.ts
new file mode 100644
index 000000000..24d575c54
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.d.ts
@@ -0,0 +1,11 @@
+import type { createMemoryCodePoints } from './memory-code-points';
+declare function saslprep({ unassigned_code_points, commonly_mapped_to_nothing, non_ASCII_space_characters, prohibited_characters, bidirectional_r_al, bidirectional_l, }: ReturnType, input: string, opts?: {
+ allowUnassigned?: boolean;
+}): string;
+declare namespace saslprep {
+ export var saslprep: typeof import(".");
+ var _a: typeof import(".");
+ export { _a as default };
+}
+export = saslprep;
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.d.ts.map
new file mode 100644
index 000000000..e53e39461
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAsCnE,iBAAS,QAAQ,CACf,EACE,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,GAChB,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,EAC5C,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAO,GACvC,MAAM,CAqGR;kBAhHQ,QAAQ;;;;;AAoHjB,SAAS,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.js
new file mode 100644
index 000000000..07d87bc58
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.js
@@ -0,0 +1,65 @@
+"use strict";
+const getCodePoint = (character) => character.codePointAt(0);
+const first = (x) => x[0];
+const last = (x) => x[x.length - 1];
+function toCodePoints(input) {
+ const codepoints = [];
+ const size = input.length;
+ for (let i = 0; i < size; i += 1) {
+ const before = input.charCodeAt(i);
+ if (before >= 0xd800 && before <= 0xdbff && size > i + 1) {
+ const next = input.charCodeAt(i + 1);
+ if (next >= 0xdc00 && next <= 0xdfff) {
+ codepoints.push((before - 0xd800) * 0x400 + next - 0xdc00 + 0x10000);
+ i += 1;
+ continue;
+ }
+ }
+ codepoints.push(before);
+ }
+ return codepoints;
+}
+function saslprep({ unassigned_code_points, commonly_mapped_to_nothing, non_ASCII_space_characters, prohibited_characters, bidirectional_r_al, bidirectional_l, }, input, opts = {}) {
+ const mapping2space = non_ASCII_space_characters;
+ const mapping2nothing = commonly_mapped_to_nothing;
+ if (typeof input !== 'string') {
+ throw new TypeError('Expected string.');
+ }
+ if (input.length === 0) {
+ return '';
+ }
+ const mapped_input = toCodePoints(input)
+ .map((character) => (mapping2space.get(character) ? 0x20 : character))
+ .filter((character) => !mapping2nothing.get(character));
+ const normalized_input = String.fromCodePoint
+ .apply(null, mapped_input)
+ .normalize('NFKC');
+ const normalized_map = toCodePoints(normalized_input);
+ const hasProhibited = normalized_map.some((character) => prohibited_characters.get(character));
+ if (hasProhibited) {
+ throw new Error('Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3');
+ }
+ if (opts.allowUnassigned !== true) {
+ const hasUnassigned = normalized_map.some((character) => unassigned_code_points.get(character));
+ if (hasUnassigned) {
+ throw new Error('Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5');
+ }
+ }
+ const hasBidiRAL = normalized_map.some((character) => bidirectional_r_al.get(character));
+ const hasBidiL = normalized_map.some((character) => bidirectional_l.get(character));
+ if (hasBidiRAL && hasBidiL) {
+ throw new Error('String must not contain RandALCat and LCat at the same time,' +
+ ' see https://tools.ietf.org/html/rfc3454#section-6');
+ }
+ const isFirstBidiRAL = bidirectional_r_al.get(getCodePoint(first(normalized_input)));
+ const isLastBidiRAL = bidirectional_r_al.get(getCodePoint(last(normalized_input)));
+ if (hasBidiRAL && !(isFirstBidiRAL && isLastBidiRAL)) {
+ throw new Error('Bidirectional RandALCat character must be the first and the last' +
+ ' character of the string, see https://tools.ietf.org/html/rfc3454#section-6');
+ }
+ return normalized_input;
+}
+saslprep.saslprep = saslprep;
+saslprep.default = saslprep;
+module.exports = saslprep;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.js.map
new file mode 100644
index 000000000..5b2b276dc
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAGA,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACrE,MAAM,KAAK,GAAG,CAA2B,CAAI,EAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,MAAM,IAAI,GAAG,CAA2B,CAAI,EAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAO5E,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,UAAU,GAAG,EAAE,CAAC;IACtB,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC;IAE1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAA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Y,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAE,CACtC,CAAC;IAEF,IAAI,UAAU,IAAI,CAAC,CAAC,cAAc,IAAI,aAAa,CAAC,EAAE;QACpD,MAAM,IAAI,KAAK,CACb,kEAAkE;YAChE,6EAA6E,CAChF,CAAC;KACH;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC7B,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5B,iBAAS,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts
new file mode 100644
index 000000000..8c675a008
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts
@@ -0,0 +1,11 @@
+///
+import bitfield from 'sparse-bitfield';
+export declare function createMemoryCodePoints(data: Buffer): {
+ unassigned_code_points: bitfield.BitFieldInstance;
+ commonly_mapped_to_nothing: bitfield.BitFieldInstance;
+ non_ASCII_space_characters: bitfield.BitFieldInstance;
+ prohibited_characters: bitfield.BitFieldInstance;
+ bidirectional_r_al: bitfield.BitFieldInstance;
+ bidirectional_l: bitfield.BitFieldInstance;
+};
+//# sourceMappingURL=memory-code-points.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts.map
new file mode 100644
index 000000000..83b7b57da
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"memory-code-points.d.ts","sourceRoot":"","sources":["../src/memory-code-points.ts"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM;;;;;;;EA+BlD"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js
new file mode 100644
index 000000000..05133de9f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js
@@ -0,0 +1,33 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.createMemoryCodePoints = void 0;
+const sparse_bitfield_1 = __importDefault(require("sparse-bitfield"));
+function createMemoryCodePoints(data) {
+ let offset = 0;
+ function read() {
+ const size = data.readUInt32BE(offset);
+ offset += 4;
+ const codepoints = data.slice(offset, offset + size);
+ offset += size;
+ return (0, sparse_bitfield_1.default)({ buffer: codepoints });
+ }
+ const unassigned_code_points = read();
+ const commonly_mapped_to_nothing = read();
+ const non_ASCII_space_characters = read();
+ const prohibited_characters = read();
+ const bidirectional_r_al = read();
+ const bidirectional_l = read();
+ return {
+ unassigned_code_points,
+ commonly_mapped_to_nothing,
+ non_ASCII_space_characters,
+ prohibited_characters,
+ bidirectional_r_al,
+ bidirectional_l,
+ };
+}
+exports.createMemoryCodePoints = createMemoryCodePoints;
+//# sourceMappingURL=memory-code-points.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js.map
new file mode 100644
index 000000000..0bb5a144a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"memory-code-points.js","sourceRoot":"","sources":["../src/memory-code-points.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuC;AAEvC,SAAgB,sBAAsB,CAAC,IAAY;IACjD,IAAI,MAAM,GAAG,CAAC,CAAC;IAKf,SAAS,IAAI;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,CAAC;QAEZ,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;QACrD,MAAM,IAAI,IAAI,CAAC;QAEf,OAAO,IAAA,yBAAQ,EAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,sBAAsB,GAAG,IAAI,EAAE,CAAC;IACtC,MAAM,0BAA0B,GAAG,IAAI,EAAE,CAAC;IAC1C,MAAM,0BAA0B,GAAG,IAAI,EAAE,CAAC;IAC1C,MAAM,qBAAqB,GAAG,IAAI,EAAE,CAAC;IACrC,MAAM,kBAAkB,GAAG,IAAI,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAI,EAAE,CAAC;IAE/B,OAAO;QACL,sBAAsB;QACtB,0BAA0B;QAC1B,0BAA0B;QAC1B,qBAAqB;QACrB,kBAAkB;QAClB,eAAe;KAChB,CAAC;AACJ,CAAC;AA/BD,wDA+BC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.d.ts
new file mode 100644
index 000000000..0208c8ed2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.d.ts
@@ -0,0 +1,10 @@
+declare function saslprep(input: string, opts?: {
+ allowUnassigned?: boolean;
+}): string;
+declare namespace saslprep {
+ export var saslprep: typeof import("./node");
+ var _a: typeof import("./node");
+ export { _a as default };
+}
+export = saslprep;
+//# sourceMappingURL=node.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.d.ts.map
new file mode 100644
index 000000000..3032ff996
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAMA,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAE7E;kBAFQ,QAAQ;;;;;AAOjB,SAAS,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.js
new file mode 100644
index 000000000..1007f86bd
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.js
@@ -0,0 +1,15 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+const index_1 = __importDefault(require("./index"));
+const memory_code_points_1 = require("./memory-code-points");
+const code_points_data_1 = __importDefault(require("./code-points-data"));
+const codePoints = (0, memory_code_points_1.createMemoryCodePoints)(code_points_data_1.default);
+function saslprep(input, opts) {
+ return (0, index_1.default)(codePoints, input, opts);
+}
+saslprep.saslprep = saslprep;
+saslprep.default = saslprep;
+module.exports = saslprep;
+//# sourceMappingURL=node.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.js.map
new file mode 100644
index 000000000..107ee6485
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/node.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":";;;;AAAA,oDAAgC;AAChC,6DAA8D;AAC9D,0EAAsC;AAEtC,MAAM,UAAU,GAAG,IAAA,2CAAsB,EAAC,0BAAI,CAAC,CAAC;AAEhD,SAAS,QAAQ,CAAC,KAAa,EAAE,IAAoC;IACnE,OAAO,IAAA,eAAS,EAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC7B,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;AAE5B,iBAAS,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.d.ts b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.d.ts
new file mode 100644
index 000000000..3a0466ecd
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.d.ts
@@ -0,0 +1,2 @@
+export declare function range(from: number, to: number): number[];
+//# sourceMappingURL=util.d.ts.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.d.ts.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.d.ts.map
new file mode 100644
index 000000000..50c716780
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAGA,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAQxD"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.js b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.js
new file mode 100644
index 000000000..f679cab00
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.js
@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.range = void 0;
+function range(from, to) {
+ const list = new Array(to - from + 1);
+ for (let i = 0; i < list.length; i += 1) {
+ list[i] = from + i;
+ }
+ return list;
+}
+exports.range = range;
+//# sourceMappingURL=util.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.js.map b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.js.map
new file mode 100644
index 000000000..1bab68133
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/dist/util.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,KAAK,CAAC,IAAY,EAAE,EAAU;IAE5C,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACvC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;KACpB;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AARD,sBAQC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/package.json b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/package.json
new file mode 100644
index 000000000..4d72c07d6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "@mongodb-js/saslprep",
+ "description": "SASLprep: Stringprep Profile for User Names and Passwords, rfc4013",
+ "keywords": [
+ "sasl",
+ "saslprep",
+ "stringprep",
+ "rfc4013",
+ "4013"
+ ],
+ "author": "Dmitry Tsvettsikh ",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "dist/node.js",
+ "bugs": {
+ "url": "https://jira.mongodb.org/projects/COMPASS/issues",
+ "email": "compass@mongodb.com"
+ },
+ "homepage": "https://github.com/mongodb-js/devtools-shared/tree/main/packages/saslprep",
+ "version": "1.1.7",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mongodb-js/devtools-shared.git"
+ },
+ "files": [
+ "dist"
+ ],
+ "license": "MIT",
+ "exports": {
+ "browser": {
+ "types": "./dist/browser.d.ts",
+ "default": "./dist/browser.js"
+ },
+ "import": {
+ "types": "./dist/node.d.ts",
+ "default": "./dist/.esm-wrapper.mjs"
+ },
+ "require": {
+ "types": "./dist/node.d.ts",
+ "default": "./dist/node.js"
+ }
+ },
+ "types": "./dist/node.d.ts",
+ "scripts": {
+ "gen-code-points": "ts-node src/generate-code-points.ts src/code-points-data.ts src/code-points-data-browser.ts",
+ "bootstrap": "npm run compile",
+ "prepublishOnly": "npm run compile",
+ "compile": "npm run gen-code-points && tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
+ "typecheck": "tsc --noEmit",
+ "eslint": "eslint",
+ "prettier": "prettier",
+ "lint": "npm run eslint . && npm run prettier -- --check .",
+ "depcheck": "depcheck",
+ "check": "npm run typecheck && npm run lint && npm run depcheck",
+ "check-ci": "npm run check",
+ "test": "mocha",
+ "test-cov": "nyc -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
+ "test-watch": "npm run test -- --watch",
+ "test-ci": "npm run test-cov",
+ "reformat": "npm run prettier -- --write ."
+ },
+ "dependencies": {
+ "sparse-bitfield": "^3.0.3"
+ },
+ "devDependencies": {
+ "@mongodb-js/eslint-config-devtools": "0.9.10",
+ "@mongodb-js/mocha-config-devtools": "^1.0.3",
+ "@mongodb-js/prettier-config-devtools": "^1.0.1",
+ "@mongodb-js/tsconfig-devtools": "^1.0.2",
+ "@types/chai": "^4.2.21",
+ "@types/mocha": "^9.0.0",
+ "@types/node": "^17.0.35",
+ "@types/sinon-chai": "^3.2.5",
+ "@types/sparse-bitfield": "^3.0.1",
+ "chai": "^4.3.6",
+ "depcheck": "^1.4.1",
+ "eslint": "^7.25.0",
+ "gen-esm-wrapper": "^1.1.0",
+ "mocha": "^8.4.0",
+ "nyc": "^15.1.0",
+ "prettier": "^2.3.2",
+ "sinon": "^9.2.3",
+ "typescript": "^5.0.4"
+ },
+ "gitHead": "ff425df9ea4651f7c4c24acc30cbf06d06007d4a"
+}
diff --git a/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/readme.md b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/readme.md
new file mode 100644
index 000000000..28539edaa
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@mongodb-js/saslprep/readme.md
@@ -0,0 +1,29 @@
+# saslprep
+
+_Note: This is a fork of the original [`saslprep`](https://www.npmjs.com/package/saslprep) npm package
+and provides equivalent functionality._
+
+Stringprep Profile for User Names and Passwords, [rfc4013](https://tools.ietf.org/html/rfc4013)
+
+### Usage
+
+```js
+const saslprep = require('@mongodb-js/saslprep');
+
+saslprep('password\u00AD'); // password
+saslprep('password\u0007'); // Error: prohibited character
+```
+
+### API
+
+##### `saslprep(input: String, opts: Options): String`
+
+Normalize user name or password.
+
+##### `Options.allowUnassigned: bool`
+
+A special behavior for unassigned code points, see https://tools.ietf.org/html/rfc4013#section-2.5. Disabled by default.
+
+## License
+
+MIT, 2017-2019 (c) Dmitriy Tsvettsikh
diff --git a/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/LICENSE b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/LICENSE
new file mode 100644
index 000000000..9e841e7a2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/README.md b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/README.md
new file mode 100644
index 000000000..a0f3f9def
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/webidl-conversions`
+
+# Summary
+This package contains type definitions for webidl-conversions (https://github.com/jsdom/webidl-conversions#readme).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions.
+
+### Additional Details
+ * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender).
diff --git a/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/index.d.ts b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/index.d.ts
new file mode 100644
index 000000000..bcf395ab2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/index.d.ts
@@ -0,0 +1,91 @@
+declare namespace WebIDLConversions {
+ interface Globals {
+ [key: string]: unknown;
+
+ Number: (value?: unknown) => number;
+ String: (value?: unknown) => string;
+ TypeError: new(message?: string) => TypeError;
+ }
+
+ interface Options {
+ context?: string | undefined;
+ globals?: Globals | undefined;
+ }
+
+ interface IntegerOptions extends Options {
+ enforceRange?: boolean | undefined;
+ clamp?: boolean | undefined;
+ }
+
+ interface StringOptions extends Options {
+ treatNullAsEmptyString?: boolean | undefined;
+ }
+
+ interface BufferSourceOptions extends Options {
+ allowShared?: boolean | undefined;
+ }
+
+ type IntegerConversion = (V: unknown, opts?: IntegerOptions) => number;
+ type StringConversion = (V: unknown, opts?: StringOptions) => string;
+ type NumberConversion = (V: unknown, opts?: Options) => number;
+}
+
+declare const WebIDLConversions: {
+ any(V: V, opts?: WebIDLConversions.Options): V;
+ undefined(V?: unknown, opts?: WebIDLConversions.Options): void;
+ boolean(V: unknown, opts?: WebIDLConversions.Options): boolean;
+
+ byte(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+ octet(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+
+ short(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+ ["unsigned short"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+
+ long(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+ ["unsigned long"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+
+ ["long long"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+ ["unsigned long long"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
+
+ double(V: unknown, opts?: WebIDLConversions.Options): number;
+ ["unrestricted double"](V: unknown, opts?: WebIDLConversions.Options): number;
+
+ float(V: unknown, opts?: WebIDLConversions.Options): number;
+ ["unrestricted float"](V: unknown, opts?: WebIDLConversions.Options): number;
+
+ DOMString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
+ ByteString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
+ USVString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
+
+ object(V: V, opts?: WebIDLConversions.Options): V extends object ? V : V & object;
+ ArrayBuffer(
+ V: unknown,
+ opts?: WebIDLConversions.BufferSourceOptions & { allowShared?: false | undefined },
+ ): ArrayBuffer;
+ ArrayBuffer(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): ArrayBufferLike;
+ DataView(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): DataView;
+
+ Int8Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int8Array;
+ Int16Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int16Array;
+ Int32Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int32Array;
+
+ Uint8Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint8Array;
+ Uint16Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint16Array;
+ Uint32Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint32Array;
+ Uint8ClampedArray(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint8ClampedArray;
+
+ Float32Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Float32Array;
+ Float64Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Float64Array;
+
+ ArrayBufferView(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): ArrayBufferView;
+ BufferSource(
+ V: unknown,
+ opts?: WebIDLConversions.BufferSourceOptions & { allowShared?: false | undefined },
+ ): ArrayBuffer | ArrayBufferView;
+ BufferSource(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): ArrayBufferLike | ArrayBufferView;
+
+ DOMTimeStamp(V: unknown, opts?: WebIDLConversions.Options): number;
+};
+
+// This can't use ES6 style exports, as those can't have spaces in export names.
+export = WebIDLConversions;
diff --git a/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/package.json b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/package.json
new file mode 100644
index 000000000..21fdb9586
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/webidl-conversions/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "@types/webidl-conversions",
+ "version": "7.0.3",
+ "description": "TypeScript definitions for webidl-conversions",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "ExE Boss",
+ "githubUsername": "ExE-Boss",
+ "url": "https://github.com/ExE-Boss"
+ },
+ {
+ "name": "BendingBender",
+ "githubUsername": "BendingBender",
+ "url": "https://github.com/BendingBender"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/webidl-conversions"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "ff1514e10869784e8b7cca9c4099a4213d3f14b48c198b1bf116300df94bf608",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/LICENSE b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/LICENSE
new file mode 100644
index 000000000..9e841e7a2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/README.md b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/README.md
new file mode 100644
index 000000000..75b056cf0
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/whatwg-url`
+
+# Summary
+This package contains type definitions for whatwg-url (https://github.com/jsdom/whatwg-url#readme).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url.
+
+### Additional Details
+ * Last updated: Sat, 18 May 2024 21:06:54 GMT
+ * Dependencies: [@types/webidl-conversions](https://npmjs.com/package/@types/webidl-conversions)
+
+# Credits
+These definitions were written by [Alexander Marks](https://github.com/aomarks), [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender).
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/index.d.ts b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/index.d.ts
new file mode 100644
index 000000000..7c554cca9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/index.d.ts
@@ -0,0 +1,169 @@
+///
+/** https://url.spec.whatwg.org/#url-representation */
+export interface URLRecord {
+ scheme: string;
+ username: string;
+ password: string;
+ host: string | number | IPv6Address | null;
+ port: number | null;
+ path: string | string[];
+ query: string | null;
+ fragment: string | null;
+}
+
+/** https://url.spec.whatwg.org/#concept-ipv6 */
+export type IPv6Address = [number, number, number, number, number, number, number, number];
+
+/** https://url.spec.whatwg.org/#url-class */
+export class URL {
+ constructor(url: string, base?: string | URL);
+
+ get href(): string;
+ set href(V: string);
+
+ get origin(): string;
+
+ get protocol(): string;
+ set protocol(V: string);
+
+ get username(): string;
+ set username(V: string);
+
+ get password(): string;
+ set password(V: string);
+
+ get host(): string;
+ set host(V: string);
+
+ get hostname(): string;
+ set hostname(V: string);
+
+ get port(): string;
+ set port(V: string);
+
+ get pathname(): string;
+ set pathname(V: string);
+
+ get search(): string;
+ set search(V: string);
+
+ get searchParams(): URLSearchParams;
+
+ get hash(): string;
+ set hash(V: string);
+
+ toJSON(): string;
+
+ readonly [Symbol.toStringTag]: "URL";
+}
+
+/** https://url.spec.whatwg.org/#interface-urlsearchparams */
+export class URLSearchParams {
+ constructor(
+ init?:
+ | ReadonlyArray
+ | Iterable
+ | { readonly [name: string]: string }
+ | string,
+ );
+
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ getAll(name: string): string[];
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ sort(): void;
+
+ keys(): IterableIterator;
+ values(): IterableIterator;
+ entries(): IterableIterator<[name: string, value: string]>;
+ forEach(
+ callback: (this: THIS_ARG, value: string, name: string, searchParams: this) => void,
+ thisArg?: THIS_ARG,
+ ): void;
+
+ readonly [Symbol.toStringTag]: "URLSearchParams";
+ [Symbol.iterator](): IterableIterator<[name: string, value: string]>;
+}
+
+/** https://url.spec.whatwg.org/#concept-url-parser */
+export function parseURL(input: string, options?: { readonly baseURL?: URLRecord | undefined }): URLRecord | null;
+
+/** https://url.spec.whatwg.org/#concept-basic-url-parser */
+export function basicURLParse(
+ input: string,
+ options?: {
+ baseURL?: URLRecord | undefined;
+ url?: URLRecord | undefined;
+ stateOverride?: StateOverride | undefined;
+ },
+): URLRecord | null;
+
+/** https://url.spec.whatwg.org/#scheme-start-state */
+export type StateOverride =
+ | "scheme start"
+ | "scheme"
+ | "no scheme"
+ | "special relative or authority"
+ | "path or authority"
+ | "relative"
+ | "relative slash"
+ | "special authority slashes"
+ | "special authority ignore slashes"
+ | "authority"
+ | "host"
+ | "hostname"
+ | "port"
+ | "file"
+ | "file slash"
+ | "file host"
+ | "path start"
+ | "path"
+ | "opaque path"
+ | "query"
+ | "fragment";
+
+/** https://url.spec.whatwg.org/#concept-url-serializer */
+export function serializeURL(urlRecord: URLRecord, excludeFragment?: boolean): string;
+
+/** https://url.spec.whatwg.org/#concept-host-serializer */
+export function serializeHost(host: string | number | IPv6Address): string;
+
+/** https://url.spec.whatwg.org/#url-path-serializer */
+export function serializePath(urlRecord: URLRecord): string;
+
+/** https://url.spec.whatwg.org/#serialize-an-integer */
+export function serializeInteger(number: number): string;
+
+/** https://html.spec.whatwg.org#ascii-serialisation-of-an-origin */
+export function serializeURLOrigin(urlRecord: URLRecord): string;
+
+/** https://url.spec.whatwg.org/#set-the-username */
+export function setTheUsername(urlRecord: URLRecord, username: string): void;
+
+/** https://url.spec.whatwg.org/#set-the-password */
+export function setThePassword(urlRecord: URLRecord, password: string): void;
+
+/** https://url.spec.whatwg.org/#url-opaque-path */
+export function hasAnOpaquePath(urlRecord: URLRecord): boolean;
+
+/** https://url.spec.whatwg.org/#cannot-have-a-username-password-port */
+export function cannotHaveAUsernamePasswordPort(urlRecord: URLRecord): boolean;
+
+/** https://url.spec.whatwg.org/#percent-decode */
+export function percentDecodeBytes(buffer: TypedArray): Uint8Array;
+
+/** https://url.spec.whatwg.org/#string-percent-decode */
+export function percentDecodeString(string: string): Uint8Array;
+
+export type TypedArray =
+ | Uint8Array
+ | Uint8ClampedArray
+ | Uint16Array
+ | Uint32Array
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | Float32Array
+ | Float64Array;
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URL-impl.d.ts b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URL-impl.d.ts
new file mode 100644
index 000000000..c0bb59843
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URL-impl.d.ts
@@ -0,0 +1,22 @@
+import { Globals } from "webidl-conversions";
+import { implementation as URLSearchParamsImpl } from "./URLSearchParams-impl";
+
+declare class URLImpl {
+ constructor(globalObject: Globals, constructorArgs: readonly [url: string, base?: string]);
+
+ href: string;
+ readonly origin: string;
+ protocol: string;
+ username: string;
+ password: string;
+ host: string;
+ hostname: string;
+ port: string;
+ pathname: string;
+ search: string;
+ readonly searchParams: URLSearchParamsImpl;
+ hash: string;
+
+ toJSON(): string;
+}
+export { URLImpl as implementation };
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URL.d.ts b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URL.d.ts
new file mode 100644
index 000000000..85474a702
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URL.d.ts
@@ -0,0 +1,66 @@
+import { URL } from "../index";
+import { implementation as URLImpl } from "./URL-impl";
+
+/**
+ * Checks whether `obj` is a `URL` object with an implementation
+ * provided by this package.
+ */
+export function is(obj: unknown): obj is URL;
+
+/**
+ * Checks whether `obj` is a `URLImpl` WebIDL2JS implementation object
+ * provided by this package.
+ */
+export function isImpl(obj: unknown): obj is URLImpl;
+
+/**
+ * Converts the `URL` wrapper into a `URLImpl` object.
+ *
+ * @throws {TypeError} If `obj` is not a `URL` wrapper instance provided by this package.
+ */
+export function convert(globalObject: object, obj: unknown, { context }?: { context: string }): URLImpl;
+
+/**
+ * Creates a new `URL` instance.
+ *
+ * @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
+ * registry or a `URL` constructor provided by this package
+ * in the WebIDL2JS constructor registry.
+ */
+export function create(globalObject: object, constructorArgs: readonly [url: string, base?: string]): URL;
+
+/**
+ * Calls `create()` and returns the internal `URLImpl`.
+ *
+ * @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
+ * registry or a `URL` constructor provided by this package
+ * in the WebIDL2JS constructor registry.
+ */
+export function createImpl(globalObject: object, constructorArgs: readonly [url: string, base?: string]): URLImpl;
+
+/**
+ * Initializes the `URL` instance, called by `create()`.
+ *
+ * Useful when manually sub-classing a non-constructable wrapper object.
+ */
+export function setup(
+ obj: T,
+ globalObject: object,
+ constructorArgs: readonly [url: string, base?: string],
+): T;
+
+/**
+ * Creates a new `URL` object without runing the constructor steps.
+ *
+ * Useful when implementing specifications that initialize objects
+ * in different ways than their constructors do.
+ */
+declare function _new(globalObject: object, newTarget?: new(url: string, base?: string) => URL): URLImpl;
+export { _new as new };
+
+/**
+ * Installs the `URL` constructor onto the `globalObject`.
+ *
+ * @throws {Error} If the target `globalObject` doesn't have an `Error` constructor.
+ */
+export function install(globalObject: object, globalNames: readonly string[]): void;
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URLSearchParams-impl.d.ts b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URLSearchParams-impl.d.ts
new file mode 100644
index 000000000..cf5070117
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URLSearchParams-impl.d.ts
@@ -0,0 +1,20 @@
+declare class URLSearchParamsImpl {
+ constructor(
+ globalObject: object,
+ constructorArgs: readonly [
+ init?: ReadonlyArray | { readonly [name: string]: string } | string,
+ ],
+ privateData: { readonly doNotStripQMark?: boolean | undefined },
+ );
+
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ getAll(name: string): string[];
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ sort(): void;
+
+ [Symbol.iterator](): IterableIterator<[name: string, value: string]>;
+}
+export { URLSearchParamsImpl as implementation };
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URLSearchParams.d.ts b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URLSearchParams.d.ts
new file mode 100644
index 000000000..8b35d1d1e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/lib/URLSearchParams.d.ts
@@ -0,0 +1,92 @@
+import { URLSearchParams } from "../index";
+import { implementation as URLSearchParamsImpl } from "./URLSearchParams-impl";
+
+/**
+ * Checks whether `obj` is a `URLSearchParams` object with an implementation
+ * provided by this package.
+ */
+export function is(obj: unknown): obj is URLSearchParams;
+
+/**
+ * Checks whether `obj` is a `URLSearchParamsImpl` WebIDL2JS implementation object
+ * provided by this package.
+ */
+export function isImpl(obj: unknown): obj is URLSearchParamsImpl;
+
+/**
+ * Converts the `URLSearchParams` wrapper into a `URLSearchParamsImpl` object.
+ *
+ * @throws {TypeError} If `obj` is not a `URLSearchParams` wrapper instance provided by this package.
+ */
+export function convert(globalObject: object, obj: unknown, { context }?: { context: string }): URLSearchParamsImpl;
+
+export function createDefaultIterator(
+ globalObject: object,
+ target: URLSearchParamsImpl,
+ kind: TIteratorKind,
+): IterableIterator;
+
+/**
+ * Creates a new `URLSearchParams` instance.
+ *
+ * @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
+ * registry or a `URLSearchParams` constructor provided by this package
+ * in the WebIDL2JS constructor registry.
+ */
+export function create(
+ globalObject: object,
+ constructorArgs?: readonly [
+ init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
+ ],
+ privateData?: { doNotStripQMark?: boolean | undefined },
+): URLSearchParams;
+
+/**
+ * Calls `create()` and returns the internal `URLSearchParamsImpl`.
+ *
+ * @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
+ * registry or a `URLSearchParams` constructor provided by this package
+ * in the WebIDL2JS constructor registry.
+ */
+export function createImpl(
+ globalObject: object,
+ constructorArgs?: readonly [
+ init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
+ ],
+ privateData?: { doNotStripQMark?: boolean | undefined },
+): URLSearchParamsImpl;
+
+/**
+ * Initializes the `URLSearchParams` instance, called by `create()`.
+ *
+ * Useful when manually sub-classing a non-constructable wrapper object.
+ */
+export function setup(
+ obj: T,
+ globalObject: object,
+ constructorArgs?: readonly [
+ init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
+ ],
+ privateData?: { doNotStripQMark?: boolean | undefined },
+): T;
+
+/**
+ * Creates a new `URLSearchParams` object without runing the constructor steps.
+ *
+ * Useful when implementing specifications that initialize objects
+ * in different ways than their constructors do.
+ */
+declare function _new(
+ globalObject: object,
+ newTarget?: new(
+ init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
+ ) => URLSearchParams,
+): URLSearchParamsImpl;
+export { _new as new };
+
+/**
+ * Installs the `URLSearchParams` constructor onto the `globalObject`.
+ *
+ * @throws {Error} If the target `globalObject` doesn't have an `Error` constructor.
+ */
+export function install(globalObject: object, globalNames: readonly string[]): void;
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/package.json b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/package.json
new file mode 100644
index 000000000..418e8b676
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "@types/whatwg-url",
+ "version": "11.0.5",
+ "description": "TypeScript definitions for whatwg-url",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Alexander Marks",
+ "githubUsername": "aomarks",
+ "url": "https://github.com/aomarks"
+ },
+ {
+ "name": "ExE Boss",
+ "githubUsername": "ExE-Boss",
+ "url": "https://github.com/ExE-Boss"
+ },
+ {
+ "name": "BendingBender",
+ "githubUsername": "BendingBender",
+ "url": "https://github.com/BendingBender"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/whatwg-url"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/webidl-conversions": "*"
+ },
+ "typesPublisherContentHash": "c6cfac1bbd7b2ef315fdad11fc9bdb6a8f0ae2b1c3ff057cfca7bc9880eeaa9d",
+ "typeScriptVersion": "4.7"
+}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/@types/whatwg-url/webidl2js-wrapper.d.ts b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/webidl2js-wrapper.d.ts
new file mode 100644
index 000000000..96029b766
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/@types/whatwg-url/webidl2js-wrapper.d.ts
@@ -0,0 +1,4 @@
+import * as URL from "./lib/URL";
+import * as URLSearchParams from "./lib/URLSearchParams";
+
+export { URL, URLSearchParams };
diff --git a/week-3/04-course-app-hard/node_modules/bson/LICENSE.md b/week-3/04-course-app-hard/node_modules/bson/LICENSE.md
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/LICENSE.md
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/week-3/04-course-app-hard/node_modules/bson/README.md b/week-3/04-course-app-hard/node_modules/bson/README.md
new file mode 100644
index 000000000..c658e0924
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/README.md
@@ -0,0 +1,280 @@
+# BSON parser
+
+BSON is short for "Binary JSON," and is the binary-encoded serialization of JSON-like documents.
+You can learn more about it in [the specification](http://bsonspec.org).
+
+### Table of Contents
+
+- [Usage](#usage)
+- [Bugs/Feature Requests](#bugs--feature-requests)
+- [Installation](#installation)
+- [Documentation](#documentation)
+- [FAQ](#faq)
+
+
+### Release Integrity
+
+Releases are created automatically and signed using the [Node team's GPG key](https://pgp.mongodb.com/node-driver.asc). This applies to the git tag as well as all release packages provided as part of a GitHub release. To verify the provided packages, download the key and import it using gpg:
+
+```shell
+gpg --import node-driver.asc
+```
+
+The GitHub release contains a detached signature file for the NPM package (named
+`bson-X.Y.Z.tgz.sig`).
+
+The following command returns the link npm package.
+```shell
+npm view bson@vX.Y.Z dist.tarball
+```
+
+Using the result of the above command, a `curl` command can return the official npm package for the release.
+
+To verify the integrity of the downloaded package, run the following command:
+```shell
+gpg --verify bson-X.Y.Z.tgz.sig bson-X.Y.Z.tgz
+```
+
+>[!Note]
+No verification is done when using npm to install the package. The contents of the Github tarball and npm's tarball are identical.
+
+## Bugs / Feature Requests
+
+Think you've found a bug? Want to see a new feature in `bson`? Please open a case in our issue management tool, JIRA:
+
+1. Create an account and login: [jira.mongodb.org](https://jira.mongodb.org)
+2. Navigate to the NODE project: [jira.mongodb.org/browse/NODE](https://jira.mongodb.org/browse/NODE)
+3. Click **Create Issue** - Please provide as much information as possible about the issue and how to reproduce it.
+
+Bug reports in JIRA for the NODE driver project are **public**.
+
+## Usage
+
+To build a new version perform the following operations:
+
+```
+npm install
+npm run build
+```
+
+### Node.js or Bundling Usage
+
+When using a bundler or Node.js you can import bson using the package name:
+
+```js
+import { BSON, EJSON, ObjectId } from 'bson';
+// or:
+// const { BSON, EJSON, ObjectId } = require('bson');
+
+const bytes = BSON.serialize({ _id: new ObjectId() });
+console.log(bytes);
+const doc = BSON.deserialize(bytes);
+console.log(EJSON.stringify(doc));
+// {"_id":{"$oid":"..."}}
+```
+
+### Browser Usage
+
+If you are working directly in the browser without a bundler please use the `.mjs` bundle like so:
+
+```html
+
+```
+
+## Installation
+
+```sh
+npm install bson
+```
+
+### MongoDB Node.js Driver Version Compatibility
+
+Only the following version combinations with the [MongoDB Node.js Driver](https://github.com/mongodb/node-mongodb-native) are considered stable.
+
+| | `bson@1.x` | `bson@4.x` | `bson@5.x` | `bson@6.x` |
+| ------------- | ---------- | ---------- | ---------- | ---------- |
+| `mongodb@6.x` | N/A | N/A | N/A | ✓ |
+| `mongodb@5.x` | N/A | N/A | ✓ | N/A |
+| `mongodb@4.x` | N/A | ✓ | N/A | N/A |
+| `mongodb@3.x` | ✓ | N/A | N/A | N/A |
+
+## Documentation
+
+### BSON
+
+[API documentation](https://mongodb.github.io/node-mongodb-native/Next/modules/BSON.html)
+
+
+
+### EJSON
+
+- [EJSON](#EJSON)
+
+ - [.parse(text, [options])](#EJSON.parse)
+
+ - [.stringify(value, [replacer], [space], [options])](#EJSON.stringify)
+
+ - [.serialize(bson, [options])](#EJSON.serialize)
+
+ - [.deserialize(ejson, [options])](#EJSON.deserialize)
+
+
+
+#### _EJSON_.parse(text, [options])
+
+| Param | Type | Default | Description |
+| ----------------- | -------------------- | ----------------- | ---------------------------------------------------------------------------------- |
+| text | string
| | |
+| [options] | object
| | Optional settings |
+| [options.relaxed] | boolean
| true
| Attempt to return native JS types where possible, rather than BSON types (if true) |
+
+Parse an Extended JSON string, constructing the JavaScript value or object described by that
+string.
+
+**Example**
+
+```js
+const { EJSON } = require('bson');
+const text = '{ "int32": { "$numberInt": "10" } }';
+
+// prints { int32: { [String: '10'] _bsontype: 'Int32', value: '10' } }
+console.log(EJSON.parse(text, { relaxed: false }));
+
+// prints { int32: 10 }
+console.log(EJSON.parse(text));
+```
+
+
+
+#### _EJSON_.stringify(value, [replacer], [space], [options])
+
+| Param | Type | Default | Description |
+| ----------------- | ------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| value | object
| | The value to convert to extended JSON |
+| [replacer] | function
\| array
| | A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string |
+| [space] | string
\| number
| | A String or Number object that's used to insert white space into the output JSON string for readability purposes. |
+| [options] | object
| | Optional settings |
+| [options.relaxed] | boolean
| true
| Enabled Extended JSON's `relaxed` mode |
+| [options.legacy] | boolean
| true
| Output in Extended JSON v1 |
+
+Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer
+function is specified or optionally including only the specified properties if a replacer array
+is specified.
+
+**Example**
+
+```js
+const { EJSON } = require('bson');
+const Int32 = require('mongodb').Int32;
+const doc = { int32: new Int32(10) };
+
+// prints '{"int32":{"$numberInt":"10"}}'
+console.log(EJSON.stringify(doc, { relaxed: false }));
+
+// prints '{"int32":10}'
+console.log(EJSON.stringify(doc));
+```
+
+
+
+#### _EJSON_.serialize(bson, [options])
+
+| Param | Type | Description |
+| --------- | ------------------- | ---------------------------------------------------- |
+| bson | object
| The object to serialize |
+| [options] | object
| Optional settings passed to the `stringify` function |
+
+Serializes an object to an Extended JSON string, and reparse it as a JavaScript object.
+
+
+
+#### _EJSON_.deserialize(ejson, [options])
+
+| Param | Type | Description |
+| --------- | ------------------- | -------------------------------------------- |
+| ejson | object
| The Extended JSON object to deserialize |
+| [options] | object
| Optional settings passed to the parse method |
+
+Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types
+
+## Error Handling
+
+It is our recommendation to use `BSONError.isBSONError()` checks on errors and to avoid relying on parsing `error.message` and `error.name` strings in your code. We guarantee `BSONError.isBSONError()` checks will pass according to semver guidelines, but errors may be sub-classed or their messages may change at any time, even patch releases, as we see fit to increase the helpfulness of the errors.
+
+Any new errors we add to the driver will directly extend an existing error class and no existing error will be moved to a different parent class outside of a major release.
+This means `BSONError.isBSONError()` will always be able to accurately capture the errors that our BSON library throws.
+
+Hypothetical example: A collection in our Db has an issue with UTF-8 data:
+
+```ts
+let documentCount = 0;
+const cursor = collection.find({}, { utf8Validation: true });
+try {
+ for await (const doc of cursor) documentCount += 1;
+} catch (error) {
+ if (BSONError.isBSONError(error)) {
+ console.log(`Found the troublemaker UTF-8!: ${documentCount} ${error.message}`);
+ return documentCount;
+ }
+ throw error;
+}
+```
+
+## React Native
+
+BSON vendors the required polyfills for `TextEncoder`, `TextDecoder`, `atob`, `btoa` imported from React Native and therefore doesn't expect users to polyfill these. One additional polyfill, `crypto.getRandomValues` is recommended and can be installed with the following command:
+
+```sh
+npm install --save react-native-get-random-values
+```
+
+The following snippet should be placed at the top of the entrypoint (by default this is the root `index.js` file) for React Native projects using the BSON library. These lines must be placed for any code that imports `BSON`.
+
+```typescript
+// Required Polyfills For ReactNative
+import 'react-native-get-random-values';
+```
+
+Finally, import the `BSON` library like so:
+
+```typescript
+import { BSON, EJSON } from 'bson';
+```
+
+This will cause React Native to import the `node_modules/bson/lib/bson.rn.cjs` bundle (see the `"react-native"` setting we have in the `"exports"` section of our [package.json](./package.json).)
+
+### Technical Note about React Native module import
+
+The `"exports"` definition in our `package.json` will result in BSON's CommonJS bundle being imported in a React Native project instead of the ES module bundle. Importing the CommonJS bundle is necessary because BSON's ES module bundle of BSON uses top-level await, which is not supported syntax in [React Native's runtime hermes](https://hermesengine.dev/).
+
+## FAQ
+
+#### Why does `undefined` get converted to `null`?
+
+The `undefined` BSON type has been [deprecated for many years](http://bsonspec.org/spec.html), so this library has dropped support for it. Use the `ignoreUndefined` option (for example, from the [driver](http://mongodb.github.io/node-mongodb-native/2.2/api/MongoClient.html#connect) ) to instead remove `undefined` keys.
+
+#### How do I add custom serialization logic?
+
+This library looks for `toBSON()` functions on every path, and calls the `toBSON()` function to get the value to serialize.
+
+```javascript
+const BSON = require('bson');
+
+class CustomSerialize {
+ toBSON() {
+ return 42;
+ }
+}
+
+const obj = { answer: new CustomSerialize() };
+// "{ answer: 42 }"
+console.log(BSON.deserialize(BSON.serialize(obj)));
+```
diff --git a/week-3/04-course-app-hard/node_modules/bson/bson.d.ts b/week-3/04-course-app-hard/node_modules/bson/bson.d.ts
new file mode 100644
index 000000000..69af3db0d
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/bson.d.ts
@@ -0,0 +1,1606 @@
+/**
+ * A class representation of the BSON Binary type.
+ * @public
+ * @category BSONType
+ */
+export declare class Binary extends BSONValue {
+ get _bsontype(): 'Binary';
+ /* Excluded from this release type: BSON_BINARY_SUBTYPE_DEFAULT */
+ /** Initial buffer default size */
+ static readonly BUFFER_SIZE = 256;
+ /** Default BSON type */
+ static readonly SUBTYPE_DEFAULT = 0;
+ /** Function BSON type */
+ static readonly SUBTYPE_FUNCTION = 1;
+ /** Byte Array BSON type */
+ static readonly SUBTYPE_BYTE_ARRAY = 2;
+ /** Deprecated UUID BSON type @deprecated Please use SUBTYPE_UUID */
+ static readonly SUBTYPE_UUID_OLD = 3;
+ /** UUID BSON type */
+ static readonly SUBTYPE_UUID = 4;
+ /** MD5 BSON type */
+ static readonly SUBTYPE_MD5 = 5;
+ /** Encrypted BSON type */
+ static readonly SUBTYPE_ENCRYPTED = 6;
+ /** Column BSON type */
+ static readonly SUBTYPE_COLUMN = 7;
+ /** Sensitive BSON type */
+ static readonly SUBTYPE_SENSITIVE = 8;
+ /** User BSON type */
+ static readonly SUBTYPE_USER_DEFINED = 128;
+ buffer: Uint8Array;
+ sub_type: number;
+ position: number;
+ /**
+ * Create a new Binary instance.
+ * @param buffer - a buffer object containing the binary data.
+ * @param subType - the option binary type.
+ */
+ constructor(buffer?: BinarySequence, subType?: number);
+ /**
+ * Updates this binary with byte_value.
+ *
+ * @param byteValue - a single byte we wish to write.
+ */
+ put(byteValue: string | number | Uint8Array | number[]): void;
+ /**
+ * Writes a buffer to the binary.
+ *
+ * @param sequence - a string or buffer to be written to the Binary BSON object.
+ * @param offset - specify the binary of where to write the content.
+ */
+ write(sequence: BinarySequence, offset: number): void;
+ /**
+ * Reads **length** bytes starting at **position**.
+ *
+ * @param position - read from the given position in the Binary.
+ * @param length - the number of bytes to read.
+ */
+ read(position: number, length: number): BinarySequence;
+ /** returns a view of the binary value as a Uint8Array */
+ value(): Uint8Array;
+ /** the length of the binary sequence */
+ length(): number;
+ toJSON(): string;
+ toString(encoding?: 'hex' | 'base64' | 'utf8' | 'utf-8'): string;
+ /* Excluded from this release type: toExtendedJSON */
+ toUUID(): UUID;
+ /** Creates an Binary instance from a hex digit string */
+ static createFromHexString(hex: string, subType?: number): Binary;
+ /** Creates an Binary instance from a base64 string */
+ static createFromBase64(base64: string, subType?: number): Binary;
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface BinaryExtended {
+ $binary: {
+ subType: string;
+ base64: string;
+ };
+}
+
+/** @public */
+export declare interface BinaryExtendedLegacy {
+ $type: string;
+ $binary: string;
+}
+
+/** @public */
+export declare type BinarySequence = Uint8Array | number[];
+
+declare namespace BSON {
+ export {
+ setInternalBufferSize,
+ serialize,
+ serializeWithBufferAndIndex,
+ deserialize,
+ calculateObjectSize,
+ deserializeStream,
+ UUIDExtended,
+ BinaryExtended,
+ BinaryExtendedLegacy,
+ BinarySequence,
+ CodeExtended,
+ DBRefLike,
+ Decimal128Extended,
+ DoubleExtended,
+ EJSONOptions,
+ Int32Extended,
+ LongExtended,
+ MaxKeyExtended,
+ MinKeyExtended,
+ ObjectIdExtended,
+ ObjectIdLike,
+ BSONRegExpExtended,
+ BSONRegExpExtendedLegacy,
+ BSONSymbolExtended,
+ LongWithoutOverrides,
+ TimestampExtended,
+ TimestampOverrides,
+ LongWithoutOverridesClass,
+ SerializeOptions,
+ DeserializeOptions,
+ Code,
+ BSONSymbol,
+ DBRef,
+ Binary,
+ ObjectId,
+ UUID,
+ Long,
+ Timestamp,
+ Double,
+ Int32,
+ MinKey,
+ MaxKey,
+ BSONRegExp,
+ Decimal128,
+ BSONValue,
+ BSONError,
+ BSONVersionError,
+ BSONRuntimeError,
+ BSONOffsetError,
+ BSONType,
+ EJSON,
+ onDemand,
+ OnDemand,
+ Document,
+ CalculateObjectSizeOptions
+ }
+}
+export { BSON }
+
+/**
+ * @public
+ * @experimental
+ */
+declare type BSONElement = [
+type: number,
+nameOffset: number,
+nameLength: number,
+offset: number,
+length: number
+];
+
+/**
+ * @public
+ * @category Error
+ *
+ * `BSONError` objects are thrown when BSON encounters an error.
+ *
+ * This is the parent class for all the other errors thrown by this library.
+ */
+export declare class BSONError extends Error {
+ /* Excluded from this release type: bsonError */
+ get name(): string;
+ constructor(message: string, options?: {
+ cause?: unknown;
+ });
+ /**
+ * @public
+ *
+ * All errors thrown from the BSON library inherit from `BSONError`.
+ * This method can assist with determining if an error originates from the BSON library
+ * even if it does not pass an `instanceof` check against this class' constructor.
+ *
+ * @param value - any javascript value that needs type checking
+ */
+ static isBSONError(value: unknown): value is BSONError;
+}
+
+/**
+ * @public
+ * @category Error
+ *
+ * @experimental
+ *
+ * An error generated when BSON bytes are invalid.
+ * Reports the offset the parser was able to reach before encountering the error.
+ */
+export declare class BSONOffsetError extends BSONError {
+ get name(): 'BSONOffsetError';
+ offset: number;
+ constructor(message: string, offset: number, options?: {
+ cause?: unknown;
+ });
+}
+
+/**
+ * A class representation of the BSON RegExp type.
+ * @public
+ * @category BSONType
+ */
+export declare class BSONRegExp extends BSONValue {
+ get _bsontype(): 'BSONRegExp';
+ pattern: string;
+ options: string;
+ /**
+ * @param pattern - The regular expression pattern to match
+ * @param options - The regular expression options
+ */
+ constructor(pattern: string, options?: string);
+ static parseOptions(options?: string): string;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface BSONRegExpExtended {
+ $regularExpression: {
+ pattern: string;
+ options: string;
+ };
+}
+
+/** @public */
+export declare interface BSONRegExpExtendedLegacy {
+ $regex: string | BSONRegExp;
+ $options: string;
+}
+
+/**
+ * @public
+ * @category Error
+ *
+ * An error generated when BSON functions encounter an unexpected input
+ * or reaches an unexpected/invalid internal state
+ *
+ */
+export declare class BSONRuntimeError extends BSONError {
+ get name(): 'BSONRuntimeError';
+ constructor(message: string);
+}
+
+/**
+ * A class representation of the BSON Symbol type.
+ * @public
+ * @category BSONType
+ */
+export declare class BSONSymbol extends BSONValue {
+ get _bsontype(): 'BSONSymbol';
+ value: string;
+ /**
+ * @param value - the string representing the symbol.
+ */
+ constructor(value: string);
+ /** Access the wrapped string value. */
+ valueOf(): string;
+ toString(): string;
+ toJSON(): string;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface BSONSymbolExtended {
+ $symbol: string;
+}
+
+/** @public */
+export declare const BSONType: Readonly<{
+ readonly double: 1;
+ readonly string: 2;
+ readonly object: 3;
+ readonly array: 4;
+ readonly binData: 5;
+ readonly undefined: 6;
+ readonly objectId: 7;
+ readonly bool: 8;
+ readonly date: 9;
+ readonly null: 10;
+ readonly regex: 11;
+ readonly dbPointer: 12;
+ readonly javascript: 13;
+ readonly symbol: 14;
+ readonly javascriptWithScope: 15;
+ readonly int: 16;
+ readonly timestamp: 17;
+ readonly long: 18;
+ readonly decimal: 19;
+ readonly minKey: -1;
+ readonly maxKey: 127;
+}>;
+
+/** @public */
+export declare type BSONType = (typeof BSONType)[keyof typeof BSONType];
+
+/** @public */
+export declare abstract class BSONValue {
+ /** @public */
+ abstract get _bsontype(): string;
+ /**
+ * @public
+ * Prints a human-readable string of BSON value information
+ * If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify
+ */
+ abstract inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+ /* Excluded from this release type: toExtendedJSON */
+}
+
+/**
+ * @public
+ * @category Error
+ */
+export declare class BSONVersionError extends BSONError {
+ get name(): 'BSONVersionError';
+ constructor();
+}
+
+/**
+ * @public
+ * @experimental
+ *
+ * A collection of functions that help work with data in a Uint8Array.
+ * ByteUtils is configured at load time to use Node.js or Web based APIs for the internal implementations.
+ */
+declare type ByteUtils = {
+ /** Transforms the input to an instance of Buffer if running on node, otherwise Uint8Array */
+ toLocalBufferType: (buffer: Uint8Array | ArrayBufferView | ArrayBuffer) => Uint8Array;
+ /** Create empty space of size */
+ allocate: (size: number) => Uint8Array;
+ /** Create empty space of size, use pooled memory when available */
+ allocateUnsafe: (size: number) => Uint8Array;
+ /** Check if two Uint8Arrays are deep equal */
+ equals: (a: Uint8Array, b: Uint8Array) => boolean;
+ /** Check if two Uint8Arrays are deep equal */
+ fromNumberArray: (array: number[]) => Uint8Array;
+ /** Create a Uint8Array from a base64 string */
+ fromBase64: (base64: string) => Uint8Array;
+ /** Create a base64 string from bytes */
+ toBase64: (buffer: Uint8Array) => string;
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ fromISO88591: (codePoints: string) => Uint8Array;
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ toISO88591: (buffer: Uint8Array) => string;
+ /** Create a Uint8Array from a hex string */
+ fromHex: (hex: string) => Uint8Array;
+ /** Create a lowercase hex string from bytes */
+ toHex: (buffer: Uint8Array) => string;
+ /** Create a string from utf8 code units, fatal=true will throw an error if UTF-8 bytes are invalid, fatal=false will insert replacement characters */
+ toUTF8: (buffer: Uint8Array, start: number, end: number, fatal: boolean) => string;
+ /** Get the utf8 code unit count from a string if it were to be transformed to utf8 */
+ utf8ByteLength: (input: string) => number;
+ /** Encode UTF8 bytes generated from `source` string into `destination` at byteOffset. Returns the number of bytes encoded. */
+ encodeUTF8Into: (destination: Uint8Array, source: string, byteOffset: number) => number;
+ /** Generate a Uint8Array filled with random bytes with byteLength */
+ randomBytes: (byteLength: number) => Uint8Array;
+};
+
+/* Excluded declaration from this release type: ByteUtils */
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param object - the Javascript object to calculate the BSON byte size for
+ * @returns size of BSON object in bytes
+ * @public
+ */
+export declare function calculateObjectSize(object: Document, options?: CalculateObjectSizeOptions): number;
+
+/** @public */
+export declare type CalculateObjectSizeOptions = Pick;
+
+/**
+ * A class representation of the BSON Code type.
+ * @public
+ * @category BSONType
+ */
+export declare class Code extends BSONValue {
+ get _bsontype(): 'Code';
+ code: string;
+ scope: Document | null;
+ /**
+ * @param code - a string or function.
+ * @param scope - an optional scope for the function.
+ */
+ constructor(code: string | Function, scope?: Document | null);
+ toJSON(): {
+ code: string;
+ scope?: Document;
+ };
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface CodeExtended {
+ $code: string;
+ $scope?: Document;
+}
+
+/**
+ * A class representation of the BSON DBRef type.
+ * @public
+ * @category BSONType
+ */
+export declare class DBRef extends BSONValue {
+ get _bsontype(): 'DBRef';
+ collection: string;
+ oid: ObjectId;
+ db?: string;
+ fields: Document;
+ /**
+ * @param collection - the collection name.
+ * @param oid - the reference ObjectId.
+ * @param db - optional db name, if omitted the reference is local to the current db.
+ */
+ constructor(collection: string, oid: ObjectId, db?: string, fields?: Document);
+ /* Excluded from this release type: namespace */
+ /* Excluded from this release type: namespace */
+ toJSON(): DBRefLike & Document;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface DBRefLike {
+ $ref: string;
+ $id: ObjectId;
+ $db?: string;
+}
+
+/**
+ * A class representation of the BSON Decimal128 type.
+ * @public
+ * @category BSONType
+ */
+export declare class Decimal128 extends BSONValue {
+ get _bsontype(): 'Decimal128';
+ readonly bytes: Uint8Array;
+ /**
+ * @param bytes - a buffer containing the raw Decimal128 bytes in little endian order,
+ * or a string representation as returned by .toString()
+ */
+ constructor(bytes: Uint8Array | string);
+ /**
+ * Create a Decimal128 instance from a string representation
+ *
+ * @param representation - a numeric string representation.
+ */
+ static fromString(representation: string): Decimal128;
+ /**
+ * Create a Decimal128 instance from a string representation, allowing for rounding to 34
+ * significant digits
+ *
+ * @example Example of a number that will be rounded
+ * ```ts
+ * > let d = Decimal128.fromString('37.499999999999999196428571428571375')
+ * Uncaught:
+ * BSONError: "37.499999999999999196428571428571375" is not a valid Decimal128 string - inexact rounding
+ * at invalidErr (/home/wajames/js-bson/lib/bson.cjs:1402:11)
+ * at Decimal128.fromStringInternal (/home/wajames/js-bson/lib/bson.cjs:1633:25)
+ * at Decimal128.fromString (/home/wajames/js-bson/lib/bson.cjs:1424:27)
+ *
+ * > d = Decimal128.fromStringWithRounding('37.499999999999999196428571428571375')
+ * new Decimal128("37.49999999999999919642857142857138")
+ * ```
+ * @param representation - a numeric string representation.
+ */
+ static fromStringWithRounding(representation: string): Decimal128;
+ private static _fromString;
+ /** Create a string representation of the raw Decimal128 value */
+ toString(): string;
+ toJSON(): Decimal128Extended;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface Decimal128Extended {
+ $numberDecimal: string;
+}
+
+/**
+ * Deserialize data as BSON.
+ *
+ * @param buffer - the buffer containing the serialized set of BSON documents.
+ * @returns returns the deserialized Javascript Object.
+ * @public
+ */
+export declare function deserialize(buffer: Uint8Array, options?: DeserializeOptions): Document;
+
+/** @public */
+export declare interface DeserializeOptions {
+ /**
+ * when deserializing a Long return as a BigInt.
+ * @defaultValue `false`
+ */
+ useBigInt64?: boolean;
+ /**
+ * when deserializing a Long will fit it into a Number if it's smaller than 53 bits.
+ * @defaultValue `true`
+ */
+ promoteLongs?: boolean;
+ /**
+ * when deserializing a Binary will return it as a node.js Buffer instance.
+ * @defaultValue `false`
+ */
+ promoteBuffers?: boolean;
+ /**
+ * when deserializing will promote BSON values to their Node.js closest equivalent types.
+ * @defaultValue `true`
+ */
+ promoteValues?: boolean;
+ /**
+ * allow to specify if there what fields we wish to return as unserialized raw buffer.
+ * @defaultValue `null`
+ */
+ fieldsAsRaw?: Document;
+ /**
+ * return BSON regular expressions as BSONRegExp instances.
+ * @defaultValue `false`
+ */
+ bsonRegExp?: boolean;
+ /**
+ * allows the buffer to be larger than the parsed BSON object.
+ * @defaultValue `false`
+ */
+ allowObjectSmallerThanBufferSize?: boolean;
+ /**
+ * Offset into buffer to begin reading document from
+ * @defaultValue `0`
+ */
+ index?: number;
+ raw?: boolean;
+ /** Allows for opt-out utf-8 validation for all keys or
+ * specified keys. Must be all true or all false.
+ *
+ * @example
+ * ```js
+ * // disables validation on all keys
+ * validation: { utf8: false }
+ *
+ * // enables validation only on specified keys a, b, and c
+ * validation: { utf8: { a: true, b: true, c: true } }
+ *
+ * // disables validation only on specified keys a, b
+ * validation: { utf8: { a: false, b: false } }
+ * ```
+ */
+ validation?: {
+ utf8: boolean | Record | Record;
+ };
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * @param data - the buffer containing the serialized set of BSON documents.
+ * @param startIndex - the start index in the data Buffer where the deserialization is to start.
+ * @param numberOfDocuments - number of documents to deserialize.
+ * @param documents - an array where to store the deserialized documents.
+ * @param docStartIndex - the index in the documents array from where to start inserting documents.
+ * @param options - additional options used for the deserialization.
+ * @returns next index in the buffer after deserialization **x** numbers of documents.
+ * @public
+ */
+export declare function deserializeStream(data: Uint8Array | ArrayBuffer, startIndex: number, numberOfDocuments: number, documents: Document[], docStartIndex: number, options: DeserializeOptions): number;
+
+/** @public */
+export declare interface Document {
+ [key: string]: any;
+}
+
+/**
+ * A class representation of the BSON Double type.
+ * @public
+ * @category BSONType
+ */
+export declare class Double extends BSONValue {
+ get _bsontype(): 'Double';
+ value: number;
+ /**
+ * Create a Double type
+ *
+ * @param value - the number we want to represent as a double.
+ */
+ constructor(value: number);
+ /**
+ * Attempt to create an double type from string.
+ *
+ * This method will throw a BSONError on any string input that is not representable as a IEEE-754 64-bit double.
+ * Notably, this method will also throw on the following string formats:
+ * - Strings in non-decimal and non-exponential formats (binary, hex, or octal digits)
+ * - Strings with characters other than numeric, floating point, or leading sign characters (Note: 'Infinity', '-Infinity', and 'NaN' input strings are still allowed)
+ * - Strings with leading and/or trailing whitespace
+ *
+ * Strings with leading zeros, however, are also allowed
+ *
+ * @param value - the string we want to represent as a double.
+ */
+ static fromString(value: string): Double;
+ /**
+ * Access the number value.
+ *
+ * @returns returns the wrapped double number.
+ */
+ valueOf(): number;
+ toJSON(): number;
+ toString(radix?: number): string;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface DoubleExtended {
+ $numberDouble: string;
+}
+
+/** @public */
+export declare const EJSON: {
+ parse: typeof parse;
+ stringify: typeof stringify;
+ serialize: typeof EJSONserialize;
+ deserialize: typeof EJSONdeserialize;
+};
+
+/**
+ * Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types
+ *
+ * @param ejson - The Extended JSON object to deserialize
+ * @param options - Optional settings passed to the parse method
+ */
+declare function EJSONdeserialize(ejson: Document, options?: EJSONOptions): any;
+
+/** @public */
+export declare type EJSONOptions = {
+ /**
+ * Output using the Extended JSON v1 spec
+ * @defaultValue `false`
+ */
+ legacy?: boolean;
+ /**
+ * Enable Extended JSON's `relaxed` mode, which attempts to return native JS types where possible, rather than BSON types
+ * @defaultValue `false` */
+ relaxed?: boolean;
+ /**
+ * Enable native bigint support
+ * @defaultValue `false`
+ */
+ useBigInt64?: boolean;
+};
+
+/**
+ * Serializes an object to an Extended JSON string, and reparse it as a JavaScript object.
+ *
+ * @param value - The object to serialize
+ * @param options - Optional settings passed to the `stringify` function
+ */
+declare function EJSONserialize(value: any, options?: EJSONOptions): Document;
+
+declare type InspectFn = (x: unknown, options?: unknown) => string;
+
+/**
+ * A class representation of a BSON Int32 type.
+ * @public
+ * @category BSONType
+ */
+export declare class Int32 extends BSONValue {
+ get _bsontype(): 'Int32';
+ value: number;
+ /**
+ * Create an Int32 type
+ *
+ * @param value - the number we want to represent as an int32.
+ */
+ constructor(value: number | string);
+ /**
+ * Attempt to create an Int32 type from string.
+ *
+ * This method will throw a BSONError on any string input that is not representable as an Int32.
+ * Notably, this method will also throw on the following string formats:
+ * - Strings in non-decimal formats (exponent notation, binary, hex, or octal digits)
+ * - Strings non-numeric and non-leading sign characters (ex: '2.0', '24,000')
+ * - Strings with leading and/or trailing whitespace
+ *
+ * Strings with leading zeros, however, are allowed.
+ *
+ * @param value - the string we want to represent as an int32.
+ */
+ static fromString(value: string): Int32;
+ /**
+ * Access the number value.
+ *
+ * @returns returns the wrapped int32 number.
+ */
+ valueOf(): number;
+ toString(radix?: number): string;
+ toJSON(): number;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface Int32Extended {
+ $numberInt: string;
+}
+
+/**
+ * A class representing a 64-bit integer
+ * @public
+ * @category BSONType
+ * @remarks
+ * The internal representation of a long is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16 bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ * Common constant values ZERO, ONE, NEG_ONE, etc. are found as static properties on this class.
+ */
+export declare class Long extends BSONValue {
+ get _bsontype(): 'Long';
+ /** An indicator used to reliably determine if an object is a Long or not. */
+ get __isLong__(): boolean;
+ /**
+ * The high 32 bits as a signed value.
+ */
+ high: number;
+ /**
+ * The low 32 bits as a signed value.
+ */
+ low: number;
+ /**
+ * Whether unsigned or not.
+ */
+ unsigned: boolean;
+ /**
+ * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.
+ *
+ * @param low - The low (signed) 32 bits of the long
+ * @param high - The high (signed) 32 bits of the long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ constructor(low: number, high?: number, unsigned?: boolean);
+ /**
+ * Constructs a 64 bit two's-complement integer, given a bigint representation.
+ *
+ * @param value - BigInt representation of the long value
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ constructor(value: bigint, unsigned?: boolean);
+ /**
+ * Constructs a 64 bit two's-complement integer, given a string representation.
+ *
+ * @param value - String representation of the long value
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ constructor(value: string, unsigned?: boolean);
+ static TWO_PWR_24: Long;
+ /** Maximum unsigned value. */
+ static MAX_UNSIGNED_VALUE: Long;
+ /** Signed zero */
+ static ZERO: Long;
+ /** Unsigned zero. */
+ static UZERO: Long;
+ /** Signed one. */
+ static ONE: Long;
+ /** Unsigned one. */
+ static UONE: Long;
+ /** Signed negative one. */
+ static NEG_ONE: Long;
+ /** Maximum signed value. */
+ static MAX_VALUE: Long;
+ /** Minimum signed value. */
+ static MIN_VALUE: Long;
+ /**
+ * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits.
+ * Each is assumed to use 32 bits.
+ * @param lowBits - The low 32 bits
+ * @param highBits - The high 32 bits
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
+ /**
+ * Returns a Long representing the given 32 bit integer value.
+ * @param value - The 32 bit integer in question
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromInt(value: number, unsigned?: boolean): Long;
+ /**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ * @param value - The number in question
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromNumber(value: number, unsigned?: boolean): Long;
+ /**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ * @param value - The number in question
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBigInt(value: bigint, unsigned?: boolean): Long;
+ /* Excluded from this release type: _fromString */
+ /**
+ * Returns a signed Long representation of the given string, written using radix 10.
+ * Will throw an error if the given text is not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the radix 10
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string): Long;
+ /**
+ * Returns a Long representation of the given string, written using the radix 10.
+ * Will throw an error if the given parameters are not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the given radix
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string, unsigned?: boolean): Long;
+ /**
+ * Returns a signed Long representation of the given string, written using the specified radix.
+ * Will throw an error if the given parameters are not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the given radix
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string, radix?: boolean): Long;
+ /**
+ * Returns a Long representation of the given string, written using the specified radix.
+ * Will throw an error if the given parameters are not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the given radix
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string, unsigned?: boolean, radix?: number): Long;
+ /**
+ * Returns a signed Long representation of the given string, written using radix 10.
+ *
+ * If the input string is empty, this function will throw a BSONError.
+ *
+ * If input string does not have valid signed 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit signed long will be coerced to Long.MAX_VALUE and Long.MIN_VALUE respectively
+ * - 'NaN' or '+/-Infinity' are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ *
+ * @param str - The textual representation of the Long
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string): Long;
+ /**
+ * Returns a signed Long representation of the given string, written using the provided radix.
+ *
+ * If the input string is empty or a provided radix is not within (2-36), this function will throw a BSONError.
+ *
+ * If input parameters do not have valid signed 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit signed long will be coerced to Long.MAX_VALUE and Long.MIN_VALUE respectively
+ * - if the radix is less than 24, 'NaN' is coerced to Long.ZERO
+ * - if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ * @param str - The textual representation of the Long
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string, radix?: number): Long;
+ /**
+ * Returns a Long representation of the given string, written using radix 10.
+ *
+ * If the input string is empty, this function will throw a BSONError.
+ *
+ * If input parameters do not have a valid 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit long will be coerced to max or min (if signed) values
+ * - if the radix is less than 24, 'NaN' is coerced to Long.ZERO
+ * - if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string, unsigned?: boolean): Long;
+ /**
+ * Returns a Long representation of the given string, written using the specified radix.
+ *
+ * If the input string is empty or a provided radix is not within (2-36), this function will throw a BSONError.
+ *
+ * If input parameters do not have a valid 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit long will be coerced to max or min (if signed) values
+ * - if the radix is less than 24, 'NaN' is coerced to Long.ZERO
+ * - if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string, unsigned?: boolean, radix?: number): Long;
+ /**
+ * Creates a Long from its byte representation.
+ * @param bytes - Byte representation
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @param le - Whether little or big endian, defaults to big endian
+ * @returns The corresponding Long value
+ */
+ static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
+ /**
+ * Creates a Long from its little endian byte representation.
+ * @param bytes - Little endian byte representation
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
+ /**
+ * Creates a Long from its big endian byte representation.
+ * @param bytes - Big endian byte representation
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
+ /**
+ * Tests if the specified object is a Long.
+ */
+ static isLong(value: unknown): value is Long;
+ /**
+ * Converts the specified value to a Long.
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ static fromValue(val: number | string | {
+ low: number;
+ high: number;
+ unsigned?: boolean;
+ }, unsigned?: boolean): Long;
+ /** Returns the sum of this and the specified Long. */
+ add(addend: string | number | Long | Timestamp): Long;
+ /**
+ * Returns the sum of this and the specified Long.
+ * @returns Sum
+ */
+ and(other: string | number | Long | Timestamp): Long;
+ /**
+ * Compares this Long's value with the specified's.
+ * @returns 0 if they are the same, 1 if the this is greater and -1 if the given one is greater
+ */
+ compare(other: string | number | Long | Timestamp): 0 | 1 | -1;
+ /** This is an alias of {@link Long.compare} */
+ comp(other: string | number | Long | Timestamp): 0 | 1 | -1;
+ /**
+ * Returns this Long divided by the specified. The result is signed if this Long is signed or unsigned if this Long is unsigned.
+ * @returns Quotient
+ */
+ divide(divisor: string | number | Long | Timestamp): Long;
+ /**This is an alias of {@link Long.divide} */
+ div(divisor: string | number | Long | Timestamp): Long;
+ /**
+ * Tests if this Long's value equals the specified's.
+ * @param other - Other value
+ */
+ equals(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long.equals} */
+ eq(other: string | number | Long | Timestamp): boolean;
+ /** Gets the high 32 bits as a signed integer. */
+ getHighBits(): number;
+ /** Gets the high 32 bits as an unsigned integer. */
+ getHighBitsUnsigned(): number;
+ /** Gets the low 32 bits as a signed integer. */
+ getLowBits(): number;
+ /** Gets the low 32 bits as an unsigned integer. */
+ getLowBitsUnsigned(): number;
+ /** Gets the number of bits needed to represent the absolute value of this Long. */
+ getNumBitsAbs(): number;
+ /** Tests if this Long's value is greater than the specified's. */
+ greaterThan(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long.greaterThan} */
+ gt(other: string | number | Long | Timestamp): boolean;
+ /** Tests if this Long's value is greater than or equal the specified's. */
+ greaterThanOrEqual(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long.greaterThanOrEqual} */
+ gte(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long.greaterThanOrEqual} */
+ ge(other: string | number | Long | Timestamp): boolean;
+ /** Tests if this Long's value is even. */
+ isEven(): boolean;
+ /** Tests if this Long's value is negative. */
+ isNegative(): boolean;
+ /** Tests if this Long's value is odd. */
+ isOdd(): boolean;
+ /** Tests if this Long's value is positive. */
+ isPositive(): boolean;
+ /** Tests if this Long's value equals zero. */
+ isZero(): boolean;
+ /** Tests if this Long's value is less than the specified's. */
+ lessThan(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long#lessThan}. */
+ lt(other: string | number | Long | Timestamp): boolean;
+ /** Tests if this Long's value is less than or equal the specified's. */
+ lessThanOrEqual(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long.lessThanOrEqual} */
+ lte(other: string | number | Long | Timestamp): boolean;
+ /** Returns this Long modulo the specified. */
+ modulo(divisor: string | number | Long | Timestamp): Long;
+ /** This is an alias of {@link Long.modulo} */
+ mod(divisor: string | number | Long | Timestamp): Long;
+ /** This is an alias of {@link Long.modulo} */
+ rem(divisor: string | number | Long | Timestamp): Long;
+ /**
+ * Returns the product of this and the specified Long.
+ * @param multiplier - Multiplier
+ * @returns Product
+ */
+ multiply(multiplier: string | number | Long | Timestamp): Long;
+ /** This is an alias of {@link Long.multiply} */
+ mul(multiplier: string | number | Long | Timestamp): Long;
+ /** Returns the Negation of this Long's value. */
+ negate(): Long;
+ /** This is an alias of {@link Long.negate} */
+ neg(): Long;
+ /** Returns the bitwise NOT of this Long. */
+ not(): Long;
+ /** Tests if this Long's value differs from the specified's. */
+ notEquals(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long.notEquals} */
+ neq(other: string | number | Long | Timestamp): boolean;
+ /** This is an alias of {@link Long.notEquals} */
+ ne(other: string | number | Long | Timestamp): boolean;
+ /**
+ * Returns the bitwise OR of this Long and the specified.
+ */
+ or(other: number | string | Long): Long;
+ /**
+ * Returns this Long with bits shifted to the left by the given amount.
+ * @param numBits - Number of bits
+ * @returns Shifted Long
+ */
+ shiftLeft(numBits: number | Long): Long;
+ /** This is an alias of {@link Long.shiftLeft} */
+ shl(numBits: number | Long): Long;
+ /**
+ * Returns this Long with bits arithmetically shifted to the right by the given amount.
+ * @param numBits - Number of bits
+ * @returns Shifted Long
+ */
+ shiftRight(numBits: number | Long): Long;
+ /** This is an alias of {@link Long.shiftRight} */
+ shr(numBits: number | Long): Long;
+ /**
+ * Returns this Long with bits logically shifted to the right by the given amount.
+ * @param numBits - Number of bits
+ * @returns Shifted Long
+ */
+ shiftRightUnsigned(numBits: Long | number): Long;
+ /** This is an alias of {@link Long.shiftRightUnsigned} */
+ shr_u(numBits: number | Long): Long;
+ /** This is an alias of {@link Long.shiftRightUnsigned} */
+ shru(numBits: number | Long): Long;
+ /**
+ * Returns the difference of this and the specified Long.
+ * @param subtrahend - Subtrahend
+ * @returns Difference
+ */
+ subtract(subtrahend: string | number | Long | Timestamp): Long;
+ /** This is an alias of {@link Long.subtract} */
+ sub(subtrahend: string | number | Long | Timestamp): Long;
+ /** Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. */
+ toInt(): number;
+ /** Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). */
+ toNumber(): number;
+ /** Converts the Long to a BigInt (arbitrary precision). */
+ toBigInt(): bigint;
+ /**
+ * Converts this Long to its byte representation.
+ * @param le - Whether little or big endian, defaults to big endian
+ * @returns Byte representation
+ */
+ toBytes(le?: boolean): number[];
+ /**
+ * Converts this Long to its little endian byte representation.
+ * @returns Little endian byte representation
+ */
+ toBytesLE(): number[];
+ /**
+ * Converts this Long to its big endian byte representation.
+ * @returns Big endian byte representation
+ */
+ toBytesBE(): number[];
+ /**
+ * Converts this Long to signed.
+ */
+ toSigned(): Long;
+ /**
+ * Converts the Long to a string written in the specified radix.
+ * @param radix - Radix (2-36), defaults to 10
+ * @throws RangeError If `radix` is out of range
+ */
+ toString(radix?: number): string;
+ /** Converts this Long to unsigned. */
+ toUnsigned(): Long;
+ /** Returns the bitwise XOR of this Long and the given one. */
+ xor(other: Long | number | string): Long;
+ /** This is an alias of {@link Long.isZero} */
+ eqz(): boolean;
+ /** This is an alias of {@link Long.lessThanOrEqual} */
+ le(other: string | number | Long | Timestamp): boolean;
+ toExtendedJSON(options?: EJSONOptions): number | LongExtended;
+ static fromExtendedJSON(doc: {
+ $numberLong: string;
+ }, options?: EJSONOptions): number | Long | bigint;
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface LongExtended {
+ $numberLong: string;
+}
+
+/** @public */
+export declare type LongWithoutOverrides = new (low: unknown, high?: number | boolean, unsigned?: boolean) => {
+ [P in Exclude]: Long[P];
+};
+
+/** @public */
+export declare const LongWithoutOverridesClass: LongWithoutOverrides;
+
+/**
+ * A class representation of the BSON MaxKey type.
+ * @public
+ * @category BSONType
+ */
+export declare class MaxKey extends BSONValue {
+ get _bsontype(): 'MaxKey';
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(): string;
+}
+
+/** @public */
+export declare interface MaxKeyExtended {
+ $maxKey: 1;
+}
+
+/**
+ * A class representation of the BSON MinKey type.
+ * @public
+ * @category BSONType
+ */
+export declare class MinKey extends BSONValue {
+ get _bsontype(): 'MinKey';
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(): string;
+}
+
+/** @public */
+export declare interface MinKeyExtended {
+ $minKey: 1;
+}
+
+/**
+ * @experimental
+ * @public
+ *
+ * A collection of functions that get or set various numeric types and bit widths from a Uint8Array.
+ */
+declare type NumberUtils = {
+ /**
+ * Parses a signed int32 at offset. Throws a `RangeError` if value is negative.
+ */
+ getNonnegativeInt32LE: (source: Uint8Array, offset: number) => number;
+ getInt32LE: (source: Uint8Array, offset: number) => number;
+ getUint32LE: (source: Uint8Array, offset: number) => number;
+ getUint32BE: (source: Uint8Array, offset: number) => number;
+ getBigInt64LE: (source: Uint8Array, offset: number) => bigint;
+ getFloat64LE: (source: Uint8Array, offset: number) => number;
+ setInt32BE: (destination: Uint8Array, offset: number, value: number) => 4;
+ setInt32LE: (destination: Uint8Array, offset: number, value: number) => 4;
+ setBigInt64LE: (destination: Uint8Array, offset: number, value: bigint) => 8;
+ setFloat64LE: (destination: Uint8Array, offset: number, value: number) => 8;
+};
+
+/**
+ * Number parsing and serializing utilities.
+ *
+ * @experimental
+ * @public
+ */
+declare const NumberUtils: NumberUtils;
+
+/**
+ * A class representation of the BSON ObjectId type.
+ * @public
+ * @category BSONType
+ */
+export declare class ObjectId extends BSONValue {
+ get _bsontype(): 'ObjectId';
+ /* Excluded from this release type: index */
+ static cacheHexString: boolean;
+ /* Excluded from this release type: buffer */
+ /* Excluded from this release type: __id */
+ /**
+ * Create ObjectId from a number.
+ *
+ * @param inputId - A number.
+ * @deprecated Instead, use `static createFromTime()` to set a numeric value for the new ObjectId.
+ */
+ constructor(inputId: number);
+ /**
+ * Create ObjectId from a 24 character hex string.
+ *
+ * @param inputId - A 24 character hex string.
+ */
+ constructor(inputId: string);
+ /**
+ * Create ObjectId from the BSON ObjectId type.
+ *
+ * @param inputId - The BSON ObjectId type.
+ */
+ constructor(inputId: ObjectId);
+ /**
+ * Create ObjectId from the object type that has the toHexString method.
+ *
+ * @param inputId - The ObjectIdLike type.
+ */
+ constructor(inputId: ObjectIdLike);
+ /**
+ * Create ObjectId from a 12 byte binary Buffer.
+ *
+ * @param inputId - A 12 byte binary Buffer.
+ */
+ constructor(inputId: Uint8Array);
+ /** To generate a new ObjectId, use ObjectId() with no argument. */
+ constructor();
+ /**
+ * Implementation overload.
+ *
+ * @param inputId - All input types that are used in the constructor implementation.
+ */
+ constructor(inputId?: string | number | ObjectId | ObjectIdLike | Uint8Array);
+ /**
+ * The ObjectId bytes
+ * @readonly
+ */
+ get id(): Uint8Array;
+ set id(value: Uint8Array);
+ /** Returns the ObjectId id as a 24 lowercase character hex string representation */
+ toHexString(): string;
+ /* Excluded from this release type: getInc */
+ /**
+ * Generate a 12 byte id buffer used in ObjectId's
+ *
+ * @param time - pass in a second based timestamp.
+ */
+ static generate(time?: number): Uint8Array;
+ /**
+ * Converts the id into a 24 character hex string for printing, unless encoding is provided.
+ * @param encoding - hex or base64
+ */
+ toString(encoding?: 'hex' | 'base64'): string;
+ /** Converts to its JSON the 24 character hex string representation. */
+ toJSON(): string;
+ /* Excluded from this release type: is */
+ /**
+ * Compares the equality of this ObjectId with `otherID`.
+ *
+ * @param otherId - ObjectId instance to compare against.
+ */
+ equals(otherId: string | ObjectId | ObjectIdLike | undefined | null): boolean;
+ /** Returns the generation date (accurate up to the second) that this ID was generated. */
+ getTimestamp(): Date;
+ /* Excluded from this release type: createPk */
+ /* Excluded from this release type: serializeInto */
+ /**
+ * Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.
+ *
+ * @param time - an integer number representing a number of seconds.
+ */
+ static createFromTime(time: number): ObjectId;
+ /**
+ * Creates an ObjectId from a hex string representation of an ObjectId.
+ *
+ * @param hexString - create a ObjectId from a passed in 24 character hexstring.
+ */
+ static createFromHexString(hexString: string): ObjectId;
+ /** Creates an ObjectId instance from a base64 string */
+ static createFromBase64(base64: string): ObjectId;
+ /**
+ * Checks if a value can be used to create a valid bson ObjectId
+ * @param id - any JS value
+ */
+ static isValid(id: string | number | ObjectId | ObjectIdLike | Uint8Array): boolean;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ /**
+ * Converts to a string representation of this Id.
+ *
+ * @returns return the 24 character hex string representation.
+ */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface ObjectIdExtended {
+ $oid: string;
+}
+
+/** @public */
+export declare interface ObjectIdLike {
+ id: string | Uint8Array;
+ __id?: string;
+ toHexString(): string;
+}
+
+/**
+ * @experimental
+ * @public
+ *
+ * A new set of BSON APIs that are currently experimental and not intended for production use.
+ */
+export declare type OnDemand = {
+ parseToElements: (this: void, bytes: Uint8Array, startOffset?: number) => Iterable;
+ BSONElement: BSONElement;
+ ByteUtils: ByteUtils;
+ NumberUtils: NumberUtils;
+};
+
+/**
+ * @experimental
+ * @public
+ */
+export declare const onDemand: OnDemand;
+
+/**
+ * Parse an Extended JSON string, constructing the JavaScript value or object described by that
+ * string.
+ *
+ * @example
+ * ```js
+ * const { EJSON } = require('bson');
+ * const text = '{ "int32": { "$numberInt": "10" } }';
+ *
+ * // prints { int32: { [String: '10'] _bsontype: 'Int32', value: '10' } }
+ * console.log(EJSON.parse(text, { relaxed: false }));
+ *
+ * // prints { int32: 10 }
+ * console.log(EJSON.parse(text));
+ * ```
+ */
+declare function parse(text: string, options?: EJSONOptions): any;
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param object - the Javascript object to serialize.
+ * @returns Buffer object containing the serialized object.
+ * @public
+ */
+export declare function serialize(object: Document, options?: SerializeOptions): Uint8Array;
+
+/** @public */
+export declare interface SerializeOptions {
+ /**
+ * the serializer will check if keys are valid.
+ * @defaultValue `false`
+ */
+ checkKeys?: boolean;
+ /**
+ * serialize the javascript functions
+ * @defaultValue `false`
+ */
+ serializeFunctions?: boolean;
+ /**
+ * serialize will not emit undefined fields
+ * note that the driver sets this to `false`
+ * @defaultValue `true`
+ */
+ ignoreUndefined?: boolean;
+ /* Excluded from this release type: minInternalBufferSize */
+ /**
+ * the index in the buffer where we wish to start serializing into
+ * @defaultValue `0`
+ */
+ index?: number;
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer,
+ * useful when pre-allocating the space for serialization.
+ *
+ * @param object - the Javascript object to serialize.
+ * @param finalBuffer - the Buffer you pre-allocated to store the serialized BSON object.
+ * @returns the index pointing to the last written byte in the buffer.
+ * @public
+ */
+export declare function serializeWithBufferAndIndex(object: Document, finalBuffer: Uint8Array, options?: SerializeOptions): number;
+
+/**
+ * Sets the size of the internal serialization buffer.
+ *
+ * @param size - The desired size for the internal serialization buffer in bytes
+ * @public
+ */
+export declare function setInternalBufferSize(size: number): void;
+
+/**
+ * Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer
+ * function is specified or optionally including only the specified properties if a replacer array
+ * is specified.
+ *
+ * @param value - The value to convert to extended JSON
+ * @param replacer - A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string
+ * @param space - A String or Number object that's used to insert white space into the output JSON string for readability purposes.
+ * @param options - Optional settings
+ *
+ * @example
+ * ```js
+ * const { EJSON } = require('bson');
+ * const Int32 = require('mongodb').Int32;
+ * const doc = { int32: new Int32(10) };
+ *
+ * // prints '{"int32":{"$numberInt":"10"}}'
+ * console.log(EJSON.stringify(doc, { relaxed: false }));
+ *
+ * // prints '{"int32":10}'
+ * console.log(EJSON.stringify(doc));
+ * ```
+ */
+declare function stringify(value: any, replacer?: (number | string)[] | ((this: any, key: string, value: any) => any) | EJSONOptions, space?: string | number, options?: EJSONOptions): string;
+
+/**
+ * @public
+ * @category BSONType
+ */
+export declare class Timestamp extends LongWithoutOverridesClass {
+ get _bsontype(): 'Timestamp';
+ static readonly MAX_VALUE: Long;
+ /**
+ * @param int - A 64-bit bigint representing the Timestamp.
+ */
+ constructor(int: bigint);
+ /**
+ * @param long - A 64-bit Long representing the Timestamp.
+ */
+ constructor(long: Long);
+ /**
+ * @param value - A pair of two values indicating timestamp and increment.
+ */
+ constructor(value: {
+ t: number;
+ i: number;
+ });
+ toJSON(): {
+ $timestamp: string;
+ };
+ /** Returns a Timestamp represented by the given (32-bit) integer value. */
+ static fromInt(value: number): Timestamp;
+ /** Returns a Timestamp representing the given number value, provided that it is a finite number. Otherwise, zero is returned. */
+ static fromNumber(value: number): Timestamp;
+ /**
+ * Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @param lowBits - the low 32-bits.
+ * @param highBits - the high 32-bits.
+ */
+ static fromBits(lowBits: number, highBits: number): Timestamp;
+ /**
+ * Returns a Timestamp from the given string, optionally using the given radix.
+ *
+ * @param str - the textual representation of the Timestamp.
+ * @param optRadix - the radix in which the text is written.
+ */
+ static fromString(str: string, optRadix: number): Timestamp;
+ /* Excluded from this release type: toExtendedJSON */
+ /* Excluded from this release type: fromExtendedJSON */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare interface TimestampExtended {
+ $timestamp: {
+ t: number;
+ i: number;
+ };
+}
+
+/** @public */
+export declare type TimestampOverrides = '_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect';
+
+/**
+ * A class representation of the BSON UUID type.
+ * @public
+ */
+export declare class UUID extends Binary {
+ /**
+ * Create a UUID type
+ *
+ * When the argument to the constructor is omitted a random v4 UUID will be generated.
+ *
+ * @param input - Can be a 32 or 36 character hex string (dashes excluded/included) or a 16 byte binary Buffer.
+ */
+ constructor(input?: string | Uint8Array | UUID);
+ /**
+ * The UUID bytes
+ * @readonly
+ */
+ get id(): Uint8Array;
+ set id(value: Uint8Array);
+ /**
+ * Returns the UUID id as a 32 or 36 character hex string representation, excluding/including dashes (defaults to 36 character dash separated)
+ * @param includeDashes - should the string exclude dash-separators.
+ */
+ toHexString(includeDashes?: boolean): string;
+ /**
+ * Converts the id into a 36 character (dashes included) hex string, unless a encoding is specified.
+ */
+ toString(encoding?: 'hex' | 'base64'): string;
+ /**
+ * Converts the id into its JSON string representation.
+ * A 36 character (dashes included) hex string in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ */
+ toJSON(): string;
+ /**
+ * Compares the equality of this UUID with `otherID`.
+ *
+ * @param otherId - UUID instance to compare against.
+ */
+ equals(otherId: string | Uint8Array | UUID): boolean;
+ /**
+ * Creates a Binary instance from the current UUID.
+ */
+ toBinary(): Binary;
+ /**
+ * Generates a populated buffer containing a v4 uuid
+ */
+ static generate(): Uint8Array;
+ /**
+ * Checks if a value is a valid bson UUID
+ * @param input - UUID, string or Buffer to validate.
+ */
+ static isValid(input: string | Uint8Array | UUID | Binary): boolean;
+ /**
+ * Creates an UUID from a hex string representation of an UUID.
+ * @param hexString - 32 or 36 character hex string (dashes excluded/included).
+ */
+ static createFromHexString(hexString: string): UUID;
+ /** Creates an UUID from a base64 string representation of an UUID. */
+ static createFromBase64(base64: string): UUID;
+ /* Excluded from this release type: bytesFromString */
+ /* Excluded from this release type: isValidUUIDString */
+ /**
+ * Converts to a string representation of this Id.
+ *
+ * @returns return the 36 character hex string representation.
+ *
+ */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+}
+
+/** @public */
+export declare type UUIDExtended = {
+ $uuid: string;
+};
+
+export { }
diff --git a/week-3/04-course-app-hard/node_modules/bson/etc/prepare.js b/week-3/04-course-app-hard/node_modules/bson/etc/prepare.js
new file mode 100644
index 000000000..91e6f3a97
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/etc/prepare.js
@@ -0,0 +1,19 @@
+#! /usr/bin/env node
+var cp = require('child_process');
+var fs = require('fs');
+
+var nodeMajorVersion = +process.version.match(/^v(\d+)\.\d+/)[1];
+
+if (fs.existsSync('src') && nodeMajorVersion >= 10) {
+ cp.spawnSync('npm', ['run', 'build'], { stdio: 'inherit', shell: true });
+} else {
+ if (!fs.existsSync('lib')) {
+ console.warn('BSON: No compiled javascript present, the library is not installed correctly.');
+ if (nodeMajorVersion < 10) {
+ console.warn(
+ 'This library can only be compiled in nodejs version 10 or later, currently running: ' +
+ nodeMajorVersion
+ );
+ }
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.bundle.js b/week-3/04-course-app-hard/node_modules/bson/lib/bson.bundle.js
new file mode 100644
index 000000000..efbaa38d7
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.bundle.js
@@ -0,0 +1,4422 @@
+var BSON = (function (exports) {
+'use strict';
+
+function isAnyArrayBuffer(value) {
+ return ['[object ArrayBuffer]', '[object SharedArrayBuffer]'].includes(Object.prototype.toString.call(value));
+}
+function isUint8Array(value) {
+ return Object.prototype.toString.call(value) === '[object Uint8Array]';
+}
+function isRegExp(d) {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+}
+function isMap(d) {
+ return Object.prototype.toString.call(d) === '[object Map]';
+}
+function isDate(d) {
+ return Object.prototype.toString.call(d) === '[object Date]';
+}
+function defaultInspect(x, _options) {
+ return JSON.stringify(x, (k, v) => {
+ if (typeof v === 'bigint') {
+ return { $numberLong: `${v}` };
+ }
+ else if (isMap(v)) {
+ return Object.fromEntries(v);
+ }
+ return v;
+ });
+}
+function getStylizeFunction(options) {
+ const stylizeExists = options != null &&
+ typeof options === 'object' &&
+ 'stylize' in options &&
+ typeof options.stylize === 'function';
+ if (stylizeExists) {
+ return options.stylize;
+ }
+}
+
+const BSON_MAJOR_VERSION = 6;
+const BSON_INT32_MAX = 0x7fffffff;
+const BSON_INT32_MIN = -0x80000000;
+const BSON_INT64_MAX = Math.pow(2, 63) - 1;
+const BSON_INT64_MIN = -Math.pow(2, 63);
+const JS_INT_MAX = Math.pow(2, 53);
+const JS_INT_MIN = -Math.pow(2, 53);
+const BSON_DATA_NUMBER = 1;
+const BSON_DATA_STRING = 2;
+const BSON_DATA_OBJECT = 3;
+const BSON_DATA_ARRAY = 4;
+const BSON_DATA_BINARY = 5;
+const BSON_DATA_UNDEFINED = 6;
+const BSON_DATA_OID = 7;
+const BSON_DATA_BOOLEAN = 8;
+const BSON_DATA_DATE = 9;
+const BSON_DATA_NULL = 10;
+const BSON_DATA_REGEXP = 11;
+const BSON_DATA_DBPOINTER = 12;
+const BSON_DATA_CODE = 13;
+const BSON_DATA_SYMBOL = 14;
+const BSON_DATA_CODE_W_SCOPE = 15;
+const BSON_DATA_INT = 16;
+const BSON_DATA_TIMESTAMP = 17;
+const BSON_DATA_LONG = 18;
+const BSON_DATA_DECIMAL128 = 19;
+const BSON_DATA_MIN_KEY = 0xff;
+const BSON_DATA_MAX_KEY = 0x7f;
+const BSON_BINARY_SUBTYPE_DEFAULT = 0;
+const BSON_BINARY_SUBTYPE_UUID_NEW = 4;
+const BSONType = Object.freeze({
+ double: 1,
+ string: 2,
+ object: 3,
+ array: 4,
+ binData: 5,
+ undefined: 6,
+ objectId: 7,
+ bool: 8,
+ date: 9,
+ null: 10,
+ regex: 11,
+ dbPointer: 12,
+ javascript: 13,
+ symbol: 14,
+ javascriptWithScope: 15,
+ int: 16,
+ timestamp: 17,
+ long: 18,
+ decimal: 19,
+ minKey: -1,
+ maxKey: 127
+});
+
+class BSONError extends Error {
+ get bsonError() {
+ return true;
+ }
+ get name() {
+ return 'BSONError';
+ }
+ constructor(message, options) {
+ super(message, options);
+ }
+ static isBSONError(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ 'bsonError' in value &&
+ value.bsonError === true &&
+ 'name' in value &&
+ 'message' in value &&
+ 'stack' in value);
+ }
+}
+class BSONVersionError extends BSONError {
+ get name() {
+ return 'BSONVersionError';
+ }
+ constructor() {
+ super(`Unsupported BSON version, bson types must be from bson ${BSON_MAJOR_VERSION}.x.x`);
+ }
+}
+class BSONRuntimeError extends BSONError {
+ get name() {
+ return 'BSONRuntimeError';
+ }
+ constructor(message) {
+ super(message);
+ }
+}
+class BSONOffsetError extends BSONError {
+ get name() {
+ return 'BSONOffsetError';
+ }
+ constructor(message, offset, options) {
+ super(`${message}. offset: ${offset}`, options);
+ this.offset = offset;
+ }
+}
+
+let TextDecoderFatal;
+let TextDecoderNonFatal;
+function parseUtf8(buffer, start, end, fatal) {
+ if (fatal) {
+ TextDecoderFatal ??= new TextDecoder('utf8', { fatal: true });
+ try {
+ return TextDecoderFatal.decode(buffer.subarray(start, end));
+ }
+ catch (cause) {
+ throw new BSONError('Invalid UTF-8 string in BSON document', { cause });
+ }
+ }
+ TextDecoderNonFatal ??= new TextDecoder('utf8', { fatal: false });
+ return TextDecoderNonFatal.decode(buffer.subarray(start, end));
+}
+
+function tryReadBasicLatin(uint8array, start, end) {
+ if (uint8array.length === 0) {
+ return '';
+ }
+ const stringByteLength = end - start;
+ if (stringByteLength === 0) {
+ return '';
+ }
+ if (stringByteLength > 20) {
+ return null;
+ }
+ if (stringByteLength === 1 && uint8array[start] < 128) {
+ return String.fromCharCode(uint8array[start]);
+ }
+ if (stringByteLength === 2 && uint8array[start] < 128 && uint8array[start + 1] < 128) {
+ return String.fromCharCode(uint8array[start]) + String.fromCharCode(uint8array[start + 1]);
+ }
+ if (stringByteLength === 3 &&
+ uint8array[start] < 128 &&
+ uint8array[start + 1] < 128 &&
+ uint8array[start + 2] < 128) {
+ return (String.fromCharCode(uint8array[start]) +
+ String.fromCharCode(uint8array[start + 1]) +
+ String.fromCharCode(uint8array[start + 2]));
+ }
+ const latinBytes = [];
+ for (let i = start; i < end; i++) {
+ const byte = uint8array[i];
+ if (byte > 127) {
+ return null;
+ }
+ latinBytes.push(byte);
+ }
+ return String.fromCharCode(...latinBytes);
+}
+function tryWriteBasicLatin(destination, source, offset) {
+ if (source.length === 0)
+ return 0;
+ if (source.length > 25)
+ return null;
+ if (destination.length - offset < source.length)
+ return null;
+ for (let charOffset = 0, destinationOffset = offset; charOffset < source.length; charOffset++, destinationOffset++) {
+ const char = source.charCodeAt(charOffset);
+ if (char > 127)
+ return null;
+ destination[destinationOffset] = char;
+ }
+ return source.length;
+}
+
+function nodejsMathRandomBytes(byteLength) {
+ return nodeJsByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const nodejsRandomBytes = (() => {
+ try {
+ return require('crypto').randomBytes;
+ }
+ catch {
+ return nodejsMathRandomBytes;
+ }
+})();
+const nodeJsByteUtils = {
+ toLocalBufferType(potentialBuffer) {
+ if (Buffer.isBuffer(potentialBuffer)) {
+ return potentialBuffer;
+ }
+ if (ArrayBuffer.isView(potentialBuffer)) {
+ return Buffer.from(potentialBuffer.buffer, potentialBuffer.byteOffset, potentialBuffer.byteLength);
+ }
+ const stringTag = potentialBuffer?.[Symbol.toStringTag] ?? Object.prototype.toString.call(potentialBuffer);
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return Buffer.from(potentialBuffer);
+ }
+ throw new BSONError(`Cannot create Buffer from ${String(potentialBuffer)}`);
+ },
+ allocate(size) {
+ return Buffer.alloc(size);
+ },
+ allocateUnsafe(size) {
+ return Buffer.allocUnsafe(size);
+ },
+ equals(a, b) {
+ return nodeJsByteUtils.toLocalBufferType(a).equals(b);
+ },
+ fromNumberArray(array) {
+ return Buffer.from(array);
+ },
+ fromBase64(base64) {
+ return Buffer.from(base64, 'base64');
+ },
+ toBase64(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('base64');
+ },
+ fromISO88591(codePoints) {
+ return Buffer.from(codePoints, 'binary');
+ },
+ toISO88591(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('binary');
+ },
+ fromHex(hex) {
+ return Buffer.from(hex, 'hex');
+ },
+ toHex(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('hex');
+ },
+ toUTF8(buffer, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(buffer, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ const string = nodeJsByteUtils.toLocalBufferType(buffer).toString('utf8', start, end);
+ if (fatal) {
+ for (let i = 0; i < string.length; i++) {
+ if (string.charCodeAt(i) === 0xfffd) {
+ parseUtf8(buffer, start, end, true);
+ break;
+ }
+ }
+ }
+ return string;
+ },
+ utf8ByteLength(input) {
+ return Buffer.byteLength(input, 'utf8');
+ },
+ encodeUTF8Into(buffer, source, byteOffset) {
+ const latinBytesWritten = tryWriteBasicLatin(buffer, source, byteOffset);
+ if (latinBytesWritten != null) {
+ return latinBytesWritten;
+ }
+ return nodeJsByteUtils.toLocalBufferType(buffer).write(source, byteOffset, undefined, 'utf8');
+ },
+ randomBytes: nodejsRandomBytes
+};
+
+function isReactNative() {
+ const { navigator } = globalThis;
+ return typeof navigator === 'object' && navigator.product === 'ReactNative';
+}
+function webMathRandomBytes(byteLength) {
+ if (byteLength < 0) {
+ throw new RangeError(`The argument 'byteLength' is invalid. Received ${byteLength}`);
+ }
+ return webByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const webRandomBytes = (() => {
+ const { crypto } = globalThis;
+ if (crypto != null && typeof crypto.getRandomValues === 'function') {
+ return (byteLength) => {
+ return crypto.getRandomValues(webByteUtils.allocate(byteLength));
+ };
+ }
+ else {
+ if (isReactNative()) {
+ const { console } = globalThis;
+ console?.warn?.('BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.');
+ }
+ return webMathRandomBytes;
+ }
+})();
+const HEX_DIGIT = /(\d|[a-f])/i;
+const webByteUtils = {
+ toLocalBufferType(potentialUint8array) {
+ const stringTag = potentialUint8array?.[Symbol.toStringTag] ??
+ Object.prototype.toString.call(potentialUint8array);
+ if (stringTag === 'Uint8Array') {
+ return potentialUint8array;
+ }
+ if (ArrayBuffer.isView(potentialUint8array)) {
+ return new Uint8Array(potentialUint8array.buffer.slice(potentialUint8array.byteOffset, potentialUint8array.byteOffset + potentialUint8array.byteLength));
+ }
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return new Uint8Array(potentialUint8array);
+ }
+ throw new BSONError(`Cannot make a Uint8Array from ${String(potentialUint8array)}`);
+ },
+ allocate(size) {
+ if (typeof size !== 'number') {
+ throw new TypeError(`The "size" argument must be of type number. Received ${String(size)}`);
+ }
+ return new Uint8Array(size);
+ },
+ allocateUnsafe(size) {
+ return webByteUtils.allocate(size);
+ },
+ equals(a, b) {
+ if (a.byteLength !== b.byteLength) {
+ return false;
+ }
+ for (let i = 0; i < a.byteLength; i++) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+ return true;
+ },
+ fromNumberArray(array) {
+ return Uint8Array.from(array);
+ },
+ fromBase64(base64) {
+ return Uint8Array.from(atob(base64), c => c.charCodeAt(0));
+ },
+ toBase64(uint8array) {
+ return btoa(webByteUtils.toISO88591(uint8array));
+ },
+ fromISO88591(codePoints) {
+ return Uint8Array.from(codePoints, c => c.charCodeAt(0) & 0xff);
+ },
+ toISO88591(uint8array) {
+ return Array.from(Uint16Array.from(uint8array), b => String.fromCharCode(b)).join('');
+ },
+ fromHex(hex) {
+ const evenLengthHex = hex.length % 2 === 0 ? hex : hex.slice(0, hex.length - 1);
+ const buffer = [];
+ for (let i = 0; i < evenLengthHex.length; i += 2) {
+ const firstDigit = evenLengthHex[i];
+ const secondDigit = evenLengthHex[i + 1];
+ if (!HEX_DIGIT.test(firstDigit)) {
+ break;
+ }
+ if (!HEX_DIGIT.test(secondDigit)) {
+ break;
+ }
+ const hexDigit = Number.parseInt(`${firstDigit}${secondDigit}`, 16);
+ buffer.push(hexDigit);
+ }
+ return Uint8Array.from(buffer);
+ },
+ toHex(uint8array) {
+ return Array.from(uint8array, byte => byte.toString(16).padStart(2, '0')).join('');
+ },
+ toUTF8(uint8array, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(uint8array, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ return parseUtf8(uint8array, start, end, fatal);
+ },
+ utf8ByteLength(input) {
+ return new TextEncoder().encode(input).byteLength;
+ },
+ encodeUTF8Into(uint8array, source, byteOffset) {
+ const bytes = new TextEncoder().encode(source);
+ uint8array.set(bytes, byteOffset);
+ return bytes.byteLength;
+ },
+ randomBytes: webRandomBytes
+};
+
+const hasGlobalBuffer = typeof Buffer === 'function' && Buffer.prototype?._isBuffer !== true;
+const ByteUtils = hasGlobalBuffer ? nodeJsByteUtils : webByteUtils;
+
+class BSONValue {
+ get [Symbol.for('@@mdb.bson.version')]() {
+ return BSON_MAJOR_VERSION;
+ }
+ [Symbol.for('nodejs.util.inspect.custom')](depth, options, inspect) {
+ return this.inspect(depth, options, inspect);
+ }
+}
+
+class Binary extends BSONValue {
+ get _bsontype() {
+ return 'Binary';
+ }
+ constructor(buffer, subType) {
+ super();
+ if (!(buffer == null) &&
+ typeof buffer === 'string' &&
+ !ArrayBuffer.isView(buffer) &&
+ !isAnyArrayBuffer(buffer) &&
+ !Array.isArray(buffer)) {
+ throw new BSONError('Binary can only be constructed from Uint8Array or number[]');
+ }
+ this.sub_type = subType ?? Binary.BSON_BINARY_SUBTYPE_DEFAULT;
+ if (buffer == null) {
+ this.buffer = ByteUtils.allocate(Binary.BUFFER_SIZE);
+ this.position = 0;
+ }
+ else {
+ this.buffer = Array.isArray(buffer)
+ ? ByteUtils.fromNumberArray(buffer)
+ : ByteUtils.toLocalBufferType(buffer);
+ this.position = this.buffer.byteLength;
+ }
+ }
+ put(byteValue) {
+ if (typeof byteValue === 'string' && byteValue.length !== 1) {
+ throw new BSONError('only accepts single character String');
+ }
+ else if (typeof byteValue !== 'number' && byteValue.length !== 1)
+ throw new BSONError('only accepts single character Uint8Array or Array');
+ let decodedByte;
+ if (typeof byteValue === 'string') {
+ decodedByte = byteValue.charCodeAt(0);
+ }
+ else if (typeof byteValue === 'number') {
+ decodedByte = byteValue;
+ }
+ else {
+ decodedByte = byteValue[0];
+ }
+ if (decodedByte < 0 || decodedByte > 255) {
+ throw new BSONError('only accepts number in a valid unsigned byte range 0-255');
+ }
+ if (this.buffer.byteLength > this.position) {
+ this.buffer[this.position++] = decodedByte;
+ }
+ else {
+ const newSpace = ByteUtils.allocate(Binary.BUFFER_SIZE + this.buffer.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ this.buffer[this.position++] = decodedByte;
+ }
+ }
+ write(sequence, offset) {
+ offset = typeof offset === 'number' ? offset : this.position;
+ if (this.buffer.byteLength < offset + sequence.length) {
+ const newSpace = ByteUtils.allocate(this.buffer.byteLength + sequence.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ }
+ if (ArrayBuffer.isView(sequence)) {
+ this.buffer.set(ByteUtils.toLocalBufferType(sequence), offset);
+ this.position =
+ offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;
+ }
+ else if (typeof sequence === 'string') {
+ throw new BSONError('input cannot be string');
+ }
+ }
+ read(position, length) {
+ length = length && length > 0 ? length : this.position;
+ return this.buffer.slice(position, position + length);
+ }
+ value() {
+ return this.buffer.length === this.position
+ ? this.buffer
+ : this.buffer.subarray(0, this.position);
+ }
+ length() {
+ return this.position;
+ }
+ toJSON() {
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.buffer.subarray(0, this.position));
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ if (encoding === 'utf8' || encoding === 'utf-8')
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ const base64String = ByteUtils.toBase64(this.buffer);
+ const subType = Number(this.sub_type).toString(16);
+ if (options.legacy) {
+ return {
+ $binary: base64String,
+ $type: subType.length === 1 ? '0' + subType : subType
+ };
+ }
+ return {
+ $binary: {
+ base64: base64String,
+ subType: subType.length === 1 ? '0' + subType : subType
+ }
+ };
+ }
+ toUUID() {
+ if (this.sub_type === Binary.SUBTYPE_UUID) {
+ return new UUID(this.buffer.slice(0, this.position));
+ }
+ throw new BSONError(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${Binary.SUBTYPE_UUID}" is currently supported.`);
+ }
+ static createFromHexString(hex, subType) {
+ return new Binary(ByteUtils.fromHex(hex), subType);
+ }
+ static createFromBase64(base64, subType) {
+ return new Binary(ByteUtils.fromBase64(base64), subType);
+ }
+ static fromExtendedJSON(doc, options) {
+ options = options || {};
+ let data;
+ let type;
+ if ('$binary' in doc) {
+ if (options.legacy && typeof doc.$binary === 'string' && '$type' in doc) {
+ type = doc.$type ? parseInt(doc.$type, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary);
+ }
+ else {
+ if (typeof doc.$binary !== 'string') {
+ type = doc.$binary.subType ? parseInt(doc.$binary.subType, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary.base64);
+ }
+ }
+ }
+ else if ('$uuid' in doc) {
+ type = 4;
+ data = UUID.bytesFromString(doc.$uuid);
+ }
+ if (!data) {
+ throw new BSONError(`Unexpected Binary Extended JSON format ${JSON.stringify(doc)}`);
+ }
+ return type === BSON_BINARY_SUBTYPE_UUID_NEW ? new UUID(data) : new Binary(data, type);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const base64 = ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ const base64Arg = inspect(base64, options);
+ const subTypeArg = inspect(this.sub_type, options);
+ return `Binary.createFromBase64(${base64Arg}, ${subTypeArg})`;
+ }
+}
+Binary.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+Binary.BUFFER_SIZE = 256;
+Binary.SUBTYPE_DEFAULT = 0;
+Binary.SUBTYPE_FUNCTION = 1;
+Binary.SUBTYPE_BYTE_ARRAY = 2;
+Binary.SUBTYPE_UUID_OLD = 3;
+Binary.SUBTYPE_UUID = 4;
+Binary.SUBTYPE_MD5 = 5;
+Binary.SUBTYPE_ENCRYPTED = 6;
+Binary.SUBTYPE_COLUMN = 7;
+Binary.SUBTYPE_SENSITIVE = 8;
+Binary.SUBTYPE_USER_DEFINED = 128;
+const UUID_BYTE_LENGTH = 16;
+const UUID_WITHOUT_DASHES = /^[0-9A-F]{32}$/i;
+const UUID_WITH_DASHES = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
+class UUID extends Binary {
+ constructor(input) {
+ let bytes;
+ if (input == null) {
+ bytes = UUID.generate();
+ }
+ else if (input instanceof UUID) {
+ bytes = ByteUtils.toLocalBufferType(new Uint8Array(input.buffer));
+ }
+ else if (ArrayBuffer.isView(input) && input.byteLength === UUID_BYTE_LENGTH) {
+ bytes = ByteUtils.toLocalBufferType(input);
+ }
+ else if (typeof input === 'string') {
+ bytes = UUID.bytesFromString(input);
+ }
+ else {
+ throw new BSONError('Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).');
+ }
+ super(bytes, BSON_BINARY_SUBTYPE_UUID_NEW);
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ }
+ toHexString(includeDashes = true) {
+ if (includeDashes) {
+ return [
+ ByteUtils.toHex(this.buffer.subarray(0, 4)),
+ ByteUtils.toHex(this.buffer.subarray(4, 6)),
+ ByteUtils.toHex(this.buffer.subarray(6, 8)),
+ ByteUtils.toHex(this.buffer.subarray(8, 10)),
+ ByteUtils.toHex(this.buffer.subarray(10, 16))
+ ].join('-');
+ }
+ return ByteUtils.toHex(this.buffer);
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.id);
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ equals(otherId) {
+ if (!otherId) {
+ return false;
+ }
+ if (otherId instanceof UUID) {
+ return ByteUtils.equals(otherId.id, this.id);
+ }
+ try {
+ return ByteUtils.equals(new UUID(otherId).id, this.id);
+ }
+ catch {
+ return false;
+ }
+ }
+ toBinary() {
+ return new Binary(this.id, Binary.SUBTYPE_UUID);
+ }
+ static generate() {
+ const bytes = ByteUtils.randomBytes(UUID_BYTE_LENGTH);
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
+ return bytes;
+ }
+ static isValid(input) {
+ if (!input) {
+ return false;
+ }
+ if (typeof input === 'string') {
+ return UUID.isValidUUIDString(input);
+ }
+ if (isUint8Array(input)) {
+ return input.byteLength === UUID_BYTE_LENGTH;
+ }
+ return (input._bsontype === 'Binary' &&
+ input.sub_type === this.SUBTYPE_UUID &&
+ input.buffer.byteLength === 16);
+ }
+ static createFromHexString(hexString) {
+ const buffer = UUID.bytesFromString(hexString);
+ return new UUID(buffer);
+ }
+ static createFromBase64(base64) {
+ return new UUID(ByteUtils.fromBase64(base64));
+ }
+ static bytesFromString(representation) {
+ if (!UUID.isValidUUIDString(representation)) {
+ throw new BSONError('UUID string representation must be 32 hex digits or canonical hyphenated representation');
+ }
+ return ByteUtils.fromHex(representation.replace(/-/g, ''));
+ }
+ static isValidUUIDString(representation) {
+ return UUID_WITHOUT_DASHES.test(representation) || UUID_WITH_DASHES.test(representation);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new UUID(${inspect(this.toHexString(), options)})`;
+ }
+}
+
+class Code extends BSONValue {
+ get _bsontype() {
+ return 'Code';
+ }
+ constructor(code, scope) {
+ super();
+ this.code = code.toString();
+ this.scope = scope ?? null;
+ }
+ toJSON() {
+ if (this.scope != null) {
+ return { code: this.code, scope: this.scope };
+ }
+ return { code: this.code };
+ }
+ toExtendedJSON() {
+ if (this.scope) {
+ return { $code: this.code, $scope: this.scope };
+ }
+ return { $code: this.code };
+ }
+ static fromExtendedJSON(doc) {
+ return new Code(doc.$code, doc.$scope);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ let parametersString = inspect(this.code, options);
+ const multiLineFn = parametersString.includes('\n');
+ if (this.scope != null) {
+ parametersString += `,${multiLineFn ? '\n' : ' '}${inspect(this.scope, options)}`;
+ }
+ const endingNewline = multiLineFn && this.scope === null;
+ return `new Code(${multiLineFn ? '\n' : ''}${parametersString}${endingNewline ? '\n' : ''})`;
+ }
+}
+
+function isDBRefLike(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '$id' in value &&
+ value.$id != null &&
+ '$ref' in value &&
+ typeof value.$ref === 'string' &&
+ (!('$db' in value) || ('$db' in value && typeof value.$db === 'string')));
+}
+class DBRef extends BSONValue {
+ get _bsontype() {
+ return 'DBRef';
+ }
+ constructor(collection, oid, db, fields) {
+ super();
+ const parts = collection.split('.');
+ if (parts.length === 2) {
+ db = parts.shift();
+ collection = parts.shift();
+ }
+ this.collection = collection;
+ this.oid = oid;
+ this.db = db;
+ this.fields = fields || {};
+ }
+ get namespace() {
+ return this.collection;
+ }
+ set namespace(value) {
+ this.collection = value;
+ }
+ toJSON() {
+ const o = Object.assign({
+ $ref: this.collection,
+ $id: this.oid
+ }, this.fields);
+ if (this.db != null)
+ o.$db = this.db;
+ return o;
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ let o = {
+ $ref: this.collection,
+ $id: this.oid
+ };
+ if (options.legacy) {
+ return o;
+ }
+ if (this.db)
+ o.$db = this.db;
+ o = Object.assign(o, this.fields);
+ return o;
+ }
+ static fromExtendedJSON(doc) {
+ const copy = Object.assign({}, doc);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(doc.$ref, doc.$id, doc.$db, copy);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const args = [
+ inspect(this.namespace, options),
+ inspect(this.oid, options),
+ ...(this.db ? [inspect(this.db, options)] : []),
+ ...(Object.keys(this.fields).length > 0 ? [inspect(this.fields, options)] : [])
+ ];
+ args[1] = inspect === defaultInspect ? `new ObjectId(${args[1]})` : args[1];
+ return `new DBRef(${args.join(', ')})`;
+ }
+}
+
+function removeLeadingZerosAndExplicitPlus(str) {
+ if (str === '') {
+ return str;
+ }
+ let startIndex = 0;
+ const isNegative = str[startIndex] === '-';
+ const isExplicitlyPositive = str[startIndex] === '+';
+ if (isExplicitlyPositive || isNegative) {
+ startIndex += 1;
+ }
+ let foundInsignificantZero = false;
+ for (; startIndex < str.length && str[startIndex] === '0'; ++startIndex) {
+ foundInsignificantZero = true;
+ }
+ if (!foundInsignificantZero) {
+ return isExplicitlyPositive ? str.slice(1) : str;
+ }
+ return `${isNegative ? '-' : ''}${str.length === startIndex ? '0' : str.slice(startIndex)}`;
+}
+function validateStringCharacters(str, radix) {
+ radix = radix ?? 10;
+ const validCharacters = '0123456789abcdefghijklmnopqrstuvwxyz'.slice(0, radix);
+ const regex = new RegExp(`[^-+${validCharacters}]`, 'i');
+ return regex.test(str) ? false : str;
+}
+
+let wasm = undefined;
+try {
+ wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])), {}).exports;
+}
+catch {
+}
+const TWO_PWR_16_DBL = 1 << 16;
+const TWO_PWR_24_DBL = 1 << 24;
+const TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
+const TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
+const TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
+const INT_CACHE = {};
+const UINT_CACHE = {};
+const MAX_INT64_STRING_LENGTH = 20;
+const DECIMAL_REG_EX = /^(\+?0|(\+|-)?[1-9][0-9]*)$/;
+class Long extends BSONValue {
+ get _bsontype() {
+ return 'Long';
+ }
+ get __isLong__() {
+ return true;
+ }
+ constructor(lowOrValue = 0, highOrUnsigned, unsigned) {
+ super();
+ const unsignedBool = typeof highOrUnsigned === 'boolean' ? highOrUnsigned : Boolean(unsigned);
+ const high = typeof highOrUnsigned === 'number' ? highOrUnsigned : 0;
+ const res = typeof lowOrValue === 'string'
+ ? Long.fromString(lowOrValue, unsignedBool)
+ : typeof lowOrValue === 'bigint'
+ ? Long.fromBigInt(lowOrValue, unsignedBool)
+ : { low: lowOrValue | 0, high: high | 0, unsigned: unsignedBool };
+ this.low = res.low;
+ this.high = res.high;
+ this.unsigned = res.unsigned;
+ }
+ static fromBits(lowBits, highBits, unsigned) {
+ return new Long(lowBits, highBits, unsigned);
+ }
+ static fromInt(value, unsigned) {
+ let obj, cachedObj, cache;
+ if (unsigned) {
+ value >>>= 0;
+ if ((cache = 0 <= value && value < 256)) {
+ cachedObj = UINT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, (value | 0) < 0 ? -1 : 0, true);
+ if (cache)
+ UINT_CACHE[value] = obj;
+ return obj;
+ }
+ else {
+ value |= 0;
+ if ((cache = -128 <= value && value < 128)) {
+ cachedObj = INT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, value < 0 ? -1 : 0, false);
+ if (cache)
+ INT_CACHE[value] = obj;
+ return obj;
+ }
+ }
+ static fromNumber(value, unsigned) {
+ if (isNaN(value))
+ return unsigned ? Long.UZERO : Long.ZERO;
+ if (unsigned) {
+ if (value < 0)
+ return Long.UZERO;
+ if (value >= TWO_PWR_64_DBL)
+ return Long.MAX_UNSIGNED_VALUE;
+ }
+ else {
+ if (value <= -TWO_PWR_63_DBL)
+ return Long.MIN_VALUE;
+ if (value + 1 >= TWO_PWR_63_DBL)
+ return Long.MAX_VALUE;
+ }
+ if (value < 0)
+ return Long.fromNumber(-value, unsigned).neg();
+ return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
+ }
+ static fromBigInt(value, unsigned) {
+ const FROM_BIGINT_BIT_MASK = BigInt(0xffffffff);
+ const FROM_BIGINT_BIT_SHIFT = BigInt(32);
+ return new Long(Number(value & FROM_BIGINT_BIT_MASK), Number((value >> FROM_BIGINT_BIT_SHIFT) & FROM_BIGINT_BIT_MASK), unsigned);
+ }
+ static _fromString(str, unsigned, radix) {
+ if (str.length === 0)
+ throw new BSONError('empty string');
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ let p;
+ if ((p = str.indexOf('-')) > 0)
+ throw new BSONError('interior hyphen');
+ else if (p === 0) {
+ return Long._fromString(str.substring(1), unsigned, radix).neg();
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 8));
+ let result = Long.ZERO;
+ for (let i = 0; i < str.length; i += 8) {
+ const size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ const power = Long.fromNumber(Math.pow(radix, size));
+ result = result.mul(power).add(Long.fromNumber(value));
+ }
+ else {
+ result = result.mul(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ result.unsigned = unsigned;
+ return result;
+ }
+ static fromStringStrict(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str.trim() !== str) {
+ throw new BSONError(`Input: '${str}' contains leading and/or trailing whitespace`);
+ }
+ if (!validateStringCharacters(str, radix)) {
+ throw new BSONError(`Input: '${str}' contains invalid characters for radix: ${radix}`);
+ }
+ const cleanedStr = removeLeadingZerosAndExplicitPlus(str);
+ const result = Long._fromString(cleanedStr, unsigned, radix);
+ if (result.toString(radix).toLowerCase() !== cleanedStr.toLowerCase()) {
+ throw new BSONError(`Input: ${str} is not representable as ${result.unsigned ? 'an unsigned' : 'a signed'} 64-bit Long ${radix != null ? `with radix: ${radix}` : ''}`);
+ }
+ return result;
+ }
+ static fromString(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str === 'NaN' && radix < 24) {
+ return Long.ZERO;
+ }
+ else if ((str === 'Infinity' || str === '+Infinity' || str === '-Infinity') && radix < 35) {
+ return Long.ZERO;
+ }
+ return Long._fromString(str, unsigned, radix);
+ }
+ static fromBytes(bytes, unsigned, le) {
+ return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
+ }
+ static fromBytesLE(bytes, unsigned) {
+ return new Long(bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24), bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24), unsigned);
+ }
+ static fromBytesBE(bytes, unsigned) {
+ return new Long((bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7], (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3], unsigned);
+ }
+ static isLong(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '__isLong__' in value &&
+ value.__isLong__ === true);
+ }
+ static fromValue(val, unsigned) {
+ if (typeof val === 'number')
+ return Long.fromNumber(val, unsigned);
+ if (typeof val === 'string')
+ return Long.fromString(val, unsigned);
+ return Long.fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);
+ }
+ add(addend) {
+ if (!Long.isLong(addend))
+ addend = Long.fromValue(addend);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = addend.high >>> 16;
+ const b32 = addend.high & 0xffff;
+ const b16 = addend.low >>> 16;
+ const b00 = addend.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 + b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ and(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low & other.low, this.high & other.high, this.unsigned);
+ }
+ compare(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.eq(other))
+ return 0;
+ const thisNeg = this.isNegative(), otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg)
+ return -1;
+ if (!thisNeg && otherNeg)
+ return 1;
+ if (!this.unsigned)
+ return this.sub(other).isNegative() ? -1 : 1;
+ return other.high >>> 0 > this.high >>> 0 ||
+ (other.high === this.high && other.low >>> 0 > this.low >>> 0)
+ ? -1
+ : 1;
+ }
+ comp(other) {
+ return this.compare(other);
+ }
+ divide(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (divisor.isZero())
+ throw new BSONError('division by zero');
+ if (wasm) {
+ if (!this.unsigned &&
+ this.high === -0x80000000 &&
+ divisor.low === -1 &&
+ divisor.high === -1) {
+ return this;
+ }
+ const low = (this.unsigned ? wasm.div_u : wasm.div_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (this.isZero())
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ let approx, rem, res;
+ if (!this.unsigned) {
+ if (this.eq(Long.MIN_VALUE)) {
+ if (divisor.eq(Long.ONE) || divisor.eq(Long.NEG_ONE))
+ return Long.MIN_VALUE;
+ else if (divisor.eq(Long.MIN_VALUE))
+ return Long.ONE;
+ else {
+ const halfThis = this.shr(1);
+ approx = halfThis.div(divisor).shl(1);
+ if (approx.eq(Long.ZERO)) {
+ return divisor.isNegative() ? Long.ONE : Long.NEG_ONE;
+ }
+ else {
+ rem = this.sub(divisor.mul(approx));
+ res = approx.add(rem.div(divisor));
+ return res;
+ }
+ }
+ }
+ else if (divisor.eq(Long.MIN_VALUE))
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ if (this.isNegative()) {
+ if (divisor.isNegative())
+ return this.neg().div(divisor.neg());
+ return this.neg().div(divisor).neg();
+ }
+ else if (divisor.isNegative())
+ return this.div(divisor.neg()).neg();
+ res = Long.ZERO;
+ }
+ else {
+ if (!divisor.unsigned)
+ divisor = divisor.toUnsigned();
+ if (divisor.gt(this))
+ return Long.UZERO;
+ if (divisor.gt(this.shru(1)))
+ return Long.UONE;
+ res = Long.UZERO;
+ }
+ rem = this;
+ while (rem.gte(divisor)) {
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
+ const log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ const delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
+ let approxRes = Long.fromNumber(approx);
+ let approxRem = approxRes.mul(divisor);
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx, this.unsigned);
+ approxRem = approxRes.mul(divisor);
+ }
+ if (approxRes.isZero())
+ approxRes = Long.ONE;
+ res = res.add(approxRes);
+ rem = rem.sub(approxRem);
+ }
+ return res;
+ }
+ div(divisor) {
+ return this.divide(divisor);
+ }
+ equals(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
+ return false;
+ return this.high === other.high && this.low === other.low;
+ }
+ eq(other) {
+ return this.equals(other);
+ }
+ getHighBits() {
+ return this.high;
+ }
+ getHighBitsUnsigned() {
+ return this.high >>> 0;
+ }
+ getLowBits() {
+ return this.low;
+ }
+ getLowBitsUnsigned() {
+ return this.low >>> 0;
+ }
+ getNumBitsAbs() {
+ if (this.isNegative()) {
+ return this.eq(Long.MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
+ }
+ const val = this.high !== 0 ? this.high : this.low;
+ let bit;
+ for (bit = 31; bit > 0; bit--)
+ if ((val & (1 << bit)) !== 0)
+ break;
+ return this.high !== 0 ? bit + 33 : bit + 1;
+ }
+ greaterThan(other) {
+ return this.comp(other) > 0;
+ }
+ gt(other) {
+ return this.greaterThan(other);
+ }
+ greaterThanOrEqual(other) {
+ return this.comp(other) >= 0;
+ }
+ gte(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ ge(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ isEven() {
+ return (this.low & 1) === 0;
+ }
+ isNegative() {
+ return !this.unsigned && this.high < 0;
+ }
+ isOdd() {
+ return (this.low & 1) === 1;
+ }
+ isPositive() {
+ return this.unsigned || this.high >= 0;
+ }
+ isZero() {
+ return this.high === 0 && this.low === 0;
+ }
+ lessThan(other) {
+ return this.comp(other) < 0;
+ }
+ lt(other) {
+ return this.lessThan(other);
+ }
+ lessThanOrEqual(other) {
+ return this.comp(other) <= 0;
+ }
+ lte(other) {
+ return this.lessThanOrEqual(other);
+ }
+ modulo(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (wasm) {
+ const low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ return this.sub(this.div(divisor).mul(divisor));
+ }
+ mod(divisor) {
+ return this.modulo(divisor);
+ }
+ rem(divisor) {
+ return this.modulo(divisor);
+ }
+ multiply(multiplier) {
+ if (this.isZero())
+ return Long.ZERO;
+ if (!Long.isLong(multiplier))
+ multiplier = Long.fromValue(multiplier);
+ if (wasm) {
+ const low = wasm.mul(this.low, this.high, multiplier.low, multiplier.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (multiplier.isZero())
+ return Long.ZERO;
+ if (this.eq(Long.MIN_VALUE))
+ return multiplier.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (multiplier.eq(Long.MIN_VALUE))
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (this.isNegative()) {
+ if (multiplier.isNegative())
+ return this.neg().mul(multiplier.neg());
+ else
+ return this.neg().mul(multiplier).neg();
+ }
+ else if (multiplier.isNegative())
+ return this.mul(multiplier.neg()).neg();
+ if (this.lt(Long.TWO_PWR_24) && multiplier.lt(Long.TWO_PWR_24))
+ return Long.fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = multiplier.high >>> 16;
+ const b32 = multiplier.high & 0xffff;
+ const b16 = multiplier.low >>> 16;
+ const b00 = multiplier.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ mul(multiplier) {
+ return this.multiply(multiplier);
+ }
+ negate() {
+ if (!this.unsigned && this.eq(Long.MIN_VALUE))
+ return Long.MIN_VALUE;
+ return this.not().add(Long.ONE);
+ }
+ neg() {
+ return this.negate();
+ }
+ not() {
+ return Long.fromBits(~this.low, ~this.high, this.unsigned);
+ }
+ notEquals(other) {
+ return !this.equals(other);
+ }
+ neq(other) {
+ return this.notEquals(other);
+ }
+ ne(other) {
+ return this.notEquals(other);
+ }
+ or(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low | other.low, this.high | other.high, this.unsigned);
+ }
+ shiftLeft(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);
+ else
+ return Long.fromBits(0, this.low << (numBits - 32), this.unsigned);
+ }
+ shl(numBits) {
+ return this.shiftLeft(numBits);
+ }
+ shiftRight(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);
+ else
+ return Long.fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);
+ }
+ shr(numBits) {
+ return this.shiftRight(numBits);
+ }
+ shiftRightUnsigned(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ numBits &= 63;
+ if (numBits === 0)
+ return this;
+ else {
+ const high = this.high;
+ if (numBits < 32) {
+ const low = this.low;
+ return Long.fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);
+ }
+ else if (numBits === 32)
+ return Long.fromBits(high, 0, this.unsigned);
+ else
+ return Long.fromBits(high >>> (numBits - 32), 0, this.unsigned);
+ }
+ }
+ shr_u(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ shru(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ subtract(subtrahend) {
+ if (!Long.isLong(subtrahend))
+ subtrahend = Long.fromValue(subtrahend);
+ return this.add(subtrahend.neg());
+ }
+ sub(subtrahend) {
+ return this.subtract(subtrahend);
+ }
+ toInt() {
+ return this.unsigned ? this.low >>> 0 : this.low;
+ }
+ toNumber() {
+ if (this.unsigned)
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
+ }
+ toBigInt() {
+ return BigInt(this.toString());
+ }
+ toBytes(le) {
+ return le ? this.toBytesLE() : this.toBytesBE();
+ }
+ toBytesLE() {
+ const hi = this.high, lo = this.low;
+ return [
+ lo & 0xff,
+ (lo >>> 8) & 0xff,
+ (lo >>> 16) & 0xff,
+ lo >>> 24,
+ hi & 0xff,
+ (hi >>> 8) & 0xff,
+ (hi >>> 16) & 0xff,
+ hi >>> 24
+ ];
+ }
+ toBytesBE() {
+ const hi = this.high, lo = this.low;
+ return [
+ hi >>> 24,
+ (hi >>> 16) & 0xff,
+ (hi >>> 8) & 0xff,
+ hi & 0xff,
+ lo >>> 24,
+ (lo >>> 16) & 0xff,
+ (lo >>> 8) & 0xff,
+ lo & 0xff
+ ];
+ }
+ toSigned() {
+ if (!this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, false);
+ }
+ toString(radix) {
+ radix = radix || 10;
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ if (this.isZero())
+ return '0';
+ if (this.isNegative()) {
+ if (this.eq(Long.MIN_VALUE)) {
+ const radixLong = Long.fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
+ return div.toString(radix) + rem1.toInt().toString(radix);
+ }
+ else
+ return '-' + this.neg().toString(radix);
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 6), this.unsigned);
+ let rem = this;
+ let result = '';
+ while (true) {
+ const remDiv = rem.div(radixToPower);
+ const intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0;
+ let digits = intval.toString(radix);
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ }
+ else {
+ while (digits.length < 6)
+ digits = '0' + digits;
+ result = '' + digits + result;
+ }
+ }
+ }
+ toUnsigned() {
+ if (this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, true);
+ }
+ xor(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
+ }
+ eqz() {
+ return this.isZero();
+ }
+ le(other) {
+ return this.lessThanOrEqual(other);
+ }
+ toExtendedJSON(options) {
+ if (options && options.relaxed)
+ return this.toNumber();
+ return { $numberLong: this.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ const { useBigInt64 = false, relaxed = true } = { ...options };
+ if (doc.$numberLong.length > MAX_INT64_STRING_LENGTH) {
+ throw new BSONError('$numberLong string is too long');
+ }
+ if (!DECIMAL_REG_EX.test(doc.$numberLong)) {
+ throw new BSONError(`$numberLong string "${doc.$numberLong}" is in an invalid format`);
+ }
+ if (useBigInt64) {
+ const bigIntResult = BigInt(doc.$numberLong);
+ return BigInt.asIntN(64, bigIntResult);
+ }
+ const longResult = Long.fromString(doc.$numberLong);
+ if (relaxed) {
+ return longResult.toNumber();
+ }
+ return longResult;
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const longVal = inspect(this.toString(), options);
+ const unsignedVal = this.unsigned ? `, ${inspect(this.unsigned, options)}` : '';
+ return `new Long(${longVal}${unsignedVal})`;
+ }
+}
+Long.TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
+Long.MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
+Long.ZERO = Long.fromInt(0);
+Long.UZERO = Long.fromInt(0, true);
+Long.ONE = Long.fromInt(1);
+Long.UONE = Long.fromInt(1, true);
+Long.NEG_ONE = Long.fromInt(-1);
+Long.MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
+Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
+
+const PARSE_STRING_REGEXP = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/;
+const PARSE_INF_REGEXP = /^(\+|-)?(Infinity|inf)$/i;
+const PARSE_NAN_REGEXP = /^(\+|-)?NaN$/i;
+const EXPONENT_MAX = 6111;
+const EXPONENT_MIN = -6176;
+const EXPONENT_BIAS = 6176;
+const MAX_DIGITS = 34;
+const NAN_BUFFER = ByteUtils.fromNumberArray([
+ 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_NEGATIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_POSITIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const EXPONENT_REGEX = /^([-+])?(\d+)?$/;
+const COMBINATION_MASK = 0x1f;
+const EXPONENT_MASK = 0x3fff;
+const COMBINATION_INFINITY = 30;
+const COMBINATION_NAN = 31;
+function isDigit(value) {
+ return !isNaN(parseInt(value, 10));
+}
+function divideu128(value) {
+ const DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ let _rem = Long.fromNumber(0);
+ if (!value.parts[0] && !value.parts[1] && !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+ for (let i = 0; i <= 3; i++) {
+ _rem = _rem.shiftLeft(32);
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low;
+ _rem = _rem.modulo(DIVISOR);
+ }
+ return { quotient: value, rem: _rem };
+}
+function multiply64x2(left, right) {
+ if (!left && !right) {
+ return { high: Long.fromNumber(0), low: Long.fromNumber(0) };
+ }
+ const leftHigh = left.shiftRightUnsigned(32);
+ const leftLow = new Long(left.getLowBits(), 0);
+ const rightHigh = right.shiftRightUnsigned(32);
+ const rightLow = new Long(right.getLowBits(), 0);
+ let productHigh = leftHigh.multiply(rightHigh);
+ let productMid = leftHigh.multiply(rightLow);
+ const productMid2 = leftLow.multiply(rightHigh);
+ let productLow = leftLow.multiply(rightLow);
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0)
+ .add(productMid2)
+ .add(productLow.shiftRightUnsigned(32));
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+ return { high: productHigh, low: productLow };
+}
+function lessThan(left, right) {
+ const uhleft = left.high >>> 0;
+ const uhright = right.high >>> 0;
+ if (uhleft < uhright) {
+ return true;
+ }
+ else if (uhleft === uhright) {
+ const ulleft = left.low >>> 0;
+ const ulright = right.low >>> 0;
+ if (ulleft < ulright)
+ return true;
+ }
+ return false;
+}
+function invalidErr(string, message) {
+ throw new BSONError(`"${string}" is not a valid Decimal128 string - ${message}`);
+}
+class Decimal128 extends BSONValue {
+ get _bsontype() {
+ return 'Decimal128';
+ }
+ constructor(bytes) {
+ super();
+ if (typeof bytes === 'string') {
+ this.bytes = Decimal128.fromString(bytes).bytes;
+ }
+ else if (isUint8Array(bytes)) {
+ if (bytes.byteLength !== 16) {
+ throw new BSONError('Decimal128 must take a Buffer of 16 bytes');
+ }
+ this.bytes = bytes;
+ }
+ else {
+ throw new BSONError('Decimal128 must take a Buffer or string');
+ }
+ }
+ static fromString(representation) {
+ return Decimal128._fromString(representation, { allowRounding: false });
+ }
+ static fromStringWithRounding(representation) {
+ return Decimal128._fromString(representation, { allowRounding: true });
+ }
+ static _fromString(representation, options) {
+ let isNegative = false;
+ let sawSign = false;
+ let sawRadix = false;
+ let foundNonZero = false;
+ let significantDigits = 0;
+ let nDigitsRead = 0;
+ let nDigits = 0;
+ let radixPosition = 0;
+ let firstNonZero = 0;
+ const digits = [0];
+ let nDigitsStored = 0;
+ let digitsInsert = 0;
+ let lastDigit = 0;
+ let exponent = 0;
+ let significandHigh = new Long(0, 0);
+ let significandLow = new Long(0, 0);
+ let biasedExponent = 0;
+ let index = 0;
+ if (representation.length >= 7000) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ const stringMatch = representation.match(PARSE_STRING_REGEXP);
+ const infMatch = representation.match(PARSE_INF_REGEXP);
+ const nanMatch = representation.match(PARSE_NAN_REGEXP);
+ if ((!stringMatch && !infMatch && !nanMatch) || representation.length === 0) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ if (stringMatch) {
+ const unsignedNumber = stringMatch[2];
+ const e = stringMatch[4];
+ const expSign = stringMatch[5];
+ const expNumber = stringMatch[6];
+ if (e && expNumber === undefined)
+ invalidErr(representation, 'missing exponent power');
+ if (e && unsignedNumber === undefined)
+ invalidErr(representation, 'missing exponent base');
+ if (e === undefined && (expSign || expNumber)) {
+ invalidErr(representation, 'missing e before exponent');
+ }
+ }
+ if (representation[index] === '+' || representation[index] === '-') {
+ sawSign = true;
+ isNegative = representation[index++] === '-';
+ }
+ if (!isDigit(representation[index]) && representation[index] !== '.') {
+ if (representation[index] === 'i' || representation[index] === 'I') {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ else if (representation[index] === 'N') {
+ return new Decimal128(NAN_BUFFER);
+ }
+ }
+ while (isDigit(representation[index]) || representation[index] === '.') {
+ if (representation[index] === '.') {
+ if (sawRadix)
+ invalidErr(representation, 'contains multiple periods');
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+ if (nDigitsStored < MAX_DIGITS) {
+ if (representation[index] !== '0' || foundNonZero) {
+ if (!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+ foundNonZero = true;
+ digits[digitsInsert++] = parseInt(representation[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+ if (foundNonZero)
+ nDigits = nDigits + 1;
+ if (sawRadix)
+ radixPosition = radixPosition + 1;
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+ if (sawRadix && !nDigitsRead)
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ if (representation[index] === 'e' || representation[index] === 'E') {
+ const match = representation.substr(++index).match(EXPONENT_REGEX);
+ if (!match || !match[2])
+ return new Decimal128(NAN_BUFFER);
+ exponent = parseInt(match[0], 10);
+ index = index + match[0].length;
+ }
+ if (representation[index])
+ return new Decimal128(NAN_BUFFER);
+ if (!nDigitsStored) {
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ }
+ else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+ if (significantDigits !== 1) {
+ while (representation[firstNonZero + significantDigits - 1 + Number(sawSign) + Number(sawRadix)] === '0') {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+ if (exponent <= radixPosition && radixPosition > exponent + (1 << 14)) {
+ exponent = EXPONENT_MIN;
+ }
+ else {
+ exponent = exponent - radixPosition;
+ }
+ while (exponent > EXPONENT_MAX) {
+ lastDigit = lastDigit + 1;
+ if (lastDigit >= MAX_DIGITS) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ exponent = exponent - 1;
+ }
+ if (options.allowRounding) {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0 && significantDigits < nDigitsStored) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+ if (nDigitsStored < nDigits) {
+ nDigits = nDigits - 1;
+ }
+ else {
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ const digitsString = digits.join('');
+ if (digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ let endOfString = nDigitsRead;
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ let roundBit = 0;
+ if (roundDigit >= 5) {
+ roundBit = 1;
+ if (roundDigit === 5) {
+ roundBit = digits[lastDigit] % 2 === 1 ? 1 : 0;
+ for (let i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if (parseInt(representation[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+ if (roundBit) {
+ let dIdx = lastDigit;
+ for (; dIdx >= 0; dIdx--) {
+ if (++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+ if (dIdx === 0) {
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ }
+ else {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ }
+ }
+ else {
+ break;
+ }
+ }
+ }
+ }
+ }
+ else {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MIN;
+ break;
+ }
+ invalidErr(representation, 'exponent underflow');
+ }
+ if (nDigitsStored < nDigits) {
+ if (representation[nDigits - 1 + Number(sawSign) + Number(sawRadix)] !== '0' &&
+ significantDigits !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ nDigits = nDigits - 1;
+ }
+ else {
+ if (digits[lastDigit] !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ if (roundDigit !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ }
+ }
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ if (significantDigits === 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ }
+ else if (lastDigit < 17) {
+ let dIdx = 0;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ else {
+ let dIdx = 0;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ const significand = multiply64x2(significandHigh, Long.fromString('100000000000000000'));
+ significand.low = significand.low.add(significandLow);
+ if (lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+ biasedExponent = exponent + EXPONENT_BIAS;
+ const dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+ if (significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber(1))) {
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47)));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ }
+ else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+ dec.low = significand.low;
+ if (isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+ const buffer = ByteUtils.allocateUnsafe(16);
+ index = 0;
+ buffer[index++] = dec.low.low & 0xff;
+ buffer[index++] = (dec.low.low >> 8) & 0xff;
+ buffer[index++] = (dec.low.low >> 16) & 0xff;
+ buffer[index++] = (dec.low.low >> 24) & 0xff;
+ buffer[index++] = dec.low.high & 0xff;
+ buffer[index++] = (dec.low.high >> 8) & 0xff;
+ buffer[index++] = (dec.low.high >> 16) & 0xff;
+ buffer[index++] = (dec.low.high >> 24) & 0xff;
+ buffer[index++] = dec.high.low & 0xff;
+ buffer[index++] = (dec.high.low >> 8) & 0xff;
+ buffer[index++] = (dec.high.low >> 16) & 0xff;
+ buffer[index++] = (dec.high.low >> 24) & 0xff;
+ buffer[index++] = dec.high.high & 0xff;
+ buffer[index++] = (dec.high.high >> 8) & 0xff;
+ buffer[index++] = (dec.high.high >> 16) & 0xff;
+ buffer[index++] = (dec.high.high >> 24) & 0xff;
+ return new Decimal128(buffer);
+ }
+ toString() {
+ let biased_exponent;
+ let significand_digits = 0;
+ const significand = new Array(36);
+ for (let i = 0; i < significand.length; i++)
+ significand[i] = 0;
+ let index = 0;
+ let is_zero = false;
+ let significand_msb;
+ let significand128 = { parts: [0, 0, 0, 0] };
+ let j, k;
+ const string = [];
+ index = 0;
+ const buffer = this.bytes;
+ const low = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midl = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midh = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const high = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ index = 0;
+ const dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high)
+ };
+ if (dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+ const combination = (high >> 26) & COMBINATION_MASK;
+ if (combination >> 3 === 3) {
+ if (combination === COMBINATION_INFINITY) {
+ return string.join('') + 'Infinity';
+ }
+ else if (combination === COMBINATION_NAN) {
+ return 'NaN';
+ }
+ else {
+ biased_exponent = (high >> 15) & EXPONENT_MASK;
+ significand_msb = 0x08 + ((high >> 14) & 0x01);
+ }
+ }
+ else {
+ significand_msb = (high >> 14) & 0x07;
+ biased_exponent = (high >> 17) & EXPONENT_MASK;
+ }
+ const exponent = biased_exponent - EXPONENT_BIAS;
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+ if (significand128.parts[0] === 0 &&
+ significand128.parts[1] === 0 &&
+ significand128.parts[2] === 0 &&
+ significand128.parts[3] === 0) {
+ is_zero = true;
+ }
+ else {
+ for (k = 3; k >= 0; k--) {
+ let least_digits = 0;
+ const result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low;
+ if (!least_digits)
+ continue;
+ for (j = 8; j >= 0; j--) {
+ significand[k * 9 + j] = least_digits % 10;
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+ if (is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ }
+ else {
+ significand_digits = 36;
+ while (!significand[index]) {
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+ const scientific_exponent = significand_digits - 1 + exponent;
+ if (scientific_exponent >= 34 || scientific_exponent <= -7 || exponent > 0) {
+ if (significand_digits > 34) {
+ string.push(`${0}`);
+ if (exponent > 0)
+ string.push(`E+${exponent}`);
+ else if (exponent < 0)
+ string.push(`E${exponent}`);
+ return string.join('');
+ }
+ string.push(`${significand[index++]}`);
+ significand_digits = significand_digits - 1;
+ if (significand_digits) {
+ string.push('.');
+ }
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ string.push('E');
+ if (scientific_exponent > 0) {
+ string.push(`+${scientific_exponent}`);
+ }
+ else {
+ string.push(`${scientific_exponent}`);
+ }
+ }
+ else {
+ if (exponent >= 0) {
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ let radix_position = significand_digits + exponent;
+ if (radix_position > 0) {
+ for (let i = 0; i < radix_position; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ string.push('0');
+ }
+ string.push('.');
+ while (radix_position++ < 0) {
+ string.push('0');
+ }
+ for (let i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ }
+ return string.join('');
+ }
+ toJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ toExtendedJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ static fromExtendedJSON(doc) {
+ return Decimal128.fromString(doc.$numberDecimal);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const d128string = inspect(this.toString(), options);
+ return `new Decimal128(${d128string})`;
+ }
+}
+
+class Double extends BSONValue {
+ get _bsontype() {
+ return 'Double';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value;
+ }
+ static fromString(value) {
+ const coercedValue = Number(value);
+ if (value === 'NaN')
+ return new Double(NaN);
+ if (value === 'Infinity')
+ return new Double(Infinity);
+ if (value === '-Infinity')
+ return new Double(-Infinity);
+ if (!Number.isFinite(coercedValue)) {
+ throw new BSONError(`Input: ${value} is not representable as a Double`);
+ }
+ if (value.trim() !== value) {
+ throw new BSONError(`Input: '${value}' contains whitespace`);
+ }
+ if (value === '') {
+ throw new BSONError(`Input is an empty string`);
+ }
+ if (/[^-0-9.+eE]/.test(value)) {
+ throw new BSONError(`Input: '${value}' is not in decimal or exponential notation`);
+ }
+ return new Double(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toExtendedJSON(options) {
+ if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
+ return this.value;
+ }
+ if (Object.is(Math.sign(this.value), -0)) {
+ return { $numberDouble: '-0.0' };
+ }
+ return {
+ $numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
+ };
+ }
+ static fromExtendedJSON(doc, options) {
+ const doubleValue = parseFloat(doc.$numberDouble);
+ return options && options.relaxed ? doubleValue : new Double(doubleValue);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Double(${inspect(this.value, options)})`;
+ }
+}
+
+class Int32 extends BSONValue {
+ get _bsontype() {
+ return 'Int32';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value | 0;
+ }
+ static fromString(value) {
+ const cleanedValue = removeLeadingZerosAndExplicitPlus(value);
+ const coercedValue = Number(value);
+ if (BSON_INT32_MAX < coercedValue) {
+ throw new BSONError(`Input: '${value}' is larger than the maximum value for Int32`);
+ }
+ else if (BSON_INT32_MIN > coercedValue) {
+ throw new BSONError(`Input: '${value}' is smaller than the minimum value for Int32`);
+ }
+ else if (!Number.isSafeInteger(coercedValue)) {
+ throw new BSONError(`Input: '${value}' is not a safe integer`);
+ }
+ else if (coercedValue.toString() !== cleanedValue) {
+ throw new BSONError(`Input: '${value}' is not a valid Int32 string`);
+ }
+ return new Int32(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON(options) {
+ if (options && (options.relaxed || options.legacy))
+ return this.value;
+ return { $numberInt: this.value.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ return options && options.relaxed ? parseInt(doc.$numberInt, 10) : new Int32(doc.$numberInt);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Int32(${inspect(this.value, options)})`;
+ }
+}
+
+class MaxKey extends BSONValue {
+ get _bsontype() {
+ return 'MaxKey';
+ }
+ toExtendedJSON() {
+ return { $maxKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MaxKey();
+ }
+ inspect() {
+ return 'new MaxKey()';
+ }
+}
+
+class MinKey extends BSONValue {
+ get _bsontype() {
+ return 'MinKey';
+ }
+ toExtendedJSON() {
+ return { $minKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MinKey();
+ }
+ inspect() {
+ return 'new MinKey()';
+ }
+}
+
+const FLOAT = new Float64Array(1);
+const FLOAT_BYTES = new Uint8Array(FLOAT.buffer, 0, 8);
+FLOAT[0] = -1;
+const isBigEndian = FLOAT_BYTES[7] === 0;
+const NumberUtils = {
+ getNonnegativeInt32LE(source, offset) {
+ if (source[offset + 3] > 127) {
+ throw new RangeError(`Size cannot be negative at offset: ${offset}`);
+ }
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getInt32LE(source, offset) {
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getUint32LE(source, offset) {
+ return (source[offset] +
+ source[offset + 1] * 256 +
+ source[offset + 2] * 65536 +
+ source[offset + 3] * 16777216);
+ },
+ getUint32BE(source, offset) {
+ return (source[offset + 3] +
+ source[offset + 2] * 256 +
+ source[offset + 1] * 65536 +
+ source[offset] * 16777216);
+ },
+ getBigInt64LE(source, offset) {
+ const lo = NumberUtils.getUint32LE(source, offset);
+ const hi = NumberUtils.getUint32LE(source, offset + 4);
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo);
+ },
+ getFloat64LE: isBigEndian
+ ? (source, offset) => {
+ FLOAT_BYTES[7] = source[offset];
+ FLOAT_BYTES[6] = source[offset + 1];
+ FLOAT_BYTES[5] = source[offset + 2];
+ FLOAT_BYTES[4] = source[offset + 3];
+ FLOAT_BYTES[3] = source[offset + 4];
+ FLOAT_BYTES[2] = source[offset + 5];
+ FLOAT_BYTES[1] = source[offset + 6];
+ FLOAT_BYTES[0] = source[offset + 7];
+ return FLOAT[0];
+ }
+ : (source, offset) => {
+ FLOAT_BYTES[0] = source[offset];
+ FLOAT_BYTES[1] = source[offset + 1];
+ FLOAT_BYTES[2] = source[offset + 2];
+ FLOAT_BYTES[3] = source[offset + 3];
+ FLOAT_BYTES[4] = source[offset + 4];
+ FLOAT_BYTES[5] = source[offset + 5];
+ FLOAT_BYTES[6] = source[offset + 6];
+ FLOAT_BYTES[7] = source[offset + 7];
+ return FLOAT[0];
+ },
+ setInt32BE(destination, offset, value) {
+ destination[offset + 3] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset] = value;
+ return 4;
+ },
+ setInt32LE(destination, offset, value) {
+ destination[offset] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 3] = value;
+ return 4;
+ },
+ setBigInt64LE(destination, offset, value) {
+ const mask32bits = BigInt(4294967295);
+ let lo = Number(value & mask32bits);
+ destination[offset] = lo;
+ lo >>= 8;
+ destination[offset + 1] = lo;
+ lo >>= 8;
+ destination[offset + 2] = lo;
+ lo >>= 8;
+ destination[offset + 3] = lo;
+ let hi = Number((value >> BigInt(32)) & mask32bits);
+ destination[offset + 4] = hi;
+ hi >>= 8;
+ destination[offset + 5] = hi;
+ hi >>= 8;
+ destination[offset + 6] = hi;
+ hi >>= 8;
+ destination[offset + 7] = hi;
+ return 8;
+ },
+ setFloat64LE: isBigEndian
+ ? (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[7];
+ destination[offset + 1] = FLOAT_BYTES[6];
+ destination[offset + 2] = FLOAT_BYTES[5];
+ destination[offset + 3] = FLOAT_BYTES[4];
+ destination[offset + 4] = FLOAT_BYTES[3];
+ destination[offset + 5] = FLOAT_BYTES[2];
+ destination[offset + 6] = FLOAT_BYTES[1];
+ destination[offset + 7] = FLOAT_BYTES[0];
+ return 8;
+ }
+ : (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[0];
+ destination[offset + 1] = FLOAT_BYTES[1];
+ destination[offset + 2] = FLOAT_BYTES[2];
+ destination[offset + 3] = FLOAT_BYTES[3];
+ destination[offset + 4] = FLOAT_BYTES[4];
+ destination[offset + 5] = FLOAT_BYTES[5];
+ destination[offset + 6] = FLOAT_BYTES[6];
+ destination[offset + 7] = FLOAT_BYTES[7];
+ return 8;
+ }
+};
+
+const checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');
+let PROCESS_UNIQUE = null;
+class ObjectId extends BSONValue {
+ get _bsontype() {
+ return 'ObjectId';
+ }
+ constructor(inputId) {
+ super();
+ let workingId;
+ if (typeof inputId === 'object' && inputId && 'id' in inputId) {
+ if (typeof inputId.id !== 'string' && !ArrayBuffer.isView(inputId.id)) {
+ throw new BSONError('Argument passed in must have an id that is of type string or Buffer');
+ }
+ if ('toHexString' in inputId && typeof inputId.toHexString === 'function') {
+ workingId = ByteUtils.fromHex(inputId.toHexString());
+ }
+ else {
+ workingId = inputId.id;
+ }
+ }
+ else {
+ workingId = inputId;
+ }
+ if (workingId == null || typeof workingId === 'number') {
+ this.buffer = ObjectId.generate(typeof workingId === 'number' ? workingId : undefined);
+ }
+ else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
+ this.buffer = ByteUtils.toLocalBufferType(workingId);
+ }
+ else if (typeof workingId === 'string') {
+ if (workingId.length === 24 && checkForHexRegExp.test(workingId)) {
+ this.buffer = ByteUtils.fromHex(workingId);
+ }
+ else {
+ throw new BSONError('input must be a 24 character hex string, 12 byte Uint8Array, or an integer');
+ }
+ }
+ else {
+ throw new BSONError('Argument passed in does not match the accepted types');
+ }
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(this.id);
+ }
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(value);
+ }
+ }
+ toHexString() {
+ if (ObjectId.cacheHexString && this.__id) {
+ return this.__id;
+ }
+ const hexString = ByteUtils.toHex(this.id);
+ if (ObjectId.cacheHexString && !this.__id) {
+ this.__id = hexString;
+ }
+ return hexString;
+ }
+ static getInc() {
+ return (ObjectId.index = (ObjectId.index + 1) % 0xffffff);
+ }
+ static generate(time) {
+ if ('number' !== typeof time) {
+ time = Math.floor(Date.now() / 1000);
+ }
+ const inc = ObjectId.getInc();
+ const buffer = ByteUtils.allocateUnsafe(12);
+ NumberUtils.setInt32BE(buffer, 0, time);
+ if (PROCESS_UNIQUE === null) {
+ PROCESS_UNIQUE = ByteUtils.randomBytes(5);
+ }
+ buffer[4] = PROCESS_UNIQUE[0];
+ buffer[5] = PROCESS_UNIQUE[1];
+ buffer[6] = PROCESS_UNIQUE[2];
+ buffer[7] = PROCESS_UNIQUE[3];
+ buffer[8] = PROCESS_UNIQUE[4];
+ buffer[11] = inc & 0xff;
+ buffer[10] = (inc >> 8) & 0xff;
+ buffer[9] = (inc >> 16) & 0xff;
+ return buffer;
+ }
+ toString(encoding) {
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ if (encoding === 'hex')
+ return this.toHexString();
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ static is(variable) {
+ return (variable != null &&
+ typeof variable === 'object' &&
+ '_bsontype' in variable &&
+ variable._bsontype === 'ObjectId');
+ }
+ equals(otherId) {
+ if (otherId === undefined || otherId === null) {
+ return false;
+ }
+ if (ObjectId.is(otherId)) {
+ return (this.buffer[11] === otherId.buffer[11] && ByteUtils.equals(this.buffer, otherId.buffer));
+ }
+ if (typeof otherId === 'string') {
+ return otherId.toLowerCase() === this.toHexString();
+ }
+ if (typeof otherId === 'object' && typeof otherId.toHexString === 'function') {
+ const otherIdString = otherId.toHexString();
+ const thisIdString = this.toHexString();
+ return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
+ }
+ return false;
+ }
+ getTimestamp() {
+ const timestamp = new Date();
+ const time = NumberUtils.getUint32BE(this.buffer, 0);
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+ }
+ static createPk() {
+ return new ObjectId();
+ }
+ serializeInto(uint8array, index) {
+ uint8array[index] = this.buffer[0];
+ uint8array[index + 1] = this.buffer[1];
+ uint8array[index + 2] = this.buffer[2];
+ uint8array[index + 3] = this.buffer[3];
+ uint8array[index + 4] = this.buffer[4];
+ uint8array[index + 5] = this.buffer[5];
+ uint8array[index + 6] = this.buffer[6];
+ uint8array[index + 7] = this.buffer[7];
+ uint8array[index + 8] = this.buffer[8];
+ uint8array[index + 9] = this.buffer[9];
+ uint8array[index + 10] = this.buffer[10];
+ uint8array[index + 11] = this.buffer[11];
+ return 12;
+ }
+ static createFromTime(time) {
+ const buffer = ByteUtils.allocate(12);
+ for (let i = 11; i >= 4; i--)
+ buffer[i] = 0;
+ NumberUtils.setInt32BE(buffer, 0, time);
+ return new ObjectId(buffer);
+ }
+ static createFromHexString(hexString) {
+ if (hexString?.length !== 24) {
+ throw new BSONError('hex string must be 24 characters');
+ }
+ return new ObjectId(ByteUtils.fromHex(hexString));
+ }
+ static createFromBase64(base64) {
+ if (base64?.length !== 16) {
+ throw new BSONError('base64 string must be 16 characters');
+ }
+ return new ObjectId(ByteUtils.fromBase64(base64));
+ }
+ static isValid(id) {
+ if (id == null)
+ return false;
+ try {
+ new ObjectId(id);
+ return true;
+ }
+ catch {
+ return false;
+ }
+ }
+ toExtendedJSON() {
+ if (this.toHexString)
+ return { $oid: this.toHexString() };
+ return { $oid: this.toString('hex') };
+ }
+ static fromExtendedJSON(doc) {
+ return new ObjectId(doc.$oid);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new ObjectId(${inspect(this.toHexString(), options)})`;
+ }
+}
+ObjectId.index = Math.floor(Math.random() * 0xffffff);
+
+function internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined) {
+ let totalLength = 4 + 1;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions, true, ignoreUndefined);
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ }
+ for (const key of Object.keys(object)) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined);
+ }
+ }
+ return totalLength;
+}
+function calculateElement(name, value, serializeFunctions = false, isArray = false, ignoreUndefined = false) {
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ switch (typeof value) {
+ case 'string':
+ return 1 + ByteUtils.utf8ByteLength(name) + 1 + 4 + ByteUtils.utf8ByteLength(value) + 1;
+ case 'number':
+ if (Math.floor(value) === value &&
+ value >= JS_INT_MIN &&
+ value <= JS_INT_MAX) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (4 + 1);
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if (isArray || !ignoreUndefined)
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ return 0;
+ case 'boolean':
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 1);
+ case 'object':
+ if (value != null &&
+ typeof value._bsontype === 'string' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value == null || value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ }
+ else if (value._bsontype === 'ObjectId') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (12 + 1);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (ArrayBuffer.isView(value) ||
+ value instanceof ArrayBuffer ||
+ isAnyArrayBuffer(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 4 + 1) + value.byteLength);
+ }
+ else if (value._bsontype === 'Long' ||
+ value._bsontype === 'Double' ||
+ value._bsontype === 'Timestamp') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (16 + 1);
+ }
+ else if (value._bsontype === 'Code') {
+ if (value.scope != null && Object.keys(value.scope).length > 0) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1 +
+ internalCalculateObjectSize(value.scope, serializeFunctions, ignoreUndefined));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1);
+ }
+ }
+ else if (value._bsontype === 'Binary') {
+ const binary = value;
+ if (binary.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ (binary.position + 1 + 4 + 1 + 4));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (binary.position + 1 + 4 + 1));
+ }
+ }
+ else if (value._bsontype === 'Symbol') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ ByteUtils.utf8ByteLength(value.value) +
+ 4 +
+ 1 +
+ 1);
+ }
+ else if (value._bsontype === 'DBRef') {
+ const ordered_values = Object.assign({
+ $ref: value.collection,
+ $id: value.oid
+ }, value.fields);
+ if (value.db != null) {
+ ordered_values['$db'] = value.db;
+ }
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ internalCalculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined));
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.source) +
+ 1 +
+ (value.global ? 1 : 0) +
+ (value.ignoreCase ? 1 : 0) +
+ (value.multiline ? 1 : 0) +
+ 1);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.pattern) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.options) +
+ 1);
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ internalCalculateObjectSize(value, serializeFunctions, ignoreUndefined) +
+ 1);
+ }
+ case 'function':
+ if (serializeFunctions) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.toString()) +
+ 1);
+ }
+ }
+ return 0;
+}
+
+function alphabetize(str) {
+ return str.split('').sort().join('');
+}
+class BSONRegExp extends BSONValue {
+ get _bsontype() {
+ return 'BSONRegExp';
+ }
+ constructor(pattern, options) {
+ super();
+ this.pattern = pattern;
+ this.options = alphabetize(options ?? '');
+ if (this.pattern.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);
+ }
+ if (this.options.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);
+ }
+ for (let i = 0; i < this.options.length; i++) {
+ if (!(this.options[i] === 'i' ||
+ this.options[i] === 'm' ||
+ this.options[i] === 'x' ||
+ this.options[i] === 'l' ||
+ this.options[i] === 's' ||
+ this.options[i] === 'u')) {
+ throw new BSONError(`The regular expression option [${this.options[i]}] is not supported`);
+ }
+ }
+ }
+ static parseOptions(options) {
+ return options ? options.split('').sort().join('') : '';
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ if (options.legacy) {
+ return { $regex: this.pattern, $options: this.options };
+ }
+ return { $regularExpression: { pattern: this.pattern, options: this.options } };
+ }
+ static fromExtendedJSON(doc) {
+ if ('$regex' in doc) {
+ if (typeof doc.$regex !== 'string') {
+ if (doc.$regex._bsontype === 'BSONRegExp') {
+ return doc;
+ }
+ }
+ else {
+ return new BSONRegExp(doc.$regex, BSONRegExp.parseOptions(doc.$options));
+ }
+ }
+ if ('$regularExpression' in doc) {
+ return new BSONRegExp(doc.$regularExpression.pattern, BSONRegExp.parseOptions(doc.$regularExpression.options));
+ }
+ throw new BSONError(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(doc)}`);
+ }
+ inspect(depth, options, inspect) {
+ const stylize = getStylizeFunction(options) ?? (v => v);
+ inspect ??= defaultInspect;
+ const pattern = stylize(inspect(this.pattern), 'regexp');
+ const flags = stylize(inspect(this.options), 'regexp');
+ return `new BSONRegExp(${pattern}, ${flags})`;
+ }
+}
+
+class BSONSymbol extends BSONValue {
+ get _bsontype() {
+ return 'BSONSymbol';
+ }
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON() {
+ return { $symbol: this.value };
+ }
+ static fromExtendedJSON(doc) {
+ return new BSONSymbol(doc.$symbol);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new BSONSymbol(${inspect(this.value, options)})`;
+ }
+}
+
+const LongWithoutOverridesClass = Long;
+class Timestamp extends LongWithoutOverridesClass {
+ get _bsontype() {
+ return 'Timestamp';
+ }
+ constructor(low) {
+ if (low == null) {
+ super(0, 0, true);
+ }
+ else if (typeof low === 'bigint') {
+ super(low, true);
+ }
+ else if (Long.isLong(low)) {
+ super(low.low, low.high, true);
+ }
+ else if (typeof low === 'object' && 't' in low && 'i' in low) {
+ if (typeof low.t !== 'number' && (typeof low.t !== 'object' || low.t._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t as a number');
+ }
+ if (typeof low.i !== 'number' && (typeof low.i !== 'object' || low.i._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i as a number');
+ }
+ const t = Number(low.t);
+ const i = Number(low.i);
+ if (t < 0 || Number.isNaN(t)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive t');
+ }
+ if (i < 0 || Number.isNaN(i)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive i');
+ }
+ if (t > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t equal or less than uint32 max');
+ }
+ if (i > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i equal or less than uint32 max');
+ }
+ super(i, t, true);
+ }
+ else {
+ throw new BSONError('A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }');
+ }
+ }
+ toJSON() {
+ return {
+ $timestamp: this.toString()
+ };
+ }
+ static fromInt(value) {
+ return new Timestamp(Long.fromInt(value, true));
+ }
+ static fromNumber(value) {
+ return new Timestamp(Long.fromNumber(value, true));
+ }
+ static fromBits(lowBits, highBits) {
+ return new Timestamp({ i: lowBits, t: highBits });
+ }
+ static fromString(str, optRadix) {
+ return new Timestamp(Long.fromString(str, true, optRadix));
+ }
+ toExtendedJSON() {
+ return { $timestamp: { t: this.high >>> 0, i: this.low >>> 0 } };
+ }
+ static fromExtendedJSON(doc) {
+ const i = Long.isLong(doc.$timestamp.i)
+ ? doc.$timestamp.i.getLowBitsUnsigned()
+ : doc.$timestamp.i;
+ const t = Long.isLong(doc.$timestamp.t)
+ ? doc.$timestamp.t.getLowBitsUnsigned()
+ : doc.$timestamp.t;
+ return new Timestamp({ t, i });
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const t = inspect(this.high >>> 0, options);
+ const i = inspect(this.low >>> 0, options);
+ return `new Timestamp({ t: ${t}, i: ${i} })`;
+ }
+}
+Timestamp.MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
+
+const JS_INT_MAX_LONG = Long.fromNumber(JS_INT_MAX);
+const JS_INT_MIN_LONG = Long.fromNumber(JS_INT_MIN);
+function internalDeserialize(buffer, options, isArray) {
+ options = options == null ? {} : options;
+ const index = options && options.index ? options.index : 0;
+ const size = NumberUtils.getInt32LE(buffer, index);
+ if (size < 5) {
+ throw new BSONError(`bson size must be >= 5, is ${size}`);
+ }
+ if (options.allowObjectSmallerThanBufferSize && buffer.length < size) {
+ throw new BSONError(`buffer length ${buffer.length} must be >= bson size ${size}`);
+ }
+ if (!options.allowObjectSmallerThanBufferSize && buffer.length !== size) {
+ throw new BSONError(`buffer length ${buffer.length} must === bson size ${size}`);
+ }
+ if (size + index > buffer.byteLength) {
+ throw new BSONError(`(bson size ${size} + options.index ${index} must be <= buffer length ${buffer.byteLength})`);
+ }
+ if (buffer[index + size - 1] !== 0) {
+ throw new BSONError("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+ return deserializeObject(buffer, index, options, isArray);
+}
+const allowedDBRefKeys = /^\$ref$|^\$id$|^\$db$/;
+function deserializeObject(buffer, index, options, isArray = false) {
+ const fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+ const raw = options['raw'] == null ? false : options['raw'];
+ const bsonRegExp = typeof options['bsonRegExp'] === 'boolean' ? options['bsonRegExp'] : false;
+ const promoteBuffers = options.promoteBuffers ?? false;
+ const promoteLongs = options.promoteLongs ?? true;
+ const promoteValues = options.promoteValues ?? true;
+ const useBigInt64 = options.useBigInt64 ?? false;
+ if (useBigInt64 && !promoteValues) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ if (useBigInt64 && !promoteLongs) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ const validation = options.validation == null ? { utf8: true } : options.validation;
+ let globalUTFValidation = true;
+ let validationSetting;
+ let utf8KeysSet;
+ const utf8ValidatedKeys = validation.utf8;
+ if (typeof utf8ValidatedKeys === 'boolean') {
+ validationSetting = utf8ValidatedKeys;
+ }
+ else {
+ globalUTFValidation = false;
+ const utf8ValidationValues = Object.keys(utf8ValidatedKeys).map(function (key) {
+ return utf8ValidatedKeys[key];
+ });
+ if (utf8ValidationValues.length === 0) {
+ throw new BSONError('UTF-8 validation setting cannot be empty');
+ }
+ if (typeof utf8ValidationValues[0] !== 'boolean') {
+ throw new BSONError('Invalid UTF-8 validation option, must specify boolean values');
+ }
+ validationSetting = utf8ValidationValues[0];
+ if (!utf8ValidationValues.every(item => item === validationSetting)) {
+ throw new BSONError('Invalid UTF-8 validation option - keys must be all true or all false');
+ }
+ }
+ if (!globalUTFValidation) {
+ utf8KeysSet = new Set();
+ for (const key of Object.keys(utf8ValidatedKeys)) {
+ utf8KeysSet.add(key);
+ }
+ }
+ const startIndex = index;
+ if (buffer.length < 5)
+ throw new BSONError('corrupt bson message < 5 bytes long');
+ const size = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (size < 5 || size > buffer.length)
+ throw new BSONError('corrupt bson message');
+ const object = isArray ? [] : {};
+ let arrayIndex = 0;
+ const done = false;
+ let isPossibleDBRef = isArray ? false : null;
+ while (!done) {
+ const elementType = buffer[index++];
+ if (elementType === 0)
+ break;
+ let i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.byteLength)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const name = isArray ? arrayIndex++ : ByteUtils.toUTF8(buffer, index, i, false);
+ let shouldValidateKey = true;
+ if (globalUTFValidation || utf8KeysSet?.has(name)) {
+ shouldValidateKey = validationSetting;
+ }
+ else {
+ shouldValidateKey = !validationSetting;
+ }
+ if (isPossibleDBRef !== false && name[0] === '$') {
+ isPossibleDBRef = allowedDBRefKeys.test(name);
+ }
+ let value;
+ index = i + 1;
+ if (elementType === BSON_DATA_STRING) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ value = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_OID) {
+ const oid = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oid[i] = buffer[index + i];
+ value = new ObjectId(oid);
+ index = index + 12;
+ }
+ else if (elementType === BSON_DATA_INT && promoteValues === false) {
+ value = new Int32(NumberUtils.getInt32LE(buffer, index));
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_INT) {
+ value = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_NUMBER) {
+ value = NumberUtils.getFloat64LE(buffer, index);
+ index += 8;
+ if (promoteValues === false)
+ value = new Double(value);
+ }
+ else if (elementType === BSON_DATA_DATE) {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ value = new Date(new Long(lowBits, highBits).toNumber());
+ }
+ else if (elementType === BSON_DATA_BOOLEAN) {
+ if (buffer[index] !== 0 && buffer[index] !== 1)
+ throw new BSONError('illegal boolean type value');
+ value = buffer[index++] === 1;
+ }
+ else if (elementType === BSON_DATA_OBJECT) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ if (objectSize <= 0 || objectSize > buffer.length - index)
+ throw new BSONError('bad embedded document length in bson');
+ if (raw) {
+ value = buffer.slice(index, index + objectSize);
+ }
+ else {
+ let objectOptions = options;
+ if (!globalUTFValidation) {
+ objectOptions = { ...options, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, objectOptions, false);
+ }
+ index = index + objectSize;
+ }
+ else if (elementType === BSON_DATA_ARRAY) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ let arrayOptions = options;
+ const stopIndex = index + objectSize;
+ if (fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = { ...options, raw: true };
+ }
+ if (!globalUTFValidation) {
+ arrayOptions = { ...arrayOptions, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+ if (buffer[index - 1] !== 0)
+ throw new BSONError('invalid array terminator byte');
+ if (index !== stopIndex)
+ throw new BSONError('corrupted array bson');
+ }
+ else if (elementType === BSON_DATA_UNDEFINED) {
+ value = undefined;
+ }
+ else if (elementType === BSON_DATA_NULL) {
+ value = null;
+ }
+ else if (elementType === BSON_DATA_LONG) {
+ if (useBigInt64) {
+ value = NumberUtils.getBigInt64LE(buffer, index);
+ index += 8;
+ }
+ else {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ const long = new Long(lowBits, highBits);
+ if (promoteLongs && promoteValues === true) {
+ value =
+ long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG)
+ ? long.toNumber()
+ : long;
+ }
+ else {
+ value = long;
+ }
+ }
+ }
+ else if (elementType === BSON_DATA_DECIMAL128) {
+ const bytes = ByteUtils.allocateUnsafe(16);
+ for (let i = 0; i < 16; i++)
+ bytes[i] = buffer[index + i];
+ index = index + 16;
+ value = new Decimal128(bytes);
+ }
+ else if (elementType === BSON_DATA_BINARY) {
+ let binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ const totalBinarySize = binarySize;
+ const subType = buffer[index++];
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found');
+ if (binarySize > buffer.byteLength)
+ throw new BSONError('Binary type size larger than document size');
+ if (buffer['slice'] != null) {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.toLocalBufferType(buffer.slice(index, index + binarySize));
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ else {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.allocateUnsafe(binarySize);
+ for (i = 0; i < binarySize; i++) {
+ value[i] = buffer[index + i];
+ }
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ index = index + binarySize;
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === false) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ const optionsArray = new Array(regExpOptions.length);
+ for (i = 0; i < regExpOptions.length; i++) {
+ switch (regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+ value = new RegExp(source, optionsArray.join(''));
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === true) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ value = new BSONRegExp(source, regExpOptions);
+ }
+ else if (elementType === BSON_DATA_SYMBOL) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const symbol = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = promoteValues ? symbol : new BSONSymbol(symbol);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_TIMESTAMP) {
+ value = new Timestamp({
+ i: NumberUtils.getUint32LE(buffer, index),
+ t: NumberUtils.getUint32LE(buffer, index + 4)
+ });
+ index += 8;
+ }
+ else if (elementType === BSON_DATA_MIN_KEY) {
+ value = new MinKey();
+ }
+ else if (elementType === BSON_DATA_MAX_KEY) {
+ value = new MaxKey();
+ }
+ else if (elementType === BSON_DATA_CODE) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = new Code(functionString);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_CODE_W_SCOPE) {
+ const totalSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (totalSize < 4 + 4 + 4 + 1) {
+ throw new BSONError('code_w_scope total size shorter minimum expected length');
+ }
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ const scopeObject = deserializeObject(buffer, _index, options, false);
+ index = index + objectSize;
+ if (totalSize < 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too short, truncating scope');
+ }
+ if (totalSize > 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too long, clips outer document');
+ }
+ value = new Code(functionString, scopeObject);
+ }
+ else if (elementType === BSON_DATA_DBPOINTER) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0)
+ throw new BSONError('bad string length in bson');
+ const namespace = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const oidBuffer = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oidBuffer[i] = buffer[index + i];
+ const oid = new ObjectId(oidBuffer);
+ index = index + 12;
+ value = new DBRef(namespace, oid);
+ }
+ else {
+ throw new BSONError(`Detected unknown BSON type ${elementType.toString(16)} for fieldname "${name}"`);
+ }
+ if (name === '__proto__') {
+ Object.defineProperty(object, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ object[name] = value;
+ }
+ }
+ if (size !== index - startIndex) {
+ if (isArray)
+ throw new BSONError('corrupt array bson');
+ throw new BSONError('corrupt object bson');
+ }
+ if (!isPossibleDBRef)
+ return object;
+ if (isDBRefLike(object)) {
+ const copy = Object.assign({}, object);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(object.$ref, object.$id, object.$db, copy);
+ }
+ return object;
+}
+
+const regexp = /\x00/;
+const ignoreKeys = new Set(['$db', '$ref', '$id', '$clusterTime']);
+function serializeString(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_STRING;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value, index + 4);
+ NumberUtils.setInt32LE(buffer, index, size + 1);
+ index = index + 4 + size;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeNumber(buffer, key, value, index) {
+ const isNegativeZero = Object.is(value, -0);
+ const type = !isNegativeZero &&
+ Number.isSafeInteger(value) &&
+ value <= BSON_INT32_MAX &&
+ value >= BSON_INT32_MIN
+ ? BSON_DATA_INT
+ : BSON_DATA_NUMBER;
+ buffer[index++] = type;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0x00;
+ if (type === BSON_DATA_INT) {
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ }
+ else {
+ index += NumberUtils.setFloat64LE(buffer, index, value);
+ }
+ return index;
+}
+function serializeBigInt(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_LONG;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index += numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setBigInt64LE(buffer, index, value);
+ return index;
+}
+function serializeNull(buffer, key, _, index) {
+ buffer[index++] = BSON_DATA_NULL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeBoolean(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BOOLEAN;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ buffer[index++] = value ? 1 : 0;
+ return index;
+}
+function serializeDate(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DATE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const dateInMilis = Long.fromNumber(value.getTime());
+ const lowBits = dateInMilis.getLowBits();
+ const highBits = dateInMilis.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw new BSONError('value ' + value.source + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.source, index);
+ buffer[index++] = 0x00;
+ if (value.ignoreCase)
+ buffer[index++] = 0x69;
+ if (value.global)
+ buffer[index++] = 0x73;
+ if (value.multiline)
+ buffer[index++] = 0x6d;
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeBSONRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.pattern.match(regexp) != null) {
+ throw new BSONError('pattern ' + value.pattern + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.pattern, index);
+ buffer[index++] = 0x00;
+ const sortedOptions = value.options.split('').sort().join('');
+ index = index + ByteUtils.encodeUTF8Into(buffer, sortedOptions, index);
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeMinMax(buffer, key, value, index) {
+ if (value === null) {
+ buffer[index++] = BSON_DATA_NULL;
+ }
+ else if (value._bsontype === 'MinKey') {
+ buffer[index++] = BSON_DATA_MIN_KEY;
+ }
+ else {
+ buffer[index++] = BSON_DATA_MAX_KEY;
+ }
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeObjectId(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_OID;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += value.serializeInto(buffer, index);
+ return index;
+}
+function serializeBuffer(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = value.length;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = BSON_BINARY_SUBTYPE_DEFAULT;
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = value[i];
+ }
+ else {
+ buffer.set(value, index);
+ }
+ index = index + size;
+ return index;
+}
+function serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path.has(value)) {
+ throw new BSONError('Cannot convert circular structure to BSON');
+ }
+ path.add(value);
+ buffer[index++] = Array.isArray(value) ? BSON_DATA_ARRAY : BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const endIndex = serializeInto(buffer, value, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ path.delete(value);
+ return endIndex;
+}
+function serializeDecimal128(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DECIMAL128;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ for (let i = 0; i < 16; i++)
+ buffer[index + i] = value.bytes[i];
+ return index + 16;
+}
+function serializeLong(buffer, key, value, index) {
+ buffer[index++] =
+ value._bsontype === 'Long' ? BSON_DATA_LONG : BSON_DATA_TIMESTAMP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const lowBits = value.getLowBits();
+ const highBits = value.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeInt32(buffer, key, value, index) {
+ value = value.valueOf();
+ buffer[index++] = BSON_DATA_INT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ return index;
+}
+function serializeDouble(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_NUMBER;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setFloat64LE(buffer, index, value.value);
+ return index;
+}
+function serializeFunction(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeCode(buffer, key, value, index, checkKeys = false, depth = 0, serializeFunctions = false, ignoreUndefined = true, path) {
+ if (value.scope && typeof value.scope === 'object') {
+ buffer[index++] = BSON_DATA_CODE_W_SCOPE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ const functionString = value.code;
+ index = index + 4;
+ const codeSize = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, codeSize);
+ buffer[index + 4 + codeSize - 1] = 0;
+ index = index + codeSize + 4;
+ const endIndex = serializeInto(buffer, value.scope, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ index = endIndex - 1;
+ const totalSize = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, startIndex, totalSize);
+ buffer[index++] = 0;
+ }
+ else {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.code.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ }
+ return index;
+}
+function serializeBinary(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const data = value.buffer;
+ let size = value.position;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY)
+ size = size + 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = value.sub_type;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ }
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = data[i];
+ }
+ else {
+ buffer.set(data, index);
+ }
+ index = index + value.position;
+ return index;
+}
+function serializeSymbol(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_SYMBOL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value.value, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path) {
+ buffer[index++] = BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ let output = {
+ $ref: value.collection || value.namespace,
+ $id: value.oid
+ };
+ if (value.db != null) {
+ output.$db = value.db;
+ }
+ output = Object.assign(output, value.fields);
+ const endIndex = serializeInto(buffer, output, false, index, depth + 1, serializeFunctions, true, path);
+ const size = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, index, size);
+ return endIndex;
+}
+function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path == null) {
+ if (object == null) {
+ buffer[0] = 0x05;
+ buffer[1] = 0x00;
+ buffer[2] = 0x00;
+ buffer[3] = 0x00;
+ buffer[4] = 0x00;
+ return 5;
+ }
+ if (Array.isArray(object)) {
+ throw new BSONError('serialize does not support an array as the root input');
+ }
+ if (typeof object !== 'object') {
+ throw new BSONError('serialize does not support non-object as the root input');
+ }
+ else if ('_bsontype' in object && typeof object._bsontype === 'string') {
+ throw new BSONError(`BSON types cannot be serialized as a document`);
+ }
+ else if (isDate(object) ||
+ isRegExp(object) ||
+ isUint8Array(object) ||
+ isAnyArrayBuffer(object)) {
+ throw new BSONError(`date, regexp, typedarray, and arraybuffer cannot be BSON documents`);
+ }
+ path = new Set();
+ }
+ path.add(object);
+ let index = startingIndex + 4;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ const key = `${i}`;
+ let value = object[i];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ if (typeof value === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (typeof value === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (typeof value === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (typeof value === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (typeof value === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else if (object instanceof Map || isMap(object)) {
+ const iterator = object.entries();
+ let done = false;
+ while (!done) {
+ const entry = iterator.next();
+ done = !!entry.done;
+ if (done)
+ continue;
+ const key = entry.value[0];
+ let value = entry.value[1];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === null || (value === undefined && ignoreUndefined === false)) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ if (object != null && typeof object !== 'object') {
+ throw new BSONError('toBSON function did not return an object');
+ }
+ }
+ for (const key of Object.keys(object)) {
+ let value = object[key];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ if (ignoreUndefined === false)
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ path.delete(object);
+ buffer[index++] = 0x00;
+ const size = index - startingIndex;
+ startingIndex += NumberUtils.setInt32LE(buffer, startingIndex, size);
+ return index;
+}
+
+function isBSONType(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '_bsontype' in value &&
+ typeof value._bsontype === 'string');
+}
+const keysToCodecs = {
+ $oid: ObjectId,
+ $binary: Binary,
+ $uuid: Binary,
+ $symbol: BSONSymbol,
+ $numberInt: Int32,
+ $numberDecimal: Decimal128,
+ $numberDouble: Double,
+ $numberLong: Long,
+ $minKey: MinKey,
+ $maxKey: MaxKey,
+ $regex: BSONRegExp,
+ $regularExpression: BSONRegExp,
+ $timestamp: Timestamp
+};
+function deserializeValue(value, options = {}) {
+ if (typeof value === 'number') {
+ const in32BitRange = value <= BSON_INT32_MAX && value >= BSON_INT32_MIN;
+ const in64BitRange = value <= BSON_INT64_MAX && value >= BSON_INT64_MIN;
+ if (options.relaxed || options.legacy) {
+ return value;
+ }
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (in32BitRange) {
+ return new Int32(value);
+ }
+ if (in64BitRange) {
+ if (options.useBigInt64) {
+ return BigInt(value);
+ }
+ return Long.fromNumber(value);
+ }
+ }
+ return new Double(value);
+ }
+ if (value == null || typeof value !== 'object')
+ return value;
+ if (value.$undefined)
+ return null;
+ const keys = Object.keys(value).filter(k => k.startsWith('$') && value[k] != null);
+ for (let i = 0; i < keys.length; i++) {
+ const c = keysToCodecs[keys[i]];
+ if (c)
+ return c.fromExtendedJSON(value, options);
+ }
+ if (value.$date != null) {
+ const d = value.$date;
+ const date = new Date();
+ if (options.legacy) {
+ if (typeof d === 'number')
+ date.setTime(d);
+ else if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ else {
+ if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (Long.isLong(d))
+ date.setTime(d.toNumber());
+ else if (typeof d === 'number' && options.relaxed)
+ date.setTime(d);
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ return date;
+ }
+ if (value.$code != null) {
+ const copy = Object.assign({}, value);
+ if (value.$scope) {
+ copy.$scope = deserializeValue(value.$scope);
+ }
+ return Code.fromExtendedJSON(value);
+ }
+ if (isDBRefLike(value) || value.$dbPointer) {
+ const v = value.$ref ? value : value.$dbPointer;
+ if (v instanceof DBRef)
+ return v;
+ const dollarKeys = Object.keys(v).filter(k => k.startsWith('$'));
+ let valid = true;
+ dollarKeys.forEach(k => {
+ if (['$ref', '$id', '$db'].indexOf(k) === -1)
+ valid = false;
+ });
+ if (valid)
+ return DBRef.fromExtendedJSON(v);
+ }
+ return value;
+}
+function serializeArray(array, options) {
+ return array.map((v, index) => {
+ options.seenObjects.push({ propertyName: `index ${index}`, obj: null });
+ try {
+ return serializeValue(v, options);
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ });
+}
+function getISOString(date) {
+ const isoStr = date.toISOString();
+ return date.getUTCMilliseconds() !== 0 ? isoStr : isoStr.slice(0, -5) + 'Z';
+}
+function serializeValue(value, options) {
+ if (value instanceof Map || isMap(value)) {
+ const obj = Object.create(null);
+ for (const [k, v] of value) {
+ if (typeof k !== 'string') {
+ throw new BSONError('Can only serialize maps with string keys');
+ }
+ obj[k] = v;
+ }
+ return serializeValue(obj, options);
+ }
+ if ((typeof value === 'object' || typeof value === 'function') && value !== null) {
+ const index = options.seenObjects.findIndex(entry => entry.obj === value);
+ if (index !== -1) {
+ const props = options.seenObjects.map(entry => entry.propertyName);
+ const leadingPart = props
+ .slice(0, index)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const alreadySeen = props[index];
+ const circularPart = ' -> ' +
+ props
+ .slice(index + 1, props.length - 1)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const current = props[props.length - 1];
+ const leadingSpace = ' '.repeat(leadingPart.length + alreadySeen.length / 2);
+ const dashes = '-'.repeat(circularPart.length + (alreadySeen.length + current.length) / 2 - 1);
+ throw new BSONError('Converting circular structure to EJSON:\n' +
+ ` ${leadingPart}${alreadySeen}${circularPart}${current}\n` +
+ ` ${leadingSpace}\\${dashes}/`);
+ }
+ options.seenObjects[options.seenObjects.length - 1].obj = value;
+ }
+ if (Array.isArray(value))
+ return serializeArray(value, options);
+ if (value === undefined)
+ return null;
+ if (value instanceof Date || isDate(value)) {
+ const dateNum = value.getTime(), inRange = dateNum > -1 && dateNum < 253402318800000;
+ if (options.legacy) {
+ return options.relaxed && inRange
+ ? { $date: value.getTime() }
+ : { $date: getISOString(value) };
+ }
+ return options.relaxed && inRange
+ ? { $date: getISOString(value) }
+ : { $date: { $numberLong: value.getTime().toString() } };
+ }
+ if (typeof value === 'number' && (!options.relaxed || !isFinite(value))) {
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return { $numberInt: value.toString() };
+ }
+ if (value >= BSON_INT64_MIN && value <= BSON_INT64_MAX) {
+ return { $numberLong: value.toString() };
+ }
+ }
+ return { $numberDouble: Object.is(value, -0) ? '-0.0' : value.toString() };
+ }
+ if (typeof value === 'bigint') {
+ if (!options.relaxed) {
+ return { $numberLong: BigInt.asIntN(64, value).toString() };
+ }
+ return Number(BigInt.asIntN(64, value));
+ }
+ if (value instanceof RegExp || isRegExp(value)) {
+ let flags = value.flags;
+ if (flags === undefined) {
+ const match = value.toString().match(/[gimuy]*$/);
+ if (match) {
+ flags = match[0];
+ }
+ }
+ const rx = new BSONRegExp(value.source, flags);
+ return rx.toExtendedJSON(options);
+ }
+ if (value != null && typeof value === 'object')
+ return serializeDocument(value, options);
+ return value;
+}
+const BSON_TYPE_MAPPINGS = {
+ Binary: (o) => new Binary(o.value(), o.sub_type),
+ Code: (o) => new Code(o.code, o.scope),
+ DBRef: (o) => new DBRef(o.collection || o.namespace, o.oid, o.db, o.fields),
+ Decimal128: (o) => new Decimal128(o.bytes),
+ Double: (o) => new Double(o.value),
+ Int32: (o) => new Int32(o.value),
+ Long: (o) => Long.fromBits(o.low != null ? o.low : o.low_, o.low != null ? o.high : o.high_, o.low != null ? o.unsigned : o.unsigned_),
+ MaxKey: () => new MaxKey(),
+ MinKey: () => new MinKey(),
+ ObjectId: (o) => new ObjectId(o),
+ BSONRegExp: (o) => new BSONRegExp(o.pattern, o.options),
+ BSONSymbol: (o) => new BSONSymbol(o.value),
+ Timestamp: (o) => Timestamp.fromBits(o.low, o.high)
+};
+function serializeDocument(doc, options) {
+ if (doc == null || typeof doc !== 'object')
+ throw new BSONError('not an object instance');
+ const bsontype = doc._bsontype;
+ if (typeof bsontype === 'undefined') {
+ const _doc = {};
+ for (const name of Object.keys(doc)) {
+ options.seenObjects.push({ propertyName: name, obj: null });
+ try {
+ const value = serializeValue(doc[name], options);
+ if (name === '__proto__') {
+ Object.defineProperty(_doc, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ _doc[name] = value;
+ }
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ }
+ return _doc;
+ }
+ else if (doc != null &&
+ typeof doc === 'object' &&
+ typeof doc._bsontype === 'string' &&
+ doc[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (isBSONType(doc)) {
+ let outDoc = doc;
+ if (typeof outDoc.toExtendedJSON !== 'function') {
+ const mapper = BSON_TYPE_MAPPINGS[doc._bsontype];
+ if (!mapper) {
+ throw new BSONError('Unrecognized or invalid _bsontype: ' + doc._bsontype);
+ }
+ outDoc = mapper(outDoc);
+ }
+ if (bsontype === 'Code' && outDoc.scope) {
+ outDoc = new Code(outDoc.code, serializeValue(outDoc.scope, options));
+ }
+ else if (bsontype === 'DBRef' && outDoc.oid) {
+ outDoc = new DBRef(serializeValue(outDoc.collection, options), serializeValue(outDoc.oid, options), serializeValue(outDoc.db, options), serializeValue(outDoc.fields, options));
+ }
+ return outDoc.toExtendedJSON(options);
+ }
+ else {
+ throw new BSONError('_bsontype must be a string, but was: ' + typeof bsontype);
+ }
+}
+function parse(text, options) {
+ const ejsonOptions = {
+ useBigInt64: options?.useBigInt64 ?? false,
+ relaxed: options?.relaxed ?? true,
+ legacy: options?.legacy ?? false
+ };
+ return JSON.parse(text, (key, value) => {
+ if (key.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(key)}`);
+ }
+ return deserializeValue(value, ejsonOptions);
+ });
+}
+function stringify(value, replacer, space, options) {
+ if (space != null && typeof space === 'object') {
+ options = space;
+ space = 0;
+ }
+ if (replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) {
+ options = replacer;
+ replacer = undefined;
+ space = 0;
+ }
+ const serializeOptions = Object.assign({ relaxed: true, legacy: false }, options, {
+ seenObjects: [{ propertyName: '(root)', obj: null }]
+ });
+ const doc = serializeValue(value, serializeOptions);
+ return JSON.stringify(doc, replacer, space);
+}
+function EJSONserialize(value, options) {
+ options = options || {};
+ return JSON.parse(stringify(value, options));
+}
+function EJSONdeserialize(ejson, options) {
+ options = options || {};
+ return parse(JSON.stringify(ejson), options);
+}
+const EJSON = Object.create(null);
+EJSON.parse = parse;
+EJSON.stringify = stringify;
+EJSON.serialize = EJSONserialize;
+EJSON.deserialize = EJSONdeserialize;
+Object.freeze(EJSON);
+
+function getSize(source, offset) {
+ try {
+ return NumberUtils.getNonnegativeInt32LE(source, offset);
+ }
+ catch (cause) {
+ throw new BSONOffsetError('BSON size cannot be negative', offset, { cause });
+ }
+}
+function findNull(bytes, offset) {
+ let nullTerminatorOffset = offset;
+ for (; bytes[nullTerminatorOffset] !== 0x00; nullTerminatorOffset++)
+ ;
+ if (nullTerminatorOffset === bytes.length - 1) {
+ throw new BSONOffsetError('Null terminator not found', offset);
+ }
+ return nullTerminatorOffset;
+}
+function parseToElements(bytes, startOffset = 0) {
+ startOffset ??= 0;
+ if (bytes.length < 5) {
+ throw new BSONOffsetError(`Input must be at least 5 bytes, got ${bytes.length} bytes`, startOffset);
+ }
+ const documentSize = getSize(bytes, startOffset);
+ if (documentSize > bytes.length - startOffset) {
+ throw new BSONOffsetError(`Parsed documentSize (${documentSize} bytes) does not match input length (${bytes.length} bytes)`, startOffset);
+ }
+ if (bytes[startOffset + documentSize - 1] !== 0x00) {
+ throw new BSONOffsetError('BSON documents must end in 0x00', startOffset + documentSize);
+ }
+ const elements = [];
+ let offset = startOffset + 4;
+ while (offset <= documentSize + startOffset) {
+ const type = bytes[offset];
+ offset += 1;
+ if (type === 0) {
+ if (offset - startOffset !== documentSize) {
+ throw new BSONOffsetError(`Invalid 0x00 type byte`, offset);
+ }
+ break;
+ }
+ const nameOffset = offset;
+ const nameLength = findNull(bytes, offset) - nameOffset;
+ offset += nameLength + 1;
+ let length;
+ if (type === 1 ||
+ type === 18 ||
+ type === 9 ||
+ type === 17) {
+ length = 8;
+ }
+ else if (type === 16) {
+ length = 4;
+ }
+ else if (type === 7) {
+ length = 12;
+ }
+ else if (type === 19) {
+ length = 16;
+ }
+ else if (type === 8) {
+ length = 1;
+ }
+ else if (type === 10 ||
+ type === 6 ||
+ type === 127 ||
+ type === 255) {
+ length = 0;
+ }
+ else if (type === 11) {
+ length = findNull(bytes, findNull(bytes, offset) + 1) + 1 - offset;
+ }
+ else if (type === 3 ||
+ type === 4 ||
+ type === 15) {
+ length = getSize(bytes, offset);
+ }
+ else if (type === 2 ||
+ type === 5 ||
+ type === 12 ||
+ type === 13 ||
+ type === 14) {
+ length = getSize(bytes, offset) + 4;
+ if (type === 5) {
+ length += 1;
+ }
+ if (type === 12) {
+ length += 12;
+ }
+ }
+ else {
+ throw new BSONOffsetError(`Invalid 0x${type.toString(16).padStart(2, '0')} type byte`, offset);
+ }
+ if (length > documentSize) {
+ throw new BSONOffsetError('value reports length larger than document', offset);
+ }
+ elements.push([type, nameOffset, nameLength, offset, length]);
+ offset += length;
+ }
+ return elements;
+}
+
+const onDemand = Object.create(null);
+onDemand.parseToElements = parseToElements;
+onDemand.ByteUtils = ByteUtils;
+onDemand.NumberUtils = NumberUtils;
+Object.freeze(onDemand);
+
+const MAXSIZE = 1024 * 1024 * 17;
+let buffer = ByteUtils.allocate(MAXSIZE);
+function setInternalBufferSize(size) {
+ if (buffer.length < size) {
+ buffer = ByteUtils.allocate(size);
+ }
+}
+function serialize(object, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const minInternalBufferSize = typeof options.minInternalBufferSize === 'number' ? options.minInternalBufferSize : MAXSIZE;
+ if (buffer.length < minInternalBufferSize) {
+ buffer = ByteUtils.allocate(minInternalBufferSize);
+ }
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ const finishedBuffer = ByteUtils.allocateUnsafe(serializationIndex);
+ finishedBuffer.set(buffer.subarray(0, serializationIndex), 0);
+ return finishedBuffer;
+}
+function serializeWithBufferAndIndex(object, finalBuffer, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const startIndex = typeof options.index === 'number' ? options.index : 0;
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ finalBuffer.set(buffer.subarray(0, serializationIndex), startIndex);
+ return startIndex + serializationIndex - 1;
+}
+function deserialize(buffer, options = {}) {
+ return internalDeserialize(ByteUtils.toLocalBufferType(buffer), options);
+}
+function calculateObjectSize(object, options = {}) {
+ options = options || {};
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ return internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined);
+}
+function deserializeStream(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ const internalOptions = Object.assign({ allowObjectSmallerThanBufferSize: true, index: 0 }, options);
+ const bufferData = ByteUtils.toLocalBufferType(data);
+ let index = startIndex;
+ for (let i = 0; i < numberOfDocuments; i++) {
+ const size = NumberUtils.getInt32LE(bufferData, index);
+ internalOptions.index = index;
+ documents[docStartIndex + i] = internalDeserialize(bufferData, internalOptions);
+ index = index + size;
+ }
+ return index;
+}
+
+var bson = /*#__PURE__*/Object.freeze({
+__proto__: null,
+BSONError: BSONError,
+BSONOffsetError: BSONOffsetError,
+BSONRegExp: BSONRegExp,
+BSONRuntimeError: BSONRuntimeError,
+BSONSymbol: BSONSymbol,
+BSONType: BSONType,
+BSONValue: BSONValue,
+BSONVersionError: BSONVersionError,
+Binary: Binary,
+Code: Code,
+DBRef: DBRef,
+Decimal128: Decimal128,
+Double: Double,
+EJSON: EJSON,
+Int32: Int32,
+Long: Long,
+MaxKey: MaxKey,
+MinKey: MinKey,
+ObjectId: ObjectId,
+Timestamp: Timestamp,
+UUID: UUID,
+calculateObjectSize: calculateObjectSize,
+deserialize: deserialize,
+deserializeStream: deserializeStream,
+onDemand: onDemand,
+serialize: serialize,
+serializeWithBufferAndIndex: serializeWithBufferAndIndex,
+setInternalBufferSize: setInternalBufferSize
+});
+
+exports.BSON = bson;
+exports.BSONError = BSONError;
+exports.BSONOffsetError = BSONOffsetError;
+exports.BSONRegExp = BSONRegExp;
+exports.BSONRuntimeError = BSONRuntimeError;
+exports.BSONSymbol = BSONSymbol;
+exports.BSONType = BSONType;
+exports.BSONValue = BSONValue;
+exports.BSONVersionError = BSONVersionError;
+exports.Binary = Binary;
+exports.Code = Code;
+exports.DBRef = DBRef;
+exports.Decimal128 = Decimal128;
+exports.Double = Double;
+exports.EJSON = EJSON;
+exports.Int32 = Int32;
+exports.Long = Long;
+exports.MaxKey = MaxKey;
+exports.MinKey = MinKey;
+exports.ObjectId = ObjectId;
+exports.Timestamp = Timestamp;
+exports.UUID = UUID;
+exports.calculateObjectSize = calculateObjectSize;
+exports.deserialize = deserialize;
+exports.deserializeStream = deserializeStream;
+exports.onDemand = onDemand;
+exports.serialize = serialize;
+exports.serializeWithBufferAndIndex = serializeWithBufferAndIndex;
+exports.setInternalBufferSize = setInternalBufferSize;
+
+return exports;
+
+})({});
+//# sourceMappingURL=bson.bundle.js.map
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.bundle.js.map b/week-3/04-course-app-hard/node_modules/bson/lib/bson.bundle.js.map
new file mode 100644
index 000000000..d04c16961
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.bundle.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"bson.bundle.js","sources":["../src/parser/utils.ts","../src/constants.ts","../src/error.ts","../src/parse_utf8.ts","../src/utils/latin.ts","../src/utils/node_byte_utils.ts","../src/utils/web_byte_utils.ts","../src/utils/byte_utils.ts","../src/bson_value.ts","../src/binary.ts","../src/code.ts","../src/db_ref.ts","../src/utils/string_utils.ts","../src/long.ts","../src/decimal128.ts","../src/double.ts","../src/int_32.ts","../src/max_key.ts","../src/min_key.ts","../src/utils/number_utils.ts","../src/objectid.ts","../src/parser/calculate_size.ts","../src/regexp.ts","../src/symbol.ts","../src/timestamp.ts","../src/parser/deserializer.ts","../src/parser/serializer.ts","../src/extended_json.ts","../src/parser/on_demand/parse_to_elements.ts","../src/parser/on_demand/index.ts","../src/bson.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["StringUtils.validateStringCharacters","StringUtils.removeLeadingZerosAndExplicitPlus","constants.JS_INT_MIN","constants.JS_INT_MAX","constants.BSON_INT32_MIN","constants.BSON_INT32_MAX","constants.BSON_MAJOR_VERSION","constants.BSON_DATA_STRING","constants.BSON_DATA_OID","constants.BSON_DATA_INT","constants.BSON_DATA_NUMBER","constants.BSON_DATA_DATE","constants.BSON_DATA_BOOLEAN","constants.BSON_DATA_OBJECT","constants.BSON_DATA_ARRAY","constants.BSON_DATA_UNDEFINED","constants.BSON_DATA_NULL","constants.BSON_DATA_LONG","constants.BSON_DATA_DECIMAL128","constants.BSON_DATA_BINARY","constants.BSON_BINARY_SUBTYPE_UUID_NEW","constants.BSON_DATA_REGEXP","constants.BSON_DATA_SYMBOL","constants.BSON_DATA_TIMESTAMP","constants.BSON_DATA_MIN_KEY","constants.BSON_DATA_MAX_KEY","constants.BSON_DATA_CODE","constants.BSON_DATA_CODE_W_SCOPE","constants.BSON_DATA_DBPOINTER","constants.BSON_BINARY_SUBTYPE_DEFAULT"],"mappings":";;;AAAM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,OAAO,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,CAAC,QAAQ,CACpE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CACtC,CAAC;AACJ,CAAC;AAEK,SAAU,YAAY,CAAC,KAAc,EAAA;AACzC,IAAA,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UAAU,GAAG,SAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAErD,IAAI,KAAK,GAAG,UAAU,CAAC;AAEvB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC,EAAE,EAAE;QAE1C,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAEvD,QAAA,eAAe,CAAC,KAAK,GAAG,KAAK,CAAC;AAE9B,QAAA,SAAS,CAAC,aAAa,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;AAEhF,QAAA,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;KACtB;AAGD,IAAA,OAAO,KAAK,CAAC;AACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.cjs b/week-3/04-course-app-hard/node_modules/bson/lib/bson.cjs
new file mode 100644
index 000000000..51988db3b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.cjs
@@ -0,0 +1,4417 @@
+'use strict';
+
+function isAnyArrayBuffer(value) {
+ return ['[object ArrayBuffer]', '[object SharedArrayBuffer]'].includes(Object.prototype.toString.call(value));
+}
+function isUint8Array(value) {
+ return Object.prototype.toString.call(value) === '[object Uint8Array]';
+}
+function isRegExp(d) {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+}
+function isMap(d) {
+ return Object.prototype.toString.call(d) === '[object Map]';
+}
+function isDate(d) {
+ return Object.prototype.toString.call(d) === '[object Date]';
+}
+function defaultInspect(x, _options) {
+ return JSON.stringify(x, (k, v) => {
+ if (typeof v === 'bigint') {
+ return { $numberLong: `${v}` };
+ }
+ else if (isMap(v)) {
+ return Object.fromEntries(v);
+ }
+ return v;
+ });
+}
+function getStylizeFunction(options) {
+ const stylizeExists = options != null &&
+ typeof options === 'object' &&
+ 'stylize' in options &&
+ typeof options.stylize === 'function';
+ if (stylizeExists) {
+ return options.stylize;
+ }
+}
+
+const BSON_MAJOR_VERSION = 6;
+const BSON_INT32_MAX = 0x7fffffff;
+const BSON_INT32_MIN = -0x80000000;
+const BSON_INT64_MAX = Math.pow(2, 63) - 1;
+const BSON_INT64_MIN = -Math.pow(2, 63);
+const JS_INT_MAX = Math.pow(2, 53);
+const JS_INT_MIN = -Math.pow(2, 53);
+const BSON_DATA_NUMBER = 1;
+const BSON_DATA_STRING = 2;
+const BSON_DATA_OBJECT = 3;
+const BSON_DATA_ARRAY = 4;
+const BSON_DATA_BINARY = 5;
+const BSON_DATA_UNDEFINED = 6;
+const BSON_DATA_OID = 7;
+const BSON_DATA_BOOLEAN = 8;
+const BSON_DATA_DATE = 9;
+const BSON_DATA_NULL = 10;
+const BSON_DATA_REGEXP = 11;
+const BSON_DATA_DBPOINTER = 12;
+const BSON_DATA_CODE = 13;
+const BSON_DATA_SYMBOL = 14;
+const BSON_DATA_CODE_W_SCOPE = 15;
+const BSON_DATA_INT = 16;
+const BSON_DATA_TIMESTAMP = 17;
+const BSON_DATA_LONG = 18;
+const BSON_DATA_DECIMAL128 = 19;
+const BSON_DATA_MIN_KEY = 0xff;
+const BSON_DATA_MAX_KEY = 0x7f;
+const BSON_BINARY_SUBTYPE_DEFAULT = 0;
+const BSON_BINARY_SUBTYPE_UUID_NEW = 4;
+const BSONType = Object.freeze({
+ double: 1,
+ string: 2,
+ object: 3,
+ array: 4,
+ binData: 5,
+ undefined: 6,
+ objectId: 7,
+ bool: 8,
+ date: 9,
+ null: 10,
+ regex: 11,
+ dbPointer: 12,
+ javascript: 13,
+ symbol: 14,
+ javascriptWithScope: 15,
+ int: 16,
+ timestamp: 17,
+ long: 18,
+ decimal: 19,
+ minKey: -1,
+ maxKey: 127
+});
+
+class BSONError extends Error {
+ get bsonError() {
+ return true;
+ }
+ get name() {
+ return 'BSONError';
+ }
+ constructor(message, options) {
+ super(message, options);
+ }
+ static isBSONError(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ 'bsonError' in value &&
+ value.bsonError === true &&
+ 'name' in value &&
+ 'message' in value &&
+ 'stack' in value);
+ }
+}
+class BSONVersionError extends BSONError {
+ get name() {
+ return 'BSONVersionError';
+ }
+ constructor() {
+ super(`Unsupported BSON version, bson types must be from bson ${BSON_MAJOR_VERSION}.x.x`);
+ }
+}
+class BSONRuntimeError extends BSONError {
+ get name() {
+ return 'BSONRuntimeError';
+ }
+ constructor(message) {
+ super(message);
+ }
+}
+class BSONOffsetError extends BSONError {
+ get name() {
+ return 'BSONOffsetError';
+ }
+ constructor(message, offset, options) {
+ super(`${message}. offset: ${offset}`, options);
+ this.offset = offset;
+ }
+}
+
+let TextDecoderFatal;
+let TextDecoderNonFatal;
+function parseUtf8(buffer, start, end, fatal) {
+ if (fatal) {
+ TextDecoderFatal ??= new TextDecoder('utf8', { fatal: true });
+ try {
+ return TextDecoderFatal.decode(buffer.subarray(start, end));
+ }
+ catch (cause) {
+ throw new BSONError('Invalid UTF-8 string in BSON document', { cause });
+ }
+ }
+ TextDecoderNonFatal ??= new TextDecoder('utf8', { fatal: false });
+ return TextDecoderNonFatal.decode(buffer.subarray(start, end));
+}
+
+function tryReadBasicLatin(uint8array, start, end) {
+ if (uint8array.length === 0) {
+ return '';
+ }
+ const stringByteLength = end - start;
+ if (stringByteLength === 0) {
+ return '';
+ }
+ if (stringByteLength > 20) {
+ return null;
+ }
+ if (stringByteLength === 1 && uint8array[start] < 128) {
+ return String.fromCharCode(uint8array[start]);
+ }
+ if (stringByteLength === 2 && uint8array[start] < 128 && uint8array[start + 1] < 128) {
+ return String.fromCharCode(uint8array[start]) + String.fromCharCode(uint8array[start + 1]);
+ }
+ if (stringByteLength === 3 &&
+ uint8array[start] < 128 &&
+ uint8array[start + 1] < 128 &&
+ uint8array[start + 2] < 128) {
+ return (String.fromCharCode(uint8array[start]) +
+ String.fromCharCode(uint8array[start + 1]) +
+ String.fromCharCode(uint8array[start + 2]));
+ }
+ const latinBytes = [];
+ for (let i = start; i < end; i++) {
+ const byte = uint8array[i];
+ if (byte > 127) {
+ return null;
+ }
+ latinBytes.push(byte);
+ }
+ return String.fromCharCode(...latinBytes);
+}
+function tryWriteBasicLatin(destination, source, offset) {
+ if (source.length === 0)
+ return 0;
+ if (source.length > 25)
+ return null;
+ if (destination.length - offset < source.length)
+ return null;
+ for (let charOffset = 0, destinationOffset = offset; charOffset < source.length; charOffset++, destinationOffset++) {
+ const char = source.charCodeAt(charOffset);
+ if (char > 127)
+ return null;
+ destination[destinationOffset] = char;
+ }
+ return source.length;
+}
+
+function nodejsMathRandomBytes(byteLength) {
+ return nodeJsByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const nodejsRandomBytes = (() => {
+ try {
+ return require('crypto').randomBytes;
+ }
+ catch {
+ return nodejsMathRandomBytes;
+ }
+})();
+const nodeJsByteUtils = {
+ toLocalBufferType(potentialBuffer) {
+ if (Buffer.isBuffer(potentialBuffer)) {
+ return potentialBuffer;
+ }
+ if (ArrayBuffer.isView(potentialBuffer)) {
+ return Buffer.from(potentialBuffer.buffer, potentialBuffer.byteOffset, potentialBuffer.byteLength);
+ }
+ const stringTag = potentialBuffer?.[Symbol.toStringTag] ?? Object.prototype.toString.call(potentialBuffer);
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return Buffer.from(potentialBuffer);
+ }
+ throw new BSONError(`Cannot create Buffer from ${String(potentialBuffer)}`);
+ },
+ allocate(size) {
+ return Buffer.alloc(size);
+ },
+ allocateUnsafe(size) {
+ return Buffer.allocUnsafe(size);
+ },
+ equals(a, b) {
+ return nodeJsByteUtils.toLocalBufferType(a).equals(b);
+ },
+ fromNumberArray(array) {
+ return Buffer.from(array);
+ },
+ fromBase64(base64) {
+ return Buffer.from(base64, 'base64');
+ },
+ toBase64(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('base64');
+ },
+ fromISO88591(codePoints) {
+ return Buffer.from(codePoints, 'binary');
+ },
+ toISO88591(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('binary');
+ },
+ fromHex(hex) {
+ return Buffer.from(hex, 'hex');
+ },
+ toHex(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('hex');
+ },
+ toUTF8(buffer, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(buffer, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ const string = nodeJsByteUtils.toLocalBufferType(buffer).toString('utf8', start, end);
+ if (fatal) {
+ for (let i = 0; i < string.length; i++) {
+ if (string.charCodeAt(i) === 0xfffd) {
+ parseUtf8(buffer, start, end, true);
+ break;
+ }
+ }
+ }
+ return string;
+ },
+ utf8ByteLength(input) {
+ return Buffer.byteLength(input, 'utf8');
+ },
+ encodeUTF8Into(buffer, source, byteOffset) {
+ const latinBytesWritten = tryWriteBasicLatin(buffer, source, byteOffset);
+ if (latinBytesWritten != null) {
+ return latinBytesWritten;
+ }
+ return nodeJsByteUtils.toLocalBufferType(buffer).write(source, byteOffset, undefined, 'utf8');
+ },
+ randomBytes: nodejsRandomBytes
+};
+
+function isReactNative() {
+ const { navigator } = globalThis;
+ return typeof navigator === 'object' && navigator.product === 'ReactNative';
+}
+function webMathRandomBytes(byteLength) {
+ if (byteLength < 0) {
+ throw new RangeError(`The argument 'byteLength' is invalid. Received ${byteLength}`);
+ }
+ return webByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const webRandomBytes = (() => {
+ const { crypto } = globalThis;
+ if (crypto != null && typeof crypto.getRandomValues === 'function') {
+ return (byteLength) => {
+ return crypto.getRandomValues(webByteUtils.allocate(byteLength));
+ };
+ }
+ else {
+ if (isReactNative()) {
+ const { console } = globalThis;
+ console?.warn?.('BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.');
+ }
+ return webMathRandomBytes;
+ }
+})();
+const HEX_DIGIT = /(\d|[a-f])/i;
+const webByteUtils = {
+ toLocalBufferType(potentialUint8array) {
+ const stringTag = potentialUint8array?.[Symbol.toStringTag] ??
+ Object.prototype.toString.call(potentialUint8array);
+ if (stringTag === 'Uint8Array') {
+ return potentialUint8array;
+ }
+ if (ArrayBuffer.isView(potentialUint8array)) {
+ return new Uint8Array(potentialUint8array.buffer.slice(potentialUint8array.byteOffset, potentialUint8array.byteOffset + potentialUint8array.byteLength));
+ }
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return new Uint8Array(potentialUint8array);
+ }
+ throw new BSONError(`Cannot make a Uint8Array from ${String(potentialUint8array)}`);
+ },
+ allocate(size) {
+ if (typeof size !== 'number') {
+ throw new TypeError(`The "size" argument must be of type number. Received ${String(size)}`);
+ }
+ return new Uint8Array(size);
+ },
+ allocateUnsafe(size) {
+ return webByteUtils.allocate(size);
+ },
+ equals(a, b) {
+ if (a.byteLength !== b.byteLength) {
+ return false;
+ }
+ for (let i = 0; i < a.byteLength; i++) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+ return true;
+ },
+ fromNumberArray(array) {
+ return Uint8Array.from(array);
+ },
+ fromBase64(base64) {
+ return Uint8Array.from(atob(base64), c => c.charCodeAt(0));
+ },
+ toBase64(uint8array) {
+ return btoa(webByteUtils.toISO88591(uint8array));
+ },
+ fromISO88591(codePoints) {
+ return Uint8Array.from(codePoints, c => c.charCodeAt(0) & 0xff);
+ },
+ toISO88591(uint8array) {
+ return Array.from(Uint16Array.from(uint8array), b => String.fromCharCode(b)).join('');
+ },
+ fromHex(hex) {
+ const evenLengthHex = hex.length % 2 === 0 ? hex : hex.slice(0, hex.length - 1);
+ const buffer = [];
+ for (let i = 0; i < evenLengthHex.length; i += 2) {
+ const firstDigit = evenLengthHex[i];
+ const secondDigit = evenLengthHex[i + 1];
+ if (!HEX_DIGIT.test(firstDigit)) {
+ break;
+ }
+ if (!HEX_DIGIT.test(secondDigit)) {
+ break;
+ }
+ const hexDigit = Number.parseInt(`${firstDigit}${secondDigit}`, 16);
+ buffer.push(hexDigit);
+ }
+ return Uint8Array.from(buffer);
+ },
+ toHex(uint8array) {
+ return Array.from(uint8array, byte => byte.toString(16).padStart(2, '0')).join('');
+ },
+ toUTF8(uint8array, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(uint8array, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ return parseUtf8(uint8array, start, end, fatal);
+ },
+ utf8ByteLength(input) {
+ return new TextEncoder().encode(input).byteLength;
+ },
+ encodeUTF8Into(uint8array, source, byteOffset) {
+ const bytes = new TextEncoder().encode(source);
+ uint8array.set(bytes, byteOffset);
+ return bytes.byteLength;
+ },
+ randomBytes: webRandomBytes
+};
+
+const hasGlobalBuffer = typeof Buffer === 'function' && Buffer.prototype?._isBuffer !== true;
+const ByteUtils = hasGlobalBuffer ? nodeJsByteUtils : webByteUtils;
+
+class BSONValue {
+ get [Symbol.for('@@mdb.bson.version')]() {
+ return BSON_MAJOR_VERSION;
+ }
+ [Symbol.for('nodejs.util.inspect.custom')](depth, options, inspect) {
+ return this.inspect(depth, options, inspect);
+ }
+}
+
+class Binary extends BSONValue {
+ get _bsontype() {
+ return 'Binary';
+ }
+ constructor(buffer, subType) {
+ super();
+ if (!(buffer == null) &&
+ typeof buffer === 'string' &&
+ !ArrayBuffer.isView(buffer) &&
+ !isAnyArrayBuffer(buffer) &&
+ !Array.isArray(buffer)) {
+ throw new BSONError('Binary can only be constructed from Uint8Array or number[]');
+ }
+ this.sub_type = subType ?? Binary.BSON_BINARY_SUBTYPE_DEFAULT;
+ if (buffer == null) {
+ this.buffer = ByteUtils.allocate(Binary.BUFFER_SIZE);
+ this.position = 0;
+ }
+ else {
+ this.buffer = Array.isArray(buffer)
+ ? ByteUtils.fromNumberArray(buffer)
+ : ByteUtils.toLocalBufferType(buffer);
+ this.position = this.buffer.byteLength;
+ }
+ }
+ put(byteValue) {
+ if (typeof byteValue === 'string' && byteValue.length !== 1) {
+ throw new BSONError('only accepts single character String');
+ }
+ else if (typeof byteValue !== 'number' && byteValue.length !== 1)
+ throw new BSONError('only accepts single character Uint8Array or Array');
+ let decodedByte;
+ if (typeof byteValue === 'string') {
+ decodedByte = byteValue.charCodeAt(0);
+ }
+ else if (typeof byteValue === 'number') {
+ decodedByte = byteValue;
+ }
+ else {
+ decodedByte = byteValue[0];
+ }
+ if (decodedByte < 0 || decodedByte > 255) {
+ throw new BSONError('only accepts number in a valid unsigned byte range 0-255');
+ }
+ if (this.buffer.byteLength > this.position) {
+ this.buffer[this.position++] = decodedByte;
+ }
+ else {
+ const newSpace = ByteUtils.allocate(Binary.BUFFER_SIZE + this.buffer.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ this.buffer[this.position++] = decodedByte;
+ }
+ }
+ write(sequence, offset) {
+ offset = typeof offset === 'number' ? offset : this.position;
+ if (this.buffer.byteLength < offset + sequence.length) {
+ const newSpace = ByteUtils.allocate(this.buffer.byteLength + sequence.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ }
+ if (ArrayBuffer.isView(sequence)) {
+ this.buffer.set(ByteUtils.toLocalBufferType(sequence), offset);
+ this.position =
+ offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;
+ }
+ else if (typeof sequence === 'string') {
+ throw new BSONError('input cannot be string');
+ }
+ }
+ read(position, length) {
+ length = length && length > 0 ? length : this.position;
+ return this.buffer.slice(position, position + length);
+ }
+ value() {
+ return this.buffer.length === this.position
+ ? this.buffer
+ : this.buffer.subarray(0, this.position);
+ }
+ length() {
+ return this.position;
+ }
+ toJSON() {
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.buffer.subarray(0, this.position));
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ if (encoding === 'utf8' || encoding === 'utf-8')
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ const base64String = ByteUtils.toBase64(this.buffer);
+ const subType = Number(this.sub_type).toString(16);
+ if (options.legacy) {
+ return {
+ $binary: base64String,
+ $type: subType.length === 1 ? '0' + subType : subType
+ };
+ }
+ return {
+ $binary: {
+ base64: base64String,
+ subType: subType.length === 1 ? '0' + subType : subType
+ }
+ };
+ }
+ toUUID() {
+ if (this.sub_type === Binary.SUBTYPE_UUID) {
+ return new UUID(this.buffer.slice(0, this.position));
+ }
+ throw new BSONError(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${Binary.SUBTYPE_UUID}" is currently supported.`);
+ }
+ static createFromHexString(hex, subType) {
+ return new Binary(ByteUtils.fromHex(hex), subType);
+ }
+ static createFromBase64(base64, subType) {
+ return new Binary(ByteUtils.fromBase64(base64), subType);
+ }
+ static fromExtendedJSON(doc, options) {
+ options = options || {};
+ let data;
+ let type;
+ if ('$binary' in doc) {
+ if (options.legacy && typeof doc.$binary === 'string' && '$type' in doc) {
+ type = doc.$type ? parseInt(doc.$type, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary);
+ }
+ else {
+ if (typeof doc.$binary !== 'string') {
+ type = doc.$binary.subType ? parseInt(doc.$binary.subType, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary.base64);
+ }
+ }
+ }
+ else if ('$uuid' in doc) {
+ type = 4;
+ data = UUID.bytesFromString(doc.$uuid);
+ }
+ if (!data) {
+ throw new BSONError(`Unexpected Binary Extended JSON format ${JSON.stringify(doc)}`);
+ }
+ return type === BSON_BINARY_SUBTYPE_UUID_NEW ? new UUID(data) : new Binary(data, type);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const base64 = ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ const base64Arg = inspect(base64, options);
+ const subTypeArg = inspect(this.sub_type, options);
+ return `Binary.createFromBase64(${base64Arg}, ${subTypeArg})`;
+ }
+}
+Binary.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+Binary.BUFFER_SIZE = 256;
+Binary.SUBTYPE_DEFAULT = 0;
+Binary.SUBTYPE_FUNCTION = 1;
+Binary.SUBTYPE_BYTE_ARRAY = 2;
+Binary.SUBTYPE_UUID_OLD = 3;
+Binary.SUBTYPE_UUID = 4;
+Binary.SUBTYPE_MD5 = 5;
+Binary.SUBTYPE_ENCRYPTED = 6;
+Binary.SUBTYPE_COLUMN = 7;
+Binary.SUBTYPE_SENSITIVE = 8;
+Binary.SUBTYPE_USER_DEFINED = 128;
+const UUID_BYTE_LENGTH = 16;
+const UUID_WITHOUT_DASHES = /^[0-9A-F]{32}$/i;
+const UUID_WITH_DASHES = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
+class UUID extends Binary {
+ constructor(input) {
+ let bytes;
+ if (input == null) {
+ bytes = UUID.generate();
+ }
+ else if (input instanceof UUID) {
+ bytes = ByteUtils.toLocalBufferType(new Uint8Array(input.buffer));
+ }
+ else if (ArrayBuffer.isView(input) && input.byteLength === UUID_BYTE_LENGTH) {
+ bytes = ByteUtils.toLocalBufferType(input);
+ }
+ else if (typeof input === 'string') {
+ bytes = UUID.bytesFromString(input);
+ }
+ else {
+ throw new BSONError('Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).');
+ }
+ super(bytes, BSON_BINARY_SUBTYPE_UUID_NEW);
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ }
+ toHexString(includeDashes = true) {
+ if (includeDashes) {
+ return [
+ ByteUtils.toHex(this.buffer.subarray(0, 4)),
+ ByteUtils.toHex(this.buffer.subarray(4, 6)),
+ ByteUtils.toHex(this.buffer.subarray(6, 8)),
+ ByteUtils.toHex(this.buffer.subarray(8, 10)),
+ ByteUtils.toHex(this.buffer.subarray(10, 16))
+ ].join('-');
+ }
+ return ByteUtils.toHex(this.buffer);
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.id);
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ equals(otherId) {
+ if (!otherId) {
+ return false;
+ }
+ if (otherId instanceof UUID) {
+ return ByteUtils.equals(otherId.id, this.id);
+ }
+ try {
+ return ByteUtils.equals(new UUID(otherId).id, this.id);
+ }
+ catch {
+ return false;
+ }
+ }
+ toBinary() {
+ return new Binary(this.id, Binary.SUBTYPE_UUID);
+ }
+ static generate() {
+ const bytes = ByteUtils.randomBytes(UUID_BYTE_LENGTH);
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
+ return bytes;
+ }
+ static isValid(input) {
+ if (!input) {
+ return false;
+ }
+ if (typeof input === 'string') {
+ return UUID.isValidUUIDString(input);
+ }
+ if (isUint8Array(input)) {
+ return input.byteLength === UUID_BYTE_LENGTH;
+ }
+ return (input._bsontype === 'Binary' &&
+ input.sub_type === this.SUBTYPE_UUID &&
+ input.buffer.byteLength === 16);
+ }
+ static createFromHexString(hexString) {
+ const buffer = UUID.bytesFromString(hexString);
+ return new UUID(buffer);
+ }
+ static createFromBase64(base64) {
+ return new UUID(ByteUtils.fromBase64(base64));
+ }
+ static bytesFromString(representation) {
+ if (!UUID.isValidUUIDString(representation)) {
+ throw new BSONError('UUID string representation must be 32 hex digits or canonical hyphenated representation');
+ }
+ return ByteUtils.fromHex(representation.replace(/-/g, ''));
+ }
+ static isValidUUIDString(representation) {
+ return UUID_WITHOUT_DASHES.test(representation) || UUID_WITH_DASHES.test(representation);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new UUID(${inspect(this.toHexString(), options)})`;
+ }
+}
+
+class Code extends BSONValue {
+ get _bsontype() {
+ return 'Code';
+ }
+ constructor(code, scope) {
+ super();
+ this.code = code.toString();
+ this.scope = scope ?? null;
+ }
+ toJSON() {
+ if (this.scope != null) {
+ return { code: this.code, scope: this.scope };
+ }
+ return { code: this.code };
+ }
+ toExtendedJSON() {
+ if (this.scope) {
+ return { $code: this.code, $scope: this.scope };
+ }
+ return { $code: this.code };
+ }
+ static fromExtendedJSON(doc) {
+ return new Code(doc.$code, doc.$scope);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ let parametersString = inspect(this.code, options);
+ const multiLineFn = parametersString.includes('\n');
+ if (this.scope != null) {
+ parametersString += `,${multiLineFn ? '\n' : ' '}${inspect(this.scope, options)}`;
+ }
+ const endingNewline = multiLineFn && this.scope === null;
+ return `new Code(${multiLineFn ? '\n' : ''}${parametersString}${endingNewline ? '\n' : ''})`;
+ }
+}
+
+function isDBRefLike(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '$id' in value &&
+ value.$id != null &&
+ '$ref' in value &&
+ typeof value.$ref === 'string' &&
+ (!('$db' in value) || ('$db' in value && typeof value.$db === 'string')));
+}
+class DBRef extends BSONValue {
+ get _bsontype() {
+ return 'DBRef';
+ }
+ constructor(collection, oid, db, fields) {
+ super();
+ const parts = collection.split('.');
+ if (parts.length === 2) {
+ db = parts.shift();
+ collection = parts.shift();
+ }
+ this.collection = collection;
+ this.oid = oid;
+ this.db = db;
+ this.fields = fields || {};
+ }
+ get namespace() {
+ return this.collection;
+ }
+ set namespace(value) {
+ this.collection = value;
+ }
+ toJSON() {
+ const o = Object.assign({
+ $ref: this.collection,
+ $id: this.oid
+ }, this.fields);
+ if (this.db != null)
+ o.$db = this.db;
+ return o;
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ let o = {
+ $ref: this.collection,
+ $id: this.oid
+ };
+ if (options.legacy) {
+ return o;
+ }
+ if (this.db)
+ o.$db = this.db;
+ o = Object.assign(o, this.fields);
+ return o;
+ }
+ static fromExtendedJSON(doc) {
+ const copy = Object.assign({}, doc);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(doc.$ref, doc.$id, doc.$db, copy);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const args = [
+ inspect(this.namespace, options),
+ inspect(this.oid, options),
+ ...(this.db ? [inspect(this.db, options)] : []),
+ ...(Object.keys(this.fields).length > 0 ? [inspect(this.fields, options)] : [])
+ ];
+ args[1] = inspect === defaultInspect ? `new ObjectId(${args[1]})` : args[1];
+ return `new DBRef(${args.join(', ')})`;
+ }
+}
+
+function removeLeadingZerosAndExplicitPlus(str) {
+ if (str === '') {
+ return str;
+ }
+ let startIndex = 0;
+ const isNegative = str[startIndex] === '-';
+ const isExplicitlyPositive = str[startIndex] === '+';
+ if (isExplicitlyPositive || isNegative) {
+ startIndex += 1;
+ }
+ let foundInsignificantZero = false;
+ for (; startIndex < str.length && str[startIndex] === '0'; ++startIndex) {
+ foundInsignificantZero = true;
+ }
+ if (!foundInsignificantZero) {
+ return isExplicitlyPositive ? str.slice(1) : str;
+ }
+ return `${isNegative ? '-' : ''}${str.length === startIndex ? '0' : str.slice(startIndex)}`;
+}
+function validateStringCharacters(str, radix) {
+ radix = radix ?? 10;
+ const validCharacters = '0123456789abcdefghijklmnopqrstuvwxyz'.slice(0, radix);
+ const regex = new RegExp(`[^-+${validCharacters}]`, 'i');
+ return regex.test(str) ? false : str;
+}
+
+let wasm = undefined;
+try {
+ wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])), {}).exports;
+}
+catch {
+}
+const TWO_PWR_16_DBL = 1 << 16;
+const TWO_PWR_24_DBL = 1 << 24;
+const TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
+const TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
+const TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
+const INT_CACHE = {};
+const UINT_CACHE = {};
+const MAX_INT64_STRING_LENGTH = 20;
+const DECIMAL_REG_EX = /^(\+?0|(\+|-)?[1-9][0-9]*)$/;
+class Long extends BSONValue {
+ get _bsontype() {
+ return 'Long';
+ }
+ get __isLong__() {
+ return true;
+ }
+ constructor(lowOrValue = 0, highOrUnsigned, unsigned) {
+ super();
+ const unsignedBool = typeof highOrUnsigned === 'boolean' ? highOrUnsigned : Boolean(unsigned);
+ const high = typeof highOrUnsigned === 'number' ? highOrUnsigned : 0;
+ const res = typeof lowOrValue === 'string'
+ ? Long.fromString(lowOrValue, unsignedBool)
+ : typeof lowOrValue === 'bigint'
+ ? Long.fromBigInt(lowOrValue, unsignedBool)
+ : { low: lowOrValue | 0, high: high | 0, unsigned: unsignedBool };
+ this.low = res.low;
+ this.high = res.high;
+ this.unsigned = res.unsigned;
+ }
+ static fromBits(lowBits, highBits, unsigned) {
+ return new Long(lowBits, highBits, unsigned);
+ }
+ static fromInt(value, unsigned) {
+ let obj, cachedObj, cache;
+ if (unsigned) {
+ value >>>= 0;
+ if ((cache = 0 <= value && value < 256)) {
+ cachedObj = UINT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, (value | 0) < 0 ? -1 : 0, true);
+ if (cache)
+ UINT_CACHE[value] = obj;
+ return obj;
+ }
+ else {
+ value |= 0;
+ if ((cache = -128 <= value && value < 128)) {
+ cachedObj = INT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, value < 0 ? -1 : 0, false);
+ if (cache)
+ INT_CACHE[value] = obj;
+ return obj;
+ }
+ }
+ static fromNumber(value, unsigned) {
+ if (isNaN(value))
+ return unsigned ? Long.UZERO : Long.ZERO;
+ if (unsigned) {
+ if (value < 0)
+ return Long.UZERO;
+ if (value >= TWO_PWR_64_DBL)
+ return Long.MAX_UNSIGNED_VALUE;
+ }
+ else {
+ if (value <= -TWO_PWR_63_DBL)
+ return Long.MIN_VALUE;
+ if (value + 1 >= TWO_PWR_63_DBL)
+ return Long.MAX_VALUE;
+ }
+ if (value < 0)
+ return Long.fromNumber(-value, unsigned).neg();
+ return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
+ }
+ static fromBigInt(value, unsigned) {
+ const FROM_BIGINT_BIT_MASK = BigInt(0xffffffff);
+ const FROM_BIGINT_BIT_SHIFT = BigInt(32);
+ return new Long(Number(value & FROM_BIGINT_BIT_MASK), Number((value >> FROM_BIGINT_BIT_SHIFT) & FROM_BIGINT_BIT_MASK), unsigned);
+ }
+ static _fromString(str, unsigned, radix) {
+ if (str.length === 0)
+ throw new BSONError('empty string');
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ let p;
+ if ((p = str.indexOf('-')) > 0)
+ throw new BSONError('interior hyphen');
+ else if (p === 0) {
+ return Long._fromString(str.substring(1), unsigned, radix).neg();
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 8));
+ let result = Long.ZERO;
+ for (let i = 0; i < str.length; i += 8) {
+ const size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ const power = Long.fromNumber(Math.pow(radix, size));
+ result = result.mul(power).add(Long.fromNumber(value));
+ }
+ else {
+ result = result.mul(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ result.unsigned = unsigned;
+ return result;
+ }
+ static fromStringStrict(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str.trim() !== str) {
+ throw new BSONError(`Input: '${str}' contains leading and/or trailing whitespace`);
+ }
+ if (!validateStringCharacters(str, radix)) {
+ throw new BSONError(`Input: '${str}' contains invalid characters for radix: ${radix}`);
+ }
+ const cleanedStr = removeLeadingZerosAndExplicitPlus(str);
+ const result = Long._fromString(cleanedStr, unsigned, radix);
+ if (result.toString(radix).toLowerCase() !== cleanedStr.toLowerCase()) {
+ throw new BSONError(`Input: ${str} is not representable as ${result.unsigned ? 'an unsigned' : 'a signed'} 64-bit Long ${radix != null ? `with radix: ${radix}` : ''}`);
+ }
+ return result;
+ }
+ static fromString(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str === 'NaN' && radix < 24) {
+ return Long.ZERO;
+ }
+ else if ((str === 'Infinity' || str === '+Infinity' || str === '-Infinity') && radix < 35) {
+ return Long.ZERO;
+ }
+ return Long._fromString(str, unsigned, radix);
+ }
+ static fromBytes(bytes, unsigned, le) {
+ return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
+ }
+ static fromBytesLE(bytes, unsigned) {
+ return new Long(bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24), bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24), unsigned);
+ }
+ static fromBytesBE(bytes, unsigned) {
+ return new Long((bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7], (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3], unsigned);
+ }
+ static isLong(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '__isLong__' in value &&
+ value.__isLong__ === true);
+ }
+ static fromValue(val, unsigned) {
+ if (typeof val === 'number')
+ return Long.fromNumber(val, unsigned);
+ if (typeof val === 'string')
+ return Long.fromString(val, unsigned);
+ return Long.fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);
+ }
+ add(addend) {
+ if (!Long.isLong(addend))
+ addend = Long.fromValue(addend);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = addend.high >>> 16;
+ const b32 = addend.high & 0xffff;
+ const b16 = addend.low >>> 16;
+ const b00 = addend.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 + b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ and(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low & other.low, this.high & other.high, this.unsigned);
+ }
+ compare(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.eq(other))
+ return 0;
+ const thisNeg = this.isNegative(), otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg)
+ return -1;
+ if (!thisNeg && otherNeg)
+ return 1;
+ if (!this.unsigned)
+ return this.sub(other).isNegative() ? -1 : 1;
+ return other.high >>> 0 > this.high >>> 0 ||
+ (other.high === this.high && other.low >>> 0 > this.low >>> 0)
+ ? -1
+ : 1;
+ }
+ comp(other) {
+ return this.compare(other);
+ }
+ divide(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (divisor.isZero())
+ throw new BSONError('division by zero');
+ if (wasm) {
+ if (!this.unsigned &&
+ this.high === -0x80000000 &&
+ divisor.low === -1 &&
+ divisor.high === -1) {
+ return this;
+ }
+ const low = (this.unsigned ? wasm.div_u : wasm.div_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (this.isZero())
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ let approx, rem, res;
+ if (!this.unsigned) {
+ if (this.eq(Long.MIN_VALUE)) {
+ if (divisor.eq(Long.ONE) || divisor.eq(Long.NEG_ONE))
+ return Long.MIN_VALUE;
+ else if (divisor.eq(Long.MIN_VALUE))
+ return Long.ONE;
+ else {
+ const halfThis = this.shr(1);
+ approx = halfThis.div(divisor).shl(1);
+ if (approx.eq(Long.ZERO)) {
+ return divisor.isNegative() ? Long.ONE : Long.NEG_ONE;
+ }
+ else {
+ rem = this.sub(divisor.mul(approx));
+ res = approx.add(rem.div(divisor));
+ return res;
+ }
+ }
+ }
+ else if (divisor.eq(Long.MIN_VALUE))
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ if (this.isNegative()) {
+ if (divisor.isNegative())
+ return this.neg().div(divisor.neg());
+ return this.neg().div(divisor).neg();
+ }
+ else if (divisor.isNegative())
+ return this.div(divisor.neg()).neg();
+ res = Long.ZERO;
+ }
+ else {
+ if (!divisor.unsigned)
+ divisor = divisor.toUnsigned();
+ if (divisor.gt(this))
+ return Long.UZERO;
+ if (divisor.gt(this.shru(1)))
+ return Long.UONE;
+ res = Long.UZERO;
+ }
+ rem = this;
+ while (rem.gte(divisor)) {
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
+ const log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ const delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
+ let approxRes = Long.fromNumber(approx);
+ let approxRem = approxRes.mul(divisor);
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx, this.unsigned);
+ approxRem = approxRes.mul(divisor);
+ }
+ if (approxRes.isZero())
+ approxRes = Long.ONE;
+ res = res.add(approxRes);
+ rem = rem.sub(approxRem);
+ }
+ return res;
+ }
+ div(divisor) {
+ return this.divide(divisor);
+ }
+ equals(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
+ return false;
+ return this.high === other.high && this.low === other.low;
+ }
+ eq(other) {
+ return this.equals(other);
+ }
+ getHighBits() {
+ return this.high;
+ }
+ getHighBitsUnsigned() {
+ return this.high >>> 0;
+ }
+ getLowBits() {
+ return this.low;
+ }
+ getLowBitsUnsigned() {
+ return this.low >>> 0;
+ }
+ getNumBitsAbs() {
+ if (this.isNegative()) {
+ return this.eq(Long.MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
+ }
+ const val = this.high !== 0 ? this.high : this.low;
+ let bit;
+ for (bit = 31; bit > 0; bit--)
+ if ((val & (1 << bit)) !== 0)
+ break;
+ return this.high !== 0 ? bit + 33 : bit + 1;
+ }
+ greaterThan(other) {
+ return this.comp(other) > 0;
+ }
+ gt(other) {
+ return this.greaterThan(other);
+ }
+ greaterThanOrEqual(other) {
+ return this.comp(other) >= 0;
+ }
+ gte(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ ge(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ isEven() {
+ return (this.low & 1) === 0;
+ }
+ isNegative() {
+ return !this.unsigned && this.high < 0;
+ }
+ isOdd() {
+ return (this.low & 1) === 1;
+ }
+ isPositive() {
+ return this.unsigned || this.high >= 0;
+ }
+ isZero() {
+ return this.high === 0 && this.low === 0;
+ }
+ lessThan(other) {
+ return this.comp(other) < 0;
+ }
+ lt(other) {
+ return this.lessThan(other);
+ }
+ lessThanOrEqual(other) {
+ return this.comp(other) <= 0;
+ }
+ lte(other) {
+ return this.lessThanOrEqual(other);
+ }
+ modulo(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (wasm) {
+ const low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ return this.sub(this.div(divisor).mul(divisor));
+ }
+ mod(divisor) {
+ return this.modulo(divisor);
+ }
+ rem(divisor) {
+ return this.modulo(divisor);
+ }
+ multiply(multiplier) {
+ if (this.isZero())
+ return Long.ZERO;
+ if (!Long.isLong(multiplier))
+ multiplier = Long.fromValue(multiplier);
+ if (wasm) {
+ const low = wasm.mul(this.low, this.high, multiplier.low, multiplier.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (multiplier.isZero())
+ return Long.ZERO;
+ if (this.eq(Long.MIN_VALUE))
+ return multiplier.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (multiplier.eq(Long.MIN_VALUE))
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (this.isNegative()) {
+ if (multiplier.isNegative())
+ return this.neg().mul(multiplier.neg());
+ else
+ return this.neg().mul(multiplier).neg();
+ }
+ else if (multiplier.isNegative())
+ return this.mul(multiplier.neg()).neg();
+ if (this.lt(Long.TWO_PWR_24) && multiplier.lt(Long.TWO_PWR_24))
+ return Long.fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = multiplier.high >>> 16;
+ const b32 = multiplier.high & 0xffff;
+ const b16 = multiplier.low >>> 16;
+ const b00 = multiplier.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ mul(multiplier) {
+ return this.multiply(multiplier);
+ }
+ negate() {
+ if (!this.unsigned && this.eq(Long.MIN_VALUE))
+ return Long.MIN_VALUE;
+ return this.not().add(Long.ONE);
+ }
+ neg() {
+ return this.negate();
+ }
+ not() {
+ return Long.fromBits(~this.low, ~this.high, this.unsigned);
+ }
+ notEquals(other) {
+ return !this.equals(other);
+ }
+ neq(other) {
+ return this.notEquals(other);
+ }
+ ne(other) {
+ return this.notEquals(other);
+ }
+ or(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low | other.low, this.high | other.high, this.unsigned);
+ }
+ shiftLeft(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);
+ else
+ return Long.fromBits(0, this.low << (numBits - 32), this.unsigned);
+ }
+ shl(numBits) {
+ return this.shiftLeft(numBits);
+ }
+ shiftRight(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);
+ else
+ return Long.fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);
+ }
+ shr(numBits) {
+ return this.shiftRight(numBits);
+ }
+ shiftRightUnsigned(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ numBits &= 63;
+ if (numBits === 0)
+ return this;
+ else {
+ const high = this.high;
+ if (numBits < 32) {
+ const low = this.low;
+ return Long.fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);
+ }
+ else if (numBits === 32)
+ return Long.fromBits(high, 0, this.unsigned);
+ else
+ return Long.fromBits(high >>> (numBits - 32), 0, this.unsigned);
+ }
+ }
+ shr_u(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ shru(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ subtract(subtrahend) {
+ if (!Long.isLong(subtrahend))
+ subtrahend = Long.fromValue(subtrahend);
+ return this.add(subtrahend.neg());
+ }
+ sub(subtrahend) {
+ return this.subtract(subtrahend);
+ }
+ toInt() {
+ return this.unsigned ? this.low >>> 0 : this.low;
+ }
+ toNumber() {
+ if (this.unsigned)
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
+ }
+ toBigInt() {
+ return BigInt(this.toString());
+ }
+ toBytes(le) {
+ return le ? this.toBytesLE() : this.toBytesBE();
+ }
+ toBytesLE() {
+ const hi = this.high, lo = this.low;
+ return [
+ lo & 0xff,
+ (lo >>> 8) & 0xff,
+ (lo >>> 16) & 0xff,
+ lo >>> 24,
+ hi & 0xff,
+ (hi >>> 8) & 0xff,
+ (hi >>> 16) & 0xff,
+ hi >>> 24
+ ];
+ }
+ toBytesBE() {
+ const hi = this.high, lo = this.low;
+ return [
+ hi >>> 24,
+ (hi >>> 16) & 0xff,
+ (hi >>> 8) & 0xff,
+ hi & 0xff,
+ lo >>> 24,
+ (lo >>> 16) & 0xff,
+ (lo >>> 8) & 0xff,
+ lo & 0xff
+ ];
+ }
+ toSigned() {
+ if (!this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, false);
+ }
+ toString(radix) {
+ radix = radix || 10;
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ if (this.isZero())
+ return '0';
+ if (this.isNegative()) {
+ if (this.eq(Long.MIN_VALUE)) {
+ const radixLong = Long.fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
+ return div.toString(radix) + rem1.toInt().toString(radix);
+ }
+ else
+ return '-' + this.neg().toString(radix);
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 6), this.unsigned);
+ let rem = this;
+ let result = '';
+ while (true) {
+ const remDiv = rem.div(radixToPower);
+ const intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0;
+ let digits = intval.toString(radix);
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ }
+ else {
+ while (digits.length < 6)
+ digits = '0' + digits;
+ result = '' + digits + result;
+ }
+ }
+ }
+ toUnsigned() {
+ if (this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, true);
+ }
+ xor(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
+ }
+ eqz() {
+ return this.isZero();
+ }
+ le(other) {
+ return this.lessThanOrEqual(other);
+ }
+ toExtendedJSON(options) {
+ if (options && options.relaxed)
+ return this.toNumber();
+ return { $numberLong: this.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ const { useBigInt64 = false, relaxed = true } = { ...options };
+ if (doc.$numberLong.length > MAX_INT64_STRING_LENGTH) {
+ throw new BSONError('$numberLong string is too long');
+ }
+ if (!DECIMAL_REG_EX.test(doc.$numberLong)) {
+ throw new BSONError(`$numberLong string "${doc.$numberLong}" is in an invalid format`);
+ }
+ if (useBigInt64) {
+ const bigIntResult = BigInt(doc.$numberLong);
+ return BigInt.asIntN(64, bigIntResult);
+ }
+ const longResult = Long.fromString(doc.$numberLong);
+ if (relaxed) {
+ return longResult.toNumber();
+ }
+ return longResult;
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const longVal = inspect(this.toString(), options);
+ const unsignedVal = this.unsigned ? `, ${inspect(this.unsigned, options)}` : '';
+ return `new Long(${longVal}${unsignedVal})`;
+ }
+}
+Long.TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
+Long.MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
+Long.ZERO = Long.fromInt(0);
+Long.UZERO = Long.fromInt(0, true);
+Long.ONE = Long.fromInt(1);
+Long.UONE = Long.fromInt(1, true);
+Long.NEG_ONE = Long.fromInt(-1);
+Long.MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
+Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
+
+const PARSE_STRING_REGEXP = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/;
+const PARSE_INF_REGEXP = /^(\+|-)?(Infinity|inf)$/i;
+const PARSE_NAN_REGEXP = /^(\+|-)?NaN$/i;
+const EXPONENT_MAX = 6111;
+const EXPONENT_MIN = -6176;
+const EXPONENT_BIAS = 6176;
+const MAX_DIGITS = 34;
+const NAN_BUFFER = ByteUtils.fromNumberArray([
+ 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_NEGATIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_POSITIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const EXPONENT_REGEX = /^([-+])?(\d+)?$/;
+const COMBINATION_MASK = 0x1f;
+const EXPONENT_MASK = 0x3fff;
+const COMBINATION_INFINITY = 30;
+const COMBINATION_NAN = 31;
+function isDigit(value) {
+ return !isNaN(parseInt(value, 10));
+}
+function divideu128(value) {
+ const DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ let _rem = Long.fromNumber(0);
+ if (!value.parts[0] && !value.parts[1] && !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+ for (let i = 0; i <= 3; i++) {
+ _rem = _rem.shiftLeft(32);
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low;
+ _rem = _rem.modulo(DIVISOR);
+ }
+ return { quotient: value, rem: _rem };
+}
+function multiply64x2(left, right) {
+ if (!left && !right) {
+ return { high: Long.fromNumber(0), low: Long.fromNumber(0) };
+ }
+ const leftHigh = left.shiftRightUnsigned(32);
+ const leftLow = new Long(left.getLowBits(), 0);
+ const rightHigh = right.shiftRightUnsigned(32);
+ const rightLow = new Long(right.getLowBits(), 0);
+ let productHigh = leftHigh.multiply(rightHigh);
+ let productMid = leftHigh.multiply(rightLow);
+ const productMid2 = leftLow.multiply(rightHigh);
+ let productLow = leftLow.multiply(rightLow);
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0)
+ .add(productMid2)
+ .add(productLow.shiftRightUnsigned(32));
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+ return { high: productHigh, low: productLow };
+}
+function lessThan(left, right) {
+ const uhleft = left.high >>> 0;
+ const uhright = right.high >>> 0;
+ if (uhleft < uhright) {
+ return true;
+ }
+ else if (uhleft === uhright) {
+ const ulleft = left.low >>> 0;
+ const ulright = right.low >>> 0;
+ if (ulleft < ulright)
+ return true;
+ }
+ return false;
+}
+function invalidErr(string, message) {
+ throw new BSONError(`"${string}" is not a valid Decimal128 string - ${message}`);
+}
+class Decimal128 extends BSONValue {
+ get _bsontype() {
+ return 'Decimal128';
+ }
+ constructor(bytes) {
+ super();
+ if (typeof bytes === 'string') {
+ this.bytes = Decimal128.fromString(bytes).bytes;
+ }
+ else if (isUint8Array(bytes)) {
+ if (bytes.byteLength !== 16) {
+ throw new BSONError('Decimal128 must take a Buffer of 16 bytes');
+ }
+ this.bytes = bytes;
+ }
+ else {
+ throw new BSONError('Decimal128 must take a Buffer or string');
+ }
+ }
+ static fromString(representation) {
+ return Decimal128._fromString(representation, { allowRounding: false });
+ }
+ static fromStringWithRounding(representation) {
+ return Decimal128._fromString(representation, { allowRounding: true });
+ }
+ static _fromString(representation, options) {
+ let isNegative = false;
+ let sawSign = false;
+ let sawRadix = false;
+ let foundNonZero = false;
+ let significantDigits = 0;
+ let nDigitsRead = 0;
+ let nDigits = 0;
+ let radixPosition = 0;
+ let firstNonZero = 0;
+ const digits = [0];
+ let nDigitsStored = 0;
+ let digitsInsert = 0;
+ let lastDigit = 0;
+ let exponent = 0;
+ let significandHigh = new Long(0, 0);
+ let significandLow = new Long(0, 0);
+ let biasedExponent = 0;
+ let index = 0;
+ if (representation.length >= 7000) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ const stringMatch = representation.match(PARSE_STRING_REGEXP);
+ const infMatch = representation.match(PARSE_INF_REGEXP);
+ const nanMatch = representation.match(PARSE_NAN_REGEXP);
+ if ((!stringMatch && !infMatch && !nanMatch) || representation.length === 0) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ if (stringMatch) {
+ const unsignedNumber = stringMatch[2];
+ const e = stringMatch[4];
+ const expSign = stringMatch[5];
+ const expNumber = stringMatch[6];
+ if (e && expNumber === undefined)
+ invalidErr(representation, 'missing exponent power');
+ if (e && unsignedNumber === undefined)
+ invalidErr(representation, 'missing exponent base');
+ if (e === undefined && (expSign || expNumber)) {
+ invalidErr(representation, 'missing e before exponent');
+ }
+ }
+ if (representation[index] === '+' || representation[index] === '-') {
+ sawSign = true;
+ isNegative = representation[index++] === '-';
+ }
+ if (!isDigit(representation[index]) && representation[index] !== '.') {
+ if (representation[index] === 'i' || representation[index] === 'I') {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ else if (representation[index] === 'N') {
+ return new Decimal128(NAN_BUFFER);
+ }
+ }
+ while (isDigit(representation[index]) || representation[index] === '.') {
+ if (representation[index] === '.') {
+ if (sawRadix)
+ invalidErr(representation, 'contains multiple periods');
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+ if (nDigitsStored < MAX_DIGITS) {
+ if (representation[index] !== '0' || foundNonZero) {
+ if (!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+ foundNonZero = true;
+ digits[digitsInsert++] = parseInt(representation[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+ if (foundNonZero)
+ nDigits = nDigits + 1;
+ if (sawRadix)
+ radixPosition = radixPosition + 1;
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+ if (sawRadix && !nDigitsRead)
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ if (representation[index] === 'e' || representation[index] === 'E') {
+ const match = representation.substr(++index).match(EXPONENT_REGEX);
+ if (!match || !match[2])
+ return new Decimal128(NAN_BUFFER);
+ exponent = parseInt(match[0], 10);
+ index = index + match[0].length;
+ }
+ if (representation[index])
+ return new Decimal128(NAN_BUFFER);
+ if (!nDigitsStored) {
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ }
+ else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+ if (significantDigits !== 1) {
+ while (representation[firstNonZero + significantDigits - 1 + Number(sawSign) + Number(sawRadix)] === '0') {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+ if (exponent <= radixPosition && radixPosition > exponent + (1 << 14)) {
+ exponent = EXPONENT_MIN;
+ }
+ else {
+ exponent = exponent - radixPosition;
+ }
+ while (exponent > EXPONENT_MAX) {
+ lastDigit = lastDigit + 1;
+ if (lastDigit >= MAX_DIGITS) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ exponent = exponent - 1;
+ }
+ if (options.allowRounding) {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0 && significantDigits < nDigitsStored) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+ if (nDigitsStored < nDigits) {
+ nDigits = nDigits - 1;
+ }
+ else {
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ const digitsString = digits.join('');
+ if (digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ let endOfString = nDigitsRead;
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ let roundBit = 0;
+ if (roundDigit >= 5) {
+ roundBit = 1;
+ if (roundDigit === 5) {
+ roundBit = digits[lastDigit] % 2 === 1 ? 1 : 0;
+ for (let i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if (parseInt(representation[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+ if (roundBit) {
+ let dIdx = lastDigit;
+ for (; dIdx >= 0; dIdx--) {
+ if (++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+ if (dIdx === 0) {
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ }
+ else {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ }
+ }
+ else {
+ break;
+ }
+ }
+ }
+ }
+ }
+ else {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MIN;
+ break;
+ }
+ invalidErr(representation, 'exponent underflow');
+ }
+ if (nDigitsStored < nDigits) {
+ if (representation[nDigits - 1 + Number(sawSign) + Number(sawRadix)] !== '0' &&
+ significantDigits !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ nDigits = nDigits - 1;
+ }
+ else {
+ if (digits[lastDigit] !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ if (roundDigit !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ }
+ }
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ if (significantDigits === 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ }
+ else if (lastDigit < 17) {
+ let dIdx = 0;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ else {
+ let dIdx = 0;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ const significand = multiply64x2(significandHigh, Long.fromString('100000000000000000'));
+ significand.low = significand.low.add(significandLow);
+ if (lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+ biasedExponent = exponent + EXPONENT_BIAS;
+ const dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+ if (significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber(1))) {
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47)));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ }
+ else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+ dec.low = significand.low;
+ if (isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+ const buffer = ByteUtils.allocateUnsafe(16);
+ index = 0;
+ buffer[index++] = dec.low.low & 0xff;
+ buffer[index++] = (dec.low.low >> 8) & 0xff;
+ buffer[index++] = (dec.low.low >> 16) & 0xff;
+ buffer[index++] = (dec.low.low >> 24) & 0xff;
+ buffer[index++] = dec.low.high & 0xff;
+ buffer[index++] = (dec.low.high >> 8) & 0xff;
+ buffer[index++] = (dec.low.high >> 16) & 0xff;
+ buffer[index++] = (dec.low.high >> 24) & 0xff;
+ buffer[index++] = dec.high.low & 0xff;
+ buffer[index++] = (dec.high.low >> 8) & 0xff;
+ buffer[index++] = (dec.high.low >> 16) & 0xff;
+ buffer[index++] = (dec.high.low >> 24) & 0xff;
+ buffer[index++] = dec.high.high & 0xff;
+ buffer[index++] = (dec.high.high >> 8) & 0xff;
+ buffer[index++] = (dec.high.high >> 16) & 0xff;
+ buffer[index++] = (dec.high.high >> 24) & 0xff;
+ return new Decimal128(buffer);
+ }
+ toString() {
+ let biased_exponent;
+ let significand_digits = 0;
+ const significand = new Array(36);
+ for (let i = 0; i < significand.length; i++)
+ significand[i] = 0;
+ let index = 0;
+ let is_zero = false;
+ let significand_msb;
+ let significand128 = { parts: [0, 0, 0, 0] };
+ let j, k;
+ const string = [];
+ index = 0;
+ const buffer = this.bytes;
+ const low = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midl = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midh = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const high = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ index = 0;
+ const dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high)
+ };
+ if (dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+ const combination = (high >> 26) & COMBINATION_MASK;
+ if (combination >> 3 === 3) {
+ if (combination === COMBINATION_INFINITY) {
+ return string.join('') + 'Infinity';
+ }
+ else if (combination === COMBINATION_NAN) {
+ return 'NaN';
+ }
+ else {
+ biased_exponent = (high >> 15) & EXPONENT_MASK;
+ significand_msb = 0x08 + ((high >> 14) & 0x01);
+ }
+ }
+ else {
+ significand_msb = (high >> 14) & 0x07;
+ biased_exponent = (high >> 17) & EXPONENT_MASK;
+ }
+ const exponent = biased_exponent - EXPONENT_BIAS;
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+ if (significand128.parts[0] === 0 &&
+ significand128.parts[1] === 0 &&
+ significand128.parts[2] === 0 &&
+ significand128.parts[3] === 0) {
+ is_zero = true;
+ }
+ else {
+ for (k = 3; k >= 0; k--) {
+ let least_digits = 0;
+ const result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low;
+ if (!least_digits)
+ continue;
+ for (j = 8; j >= 0; j--) {
+ significand[k * 9 + j] = least_digits % 10;
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+ if (is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ }
+ else {
+ significand_digits = 36;
+ while (!significand[index]) {
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+ const scientific_exponent = significand_digits - 1 + exponent;
+ if (scientific_exponent >= 34 || scientific_exponent <= -7 || exponent > 0) {
+ if (significand_digits > 34) {
+ string.push(`${0}`);
+ if (exponent > 0)
+ string.push(`E+${exponent}`);
+ else if (exponent < 0)
+ string.push(`E${exponent}`);
+ return string.join('');
+ }
+ string.push(`${significand[index++]}`);
+ significand_digits = significand_digits - 1;
+ if (significand_digits) {
+ string.push('.');
+ }
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ string.push('E');
+ if (scientific_exponent > 0) {
+ string.push(`+${scientific_exponent}`);
+ }
+ else {
+ string.push(`${scientific_exponent}`);
+ }
+ }
+ else {
+ if (exponent >= 0) {
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ let radix_position = significand_digits + exponent;
+ if (radix_position > 0) {
+ for (let i = 0; i < radix_position; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ string.push('0');
+ }
+ string.push('.');
+ while (radix_position++ < 0) {
+ string.push('0');
+ }
+ for (let i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ }
+ return string.join('');
+ }
+ toJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ toExtendedJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ static fromExtendedJSON(doc) {
+ return Decimal128.fromString(doc.$numberDecimal);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const d128string = inspect(this.toString(), options);
+ return `new Decimal128(${d128string})`;
+ }
+}
+
+class Double extends BSONValue {
+ get _bsontype() {
+ return 'Double';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value;
+ }
+ static fromString(value) {
+ const coercedValue = Number(value);
+ if (value === 'NaN')
+ return new Double(NaN);
+ if (value === 'Infinity')
+ return new Double(Infinity);
+ if (value === '-Infinity')
+ return new Double(-Infinity);
+ if (!Number.isFinite(coercedValue)) {
+ throw new BSONError(`Input: ${value} is not representable as a Double`);
+ }
+ if (value.trim() !== value) {
+ throw new BSONError(`Input: '${value}' contains whitespace`);
+ }
+ if (value === '') {
+ throw new BSONError(`Input is an empty string`);
+ }
+ if (/[^-0-9.+eE]/.test(value)) {
+ throw new BSONError(`Input: '${value}' is not in decimal or exponential notation`);
+ }
+ return new Double(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toExtendedJSON(options) {
+ if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
+ return this.value;
+ }
+ if (Object.is(Math.sign(this.value), -0)) {
+ return { $numberDouble: '-0.0' };
+ }
+ return {
+ $numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
+ };
+ }
+ static fromExtendedJSON(doc, options) {
+ const doubleValue = parseFloat(doc.$numberDouble);
+ return options && options.relaxed ? doubleValue : new Double(doubleValue);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Double(${inspect(this.value, options)})`;
+ }
+}
+
+class Int32 extends BSONValue {
+ get _bsontype() {
+ return 'Int32';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value | 0;
+ }
+ static fromString(value) {
+ const cleanedValue = removeLeadingZerosAndExplicitPlus(value);
+ const coercedValue = Number(value);
+ if (BSON_INT32_MAX < coercedValue) {
+ throw new BSONError(`Input: '${value}' is larger than the maximum value for Int32`);
+ }
+ else if (BSON_INT32_MIN > coercedValue) {
+ throw new BSONError(`Input: '${value}' is smaller than the minimum value for Int32`);
+ }
+ else if (!Number.isSafeInteger(coercedValue)) {
+ throw new BSONError(`Input: '${value}' is not a safe integer`);
+ }
+ else if (coercedValue.toString() !== cleanedValue) {
+ throw new BSONError(`Input: '${value}' is not a valid Int32 string`);
+ }
+ return new Int32(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON(options) {
+ if (options && (options.relaxed || options.legacy))
+ return this.value;
+ return { $numberInt: this.value.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ return options && options.relaxed ? parseInt(doc.$numberInt, 10) : new Int32(doc.$numberInt);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Int32(${inspect(this.value, options)})`;
+ }
+}
+
+class MaxKey extends BSONValue {
+ get _bsontype() {
+ return 'MaxKey';
+ }
+ toExtendedJSON() {
+ return { $maxKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MaxKey();
+ }
+ inspect() {
+ return 'new MaxKey()';
+ }
+}
+
+class MinKey extends BSONValue {
+ get _bsontype() {
+ return 'MinKey';
+ }
+ toExtendedJSON() {
+ return { $minKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MinKey();
+ }
+ inspect() {
+ return 'new MinKey()';
+ }
+}
+
+const FLOAT = new Float64Array(1);
+const FLOAT_BYTES = new Uint8Array(FLOAT.buffer, 0, 8);
+FLOAT[0] = -1;
+const isBigEndian = FLOAT_BYTES[7] === 0;
+const NumberUtils = {
+ getNonnegativeInt32LE(source, offset) {
+ if (source[offset + 3] > 127) {
+ throw new RangeError(`Size cannot be negative at offset: ${offset}`);
+ }
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getInt32LE(source, offset) {
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getUint32LE(source, offset) {
+ return (source[offset] +
+ source[offset + 1] * 256 +
+ source[offset + 2] * 65536 +
+ source[offset + 3] * 16777216);
+ },
+ getUint32BE(source, offset) {
+ return (source[offset + 3] +
+ source[offset + 2] * 256 +
+ source[offset + 1] * 65536 +
+ source[offset] * 16777216);
+ },
+ getBigInt64LE(source, offset) {
+ const lo = NumberUtils.getUint32LE(source, offset);
+ const hi = NumberUtils.getUint32LE(source, offset + 4);
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo);
+ },
+ getFloat64LE: isBigEndian
+ ? (source, offset) => {
+ FLOAT_BYTES[7] = source[offset];
+ FLOAT_BYTES[6] = source[offset + 1];
+ FLOAT_BYTES[5] = source[offset + 2];
+ FLOAT_BYTES[4] = source[offset + 3];
+ FLOAT_BYTES[3] = source[offset + 4];
+ FLOAT_BYTES[2] = source[offset + 5];
+ FLOAT_BYTES[1] = source[offset + 6];
+ FLOAT_BYTES[0] = source[offset + 7];
+ return FLOAT[0];
+ }
+ : (source, offset) => {
+ FLOAT_BYTES[0] = source[offset];
+ FLOAT_BYTES[1] = source[offset + 1];
+ FLOAT_BYTES[2] = source[offset + 2];
+ FLOAT_BYTES[3] = source[offset + 3];
+ FLOAT_BYTES[4] = source[offset + 4];
+ FLOAT_BYTES[5] = source[offset + 5];
+ FLOAT_BYTES[6] = source[offset + 6];
+ FLOAT_BYTES[7] = source[offset + 7];
+ return FLOAT[0];
+ },
+ setInt32BE(destination, offset, value) {
+ destination[offset + 3] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset] = value;
+ return 4;
+ },
+ setInt32LE(destination, offset, value) {
+ destination[offset] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 3] = value;
+ return 4;
+ },
+ setBigInt64LE(destination, offset, value) {
+ const mask32bits = BigInt(4294967295);
+ let lo = Number(value & mask32bits);
+ destination[offset] = lo;
+ lo >>= 8;
+ destination[offset + 1] = lo;
+ lo >>= 8;
+ destination[offset + 2] = lo;
+ lo >>= 8;
+ destination[offset + 3] = lo;
+ let hi = Number((value >> BigInt(32)) & mask32bits);
+ destination[offset + 4] = hi;
+ hi >>= 8;
+ destination[offset + 5] = hi;
+ hi >>= 8;
+ destination[offset + 6] = hi;
+ hi >>= 8;
+ destination[offset + 7] = hi;
+ return 8;
+ },
+ setFloat64LE: isBigEndian
+ ? (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[7];
+ destination[offset + 1] = FLOAT_BYTES[6];
+ destination[offset + 2] = FLOAT_BYTES[5];
+ destination[offset + 3] = FLOAT_BYTES[4];
+ destination[offset + 4] = FLOAT_BYTES[3];
+ destination[offset + 5] = FLOAT_BYTES[2];
+ destination[offset + 6] = FLOAT_BYTES[1];
+ destination[offset + 7] = FLOAT_BYTES[0];
+ return 8;
+ }
+ : (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[0];
+ destination[offset + 1] = FLOAT_BYTES[1];
+ destination[offset + 2] = FLOAT_BYTES[2];
+ destination[offset + 3] = FLOAT_BYTES[3];
+ destination[offset + 4] = FLOAT_BYTES[4];
+ destination[offset + 5] = FLOAT_BYTES[5];
+ destination[offset + 6] = FLOAT_BYTES[6];
+ destination[offset + 7] = FLOAT_BYTES[7];
+ return 8;
+ }
+};
+
+const checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');
+let PROCESS_UNIQUE = null;
+class ObjectId extends BSONValue {
+ get _bsontype() {
+ return 'ObjectId';
+ }
+ constructor(inputId) {
+ super();
+ let workingId;
+ if (typeof inputId === 'object' && inputId && 'id' in inputId) {
+ if (typeof inputId.id !== 'string' && !ArrayBuffer.isView(inputId.id)) {
+ throw new BSONError('Argument passed in must have an id that is of type string or Buffer');
+ }
+ if ('toHexString' in inputId && typeof inputId.toHexString === 'function') {
+ workingId = ByteUtils.fromHex(inputId.toHexString());
+ }
+ else {
+ workingId = inputId.id;
+ }
+ }
+ else {
+ workingId = inputId;
+ }
+ if (workingId == null || typeof workingId === 'number') {
+ this.buffer = ObjectId.generate(typeof workingId === 'number' ? workingId : undefined);
+ }
+ else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
+ this.buffer = ByteUtils.toLocalBufferType(workingId);
+ }
+ else if (typeof workingId === 'string') {
+ if (workingId.length === 24 && checkForHexRegExp.test(workingId)) {
+ this.buffer = ByteUtils.fromHex(workingId);
+ }
+ else {
+ throw new BSONError('input must be a 24 character hex string, 12 byte Uint8Array, or an integer');
+ }
+ }
+ else {
+ throw new BSONError('Argument passed in does not match the accepted types');
+ }
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(this.id);
+ }
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(value);
+ }
+ }
+ toHexString() {
+ if (ObjectId.cacheHexString && this.__id) {
+ return this.__id;
+ }
+ const hexString = ByteUtils.toHex(this.id);
+ if (ObjectId.cacheHexString && !this.__id) {
+ this.__id = hexString;
+ }
+ return hexString;
+ }
+ static getInc() {
+ return (ObjectId.index = (ObjectId.index + 1) % 0xffffff);
+ }
+ static generate(time) {
+ if ('number' !== typeof time) {
+ time = Math.floor(Date.now() / 1000);
+ }
+ const inc = ObjectId.getInc();
+ const buffer = ByteUtils.allocateUnsafe(12);
+ NumberUtils.setInt32BE(buffer, 0, time);
+ if (PROCESS_UNIQUE === null) {
+ PROCESS_UNIQUE = ByteUtils.randomBytes(5);
+ }
+ buffer[4] = PROCESS_UNIQUE[0];
+ buffer[5] = PROCESS_UNIQUE[1];
+ buffer[6] = PROCESS_UNIQUE[2];
+ buffer[7] = PROCESS_UNIQUE[3];
+ buffer[8] = PROCESS_UNIQUE[4];
+ buffer[11] = inc & 0xff;
+ buffer[10] = (inc >> 8) & 0xff;
+ buffer[9] = (inc >> 16) & 0xff;
+ return buffer;
+ }
+ toString(encoding) {
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ if (encoding === 'hex')
+ return this.toHexString();
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ static is(variable) {
+ return (variable != null &&
+ typeof variable === 'object' &&
+ '_bsontype' in variable &&
+ variable._bsontype === 'ObjectId');
+ }
+ equals(otherId) {
+ if (otherId === undefined || otherId === null) {
+ return false;
+ }
+ if (ObjectId.is(otherId)) {
+ return (this.buffer[11] === otherId.buffer[11] && ByteUtils.equals(this.buffer, otherId.buffer));
+ }
+ if (typeof otherId === 'string') {
+ return otherId.toLowerCase() === this.toHexString();
+ }
+ if (typeof otherId === 'object' && typeof otherId.toHexString === 'function') {
+ const otherIdString = otherId.toHexString();
+ const thisIdString = this.toHexString();
+ return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
+ }
+ return false;
+ }
+ getTimestamp() {
+ const timestamp = new Date();
+ const time = NumberUtils.getUint32BE(this.buffer, 0);
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+ }
+ static createPk() {
+ return new ObjectId();
+ }
+ serializeInto(uint8array, index) {
+ uint8array[index] = this.buffer[0];
+ uint8array[index + 1] = this.buffer[1];
+ uint8array[index + 2] = this.buffer[2];
+ uint8array[index + 3] = this.buffer[3];
+ uint8array[index + 4] = this.buffer[4];
+ uint8array[index + 5] = this.buffer[5];
+ uint8array[index + 6] = this.buffer[6];
+ uint8array[index + 7] = this.buffer[7];
+ uint8array[index + 8] = this.buffer[8];
+ uint8array[index + 9] = this.buffer[9];
+ uint8array[index + 10] = this.buffer[10];
+ uint8array[index + 11] = this.buffer[11];
+ return 12;
+ }
+ static createFromTime(time) {
+ const buffer = ByteUtils.allocate(12);
+ for (let i = 11; i >= 4; i--)
+ buffer[i] = 0;
+ NumberUtils.setInt32BE(buffer, 0, time);
+ return new ObjectId(buffer);
+ }
+ static createFromHexString(hexString) {
+ if (hexString?.length !== 24) {
+ throw new BSONError('hex string must be 24 characters');
+ }
+ return new ObjectId(ByteUtils.fromHex(hexString));
+ }
+ static createFromBase64(base64) {
+ if (base64?.length !== 16) {
+ throw new BSONError('base64 string must be 16 characters');
+ }
+ return new ObjectId(ByteUtils.fromBase64(base64));
+ }
+ static isValid(id) {
+ if (id == null)
+ return false;
+ try {
+ new ObjectId(id);
+ return true;
+ }
+ catch {
+ return false;
+ }
+ }
+ toExtendedJSON() {
+ if (this.toHexString)
+ return { $oid: this.toHexString() };
+ return { $oid: this.toString('hex') };
+ }
+ static fromExtendedJSON(doc) {
+ return new ObjectId(doc.$oid);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new ObjectId(${inspect(this.toHexString(), options)})`;
+ }
+}
+ObjectId.index = Math.floor(Math.random() * 0xffffff);
+
+function internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined) {
+ let totalLength = 4 + 1;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions, true, ignoreUndefined);
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ }
+ for (const key of Object.keys(object)) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined);
+ }
+ }
+ return totalLength;
+}
+function calculateElement(name, value, serializeFunctions = false, isArray = false, ignoreUndefined = false) {
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ switch (typeof value) {
+ case 'string':
+ return 1 + ByteUtils.utf8ByteLength(name) + 1 + 4 + ByteUtils.utf8ByteLength(value) + 1;
+ case 'number':
+ if (Math.floor(value) === value &&
+ value >= JS_INT_MIN &&
+ value <= JS_INT_MAX) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (4 + 1);
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if (isArray || !ignoreUndefined)
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ return 0;
+ case 'boolean':
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 1);
+ case 'object':
+ if (value != null &&
+ typeof value._bsontype === 'string' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value == null || value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ }
+ else if (value._bsontype === 'ObjectId') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (12 + 1);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (ArrayBuffer.isView(value) ||
+ value instanceof ArrayBuffer ||
+ isAnyArrayBuffer(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 4 + 1) + value.byteLength);
+ }
+ else if (value._bsontype === 'Long' ||
+ value._bsontype === 'Double' ||
+ value._bsontype === 'Timestamp') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (16 + 1);
+ }
+ else if (value._bsontype === 'Code') {
+ if (value.scope != null && Object.keys(value.scope).length > 0) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1 +
+ internalCalculateObjectSize(value.scope, serializeFunctions, ignoreUndefined));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1);
+ }
+ }
+ else if (value._bsontype === 'Binary') {
+ const binary = value;
+ if (binary.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ (binary.position + 1 + 4 + 1 + 4));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (binary.position + 1 + 4 + 1));
+ }
+ }
+ else if (value._bsontype === 'Symbol') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ ByteUtils.utf8ByteLength(value.value) +
+ 4 +
+ 1 +
+ 1);
+ }
+ else if (value._bsontype === 'DBRef') {
+ const ordered_values = Object.assign({
+ $ref: value.collection,
+ $id: value.oid
+ }, value.fields);
+ if (value.db != null) {
+ ordered_values['$db'] = value.db;
+ }
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ internalCalculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined));
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.source) +
+ 1 +
+ (value.global ? 1 : 0) +
+ (value.ignoreCase ? 1 : 0) +
+ (value.multiline ? 1 : 0) +
+ 1);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.pattern) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.options) +
+ 1);
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ internalCalculateObjectSize(value, serializeFunctions, ignoreUndefined) +
+ 1);
+ }
+ case 'function':
+ if (serializeFunctions) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.toString()) +
+ 1);
+ }
+ }
+ return 0;
+}
+
+function alphabetize(str) {
+ return str.split('').sort().join('');
+}
+class BSONRegExp extends BSONValue {
+ get _bsontype() {
+ return 'BSONRegExp';
+ }
+ constructor(pattern, options) {
+ super();
+ this.pattern = pattern;
+ this.options = alphabetize(options ?? '');
+ if (this.pattern.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);
+ }
+ if (this.options.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);
+ }
+ for (let i = 0; i < this.options.length; i++) {
+ if (!(this.options[i] === 'i' ||
+ this.options[i] === 'm' ||
+ this.options[i] === 'x' ||
+ this.options[i] === 'l' ||
+ this.options[i] === 's' ||
+ this.options[i] === 'u')) {
+ throw new BSONError(`The regular expression option [${this.options[i]}] is not supported`);
+ }
+ }
+ }
+ static parseOptions(options) {
+ return options ? options.split('').sort().join('') : '';
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ if (options.legacy) {
+ return { $regex: this.pattern, $options: this.options };
+ }
+ return { $regularExpression: { pattern: this.pattern, options: this.options } };
+ }
+ static fromExtendedJSON(doc) {
+ if ('$regex' in doc) {
+ if (typeof doc.$regex !== 'string') {
+ if (doc.$regex._bsontype === 'BSONRegExp') {
+ return doc;
+ }
+ }
+ else {
+ return new BSONRegExp(doc.$regex, BSONRegExp.parseOptions(doc.$options));
+ }
+ }
+ if ('$regularExpression' in doc) {
+ return new BSONRegExp(doc.$regularExpression.pattern, BSONRegExp.parseOptions(doc.$regularExpression.options));
+ }
+ throw new BSONError(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(doc)}`);
+ }
+ inspect(depth, options, inspect) {
+ const stylize = getStylizeFunction(options) ?? (v => v);
+ inspect ??= defaultInspect;
+ const pattern = stylize(inspect(this.pattern), 'regexp');
+ const flags = stylize(inspect(this.options), 'regexp');
+ return `new BSONRegExp(${pattern}, ${flags})`;
+ }
+}
+
+class BSONSymbol extends BSONValue {
+ get _bsontype() {
+ return 'BSONSymbol';
+ }
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON() {
+ return { $symbol: this.value };
+ }
+ static fromExtendedJSON(doc) {
+ return new BSONSymbol(doc.$symbol);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new BSONSymbol(${inspect(this.value, options)})`;
+ }
+}
+
+const LongWithoutOverridesClass = Long;
+class Timestamp extends LongWithoutOverridesClass {
+ get _bsontype() {
+ return 'Timestamp';
+ }
+ constructor(low) {
+ if (low == null) {
+ super(0, 0, true);
+ }
+ else if (typeof low === 'bigint') {
+ super(low, true);
+ }
+ else if (Long.isLong(low)) {
+ super(low.low, low.high, true);
+ }
+ else if (typeof low === 'object' && 't' in low && 'i' in low) {
+ if (typeof low.t !== 'number' && (typeof low.t !== 'object' || low.t._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t as a number');
+ }
+ if (typeof low.i !== 'number' && (typeof low.i !== 'object' || low.i._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i as a number');
+ }
+ const t = Number(low.t);
+ const i = Number(low.i);
+ if (t < 0 || Number.isNaN(t)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive t');
+ }
+ if (i < 0 || Number.isNaN(i)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive i');
+ }
+ if (t > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t equal or less than uint32 max');
+ }
+ if (i > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i equal or less than uint32 max');
+ }
+ super(i, t, true);
+ }
+ else {
+ throw new BSONError('A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }');
+ }
+ }
+ toJSON() {
+ return {
+ $timestamp: this.toString()
+ };
+ }
+ static fromInt(value) {
+ return new Timestamp(Long.fromInt(value, true));
+ }
+ static fromNumber(value) {
+ return new Timestamp(Long.fromNumber(value, true));
+ }
+ static fromBits(lowBits, highBits) {
+ return new Timestamp({ i: lowBits, t: highBits });
+ }
+ static fromString(str, optRadix) {
+ return new Timestamp(Long.fromString(str, true, optRadix));
+ }
+ toExtendedJSON() {
+ return { $timestamp: { t: this.high >>> 0, i: this.low >>> 0 } };
+ }
+ static fromExtendedJSON(doc) {
+ const i = Long.isLong(doc.$timestamp.i)
+ ? doc.$timestamp.i.getLowBitsUnsigned()
+ : doc.$timestamp.i;
+ const t = Long.isLong(doc.$timestamp.t)
+ ? doc.$timestamp.t.getLowBitsUnsigned()
+ : doc.$timestamp.t;
+ return new Timestamp({ t, i });
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const t = inspect(this.high >>> 0, options);
+ const i = inspect(this.low >>> 0, options);
+ return `new Timestamp({ t: ${t}, i: ${i} })`;
+ }
+}
+Timestamp.MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
+
+const JS_INT_MAX_LONG = Long.fromNumber(JS_INT_MAX);
+const JS_INT_MIN_LONG = Long.fromNumber(JS_INT_MIN);
+function internalDeserialize(buffer, options, isArray) {
+ options = options == null ? {} : options;
+ const index = options && options.index ? options.index : 0;
+ const size = NumberUtils.getInt32LE(buffer, index);
+ if (size < 5) {
+ throw new BSONError(`bson size must be >= 5, is ${size}`);
+ }
+ if (options.allowObjectSmallerThanBufferSize && buffer.length < size) {
+ throw new BSONError(`buffer length ${buffer.length} must be >= bson size ${size}`);
+ }
+ if (!options.allowObjectSmallerThanBufferSize && buffer.length !== size) {
+ throw new BSONError(`buffer length ${buffer.length} must === bson size ${size}`);
+ }
+ if (size + index > buffer.byteLength) {
+ throw new BSONError(`(bson size ${size} + options.index ${index} must be <= buffer length ${buffer.byteLength})`);
+ }
+ if (buffer[index + size - 1] !== 0) {
+ throw new BSONError("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+ return deserializeObject(buffer, index, options, isArray);
+}
+const allowedDBRefKeys = /^\$ref$|^\$id$|^\$db$/;
+function deserializeObject(buffer, index, options, isArray = false) {
+ const fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+ const raw = options['raw'] == null ? false : options['raw'];
+ const bsonRegExp = typeof options['bsonRegExp'] === 'boolean' ? options['bsonRegExp'] : false;
+ const promoteBuffers = options.promoteBuffers ?? false;
+ const promoteLongs = options.promoteLongs ?? true;
+ const promoteValues = options.promoteValues ?? true;
+ const useBigInt64 = options.useBigInt64 ?? false;
+ if (useBigInt64 && !promoteValues) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ if (useBigInt64 && !promoteLongs) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ const validation = options.validation == null ? { utf8: true } : options.validation;
+ let globalUTFValidation = true;
+ let validationSetting;
+ let utf8KeysSet;
+ const utf8ValidatedKeys = validation.utf8;
+ if (typeof utf8ValidatedKeys === 'boolean') {
+ validationSetting = utf8ValidatedKeys;
+ }
+ else {
+ globalUTFValidation = false;
+ const utf8ValidationValues = Object.keys(utf8ValidatedKeys).map(function (key) {
+ return utf8ValidatedKeys[key];
+ });
+ if (utf8ValidationValues.length === 0) {
+ throw new BSONError('UTF-8 validation setting cannot be empty');
+ }
+ if (typeof utf8ValidationValues[0] !== 'boolean') {
+ throw new BSONError('Invalid UTF-8 validation option, must specify boolean values');
+ }
+ validationSetting = utf8ValidationValues[0];
+ if (!utf8ValidationValues.every(item => item === validationSetting)) {
+ throw new BSONError('Invalid UTF-8 validation option - keys must be all true or all false');
+ }
+ }
+ if (!globalUTFValidation) {
+ utf8KeysSet = new Set();
+ for (const key of Object.keys(utf8ValidatedKeys)) {
+ utf8KeysSet.add(key);
+ }
+ }
+ const startIndex = index;
+ if (buffer.length < 5)
+ throw new BSONError('corrupt bson message < 5 bytes long');
+ const size = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (size < 5 || size > buffer.length)
+ throw new BSONError('corrupt bson message');
+ const object = isArray ? [] : {};
+ let arrayIndex = 0;
+ const done = false;
+ let isPossibleDBRef = isArray ? false : null;
+ while (!done) {
+ const elementType = buffer[index++];
+ if (elementType === 0)
+ break;
+ let i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.byteLength)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const name = isArray ? arrayIndex++ : ByteUtils.toUTF8(buffer, index, i, false);
+ let shouldValidateKey = true;
+ if (globalUTFValidation || utf8KeysSet?.has(name)) {
+ shouldValidateKey = validationSetting;
+ }
+ else {
+ shouldValidateKey = !validationSetting;
+ }
+ if (isPossibleDBRef !== false && name[0] === '$') {
+ isPossibleDBRef = allowedDBRefKeys.test(name);
+ }
+ let value;
+ index = i + 1;
+ if (elementType === BSON_DATA_STRING) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ value = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_OID) {
+ const oid = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oid[i] = buffer[index + i];
+ value = new ObjectId(oid);
+ index = index + 12;
+ }
+ else if (elementType === BSON_DATA_INT && promoteValues === false) {
+ value = new Int32(NumberUtils.getInt32LE(buffer, index));
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_INT) {
+ value = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_NUMBER) {
+ value = NumberUtils.getFloat64LE(buffer, index);
+ index += 8;
+ if (promoteValues === false)
+ value = new Double(value);
+ }
+ else if (elementType === BSON_DATA_DATE) {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ value = new Date(new Long(lowBits, highBits).toNumber());
+ }
+ else if (elementType === BSON_DATA_BOOLEAN) {
+ if (buffer[index] !== 0 && buffer[index] !== 1)
+ throw new BSONError('illegal boolean type value');
+ value = buffer[index++] === 1;
+ }
+ else if (elementType === BSON_DATA_OBJECT) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ if (objectSize <= 0 || objectSize > buffer.length - index)
+ throw new BSONError('bad embedded document length in bson');
+ if (raw) {
+ value = buffer.slice(index, index + objectSize);
+ }
+ else {
+ let objectOptions = options;
+ if (!globalUTFValidation) {
+ objectOptions = { ...options, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, objectOptions, false);
+ }
+ index = index + objectSize;
+ }
+ else if (elementType === BSON_DATA_ARRAY) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ let arrayOptions = options;
+ const stopIndex = index + objectSize;
+ if (fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = { ...options, raw: true };
+ }
+ if (!globalUTFValidation) {
+ arrayOptions = { ...arrayOptions, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+ if (buffer[index - 1] !== 0)
+ throw new BSONError('invalid array terminator byte');
+ if (index !== stopIndex)
+ throw new BSONError('corrupted array bson');
+ }
+ else if (elementType === BSON_DATA_UNDEFINED) {
+ value = undefined;
+ }
+ else if (elementType === BSON_DATA_NULL) {
+ value = null;
+ }
+ else if (elementType === BSON_DATA_LONG) {
+ if (useBigInt64) {
+ value = NumberUtils.getBigInt64LE(buffer, index);
+ index += 8;
+ }
+ else {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ const long = new Long(lowBits, highBits);
+ if (promoteLongs && promoteValues === true) {
+ value =
+ long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG)
+ ? long.toNumber()
+ : long;
+ }
+ else {
+ value = long;
+ }
+ }
+ }
+ else if (elementType === BSON_DATA_DECIMAL128) {
+ const bytes = ByteUtils.allocateUnsafe(16);
+ for (let i = 0; i < 16; i++)
+ bytes[i] = buffer[index + i];
+ index = index + 16;
+ value = new Decimal128(bytes);
+ }
+ else if (elementType === BSON_DATA_BINARY) {
+ let binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ const totalBinarySize = binarySize;
+ const subType = buffer[index++];
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found');
+ if (binarySize > buffer.byteLength)
+ throw new BSONError('Binary type size larger than document size');
+ if (buffer['slice'] != null) {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.toLocalBufferType(buffer.slice(index, index + binarySize));
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ else {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.allocateUnsafe(binarySize);
+ for (i = 0; i < binarySize; i++) {
+ value[i] = buffer[index + i];
+ }
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ index = index + binarySize;
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === false) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ const optionsArray = new Array(regExpOptions.length);
+ for (i = 0; i < regExpOptions.length; i++) {
+ switch (regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+ value = new RegExp(source, optionsArray.join(''));
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === true) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ value = new BSONRegExp(source, regExpOptions);
+ }
+ else if (elementType === BSON_DATA_SYMBOL) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const symbol = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = promoteValues ? symbol : new BSONSymbol(symbol);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_TIMESTAMP) {
+ value = new Timestamp({
+ i: NumberUtils.getUint32LE(buffer, index),
+ t: NumberUtils.getUint32LE(buffer, index + 4)
+ });
+ index += 8;
+ }
+ else if (elementType === BSON_DATA_MIN_KEY) {
+ value = new MinKey();
+ }
+ else if (elementType === BSON_DATA_MAX_KEY) {
+ value = new MaxKey();
+ }
+ else if (elementType === BSON_DATA_CODE) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = new Code(functionString);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_CODE_W_SCOPE) {
+ const totalSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (totalSize < 4 + 4 + 4 + 1) {
+ throw new BSONError('code_w_scope total size shorter minimum expected length');
+ }
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ const scopeObject = deserializeObject(buffer, _index, options, false);
+ index = index + objectSize;
+ if (totalSize < 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too short, truncating scope');
+ }
+ if (totalSize > 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too long, clips outer document');
+ }
+ value = new Code(functionString, scopeObject);
+ }
+ else if (elementType === BSON_DATA_DBPOINTER) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0)
+ throw new BSONError('bad string length in bson');
+ const namespace = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const oidBuffer = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oidBuffer[i] = buffer[index + i];
+ const oid = new ObjectId(oidBuffer);
+ index = index + 12;
+ value = new DBRef(namespace, oid);
+ }
+ else {
+ throw new BSONError(`Detected unknown BSON type ${elementType.toString(16)} for fieldname "${name}"`);
+ }
+ if (name === '__proto__') {
+ Object.defineProperty(object, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ object[name] = value;
+ }
+ }
+ if (size !== index - startIndex) {
+ if (isArray)
+ throw new BSONError('corrupt array bson');
+ throw new BSONError('corrupt object bson');
+ }
+ if (!isPossibleDBRef)
+ return object;
+ if (isDBRefLike(object)) {
+ const copy = Object.assign({}, object);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(object.$ref, object.$id, object.$db, copy);
+ }
+ return object;
+}
+
+const regexp = /\x00/;
+const ignoreKeys = new Set(['$db', '$ref', '$id', '$clusterTime']);
+function serializeString(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_STRING;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value, index + 4);
+ NumberUtils.setInt32LE(buffer, index, size + 1);
+ index = index + 4 + size;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeNumber(buffer, key, value, index) {
+ const isNegativeZero = Object.is(value, -0);
+ const type = !isNegativeZero &&
+ Number.isSafeInteger(value) &&
+ value <= BSON_INT32_MAX &&
+ value >= BSON_INT32_MIN
+ ? BSON_DATA_INT
+ : BSON_DATA_NUMBER;
+ buffer[index++] = type;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0x00;
+ if (type === BSON_DATA_INT) {
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ }
+ else {
+ index += NumberUtils.setFloat64LE(buffer, index, value);
+ }
+ return index;
+}
+function serializeBigInt(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_LONG;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index += numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setBigInt64LE(buffer, index, value);
+ return index;
+}
+function serializeNull(buffer, key, _, index) {
+ buffer[index++] = BSON_DATA_NULL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeBoolean(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BOOLEAN;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ buffer[index++] = value ? 1 : 0;
+ return index;
+}
+function serializeDate(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DATE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const dateInMilis = Long.fromNumber(value.getTime());
+ const lowBits = dateInMilis.getLowBits();
+ const highBits = dateInMilis.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw new BSONError('value ' + value.source + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.source, index);
+ buffer[index++] = 0x00;
+ if (value.ignoreCase)
+ buffer[index++] = 0x69;
+ if (value.global)
+ buffer[index++] = 0x73;
+ if (value.multiline)
+ buffer[index++] = 0x6d;
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeBSONRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.pattern.match(regexp) != null) {
+ throw new BSONError('pattern ' + value.pattern + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.pattern, index);
+ buffer[index++] = 0x00;
+ const sortedOptions = value.options.split('').sort().join('');
+ index = index + ByteUtils.encodeUTF8Into(buffer, sortedOptions, index);
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeMinMax(buffer, key, value, index) {
+ if (value === null) {
+ buffer[index++] = BSON_DATA_NULL;
+ }
+ else if (value._bsontype === 'MinKey') {
+ buffer[index++] = BSON_DATA_MIN_KEY;
+ }
+ else {
+ buffer[index++] = BSON_DATA_MAX_KEY;
+ }
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeObjectId(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_OID;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += value.serializeInto(buffer, index);
+ return index;
+}
+function serializeBuffer(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = value.length;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = BSON_BINARY_SUBTYPE_DEFAULT;
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = value[i];
+ }
+ else {
+ buffer.set(value, index);
+ }
+ index = index + size;
+ return index;
+}
+function serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path.has(value)) {
+ throw new BSONError('Cannot convert circular structure to BSON');
+ }
+ path.add(value);
+ buffer[index++] = Array.isArray(value) ? BSON_DATA_ARRAY : BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const endIndex = serializeInto(buffer, value, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ path.delete(value);
+ return endIndex;
+}
+function serializeDecimal128(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DECIMAL128;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ for (let i = 0; i < 16; i++)
+ buffer[index + i] = value.bytes[i];
+ return index + 16;
+}
+function serializeLong(buffer, key, value, index) {
+ buffer[index++] =
+ value._bsontype === 'Long' ? BSON_DATA_LONG : BSON_DATA_TIMESTAMP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const lowBits = value.getLowBits();
+ const highBits = value.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeInt32(buffer, key, value, index) {
+ value = value.valueOf();
+ buffer[index++] = BSON_DATA_INT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ return index;
+}
+function serializeDouble(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_NUMBER;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setFloat64LE(buffer, index, value.value);
+ return index;
+}
+function serializeFunction(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeCode(buffer, key, value, index, checkKeys = false, depth = 0, serializeFunctions = false, ignoreUndefined = true, path) {
+ if (value.scope && typeof value.scope === 'object') {
+ buffer[index++] = BSON_DATA_CODE_W_SCOPE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ const functionString = value.code;
+ index = index + 4;
+ const codeSize = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, codeSize);
+ buffer[index + 4 + codeSize - 1] = 0;
+ index = index + codeSize + 4;
+ const endIndex = serializeInto(buffer, value.scope, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ index = endIndex - 1;
+ const totalSize = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, startIndex, totalSize);
+ buffer[index++] = 0;
+ }
+ else {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.code.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ }
+ return index;
+}
+function serializeBinary(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const data = value.buffer;
+ let size = value.position;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY)
+ size = size + 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = value.sub_type;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ }
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = data[i];
+ }
+ else {
+ buffer.set(data, index);
+ }
+ index = index + value.position;
+ return index;
+}
+function serializeSymbol(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_SYMBOL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value.value, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path) {
+ buffer[index++] = BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ let output = {
+ $ref: value.collection || value.namespace,
+ $id: value.oid
+ };
+ if (value.db != null) {
+ output.$db = value.db;
+ }
+ output = Object.assign(output, value.fields);
+ const endIndex = serializeInto(buffer, output, false, index, depth + 1, serializeFunctions, true, path);
+ const size = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, index, size);
+ return endIndex;
+}
+function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path == null) {
+ if (object == null) {
+ buffer[0] = 0x05;
+ buffer[1] = 0x00;
+ buffer[2] = 0x00;
+ buffer[3] = 0x00;
+ buffer[4] = 0x00;
+ return 5;
+ }
+ if (Array.isArray(object)) {
+ throw new BSONError('serialize does not support an array as the root input');
+ }
+ if (typeof object !== 'object') {
+ throw new BSONError('serialize does not support non-object as the root input');
+ }
+ else if ('_bsontype' in object && typeof object._bsontype === 'string') {
+ throw new BSONError(`BSON types cannot be serialized as a document`);
+ }
+ else if (isDate(object) ||
+ isRegExp(object) ||
+ isUint8Array(object) ||
+ isAnyArrayBuffer(object)) {
+ throw new BSONError(`date, regexp, typedarray, and arraybuffer cannot be BSON documents`);
+ }
+ path = new Set();
+ }
+ path.add(object);
+ let index = startingIndex + 4;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ const key = `${i}`;
+ let value = object[i];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ if (typeof value === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (typeof value === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (typeof value === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (typeof value === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (typeof value === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else if (object instanceof Map || isMap(object)) {
+ const iterator = object.entries();
+ let done = false;
+ while (!done) {
+ const entry = iterator.next();
+ done = !!entry.done;
+ if (done)
+ continue;
+ const key = entry.value[0];
+ let value = entry.value[1];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === null || (value === undefined && ignoreUndefined === false)) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ if (object != null && typeof object !== 'object') {
+ throw new BSONError('toBSON function did not return an object');
+ }
+ }
+ for (const key of Object.keys(object)) {
+ let value = object[key];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ if (ignoreUndefined === false)
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ path.delete(object);
+ buffer[index++] = 0x00;
+ const size = index - startingIndex;
+ startingIndex += NumberUtils.setInt32LE(buffer, startingIndex, size);
+ return index;
+}
+
+function isBSONType(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '_bsontype' in value &&
+ typeof value._bsontype === 'string');
+}
+const keysToCodecs = {
+ $oid: ObjectId,
+ $binary: Binary,
+ $uuid: Binary,
+ $symbol: BSONSymbol,
+ $numberInt: Int32,
+ $numberDecimal: Decimal128,
+ $numberDouble: Double,
+ $numberLong: Long,
+ $minKey: MinKey,
+ $maxKey: MaxKey,
+ $regex: BSONRegExp,
+ $regularExpression: BSONRegExp,
+ $timestamp: Timestamp
+};
+function deserializeValue(value, options = {}) {
+ if (typeof value === 'number') {
+ const in32BitRange = value <= BSON_INT32_MAX && value >= BSON_INT32_MIN;
+ const in64BitRange = value <= BSON_INT64_MAX && value >= BSON_INT64_MIN;
+ if (options.relaxed || options.legacy) {
+ return value;
+ }
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (in32BitRange) {
+ return new Int32(value);
+ }
+ if (in64BitRange) {
+ if (options.useBigInt64) {
+ return BigInt(value);
+ }
+ return Long.fromNumber(value);
+ }
+ }
+ return new Double(value);
+ }
+ if (value == null || typeof value !== 'object')
+ return value;
+ if (value.$undefined)
+ return null;
+ const keys = Object.keys(value).filter(k => k.startsWith('$') && value[k] != null);
+ for (let i = 0; i < keys.length; i++) {
+ const c = keysToCodecs[keys[i]];
+ if (c)
+ return c.fromExtendedJSON(value, options);
+ }
+ if (value.$date != null) {
+ const d = value.$date;
+ const date = new Date();
+ if (options.legacy) {
+ if (typeof d === 'number')
+ date.setTime(d);
+ else if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ else {
+ if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (Long.isLong(d))
+ date.setTime(d.toNumber());
+ else if (typeof d === 'number' && options.relaxed)
+ date.setTime(d);
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ return date;
+ }
+ if (value.$code != null) {
+ const copy = Object.assign({}, value);
+ if (value.$scope) {
+ copy.$scope = deserializeValue(value.$scope);
+ }
+ return Code.fromExtendedJSON(value);
+ }
+ if (isDBRefLike(value) || value.$dbPointer) {
+ const v = value.$ref ? value : value.$dbPointer;
+ if (v instanceof DBRef)
+ return v;
+ const dollarKeys = Object.keys(v).filter(k => k.startsWith('$'));
+ let valid = true;
+ dollarKeys.forEach(k => {
+ if (['$ref', '$id', '$db'].indexOf(k) === -1)
+ valid = false;
+ });
+ if (valid)
+ return DBRef.fromExtendedJSON(v);
+ }
+ return value;
+}
+function serializeArray(array, options) {
+ return array.map((v, index) => {
+ options.seenObjects.push({ propertyName: `index ${index}`, obj: null });
+ try {
+ return serializeValue(v, options);
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ });
+}
+function getISOString(date) {
+ const isoStr = date.toISOString();
+ return date.getUTCMilliseconds() !== 0 ? isoStr : isoStr.slice(0, -5) + 'Z';
+}
+function serializeValue(value, options) {
+ if (value instanceof Map || isMap(value)) {
+ const obj = Object.create(null);
+ for (const [k, v] of value) {
+ if (typeof k !== 'string') {
+ throw new BSONError('Can only serialize maps with string keys');
+ }
+ obj[k] = v;
+ }
+ return serializeValue(obj, options);
+ }
+ if ((typeof value === 'object' || typeof value === 'function') && value !== null) {
+ const index = options.seenObjects.findIndex(entry => entry.obj === value);
+ if (index !== -1) {
+ const props = options.seenObjects.map(entry => entry.propertyName);
+ const leadingPart = props
+ .slice(0, index)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const alreadySeen = props[index];
+ const circularPart = ' -> ' +
+ props
+ .slice(index + 1, props.length - 1)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const current = props[props.length - 1];
+ const leadingSpace = ' '.repeat(leadingPart.length + alreadySeen.length / 2);
+ const dashes = '-'.repeat(circularPart.length + (alreadySeen.length + current.length) / 2 - 1);
+ throw new BSONError('Converting circular structure to EJSON:\n' +
+ ` ${leadingPart}${alreadySeen}${circularPart}${current}\n` +
+ ` ${leadingSpace}\\${dashes}/`);
+ }
+ options.seenObjects[options.seenObjects.length - 1].obj = value;
+ }
+ if (Array.isArray(value))
+ return serializeArray(value, options);
+ if (value === undefined)
+ return null;
+ if (value instanceof Date || isDate(value)) {
+ const dateNum = value.getTime(), inRange = dateNum > -1 && dateNum < 253402318800000;
+ if (options.legacy) {
+ return options.relaxed && inRange
+ ? { $date: value.getTime() }
+ : { $date: getISOString(value) };
+ }
+ return options.relaxed && inRange
+ ? { $date: getISOString(value) }
+ : { $date: { $numberLong: value.getTime().toString() } };
+ }
+ if (typeof value === 'number' && (!options.relaxed || !isFinite(value))) {
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return { $numberInt: value.toString() };
+ }
+ if (value >= BSON_INT64_MIN && value <= BSON_INT64_MAX) {
+ return { $numberLong: value.toString() };
+ }
+ }
+ return { $numberDouble: Object.is(value, -0) ? '-0.0' : value.toString() };
+ }
+ if (typeof value === 'bigint') {
+ if (!options.relaxed) {
+ return { $numberLong: BigInt.asIntN(64, value).toString() };
+ }
+ return Number(BigInt.asIntN(64, value));
+ }
+ if (value instanceof RegExp || isRegExp(value)) {
+ let flags = value.flags;
+ if (flags === undefined) {
+ const match = value.toString().match(/[gimuy]*$/);
+ if (match) {
+ flags = match[0];
+ }
+ }
+ const rx = new BSONRegExp(value.source, flags);
+ return rx.toExtendedJSON(options);
+ }
+ if (value != null && typeof value === 'object')
+ return serializeDocument(value, options);
+ return value;
+}
+const BSON_TYPE_MAPPINGS = {
+ Binary: (o) => new Binary(o.value(), o.sub_type),
+ Code: (o) => new Code(o.code, o.scope),
+ DBRef: (o) => new DBRef(o.collection || o.namespace, o.oid, o.db, o.fields),
+ Decimal128: (o) => new Decimal128(o.bytes),
+ Double: (o) => new Double(o.value),
+ Int32: (o) => new Int32(o.value),
+ Long: (o) => Long.fromBits(o.low != null ? o.low : o.low_, o.low != null ? o.high : o.high_, o.low != null ? o.unsigned : o.unsigned_),
+ MaxKey: () => new MaxKey(),
+ MinKey: () => new MinKey(),
+ ObjectId: (o) => new ObjectId(o),
+ BSONRegExp: (o) => new BSONRegExp(o.pattern, o.options),
+ BSONSymbol: (o) => new BSONSymbol(o.value),
+ Timestamp: (o) => Timestamp.fromBits(o.low, o.high)
+};
+function serializeDocument(doc, options) {
+ if (doc == null || typeof doc !== 'object')
+ throw new BSONError('not an object instance');
+ const bsontype = doc._bsontype;
+ if (typeof bsontype === 'undefined') {
+ const _doc = {};
+ for (const name of Object.keys(doc)) {
+ options.seenObjects.push({ propertyName: name, obj: null });
+ try {
+ const value = serializeValue(doc[name], options);
+ if (name === '__proto__') {
+ Object.defineProperty(_doc, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ _doc[name] = value;
+ }
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ }
+ return _doc;
+ }
+ else if (doc != null &&
+ typeof doc === 'object' &&
+ typeof doc._bsontype === 'string' &&
+ doc[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (isBSONType(doc)) {
+ let outDoc = doc;
+ if (typeof outDoc.toExtendedJSON !== 'function') {
+ const mapper = BSON_TYPE_MAPPINGS[doc._bsontype];
+ if (!mapper) {
+ throw new BSONError('Unrecognized or invalid _bsontype: ' + doc._bsontype);
+ }
+ outDoc = mapper(outDoc);
+ }
+ if (bsontype === 'Code' && outDoc.scope) {
+ outDoc = new Code(outDoc.code, serializeValue(outDoc.scope, options));
+ }
+ else if (bsontype === 'DBRef' && outDoc.oid) {
+ outDoc = new DBRef(serializeValue(outDoc.collection, options), serializeValue(outDoc.oid, options), serializeValue(outDoc.db, options), serializeValue(outDoc.fields, options));
+ }
+ return outDoc.toExtendedJSON(options);
+ }
+ else {
+ throw new BSONError('_bsontype must be a string, but was: ' + typeof bsontype);
+ }
+}
+function parse(text, options) {
+ const ejsonOptions = {
+ useBigInt64: options?.useBigInt64 ?? false,
+ relaxed: options?.relaxed ?? true,
+ legacy: options?.legacy ?? false
+ };
+ return JSON.parse(text, (key, value) => {
+ if (key.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(key)}`);
+ }
+ return deserializeValue(value, ejsonOptions);
+ });
+}
+function stringify(value, replacer, space, options) {
+ if (space != null && typeof space === 'object') {
+ options = space;
+ space = 0;
+ }
+ if (replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) {
+ options = replacer;
+ replacer = undefined;
+ space = 0;
+ }
+ const serializeOptions = Object.assign({ relaxed: true, legacy: false }, options, {
+ seenObjects: [{ propertyName: '(root)', obj: null }]
+ });
+ const doc = serializeValue(value, serializeOptions);
+ return JSON.stringify(doc, replacer, space);
+}
+function EJSONserialize(value, options) {
+ options = options || {};
+ return JSON.parse(stringify(value, options));
+}
+function EJSONdeserialize(ejson, options) {
+ options = options || {};
+ return parse(JSON.stringify(ejson), options);
+}
+const EJSON = Object.create(null);
+EJSON.parse = parse;
+EJSON.stringify = stringify;
+EJSON.serialize = EJSONserialize;
+EJSON.deserialize = EJSONdeserialize;
+Object.freeze(EJSON);
+
+function getSize(source, offset) {
+ try {
+ return NumberUtils.getNonnegativeInt32LE(source, offset);
+ }
+ catch (cause) {
+ throw new BSONOffsetError('BSON size cannot be negative', offset, { cause });
+ }
+}
+function findNull(bytes, offset) {
+ let nullTerminatorOffset = offset;
+ for (; bytes[nullTerminatorOffset] !== 0x00; nullTerminatorOffset++)
+ ;
+ if (nullTerminatorOffset === bytes.length - 1) {
+ throw new BSONOffsetError('Null terminator not found', offset);
+ }
+ return nullTerminatorOffset;
+}
+function parseToElements(bytes, startOffset = 0) {
+ startOffset ??= 0;
+ if (bytes.length < 5) {
+ throw new BSONOffsetError(`Input must be at least 5 bytes, got ${bytes.length} bytes`, startOffset);
+ }
+ const documentSize = getSize(bytes, startOffset);
+ if (documentSize > bytes.length - startOffset) {
+ throw new BSONOffsetError(`Parsed documentSize (${documentSize} bytes) does not match input length (${bytes.length} bytes)`, startOffset);
+ }
+ if (bytes[startOffset + documentSize - 1] !== 0x00) {
+ throw new BSONOffsetError('BSON documents must end in 0x00', startOffset + documentSize);
+ }
+ const elements = [];
+ let offset = startOffset + 4;
+ while (offset <= documentSize + startOffset) {
+ const type = bytes[offset];
+ offset += 1;
+ if (type === 0) {
+ if (offset - startOffset !== documentSize) {
+ throw new BSONOffsetError(`Invalid 0x00 type byte`, offset);
+ }
+ break;
+ }
+ const nameOffset = offset;
+ const nameLength = findNull(bytes, offset) - nameOffset;
+ offset += nameLength + 1;
+ let length;
+ if (type === 1 ||
+ type === 18 ||
+ type === 9 ||
+ type === 17) {
+ length = 8;
+ }
+ else if (type === 16) {
+ length = 4;
+ }
+ else if (type === 7) {
+ length = 12;
+ }
+ else if (type === 19) {
+ length = 16;
+ }
+ else if (type === 8) {
+ length = 1;
+ }
+ else if (type === 10 ||
+ type === 6 ||
+ type === 127 ||
+ type === 255) {
+ length = 0;
+ }
+ else if (type === 11) {
+ length = findNull(bytes, findNull(bytes, offset) + 1) + 1 - offset;
+ }
+ else if (type === 3 ||
+ type === 4 ||
+ type === 15) {
+ length = getSize(bytes, offset);
+ }
+ else if (type === 2 ||
+ type === 5 ||
+ type === 12 ||
+ type === 13 ||
+ type === 14) {
+ length = getSize(bytes, offset) + 4;
+ if (type === 5) {
+ length += 1;
+ }
+ if (type === 12) {
+ length += 12;
+ }
+ }
+ else {
+ throw new BSONOffsetError(`Invalid 0x${type.toString(16).padStart(2, '0')} type byte`, offset);
+ }
+ if (length > documentSize) {
+ throw new BSONOffsetError('value reports length larger than document', offset);
+ }
+ elements.push([type, nameOffset, nameLength, offset, length]);
+ offset += length;
+ }
+ return elements;
+}
+
+const onDemand = Object.create(null);
+onDemand.parseToElements = parseToElements;
+onDemand.ByteUtils = ByteUtils;
+onDemand.NumberUtils = NumberUtils;
+Object.freeze(onDemand);
+
+const MAXSIZE = 1024 * 1024 * 17;
+let buffer = ByteUtils.allocate(MAXSIZE);
+function setInternalBufferSize(size) {
+ if (buffer.length < size) {
+ buffer = ByteUtils.allocate(size);
+ }
+}
+function serialize(object, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const minInternalBufferSize = typeof options.minInternalBufferSize === 'number' ? options.minInternalBufferSize : MAXSIZE;
+ if (buffer.length < minInternalBufferSize) {
+ buffer = ByteUtils.allocate(minInternalBufferSize);
+ }
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ const finishedBuffer = ByteUtils.allocateUnsafe(serializationIndex);
+ finishedBuffer.set(buffer.subarray(0, serializationIndex), 0);
+ return finishedBuffer;
+}
+function serializeWithBufferAndIndex(object, finalBuffer, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const startIndex = typeof options.index === 'number' ? options.index : 0;
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ finalBuffer.set(buffer.subarray(0, serializationIndex), startIndex);
+ return startIndex + serializationIndex - 1;
+}
+function deserialize(buffer, options = {}) {
+ return internalDeserialize(ByteUtils.toLocalBufferType(buffer), options);
+}
+function calculateObjectSize(object, options = {}) {
+ options = options || {};
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ return internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined);
+}
+function deserializeStream(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ const internalOptions = Object.assign({ allowObjectSmallerThanBufferSize: true, index: 0 }, options);
+ const bufferData = ByteUtils.toLocalBufferType(data);
+ let index = startIndex;
+ for (let i = 0; i < numberOfDocuments; i++) {
+ const size = NumberUtils.getInt32LE(bufferData, index);
+ internalOptions.index = index;
+ documents[docStartIndex + i] = internalDeserialize(bufferData, internalOptions);
+ index = index + size;
+ }
+ return index;
+}
+
+var bson = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ BSONError: BSONError,
+ BSONOffsetError: BSONOffsetError,
+ BSONRegExp: BSONRegExp,
+ BSONRuntimeError: BSONRuntimeError,
+ BSONSymbol: BSONSymbol,
+ BSONType: BSONType,
+ BSONValue: BSONValue,
+ BSONVersionError: BSONVersionError,
+ Binary: Binary,
+ Code: Code,
+ DBRef: DBRef,
+ Decimal128: Decimal128,
+ Double: Double,
+ EJSON: EJSON,
+ Int32: Int32,
+ Long: Long,
+ MaxKey: MaxKey,
+ MinKey: MinKey,
+ ObjectId: ObjectId,
+ Timestamp: Timestamp,
+ UUID: UUID,
+ calculateObjectSize: calculateObjectSize,
+ deserialize: deserialize,
+ deserializeStream: deserializeStream,
+ onDemand: onDemand,
+ serialize: serialize,
+ serializeWithBufferAndIndex: serializeWithBufferAndIndex,
+ setInternalBufferSize: setInternalBufferSize
+});
+
+exports.BSON = bson;
+exports.BSONError = BSONError;
+exports.BSONOffsetError = BSONOffsetError;
+exports.BSONRegExp = BSONRegExp;
+exports.BSONRuntimeError = BSONRuntimeError;
+exports.BSONSymbol = BSONSymbol;
+exports.BSONType = BSONType;
+exports.BSONValue = BSONValue;
+exports.BSONVersionError = BSONVersionError;
+exports.Binary = Binary;
+exports.Code = Code;
+exports.DBRef = DBRef;
+exports.Decimal128 = Decimal128;
+exports.Double = Double;
+exports.EJSON = EJSON;
+exports.Int32 = Int32;
+exports.Long = Long;
+exports.MaxKey = MaxKey;
+exports.MinKey = MinKey;
+exports.ObjectId = ObjectId;
+exports.Timestamp = Timestamp;
+exports.UUID = UUID;
+exports.calculateObjectSize = calculateObjectSize;
+exports.deserialize = deserialize;
+exports.deserializeStream = deserializeStream;
+exports.onDemand = onDemand;
+exports.serialize = serialize;
+exports.serializeWithBufferAndIndex = serializeWithBufferAndIndex;
+exports.setInternalBufferSize = setInternalBufferSize;
+//# sourceMappingURL=bson.cjs.map
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.cjs.map b/week-3/04-course-app-hard/node_modules/bson/lib/bson.cjs.map
new file mode 100644
index 000000000..15f5a813e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.cjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"bson.cjs","sources":["../src/parser/utils.ts","../src/constants.ts","../src/error.ts","../src/parse_utf8.ts","../src/utils/latin.ts","../src/utils/node_byte_utils.ts","../src/utils/web_byte_utils.ts","../src/utils/byte_utils.ts","../src/bson_value.ts","../src/binary.ts","../src/code.ts","../src/db_ref.ts","../src/utils/string_utils.ts","../src/long.ts","../src/decimal128.ts","../src/double.ts","../src/int_32.ts","../src/max_key.ts","../src/min_key.ts","../src/utils/number_utils.ts","../src/objectid.ts","../src/parser/calculate_size.ts","../src/regexp.ts","../src/symbol.ts","../src/timestamp.ts","../src/parser/deserializer.ts","../src/parser/serializer.ts","../src/extended_json.ts","../src/parser/on_demand/parse_to_elements.ts","../src/parser/on_demand/index.ts","../src/bson.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["StringUtils.validateStringCharacters","StringUtils.removeLeadingZerosAndExplicitPlus","constants.JS_INT_MIN","constants.JS_INT_MAX","constants.BSON_INT32_MIN","constants.BSON_INT32_MAX","constants.BSON_MAJOR_VERSION","constants.BSON_DATA_STRING","constants.BSON_DATA_OID","constants.BSON_DATA_INT","constants.BSON_DATA_NUMBER","constants.BSON_DATA_DATE","constants.BSON_DATA_BOOLEAN","constants.BSON_DATA_OBJECT","constants.BSON_DATA_ARRAY","constants.BSON_DATA_UNDEFINED","constants.BSON_DATA_NULL","constants.BSON_DATA_LONG","constants.BSON_DATA_DECIMAL128","constants.BSON_DATA_BINARY","constants.BSON_BINARY_SUBTYPE_UUID_NEW","constants.BSON_DATA_REGEXP","constants.BSON_DATA_SYMBOL","constants.BSON_DATA_TIMESTAMP","constants.BSON_DATA_MIN_KEY","constants.BSON_DATA_MAX_KEY","constants.BSON_DATA_CODE","constants.BSON_DATA_CODE_W_SCOPE","constants.BSON_DATA_DBPOINTER","constants.BSON_BINARY_SUBTYPE_DEFAULT"],"mappings":";;AAAM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,OAAO,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,CAAC,QAAQ,CACpE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CACtC,CAAC;AACJ,CAAC;AAEK,SAAU,YAAY,CAAC,KAAc,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,qBAAqB,CAAC;AACzE,CAAC;AAUK,SAAU,QAAQ,CAAC,CAAU,EAAA;AACjC,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,iBAAiB,CAAC;AACjE,CAAC;AAEK,SAAU,KAAK,CAAC,CAAU,EAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC;AAC9D,CAAC;AAEK,SAAU,MAAM,CAAC,CAAU,EAAA;AAC/B,IAAA,OAAO,MAA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I,CAAC;KACtB;AAGD,IAAA,OAAO,KAAK,CAAC;AACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.mjs b/week-3/04-course-app-hard/node_modules/bson/lib/bson.mjs
new file mode 100644
index 000000000..c4ab0982f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.mjs
@@ -0,0 +1,4387 @@
+function isAnyArrayBuffer(value) {
+ return ['[object ArrayBuffer]', '[object SharedArrayBuffer]'].includes(Object.prototype.toString.call(value));
+}
+function isUint8Array(value) {
+ return Object.prototype.toString.call(value) === '[object Uint8Array]';
+}
+function isRegExp(d) {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+}
+function isMap(d) {
+ return Object.prototype.toString.call(d) === '[object Map]';
+}
+function isDate(d) {
+ return Object.prototype.toString.call(d) === '[object Date]';
+}
+function defaultInspect(x, _options) {
+ return JSON.stringify(x, (k, v) => {
+ if (typeof v === 'bigint') {
+ return { $numberLong: `${v}` };
+ }
+ else if (isMap(v)) {
+ return Object.fromEntries(v);
+ }
+ return v;
+ });
+}
+function getStylizeFunction(options) {
+ const stylizeExists = options != null &&
+ typeof options === 'object' &&
+ 'stylize' in options &&
+ typeof options.stylize === 'function';
+ if (stylizeExists) {
+ return options.stylize;
+ }
+}
+
+const BSON_MAJOR_VERSION = 6;
+const BSON_INT32_MAX = 0x7fffffff;
+const BSON_INT32_MIN = -0x80000000;
+const BSON_INT64_MAX = Math.pow(2, 63) - 1;
+const BSON_INT64_MIN = -Math.pow(2, 63);
+const JS_INT_MAX = Math.pow(2, 53);
+const JS_INT_MIN = -Math.pow(2, 53);
+const BSON_DATA_NUMBER = 1;
+const BSON_DATA_STRING = 2;
+const BSON_DATA_OBJECT = 3;
+const BSON_DATA_ARRAY = 4;
+const BSON_DATA_BINARY = 5;
+const BSON_DATA_UNDEFINED = 6;
+const BSON_DATA_OID = 7;
+const BSON_DATA_BOOLEAN = 8;
+const BSON_DATA_DATE = 9;
+const BSON_DATA_NULL = 10;
+const BSON_DATA_REGEXP = 11;
+const BSON_DATA_DBPOINTER = 12;
+const BSON_DATA_CODE = 13;
+const BSON_DATA_SYMBOL = 14;
+const BSON_DATA_CODE_W_SCOPE = 15;
+const BSON_DATA_INT = 16;
+const BSON_DATA_TIMESTAMP = 17;
+const BSON_DATA_LONG = 18;
+const BSON_DATA_DECIMAL128 = 19;
+const BSON_DATA_MIN_KEY = 0xff;
+const BSON_DATA_MAX_KEY = 0x7f;
+const BSON_BINARY_SUBTYPE_DEFAULT = 0;
+const BSON_BINARY_SUBTYPE_UUID_NEW = 4;
+const BSONType = Object.freeze({
+ double: 1,
+ string: 2,
+ object: 3,
+ array: 4,
+ binData: 5,
+ undefined: 6,
+ objectId: 7,
+ bool: 8,
+ date: 9,
+ null: 10,
+ regex: 11,
+ dbPointer: 12,
+ javascript: 13,
+ symbol: 14,
+ javascriptWithScope: 15,
+ int: 16,
+ timestamp: 17,
+ long: 18,
+ decimal: 19,
+ minKey: -1,
+ maxKey: 127
+});
+
+class BSONError extends Error {
+ get bsonError() {
+ return true;
+ }
+ get name() {
+ return 'BSONError';
+ }
+ constructor(message, options) {
+ super(message, options);
+ }
+ static isBSONError(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ 'bsonError' in value &&
+ value.bsonError === true &&
+ 'name' in value &&
+ 'message' in value &&
+ 'stack' in value);
+ }
+}
+class BSONVersionError extends BSONError {
+ get name() {
+ return 'BSONVersionError';
+ }
+ constructor() {
+ super(`Unsupported BSON version, bson types must be from bson ${BSON_MAJOR_VERSION}.x.x`);
+ }
+}
+class BSONRuntimeError extends BSONError {
+ get name() {
+ return 'BSONRuntimeError';
+ }
+ constructor(message) {
+ super(message);
+ }
+}
+class BSONOffsetError extends BSONError {
+ get name() {
+ return 'BSONOffsetError';
+ }
+ constructor(message, offset, options) {
+ super(`${message}. offset: ${offset}`, options);
+ this.offset = offset;
+ }
+}
+
+let TextDecoderFatal;
+let TextDecoderNonFatal;
+function parseUtf8(buffer, start, end, fatal) {
+ if (fatal) {
+ TextDecoderFatal ??= new TextDecoder('utf8', { fatal: true });
+ try {
+ return TextDecoderFatal.decode(buffer.subarray(start, end));
+ }
+ catch (cause) {
+ throw new BSONError('Invalid UTF-8 string in BSON document', { cause });
+ }
+ }
+ TextDecoderNonFatal ??= new TextDecoder('utf8', { fatal: false });
+ return TextDecoderNonFatal.decode(buffer.subarray(start, end));
+}
+
+function tryReadBasicLatin(uint8array, start, end) {
+ if (uint8array.length === 0) {
+ return '';
+ }
+ const stringByteLength = end - start;
+ if (stringByteLength === 0) {
+ return '';
+ }
+ if (stringByteLength > 20) {
+ return null;
+ }
+ if (stringByteLength === 1 && uint8array[start] < 128) {
+ return String.fromCharCode(uint8array[start]);
+ }
+ if (stringByteLength === 2 && uint8array[start] < 128 && uint8array[start + 1] < 128) {
+ return String.fromCharCode(uint8array[start]) + String.fromCharCode(uint8array[start + 1]);
+ }
+ if (stringByteLength === 3 &&
+ uint8array[start] < 128 &&
+ uint8array[start + 1] < 128 &&
+ uint8array[start + 2] < 128) {
+ return (String.fromCharCode(uint8array[start]) +
+ String.fromCharCode(uint8array[start + 1]) +
+ String.fromCharCode(uint8array[start + 2]));
+ }
+ const latinBytes = [];
+ for (let i = start; i < end; i++) {
+ const byte = uint8array[i];
+ if (byte > 127) {
+ return null;
+ }
+ latinBytes.push(byte);
+ }
+ return String.fromCharCode(...latinBytes);
+}
+function tryWriteBasicLatin(destination, source, offset) {
+ if (source.length === 0)
+ return 0;
+ if (source.length > 25)
+ return null;
+ if (destination.length - offset < source.length)
+ return null;
+ for (let charOffset = 0, destinationOffset = offset; charOffset < source.length; charOffset++, destinationOffset++) {
+ const char = source.charCodeAt(charOffset);
+ if (char > 127)
+ return null;
+ destination[destinationOffset] = char;
+ }
+ return source.length;
+}
+
+function nodejsMathRandomBytes(byteLength) {
+ return nodeJsByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const nodejsRandomBytes = await (async () => {
+ try {
+ return (await import('crypto')).randomBytes;
+ }
+ catch {
+ return nodejsMathRandomBytes;
+ }
+})();
+const nodeJsByteUtils = {
+ toLocalBufferType(potentialBuffer) {
+ if (Buffer.isBuffer(potentialBuffer)) {
+ return potentialBuffer;
+ }
+ if (ArrayBuffer.isView(potentialBuffer)) {
+ return Buffer.from(potentialBuffer.buffer, potentialBuffer.byteOffset, potentialBuffer.byteLength);
+ }
+ const stringTag = potentialBuffer?.[Symbol.toStringTag] ?? Object.prototype.toString.call(potentialBuffer);
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return Buffer.from(potentialBuffer);
+ }
+ throw new BSONError(`Cannot create Buffer from ${String(potentialBuffer)}`);
+ },
+ allocate(size) {
+ return Buffer.alloc(size);
+ },
+ allocateUnsafe(size) {
+ return Buffer.allocUnsafe(size);
+ },
+ equals(a, b) {
+ return nodeJsByteUtils.toLocalBufferType(a).equals(b);
+ },
+ fromNumberArray(array) {
+ return Buffer.from(array);
+ },
+ fromBase64(base64) {
+ return Buffer.from(base64, 'base64');
+ },
+ toBase64(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('base64');
+ },
+ fromISO88591(codePoints) {
+ return Buffer.from(codePoints, 'binary');
+ },
+ toISO88591(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('binary');
+ },
+ fromHex(hex) {
+ return Buffer.from(hex, 'hex');
+ },
+ toHex(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('hex');
+ },
+ toUTF8(buffer, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(buffer, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ const string = nodeJsByteUtils.toLocalBufferType(buffer).toString('utf8', start, end);
+ if (fatal) {
+ for (let i = 0; i < string.length; i++) {
+ if (string.charCodeAt(i) === 0xfffd) {
+ parseUtf8(buffer, start, end, true);
+ break;
+ }
+ }
+ }
+ return string;
+ },
+ utf8ByteLength(input) {
+ return Buffer.byteLength(input, 'utf8');
+ },
+ encodeUTF8Into(buffer, source, byteOffset) {
+ const latinBytesWritten = tryWriteBasicLatin(buffer, source, byteOffset);
+ if (latinBytesWritten != null) {
+ return latinBytesWritten;
+ }
+ return nodeJsByteUtils.toLocalBufferType(buffer).write(source, byteOffset, undefined, 'utf8');
+ },
+ randomBytes: nodejsRandomBytes
+};
+
+function isReactNative() {
+ const { navigator } = globalThis;
+ return typeof navigator === 'object' && navigator.product === 'ReactNative';
+}
+function webMathRandomBytes(byteLength) {
+ if (byteLength < 0) {
+ throw new RangeError(`The argument 'byteLength' is invalid. Received ${byteLength}`);
+ }
+ return webByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const webRandomBytes = (() => {
+ const { crypto } = globalThis;
+ if (crypto != null && typeof crypto.getRandomValues === 'function') {
+ return (byteLength) => {
+ return crypto.getRandomValues(webByteUtils.allocate(byteLength));
+ };
+ }
+ else {
+ if (isReactNative()) {
+ const { console } = globalThis;
+ console?.warn?.('BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.');
+ }
+ return webMathRandomBytes;
+ }
+})();
+const HEX_DIGIT = /(\d|[a-f])/i;
+const webByteUtils = {
+ toLocalBufferType(potentialUint8array) {
+ const stringTag = potentialUint8array?.[Symbol.toStringTag] ??
+ Object.prototype.toString.call(potentialUint8array);
+ if (stringTag === 'Uint8Array') {
+ return potentialUint8array;
+ }
+ if (ArrayBuffer.isView(potentialUint8array)) {
+ return new Uint8Array(potentialUint8array.buffer.slice(potentialUint8array.byteOffset, potentialUint8array.byteOffset + potentialUint8array.byteLength));
+ }
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return new Uint8Array(potentialUint8array);
+ }
+ throw new BSONError(`Cannot make a Uint8Array from ${String(potentialUint8array)}`);
+ },
+ allocate(size) {
+ if (typeof size !== 'number') {
+ throw new TypeError(`The "size" argument must be of type number. Received ${String(size)}`);
+ }
+ return new Uint8Array(size);
+ },
+ allocateUnsafe(size) {
+ return webByteUtils.allocate(size);
+ },
+ equals(a, b) {
+ if (a.byteLength !== b.byteLength) {
+ return false;
+ }
+ for (let i = 0; i < a.byteLength; i++) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+ return true;
+ },
+ fromNumberArray(array) {
+ return Uint8Array.from(array);
+ },
+ fromBase64(base64) {
+ return Uint8Array.from(atob(base64), c => c.charCodeAt(0));
+ },
+ toBase64(uint8array) {
+ return btoa(webByteUtils.toISO88591(uint8array));
+ },
+ fromISO88591(codePoints) {
+ return Uint8Array.from(codePoints, c => c.charCodeAt(0) & 0xff);
+ },
+ toISO88591(uint8array) {
+ return Array.from(Uint16Array.from(uint8array), b => String.fromCharCode(b)).join('');
+ },
+ fromHex(hex) {
+ const evenLengthHex = hex.length % 2 === 0 ? hex : hex.slice(0, hex.length - 1);
+ const buffer = [];
+ for (let i = 0; i < evenLengthHex.length; i += 2) {
+ const firstDigit = evenLengthHex[i];
+ const secondDigit = evenLengthHex[i + 1];
+ if (!HEX_DIGIT.test(firstDigit)) {
+ break;
+ }
+ if (!HEX_DIGIT.test(secondDigit)) {
+ break;
+ }
+ const hexDigit = Number.parseInt(`${firstDigit}${secondDigit}`, 16);
+ buffer.push(hexDigit);
+ }
+ return Uint8Array.from(buffer);
+ },
+ toHex(uint8array) {
+ return Array.from(uint8array, byte => byte.toString(16).padStart(2, '0')).join('');
+ },
+ toUTF8(uint8array, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(uint8array, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ return parseUtf8(uint8array, start, end, fatal);
+ },
+ utf8ByteLength(input) {
+ return new TextEncoder().encode(input).byteLength;
+ },
+ encodeUTF8Into(uint8array, source, byteOffset) {
+ const bytes = new TextEncoder().encode(source);
+ uint8array.set(bytes, byteOffset);
+ return bytes.byteLength;
+ },
+ randomBytes: webRandomBytes
+};
+
+const hasGlobalBuffer = typeof Buffer === 'function' && Buffer.prototype?._isBuffer !== true;
+const ByteUtils = hasGlobalBuffer ? nodeJsByteUtils : webByteUtils;
+
+class BSONValue {
+ get [Symbol.for('@@mdb.bson.version')]() {
+ return BSON_MAJOR_VERSION;
+ }
+ [Symbol.for('nodejs.util.inspect.custom')](depth, options, inspect) {
+ return this.inspect(depth, options, inspect);
+ }
+}
+
+class Binary extends BSONValue {
+ get _bsontype() {
+ return 'Binary';
+ }
+ constructor(buffer, subType) {
+ super();
+ if (!(buffer == null) &&
+ typeof buffer === 'string' &&
+ !ArrayBuffer.isView(buffer) &&
+ !isAnyArrayBuffer(buffer) &&
+ !Array.isArray(buffer)) {
+ throw new BSONError('Binary can only be constructed from Uint8Array or number[]');
+ }
+ this.sub_type = subType ?? Binary.BSON_BINARY_SUBTYPE_DEFAULT;
+ if (buffer == null) {
+ this.buffer = ByteUtils.allocate(Binary.BUFFER_SIZE);
+ this.position = 0;
+ }
+ else {
+ this.buffer = Array.isArray(buffer)
+ ? ByteUtils.fromNumberArray(buffer)
+ : ByteUtils.toLocalBufferType(buffer);
+ this.position = this.buffer.byteLength;
+ }
+ }
+ put(byteValue) {
+ if (typeof byteValue === 'string' && byteValue.length !== 1) {
+ throw new BSONError('only accepts single character String');
+ }
+ else if (typeof byteValue !== 'number' && byteValue.length !== 1)
+ throw new BSONError('only accepts single character Uint8Array or Array');
+ let decodedByte;
+ if (typeof byteValue === 'string') {
+ decodedByte = byteValue.charCodeAt(0);
+ }
+ else if (typeof byteValue === 'number') {
+ decodedByte = byteValue;
+ }
+ else {
+ decodedByte = byteValue[0];
+ }
+ if (decodedByte < 0 || decodedByte > 255) {
+ throw new BSONError('only accepts number in a valid unsigned byte range 0-255');
+ }
+ if (this.buffer.byteLength > this.position) {
+ this.buffer[this.position++] = decodedByte;
+ }
+ else {
+ const newSpace = ByteUtils.allocate(Binary.BUFFER_SIZE + this.buffer.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ this.buffer[this.position++] = decodedByte;
+ }
+ }
+ write(sequence, offset) {
+ offset = typeof offset === 'number' ? offset : this.position;
+ if (this.buffer.byteLength < offset + sequence.length) {
+ const newSpace = ByteUtils.allocate(this.buffer.byteLength + sequence.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ }
+ if (ArrayBuffer.isView(sequence)) {
+ this.buffer.set(ByteUtils.toLocalBufferType(sequence), offset);
+ this.position =
+ offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;
+ }
+ else if (typeof sequence === 'string') {
+ throw new BSONError('input cannot be string');
+ }
+ }
+ read(position, length) {
+ length = length && length > 0 ? length : this.position;
+ return this.buffer.slice(position, position + length);
+ }
+ value() {
+ return this.buffer.length === this.position
+ ? this.buffer
+ : this.buffer.subarray(0, this.position);
+ }
+ length() {
+ return this.position;
+ }
+ toJSON() {
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.buffer.subarray(0, this.position));
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ if (encoding === 'utf8' || encoding === 'utf-8')
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ const base64String = ByteUtils.toBase64(this.buffer);
+ const subType = Number(this.sub_type).toString(16);
+ if (options.legacy) {
+ return {
+ $binary: base64String,
+ $type: subType.length === 1 ? '0' + subType : subType
+ };
+ }
+ return {
+ $binary: {
+ base64: base64String,
+ subType: subType.length === 1 ? '0' + subType : subType
+ }
+ };
+ }
+ toUUID() {
+ if (this.sub_type === Binary.SUBTYPE_UUID) {
+ return new UUID(this.buffer.slice(0, this.position));
+ }
+ throw new BSONError(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${Binary.SUBTYPE_UUID}" is currently supported.`);
+ }
+ static createFromHexString(hex, subType) {
+ return new Binary(ByteUtils.fromHex(hex), subType);
+ }
+ static createFromBase64(base64, subType) {
+ return new Binary(ByteUtils.fromBase64(base64), subType);
+ }
+ static fromExtendedJSON(doc, options) {
+ options = options || {};
+ let data;
+ let type;
+ if ('$binary' in doc) {
+ if (options.legacy && typeof doc.$binary === 'string' && '$type' in doc) {
+ type = doc.$type ? parseInt(doc.$type, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary);
+ }
+ else {
+ if (typeof doc.$binary !== 'string') {
+ type = doc.$binary.subType ? parseInt(doc.$binary.subType, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary.base64);
+ }
+ }
+ }
+ else if ('$uuid' in doc) {
+ type = 4;
+ data = UUID.bytesFromString(doc.$uuid);
+ }
+ if (!data) {
+ throw new BSONError(`Unexpected Binary Extended JSON format ${JSON.stringify(doc)}`);
+ }
+ return type === BSON_BINARY_SUBTYPE_UUID_NEW ? new UUID(data) : new Binary(data, type);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const base64 = ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ const base64Arg = inspect(base64, options);
+ const subTypeArg = inspect(this.sub_type, options);
+ return `Binary.createFromBase64(${base64Arg}, ${subTypeArg})`;
+ }
+}
+Binary.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+Binary.BUFFER_SIZE = 256;
+Binary.SUBTYPE_DEFAULT = 0;
+Binary.SUBTYPE_FUNCTION = 1;
+Binary.SUBTYPE_BYTE_ARRAY = 2;
+Binary.SUBTYPE_UUID_OLD = 3;
+Binary.SUBTYPE_UUID = 4;
+Binary.SUBTYPE_MD5 = 5;
+Binary.SUBTYPE_ENCRYPTED = 6;
+Binary.SUBTYPE_COLUMN = 7;
+Binary.SUBTYPE_SENSITIVE = 8;
+Binary.SUBTYPE_USER_DEFINED = 128;
+const UUID_BYTE_LENGTH = 16;
+const UUID_WITHOUT_DASHES = /^[0-9A-F]{32}$/i;
+const UUID_WITH_DASHES = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
+class UUID extends Binary {
+ constructor(input) {
+ let bytes;
+ if (input == null) {
+ bytes = UUID.generate();
+ }
+ else if (input instanceof UUID) {
+ bytes = ByteUtils.toLocalBufferType(new Uint8Array(input.buffer));
+ }
+ else if (ArrayBuffer.isView(input) && input.byteLength === UUID_BYTE_LENGTH) {
+ bytes = ByteUtils.toLocalBufferType(input);
+ }
+ else if (typeof input === 'string') {
+ bytes = UUID.bytesFromString(input);
+ }
+ else {
+ throw new BSONError('Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).');
+ }
+ super(bytes, BSON_BINARY_SUBTYPE_UUID_NEW);
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ }
+ toHexString(includeDashes = true) {
+ if (includeDashes) {
+ return [
+ ByteUtils.toHex(this.buffer.subarray(0, 4)),
+ ByteUtils.toHex(this.buffer.subarray(4, 6)),
+ ByteUtils.toHex(this.buffer.subarray(6, 8)),
+ ByteUtils.toHex(this.buffer.subarray(8, 10)),
+ ByteUtils.toHex(this.buffer.subarray(10, 16))
+ ].join('-');
+ }
+ return ByteUtils.toHex(this.buffer);
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.id);
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ equals(otherId) {
+ if (!otherId) {
+ return false;
+ }
+ if (otherId instanceof UUID) {
+ return ByteUtils.equals(otherId.id, this.id);
+ }
+ try {
+ return ByteUtils.equals(new UUID(otherId).id, this.id);
+ }
+ catch {
+ return false;
+ }
+ }
+ toBinary() {
+ return new Binary(this.id, Binary.SUBTYPE_UUID);
+ }
+ static generate() {
+ const bytes = ByteUtils.randomBytes(UUID_BYTE_LENGTH);
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
+ return bytes;
+ }
+ static isValid(input) {
+ if (!input) {
+ return false;
+ }
+ if (typeof input === 'string') {
+ return UUID.isValidUUIDString(input);
+ }
+ if (isUint8Array(input)) {
+ return input.byteLength === UUID_BYTE_LENGTH;
+ }
+ return (input._bsontype === 'Binary' &&
+ input.sub_type === this.SUBTYPE_UUID &&
+ input.buffer.byteLength === 16);
+ }
+ static createFromHexString(hexString) {
+ const buffer = UUID.bytesFromString(hexString);
+ return new UUID(buffer);
+ }
+ static createFromBase64(base64) {
+ return new UUID(ByteUtils.fromBase64(base64));
+ }
+ static bytesFromString(representation) {
+ if (!UUID.isValidUUIDString(representation)) {
+ throw new BSONError('UUID string representation must be 32 hex digits or canonical hyphenated representation');
+ }
+ return ByteUtils.fromHex(representation.replace(/-/g, ''));
+ }
+ static isValidUUIDString(representation) {
+ return UUID_WITHOUT_DASHES.test(representation) || UUID_WITH_DASHES.test(representation);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new UUID(${inspect(this.toHexString(), options)})`;
+ }
+}
+
+class Code extends BSONValue {
+ get _bsontype() {
+ return 'Code';
+ }
+ constructor(code, scope) {
+ super();
+ this.code = code.toString();
+ this.scope = scope ?? null;
+ }
+ toJSON() {
+ if (this.scope != null) {
+ return { code: this.code, scope: this.scope };
+ }
+ return { code: this.code };
+ }
+ toExtendedJSON() {
+ if (this.scope) {
+ return { $code: this.code, $scope: this.scope };
+ }
+ return { $code: this.code };
+ }
+ static fromExtendedJSON(doc) {
+ return new Code(doc.$code, doc.$scope);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ let parametersString = inspect(this.code, options);
+ const multiLineFn = parametersString.includes('\n');
+ if (this.scope != null) {
+ parametersString += `,${multiLineFn ? '\n' : ' '}${inspect(this.scope, options)}`;
+ }
+ const endingNewline = multiLineFn && this.scope === null;
+ return `new Code(${multiLineFn ? '\n' : ''}${parametersString}${endingNewline ? '\n' : ''})`;
+ }
+}
+
+function isDBRefLike(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '$id' in value &&
+ value.$id != null &&
+ '$ref' in value &&
+ typeof value.$ref === 'string' &&
+ (!('$db' in value) || ('$db' in value && typeof value.$db === 'string')));
+}
+class DBRef extends BSONValue {
+ get _bsontype() {
+ return 'DBRef';
+ }
+ constructor(collection, oid, db, fields) {
+ super();
+ const parts = collection.split('.');
+ if (parts.length === 2) {
+ db = parts.shift();
+ collection = parts.shift();
+ }
+ this.collection = collection;
+ this.oid = oid;
+ this.db = db;
+ this.fields = fields || {};
+ }
+ get namespace() {
+ return this.collection;
+ }
+ set namespace(value) {
+ this.collection = value;
+ }
+ toJSON() {
+ const o = Object.assign({
+ $ref: this.collection,
+ $id: this.oid
+ }, this.fields);
+ if (this.db != null)
+ o.$db = this.db;
+ return o;
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ let o = {
+ $ref: this.collection,
+ $id: this.oid
+ };
+ if (options.legacy) {
+ return o;
+ }
+ if (this.db)
+ o.$db = this.db;
+ o = Object.assign(o, this.fields);
+ return o;
+ }
+ static fromExtendedJSON(doc) {
+ const copy = Object.assign({}, doc);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(doc.$ref, doc.$id, doc.$db, copy);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const args = [
+ inspect(this.namespace, options),
+ inspect(this.oid, options),
+ ...(this.db ? [inspect(this.db, options)] : []),
+ ...(Object.keys(this.fields).length > 0 ? [inspect(this.fields, options)] : [])
+ ];
+ args[1] = inspect === defaultInspect ? `new ObjectId(${args[1]})` : args[1];
+ return `new DBRef(${args.join(', ')})`;
+ }
+}
+
+function removeLeadingZerosAndExplicitPlus(str) {
+ if (str === '') {
+ return str;
+ }
+ let startIndex = 0;
+ const isNegative = str[startIndex] === '-';
+ const isExplicitlyPositive = str[startIndex] === '+';
+ if (isExplicitlyPositive || isNegative) {
+ startIndex += 1;
+ }
+ let foundInsignificantZero = false;
+ for (; startIndex < str.length && str[startIndex] === '0'; ++startIndex) {
+ foundInsignificantZero = true;
+ }
+ if (!foundInsignificantZero) {
+ return isExplicitlyPositive ? str.slice(1) : str;
+ }
+ return `${isNegative ? '-' : ''}${str.length === startIndex ? '0' : str.slice(startIndex)}`;
+}
+function validateStringCharacters(str, radix) {
+ radix = radix ?? 10;
+ const validCharacters = '0123456789abcdefghijklmnopqrstuvwxyz'.slice(0, radix);
+ const regex = new RegExp(`[^-+${validCharacters}]`, 'i');
+ return regex.test(str) ? false : str;
+}
+
+let wasm = undefined;
+try {
+ wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])), {}).exports;
+}
+catch {
+}
+const TWO_PWR_16_DBL = 1 << 16;
+const TWO_PWR_24_DBL = 1 << 24;
+const TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
+const TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
+const TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
+const INT_CACHE = {};
+const UINT_CACHE = {};
+const MAX_INT64_STRING_LENGTH = 20;
+const DECIMAL_REG_EX = /^(\+?0|(\+|-)?[1-9][0-9]*)$/;
+class Long extends BSONValue {
+ get _bsontype() {
+ return 'Long';
+ }
+ get __isLong__() {
+ return true;
+ }
+ constructor(lowOrValue = 0, highOrUnsigned, unsigned) {
+ super();
+ const unsignedBool = typeof highOrUnsigned === 'boolean' ? highOrUnsigned : Boolean(unsigned);
+ const high = typeof highOrUnsigned === 'number' ? highOrUnsigned : 0;
+ const res = typeof lowOrValue === 'string'
+ ? Long.fromString(lowOrValue, unsignedBool)
+ : typeof lowOrValue === 'bigint'
+ ? Long.fromBigInt(lowOrValue, unsignedBool)
+ : { low: lowOrValue | 0, high: high | 0, unsigned: unsignedBool };
+ this.low = res.low;
+ this.high = res.high;
+ this.unsigned = res.unsigned;
+ }
+ static fromBits(lowBits, highBits, unsigned) {
+ return new Long(lowBits, highBits, unsigned);
+ }
+ static fromInt(value, unsigned) {
+ let obj, cachedObj, cache;
+ if (unsigned) {
+ value >>>= 0;
+ if ((cache = 0 <= value && value < 256)) {
+ cachedObj = UINT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, (value | 0) < 0 ? -1 : 0, true);
+ if (cache)
+ UINT_CACHE[value] = obj;
+ return obj;
+ }
+ else {
+ value |= 0;
+ if ((cache = -128 <= value && value < 128)) {
+ cachedObj = INT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, value < 0 ? -1 : 0, false);
+ if (cache)
+ INT_CACHE[value] = obj;
+ return obj;
+ }
+ }
+ static fromNumber(value, unsigned) {
+ if (isNaN(value))
+ return unsigned ? Long.UZERO : Long.ZERO;
+ if (unsigned) {
+ if (value < 0)
+ return Long.UZERO;
+ if (value >= TWO_PWR_64_DBL)
+ return Long.MAX_UNSIGNED_VALUE;
+ }
+ else {
+ if (value <= -TWO_PWR_63_DBL)
+ return Long.MIN_VALUE;
+ if (value + 1 >= TWO_PWR_63_DBL)
+ return Long.MAX_VALUE;
+ }
+ if (value < 0)
+ return Long.fromNumber(-value, unsigned).neg();
+ return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
+ }
+ static fromBigInt(value, unsigned) {
+ const FROM_BIGINT_BIT_MASK = BigInt(0xffffffff);
+ const FROM_BIGINT_BIT_SHIFT = BigInt(32);
+ return new Long(Number(value & FROM_BIGINT_BIT_MASK), Number((value >> FROM_BIGINT_BIT_SHIFT) & FROM_BIGINT_BIT_MASK), unsigned);
+ }
+ static _fromString(str, unsigned, radix) {
+ if (str.length === 0)
+ throw new BSONError('empty string');
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ let p;
+ if ((p = str.indexOf('-')) > 0)
+ throw new BSONError('interior hyphen');
+ else if (p === 0) {
+ return Long._fromString(str.substring(1), unsigned, radix).neg();
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 8));
+ let result = Long.ZERO;
+ for (let i = 0; i < str.length; i += 8) {
+ const size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ const power = Long.fromNumber(Math.pow(radix, size));
+ result = result.mul(power).add(Long.fromNumber(value));
+ }
+ else {
+ result = result.mul(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ result.unsigned = unsigned;
+ return result;
+ }
+ static fromStringStrict(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str.trim() !== str) {
+ throw new BSONError(`Input: '${str}' contains leading and/or trailing whitespace`);
+ }
+ if (!validateStringCharacters(str, radix)) {
+ throw new BSONError(`Input: '${str}' contains invalid characters for radix: ${radix}`);
+ }
+ const cleanedStr = removeLeadingZerosAndExplicitPlus(str);
+ const result = Long._fromString(cleanedStr, unsigned, radix);
+ if (result.toString(radix).toLowerCase() !== cleanedStr.toLowerCase()) {
+ throw new BSONError(`Input: ${str} is not representable as ${result.unsigned ? 'an unsigned' : 'a signed'} 64-bit Long ${radix != null ? `with radix: ${radix}` : ''}`);
+ }
+ return result;
+ }
+ static fromString(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str === 'NaN' && radix < 24) {
+ return Long.ZERO;
+ }
+ else if ((str === 'Infinity' || str === '+Infinity' || str === '-Infinity') && radix < 35) {
+ return Long.ZERO;
+ }
+ return Long._fromString(str, unsigned, radix);
+ }
+ static fromBytes(bytes, unsigned, le) {
+ return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
+ }
+ static fromBytesLE(bytes, unsigned) {
+ return new Long(bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24), bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24), unsigned);
+ }
+ static fromBytesBE(bytes, unsigned) {
+ return new Long((bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7], (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3], unsigned);
+ }
+ static isLong(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '__isLong__' in value &&
+ value.__isLong__ === true);
+ }
+ static fromValue(val, unsigned) {
+ if (typeof val === 'number')
+ return Long.fromNumber(val, unsigned);
+ if (typeof val === 'string')
+ return Long.fromString(val, unsigned);
+ return Long.fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);
+ }
+ add(addend) {
+ if (!Long.isLong(addend))
+ addend = Long.fromValue(addend);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = addend.high >>> 16;
+ const b32 = addend.high & 0xffff;
+ const b16 = addend.low >>> 16;
+ const b00 = addend.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 + b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ and(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low & other.low, this.high & other.high, this.unsigned);
+ }
+ compare(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.eq(other))
+ return 0;
+ const thisNeg = this.isNegative(), otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg)
+ return -1;
+ if (!thisNeg && otherNeg)
+ return 1;
+ if (!this.unsigned)
+ return this.sub(other).isNegative() ? -1 : 1;
+ return other.high >>> 0 > this.high >>> 0 ||
+ (other.high === this.high && other.low >>> 0 > this.low >>> 0)
+ ? -1
+ : 1;
+ }
+ comp(other) {
+ return this.compare(other);
+ }
+ divide(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (divisor.isZero())
+ throw new BSONError('division by zero');
+ if (wasm) {
+ if (!this.unsigned &&
+ this.high === -0x80000000 &&
+ divisor.low === -1 &&
+ divisor.high === -1) {
+ return this;
+ }
+ const low = (this.unsigned ? wasm.div_u : wasm.div_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (this.isZero())
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ let approx, rem, res;
+ if (!this.unsigned) {
+ if (this.eq(Long.MIN_VALUE)) {
+ if (divisor.eq(Long.ONE) || divisor.eq(Long.NEG_ONE))
+ return Long.MIN_VALUE;
+ else if (divisor.eq(Long.MIN_VALUE))
+ return Long.ONE;
+ else {
+ const halfThis = this.shr(1);
+ approx = halfThis.div(divisor).shl(1);
+ if (approx.eq(Long.ZERO)) {
+ return divisor.isNegative() ? Long.ONE : Long.NEG_ONE;
+ }
+ else {
+ rem = this.sub(divisor.mul(approx));
+ res = approx.add(rem.div(divisor));
+ return res;
+ }
+ }
+ }
+ else if (divisor.eq(Long.MIN_VALUE))
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ if (this.isNegative()) {
+ if (divisor.isNegative())
+ return this.neg().div(divisor.neg());
+ return this.neg().div(divisor).neg();
+ }
+ else if (divisor.isNegative())
+ return this.div(divisor.neg()).neg();
+ res = Long.ZERO;
+ }
+ else {
+ if (!divisor.unsigned)
+ divisor = divisor.toUnsigned();
+ if (divisor.gt(this))
+ return Long.UZERO;
+ if (divisor.gt(this.shru(1)))
+ return Long.UONE;
+ res = Long.UZERO;
+ }
+ rem = this;
+ while (rem.gte(divisor)) {
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
+ const log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ const delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
+ let approxRes = Long.fromNumber(approx);
+ let approxRem = approxRes.mul(divisor);
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx, this.unsigned);
+ approxRem = approxRes.mul(divisor);
+ }
+ if (approxRes.isZero())
+ approxRes = Long.ONE;
+ res = res.add(approxRes);
+ rem = rem.sub(approxRem);
+ }
+ return res;
+ }
+ div(divisor) {
+ return this.divide(divisor);
+ }
+ equals(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
+ return false;
+ return this.high === other.high && this.low === other.low;
+ }
+ eq(other) {
+ return this.equals(other);
+ }
+ getHighBits() {
+ return this.high;
+ }
+ getHighBitsUnsigned() {
+ return this.high >>> 0;
+ }
+ getLowBits() {
+ return this.low;
+ }
+ getLowBitsUnsigned() {
+ return this.low >>> 0;
+ }
+ getNumBitsAbs() {
+ if (this.isNegative()) {
+ return this.eq(Long.MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
+ }
+ const val = this.high !== 0 ? this.high : this.low;
+ let bit;
+ for (bit = 31; bit > 0; bit--)
+ if ((val & (1 << bit)) !== 0)
+ break;
+ return this.high !== 0 ? bit + 33 : bit + 1;
+ }
+ greaterThan(other) {
+ return this.comp(other) > 0;
+ }
+ gt(other) {
+ return this.greaterThan(other);
+ }
+ greaterThanOrEqual(other) {
+ return this.comp(other) >= 0;
+ }
+ gte(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ ge(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ isEven() {
+ return (this.low & 1) === 0;
+ }
+ isNegative() {
+ return !this.unsigned && this.high < 0;
+ }
+ isOdd() {
+ return (this.low & 1) === 1;
+ }
+ isPositive() {
+ return this.unsigned || this.high >= 0;
+ }
+ isZero() {
+ return this.high === 0 && this.low === 0;
+ }
+ lessThan(other) {
+ return this.comp(other) < 0;
+ }
+ lt(other) {
+ return this.lessThan(other);
+ }
+ lessThanOrEqual(other) {
+ return this.comp(other) <= 0;
+ }
+ lte(other) {
+ return this.lessThanOrEqual(other);
+ }
+ modulo(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (wasm) {
+ const low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ return this.sub(this.div(divisor).mul(divisor));
+ }
+ mod(divisor) {
+ return this.modulo(divisor);
+ }
+ rem(divisor) {
+ return this.modulo(divisor);
+ }
+ multiply(multiplier) {
+ if (this.isZero())
+ return Long.ZERO;
+ if (!Long.isLong(multiplier))
+ multiplier = Long.fromValue(multiplier);
+ if (wasm) {
+ const low = wasm.mul(this.low, this.high, multiplier.low, multiplier.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (multiplier.isZero())
+ return Long.ZERO;
+ if (this.eq(Long.MIN_VALUE))
+ return multiplier.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (multiplier.eq(Long.MIN_VALUE))
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (this.isNegative()) {
+ if (multiplier.isNegative())
+ return this.neg().mul(multiplier.neg());
+ else
+ return this.neg().mul(multiplier).neg();
+ }
+ else if (multiplier.isNegative())
+ return this.mul(multiplier.neg()).neg();
+ if (this.lt(Long.TWO_PWR_24) && multiplier.lt(Long.TWO_PWR_24))
+ return Long.fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = multiplier.high >>> 16;
+ const b32 = multiplier.high & 0xffff;
+ const b16 = multiplier.low >>> 16;
+ const b00 = multiplier.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ mul(multiplier) {
+ return this.multiply(multiplier);
+ }
+ negate() {
+ if (!this.unsigned && this.eq(Long.MIN_VALUE))
+ return Long.MIN_VALUE;
+ return this.not().add(Long.ONE);
+ }
+ neg() {
+ return this.negate();
+ }
+ not() {
+ return Long.fromBits(~this.low, ~this.high, this.unsigned);
+ }
+ notEquals(other) {
+ return !this.equals(other);
+ }
+ neq(other) {
+ return this.notEquals(other);
+ }
+ ne(other) {
+ return this.notEquals(other);
+ }
+ or(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low | other.low, this.high | other.high, this.unsigned);
+ }
+ shiftLeft(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);
+ else
+ return Long.fromBits(0, this.low << (numBits - 32), this.unsigned);
+ }
+ shl(numBits) {
+ return this.shiftLeft(numBits);
+ }
+ shiftRight(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);
+ else
+ return Long.fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);
+ }
+ shr(numBits) {
+ return this.shiftRight(numBits);
+ }
+ shiftRightUnsigned(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ numBits &= 63;
+ if (numBits === 0)
+ return this;
+ else {
+ const high = this.high;
+ if (numBits < 32) {
+ const low = this.low;
+ return Long.fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);
+ }
+ else if (numBits === 32)
+ return Long.fromBits(high, 0, this.unsigned);
+ else
+ return Long.fromBits(high >>> (numBits - 32), 0, this.unsigned);
+ }
+ }
+ shr_u(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ shru(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ subtract(subtrahend) {
+ if (!Long.isLong(subtrahend))
+ subtrahend = Long.fromValue(subtrahend);
+ return this.add(subtrahend.neg());
+ }
+ sub(subtrahend) {
+ return this.subtract(subtrahend);
+ }
+ toInt() {
+ return this.unsigned ? this.low >>> 0 : this.low;
+ }
+ toNumber() {
+ if (this.unsigned)
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
+ }
+ toBigInt() {
+ return BigInt(this.toString());
+ }
+ toBytes(le) {
+ return le ? this.toBytesLE() : this.toBytesBE();
+ }
+ toBytesLE() {
+ const hi = this.high, lo = this.low;
+ return [
+ lo & 0xff,
+ (lo >>> 8) & 0xff,
+ (lo >>> 16) & 0xff,
+ lo >>> 24,
+ hi & 0xff,
+ (hi >>> 8) & 0xff,
+ (hi >>> 16) & 0xff,
+ hi >>> 24
+ ];
+ }
+ toBytesBE() {
+ const hi = this.high, lo = this.low;
+ return [
+ hi >>> 24,
+ (hi >>> 16) & 0xff,
+ (hi >>> 8) & 0xff,
+ hi & 0xff,
+ lo >>> 24,
+ (lo >>> 16) & 0xff,
+ (lo >>> 8) & 0xff,
+ lo & 0xff
+ ];
+ }
+ toSigned() {
+ if (!this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, false);
+ }
+ toString(radix) {
+ radix = radix || 10;
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ if (this.isZero())
+ return '0';
+ if (this.isNegative()) {
+ if (this.eq(Long.MIN_VALUE)) {
+ const radixLong = Long.fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
+ return div.toString(radix) + rem1.toInt().toString(radix);
+ }
+ else
+ return '-' + this.neg().toString(radix);
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 6), this.unsigned);
+ let rem = this;
+ let result = '';
+ while (true) {
+ const remDiv = rem.div(radixToPower);
+ const intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0;
+ let digits = intval.toString(radix);
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ }
+ else {
+ while (digits.length < 6)
+ digits = '0' + digits;
+ result = '' + digits + result;
+ }
+ }
+ }
+ toUnsigned() {
+ if (this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, true);
+ }
+ xor(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
+ }
+ eqz() {
+ return this.isZero();
+ }
+ le(other) {
+ return this.lessThanOrEqual(other);
+ }
+ toExtendedJSON(options) {
+ if (options && options.relaxed)
+ return this.toNumber();
+ return { $numberLong: this.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ const { useBigInt64 = false, relaxed = true } = { ...options };
+ if (doc.$numberLong.length > MAX_INT64_STRING_LENGTH) {
+ throw new BSONError('$numberLong string is too long');
+ }
+ if (!DECIMAL_REG_EX.test(doc.$numberLong)) {
+ throw new BSONError(`$numberLong string "${doc.$numberLong}" is in an invalid format`);
+ }
+ if (useBigInt64) {
+ const bigIntResult = BigInt(doc.$numberLong);
+ return BigInt.asIntN(64, bigIntResult);
+ }
+ const longResult = Long.fromString(doc.$numberLong);
+ if (relaxed) {
+ return longResult.toNumber();
+ }
+ return longResult;
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const longVal = inspect(this.toString(), options);
+ const unsignedVal = this.unsigned ? `, ${inspect(this.unsigned, options)}` : '';
+ return `new Long(${longVal}${unsignedVal})`;
+ }
+}
+Long.TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
+Long.MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
+Long.ZERO = Long.fromInt(0);
+Long.UZERO = Long.fromInt(0, true);
+Long.ONE = Long.fromInt(1);
+Long.UONE = Long.fromInt(1, true);
+Long.NEG_ONE = Long.fromInt(-1);
+Long.MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
+Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
+
+const PARSE_STRING_REGEXP = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/;
+const PARSE_INF_REGEXP = /^(\+|-)?(Infinity|inf)$/i;
+const PARSE_NAN_REGEXP = /^(\+|-)?NaN$/i;
+const EXPONENT_MAX = 6111;
+const EXPONENT_MIN = -6176;
+const EXPONENT_BIAS = 6176;
+const MAX_DIGITS = 34;
+const NAN_BUFFER = ByteUtils.fromNumberArray([
+ 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_NEGATIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_POSITIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const EXPONENT_REGEX = /^([-+])?(\d+)?$/;
+const COMBINATION_MASK = 0x1f;
+const EXPONENT_MASK = 0x3fff;
+const COMBINATION_INFINITY = 30;
+const COMBINATION_NAN = 31;
+function isDigit(value) {
+ return !isNaN(parseInt(value, 10));
+}
+function divideu128(value) {
+ const DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ let _rem = Long.fromNumber(0);
+ if (!value.parts[0] && !value.parts[1] && !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+ for (let i = 0; i <= 3; i++) {
+ _rem = _rem.shiftLeft(32);
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low;
+ _rem = _rem.modulo(DIVISOR);
+ }
+ return { quotient: value, rem: _rem };
+}
+function multiply64x2(left, right) {
+ if (!left && !right) {
+ return { high: Long.fromNumber(0), low: Long.fromNumber(0) };
+ }
+ const leftHigh = left.shiftRightUnsigned(32);
+ const leftLow = new Long(left.getLowBits(), 0);
+ const rightHigh = right.shiftRightUnsigned(32);
+ const rightLow = new Long(right.getLowBits(), 0);
+ let productHigh = leftHigh.multiply(rightHigh);
+ let productMid = leftHigh.multiply(rightLow);
+ const productMid2 = leftLow.multiply(rightHigh);
+ let productLow = leftLow.multiply(rightLow);
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0)
+ .add(productMid2)
+ .add(productLow.shiftRightUnsigned(32));
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+ return { high: productHigh, low: productLow };
+}
+function lessThan(left, right) {
+ const uhleft = left.high >>> 0;
+ const uhright = right.high >>> 0;
+ if (uhleft < uhright) {
+ return true;
+ }
+ else if (uhleft === uhright) {
+ const ulleft = left.low >>> 0;
+ const ulright = right.low >>> 0;
+ if (ulleft < ulright)
+ return true;
+ }
+ return false;
+}
+function invalidErr(string, message) {
+ throw new BSONError(`"${string}" is not a valid Decimal128 string - ${message}`);
+}
+class Decimal128 extends BSONValue {
+ get _bsontype() {
+ return 'Decimal128';
+ }
+ constructor(bytes) {
+ super();
+ if (typeof bytes === 'string') {
+ this.bytes = Decimal128.fromString(bytes).bytes;
+ }
+ else if (isUint8Array(bytes)) {
+ if (bytes.byteLength !== 16) {
+ throw new BSONError('Decimal128 must take a Buffer of 16 bytes');
+ }
+ this.bytes = bytes;
+ }
+ else {
+ throw new BSONError('Decimal128 must take a Buffer or string');
+ }
+ }
+ static fromString(representation) {
+ return Decimal128._fromString(representation, { allowRounding: false });
+ }
+ static fromStringWithRounding(representation) {
+ return Decimal128._fromString(representation, { allowRounding: true });
+ }
+ static _fromString(representation, options) {
+ let isNegative = false;
+ let sawSign = false;
+ let sawRadix = false;
+ let foundNonZero = false;
+ let significantDigits = 0;
+ let nDigitsRead = 0;
+ let nDigits = 0;
+ let radixPosition = 0;
+ let firstNonZero = 0;
+ const digits = [0];
+ let nDigitsStored = 0;
+ let digitsInsert = 0;
+ let lastDigit = 0;
+ let exponent = 0;
+ let significandHigh = new Long(0, 0);
+ let significandLow = new Long(0, 0);
+ let biasedExponent = 0;
+ let index = 0;
+ if (representation.length >= 7000) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ const stringMatch = representation.match(PARSE_STRING_REGEXP);
+ const infMatch = representation.match(PARSE_INF_REGEXP);
+ const nanMatch = representation.match(PARSE_NAN_REGEXP);
+ if ((!stringMatch && !infMatch && !nanMatch) || representation.length === 0) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ if (stringMatch) {
+ const unsignedNumber = stringMatch[2];
+ const e = stringMatch[4];
+ const expSign = stringMatch[5];
+ const expNumber = stringMatch[6];
+ if (e && expNumber === undefined)
+ invalidErr(representation, 'missing exponent power');
+ if (e && unsignedNumber === undefined)
+ invalidErr(representation, 'missing exponent base');
+ if (e === undefined && (expSign || expNumber)) {
+ invalidErr(representation, 'missing e before exponent');
+ }
+ }
+ if (representation[index] === '+' || representation[index] === '-') {
+ sawSign = true;
+ isNegative = representation[index++] === '-';
+ }
+ if (!isDigit(representation[index]) && representation[index] !== '.') {
+ if (representation[index] === 'i' || representation[index] === 'I') {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ else if (representation[index] === 'N') {
+ return new Decimal128(NAN_BUFFER);
+ }
+ }
+ while (isDigit(representation[index]) || representation[index] === '.') {
+ if (representation[index] === '.') {
+ if (sawRadix)
+ invalidErr(representation, 'contains multiple periods');
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+ if (nDigitsStored < MAX_DIGITS) {
+ if (representation[index] !== '0' || foundNonZero) {
+ if (!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+ foundNonZero = true;
+ digits[digitsInsert++] = parseInt(representation[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+ if (foundNonZero)
+ nDigits = nDigits + 1;
+ if (sawRadix)
+ radixPosition = radixPosition + 1;
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+ if (sawRadix && !nDigitsRead)
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ if (representation[index] === 'e' || representation[index] === 'E') {
+ const match = representation.substr(++index).match(EXPONENT_REGEX);
+ if (!match || !match[2])
+ return new Decimal128(NAN_BUFFER);
+ exponent = parseInt(match[0], 10);
+ index = index + match[0].length;
+ }
+ if (representation[index])
+ return new Decimal128(NAN_BUFFER);
+ if (!nDigitsStored) {
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ }
+ else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+ if (significantDigits !== 1) {
+ while (representation[firstNonZero + significantDigits - 1 + Number(sawSign) + Number(sawRadix)] === '0') {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+ if (exponent <= radixPosition && radixPosition > exponent + (1 << 14)) {
+ exponent = EXPONENT_MIN;
+ }
+ else {
+ exponent = exponent - radixPosition;
+ }
+ while (exponent > EXPONENT_MAX) {
+ lastDigit = lastDigit + 1;
+ if (lastDigit >= MAX_DIGITS) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ exponent = exponent - 1;
+ }
+ if (options.allowRounding) {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0 && significantDigits < nDigitsStored) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+ if (nDigitsStored < nDigits) {
+ nDigits = nDigits - 1;
+ }
+ else {
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ const digitsString = digits.join('');
+ if (digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ let endOfString = nDigitsRead;
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ let roundBit = 0;
+ if (roundDigit >= 5) {
+ roundBit = 1;
+ if (roundDigit === 5) {
+ roundBit = digits[lastDigit] % 2 === 1 ? 1 : 0;
+ for (let i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if (parseInt(representation[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+ if (roundBit) {
+ let dIdx = lastDigit;
+ for (; dIdx >= 0; dIdx--) {
+ if (++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+ if (dIdx === 0) {
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ }
+ else {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ }
+ }
+ else {
+ break;
+ }
+ }
+ }
+ }
+ }
+ else {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MIN;
+ break;
+ }
+ invalidErr(representation, 'exponent underflow');
+ }
+ if (nDigitsStored < nDigits) {
+ if (representation[nDigits - 1 + Number(sawSign) + Number(sawRadix)] !== '0' &&
+ significantDigits !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ nDigits = nDigits - 1;
+ }
+ else {
+ if (digits[lastDigit] !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ if (roundDigit !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ }
+ }
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ if (significantDigits === 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ }
+ else if (lastDigit < 17) {
+ let dIdx = 0;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ else {
+ let dIdx = 0;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ const significand = multiply64x2(significandHigh, Long.fromString('100000000000000000'));
+ significand.low = significand.low.add(significandLow);
+ if (lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+ biasedExponent = exponent + EXPONENT_BIAS;
+ const dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+ if (significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber(1))) {
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47)));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ }
+ else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+ dec.low = significand.low;
+ if (isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+ const buffer = ByteUtils.allocateUnsafe(16);
+ index = 0;
+ buffer[index++] = dec.low.low & 0xff;
+ buffer[index++] = (dec.low.low >> 8) & 0xff;
+ buffer[index++] = (dec.low.low >> 16) & 0xff;
+ buffer[index++] = (dec.low.low >> 24) & 0xff;
+ buffer[index++] = dec.low.high & 0xff;
+ buffer[index++] = (dec.low.high >> 8) & 0xff;
+ buffer[index++] = (dec.low.high >> 16) & 0xff;
+ buffer[index++] = (dec.low.high >> 24) & 0xff;
+ buffer[index++] = dec.high.low & 0xff;
+ buffer[index++] = (dec.high.low >> 8) & 0xff;
+ buffer[index++] = (dec.high.low >> 16) & 0xff;
+ buffer[index++] = (dec.high.low >> 24) & 0xff;
+ buffer[index++] = dec.high.high & 0xff;
+ buffer[index++] = (dec.high.high >> 8) & 0xff;
+ buffer[index++] = (dec.high.high >> 16) & 0xff;
+ buffer[index++] = (dec.high.high >> 24) & 0xff;
+ return new Decimal128(buffer);
+ }
+ toString() {
+ let biased_exponent;
+ let significand_digits = 0;
+ const significand = new Array(36);
+ for (let i = 0; i < significand.length; i++)
+ significand[i] = 0;
+ let index = 0;
+ let is_zero = false;
+ let significand_msb;
+ let significand128 = { parts: [0, 0, 0, 0] };
+ let j, k;
+ const string = [];
+ index = 0;
+ const buffer = this.bytes;
+ const low = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midl = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midh = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const high = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ index = 0;
+ const dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high)
+ };
+ if (dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+ const combination = (high >> 26) & COMBINATION_MASK;
+ if (combination >> 3 === 3) {
+ if (combination === COMBINATION_INFINITY) {
+ return string.join('') + 'Infinity';
+ }
+ else if (combination === COMBINATION_NAN) {
+ return 'NaN';
+ }
+ else {
+ biased_exponent = (high >> 15) & EXPONENT_MASK;
+ significand_msb = 0x08 + ((high >> 14) & 0x01);
+ }
+ }
+ else {
+ significand_msb = (high >> 14) & 0x07;
+ biased_exponent = (high >> 17) & EXPONENT_MASK;
+ }
+ const exponent = biased_exponent - EXPONENT_BIAS;
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+ if (significand128.parts[0] === 0 &&
+ significand128.parts[1] === 0 &&
+ significand128.parts[2] === 0 &&
+ significand128.parts[3] === 0) {
+ is_zero = true;
+ }
+ else {
+ for (k = 3; k >= 0; k--) {
+ let least_digits = 0;
+ const result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low;
+ if (!least_digits)
+ continue;
+ for (j = 8; j >= 0; j--) {
+ significand[k * 9 + j] = least_digits % 10;
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+ if (is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ }
+ else {
+ significand_digits = 36;
+ while (!significand[index]) {
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+ const scientific_exponent = significand_digits - 1 + exponent;
+ if (scientific_exponent >= 34 || scientific_exponent <= -7 || exponent > 0) {
+ if (significand_digits > 34) {
+ string.push(`${0}`);
+ if (exponent > 0)
+ string.push(`E+${exponent}`);
+ else if (exponent < 0)
+ string.push(`E${exponent}`);
+ return string.join('');
+ }
+ string.push(`${significand[index++]}`);
+ significand_digits = significand_digits - 1;
+ if (significand_digits) {
+ string.push('.');
+ }
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ string.push('E');
+ if (scientific_exponent > 0) {
+ string.push(`+${scientific_exponent}`);
+ }
+ else {
+ string.push(`${scientific_exponent}`);
+ }
+ }
+ else {
+ if (exponent >= 0) {
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ let radix_position = significand_digits + exponent;
+ if (radix_position > 0) {
+ for (let i = 0; i < radix_position; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ string.push('0');
+ }
+ string.push('.');
+ while (radix_position++ < 0) {
+ string.push('0');
+ }
+ for (let i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ }
+ return string.join('');
+ }
+ toJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ toExtendedJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ static fromExtendedJSON(doc) {
+ return Decimal128.fromString(doc.$numberDecimal);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const d128string = inspect(this.toString(), options);
+ return `new Decimal128(${d128string})`;
+ }
+}
+
+class Double extends BSONValue {
+ get _bsontype() {
+ return 'Double';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value;
+ }
+ static fromString(value) {
+ const coercedValue = Number(value);
+ if (value === 'NaN')
+ return new Double(NaN);
+ if (value === 'Infinity')
+ return new Double(Infinity);
+ if (value === '-Infinity')
+ return new Double(-Infinity);
+ if (!Number.isFinite(coercedValue)) {
+ throw new BSONError(`Input: ${value} is not representable as a Double`);
+ }
+ if (value.trim() !== value) {
+ throw new BSONError(`Input: '${value}' contains whitespace`);
+ }
+ if (value === '') {
+ throw new BSONError(`Input is an empty string`);
+ }
+ if (/[^-0-9.+eE]/.test(value)) {
+ throw new BSONError(`Input: '${value}' is not in decimal or exponential notation`);
+ }
+ return new Double(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toExtendedJSON(options) {
+ if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
+ return this.value;
+ }
+ if (Object.is(Math.sign(this.value), -0)) {
+ return { $numberDouble: '-0.0' };
+ }
+ return {
+ $numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
+ };
+ }
+ static fromExtendedJSON(doc, options) {
+ const doubleValue = parseFloat(doc.$numberDouble);
+ return options && options.relaxed ? doubleValue : new Double(doubleValue);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Double(${inspect(this.value, options)})`;
+ }
+}
+
+class Int32 extends BSONValue {
+ get _bsontype() {
+ return 'Int32';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value | 0;
+ }
+ static fromString(value) {
+ const cleanedValue = removeLeadingZerosAndExplicitPlus(value);
+ const coercedValue = Number(value);
+ if (BSON_INT32_MAX < coercedValue) {
+ throw new BSONError(`Input: '${value}' is larger than the maximum value for Int32`);
+ }
+ else if (BSON_INT32_MIN > coercedValue) {
+ throw new BSONError(`Input: '${value}' is smaller than the minimum value for Int32`);
+ }
+ else if (!Number.isSafeInteger(coercedValue)) {
+ throw new BSONError(`Input: '${value}' is not a safe integer`);
+ }
+ else if (coercedValue.toString() !== cleanedValue) {
+ throw new BSONError(`Input: '${value}' is not a valid Int32 string`);
+ }
+ return new Int32(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON(options) {
+ if (options && (options.relaxed || options.legacy))
+ return this.value;
+ return { $numberInt: this.value.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ return options && options.relaxed ? parseInt(doc.$numberInt, 10) : new Int32(doc.$numberInt);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Int32(${inspect(this.value, options)})`;
+ }
+}
+
+class MaxKey extends BSONValue {
+ get _bsontype() {
+ return 'MaxKey';
+ }
+ toExtendedJSON() {
+ return { $maxKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MaxKey();
+ }
+ inspect() {
+ return 'new MaxKey()';
+ }
+}
+
+class MinKey extends BSONValue {
+ get _bsontype() {
+ return 'MinKey';
+ }
+ toExtendedJSON() {
+ return { $minKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MinKey();
+ }
+ inspect() {
+ return 'new MinKey()';
+ }
+}
+
+const FLOAT = new Float64Array(1);
+const FLOAT_BYTES = new Uint8Array(FLOAT.buffer, 0, 8);
+FLOAT[0] = -1;
+const isBigEndian = FLOAT_BYTES[7] === 0;
+const NumberUtils = {
+ getNonnegativeInt32LE(source, offset) {
+ if (source[offset + 3] > 127) {
+ throw new RangeError(`Size cannot be negative at offset: ${offset}`);
+ }
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getInt32LE(source, offset) {
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getUint32LE(source, offset) {
+ return (source[offset] +
+ source[offset + 1] * 256 +
+ source[offset + 2] * 65536 +
+ source[offset + 3] * 16777216);
+ },
+ getUint32BE(source, offset) {
+ return (source[offset + 3] +
+ source[offset + 2] * 256 +
+ source[offset + 1] * 65536 +
+ source[offset] * 16777216);
+ },
+ getBigInt64LE(source, offset) {
+ const lo = NumberUtils.getUint32LE(source, offset);
+ const hi = NumberUtils.getUint32LE(source, offset + 4);
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo);
+ },
+ getFloat64LE: isBigEndian
+ ? (source, offset) => {
+ FLOAT_BYTES[7] = source[offset];
+ FLOAT_BYTES[6] = source[offset + 1];
+ FLOAT_BYTES[5] = source[offset + 2];
+ FLOAT_BYTES[4] = source[offset + 3];
+ FLOAT_BYTES[3] = source[offset + 4];
+ FLOAT_BYTES[2] = source[offset + 5];
+ FLOAT_BYTES[1] = source[offset + 6];
+ FLOAT_BYTES[0] = source[offset + 7];
+ return FLOAT[0];
+ }
+ : (source, offset) => {
+ FLOAT_BYTES[0] = source[offset];
+ FLOAT_BYTES[1] = source[offset + 1];
+ FLOAT_BYTES[2] = source[offset + 2];
+ FLOAT_BYTES[3] = source[offset + 3];
+ FLOAT_BYTES[4] = source[offset + 4];
+ FLOAT_BYTES[5] = source[offset + 5];
+ FLOAT_BYTES[6] = source[offset + 6];
+ FLOAT_BYTES[7] = source[offset + 7];
+ return FLOAT[0];
+ },
+ setInt32BE(destination, offset, value) {
+ destination[offset + 3] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset] = value;
+ return 4;
+ },
+ setInt32LE(destination, offset, value) {
+ destination[offset] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 3] = value;
+ return 4;
+ },
+ setBigInt64LE(destination, offset, value) {
+ const mask32bits = BigInt(4294967295);
+ let lo = Number(value & mask32bits);
+ destination[offset] = lo;
+ lo >>= 8;
+ destination[offset + 1] = lo;
+ lo >>= 8;
+ destination[offset + 2] = lo;
+ lo >>= 8;
+ destination[offset + 3] = lo;
+ let hi = Number((value >> BigInt(32)) & mask32bits);
+ destination[offset + 4] = hi;
+ hi >>= 8;
+ destination[offset + 5] = hi;
+ hi >>= 8;
+ destination[offset + 6] = hi;
+ hi >>= 8;
+ destination[offset + 7] = hi;
+ return 8;
+ },
+ setFloat64LE: isBigEndian
+ ? (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[7];
+ destination[offset + 1] = FLOAT_BYTES[6];
+ destination[offset + 2] = FLOAT_BYTES[5];
+ destination[offset + 3] = FLOAT_BYTES[4];
+ destination[offset + 4] = FLOAT_BYTES[3];
+ destination[offset + 5] = FLOAT_BYTES[2];
+ destination[offset + 6] = FLOAT_BYTES[1];
+ destination[offset + 7] = FLOAT_BYTES[0];
+ return 8;
+ }
+ : (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[0];
+ destination[offset + 1] = FLOAT_BYTES[1];
+ destination[offset + 2] = FLOAT_BYTES[2];
+ destination[offset + 3] = FLOAT_BYTES[3];
+ destination[offset + 4] = FLOAT_BYTES[4];
+ destination[offset + 5] = FLOAT_BYTES[5];
+ destination[offset + 6] = FLOAT_BYTES[6];
+ destination[offset + 7] = FLOAT_BYTES[7];
+ return 8;
+ }
+};
+
+const checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');
+let PROCESS_UNIQUE = null;
+class ObjectId extends BSONValue {
+ get _bsontype() {
+ return 'ObjectId';
+ }
+ constructor(inputId) {
+ super();
+ let workingId;
+ if (typeof inputId === 'object' && inputId && 'id' in inputId) {
+ if (typeof inputId.id !== 'string' && !ArrayBuffer.isView(inputId.id)) {
+ throw new BSONError('Argument passed in must have an id that is of type string or Buffer');
+ }
+ if ('toHexString' in inputId && typeof inputId.toHexString === 'function') {
+ workingId = ByteUtils.fromHex(inputId.toHexString());
+ }
+ else {
+ workingId = inputId.id;
+ }
+ }
+ else {
+ workingId = inputId;
+ }
+ if (workingId == null || typeof workingId === 'number') {
+ this.buffer = ObjectId.generate(typeof workingId === 'number' ? workingId : undefined);
+ }
+ else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
+ this.buffer = ByteUtils.toLocalBufferType(workingId);
+ }
+ else if (typeof workingId === 'string') {
+ if (workingId.length === 24 && checkForHexRegExp.test(workingId)) {
+ this.buffer = ByteUtils.fromHex(workingId);
+ }
+ else {
+ throw new BSONError('input must be a 24 character hex string, 12 byte Uint8Array, or an integer');
+ }
+ }
+ else {
+ throw new BSONError('Argument passed in does not match the accepted types');
+ }
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(this.id);
+ }
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(value);
+ }
+ }
+ toHexString() {
+ if (ObjectId.cacheHexString && this.__id) {
+ return this.__id;
+ }
+ const hexString = ByteUtils.toHex(this.id);
+ if (ObjectId.cacheHexString && !this.__id) {
+ this.__id = hexString;
+ }
+ return hexString;
+ }
+ static getInc() {
+ return (ObjectId.index = (ObjectId.index + 1) % 0xffffff);
+ }
+ static generate(time) {
+ if ('number' !== typeof time) {
+ time = Math.floor(Date.now() / 1000);
+ }
+ const inc = ObjectId.getInc();
+ const buffer = ByteUtils.allocateUnsafe(12);
+ NumberUtils.setInt32BE(buffer, 0, time);
+ if (PROCESS_UNIQUE === null) {
+ PROCESS_UNIQUE = ByteUtils.randomBytes(5);
+ }
+ buffer[4] = PROCESS_UNIQUE[0];
+ buffer[5] = PROCESS_UNIQUE[1];
+ buffer[6] = PROCESS_UNIQUE[2];
+ buffer[7] = PROCESS_UNIQUE[3];
+ buffer[8] = PROCESS_UNIQUE[4];
+ buffer[11] = inc & 0xff;
+ buffer[10] = (inc >> 8) & 0xff;
+ buffer[9] = (inc >> 16) & 0xff;
+ return buffer;
+ }
+ toString(encoding) {
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ if (encoding === 'hex')
+ return this.toHexString();
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ static is(variable) {
+ return (variable != null &&
+ typeof variable === 'object' &&
+ '_bsontype' in variable &&
+ variable._bsontype === 'ObjectId');
+ }
+ equals(otherId) {
+ if (otherId === undefined || otherId === null) {
+ return false;
+ }
+ if (ObjectId.is(otherId)) {
+ return (this.buffer[11] === otherId.buffer[11] && ByteUtils.equals(this.buffer, otherId.buffer));
+ }
+ if (typeof otherId === 'string') {
+ return otherId.toLowerCase() === this.toHexString();
+ }
+ if (typeof otherId === 'object' && typeof otherId.toHexString === 'function') {
+ const otherIdString = otherId.toHexString();
+ const thisIdString = this.toHexString();
+ return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
+ }
+ return false;
+ }
+ getTimestamp() {
+ const timestamp = new Date();
+ const time = NumberUtils.getUint32BE(this.buffer, 0);
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+ }
+ static createPk() {
+ return new ObjectId();
+ }
+ serializeInto(uint8array, index) {
+ uint8array[index] = this.buffer[0];
+ uint8array[index + 1] = this.buffer[1];
+ uint8array[index + 2] = this.buffer[2];
+ uint8array[index + 3] = this.buffer[3];
+ uint8array[index + 4] = this.buffer[4];
+ uint8array[index + 5] = this.buffer[5];
+ uint8array[index + 6] = this.buffer[6];
+ uint8array[index + 7] = this.buffer[7];
+ uint8array[index + 8] = this.buffer[8];
+ uint8array[index + 9] = this.buffer[9];
+ uint8array[index + 10] = this.buffer[10];
+ uint8array[index + 11] = this.buffer[11];
+ return 12;
+ }
+ static createFromTime(time) {
+ const buffer = ByteUtils.allocate(12);
+ for (let i = 11; i >= 4; i--)
+ buffer[i] = 0;
+ NumberUtils.setInt32BE(buffer, 0, time);
+ return new ObjectId(buffer);
+ }
+ static createFromHexString(hexString) {
+ if (hexString?.length !== 24) {
+ throw new BSONError('hex string must be 24 characters');
+ }
+ return new ObjectId(ByteUtils.fromHex(hexString));
+ }
+ static createFromBase64(base64) {
+ if (base64?.length !== 16) {
+ throw new BSONError('base64 string must be 16 characters');
+ }
+ return new ObjectId(ByteUtils.fromBase64(base64));
+ }
+ static isValid(id) {
+ if (id == null)
+ return false;
+ try {
+ new ObjectId(id);
+ return true;
+ }
+ catch {
+ return false;
+ }
+ }
+ toExtendedJSON() {
+ if (this.toHexString)
+ return { $oid: this.toHexString() };
+ return { $oid: this.toString('hex') };
+ }
+ static fromExtendedJSON(doc) {
+ return new ObjectId(doc.$oid);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new ObjectId(${inspect(this.toHexString(), options)})`;
+ }
+}
+ObjectId.index = Math.floor(Math.random() * 0xffffff);
+
+function internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined) {
+ let totalLength = 4 + 1;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions, true, ignoreUndefined);
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ }
+ for (const key of Object.keys(object)) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined);
+ }
+ }
+ return totalLength;
+}
+function calculateElement(name, value, serializeFunctions = false, isArray = false, ignoreUndefined = false) {
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ switch (typeof value) {
+ case 'string':
+ return 1 + ByteUtils.utf8ByteLength(name) + 1 + 4 + ByteUtils.utf8ByteLength(value) + 1;
+ case 'number':
+ if (Math.floor(value) === value &&
+ value >= JS_INT_MIN &&
+ value <= JS_INT_MAX) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (4 + 1);
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if (isArray || !ignoreUndefined)
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ return 0;
+ case 'boolean':
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 1);
+ case 'object':
+ if (value != null &&
+ typeof value._bsontype === 'string' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value == null || value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ }
+ else if (value._bsontype === 'ObjectId') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (12 + 1);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (ArrayBuffer.isView(value) ||
+ value instanceof ArrayBuffer ||
+ isAnyArrayBuffer(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 4 + 1) + value.byteLength);
+ }
+ else if (value._bsontype === 'Long' ||
+ value._bsontype === 'Double' ||
+ value._bsontype === 'Timestamp') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (16 + 1);
+ }
+ else if (value._bsontype === 'Code') {
+ if (value.scope != null && Object.keys(value.scope).length > 0) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1 +
+ internalCalculateObjectSize(value.scope, serializeFunctions, ignoreUndefined));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1);
+ }
+ }
+ else if (value._bsontype === 'Binary') {
+ const binary = value;
+ if (binary.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ (binary.position + 1 + 4 + 1 + 4));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (binary.position + 1 + 4 + 1));
+ }
+ }
+ else if (value._bsontype === 'Symbol') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ ByteUtils.utf8ByteLength(value.value) +
+ 4 +
+ 1 +
+ 1);
+ }
+ else if (value._bsontype === 'DBRef') {
+ const ordered_values = Object.assign({
+ $ref: value.collection,
+ $id: value.oid
+ }, value.fields);
+ if (value.db != null) {
+ ordered_values['$db'] = value.db;
+ }
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ internalCalculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined));
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.source) +
+ 1 +
+ (value.global ? 1 : 0) +
+ (value.ignoreCase ? 1 : 0) +
+ (value.multiline ? 1 : 0) +
+ 1);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.pattern) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.options) +
+ 1);
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ internalCalculateObjectSize(value, serializeFunctions, ignoreUndefined) +
+ 1);
+ }
+ case 'function':
+ if (serializeFunctions) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.toString()) +
+ 1);
+ }
+ }
+ return 0;
+}
+
+function alphabetize(str) {
+ return str.split('').sort().join('');
+}
+class BSONRegExp extends BSONValue {
+ get _bsontype() {
+ return 'BSONRegExp';
+ }
+ constructor(pattern, options) {
+ super();
+ this.pattern = pattern;
+ this.options = alphabetize(options ?? '');
+ if (this.pattern.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);
+ }
+ if (this.options.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);
+ }
+ for (let i = 0; i < this.options.length; i++) {
+ if (!(this.options[i] === 'i' ||
+ this.options[i] === 'm' ||
+ this.options[i] === 'x' ||
+ this.options[i] === 'l' ||
+ this.options[i] === 's' ||
+ this.options[i] === 'u')) {
+ throw new BSONError(`The regular expression option [${this.options[i]}] is not supported`);
+ }
+ }
+ }
+ static parseOptions(options) {
+ return options ? options.split('').sort().join('') : '';
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ if (options.legacy) {
+ return { $regex: this.pattern, $options: this.options };
+ }
+ return { $regularExpression: { pattern: this.pattern, options: this.options } };
+ }
+ static fromExtendedJSON(doc) {
+ if ('$regex' in doc) {
+ if (typeof doc.$regex !== 'string') {
+ if (doc.$regex._bsontype === 'BSONRegExp') {
+ return doc;
+ }
+ }
+ else {
+ return new BSONRegExp(doc.$regex, BSONRegExp.parseOptions(doc.$options));
+ }
+ }
+ if ('$regularExpression' in doc) {
+ return new BSONRegExp(doc.$regularExpression.pattern, BSONRegExp.parseOptions(doc.$regularExpression.options));
+ }
+ throw new BSONError(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(doc)}`);
+ }
+ inspect(depth, options, inspect) {
+ const stylize = getStylizeFunction(options) ?? (v => v);
+ inspect ??= defaultInspect;
+ const pattern = stylize(inspect(this.pattern), 'regexp');
+ const flags = stylize(inspect(this.options), 'regexp');
+ return `new BSONRegExp(${pattern}, ${flags})`;
+ }
+}
+
+class BSONSymbol extends BSONValue {
+ get _bsontype() {
+ return 'BSONSymbol';
+ }
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON() {
+ return { $symbol: this.value };
+ }
+ static fromExtendedJSON(doc) {
+ return new BSONSymbol(doc.$symbol);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new BSONSymbol(${inspect(this.value, options)})`;
+ }
+}
+
+const LongWithoutOverridesClass = Long;
+class Timestamp extends LongWithoutOverridesClass {
+ get _bsontype() {
+ return 'Timestamp';
+ }
+ constructor(low) {
+ if (low == null) {
+ super(0, 0, true);
+ }
+ else if (typeof low === 'bigint') {
+ super(low, true);
+ }
+ else if (Long.isLong(low)) {
+ super(low.low, low.high, true);
+ }
+ else if (typeof low === 'object' && 't' in low && 'i' in low) {
+ if (typeof low.t !== 'number' && (typeof low.t !== 'object' || low.t._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t as a number');
+ }
+ if (typeof low.i !== 'number' && (typeof low.i !== 'object' || low.i._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i as a number');
+ }
+ const t = Number(low.t);
+ const i = Number(low.i);
+ if (t < 0 || Number.isNaN(t)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive t');
+ }
+ if (i < 0 || Number.isNaN(i)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive i');
+ }
+ if (t > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t equal or less than uint32 max');
+ }
+ if (i > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i equal or less than uint32 max');
+ }
+ super(i, t, true);
+ }
+ else {
+ throw new BSONError('A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }');
+ }
+ }
+ toJSON() {
+ return {
+ $timestamp: this.toString()
+ };
+ }
+ static fromInt(value) {
+ return new Timestamp(Long.fromInt(value, true));
+ }
+ static fromNumber(value) {
+ return new Timestamp(Long.fromNumber(value, true));
+ }
+ static fromBits(lowBits, highBits) {
+ return new Timestamp({ i: lowBits, t: highBits });
+ }
+ static fromString(str, optRadix) {
+ return new Timestamp(Long.fromString(str, true, optRadix));
+ }
+ toExtendedJSON() {
+ return { $timestamp: { t: this.high >>> 0, i: this.low >>> 0 } };
+ }
+ static fromExtendedJSON(doc) {
+ const i = Long.isLong(doc.$timestamp.i)
+ ? doc.$timestamp.i.getLowBitsUnsigned()
+ : doc.$timestamp.i;
+ const t = Long.isLong(doc.$timestamp.t)
+ ? doc.$timestamp.t.getLowBitsUnsigned()
+ : doc.$timestamp.t;
+ return new Timestamp({ t, i });
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const t = inspect(this.high >>> 0, options);
+ const i = inspect(this.low >>> 0, options);
+ return `new Timestamp({ t: ${t}, i: ${i} })`;
+ }
+}
+Timestamp.MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
+
+const JS_INT_MAX_LONG = Long.fromNumber(JS_INT_MAX);
+const JS_INT_MIN_LONG = Long.fromNumber(JS_INT_MIN);
+function internalDeserialize(buffer, options, isArray) {
+ options = options == null ? {} : options;
+ const index = options && options.index ? options.index : 0;
+ const size = NumberUtils.getInt32LE(buffer, index);
+ if (size < 5) {
+ throw new BSONError(`bson size must be >= 5, is ${size}`);
+ }
+ if (options.allowObjectSmallerThanBufferSize && buffer.length < size) {
+ throw new BSONError(`buffer length ${buffer.length} must be >= bson size ${size}`);
+ }
+ if (!options.allowObjectSmallerThanBufferSize && buffer.length !== size) {
+ throw new BSONError(`buffer length ${buffer.length} must === bson size ${size}`);
+ }
+ if (size + index > buffer.byteLength) {
+ throw new BSONError(`(bson size ${size} + options.index ${index} must be <= buffer length ${buffer.byteLength})`);
+ }
+ if (buffer[index + size - 1] !== 0) {
+ throw new BSONError("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+ return deserializeObject(buffer, index, options, isArray);
+}
+const allowedDBRefKeys = /^\$ref$|^\$id$|^\$db$/;
+function deserializeObject(buffer, index, options, isArray = false) {
+ const fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+ const raw = options['raw'] == null ? false : options['raw'];
+ const bsonRegExp = typeof options['bsonRegExp'] === 'boolean' ? options['bsonRegExp'] : false;
+ const promoteBuffers = options.promoteBuffers ?? false;
+ const promoteLongs = options.promoteLongs ?? true;
+ const promoteValues = options.promoteValues ?? true;
+ const useBigInt64 = options.useBigInt64 ?? false;
+ if (useBigInt64 && !promoteValues) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ if (useBigInt64 && !promoteLongs) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ const validation = options.validation == null ? { utf8: true } : options.validation;
+ let globalUTFValidation = true;
+ let validationSetting;
+ let utf8KeysSet;
+ const utf8ValidatedKeys = validation.utf8;
+ if (typeof utf8ValidatedKeys === 'boolean') {
+ validationSetting = utf8ValidatedKeys;
+ }
+ else {
+ globalUTFValidation = false;
+ const utf8ValidationValues = Object.keys(utf8ValidatedKeys).map(function (key) {
+ return utf8ValidatedKeys[key];
+ });
+ if (utf8ValidationValues.length === 0) {
+ throw new BSONError('UTF-8 validation setting cannot be empty');
+ }
+ if (typeof utf8ValidationValues[0] !== 'boolean') {
+ throw new BSONError('Invalid UTF-8 validation option, must specify boolean values');
+ }
+ validationSetting = utf8ValidationValues[0];
+ if (!utf8ValidationValues.every(item => item === validationSetting)) {
+ throw new BSONError('Invalid UTF-8 validation option - keys must be all true or all false');
+ }
+ }
+ if (!globalUTFValidation) {
+ utf8KeysSet = new Set();
+ for (const key of Object.keys(utf8ValidatedKeys)) {
+ utf8KeysSet.add(key);
+ }
+ }
+ const startIndex = index;
+ if (buffer.length < 5)
+ throw new BSONError('corrupt bson message < 5 bytes long');
+ const size = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (size < 5 || size > buffer.length)
+ throw new BSONError('corrupt bson message');
+ const object = isArray ? [] : {};
+ let arrayIndex = 0;
+ const done = false;
+ let isPossibleDBRef = isArray ? false : null;
+ while (!done) {
+ const elementType = buffer[index++];
+ if (elementType === 0)
+ break;
+ let i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.byteLength)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const name = isArray ? arrayIndex++ : ByteUtils.toUTF8(buffer, index, i, false);
+ let shouldValidateKey = true;
+ if (globalUTFValidation || utf8KeysSet?.has(name)) {
+ shouldValidateKey = validationSetting;
+ }
+ else {
+ shouldValidateKey = !validationSetting;
+ }
+ if (isPossibleDBRef !== false && name[0] === '$') {
+ isPossibleDBRef = allowedDBRefKeys.test(name);
+ }
+ let value;
+ index = i + 1;
+ if (elementType === BSON_DATA_STRING) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ value = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_OID) {
+ const oid = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oid[i] = buffer[index + i];
+ value = new ObjectId(oid);
+ index = index + 12;
+ }
+ else if (elementType === BSON_DATA_INT && promoteValues === false) {
+ value = new Int32(NumberUtils.getInt32LE(buffer, index));
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_INT) {
+ value = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_NUMBER) {
+ value = NumberUtils.getFloat64LE(buffer, index);
+ index += 8;
+ if (promoteValues === false)
+ value = new Double(value);
+ }
+ else if (elementType === BSON_DATA_DATE) {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ value = new Date(new Long(lowBits, highBits).toNumber());
+ }
+ else if (elementType === BSON_DATA_BOOLEAN) {
+ if (buffer[index] !== 0 && buffer[index] !== 1)
+ throw new BSONError('illegal boolean type value');
+ value = buffer[index++] === 1;
+ }
+ else if (elementType === BSON_DATA_OBJECT) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ if (objectSize <= 0 || objectSize > buffer.length - index)
+ throw new BSONError('bad embedded document length in bson');
+ if (raw) {
+ value = buffer.slice(index, index + objectSize);
+ }
+ else {
+ let objectOptions = options;
+ if (!globalUTFValidation) {
+ objectOptions = { ...options, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, objectOptions, false);
+ }
+ index = index + objectSize;
+ }
+ else if (elementType === BSON_DATA_ARRAY) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ let arrayOptions = options;
+ const stopIndex = index + objectSize;
+ if (fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = { ...options, raw: true };
+ }
+ if (!globalUTFValidation) {
+ arrayOptions = { ...arrayOptions, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+ if (buffer[index - 1] !== 0)
+ throw new BSONError('invalid array terminator byte');
+ if (index !== stopIndex)
+ throw new BSONError('corrupted array bson');
+ }
+ else if (elementType === BSON_DATA_UNDEFINED) {
+ value = undefined;
+ }
+ else if (elementType === BSON_DATA_NULL) {
+ value = null;
+ }
+ else if (elementType === BSON_DATA_LONG) {
+ if (useBigInt64) {
+ value = NumberUtils.getBigInt64LE(buffer, index);
+ index += 8;
+ }
+ else {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ const long = new Long(lowBits, highBits);
+ if (promoteLongs && promoteValues === true) {
+ value =
+ long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG)
+ ? long.toNumber()
+ : long;
+ }
+ else {
+ value = long;
+ }
+ }
+ }
+ else if (elementType === BSON_DATA_DECIMAL128) {
+ const bytes = ByteUtils.allocateUnsafe(16);
+ for (let i = 0; i < 16; i++)
+ bytes[i] = buffer[index + i];
+ index = index + 16;
+ value = new Decimal128(bytes);
+ }
+ else if (elementType === BSON_DATA_BINARY) {
+ let binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ const totalBinarySize = binarySize;
+ const subType = buffer[index++];
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found');
+ if (binarySize > buffer.byteLength)
+ throw new BSONError('Binary type size larger than document size');
+ if (buffer['slice'] != null) {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.toLocalBufferType(buffer.slice(index, index + binarySize));
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ else {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.allocateUnsafe(binarySize);
+ for (i = 0; i < binarySize; i++) {
+ value[i] = buffer[index + i];
+ }
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ index = index + binarySize;
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === false) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ const optionsArray = new Array(regExpOptions.length);
+ for (i = 0; i < regExpOptions.length; i++) {
+ switch (regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+ value = new RegExp(source, optionsArray.join(''));
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === true) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ value = new BSONRegExp(source, regExpOptions);
+ }
+ else if (elementType === BSON_DATA_SYMBOL) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const symbol = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = promoteValues ? symbol : new BSONSymbol(symbol);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_TIMESTAMP) {
+ value = new Timestamp({
+ i: NumberUtils.getUint32LE(buffer, index),
+ t: NumberUtils.getUint32LE(buffer, index + 4)
+ });
+ index += 8;
+ }
+ else if (elementType === BSON_DATA_MIN_KEY) {
+ value = new MinKey();
+ }
+ else if (elementType === BSON_DATA_MAX_KEY) {
+ value = new MaxKey();
+ }
+ else if (elementType === BSON_DATA_CODE) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = new Code(functionString);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_CODE_W_SCOPE) {
+ const totalSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (totalSize < 4 + 4 + 4 + 1) {
+ throw new BSONError('code_w_scope total size shorter minimum expected length');
+ }
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ const scopeObject = deserializeObject(buffer, _index, options, false);
+ index = index + objectSize;
+ if (totalSize < 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too short, truncating scope');
+ }
+ if (totalSize > 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too long, clips outer document');
+ }
+ value = new Code(functionString, scopeObject);
+ }
+ else if (elementType === BSON_DATA_DBPOINTER) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0)
+ throw new BSONError('bad string length in bson');
+ const namespace = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const oidBuffer = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oidBuffer[i] = buffer[index + i];
+ const oid = new ObjectId(oidBuffer);
+ index = index + 12;
+ value = new DBRef(namespace, oid);
+ }
+ else {
+ throw new BSONError(`Detected unknown BSON type ${elementType.toString(16)} for fieldname "${name}"`);
+ }
+ if (name === '__proto__') {
+ Object.defineProperty(object, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ object[name] = value;
+ }
+ }
+ if (size !== index - startIndex) {
+ if (isArray)
+ throw new BSONError('corrupt array bson');
+ throw new BSONError('corrupt object bson');
+ }
+ if (!isPossibleDBRef)
+ return object;
+ if (isDBRefLike(object)) {
+ const copy = Object.assign({}, object);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(object.$ref, object.$id, object.$db, copy);
+ }
+ return object;
+}
+
+const regexp = /\x00/;
+const ignoreKeys = new Set(['$db', '$ref', '$id', '$clusterTime']);
+function serializeString(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_STRING;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value, index + 4);
+ NumberUtils.setInt32LE(buffer, index, size + 1);
+ index = index + 4 + size;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeNumber(buffer, key, value, index) {
+ const isNegativeZero = Object.is(value, -0);
+ const type = !isNegativeZero &&
+ Number.isSafeInteger(value) &&
+ value <= BSON_INT32_MAX &&
+ value >= BSON_INT32_MIN
+ ? BSON_DATA_INT
+ : BSON_DATA_NUMBER;
+ buffer[index++] = type;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0x00;
+ if (type === BSON_DATA_INT) {
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ }
+ else {
+ index += NumberUtils.setFloat64LE(buffer, index, value);
+ }
+ return index;
+}
+function serializeBigInt(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_LONG;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index += numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setBigInt64LE(buffer, index, value);
+ return index;
+}
+function serializeNull(buffer, key, _, index) {
+ buffer[index++] = BSON_DATA_NULL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeBoolean(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BOOLEAN;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ buffer[index++] = value ? 1 : 0;
+ return index;
+}
+function serializeDate(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DATE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const dateInMilis = Long.fromNumber(value.getTime());
+ const lowBits = dateInMilis.getLowBits();
+ const highBits = dateInMilis.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw new BSONError('value ' + value.source + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.source, index);
+ buffer[index++] = 0x00;
+ if (value.ignoreCase)
+ buffer[index++] = 0x69;
+ if (value.global)
+ buffer[index++] = 0x73;
+ if (value.multiline)
+ buffer[index++] = 0x6d;
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeBSONRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.pattern.match(regexp) != null) {
+ throw new BSONError('pattern ' + value.pattern + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.pattern, index);
+ buffer[index++] = 0x00;
+ const sortedOptions = value.options.split('').sort().join('');
+ index = index + ByteUtils.encodeUTF8Into(buffer, sortedOptions, index);
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeMinMax(buffer, key, value, index) {
+ if (value === null) {
+ buffer[index++] = BSON_DATA_NULL;
+ }
+ else if (value._bsontype === 'MinKey') {
+ buffer[index++] = BSON_DATA_MIN_KEY;
+ }
+ else {
+ buffer[index++] = BSON_DATA_MAX_KEY;
+ }
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeObjectId(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_OID;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += value.serializeInto(buffer, index);
+ return index;
+}
+function serializeBuffer(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = value.length;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = BSON_BINARY_SUBTYPE_DEFAULT;
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = value[i];
+ }
+ else {
+ buffer.set(value, index);
+ }
+ index = index + size;
+ return index;
+}
+function serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path.has(value)) {
+ throw new BSONError('Cannot convert circular structure to BSON');
+ }
+ path.add(value);
+ buffer[index++] = Array.isArray(value) ? BSON_DATA_ARRAY : BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const endIndex = serializeInto(buffer, value, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ path.delete(value);
+ return endIndex;
+}
+function serializeDecimal128(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DECIMAL128;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ for (let i = 0; i < 16; i++)
+ buffer[index + i] = value.bytes[i];
+ return index + 16;
+}
+function serializeLong(buffer, key, value, index) {
+ buffer[index++] =
+ value._bsontype === 'Long' ? BSON_DATA_LONG : BSON_DATA_TIMESTAMP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const lowBits = value.getLowBits();
+ const highBits = value.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeInt32(buffer, key, value, index) {
+ value = value.valueOf();
+ buffer[index++] = BSON_DATA_INT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ return index;
+}
+function serializeDouble(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_NUMBER;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setFloat64LE(buffer, index, value.value);
+ return index;
+}
+function serializeFunction(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeCode(buffer, key, value, index, checkKeys = false, depth = 0, serializeFunctions = false, ignoreUndefined = true, path) {
+ if (value.scope && typeof value.scope === 'object') {
+ buffer[index++] = BSON_DATA_CODE_W_SCOPE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ const functionString = value.code;
+ index = index + 4;
+ const codeSize = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, codeSize);
+ buffer[index + 4 + codeSize - 1] = 0;
+ index = index + codeSize + 4;
+ const endIndex = serializeInto(buffer, value.scope, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ index = endIndex - 1;
+ const totalSize = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, startIndex, totalSize);
+ buffer[index++] = 0;
+ }
+ else {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.code.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ }
+ return index;
+}
+function serializeBinary(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const data = value.buffer;
+ let size = value.position;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY)
+ size = size + 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = value.sub_type;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ }
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = data[i];
+ }
+ else {
+ buffer.set(data, index);
+ }
+ index = index + value.position;
+ return index;
+}
+function serializeSymbol(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_SYMBOL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value.value, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path) {
+ buffer[index++] = BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ let output = {
+ $ref: value.collection || value.namespace,
+ $id: value.oid
+ };
+ if (value.db != null) {
+ output.$db = value.db;
+ }
+ output = Object.assign(output, value.fields);
+ const endIndex = serializeInto(buffer, output, false, index, depth + 1, serializeFunctions, true, path);
+ const size = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, index, size);
+ return endIndex;
+}
+function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path == null) {
+ if (object == null) {
+ buffer[0] = 0x05;
+ buffer[1] = 0x00;
+ buffer[2] = 0x00;
+ buffer[3] = 0x00;
+ buffer[4] = 0x00;
+ return 5;
+ }
+ if (Array.isArray(object)) {
+ throw new BSONError('serialize does not support an array as the root input');
+ }
+ if (typeof object !== 'object') {
+ throw new BSONError('serialize does not support non-object as the root input');
+ }
+ else if ('_bsontype' in object && typeof object._bsontype === 'string') {
+ throw new BSONError(`BSON types cannot be serialized as a document`);
+ }
+ else if (isDate(object) ||
+ isRegExp(object) ||
+ isUint8Array(object) ||
+ isAnyArrayBuffer(object)) {
+ throw new BSONError(`date, regexp, typedarray, and arraybuffer cannot be BSON documents`);
+ }
+ path = new Set();
+ }
+ path.add(object);
+ let index = startingIndex + 4;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ const key = `${i}`;
+ let value = object[i];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ if (typeof value === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (typeof value === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (typeof value === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (typeof value === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (typeof value === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else if (object instanceof Map || isMap(object)) {
+ const iterator = object.entries();
+ let done = false;
+ while (!done) {
+ const entry = iterator.next();
+ done = !!entry.done;
+ if (done)
+ continue;
+ const key = entry.value[0];
+ let value = entry.value[1];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === null || (value === undefined && ignoreUndefined === false)) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ if (object != null && typeof object !== 'object') {
+ throw new BSONError('toBSON function did not return an object');
+ }
+ }
+ for (const key of Object.keys(object)) {
+ let value = object[key];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ if (ignoreUndefined === false)
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ path.delete(object);
+ buffer[index++] = 0x00;
+ const size = index - startingIndex;
+ startingIndex += NumberUtils.setInt32LE(buffer, startingIndex, size);
+ return index;
+}
+
+function isBSONType(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '_bsontype' in value &&
+ typeof value._bsontype === 'string');
+}
+const keysToCodecs = {
+ $oid: ObjectId,
+ $binary: Binary,
+ $uuid: Binary,
+ $symbol: BSONSymbol,
+ $numberInt: Int32,
+ $numberDecimal: Decimal128,
+ $numberDouble: Double,
+ $numberLong: Long,
+ $minKey: MinKey,
+ $maxKey: MaxKey,
+ $regex: BSONRegExp,
+ $regularExpression: BSONRegExp,
+ $timestamp: Timestamp
+};
+function deserializeValue(value, options = {}) {
+ if (typeof value === 'number') {
+ const in32BitRange = value <= BSON_INT32_MAX && value >= BSON_INT32_MIN;
+ const in64BitRange = value <= BSON_INT64_MAX && value >= BSON_INT64_MIN;
+ if (options.relaxed || options.legacy) {
+ return value;
+ }
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (in32BitRange) {
+ return new Int32(value);
+ }
+ if (in64BitRange) {
+ if (options.useBigInt64) {
+ return BigInt(value);
+ }
+ return Long.fromNumber(value);
+ }
+ }
+ return new Double(value);
+ }
+ if (value == null || typeof value !== 'object')
+ return value;
+ if (value.$undefined)
+ return null;
+ const keys = Object.keys(value).filter(k => k.startsWith('$') && value[k] != null);
+ for (let i = 0; i < keys.length; i++) {
+ const c = keysToCodecs[keys[i]];
+ if (c)
+ return c.fromExtendedJSON(value, options);
+ }
+ if (value.$date != null) {
+ const d = value.$date;
+ const date = new Date();
+ if (options.legacy) {
+ if (typeof d === 'number')
+ date.setTime(d);
+ else if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ else {
+ if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (Long.isLong(d))
+ date.setTime(d.toNumber());
+ else if (typeof d === 'number' && options.relaxed)
+ date.setTime(d);
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ return date;
+ }
+ if (value.$code != null) {
+ const copy = Object.assign({}, value);
+ if (value.$scope) {
+ copy.$scope = deserializeValue(value.$scope);
+ }
+ return Code.fromExtendedJSON(value);
+ }
+ if (isDBRefLike(value) || value.$dbPointer) {
+ const v = value.$ref ? value : value.$dbPointer;
+ if (v instanceof DBRef)
+ return v;
+ const dollarKeys = Object.keys(v).filter(k => k.startsWith('$'));
+ let valid = true;
+ dollarKeys.forEach(k => {
+ if (['$ref', '$id', '$db'].indexOf(k) === -1)
+ valid = false;
+ });
+ if (valid)
+ return DBRef.fromExtendedJSON(v);
+ }
+ return value;
+}
+function serializeArray(array, options) {
+ return array.map((v, index) => {
+ options.seenObjects.push({ propertyName: `index ${index}`, obj: null });
+ try {
+ return serializeValue(v, options);
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ });
+}
+function getISOString(date) {
+ const isoStr = date.toISOString();
+ return date.getUTCMilliseconds() !== 0 ? isoStr : isoStr.slice(0, -5) + 'Z';
+}
+function serializeValue(value, options) {
+ if (value instanceof Map || isMap(value)) {
+ const obj = Object.create(null);
+ for (const [k, v] of value) {
+ if (typeof k !== 'string') {
+ throw new BSONError('Can only serialize maps with string keys');
+ }
+ obj[k] = v;
+ }
+ return serializeValue(obj, options);
+ }
+ if ((typeof value === 'object' || typeof value === 'function') && value !== null) {
+ const index = options.seenObjects.findIndex(entry => entry.obj === value);
+ if (index !== -1) {
+ const props = options.seenObjects.map(entry => entry.propertyName);
+ const leadingPart = props
+ .slice(0, index)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const alreadySeen = props[index];
+ const circularPart = ' -> ' +
+ props
+ .slice(index + 1, props.length - 1)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const current = props[props.length - 1];
+ const leadingSpace = ' '.repeat(leadingPart.length + alreadySeen.length / 2);
+ const dashes = '-'.repeat(circularPart.length + (alreadySeen.length + current.length) / 2 - 1);
+ throw new BSONError('Converting circular structure to EJSON:\n' +
+ ` ${leadingPart}${alreadySeen}${circularPart}${current}\n` +
+ ` ${leadingSpace}\\${dashes}/`);
+ }
+ options.seenObjects[options.seenObjects.length - 1].obj = value;
+ }
+ if (Array.isArray(value))
+ return serializeArray(value, options);
+ if (value === undefined)
+ return null;
+ if (value instanceof Date || isDate(value)) {
+ const dateNum = value.getTime(), inRange = dateNum > -1 && dateNum < 253402318800000;
+ if (options.legacy) {
+ return options.relaxed && inRange
+ ? { $date: value.getTime() }
+ : { $date: getISOString(value) };
+ }
+ return options.relaxed && inRange
+ ? { $date: getISOString(value) }
+ : { $date: { $numberLong: value.getTime().toString() } };
+ }
+ if (typeof value === 'number' && (!options.relaxed || !isFinite(value))) {
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return { $numberInt: value.toString() };
+ }
+ if (value >= BSON_INT64_MIN && value <= BSON_INT64_MAX) {
+ return { $numberLong: value.toString() };
+ }
+ }
+ return { $numberDouble: Object.is(value, -0) ? '-0.0' : value.toString() };
+ }
+ if (typeof value === 'bigint') {
+ if (!options.relaxed) {
+ return { $numberLong: BigInt.asIntN(64, value).toString() };
+ }
+ return Number(BigInt.asIntN(64, value));
+ }
+ if (value instanceof RegExp || isRegExp(value)) {
+ let flags = value.flags;
+ if (flags === undefined) {
+ const match = value.toString().match(/[gimuy]*$/);
+ if (match) {
+ flags = match[0];
+ }
+ }
+ const rx = new BSONRegExp(value.source, flags);
+ return rx.toExtendedJSON(options);
+ }
+ if (value != null && typeof value === 'object')
+ return serializeDocument(value, options);
+ return value;
+}
+const BSON_TYPE_MAPPINGS = {
+ Binary: (o) => new Binary(o.value(), o.sub_type),
+ Code: (o) => new Code(o.code, o.scope),
+ DBRef: (o) => new DBRef(o.collection || o.namespace, o.oid, o.db, o.fields),
+ Decimal128: (o) => new Decimal128(o.bytes),
+ Double: (o) => new Double(o.value),
+ Int32: (o) => new Int32(o.value),
+ Long: (o) => Long.fromBits(o.low != null ? o.low : o.low_, o.low != null ? o.high : o.high_, o.low != null ? o.unsigned : o.unsigned_),
+ MaxKey: () => new MaxKey(),
+ MinKey: () => new MinKey(),
+ ObjectId: (o) => new ObjectId(o),
+ BSONRegExp: (o) => new BSONRegExp(o.pattern, o.options),
+ BSONSymbol: (o) => new BSONSymbol(o.value),
+ Timestamp: (o) => Timestamp.fromBits(o.low, o.high)
+};
+function serializeDocument(doc, options) {
+ if (doc == null || typeof doc !== 'object')
+ throw new BSONError('not an object instance');
+ const bsontype = doc._bsontype;
+ if (typeof bsontype === 'undefined') {
+ const _doc = {};
+ for (const name of Object.keys(doc)) {
+ options.seenObjects.push({ propertyName: name, obj: null });
+ try {
+ const value = serializeValue(doc[name], options);
+ if (name === '__proto__') {
+ Object.defineProperty(_doc, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ _doc[name] = value;
+ }
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ }
+ return _doc;
+ }
+ else if (doc != null &&
+ typeof doc === 'object' &&
+ typeof doc._bsontype === 'string' &&
+ doc[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (isBSONType(doc)) {
+ let outDoc = doc;
+ if (typeof outDoc.toExtendedJSON !== 'function') {
+ const mapper = BSON_TYPE_MAPPINGS[doc._bsontype];
+ if (!mapper) {
+ throw new BSONError('Unrecognized or invalid _bsontype: ' + doc._bsontype);
+ }
+ outDoc = mapper(outDoc);
+ }
+ if (bsontype === 'Code' && outDoc.scope) {
+ outDoc = new Code(outDoc.code, serializeValue(outDoc.scope, options));
+ }
+ else if (bsontype === 'DBRef' && outDoc.oid) {
+ outDoc = new DBRef(serializeValue(outDoc.collection, options), serializeValue(outDoc.oid, options), serializeValue(outDoc.db, options), serializeValue(outDoc.fields, options));
+ }
+ return outDoc.toExtendedJSON(options);
+ }
+ else {
+ throw new BSONError('_bsontype must be a string, but was: ' + typeof bsontype);
+ }
+}
+function parse(text, options) {
+ const ejsonOptions = {
+ useBigInt64: options?.useBigInt64 ?? false,
+ relaxed: options?.relaxed ?? true,
+ legacy: options?.legacy ?? false
+ };
+ return JSON.parse(text, (key, value) => {
+ if (key.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(key)}`);
+ }
+ return deserializeValue(value, ejsonOptions);
+ });
+}
+function stringify(value, replacer, space, options) {
+ if (space != null && typeof space === 'object') {
+ options = space;
+ space = 0;
+ }
+ if (replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) {
+ options = replacer;
+ replacer = undefined;
+ space = 0;
+ }
+ const serializeOptions = Object.assign({ relaxed: true, legacy: false }, options, {
+ seenObjects: [{ propertyName: '(root)', obj: null }]
+ });
+ const doc = serializeValue(value, serializeOptions);
+ return JSON.stringify(doc, replacer, space);
+}
+function EJSONserialize(value, options) {
+ options = options || {};
+ return JSON.parse(stringify(value, options));
+}
+function EJSONdeserialize(ejson, options) {
+ options = options || {};
+ return parse(JSON.stringify(ejson), options);
+}
+const EJSON = Object.create(null);
+EJSON.parse = parse;
+EJSON.stringify = stringify;
+EJSON.serialize = EJSONserialize;
+EJSON.deserialize = EJSONdeserialize;
+Object.freeze(EJSON);
+
+function getSize(source, offset) {
+ try {
+ return NumberUtils.getNonnegativeInt32LE(source, offset);
+ }
+ catch (cause) {
+ throw new BSONOffsetError('BSON size cannot be negative', offset, { cause });
+ }
+}
+function findNull(bytes, offset) {
+ let nullTerminatorOffset = offset;
+ for (; bytes[nullTerminatorOffset] !== 0x00; nullTerminatorOffset++)
+ ;
+ if (nullTerminatorOffset === bytes.length - 1) {
+ throw new BSONOffsetError('Null terminator not found', offset);
+ }
+ return nullTerminatorOffset;
+}
+function parseToElements(bytes, startOffset = 0) {
+ startOffset ??= 0;
+ if (bytes.length < 5) {
+ throw new BSONOffsetError(`Input must be at least 5 bytes, got ${bytes.length} bytes`, startOffset);
+ }
+ const documentSize = getSize(bytes, startOffset);
+ if (documentSize > bytes.length - startOffset) {
+ throw new BSONOffsetError(`Parsed documentSize (${documentSize} bytes) does not match input length (${bytes.length} bytes)`, startOffset);
+ }
+ if (bytes[startOffset + documentSize - 1] !== 0x00) {
+ throw new BSONOffsetError('BSON documents must end in 0x00', startOffset + documentSize);
+ }
+ const elements = [];
+ let offset = startOffset + 4;
+ while (offset <= documentSize + startOffset) {
+ const type = bytes[offset];
+ offset += 1;
+ if (type === 0) {
+ if (offset - startOffset !== documentSize) {
+ throw new BSONOffsetError(`Invalid 0x00 type byte`, offset);
+ }
+ break;
+ }
+ const nameOffset = offset;
+ const nameLength = findNull(bytes, offset) - nameOffset;
+ offset += nameLength + 1;
+ let length;
+ if (type === 1 ||
+ type === 18 ||
+ type === 9 ||
+ type === 17) {
+ length = 8;
+ }
+ else if (type === 16) {
+ length = 4;
+ }
+ else if (type === 7) {
+ length = 12;
+ }
+ else if (type === 19) {
+ length = 16;
+ }
+ else if (type === 8) {
+ length = 1;
+ }
+ else if (type === 10 ||
+ type === 6 ||
+ type === 127 ||
+ type === 255) {
+ length = 0;
+ }
+ else if (type === 11) {
+ length = findNull(bytes, findNull(bytes, offset) + 1) + 1 - offset;
+ }
+ else if (type === 3 ||
+ type === 4 ||
+ type === 15) {
+ length = getSize(bytes, offset);
+ }
+ else if (type === 2 ||
+ type === 5 ||
+ type === 12 ||
+ type === 13 ||
+ type === 14) {
+ length = getSize(bytes, offset) + 4;
+ if (type === 5) {
+ length += 1;
+ }
+ if (type === 12) {
+ length += 12;
+ }
+ }
+ else {
+ throw new BSONOffsetError(`Invalid 0x${type.toString(16).padStart(2, '0')} type byte`, offset);
+ }
+ if (length > documentSize) {
+ throw new BSONOffsetError('value reports length larger than document', offset);
+ }
+ elements.push([type, nameOffset, nameLength, offset, length]);
+ offset += length;
+ }
+ return elements;
+}
+
+const onDemand = Object.create(null);
+onDemand.parseToElements = parseToElements;
+onDemand.ByteUtils = ByteUtils;
+onDemand.NumberUtils = NumberUtils;
+Object.freeze(onDemand);
+
+const MAXSIZE = 1024 * 1024 * 17;
+let buffer = ByteUtils.allocate(MAXSIZE);
+function setInternalBufferSize(size) {
+ if (buffer.length < size) {
+ buffer = ByteUtils.allocate(size);
+ }
+}
+function serialize(object, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const minInternalBufferSize = typeof options.minInternalBufferSize === 'number' ? options.minInternalBufferSize : MAXSIZE;
+ if (buffer.length < minInternalBufferSize) {
+ buffer = ByteUtils.allocate(minInternalBufferSize);
+ }
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ const finishedBuffer = ByteUtils.allocateUnsafe(serializationIndex);
+ finishedBuffer.set(buffer.subarray(0, serializationIndex), 0);
+ return finishedBuffer;
+}
+function serializeWithBufferAndIndex(object, finalBuffer, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const startIndex = typeof options.index === 'number' ? options.index : 0;
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ finalBuffer.set(buffer.subarray(0, serializationIndex), startIndex);
+ return startIndex + serializationIndex - 1;
+}
+function deserialize(buffer, options = {}) {
+ return internalDeserialize(ByteUtils.toLocalBufferType(buffer), options);
+}
+function calculateObjectSize(object, options = {}) {
+ options = options || {};
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ return internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined);
+}
+function deserializeStream(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ const internalOptions = Object.assign({ allowObjectSmallerThanBufferSize: true, index: 0 }, options);
+ const bufferData = ByteUtils.toLocalBufferType(data);
+ let index = startIndex;
+ for (let i = 0; i < numberOfDocuments; i++) {
+ const size = NumberUtils.getInt32LE(bufferData, index);
+ internalOptions.index = index;
+ documents[docStartIndex + i] = internalDeserialize(bufferData, internalOptions);
+ index = index + size;
+ }
+ return index;
+}
+
+var bson = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ BSONError: BSONError,
+ BSONOffsetError: BSONOffsetError,
+ BSONRegExp: BSONRegExp,
+ BSONRuntimeError: BSONRuntimeError,
+ BSONSymbol: BSONSymbol,
+ BSONType: BSONType,
+ BSONValue: BSONValue,
+ BSONVersionError: BSONVersionError,
+ Binary: Binary,
+ Code: Code,
+ DBRef: DBRef,
+ Decimal128: Decimal128,
+ Double: Double,
+ EJSON: EJSON,
+ Int32: Int32,
+ Long: Long,
+ MaxKey: MaxKey,
+ MinKey: MinKey,
+ ObjectId: ObjectId,
+ Timestamp: Timestamp,
+ UUID: UUID,
+ calculateObjectSize: calculateObjectSize,
+ deserialize: deserialize,
+ deserializeStream: deserializeStream,
+ onDemand: onDemand,
+ serialize: serialize,
+ serializeWithBufferAndIndex: serializeWithBufferAndIndex,
+ setInternalBufferSize: setInternalBufferSize
+});
+
+export { bson as BSON, BSONError, BSONOffsetError, BSONRegExp, BSONRuntimeError, BSONSymbol, BSONType, BSONValue, BSONVersionError, Binary, Code, DBRef, Decimal128, Double, EJSON, Int32, Long, MaxKey, MinKey, ObjectId, Timestamp, UUID, calculateObjectSize, deserialize, deserializeStream, onDemand, serialize, serializeWithBufferAndIndex, setInternalBufferSize };
+//# sourceMappingURL=bson.mjs.map
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.mjs.map b/week-3/04-course-app-hard/node_modules/bson/lib/bson.mjs.map
new file mode 100644
index 000000000..fd50af3fd
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"bson.mjs","sources":["../src/parser/utils.ts","../src/constants.ts","../src/error.ts","../src/parse_utf8.ts","../src/utils/latin.ts","../src/utils/node_byte_utils.ts","../src/utils/web_byte_utils.ts","../src/utils/byte_utils.ts","../src/bson_value.ts","../src/binary.ts","../src/code.ts","../src/db_ref.ts","../src/utils/string_utils.ts","../src/long.ts","../src/decimal128.ts","../src/double.ts","../src/int_32.ts","../src/max_key.ts","../src/min_key.ts","../src/utils/number_utils.ts","../src/objectid.ts","../src/parser/calculate_size.ts","../src/regexp.ts","../src/symbol.ts","../src/timestamp.ts","../src/parser/deserializer.ts","../src/parser/serializer.ts","../src/extended_json.ts","../src/parser/on_demand/parse_to_elements.ts","../src/parser/on_demand/index.ts","../src/bson.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["StringUtils.validateStringCharacters","StringUtils.removeLeadingZerosAndExplicitPlus","constants.JS_INT_MIN","constants.JS_INT_MAX","constants.BSON_INT32_MIN","constants.BSON_INT32_MAX","constants.BSON_MAJOR_VERSION","constants.BSON_DATA_STRING","constants.BSON_DATA_OID","constants.BSON_DATA_INT","constants.BSON_DATA_NUMBER","constants.BSON_DATA_DATE","constants.BSON_DATA_BOOLEAN","constants.BSON_DATA_OBJECT","constants.BSON_DATA_ARRAY","constants.BSON_DATA_UNDEFINED","constants.BSON_DATA_NULL","constants.BSON_DATA_LONG","constants.BSON_DATA_DECIMAL128","constants.BSON_DATA_BINARY","constants.BSON_BINARY_SUBTYPE_UUID_NEW","constants.BSON_DATA_REGEXP","constants.BSON_DATA_SYMBOL","constants.BSON_DATA_TIMESTAMP","constants.BSON_DATA_MIN_KEY","constants.BSON_DATA_MAX_KEY","constants.BSON_DATA_CODE","constants.BSON_DATA_CODE_W_SCOPE","constants.BSON_DATA_DBPOINTER","constants.BSON_BINARY_SUBTYPE_DEFAULT"],"mappings":"AAAM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,OAAO,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,CAAC,QAAQ,CACpE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CACtC,CAAC;AACJ,CAAC;AAEK,SAAU,YAAY,CAAC,KAAc,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KA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ErD,IAAI,KAAK,GAAG,UAAU,CAAC;AAEvB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC,EAAE,EAAE;QAE1C,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAEvD,QAAA,eAAe,CAAC,KAAK,GAAG,KAAK,CAAC;AAE9B,QAAA,SAAS,CAAC,aAAa,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;AAEhF,QAAA,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;KACtB;AAGD,IAAA,OAAO,KAAK,CAAC;AACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.rn.cjs b/week-3/04-course-app-hard/node_modules/bson/lib/bson.rn.cjs
new file mode 100644
index 000000000..8536b9c1c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.rn.cjs
@@ -0,0 +1,4434 @@
+'use strict';
+
+function isAnyArrayBuffer(value) {
+ return ['[object ArrayBuffer]', '[object SharedArrayBuffer]'].includes(Object.prototype.toString.call(value));
+}
+function isUint8Array(value) {
+ return Object.prototype.toString.call(value) === '[object Uint8Array]';
+}
+function isBigInt64Array(value) {
+ return Object.prototype.toString.call(value) === '[object BigInt64Array]';
+}
+function isBigUInt64Array(value) {
+ return Object.prototype.toString.call(value) === '[object BigUint64Array]';
+}
+function isRegExp(d) {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+}
+function isMap(d) {
+ return Object.prototype.toString.call(d) === '[object Map]';
+}
+function isDate(d) {
+ return Object.prototype.toString.call(d) === '[object Date]';
+}
+function defaultInspect(x, _options) {
+ return JSON.stringify(x, (k, v) => {
+ if (typeof v === 'bigint') {
+ return { $numberLong: `${v}` };
+ }
+ else if (isMap(v)) {
+ return Object.fromEntries(v);
+ }
+ return v;
+ });
+}
+function getStylizeFunction(options) {
+ const stylizeExists = options != null &&
+ typeof options === 'object' &&
+ 'stylize' in options &&
+ typeof options.stylize === 'function';
+ if (stylizeExists) {
+ return options.stylize;
+ }
+}
+
+const BSON_MAJOR_VERSION = 6;
+const BSON_INT32_MAX = 0x7fffffff;
+const BSON_INT32_MIN = -0x80000000;
+const BSON_INT64_MAX = Math.pow(2, 63) - 1;
+const BSON_INT64_MIN = -Math.pow(2, 63);
+const JS_INT_MAX = Math.pow(2, 53);
+const JS_INT_MIN = -Math.pow(2, 53);
+const BSON_DATA_NUMBER = 1;
+const BSON_DATA_STRING = 2;
+const BSON_DATA_OBJECT = 3;
+const BSON_DATA_ARRAY = 4;
+const BSON_DATA_BINARY = 5;
+const BSON_DATA_UNDEFINED = 6;
+const BSON_DATA_OID = 7;
+const BSON_DATA_BOOLEAN = 8;
+const BSON_DATA_DATE = 9;
+const BSON_DATA_NULL = 10;
+const BSON_DATA_REGEXP = 11;
+const BSON_DATA_DBPOINTER = 12;
+const BSON_DATA_CODE = 13;
+const BSON_DATA_SYMBOL = 14;
+const BSON_DATA_CODE_W_SCOPE = 15;
+const BSON_DATA_INT = 16;
+const BSON_DATA_TIMESTAMP = 17;
+const BSON_DATA_LONG = 18;
+const BSON_DATA_DECIMAL128 = 19;
+const BSON_DATA_MIN_KEY = 0xff;
+const BSON_DATA_MAX_KEY = 0x7f;
+const BSON_BINARY_SUBTYPE_DEFAULT = 0;
+const BSON_BINARY_SUBTYPE_FUNCTION = 1;
+const BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+const BSON_BINARY_SUBTYPE_UUID = 3;
+const BSON_BINARY_SUBTYPE_UUID_NEW = 4;
+const BSON_BINARY_SUBTYPE_MD5 = 5;
+const BSON_BINARY_SUBTYPE_ENCRYPTED = 6;
+const BSON_BINARY_SUBTYPE_COLUMN = 7;
+const BSON_BINARY_SUBTYPE_SENSITIVE = 8;
+const BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+const BSONType = Object.freeze({
+ double: 1,
+ string: 2,
+ object: 3,
+ array: 4,
+ binData: 5,
+ undefined: 6,
+ objectId: 7,
+ bool: 8,
+ date: 9,
+ null: 10,
+ regex: 11,
+ dbPointer: 12,
+ javascript: 13,
+ symbol: 14,
+ javascriptWithScope: 15,
+ int: 16,
+ timestamp: 17,
+ long: 18,
+ decimal: 19,
+ minKey: -1,
+ maxKey: 127
+});
+
+class BSONError extends Error {
+ get bsonError() {
+ return true;
+ }
+ get name() {
+ return 'BSONError';
+ }
+ constructor(message, options) {
+ super(message, options);
+ }
+ static isBSONError(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ 'bsonError' in value &&
+ value.bsonError === true &&
+ 'name' in value &&
+ 'message' in value &&
+ 'stack' in value);
+ }
+}
+class BSONVersionError extends BSONError {
+ get name() {
+ return 'BSONVersionError';
+ }
+ constructor() {
+ super(`Unsupported BSON version, bson types must be from bson ${BSON_MAJOR_VERSION}.x.x`);
+ }
+}
+class BSONRuntimeError extends BSONError {
+ get name() {
+ return 'BSONRuntimeError';
+ }
+ constructor(message) {
+ super(message);
+ }
+}
+class BSONOffsetError extends BSONError {
+ get name() {
+ return 'BSONOffsetError';
+ }
+ constructor(message, offset, options) {
+ super(`${message}. offset: ${offset}`, options);
+ this.offset = offset;
+ }
+}
+
+const { TextDecoder } = require('../vendor/text-encoding');
+let TextDecoderFatal;
+let TextDecoderNonFatal;
+function parseUtf8(buffer, start, end, fatal) {
+ if (fatal) {
+ TextDecoderFatal ??= new TextDecoder('utf8', { fatal: true });
+ try {
+ return TextDecoderFatal.decode(buffer.subarray(start, end));
+ }
+ catch (cause) {
+ throw new BSONError('Invalid UTF-8 string in BSON document', { cause });
+ }
+ }
+ TextDecoderNonFatal ??= new TextDecoder('utf8', { fatal: false });
+ return TextDecoderNonFatal.decode(buffer.subarray(start, end));
+}
+
+function tryReadBasicLatin(uint8array, start, end) {
+ if (uint8array.length === 0) {
+ return '';
+ }
+ const stringByteLength = end - start;
+ if (stringByteLength === 0) {
+ return '';
+ }
+ if (stringByteLength > 20) {
+ return null;
+ }
+ if (stringByteLength === 1 && uint8array[start] < 128) {
+ return String.fromCharCode(uint8array[start]);
+ }
+ if (stringByteLength === 2 && uint8array[start] < 128 && uint8array[start + 1] < 128) {
+ return String.fromCharCode(uint8array[start]) + String.fromCharCode(uint8array[start + 1]);
+ }
+ if (stringByteLength === 3 &&
+ uint8array[start] < 128 &&
+ uint8array[start + 1] < 128 &&
+ uint8array[start + 2] < 128) {
+ return (String.fromCharCode(uint8array[start]) +
+ String.fromCharCode(uint8array[start + 1]) +
+ String.fromCharCode(uint8array[start + 2]));
+ }
+ const latinBytes = [];
+ for (let i = start; i < end; i++) {
+ const byte = uint8array[i];
+ if (byte > 127) {
+ return null;
+ }
+ latinBytes.push(byte);
+ }
+ return String.fromCharCode(...latinBytes);
+}
+function tryWriteBasicLatin(destination, source, offset) {
+ if (source.length === 0)
+ return 0;
+ if (source.length > 25)
+ return null;
+ if (destination.length - offset < source.length)
+ return null;
+ for (let charOffset = 0, destinationOffset = offset; charOffset < source.length; charOffset++, destinationOffset++) {
+ const char = source.charCodeAt(charOffset);
+ if (char > 127)
+ return null;
+ destination[destinationOffset] = char;
+ }
+ return source.length;
+}
+
+function nodejsMathRandomBytes(byteLength) {
+ return nodeJsByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const nodejsRandomBytes = (() => {
+ try {
+ return require('crypto').randomBytes;
+ }
+ catch {
+ return nodejsMathRandomBytes;
+ }
+})();
+const nodeJsByteUtils = {
+ toLocalBufferType(potentialBuffer) {
+ if (Buffer.isBuffer(potentialBuffer)) {
+ return potentialBuffer;
+ }
+ if (ArrayBuffer.isView(potentialBuffer)) {
+ return Buffer.from(potentialBuffer.buffer, potentialBuffer.byteOffset, potentialBuffer.byteLength);
+ }
+ const stringTag = potentialBuffer?.[Symbol.toStringTag] ?? Object.prototype.toString.call(potentialBuffer);
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return Buffer.from(potentialBuffer);
+ }
+ throw new BSONError(`Cannot create Buffer from ${String(potentialBuffer)}`);
+ },
+ allocate(size) {
+ return Buffer.alloc(size);
+ },
+ allocateUnsafe(size) {
+ return Buffer.allocUnsafe(size);
+ },
+ equals(a, b) {
+ return nodeJsByteUtils.toLocalBufferType(a).equals(b);
+ },
+ fromNumberArray(array) {
+ return Buffer.from(array);
+ },
+ fromBase64(base64) {
+ return Buffer.from(base64, 'base64');
+ },
+ toBase64(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('base64');
+ },
+ fromISO88591(codePoints) {
+ return Buffer.from(codePoints, 'binary');
+ },
+ toISO88591(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('binary');
+ },
+ fromHex(hex) {
+ return Buffer.from(hex, 'hex');
+ },
+ toHex(buffer) {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('hex');
+ },
+ toUTF8(buffer, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(buffer, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ const string = nodeJsByteUtils.toLocalBufferType(buffer).toString('utf8', start, end);
+ if (fatal) {
+ for (let i = 0; i < string.length; i++) {
+ if (string.charCodeAt(i) === 0xfffd) {
+ parseUtf8(buffer, start, end, true);
+ break;
+ }
+ }
+ }
+ return string;
+ },
+ utf8ByteLength(input) {
+ return Buffer.byteLength(input, 'utf8');
+ },
+ encodeUTF8Into(buffer, source, byteOffset) {
+ const latinBytesWritten = tryWriteBasicLatin(buffer, source, byteOffset);
+ if (latinBytesWritten != null) {
+ return latinBytesWritten;
+ }
+ return nodeJsByteUtils.toLocalBufferType(buffer).write(source, byteOffset, undefined, 'utf8');
+ },
+ randomBytes: nodejsRandomBytes
+};
+
+const { TextEncoder } = require('../vendor/text-encoding');
+const { encode: btoa, decode: atob } = require('../vendor/base64');
+function isReactNative() {
+ const { navigator } = globalThis;
+ return typeof navigator === 'object' && navigator.product === 'ReactNative';
+}
+function webMathRandomBytes(byteLength) {
+ if (byteLength < 0) {
+ throw new RangeError(`The argument 'byteLength' is invalid. Received ${byteLength}`);
+ }
+ return webByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
+}
+const webRandomBytes = (() => {
+ const { crypto } = globalThis;
+ if (crypto != null && typeof crypto.getRandomValues === 'function') {
+ return (byteLength) => {
+ return crypto.getRandomValues(webByteUtils.allocate(byteLength));
+ };
+ }
+ else {
+ if (isReactNative()) {
+ const { console } = globalThis;
+ console?.warn?.('BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.');
+ }
+ return webMathRandomBytes;
+ }
+})();
+const HEX_DIGIT = /(\d|[a-f])/i;
+const webByteUtils = {
+ toLocalBufferType(potentialUint8array) {
+ const stringTag = potentialUint8array?.[Symbol.toStringTag] ??
+ Object.prototype.toString.call(potentialUint8array);
+ if (stringTag === 'Uint8Array') {
+ return potentialUint8array;
+ }
+ if (ArrayBuffer.isView(potentialUint8array)) {
+ return new Uint8Array(potentialUint8array.buffer.slice(potentialUint8array.byteOffset, potentialUint8array.byteOffset + potentialUint8array.byteLength));
+ }
+ if (stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]') {
+ return new Uint8Array(potentialUint8array);
+ }
+ throw new BSONError(`Cannot make a Uint8Array from ${String(potentialUint8array)}`);
+ },
+ allocate(size) {
+ if (typeof size !== 'number') {
+ throw new TypeError(`The "size" argument must be of type number. Received ${String(size)}`);
+ }
+ return new Uint8Array(size);
+ },
+ allocateUnsafe(size) {
+ return webByteUtils.allocate(size);
+ },
+ equals(a, b) {
+ if (a.byteLength !== b.byteLength) {
+ return false;
+ }
+ for (let i = 0; i < a.byteLength; i++) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+ return true;
+ },
+ fromNumberArray(array) {
+ return Uint8Array.from(array);
+ },
+ fromBase64(base64) {
+ return Uint8Array.from(atob(base64), c => c.charCodeAt(0));
+ },
+ toBase64(uint8array) {
+ return btoa(webByteUtils.toISO88591(uint8array));
+ },
+ fromISO88591(codePoints) {
+ return Uint8Array.from(codePoints, c => c.charCodeAt(0) & 0xff);
+ },
+ toISO88591(uint8array) {
+ return Array.from(Uint16Array.from(uint8array), b => String.fromCharCode(b)).join('');
+ },
+ fromHex(hex) {
+ const evenLengthHex = hex.length % 2 === 0 ? hex : hex.slice(0, hex.length - 1);
+ const buffer = [];
+ for (let i = 0; i < evenLengthHex.length; i += 2) {
+ const firstDigit = evenLengthHex[i];
+ const secondDigit = evenLengthHex[i + 1];
+ if (!HEX_DIGIT.test(firstDigit)) {
+ break;
+ }
+ if (!HEX_DIGIT.test(secondDigit)) {
+ break;
+ }
+ const hexDigit = Number.parseInt(`${firstDigit}${secondDigit}`, 16);
+ buffer.push(hexDigit);
+ }
+ return Uint8Array.from(buffer);
+ },
+ toHex(uint8array) {
+ return Array.from(uint8array, byte => byte.toString(16).padStart(2, '0')).join('');
+ },
+ toUTF8(uint8array, start, end, fatal) {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(uint8array, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+ return parseUtf8(uint8array, start, end, fatal);
+ },
+ utf8ByteLength(input) {
+ return new TextEncoder().encode(input).byteLength;
+ },
+ encodeUTF8Into(uint8array, source, byteOffset) {
+ const bytes = new TextEncoder().encode(source);
+ uint8array.set(bytes, byteOffset);
+ return bytes.byteLength;
+ },
+ randomBytes: webRandomBytes
+};
+
+const hasGlobalBuffer = typeof Buffer === 'function' && Buffer.prototype?._isBuffer !== true;
+const ByteUtils = hasGlobalBuffer ? nodeJsByteUtils : webByteUtils;
+
+class BSONValue {
+ get [Symbol.for('@@mdb.bson.version')]() {
+ return BSON_MAJOR_VERSION;
+ }
+ [Symbol.for('nodejs.util.inspect.custom')](depth, options, inspect) {
+ return this.inspect(depth, options, inspect);
+ }
+}
+
+class Binary extends BSONValue {
+ get _bsontype() {
+ return 'Binary';
+ }
+ constructor(buffer, subType) {
+ super();
+ if (!(buffer == null) &&
+ typeof buffer === 'string' &&
+ !ArrayBuffer.isView(buffer) &&
+ !isAnyArrayBuffer(buffer) &&
+ !Array.isArray(buffer)) {
+ throw new BSONError('Binary can only be constructed from Uint8Array or number[]');
+ }
+ this.sub_type = subType ?? Binary.BSON_BINARY_SUBTYPE_DEFAULT;
+ if (buffer == null) {
+ this.buffer = ByteUtils.allocate(Binary.BUFFER_SIZE);
+ this.position = 0;
+ }
+ else {
+ this.buffer = Array.isArray(buffer)
+ ? ByteUtils.fromNumberArray(buffer)
+ : ByteUtils.toLocalBufferType(buffer);
+ this.position = this.buffer.byteLength;
+ }
+ }
+ put(byteValue) {
+ if (typeof byteValue === 'string' && byteValue.length !== 1) {
+ throw new BSONError('only accepts single character String');
+ }
+ else if (typeof byteValue !== 'number' && byteValue.length !== 1)
+ throw new BSONError('only accepts single character Uint8Array or Array');
+ let decodedByte;
+ if (typeof byteValue === 'string') {
+ decodedByte = byteValue.charCodeAt(0);
+ }
+ else if (typeof byteValue === 'number') {
+ decodedByte = byteValue;
+ }
+ else {
+ decodedByte = byteValue[0];
+ }
+ if (decodedByte < 0 || decodedByte > 255) {
+ throw new BSONError('only accepts number in a valid unsigned byte range 0-255');
+ }
+ if (this.buffer.byteLength > this.position) {
+ this.buffer[this.position++] = decodedByte;
+ }
+ else {
+ const newSpace = ByteUtils.allocate(Binary.BUFFER_SIZE + this.buffer.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ this.buffer[this.position++] = decodedByte;
+ }
+ }
+ write(sequence, offset) {
+ offset = typeof offset === 'number' ? offset : this.position;
+ if (this.buffer.byteLength < offset + sequence.length) {
+ const newSpace = ByteUtils.allocate(this.buffer.byteLength + sequence.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ }
+ if (ArrayBuffer.isView(sequence)) {
+ this.buffer.set(ByteUtils.toLocalBufferType(sequence), offset);
+ this.position =
+ offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;
+ }
+ else if (typeof sequence === 'string') {
+ throw new BSONError('input cannot be string');
+ }
+ }
+ read(position, length) {
+ length = length && length > 0 ? length : this.position;
+ return this.buffer.slice(position, position + length);
+ }
+ value() {
+ return this.buffer.length === this.position
+ ? this.buffer
+ : this.buffer.subarray(0, this.position);
+ }
+ length() {
+ return this.position;
+ }
+ toJSON() {
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.buffer.subarray(0, this.position));
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ if (encoding === 'utf8' || encoding === 'utf-8')
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ const base64String = ByteUtils.toBase64(this.buffer);
+ const subType = Number(this.sub_type).toString(16);
+ if (options.legacy) {
+ return {
+ $binary: base64String,
+ $type: subType.length === 1 ? '0' + subType : subType
+ };
+ }
+ return {
+ $binary: {
+ base64: base64String,
+ subType: subType.length === 1 ? '0' + subType : subType
+ }
+ };
+ }
+ toUUID() {
+ if (this.sub_type === Binary.SUBTYPE_UUID) {
+ return new UUID(this.buffer.slice(0, this.position));
+ }
+ throw new BSONError(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${Binary.SUBTYPE_UUID}" is currently supported.`);
+ }
+ static createFromHexString(hex, subType) {
+ return new Binary(ByteUtils.fromHex(hex), subType);
+ }
+ static createFromBase64(base64, subType) {
+ return new Binary(ByteUtils.fromBase64(base64), subType);
+ }
+ static fromExtendedJSON(doc, options) {
+ options = options || {};
+ let data;
+ let type;
+ if ('$binary' in doc) {
+ if (options.legacy && typeof doc.$binary === 'string' && '$type' in doc) {
+ type = doc.$type ? parseInt(doc.$type, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary);
+ }
+ else {
+ if (typeof doc.$binary !== 'string') {
+ type = doc.$binary.subType ? parseInt(doc.$binary.subType, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary.base64);
+ }
+ }
+ }
+ else if ('$uuid' in doc) {
+ type = 4;
+ data = UUID.bytesFromString(doc.$uuid);
+ }
+ if (!data) {
+ throw new BSONError(`Unexpected Binary Extended JSON format ${JSON.stringify(doc)}`);
+ }
+ return type === BSON_BINARY_SUBTYPE_UUID_NEW ? new UUID(data) : new Binary(data, type);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const base64 = ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ const base64Arg = inspect(base64, options);
+ const subTypeArg = inspect(this.sub_type, options);
+ return `Binary.createFromBase64(${base64Arg}, ${subTypeArg})`;
+ }
+}
+Binary.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+Binary.BUFFER_SIZE = 256;
+Binary.SUBTYPE_DEFAULT = 0;
+Binary.SUBTYPE_FUNCTION = 1;
+Binary.SUBTYPE_BYTE_ARRAY = 2;
+Binary.SUBTYPE_UUID_OLD = 3;
+Binary.SUBTYPE_UUID = 4;
+Binary.SUBTYPE_MD5 = 5;
+Binary.SUBTYPE_ENCRYPTED = 6;
+Binary.SUBTYPE_COLUMN = 7;
+Binary.SUBTYPE_SENSITIVE = 8;
+Binary.SUBTYPE_USER_DEFINED = 128;
+const UUID_BYTE_LENGTH = 16;
+const UUID_WITHOUT_DASHES = /^[0-9A-F]{32}$/i;
+const UUID_WITH_DASHES = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
+class UUID extends Binary {
+ constructor(input) {
+ let bytes;
+ if (input == null) {
+ bytes = UUID.generate();
+ }
+ else if (input instanceof UUID) {
+ bytes = ByteUtils.toLocalBufferType(new Uint8Array(input.buffer));
+ }
+ else if (ArrayBuffer.isView(input) && input.byteLength === UUID_BYTE_LENGTH) {
+ bytes = ByteUtils.toLocalBufferType(input);
+ }
+ else if (typeof input === 'string') {
+ bytes = UUID.bytesFromString(input);
+ }
+ else {
+ throw new BSONError('Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).');
+ }
+ super(bytes, BSON_BINARY_SUBTYPE_UUID_NEW);
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ }
+ toHexString(includeDashes = true) {
+ if (includeDashes) {
+ return [
+ ByteUtils.toHex(this.buffer.subarray(0, 4)),
+ ByteUtils.toHex(this.buffer.subarray(4, 6)),
+ ByteUtils.toHex(this.buffer.subarray(6, 8)),
+ ByteUtils.toHex(this.buffer.subarray(8, 10)),
+ ByteUtils.toHex(this.buffer.subarray(10, 16))
+ ].join('-');
+ }
+ return ByteUtils.toHex(this.buffer);
+ }
+ toString(encoding) {
+ if (encoding === 'hex')
+ return ByteUtils.toHex(this.id);
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ equals(otherId) {
+ if (!otherId) {
+ return false;
+ }
+ if (otherId instanceof UUID) {
+ return ByteUtils.equals(otherId.id, this.id);
+ }
+ try {
+ return ByteUtils.equals(new UUID(otherId).id, this.id);
+ }
+ catch {
+ return false;
+ }
+ }
+ toBinary() {
+ return new Binary(this.id, Binary.SUBTYPE_UUID);
+ }
+ static generate() {
+ const bytes = ByteUtils.randomBytes(UUID_BYTE_LENGTH);
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
+ return bytes;
+ }
+ static isValid(input) {
+ if (!input) {
+ return false;
+ }
+ if (typeof input === 'string') {
+ return UUID.isValidUUIDString(input);
+ }
+ if (isUint8Array(input)) {
+ return input.byteLength === UUID_BYTE_LENGTH;
+ }
+ return (input._bsontype === 'Binary' &&
+ input.sub_type === this.SUBTYPE_UUID &&
+ input.buffer.byteLength === 16);
+ }
+ static createFromHexString(hexString) {
+ const buffer = UUID.bytesFromString(hexString);
+ return new UUID(buffer);
+ }
+ static createFromBase64(base64) {
+ return new UUID(ByteUtils.fromBase64(base64));
+ }
+ static bytesFromString(representation) {
+ if (!UUID.isValidUUIDString(representation)) {
+ throw new BSONError('UUID string representation must be 32 hex digits or canonical hyphenated representation');
+ }
+ return ByteUtils.fromHex(representation.replace(/-/g, ''));
+ }
+ static isValidUUIDString(representation) {
+ return UUID_WITHOUT_DASHES.test(representation) || UUID_WITH_DASHES.test(representation);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new UUID(${inspect(this.toHexString(), options)})`;
+ }
+}
+
+class Code extends BSONValue {
+ get _bsontype() {
+ return 'Code';
+ }
+ constructor(code, scope) {
+ super();
+ this.code = code.toString();
+ this.scope = scope ?? null;
+ }
+ toJSON() {
+ if (this.scope != null) {
+ return { code: this.code, scope: this.scope };
+ }
+ return { code: this.code };
+ }
+ toExtendedJSON() {
+ if (this.scope) {
+ return { $code: this.code, $scope: this.scope };
+ }
+ return { $code: this.code };
+ }
+ static fromExtendedJSON(doc) {
+ return new Code(doc.$code, doc.$scope);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ let parametersString = inspect(this.code, options);
+ const multiLineFn = parametersString.includes('\n');
+ if (this.scope != null) {
+ parametersString += `,${multiLineFn ? '\n' : ' '}${inspect(this.scope, options)}`;
+ }
+ const endingNewline = multiLineFn && this.scope === null;
+ return `new Code(${multiLineFn ? '\n' : ''}${parametersString}${endingNewline ? '\n' : ''})`;
+ }
+}
+
+function isDBRefLike(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '$id' in value &&
+ value.$id != null &&
+ '$ref' in value &&
+ typeof value.$ref === 'string' &&
+ (!('$db' in value) || ('$db' in value && typeof value.$db === 'string')));
+}
+class DBRef extends BSONValue {
+ get _bsontype() {
+ return 'DBRef';
+ }
+ constructor(collection, oid, db, fields) {
+ super();
+ const parts = collection.split('.');
+ if (parts.length === 2) {
+ db = parts.shift();
+ collection = parts.shift();
+ }
+ this.collection = collection;
+ this.oid = oid;
+ this.db = db;
+ this.fields = fields || {};
+ }
+ get namespace() {
+ return this.collection;
+ }
+ set namespace(value) {
+ this.collection = value;
+ }
+ toJSON() {
+ const o = Object.assign({
+ $ref: this.collection,
+ $id: this.oid
+ }, this.fields);
+ if (this.db != null)
+ o.$db = this.db;
+ return o;
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ let o = {
+ $ref: this.collection,
+ $id: this.oid
+ };
+ if (options.legacy) {
+ return o;
+ }
+ if (this.db)
+ o.$db = this.db;
+ o = Object.assign(o, this.fields);
+ return o;
+ }
+ static fromExtendedJSON(doc) {
+ const copy = Object.assign({}, doc);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(doc.$ref, doc.$id, doc.$db, copy);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const args = [
+ inspect(this.namespace, options),
+ inspect(this.oid, options),
+ ...(this.db ? [inspect(this.db, options)] : []),
+ ...(Object.keys(this.fields).length > 0 ? [inspect(this.fields, options)] : [])
+ ];
+ args[1] = inspect === defaultInspect ? `new ObjectId(${args[1]})` : args[1];
+ return `new DBRef(${args.join(', ')})`;
+ }
+}
+
+function removeLeadingZerosAndExplicitPlus(str) {
+ if (str === '') {
+ return str;
+ }
+ let startIndex = 0;
+ const isNegative = str[startIndex] === '-';
+ const isExplicitlyPositive = str[startIndex] === '+';
+ if (isExplicitlyPositive || isNegative) {
+ startIndex += 1;
+ }
+ let foundInsignificantZero = false;
+ for (; startIndex < str.length && str[startIndex] === '0'; ++startIndex) {
+ foundInsignificantZero = true;
+ }
+ if (!foundInsignificantZero) {
+ return isExplicitlyPositive ? str.slice(1) : str;
+ }
+ return `${isNegative ? '-' : ''}${str.length === startIndex ? '0' : str.slice(startIndex)}`;
+}
+function validateStringCharacters(str, radix) {
+ radix = radix ?? 10;
+ const validCharacters = '0123456789abcdefghijklmnopqrstuvwxyz'.slice(0, radix);
+ const regex = new RegExp(`[^-+${validCharacters}]`, 'i');
+ return regex.test(str) ? false : str;
+}
+
+let wasm = undefined;
+try {
+ wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])), {}).exports;
+}
+catch {
+}
+const TWO_PWR_16_DBL = 1 << 16;
+const TWO_PWR_24_DBL = 1 << 24;
+const TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
+const TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
+const TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
+const INT_CACHE = {};
+const UINT_CACHE = {};
+const MAX_INT64_STRING_LENGTH = 20;
+const DECIMAL_REG_EX = /^(\+?0|(\+|-)?[1-9][0-9]*)$/;
+class Long extends BSONValue {
+ get _bsontype() {
+ return 'Long';
+ }
+ get __isLong__() {
+ return true;
+ }
+ constructor(lowOrValue = 0, highOrUnsigned, unsigned) {
+ super();
+ const unsignedBool = typeof highOrUnsigned === 'boolean' ? highOrUnsigned : Boolean(unsigned);
+ const high = typeof highOrUnsigned === 'number' ? highOrUnsigned : 0;
+ const res = typeof lowOrValue === 'string'
+ ? Long.fromString(lowOrValue, unsignedBool)
+ : typeof lowOrValue === 'bigint'
+ ? Long.fromBigInt(lowOrValue, unsignedBool)
+ : { low: lowOrValue | 0, high: high | 0, unsigned: unsignedBool };
+ this.low = res.low;
+ this.high = res.high;
+ this.unsigned = res.unsigned;
+ }
+ static fromBits(lowBits, highBits, unsigned) {
+ return new Long(lowBits, highBits, unsigned);
+ }
+ static fromInt(value, unsigned) {
+ let obj, cachedObj, cache;
+ if (unsigned) {
+ value >>>= 0;
+ if ((cache = 0 <= value && value < 256)) {
+ cachedObj = UINT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, (value | 0) < 0 ? -1 : 0, true);
+ if (cache)
+ UINT_CACHE[value] = obj;
+ return obj;
+ }
+ else {
+ value |= 0;
+ if ((cache = -128 <= value && value < 128)) {
+ cachedObj = INT_CACHE[value];
+ if (cachedObj)
+ return cachedObj;
+ }
+ obj = Long.fromBits(value, value < 0 ? -1 : 0, false);
+ if (cache)
+ INT_CACHE[value] = obj;
+ return obj;
+ }
+ }
+ static fromNumber(value, unsigned) {
+ if (isNaN(value))
+ return unsigned ? Long.UZERO : Long.ZERO;
+ if (unsigned) {
+ if (value < 0)
+ return Long.UZERO;
+ if (value >= TWO_PWR_64_DBL)
+ return Long.MAX_UNSIGNED_VALUE;
+ }
+ else {
+ if (value <= -TWO_PWR_63_DBL)
+ return Long.MIN_VALUE;
+ if (value + 1 >= TWO_PWR_63_DBL)
+ return Long.MAX_VALUE;
+ }
+ if (value < 0)
+ return Long.fromNumber(-value, unsigned).neg();
+ return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
+ }
+ static fromBigInt(value, unsigned) {
+ const FROM_BIGINT_BIT_MASK = BigInt(0xffffffff);
+ const FROM_BIGINT_BIT_SHIFT = BigInt(32);
+ return new Long(Number(value & FROM_BIGINT_BIT_MASK), Number((value >> FROM_BIGINT_BIT_SHIFT) & FROM_BIGINT_BIT_MASK), unsigned);
+ }
+ static _fromString(str, unsigned, radix) {
+ if (str.length === 0)
+ throw new BSONError('empty string');
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ let p;
+ if ((p = str.indexOf('-')) > 0)
+ throw new BSONError('interior hyphen');
+ else if (p === 0) {
+ return Long._fromString(str.substring(1), unsigned, radix).neg();
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 8));
+ let result = Long.ZERO;
+ for (let i = 0; i < str.length; i += 8) {
+ const size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ const power = Long.fromNumber(Math.pow(radix, size));
+ result = result.mul(power).add(Long.fromNumber(value));
+ }
+ else {
+ result = result.mul(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ result.unsigned = unsigned;
+ return result;
+ }
+ static fromStringStrict(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str.trim() !== str) {
+ throw new BSONError(`Input: '${str}' contains leading and/or trailing whitespace`);
+ }
+ if (!validateStringCharacters(str, radix)) {
+ throw new BSONError(`Input: '${str}' contains invalid characters for radix: ${radix}`);
+ }
+ const cleanedStr = removeLeadingZerosAndExplicitPlus(str);
+ const result = Long._fromString(cleanedStr, unsigned, radix);
+ if (result.toString(radix).toLowerCase() !== cleanedStr.toLowerCase()) {
+ throw new BSONError(`Input: ${str} is not representable as ${result.unsigned ? 'an unsigned' : 'a signed'} 64-bit Long ${radix != null ? `with radix: ${radix}` : ''}`);
+ }
+ return result;
+ }
+ static fromString(str, unsignedOrRadix, radix) {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ }
+ else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str === 'NaN' && radix < 24) {
+ return Long.ZERO;
+ }
+ else if ((str === 'Infinity' || str === '+Infinity' || str === '-Infinity') && radix < 35) {
+ return Long.ZERO;
+ }
+ return Long._fromString(str, unsigned, radix);
+ }
+ static fromBytes(bytes, unsigned, le) {
+ return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
+ }
+ static fromBytesLE(bytes, unsigned) {
+ return new Long(bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24), bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24), unsigned);
+ }
+ static fromBytesBE(bytes, unsigned) {
+ return new Long((bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7], (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3], unsigned);
+ }
+ static isLong(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '__isLong__' in value &&
+ value.__isLong__ === true);
+ }
+ static fromValue(val, unsigned) {
+ if (typeof val === 'number')
+ return Long.fromNumber(val, unsigned);
+ if (typeof val === 'string')
+ return Long.fromString(val, unsigned);
+ return Long.fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);
+ }
+ add(addend) {
+ if (!Long.isLong(addend))
+ addend = Long.fromValue(addend);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = addend.high >>> 16;
+ const b32 = addend.high & 0xffff;
+ const b16 = addend.low >>> 16;
+ const b00 = addend.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 + b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ and(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low & other.low, this.high & other.high, this.unsigned);
+ }
+ compare(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.eq(other))
+ return 0;
+ const thisNeg = this.isNegative(), otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg)
+ return -1;
+ if (!thisNeg && otherNeg)
+ return 1;
+ if (!this.unsigned)
+ return this.sub(other).isNegative() ? -1 : 1;
+ return other.high >>> 0 > this.high >>> 0 ||
+ (other.high === this.high && other.low >>> 0 > this.low >>> 0)
+ ? -1
+ : 1;
+ }
+ comp(other) {
+ return this.compare(other);
+ }
+ divide(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (divisor.isZero())
+ throw new BSONError('division by zero');
+ if (wasm) {
+ if (!this.unsigned &&
+ this.high === -0x80000000 &&
+ divisor.low === -1 &&
+ divisor.high === -1) {
+ return this;
+ }
+ const low = (this.unsigned ? wasm.div_u : wasm.div_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (this.isZero())
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ let approx, rem, res;
+ if (!this.unsigned) {
+ if (this.eq(Long.MIN_VALUE)) {
+ if (divisor.eq(Long.ONE) || divisor.eq(Long.NEG_ONE))
+ return Long.MIN_VALUE;
+ else if (divisor.eq(Long.MIN_VALUE))
+ return Long.ONE;
+ else {
+ const halfThis = this.shr(1);
+ approx = halfThis.div(divisor).shl(1);
+ if (approx.eq(Long.ZERO)) {
+ return divisor.isNegative() ? Long.ONE : Long.NEG_ONE;
+ }
+ else {
+ rem = this.sub(divisor.mul(approx));
+ res = approx.add(rem.div(divisor));
+ return res;
+ }
+ }
+ }
+ else if (divisor.eq(Long.MIN_VALUE))
+ return this.unsigned ? Long.UZERO : Long.ZERO;
+ if (this.isNegative()) {
+ if (divisor.isNegative())
+ return this.neg().div(divisor.neg());
+ return this.neg().div(divisor).neg();
+ }
+ else if (divisor.isNegative())
+ return this.div(divisor.neg()).neg();
+ res = Long.ZERO;
+ }
+ else {
+ if (!divisor.unsigned)
+ divisor = divisor.toUnsigned();
+ if (divisor.gt(this))
+ return Long.UZERO;
+ if (divisor.gt(this.shru(1)))
+ return Long.UONE;
+ res = Long.UZERO;
+ }
+ rem = this;
+ while (rem.gte(divisor)) {
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
+ const log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ const delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
+ let approxRes = Long.fromNumber(approx);
+ let approxRem = approxRes.mul(divisor);
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx, this.unsigned);
+ approxRem = approxRes.mul(divisor);
+ }
+ if (approxRes.isZero())
+ approxRes = Long.ONE;
+ res = res.add(approxRes);
+ rem = rem.sub(approxRem);
+ }
+ return res;
+ }
+ div(divisor) {
+ return this.divide(divisor);
+ }
+ equals(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
+ return false;
+ return this.high === other.high && this.low === other.low;
+ }
+ eq(other) {
+ return this.equals(other);
+ }
+ getHighBits() {
+ return this.high;
+ }
+ getHighBitsUnsigned() {
+ return this.high >>> 0;
+ }
+ getLowBits() {
+ return this.low;
+ }
+ getLowBitsUnsigned() {
+ return this.low >>> 0;
+ }
+ getNumBitsAbs() {
+ if (this.isNegative()) {
+ return this.eq(Long.MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
+ }
+ const val = this.high !== 0 ? this.high : this.low;
+ let bit;
+ for (bit = 31; bit > 0; bit--)
+ if ((val & (1 << bit)) !== 0)
+ break;
+ return this.high !== 0 ? bit + 33 : bit + 1;
+ }
+ greaterThan(other) {
+ return this.comp(other) > 0;
+ }
+ gt(other) {
+ return this.greaterThan(other);
+ }
+ greaterThanOrEqual(other) {
+ return this.comp(other) >= 0;
+ }
+ gte(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ ge(other) {
+ return this.greaterThanOrEqual(other);
+ }
+ isEven() {
+ return (this.low & 1) === 0;
+ }
+ isNegative() {
+ return !this.unsigned && this.high < 0;
+ }
+ isOdd() {
+ return (this.low & 1) === 1;
+ }
+ isPositive() {
+ return this.unsigned || this.high >= 0;
+ }
+ isZero() {
+ return this.high === 0 && this.low === 0;
+ }
+ lessThan(other) {
+ return this.comp(other) < 0;
+ }
+ lt(other) {
+ return this.lessThan(other);
+ }
+ lessThanOrEqual(other) {
+ return this.comp(other) <= 0;
+ }
+ lte(other) {
+ return this.lessThanOrEqual(other);
+ }
+ modulo(divisor) {
+ if (!Long.isLong(divisor))
+ divisor = Long.fromValue(divisor);
+ if (wasm) {
+ const low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(this.low, this.high, divisor.low, divisor.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ return this.sub(this.div(divisor).mul(divisor));
+ }
+ mod(divisor) {
+ return this.modulo(divisor);
+ }
+ rem(divisor) {
+ return this.modulo(divisor);
+ }
+ multiply(multiplier) {
+ if (this.isZero())
+ return Long.ZERO;
+ if (!Long.isLong(multiplier))
+ multiplier = Long.fromValue(multiplier);
+ if (wasm) {
+ const low = wasm.mul(this.low, this.high, multiplier.low, multiplier.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+ if (multiplier.isZero())
+ return Long.ZERO;
+ if (this.eq(Long.MIN_VALUE))
+ return multiplier.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (multiplier.eq(Long.MIN_VALUE))
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (this.isNegative()) {
+ if (multiplier.isNegative())
+ return this.neg().mul(multiplier.neg());
+ else
+ return this.neg().mul(multiplier).neg();
+ }
+ else if (multiplier.isNegative())
+ return this.mul(multiplier.neg()).neg();
+ if (this.lt(Long.TWO_PWR_24) && multiplier.lt(Long.TWO_PWR_24))
+ return Long.fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+ const b48 = multiplier.high >>> 16;
+ const b32 = multiplier.high & 0xffff;
+ const b16 = multiplier.low >>> 16;
+ const b00 = multiplier.low & 0xffff;
+ let c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+ mul(multiplier) {
+ return this.multiply(multiplier);
+ }
+ negate() {
+ if (!this.unsigned && this.eq(Long.MIN_VALUE))
+ return Long.MIN_VALUE;
+ return this.not().add(Long.ONE);
+ }
+ neg() {
+ return this.negate();
+ }
+ not() {
+ return Long.fromBits(~this.low, ~this.high, this.unsigned);
+ }
+ notEquals(other) {
+ return !this.equals(other);
+ }
+ neq(other) {
+ return this.notEquals(other);
+ }
+ ne(other) {
+ return this.notEquals(other);
+ }
+ or(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low | other.low, this.high | other.high, this.unsigned);
+ }
+ shiftLeft(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);
+ else
+ return Long.fromBits(0, this.low << (numBits - 32), this.unsigned);
+ }
+ shl(numBits) {
+ return this.shiftLeft(numBits);
+ }
+ shiftRight(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ if ((numBits &= 63) === 0)
+ return this;
+ else if (numBits < 32)
+ return Long.fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);
+ else
+ return Long.fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);
+ }
+ shr(numBits) {
+ return this.shiftRight(numBits);
+ }
+ shiftRightUnsigned(numBits) {
+ if (Long.isLong(numBits))
+ numBits = numBits.toInt();
+ numBits &= 63;
+ if (numBits === 0)
+ return this;
+ else {
+ const high = this.high;
+ if (numBits < 32) {
+ const low = this.low;
+ return Long.fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);
+ }
+ else if (numBits === 32)
+ return Long.fromBits(high, 0, this.unsigned);
+ else
+ return Long.fromBits(high >>> (numBits - 32), 0, this.unsigned);
+ }
+ }
+ shr_u(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ shru(numBits) {
+ return this.shiftRightUnsigned(numBits);
+ }
+ subtract(subtrahend) {
+ if (!Long.isLong(subtrahend))
+ subtrahend = Long.fromValue(subtrahend);
+ return this.add(subtrahend.neg());
+ }
+ sub(subtrahend) {
+ return this.subtract(subtrahend);
+ }
+ toInt() {
+ return this.unsigned ? this.low >>> 0 : this.low;
+ }
+ toNumber() {
+ if (this.unsigned)
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
+ }
+ toBigInt() {
+ return BigInt(this.toString());
+ }
+ toBytes(le) {
+ return le ? this.toBytesLE() : this.toBytesBE();
+ }
+ toBytesLE() {
+ const hi = this.high, lo = this.low;
+ return [
+ lo & 0xff,
+ (lo >>> 8) & 0xff,
+ (lo >>> 16) & 0xff,
+ lo >>> 24,
+ hi & 0xff,
+ (hi >>> 8) & 0xff,
+ (hi >>> 16) & 0xff,
+ hi >>> 24
+ ];
+ }
+ toBytesBE() {
+ const hi = this.high, lo = this.low;
+ return [
+ hi >>> 24,
+ (hi >>> 16) & 0xff,
+ (hi >>> 8) & 0xff,
+ hi & 0xff,
+ lo >>> 24,
+ (lo >>> 16) & 0xff,
+ (lo >>> 8) & 0xff,
+ lo & 0xff
+ ];
+ }
+ toSigned() {
+ if (!this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, false);
+ }
+ toString(radix) {
+ radix = radix || 10;
+ if (radix < 2 || 36 < radix)
+ throw new BSONError('radix');
+ if (this.isZero())
+ return '0';
+ if (this.isNegative()) {
+ if (this.eq(Long.MIN_VALUE)) {
+ const radixLong = Long.fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
+ return div.toString(radix) + rem1.toInt().toString(radix);
+ }
+ else
+ return '-' + this.neg().toString(radix);
+ }
+ const radixToPower = Long.fromNumber(Math.pow(radix, 6), this.unsigned);
+ let rem = this;
+ let result = '';
+ while (true) {
+ const remDiv = rem.div(radixToPower);
+ const intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0;
+ let digits = intval.toString(radix);
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ }
+ else {
+ while (digits.length < 6)
+ digits = '0' + digits;
+ result = '' + digits + result;
+ }
+ }
+ }
+ toUnsigned() {
+ if (this.unsigned)
+ return this;
+ return Long.fromBits(this.low, this.high, true);
+ }
+ xor(other) {
+ if (!Long.isLong(other))
+ other = Long.fromValue(other);
+ return Long.fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
+ }
+ eqz() {
+ return this.isZero();
+ }
+ le(other) {
+ return this.lessThanOrEqual(other);
+ }
+ toExtendedJSON(options) {
+ if (options && options.relaxed)
+ return this.toNumber();
+ return { $numberLong: this.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ const { useBigInt64 = false, relaxed = true } = { ...options };
+ if (doc.$numberLong.length > MAX_INT64_STRING_LENGTH) {
+ throw new BSONError('$numberLong string is too long');
+ }
+ if (!DECIMAL_REG_EX.test(doc.$numberLong)) {
+ throw new BSONError(`$numberLong string "${doc.$numberLong}" is in an invalid format`);
+ }
+ if (useBigInt64) {
+ const bigIntResult = BigInt(doc.$numberLong);
+ return BigInt.asIntN(64, bigIntResult);
+ }
+ const longResult = Long.fromString(doc.$numberLong);
+ if (relaxed) {
+ return longResult.toNumber();
+ }
+ return longResult;
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const longVal = inspect(this.toString(), options);
+ const unsignedVal = this.unsigned ? `, ${inspect(this.unsigned, options)}` : '';
+ return `new Long(${longVal}${unsignedVal})`;
+ }
+}
+Long.TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
+Long.MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
+Long.ZERO = Long.fromInt(0);
+Long.UZERO = Long.fromInt(0, true);
+Long.ONE = Long.fromInt(1);
+Long.UONE = Long.fromInt(1, true);
+Long.NEG_ONE = Long.fromInt(-1);
+Long.MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
+Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
+
+const PARSE_STRING_REGEXP = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/;
+const PARSE_INF_REGEXP = /^(\+|-)?(Infinity|inf)$/i;
+const PARSE_NAN_REGEXP = /^(\+|-)?NaN$/i;
+const EXPONENT_MAX = 6111;
+const EXPONENT_MIN = -6176;
+const EXPONENT_BIAS = 6176;
+const MAX_DIGITS = 34;
+const NAN_BUFFER = ByteUtils.fromNumberArray([
+ 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_NEGATIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const INF_POSITIVE_BUFFER = ByteUtils.fromNumberArray([
+ 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+].reverse());
+const EXPONENT_REGEX = /^([-+])?(\d+)?$/;
+const COMBINATION_MASK = 0x1f;
+const EXPONENT_MASK = 0x3fff;
+const COMBINATION_INFINITY = 30;
+const COMBINATION_NAN = 31;
+function isDigit(value) {
+ return !isNaN(parseInt(value, 10));
+}
+function divideu128(value) {
+ const DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ let _rem = Long.fromNumber(0);
+ if (!value.parts[0] && !value.parts[1] && !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+ for (let i = 0; i <= 3; i++) {
+ _rem = _rem.shiftLeft(32);
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low;
+ _rem = _rem.modulo(DIVISOR);
+ }
+ return { quotient: value, rem: _rem };
+}
+function multiply64x2(left, right) {
+ if (!left && !right) {
+ return { high: Long.fromNumber(0), low: Long.fromNumber(0) };
+ }
+ const leftHigh = left.shiftRightUnsigned(32);
+ const leftLow = new Long(left.getLowBits(), 0);
+ const rightHigh = right.shiftRightUnsigned(32);
+ const rightLow = new Long(right.getLowBits(), 0);
+ let productHigh = leftHigh.multiply(rightHigh);
+ let productMid = leftHigh.multiply(rightLow);
+ const productMid2 = leftLow.multiply(rightHigh);
+ let productLow = leftLow.multiply(rightLow);
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0)
+ .add(productMid2)
+ .add(productLow.shiftRightUnsigned(32));
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+ return { high: productHigh, low: productLow };
+}
+function lessThan(left, right) {
+ const uhleft = left.high >>> 0;
+ const uhright = right.high >>> 0;
+ if (uhleft < uhright) {
+ return true;
+ }
+ else if (uhleft === uhright) {
+ const ulleft = left.low >>> 0;
+ const ulright = right.low >>> 0;
+ if (ulleft < ulright)
+ return true;
+ }
+ return false;
+}
+function invalidErr(string, message) {
+ throw new BSONError(`"${string}" is not a valid Decimal128 string - ${message}`);
+}
+class Decimal128 extends BSONValue {
+ get _bsontype() {
+ return 'Decimal128';
+ }
+ constructor(bytes) {
+ super();
+ if (typeof bytes === 'string') {
+ this.bytes = Decimal128.fromString(bytes).bytes;
+ }
+ else if (isUint8Array(bytes)) {
+ if (bytes.byteLength !== 16) {
+ throw new BSONError('Decimal128 must take a Buffer of 16 bytes');
+ }
+ this.bytes = bytes;
+ }
+ else {
+ throw new BSONError('Decimal128 must take a Buffer or string');
+ }
+ }
+ static fromString(representation) {
+ return Decimal128._fromString(representation, { allowRounding: false });
+ }
+ static fromStringWithRounding(representation) {
+ return Decimal128._fromString(representation, { allowRounding: true });
+ }
+ static _fromString(representation, options) {
+ let isNegative = false;
+ let sawSign = false;
+ let sawRadix = false;
+ let foundNonZero = false;
+ let significantDigits = 0;
+ let nDigitsRead = 0;
+ let nDigits = 0;
+ let radixPosition = 0;
+ let firstNonZero = 0;
+ const digits = [0];
+ let nDigitsStored = 0;
+ let digitsInsert = 0;
+ let lastDigit = 0;
+ let exponent = 0;
+ let significandHigh = new Long(0, 0);
+ let significandLow = new Long(0, 0);
+ let biasedExponent = 0;
+ let index = 0;
+ if (representation.length >= 7000) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ const stringMatch = representation.match(PARSE_STRING_REGEXP);
+ const infMatch = representation.match(PARSE_INF_REGEXP);
+ const nanMatch = representation.match(PARSE_NAN_REGEXP);
+ if ((!stringMatch && !infMatch && !nanMatch) || representation.length === 0) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+ if (stringMatch) {
+ const unsignedNumber = stringMatch[2];
+ const e = stringMatch[4];
+ const expSign = stringMatch[5];
+ const expNumber = stringMatch[6];
+ if (e && expNumber === undefined)
+ invalidErr(representation, 'missing exponent power');
+ if (e && unsignedNumber === undefined)
+ invalidErr(representation, 'missing exponent base');
+ if (e === undefined && (expSign || expNumber)) {
+ invalidErr(representation, 'missing e before exponent');
+ }
+ }
+ if (representation[index] === '+' || representation[index] === '-') {
+ sawSign = true;
+ isNegative = representation[index++] === '-';
+ }
+ if (!isDigit(representation[index]) && representation[index] !== '.') {
+ if (representation[index] === 'i' || representation[index] === 'I') {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ else if (representation[index] === 'N') {
+ return new Decimal128(NAN_BUFFER);
+ }
+ }
+ while (isDigit(representation[index]) || representation[index] === '.') {
+ if (representation[index] === '.') {
+ if (sawRadix)
+ invalidErr(representation, 'contains multiple periods');
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+ if (nDigitsStored < MAX_DIGITS) {
+ if (representation[index] !== '0' || foundNonZero) {
+ if (!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+ foundNonZero = true;
+ digits[digitsInsert++] = parseInt(representation[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+ if (foundNonZero)
+ nDigits = nDigits + 1;
+ if (sawRadix)
+ radixPosition = radixPosition + 1;
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+ if (sawRadix && !nDigitsRead)
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ if (representation[index] === 'e' || representation[index] === 'E') {
+ const match = representation.substr(++index).match(EXPONENT_REGEX);
+ if (!match || !match[2])
+ return new Decimal128(NAN_BUFFER);
+ exponent = parseInt(match[0], 10);
+ index = index + match[0].length;
+ }
+ if (representation[index])
+ return new Decimal128(NAN_BUFFER);
+ if (!nDigitsStored) {
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ }
+ else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+ if (significantDigits !== 1) {
+ while (representation[firstNonZero + significantDigits - 1 + Number(sawSign) + Number(sawRadix)] === '0') {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+ if (exponent <= radixPosition && radixPosition > exponent + (1 << 14)) {
+ exponent = EXPONENT_MIN;
+ }
+ else {
+ exponent = exponent - radixPosition;
+ }
+ while (exponent > EXPONENT_MAX) {
+ lastDigit = lastDigit + 1;
+ if (lastDigit >= MAX_DIGITS) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ exponent = exponent - 1;
+ }
+ if (options.allowRounding) {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0 && significantDigits < nDigitsStored) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+ if (nDigitsStored < nDigits) {
+ nDigits = nDigits - 1;
+ }
+ else {
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ const digitsString = digits.join('');
+ if (digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ let endOfString = nDigitsRead;
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ let roundBit = 0;
+ if (roundDigit >= 5) {
+ roundBit = 1;
+ if (roundDigit === 5) {
+ roundBit = digits[lastDigit] % 2 === 1 ? 1 : 0;
+ for (let i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if (parseInt(representation[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+ if (roundBit) {
+ let dIdx = lastDigit;
+ for (; dIdx >= 0; dIdx--) {
+ if (++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+ if (dIdx === 0) {
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ }
+ else {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ }
+ }
+ else {
+ break;
+ }
+ }
+ }
+ }
+ }
+ else {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ if (lastDigit === 0) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MIN;
+ break;
+ }
+ invalidErr(representation, 'exponent underflow');
+ }
+ if (nDigitsStored < nDigits) {
+ if (representation[nDigits - 1 + Number(sawSign) + Number(sawRadix)] !== '0' &&
+ significantDigits !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ nDigits = nDigits - 1;
+ }
+ else {
+ if (digits[lastDigit] !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ lastDigit = lastDigit - 1;
+ }
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ }
+ else {
+ invalidErr(representation, 'overflow');
+ }
+ }
+ if (lastDigit + 1 < significantDigits) {
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ }
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ }
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ if (roundDigit !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ }
+ }
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ if (significantDigits === 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ }
+ else if (lastDigit < 17) {
+ let dIdx = 0;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ else {
+ let dIdx = 0;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+ const significand = multiply64x2(significandHigh, Long.fromString('100000000000000000'));
+ significand.low = significand.low.add(significandLow);
+ if (lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+ biasedExponent = exponent + EXPONENT_BIAS;
+ const dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+ if (significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber(1))) {
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47)));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ }
+ else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+ dec.low = significand.low;
+ if (isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+ const buffer = ByteUtils.allocateUnsafe(16);
+ index = 0;
+ buffer[index++] = dec.low.low & 0xff;
+ buffer[index++] = (dec.low.low >> 8) & 0xff;
+ buffer[index++] = (dec.low.low >> 16) & 0xff;
+ buffer[index++] = (dec.low.low >> 24) & 0xff;
+ buffer[index++] = dec.low.high & 0xff;
+ buffer[index++] = (dec.low.high >> 8) & 0xff;
+ buffer[index++] = (dec.low.high >> 16) & 0xff;
+ buffer[index++] = (dec.low.high >> 24) & 0xff;
+ buffer[index++] = dec.high.low & 0xff;
+ buffer[index++] = (dec.high.low >> 8) & 0xff;
+ buffer[index++] = (dec.high.low >> 16) & 0xff;
+ buffer[index++] = (dec.high.low >> 24) & 0xff;
+ buffer[index++] = dec.high.high & 0xff;
+ buffer[index++] = (dec.high.high >> 8) & 0xff;
+ buffer[index++] = (dec.high.high >> 16) & 0xff;
+ buffer[index++] = (dec.high.high >> 24) & 0xff;
+ return new Decimal128(buffer);
+ }
+ toString() {
+ let biased_exponent;
+ let significand_digits = 0;
+ const significand = new Array(36);
+ for (let i = 0; i < significand.length; i++)
+ significand[i] = 0;
+ let index = 0;
+ let is_zero = false;
+ let significand_msb;
+ let significand128 = { parts: [0, 0, 0, 0] };
+ let j, k;
+ const string = [];
+ index = 0;
+ const buffer = this.bytes;
+ const low = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midl = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const midh = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ const high = buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ index = 0;
+ const dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high)
+ };
+ if (dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+ const combination = (high >> 26) & COMBINATION_MASK;
+ if (combination >> 3 === 3) {
+ if (combination === COMBINATION_INFINITY) {
+ return string.join('') + 'Infinity';
+ }
+ else if (combination === COMBINATION_NAN) {
+ return 'NaN';
+ }
+ else {
+ biased_exponent = (high >> 15) & EXPONENT_MASK;
+ significand_msb = 0x08 + ((high >> 14) & 0x01);
+ }
+ }
+ else {
+ significand_msb = (high >> 14) & 0x07;
+ biased_exponent = (high >> 17) & EXPONENT_MASK;
+ }
+ const exponent = biased_exponent - EXPONENT_BIAS;
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+ if (significand128.parts[0] === 0 &&
+ significand128.parts[1] === 0 &&
+ significand128.parts[2] === 0 &&
+ significand128.parts[3] === 0) {
+ is_zero = true;
+ }
+ else {
+ for (k = 3; k >= 0; k--) {
+ let least_digits = 0;
+ const result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low;
+ if (!least_digits)
+ continue;
+ for (j = 8; j >= 0; j--) {
+ significand[k * 9 + j] = least_digits % 10;
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+ if (is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ }
+ else {
+ significand_digits = 36;
+ while (!significand[index]) {
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+ const scientific_exponent = significand_digits - 1 + exponent;
+ if (scientific_exponent >= 34 || scientific_exponent <= -7 || exponent > 0) {
+ if (significand_digits > 34) {
+ string.push(`${0}`);
+ if (exponent > 0)
+ string.push(`E+${exponent}`);
+ else if (exponent < 0)
+ string.push(`E${exponent}`);
+ return string.join('');
+ }
+ string.push(`${significand[index++]}`);
+ significand_digits = significand_digits - 1;
+ if (significand_digits) {
+ string.push('.');
+ }
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ string.push('E');
+ if (scientific_exponent > 0) {
+ string.push(`+${scientific_exponent}`);
+ }
+ else {
+ string.push(`${scientific_exponent}`);
+ }
+ }
+ else {
+ if (exponent >= 0) {
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ let radix_position = significand_digits + exponent;
+ if (radix_position > 0) {
+ for (let i = 0; i < radix_position; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ else {
+ string.push('0');
+ }
+ string.push('.');
+ while (radix_position++ < 0) {
+ string.push('0');
+ }
+ for (let i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ }
+ return string.join('');
+ }
+ toJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ toExtendedJSON() {
+ return { $numberDecimal: this.toString() };
+ }
+ static fromExtendedJSON(doc) {
+ return Decimal128.fromString(doc.$numberDecimal);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const d128string = inspect(this.toString(), options);
+ return `new Decimal128(${d128string})`;
+ }
+}
+
+class Double extends BSONValue {
+ get _bsontype() {
+ return 'Double';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value;
+ }
+ static fromString(value) {
+ const coercedValue = Number(value);
+ if (value === 'NaN')
+ return new Double(NaN);
+ if (value === 'Infinity')
+ return new Double(Infinity);
+ if (value === '-Infinity')
+ return new Double(-Infinity);
+ if (!Number.isFinite(coercedValue)) {
+ throw new BSONError(`Input: ${value} is not representable as a Double`);
+ }
+ if (value.trim() !== value) {
+ throw new BSONError(`Input: '${value}' contains whitespace`);
+ }
+ if (value === '') {
+ throw new BSONError(`Input is an empty string`);
+ }
+ if (/[^-0-9.+eE]/.test(value)) {
+ throw new BSONError(`Input: '${value}' is not in decimal or exponential notation`);
+ }
+ return new Double(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toExtendedJSON(options) {
+ if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
+ return this.value;
+ }
+ if (Object.is(Math.sign(this.value), -0)) {
+ return { $numberDouble: '-0.0' };
+ }
+ return {
+ $numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
+ };
+ }
+ static fromExtendedJSON(doc, options) {
+ const doubleValue = parseFloat(doc.$numberDouble);
+ return options && options.relaxed ? doubleValue : new Double(doubleValue);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Double(${inspect(this.value, options)})`;
+ }
+}
+
+class Int32 extends BSONValue {
+ get _bsontype() {
+ return 'Int32';
+ }
+ constructor(value) {
+ super();
+ if (value instanceof Number) {
+ value = value.valueOf();
+ }
+ this.value = +value | 0;
+ }
+ static fromString(value) {
+ const cleanedValue = removeLeadingZerosAndExplicitPlus(value);
+ const coercedValue = Number(value);
+ if (BSON_INT32_MAX < coercedValue) {
+ throw new BSONError(`Input: '${value}' is larger than the maximum value for Int32`);
+ }
+ else if (BSON_INT32_MIN > coercedValue) {
+ throw new BSONError(`Input: '${value}' is smaller than the minimum value for Int32`);
+ }
+ else if (!Number.isSafeInteger(coercedValue)) {
+ throw new BSONError(`Input: '${value}' is not a safe integer`);
+ }
+ else if (coercedValue.toString() !== cleanedValue) {
+ throw new BSONError(`Input: '${value}' is not a valid Int32 string`);
+ }
+ return new Int32(coercedValue);
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString(radix) {
+ return this.value.toString(radix);
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON(options) {
+ if (options && (options.relaxed || options.legacy))
+ return this.value;
+ return { $numberInt: this.value.toString() };
+ }
+ static fromExtendedJSON(doc, options) {
+ return options && options.relaxed ? parseInt(doc.$numberInt, 10) : new Int32(doc.$numberInt);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new Int32(${inspect(this.value, options)})`;
+ }
+}
+
+class MaxKey extends BSONValue {
+ get _bsontype() {
+ return 'MaxKey';
+ }
+ toExtendedJSON() {
+ return { $maxKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MaxKey();
+ }
+ inspect() {
+ return 'new MaxKey()';
+ }
+}
+
+class MinKey extends BSONValue {
+ get _bsontype() {
+ return 'MinKey';
+ }
+ toExtendedJSON() {
+ return { $minKey: 1 };
+ }
+ static fromExtendedJSON() {
+ return new MinKey();
+ }
+ inspect() {
+ return 'new MinKey()';
+ }
+}
+
+const FLOAT = new Float64Array(1);
+const FLOAT_BYTES = new Uint8Array(FLOAT.buffer, 0, 8);
+FLOAT[0] = -1;
+const isBigEndian = FLOAT_BYTES[7] === 0;
+const NumberUtils = {
+ getNonnegativeInt32LE(source, offset) {
+ if (source[offset + 3] > 127) {
+ throw new RangeError(`Size cannot be negative at offset: ${offset}`);
+ }
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getInt32LE(source, offset) {
+ return (source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24));
+ },
+ getUint32LE(source, offset) {
+ return (source[offset] +
+ source[offset + 1] * 256 +
+ source[offset + 2] * 65536 +
+ source[offset + 3] * 16777216);
+ },
+ getUint32BE(source, offset) {
+ return (source[offset + 3] +
+ source[offset + 2] * 256 +
+ source[offset + 1] * 65536 +
+ source[offset] * 16777216);
+ },
+ getBigInt64LE(source, offset) {
+ const lo = NumberUtils.getUint32LE(source, offset);
+ const hi = NumberUtils.getUint32LE(source, offset + 4);
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo);
+ },
+ getFloat64LE: isBigEndian
+ ? (source, offset) => {
+ FLOAT_BYTES[7] = source[offset];
+ FLOAT_BYTES[6] = source[offset + 1];
+ FLOAT_BYTES[5] = source[offset + 2];
+ FLOAT_BYTES[4] = source[offset + 3];
+ FLOAT_BYTES[3] = source[offset + 4];
+ FLOAT_BYTES[2] = source[offset + 5];
+ FLOAT_BYTES[1] = source[offset + 6];
+ FLOAT_BYTES[0] = source[offset + 7];
+ return FLOAT[0];
+ }
+ : (source, offset) => {
+ FLOAT_BYTES[0] = source[offset];
+ FLOAT_BYTES[1] = source[offset + 1];
+ FLOAT_BYTES[2] = source[offset + 2];
+ FLOAT_BYTES[3] = source[offset + 3];
+ FLOAT_BYTES[4] = source[offset + 4];
+ FLOAT_BYTES[5] = source[offset + 5];
+ FLOAT_BYTES[6] = source[offset + 6];
+ FLOAT_BYTES[7] = source[offset + 7];
+ return FLOAT[0];
+ },
+ setInt32BE(destination, offset, value) {
+ destination[offset + 3] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset] = value;
+ return 4;
+ },
+ setInt32LE(destination, offset, value) {
+ destination[offset] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 3] = value;
+ return 4;
+ },
+ setBigInt64LE(destination, offset, value) {
+ const mask32bits = BigInt(4294967295);
+ let lo = Number(value & mask32bits);
+ destination[offset] = lo;
+ lo >>= 8;
+ destination[offset + 1] = lo;
+ lo >>= 8;
+ destination[offset + 2] = lo;
+ lo >>= 8;
+ destination[offset + 3] = lo;
+ let hi = Number((value >> BigInt(32)) & mask32bits);
+ destination[offset + 4] = hi;
+ hi >>= 8;
+ destination[offset + 5] = hi;
+ hi >>= 8;
+ destination[offset + 6] = hi;
+ hi >>= 8;
+ destination[offset + 7] = hi;
+ return 8;
+ },
+ setFloat64LE: isBigEndian
+ ? (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[7];
+ destination[offset + 1] = FLOAT_BYTES[6];
+ destination[offset + 2] = FLOAT_BYTES[5];
+ destination[offset + 3] = FLOAT_BYTES[4];
+ destination[offset + 4] = FLOAT_BYTES[3];
+ destination[offset + 5] = FLOAT_BYTES[2];
+ destination[offset + 6] = FLOAT_BYTES[1];
+ destination[offset + 7] = FLOAT_BYTES[0];
+ return 8;
+ }
+ : (destination, offset, value) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[0];
+ destination[offset + 1] = FLOAT_BYTES[1];
+ destination[offset + 2] = FLOAT_BYTES[2];
+ destination[offset + 3] = FLOAT_BYTES[3];
+ destination[offset + 4] = FLOAT_BYTES[4];
+ destination[offset + 5] = FLOAT_BYTES[5];
+ destination[offset + 6] = FLOAT_BYTES[6];
+ destination[offset + 7] = FLOAT_BYTES[7];
+ return 8;
+ }
+};
+
+const checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');
+let PROCESS_UNIQUE = null;
+class ObjectId extends BSONValue {
+ get _bsontype() {
+ return 'ObjectId';
+ }
+ constructor(inputId) {
+ super();
+ let workingId;
+ if (typeof inputId === 'object' && inputId && 'id' in inputId) {
+ if (typeof inputId.id !== 'string' && !ArrayBuffer.isView(inputId.id)) {
+ throw new BSONError('Argument passed in must have an id that is of type string or Buffer');
+ }
+ if ('toHexString' in inputId && typeof inputId.toHexString === 'function') {
+ workingId = ByteUtils.fromHex(inputId.toHexString());
+ }
+ else {
+ workingId = inputId.id;
+ }
+ }
+ else {
+ workingId = inputId;
+ }
+ if (workingId == null || typeof workingId === 'number') {
+ this.buffer = ObjectId.generate(typeof workingId === 'number' ? workingId : undefined);
+ }
+ else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
+ this.buffer = ByteUtils.toLocalBufferType(workingId);
+ }
+ else if (typeof workingId === 'string') {
+ if (workingId.length === 24 && checkForHexRegExp.test(workingId)) {
+ this.buffer = ByteUtils.fromHex(workingId);
+ }
+ else {
+ throw new BSONError('input must be a 24 character hex string, 12 byte Uint8Array, or an integer');
+ }
+ }
+ else {
+ throw new BSONError('Argument passed in does not match the accepted types');
+ }
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(this.id);
+ }
+ }
+ get id() {
+ return this.buffer;
+ }
+ set id(value) {
+ this.buffer = value;
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(value);
+ }
+ }
+ toHexString() {
+ if (ObjectId.cacheHexString && this.__id) {
+ return this.__id;
+ }
+ const hexString = ByteUtils.toHex(this.id);
+ if (ObjectId.cacheHexString && !this.__id) {
+ this.__id = hexString;
+ }
+ return hexString;
+ }
+ static getInc() {
+ return (ObjectId.index = (ObjectId.index + 1) % 0xffffff);
+ }
+ static generate(time) {
+ if ('number' !== typeof time) {
+ time = Math.floor(Date.now() / 1000);
+ }
+ const inc = ObjectId.getInc();
+ const buffer = ByteUtils.allocateUnsafe(12);
+ NumberUtils.setInt32BE(buffer, 0, time);
+ if (PROCESS_UNIQUE === null) {
+ PROCESS_UNIQUE = ByteUtils.randomBytes(5);
+ }
+ buffer[4] = PROCESS_UNIQUE[0];
+ buffer[5] = PROCESS_UNIQUE[1];
+ buffer[6] = PROCESS_UNIQUE[2];
+ buffer[7] = PROCESS_UNIQUE[3];
+ buffer[8] = PROCESS_UNIQUE[4];
+ buffer[11] = inc & 0xff;
+ buffer[10] = (inc >> 8) & 0xff;
+ buffer[9] = (inc >> 16) & 0xff;
+ return buffer;
+ }
+ toString(encoding) {
+ if (encoding === 'base64')
+ return ByteUtils.toBase64(this.id);
+ if (encoding === 'hex')
+ return this.toHexString();
+ return this.toHexString();
+ }
+ toJSON() {
+ return this.toHexString();
+ }
+ static is(variable) {
+ return (variable != null &&
+ typeof variable === 'object' &&
+ '_bsontype' in variable &&
+ variable._bsontype === 'ObjectId');
+ }
+ equals(otherId) {
+ if (otherId === undefined || otherId === null) {
+ return false;
+ }
+ if (ObjectId.is(otherId)) {
+ return (this.buffer[11] === otherId.buffer[11] && ByteUtils.equals(this.buffer, otherId.buffer));
+ }
+ if (typeof otherId === 'string') {
+ return otherId.toLowerCase() === this.toHexString();
+ }
+ if (typeof otherId === 'object' && typeof otherId.toHexString === 'function') {
+ const otherIdString = otherId.toHexString();
+ const thisIdString = this.toHexString();
+ return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
+ }
+ return false;
+ }
+ getTimestamp() {
+ const timestamp = new Date();
+ const time = NumberUtils.getUint32BE(this.buffer, 0);
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+ }
+ static createPk() {
+ return new ObjectId();
+ }
+ serializeInto(uint8array, index) {
+ uint8array[index] = this.buffer[0];
+ uint8array[index + 1] = this.buffer[1];
+ uint8array[index + 2] = this.buffer[2];
+ uint8array[index + 3] = this.buffer[3];
+ uint8array[index + 4] = this.buffer[4];
+ uint8array[index + 5] = this.buffer[5];
+ uint8array[index + 6] = this.buffer[6];
+ uint8array[index + 7] = this.buffer[7];
+ uint8array[index + 8] = this.buffer[8];
+ uint8array[index + 9] = this.buffer[9];
+ uint8array[index + 10] = this.buffer[10];
+ uint8array[index + 11] = this.buffer[11];
+ return 12;
+ }
+ static createFromTime(time) {
+ const buffer = ByteUtils.allocate(12);
+ for (let i = 11; i >= 4; i--)
+ buffer[i] = 0;
+ NumberUtils.setInt32BE(buffer, 0, time);
+ return new ObjectId(buffer);
+ }
+ static createFromHexString(hexString) {
+ if (hexString?.length !== 24) {
+ throw new BSONError('hex string must be 24 characters');
+ }
+ return new ObjectId(ByteUtils.fromHex(hexString));
+ }
+ static createFromBase64(base64) {
+ if (base64?.length !== 16) {
+ throw new BSONError('base64 string must be 16 characters');
+ }
+ return new ObjectId(ByteUtils.fromBase64(base64));
+ }
+ static isValid(id) {
+ if (id == null)
+ return false;
+ try {
+ new ObjectId(id);
+ return true;
+ }
+ catch {
+ return false;
+ }
+ }
+ toExtendedJSON() {
+ if (this.toHexString)
+ return { $oid: this.toHexString() };
+ return { $oid: this.toString('hex') };
+ }
+ static fromExtendedJSON(doc) {
+ return new ObjectId(doc.$oid);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new ObjectId(${inspect(this.toHexString(), options)})`;
+ }
+}
+ObjectId.index = Math.floor(Math.random() * 0xffffff);
+
+function internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined) {
+ let totalLength = 4 + 1;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions, true, ignoreUndefined);
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ }
+ for (const key of Object.keys(object)) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined);
+ }
+ }
+ return totalLength;
+}
+function calculateElement(name, value, serializeFunctions = false, isArray = false, ignoreUndefined = false) {
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ switch (typeof value) {
+ case 'string':
+ return 1 + ByteUtils.utf8ByteLength(name) + 1 + 4 + ByteUtils.utf8ByteLength(value) + 1;
+ case 'number':
+ if (Math.floor(value) === value &&
+ value >= JS_INT_MIN &&
+ value <= JS_INT_MAX) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (4 + 1);
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ }
+ else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if (isArray || !ignoreUndefined)
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ return 0;
+ case 'boolean':
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 1);
+ case 'object':
+ if (value != null &&
+ typeof value._bsontype === 'string' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value == null || value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ }
+ else if (value._bsontype === 'ObjectId') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (12 + 1);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (ArrayBuffer.isView(value) ||
+ value instanceof ArrayBuffer ||
+ isAnyArrayBuffer(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 4 + 1) + value.byteLength);
+ }
+ else if (value._bsontype === 'Long' ||
+ value._bsontype === 'Double' ||
+ value._bsontype === 'Timestamp') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (16 + 1);
+ }
+ else if (value._bsontype === 'Code') {
+ if (value.scope != null && Object.keys(value.scope).length > 0) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1 +
+ internalCalculateObjectSize(value.scope, serializeFunctions, ignoreUndefined));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1);
+ }
+ }
+ else if (value._bsontype === 'Binary') {
+ const binary = value;
+ if (binary.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ (binary.position + 1 + 4 + 1 + 4));
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (binary.position + 1 + 4 + 1));
+ }
+ }
+ else if (value._bsontype === 'Symbol') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ ByteUtils.utf8ByteLength(value.value) +
+ 4 +
+ 1 +
+ 1);
+ }
+ else if (value._bsontype === 'DBRef') {
+ const ordered_values = Object.assign({
+ $ref: value.collection,
+ $id: value.oid
+ }, value.fields);
+ if (value.db != null) {
+ ordered_values['$db'] = value.db;
+ }
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ internalCalculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined));
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.source) +
+ 1 +
+ (value.global ? 1 : 0) +
+ (value.ignoreCase ? 1 : 0) +
+ (value.multiline ? 1 : 0) +
+ 1);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.pattern) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.options) +
+ 1);
+ }
+ else {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ internalCalculateObjectSize(value, serializeFunctions, ignoreUndefined) +
+ 1);
+ }
+ case 'function':
+ if (serializeFunctions) {
+ return ((name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.toString()) +
+ 1);
+ }
+ }
+ return 0;
+}
+
+function alphabetize(str) {
+ return str.split('').sort().join('');
+}
+class BSONRegExp extends BSONValue {
+ get _bsontype() {
+ return 'BSONRegExp';
+ }
+ constructor(pattern, options) {
+ super();
+ this.pattern = pattern;
+ this.options = alphabetize(options ?? '');
+ if (this.pattern.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);
+ }
+ if (this.options.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);
+ }
+ for (let i = 0; i < this.options.length; i++) {
+ if (!(this.options[i] === 'i' ||
+ this.options[i] === 'm' ||
+ this.options[i] === 'x' ||
+ this.options[i] === 'l' ||
+ this.options[i] === 's' ||
+ this.options[i] === 'u')) {
+ throw new BSONError(`The regular expression option [${this.options[i]}] is not supported`);
+ }
+ }
+ }
+ static parseOptions(options) {
+ return options ? options.split('').sort().join('') : '';
+ }
+ toExtendedJSON(options) {
+ options = options || {};
+ if (options.legacy) {
+ return { $regex: this.pattern, $options: this.options };
+ }
+ return { $regularExpression: { pattern: this.pattern, options: this.options } };
+ }
+ static fromExtendedJSON(doc) {
+ if ('$regex' in doc) {
+ if (typeof doc.$regex !== 'string') {
+ if (doc.$regex._bsontype === 'BSONRegExp') {
+ return doc;
+ }
+ }
+ else {
+ return new BSONRegExp(doc.$regex, BSONRegExp.parseOptions(doc.$options));
+ }
+ }
+ if ('$regularExpression' in doc) {
+ return new BSONRegExp(doc.$regularExpression.pattern, BSONRegExp.parseOptions(doc.$regularExpression.options));
+ }
+ throw new BSONError(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(doc)}`);
+ }
+ inspect(depth, options, inspect) {
+ const stylize = getStylizeFunction(options) ?? (v => v);
+ inspect ??= defaultInspect;
+ const pattern = stylize(inspect(this.pattern), 'regexp');
+ const flags = stylize(inspect(this.options), 'regexp');
+ return `new BSONRegExp(${pattern}, ${flags})`;
+ }
+}
+
+class BSONSymbol extends BSONValue {
+ get _bsontype() {
+ return 'BSONSymbol';
+ }
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+ valueOf() {
+ return this.value;
+ }
+ toString() {
+ return this.value;
+ }
+ toJSON() {
+ return this.value;
+ }
+ toExtendedJSON() {
+ return { $symbol: this.value };
+ }
+ static fromExtendedJSON(doc) {
+ return new BSONSymbol(doc.$symbol);
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ return `new BSONSymbol(${inspect(this.value, options)})`;
+ }
+}
+
+const LongWithoutOverridesClass = Long;
+class Timestamp extends LongWithoutOverridesClass {
+ get _bsontype() {
+ return 'Timestamp';
+ }
+ constructor(low) {
+ if (low == null) {
+ super(0, 0, true);
+ }
+ else if (typeof low === 'bigint') {
+ super(low, true);
+ }
+ else if (Long.isLong(low)) {
+ super(low.low, low.high, true);
+ }
+ else if (typeof low === 'object' && 't' in low && 'i' in low) {
+ if (typeof low.t !== 'number' && (typeof low.t !== 'object' || low.t._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t as a number');
+ }
+ if (typeof low.i !== 'number' && (typeof low.i !== 'object' || low.i._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i as a number');
+ }
+ const t = Number(low.t);
+ const i = Number(low.i);
+ if (t < 0 || Number.isNaN(t)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive t');
+ }
+ if (i < 0 || Number.isNaN(i)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive i');
+ }
+ if (t > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t equal or less than uint32 max');
+ }
+ if (i > 4294967295) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i equal or less than uint32 max');
+ }
+ super(i, t, true);
+ }
+ else {
+ throw new BSONError('A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }');
+ }
+ }
+ toJSON() {
+ return {
+ $timestamp: this.toString()
+ };
+ }
+ static fromInt(value) {
+ return new Timestamp(Long.fromInt(value, true));
+ }
+ static fromNumber(value) {
+ return new Timestamp(Long.fromNumber(value, true));
+ }
+ static fromBits(lowBits, highBits) {
+ return new Timestamp({ i: lowBits, t: highBits });
+ }
+ static fromString(str, optRadix) {
+ return new Timestamp(Long.fromString(str, true, optRadix));
+ }
+ toExtendedJSON() {
+ return { $timestamp: { t: this.high >>> 0, i: this.low >>> 0 } };
+ }
+ static fromExtendedJSON(doc) {
+ const i = Long.isLong(doc.$timestamp.i)
+ ? doc.$timestamp.i.getLowBitsUnsigned()
+ : doc.$timestamp.i;
+ const t = Long.isLong(doc.$timestamp.t)
+ ? doc.$timestamp.t.getLowBitsUnsigned()
+ : doc.$timestamp.t;
+ return new Timestamp({ t, i });
+ }
+ inspect(depth, options, inspect) {
+ inspect ??= defaultInspect;
+ const t = inspect(this.high >>> 0, options);
+ const i = inspect(this.low >>> 0, options);
+ return `new Timestamp({ t: ${t}, i: ${i} })`;
+ }
+}
+Timestamp.MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
+
+const JS_INT_MAX_LONG = Long.fromNumber(JS_INT_MAX);
+const JS_INT_MIN_LONG = Long.fromNumber(JS_INT_MIN);
+function internalDeserialize(buffer, options, isArray) {
+ options = options == null ? {} : options;
+ const index = options && options.index ? options.index : 0;
+ const size = NumberUtils.getInt32LE(buffer, index);
+ if (size < 5) {
+ throw new BSONError(`bson size must be >= 5, is ${size}`);
+ }
+ if (options.allowObjectSmallerThanBufferSize && buffer.length < size) {
+ throw new BSONError(`buffer length ${buffer.length} must be >= bson size ${size}`);
+ }
+ if (!options.allowObjectSmallerThanBufferSize && buffer.length !== size) {
+ throw new BSONError(`buffer length ${buffer.length} must === bson size ${size}`);
+ }
+ if (size + index > buffer.byteLength) {
+ throw new BSONError(`(bson size ${size} + options.index ${index} must be <= buffer length ${buffer.byteLength})`);
+ }
+ if (buffer[index + size - 1] !== 0) {
+ throw new BSONError("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+ return deserializeObject(buffer, index, options, isArray);
+}
+const allowedDBRefKeys = /^\$ref$|^\$id$|^\$db$/;
+function deserializeObject(buffer, index, options, isArray = false) {
+ const fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+ const raw = options['raw'] == null ? false : options['raw'];
+ const bsonRegExp = typeof options['bsonRegExp'] === 'boolean' ? options['bsonRegExp'] : false;
+ const promoteBuffers = options.promoteBuffers ?? false;
+ const promoteLongs = options.promoteLongs ?? true;
+ const promoteValues = options.promoteValues ?? true;
+ const useBigInt64 = options.useBigInt64 ?? false;
+ if (useBigInt64 && !promoteValues) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ if (useBigInt64 && !promoteLongs) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+ const validation = options.validation == null ? { utf8: true } : options.validation;
+ let globalUTFValidation = true;
+ let validationSetting;
+ let utf8KeysSet;
+ const utf8ValidatedKeys = validation.utf8;
+ if (typeof utf8ValidatedKeys === 'boolean') {
+ validationSetting = utf8ValidatedKeys;
+ }
+ else {
+ globalUTFValidation = false;
+ const utf8ValidationValues = Object.keys(utf8ValidatedKeys).map(function (key) {
+ return utf8ValidatedKeys[key];
+ });
+ if (utf8ValidationValues.length === 0) {
+ throw new BSONError('UTF-8 validation setting cannot be empty');
+ }
+ if (typeof utf8ValidationValues[0] !== 'boolean') {
+ throw new BSONError('Invalid UTF-8 validation option, must specify boolean values');
+ }
+ validationSetting = utf8ValidationValues[0];
+ if (!utf8ValidationValues.every(item => item === validationSetting)) {
+ throw new BSONError('Invalid UTF-8 validation option - keys must be all true or all false');
+ }
+ }
+ if (!globalUTFValidation) {
+ utf8KeysSet = new Set();
+ for (const key of Object.keys(utf8ValidatedKeys)) {
+ utf8KeysSet.add(key);
+ }
+ }
+ const startIndex = index;
+ if (buffer.length < 5)
+ throw new BSONError('corrupt bson message < 5 bytes long');
+ const size = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (size < 5 || size > buffer.length)
+ throw new BSONError('corrupt bson message');
+ const object = isArray ? [] : {};
+ let arrayIndex = 0;
+ const done = false;
+ let isPossibleDBRef = isArray ? false : null;
+ while (!done) {
+ const elementType = buffer[index++];
+ if (elementType === 0)
+ break;
+ let i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.byteLength)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const name = isArray ? arrayIndex++ : ByteUtils.toUTF8(buffer, index, i, false);
+ let shouldValidateKey = true;
+ if (globalUTFValidation || utf8KeysSet?.has(name)) {
+ shouldValidateKey = validationSetting;
+ }
+ else {
+ shouldValidateKey = !validationSetting;
+ }
+ if (isPossibleDBRef !== false && name[0] === '$') {
+ isPossibleDBRef = allowedDBRefKeys.test(name);
+ }
+ let value;
+ index = i + 1;
+ if (elementType === BSON_DATA_STRING) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ value = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_OID) {
+ const oid = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oid[i] = buffer[index + i];
+ value = new ObjectId(oid);
+ index = index + 12;
+ }
+ else if (elementType === BSON_DATA_INT && promoteValues === false) {
+ value = new Int32(NumberUtils.getInt32LE(buffer, index));
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_INT) {
+ value = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ }
+ else if (elementType === BSON_DATA_NUMBER) {
+ value = NumberUtils.getFloat64LE(buffer, index);
+ index += 8;
+ if (promoteValues === false)
+ value = new Double(value);
+ }
+ else if (elementType === BSON_DATA_DATE) {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ value = new Date(new Long(lowBits, highBits).toNumber());
+ }
+ else if (elementType === BSON_DATA_BOOLEAN) {
+ if (buffer[index] !== 0 && buffer[index] !== 1)
+ throw new BSONError('illegal boolean type value');
+ value = buffer[index++] === 1;
+ }
+ else if (elementType === BSON_DATA_OBJECT) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ if (objectSize <= 0 || objectSize > buffer.length - index)
+ throw new BSONError('bad embedded document length in bson');
+ if (raw) {
+ value = buffer.slice(index, index + objectSize);
+ }
+ else {
+ let objectOptions = options;
+ if (!globalUTFValidation) {
+ objectOptions = { ...options, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, objectOptions, false);
+ }
+ index = index + objectSize;
+ }
+ else if (elementType === BSON_DATA_ARRAY) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ let arrayOptions = options;
+ const stopIndex = index + objectSize;
+ if (fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = { ...options, raw: true };
+ }
+ if (!globalUTFValidation) {
+ arrayOptions = { ...arrayOptions, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+ if (buffer[index - 1] !== 0)
+ throw new BSONError('invalid array terminator byte');
+ if (index !== stopIndex)
+ throw new BSONError('corrupted array bson');
+ }
+ else if (elementType === BSON_DATA_UNDEFINED) {
+ value = undefined;
+ }
+ else if (elementType === BSON_DATA_NULL) {
+ value = null;
+ }
+ else if (elementType === BSON_DATA_LONG) {
+ if (useBigInt64) {
+ value = NumberUtils.getBigInt64LE(buffer, index);
+ index += 8;
+ }
+ else {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+ const long = new Long(lowBits, highBits);
+ if (promoteLongs && promoteValues === true) {
+ value =
+ long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG)
+ ? long.toNumber()
+ : long;
+ }
+ else {
+ value = long;
+ }
+ }
+ }
+ else if (elementType === BSON_DATA_DECIMAL128) {
+ const bytes = ByteUtils.allocateUnsafe(16);
+ for (let i = 0; i < 16; i++)
+ bytes[i] = buffer[index + i];
+ index = index + 16;
+ value = new Decimal128(bytes);
+ }
+ else if (elementType === BSON_DATA_BINARY) {
+ let binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ const totalBinarySize = binarySize;
+ const subType = buffer[index++];
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found');
+ if (binarySize > buffer.byteLength)
+ throw new BSONError('Binary type size larger than document size');
+ if (buffer['slice'] != null) {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.toLocalBufferType(buffer.slice(index, index + binarySize));
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ else {
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.allocateUnsafe(binarySize);
+ for (i = 0; i < binarySize; i++) {
+ value[i] = buffer[index + i];
+ }
+ }
+ else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+ index = index + binarySize;
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === false) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ const optionsArray = new Array(regExpOptions.length);
+ for (i = 0; i < regExpOptions.length; i++) {
+ switch (regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+ value = new RegExp(source, optionsArray.join(''));
+ }
+ else if (elementType === BSON_DATA_REGEXP && bsonRegExp === true) {
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ i = index;
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ if (i >= buffer.length)
+ throw new BSONError('Bad BSON Document: illegal CString');
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+ value = new BSONRegExp(source, regExpOptions);
+ }
+ else if (elementType === BSON_DATA_SYMBOL) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const symbol = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = promoteValues ? symbol : new BSONSymbol(symbol);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_TIMESTAMP) {
+ value = new Timestamp({
+ i: NumberUtils.getUint32LE(buffer, index),
+ t: NumberUtils.getUint32LE(buffer, index + 4)
+ });
+ index += 8;
+ }
+ else if (elementType === BSON_DATA_MIN_KEY) {
+ value = new MinKey();
+ }
+ else if (elementType === BSON_DATA_MAX_KEY) {
+ value = new MaxKey();
+ }
+ else if (elementType === BSON_DATA_CODE) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = new Code(functionString);
+ index = index + stringSize;
+ }
+ else if (elementType === BSON_DATA_CODE_W_SCOPE) {
+ const totalSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (totalSize < 4 + 4 + 4 + 1) {
+ throw new BSONError('code_w_scope total size shorter minimum expected length');
+ }
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ const scopeObject = deserializeObject(buffer, _index, options, false);
+ index = index + objectSize;
+ if (totalSize < 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too short, truncating scope');
+ }
+ if (totalSize > 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too long, clips outer document');
+ }
+ value = new Code(functionString, scopeObject);
+ }
+ else if (elementType === BSON_DATA_DBPOINTER) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0)
+ throw new BSONError('bad string length in bson');
+ const namespace = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ const oidBuffer = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++)
+ oidBuffer[i] = buffer[index + i];
+ const oid = new ObjectId(oidBuffer);
+ index = index + 12;
+ value = new DBRef(namespace, oid);
+ }
+ else {
+ throw new BSONError(`Detected unknown BSON type ${elementType.toString(16)} for fieldname "${name}"`);
+ }
+ if (name === '__proto__') {
+ Object.defineProperty(object, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ object[name] = value;
+ }
+ }
+ if (size !== index - startIndex) {
+ if (isArray)
+ throw new BSONError('corrupt array bson');
+ throw new BSONError('corrupt object bson');
+ }
+ if (!isPossibleDBRef)
+ return object;
+ if (isDBRefLike(object)) {
+ const copy = Object.assign({}, object);
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(object.$ref, object.$id, object.$db, copy);
+ }
+ return object;
+}
+
+const regexp = /\x00/;
+const ignoreKeys = new Set(['$db', '$ref', '$id', '$clusterTime']);
+function serializeString(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_STRING;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value, index + 4);
+ NumberUtils.setInt32LE(buffer, index, size + 1);
+ index = index + 4 + size;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeNumber(buffer, key, value, index) {
+ const isNegativeZero = Object.is(value, -0);
+ const type = !isNegativeZero &&
+ Number.isSafeInteger(value) &&
+ value <= BSON_INT32_MAX &&
+ value >= BSON_INT32_MIN
+ ? BSON_DATA_INT
+ : BSON_DATA_NUMBER;
+ buffer[index++] = type;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0x00;
+ if (type === BSON_DATA_INT) {
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ }
+ else {
+ index += NumberUtils.setFloat64LE(buffer, index, value);
+ }
+ return index;
+}
+function serializeBigInt(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_LONG;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index += numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setBigInt64LE(buffer, index, value);
+ return index;
+}
+function serializeNull(buffer, key, _, index) {
+ buffer[index++] = BSON_DATA_NULL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeBoolean(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BOOLEAN;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ buffer[index++] = value ? 1 : 0;
+ return index;
+}
+function serializeDate(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DATE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const dateInMilis = Long.fromNumber(value.getTime());
+ const lowBits = dateInMilis.getLowBits();
+ const highBits = dateInMilis.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw new BSONError('value ' + value.source + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.source, index);
+ buffer[index++] = 0x00;
+ if (value.ignoreCase)
+ buffer[index++] = 0x69;
+ if (value.global)
+ buffer[index++] = 0x73;
+ if (value.multiline)
+ buffer[index++] = 0x6d;
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeBSONRegExp(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_REGEXP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.pattern.match(regexp) != null) {
+ throw new BSONError('pattern ' + value.pattern + ' must not contain null bytes');
+ }
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.pattern, index);
+ buffer[index++] = 0x00;
+ const sortedOptions = value.options.split('').sort().join('');
+ index = index + ByteUtils.encodeUTF8Into(buffer, sortedOptions, index);
+ buffer[index++] = 0x00;
+ return index;
+}
+function serializeMinMax(buffer, key, value, index) {
+ if (value === null) {
+ buffer[index++] = BSON_DATA_NULL;
+ }
+ else if (value._bsontype === 'MinKey') {
+ buffer[index++] = BSON_DATA_MIN_KEY;
+ }
+ else {
+ buffer[index++] = BSON_DATA_MAX_KEY;
+ }
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeObjectId(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_OID;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += value.serializeInto(buffer, index);
+ return index;
+}
+function serializeBuffer(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = value.length;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = BSON_BINARY_SUBTYPE_DEFAULT;
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = value[i];
+ }
+ else {
+ buffer.set(value, index);
+ }
+ index = index + size;
+ return index;
+}
+function serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path.has(value)) {
+ throw new BSONError('Cannot convert circular structure to BSON');
+ }
+ path.add(value);
+ buffer[index++] = Array.isArray(value) ? BSON_DATA_ARRAY : BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const endIndex = serializeInto(buffer, value, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ path.delete(value);
+ return endIndex;
+}
+function serializeDecimal128(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_DECIMAL128;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ for (let i = 0; i < 16; i++)
+ buffer[index + i] = value.bytes[i];
+ return index + 16;
+}
+function serializeLong(buffer, key, value, index) {
+ buffer[index++] =
+ value._bsontype === 'Long' ? BSON_DATA_LONG : BSON_DATA_TIMESTAMP;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const lowBits = value.getLowBits();
+ const highBits = value.getHighBits();
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+function serializeInt32(buffer, key, value, index) {
+ value = value.valueOf();
+ buffer[index++] = BSON_DATA_INT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ return index;
+}
+function serializeDouble(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_NUMBER;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ index += NumberUtils.setFloat64LE(buffer, index, value.value);
+ return index;
+}
+function serializeFunction(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeCode(buffer, key, value, index, checkKeys = false, depth = 0, serializeFunctions = false, ignoreUndefined = true, path) {
+ if (value.scope && typeof value.scope === 'object') {
+ buffer[index++] = BSON_DATA_CODE_W_SCOPE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ const functionString = value.code;
+ index = index + 4;
+ const codeSize = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, codeSize);
+ buffer[index + 4 + codeSize - 1] = 0;
+ index = index + codeSize + 4;
+ const endIndex = serializeInto(buffer, value.scope, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ index = endIndex - 1;
+ const totalSize = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, startIndex, totalSize);
+ buffer[index++] = 0;
+ }
+ else {
+ buffer[index++] = BSON_DATA_CODE;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const functionString = value.code.toString();
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ }
+ return index;
+}
+function serializeBinary(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_BINARY;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const data = value.buffer;
+ let size = value.position;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY)
+ size = size + 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ buffer[index++] = value.sub_type;
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ }
+ if (size <= 16) {
+ for (let i = 0; i < size; i++)
+ buffer[index + i] = data[i];
+ }
+ else {
+ buffer.set(data, index);
+ }
+ index = index + value.position;
+ return index;
+}
+function serializeSymbol(buffer, key, value, index) {
+ buffer[index++] = BSON_DATA_SYMBOL;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const size = ByteUtils.encodeUTF8Into(buffer, value.value, index + 4) + 1;
+ NumberUtils.setInt32LE(buffer, index, size);
+ index = index + 4 + size - 1;
+ buffer[index++] = 0;
+ return index;
+}
+function serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path) {
+ buffer[index++] = BSON_DATA_OBJECT;
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ let startIndex = index;
+ let output = {
+ $ref: value.collection || value.namespace,
+ $id: value.oid
+ };
+ if (value.db != null) {
+ output.$db = value.db;
+ }
+ output = Object.assign(output, value.fields);
+ const endIndex = serializeInto(buffer, output, false, index, depth + 1, serializeFunctions, true, path);
+ const size = endIndex - startIndex;
+ startIndex += NumberUtils.setInt32LE(buffer, index, size);
+ return endIndex;
+}
+function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializeFunctions, ignoreUndefined, path) {
+ if (path == null) {
+ if (object == null) {
+ buffer[0] = 0x05;
+ buffer[1] = 0x00;
+ buffer[2] = 0x00;
+ buffer[3] = 0x00;
+ buffer[4] = 0x00;
+ return 5;
+ }
+ if (Array.isArray(object)) {
+ throw new BSONError('serialize does not support an array as the root input');
+ }
+ if (typeof object !== 'object') {
+ throw new BSONError('serialize does not support non-object as the root input');
+ }
+ else if ('_bsontype' in object && typeof object._bsontype === 'string') {
+ throw new BSONError(`BSON types cannot be serialized as a document`);
+ }
+ else if (isDate(object) ||
+ isRegExp(object) ||
+ isUint8Array(object) ||
+ isAnyArrayBuffer(object)) {
+ throw new BSONError(`date, regexp, typedarray, and arraybuffer cannot be BSON documents`);
+ }
+ path = new Set();
+ }
+ path.add(object);
+ let index = startingIndex + 4;
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ const key = `${i}`;
+ let value = object[i];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ if (typeof value === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (typeof value === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (typeof value === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (typeof value === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (typeof value === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else if (object instanceof Map || isMap(object)) {
+ const iterator = object.entries();
+ let done = false;
+ while (!done) {
+ const entry = iterator.next();
+ done = !!entry.done;
+ if (done)
+ continue;
+ const key = entry.value[0];
+ let value = entry.value[1];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === null || (value === undefined && ignoreUndefined === false)) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ else {
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ if (object != null && typeof object !== 'object') {
+ throw new BSONError('toBSON function did not return an object');
+ }
+ }
+ for (const key of Object.keys(object)) {
+ let value = object[key];
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+ const type = typeof value;
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ }
+ else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ }
+ else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ }
+ else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ }
+ else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ }
+ else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ }
+ else if (value === undefined) {
+ if (ignoreUndefined === false)
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ }
+ else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ }
+ else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ }
+ else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, path);
+ }
+ else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ }
+ else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ }
+ else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+ path.delete(object);
+ buffer[index++] = 0x00;
+ const size = index - startingIndex;
+ startingIndex += NumberUtils.setInt32LE(buffer, startingIndex, size);
+ return index;
+}
+
+function isBSONType(value) {
+ return (value != null &&
+ typeof value === 'object' &&
+ '_bsontype' in value &&
+ typeof value._bsontype === 'string');
+}
+const keysToCodecs = {
+ $oid: ObjectId,
+ $binary: Binary,
+ $uuid: Binary,
+ $symbol: BSONSymbol,
+ $numberInt: Int32,
+ $numberDecimal: Decimal128,
+ $numberDouble: Double,
+ $numberLong: Long,
+ $minKey: MinKey,
+ $maxKey: MaxKey,
+ $regex: BSONRegExp,
+ $regularExpression: BSONRegExp,
+ $timestamp: Timestamp
+};
+function deserializeValue(value, options = {}) {
+ if (typeof value === 'number') {
+ const in32BitRange = value <= BSON_INT32_MAX && value >= BSON_INT32_MIN;
+ const in64BitRange = value <= BSON_INT64_MAX && value >= BSON_INT64_MIN;
+ if (options.relaxed || options.legacy) {
+ return value;
+ }
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (in32BitRange) {
+ return new Int32(value);
+ }
+ if (in64BitRange) {
+ if (options.useBigInt64) {
+ return BigInt(value);
+ }
+ return Long.fromNumber(value);
+ }
+ }
+ return new Double(value);
+ }
+ if (value == null || typeof value !== 'object')
+ return value;
+ if (value.$undefined)
+ return null;
+ const keys = Object.keys(value).filter(k => k.startsWith('$') && value[k] != null);
+ for (let i = 0; i < keys.length; i++) {
+ const c = keysToCodecs[keys[i]];
+ if (c)
+ return c.fromExtendedJSON(value, options);
+ }
+ if (value.$date != null) {
+ const d = value.$date;
+ const date = new Date();
+ if (options.legacy) {
+ if (typeof d === 'number')
+ date.setTime(d);
+ else if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ else {
+ if (typeof d === 'string')
+ date.setTime(Date.parse(d));
+ else if (Long.isLong(d))
+ date.setTime(d.toNumber());
+ else if (typeof d === 'number' && options.relaxed)
+ date.setTime(d);
+ else if (typeof d === 'bigint')
+ date.setTime(Number(d));
+ else
+ throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ return date;
+ }
+ if (value.$code != null) {
+ const copy = Object.assign({}, value);
+ if (value.$scope) {
+ copy.$scope = deserializeValue(value.$scope);
+ }
+ return Code.fromExtendedJSON(value);
+ }
+ if (isDBRefLike(value) || value.$dbPointer) {
+ const v = value.$ref ? value : value.$dbPointer;
+ if (v instanceof DBRef)
+ return v;
+ const dollarKeys = Object.keys(v).filter(k => k.startsWith('$'));
+ let valid = true;
+ dollarKeys.forEach(k => {
+ if (['$ref', '$id', '$db'].indexOf(k) === -1)
+ valid = false;
+ });
+ if (valid)
+ return DBRef.fromExtendedJSON(v);
+ }
+ return value;
+}
+function serializeArray(array, options) {
+ return array.map((v, index) => {
+ options.seenObjects.push({ propertyName: `index ${index}`, obj: null });
+ try {
+ return serializeValue(v, options);
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ });
+}
+function getISOString(date) {
+ const isoStr = date.toISOString();
+ return date.getUTCMilliseconds() !== 0 ? isoStr : isoStr.slice(0, -5) + 'Z';
+}
+function serializeValue(value, options) {
+ if (value instanceof Map || isMap(value)) {
+ const obj = Object.create(null);
+ for (const [k, v] of value) {
+ if (typeof k !== 'string') {
+ throw new BSONError('Can only serialize maps with string keys');
+ }
+ obj[k] = v;
+ }
+ return serializeValue(obj, options);
+ }
+ if ((typeof value === 'object' || typeof value === 'function') && value !== null) {
+ const index = options.seenObjects.findIndex(entry => entry.obj === value);
+ if (index !== -1) {
+ const props = options.seenObjects.map(entry => entry.propertyName);
+ const leadingPart = props
+ .slice(0, index)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const alreadySeen = props[index];
+ const circularPart = ' -> ' +
+ props
+ .slice(index + 1, props.length - 1)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const current = props[props.length - 1];
+ const leadingSpace = ' '.repeat(leadingPart.length + alreadySeen.length / 2);
+ const dashes = '-'.repeat(circularPart.length + (alreadySeen.length + current.length) / 2 - 1);
+ throw new BSONError('Converting circular structure to EJSON:\n' +
+ ` ${leadingPart}${alreadySeen}${circularPart}${current}\n` +
+ ` ${leadingSpace}\\${dashes}/`);
+ }
+ options.seenObjects[options.seenObjects.length - 1].obj = value;
+ }
+ if (Array.isArray(value))
+ return serializeArray(value, options);
+ if (value === undefined)
+ return null;
+ if (value instanceof Date || isDate(value)) {
+ const dateNum = value.getTime(), inRange = dateNum > -1 && dateNum < 253402318800000;
+ if (options.legacy) {
+ return options.relaxed && inRange
+ ? { $date: value.getTime() }
+ : { $date: getISOString(value) };
+ }
+ return options.relaxed && inRange
+ ? { $date: getISOString(value) }
+ : { $date: { $numberLong: value.getTime().toString() } };
+ }
+ if (typeof value === 'number' && (!options.relaxed || !isFinite(value))) {
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return { $numberInt: value.toString() };
+ }
+ if (value >= BSON_INT64_MIN && value <= BSON_INT64_MAX) {
+ return { $numberLong: value.toString() };
+ }
+ }
+ return { $numberDouble: Object.is(value, -0) ? '-0.0' : value.toString() };
+ }
+ if (typeof value === 'bigint') {
+ if (!options.relaxed) {
+ return { $numberLong: BigInt.asIntN(64, value).toString() };
+ }
+ return Number(BigInt.asIntN(64, value));
+ }
+ if (value instanceof RegExp || isRegExp(value)) {
+ let flags = value.flags;
+ if (flags === undefined) {
+ const match = value.toString().match(/[gimuy]*$/);
+ if (match) {
+ flags = match[0];
+ }
+ }
+ const rx = new BSONRegExp(value.source, flags);
+ return rx.toExtendedJSON(options);
+ }
+ if (value != null && typeof value === 'object')
+ return serializeDocument(value, options);
+ return value;
+}
+const BSON_TYPE_MAPPINGS = {
+ Binary: (o) => new Binary(o.value(), o.sub_type),
+ Code: (o) => new Code(o.code, o.scope),
+ DBRef: (o) => new DBRef(o.collection || o.namespace, o.oid, o.db, o.fields),
+ Decimal128: (o) => new Decimal128(o.bytes),
+ Double: (o) => new Double(o.value),
+ Int32: (o) => new Int32(o.value),
+ Long: (o) => Long.fromBits(o.low != null ? o.low : o.low_, o.low != null ? o.high : o.high_, o.low != null ? o.unsigned : o.unsigned_),
+ MaxKey: () => new MaxKey(),
+ MinKey: () => new MinKey(),
+ ObjectId: (o) => new ObjectId(o),
+ BSONRegExp: (o) => new BSONRegExp(o.pattern, o.options),
+ BSONSymbol: (o) => new BSONSymbol(o.value),
+ Timestamp: (o) => Timestamp.fromBits(o.low, o.high)
+};
+function serializeDocument(doc, options) {
+ if (doc == null || typeof doc !== 'object')
+ throw new BSONError('not an object instance');
+ const bsontype = doc._bsontype;
+ if (typeof bsontype === 'undefined') {
+ const _doc = {};
+ for (const name of Object.keys(doc)) {
+ options.seenObjects.push({ propertyName: name, obj: null });
+ try {
+ const value = serializeValue(doc[name], options);
+ if (name === '__proto__') {
+ Object.defineProperty(_doc, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else {
+ _doc[name] = value;
+ }
+ }
+ finally {
+ options.seenObjects.pop();
+ }
+ }
+ return _doc;
+ }
+ else if (doc != null &&
+ typeof doc === 'object' &&
+ typeof doc._bsontype === 'string' &&
+ doc[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION) {
+ throw new BSONVersionError();
+ }
+ else if (isBSONType(doc)) {
+ let outDoc = doc;
+ if (typeof outDoc.toExtendedJSON !== 'function') {
+ const mapper = BSON_TYPE_MAPPINGS[doc._bsontype];
+ if (!mapper) {
+ throw new BSONError('Unrecognized or invalid _bsontype: ' + doc._bsontype);
+ }
+ outDoc = mapper(outDoc);
+ }
+ if (bsontype === 'Code' && outDoc.scope) {
+ outDoc = new Code(outDoc.code, serializeValue(outDoc.scope, options));
+ }
+ else if (bsontype === 'DBRef' && outDoc.oid) {
+ outDoc = new DBRef(serializeValue(outDoc.collection, options), serializeValue(outDoc.oid, options), serializeValue(outDoc.db, options), serializeValue(outDoc.fields, options));
+ }
+ return outDoc.toExtendedJSON(options);
+ }
+ else {
+ throw new BSONError('_bsontype must be a string, but was: ' + typeof bsontype);
+ }
+}
+function parse(text, options) {
+ const ejsonOptions = {
+ useBigInt64: options?.useBigInt64 ?? false,
+ relaxed: options?.relaxed ?? true,
+ legacy: options?.legacy ?? false
+ };
+ return JSON.parse(text, (key, value) => {
+ if (key.indexOf('\x00') !== -1) {
+ throw new BSONError(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(key)}`);
+ }
+ return deserializeValue(value, ejsonOptions);
+ });
+}
+function stringify(value, replacer, space, options) {
+ if (space != null && typeof space === 'object') {
+ options = space;
+ space = 0;
+ }
+ if (replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) {
+ options = replacer;
+ replacer = undefined;
+ space = 0;
+ }
+ const serializeOptions = Object.assign({ relaxed: true, legacy: false }, options, {
+ seenObjects: [{ propertyName: '(root)', obj: null }]
+ });
+ const doc = serializeValue(value, serializeOptions);
+ return JSON.stringify(doc, replacer, space);
+}
+function EJSONserialize(value, options) {
+ options = options || {};
+ return JSON.parse(stringify(value, options));
+}
+function EJSONdeserialize(ejson, options) {
+ options = options || {};
+ return parse(JSON.stringify(ejson), options);
+}
+const EJSON = Object.create(null);
+EJSON.parse = parse;
+EJSON.stringify = stringify;
+EJSON.serialize = EJSONserialize;
+EJSON.deserialize = EJSONdeserialize;
+Object.freeze(EJSON);
+
+function getSize(source, offset) {
+ try {
+ return NumberUtils.getNonnegativeInt32LE(source, offset);
+ }
+ catch (cause) {
+ throw new BSONOffsetError('BSON size cannot be negative', offset, { cause });
+ }
+}
+function findNull(bytes, offset) {
+ let nullTerminatorOffset = offset;
+ for (; bytes[nullTerminatorOffset] !== 0x00; nullTerminatorOffset++)
+ ;
+ if (nullTerminatorOffset === bytes.length - 1) {
+ throw new BSONOffsetError('Null terminator not found', offset);
+ }
+ return nullTerminatorOffset;
+}
+function parseToElements(bytes, startOffset = 0) {
+ startOffset ??= 0;
+ if (bytes.length < 5) {
+ throw new BSONOffsetError(`Input must be at least 5 bytes, got ${bytes.length} bytes`, startOffset);
+ }
+ const documentSize = getSize(bytes, startOffset);
+ if (documentSize > bytes.length - startOffset) {
+ throw new BSONOffsetError(`Parsed documentSize (${documentSize} bytes) does not match input length (${bytes.length} bytes)`, startOffset);
+ }
+ if (bytes[startOffset + documentSize - 1] !== 0x00) {
+ throw new BSONOffsetError('BSON documents must end in 0x00', startOffset + documentSize);
+ }
+ const elements = [];
+ let offset = startOffset + 4;
+ while (offset <= documentSize + startOffset) {
+ const type = bytes[offset];
+ offset += 1;
+ if (type === 0) {
+ if (offset - startOffset !== documentSize) {
+ throw new BSONOffsetError(`Invalid 0x00 type byte`, offset);
+ }
+ break;
+ }
+ const nameOffset = offset;
+ const nameLength = findNull(bytes, offset) - nameOffset;
+ offset += nameLength + 1;
+ let length;
+ if (type === 1 ||
+ type === 18 ||
+ type === 9 ||
+ type === 17) {
+ length = 8;
+ }
+ else if (type === 16) {
+ length = 4;
+ }
+ else if (type === 7) {
+ length = 12;
+ }
+ else if (type === 19) {
+ length = 16;
+ }
+ else if (type === 8) {
+ length = 1;
+ }
+ else if (type === 10 ||
+ type === 6 ||
+ type === 127 ||
+ type === 255) {
+ length = 0;
+ }
+ else if (type === 11) {
+ length = findNull(bytes, findNull(bytes, offset) + 1) + 1 - offset;
+ }
+ else if (type === 3 ||
+ type === 4 ||
+ type === 15) {
+ length = getSize(bytes, offset);
+ }
+ else if (type === 2 ||
+ type === 5 ||
+ type === 12 ||
+ type === 13 ||
+ type === 14) {
+ length = getSize(bytes, offset) + 4;
+ if (type === 5) {
+ length += 1;
+ }
+ if (type === 12) {
+ length += 12;
+ }
+ }
+ else {
+ throw new BSONOffsetError(`Invalid 0x${type.toString(16).padStart(2, '0')} type byte`, offset);
+ }
+ if (length > documentSize) {
+ throw new BSONOffsetError('value reports length larger than document', offset);
+ }
+ elements.push([type, nameOffset, nameLength, offset, length]);
+ offset += length;
+ }
+ return elements;
+}
+
+const onDemand = Object.create(null);
+onDemand.parseToElements = parseToElements;
+onDemand.ByteUtils = ByteUtils;
+onDemand.NumberUtils = NumberUtils;
+Object.freeze(onDemand);
+
+const MAXSIZE = 1024 * 1024 * 17;
+let buffer = ByteUtils.allocate(MAXSIZE);
+function setInternalBufferSize(size) {
+ if (buffer.length < size) {
+ buffer = ByteUtils.allocate(size);
+ }
+}
+function serialize(object, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const minInternalBufferSize = typeof options.minInternalBufferSize === 'number' ? options.minInternalBufferSize : MAXSIZE;
+ if (buffer.length < minInternalBufferSize) {
+ buffer = ByteUtils.allocate(minInternalBufferSize);
+ }
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ const finishedBuffer = ByteUtils.allocateUnsafe(serializationIndex);
+ finishedBuffer.set(buffer.subarray(0, serializationIndex), 0);
+ return finishedBuffer;
+}
+function serializeWithBufferAndIndex(object, finalBuffer, options = {}) {
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const startIndex = typeof options.index === 'number' ? options.index : 0;
+ const serializationIndex = serializeInto(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, null);
+ finalBuffer.set(buffer.subarray(0, serializationIndex), startIndex);
+ return startIndex + serializationIndex - 1;
+}
+function deserialize(buffer, options = {}) {
+ return internalDeserialize(ByteUtils.toLocalBufferType(buffer), options);
+}
+function calculateObjectSize(object, options = {}) {
+ options = options || {};
+ const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ return internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined);
+}
+function deserializeStream(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ const internalOptions = Object.assign({ allowObjectSmallerThanBufferSize: true, index: 0 }, options);
+ const bufferData = ByteUtils.toLocalBufferType(data);
+ let index = startIndex;
+ for (let i = 0; i < numberOfDocuments; i++) {
+ const size = NumberUtils.getInt32LE(bufferData, index);
+ internalOptions.index = index;
+ documents[docStartIndex + i] = internalDeserialize(bufferData, internalOptions);
+ index = index + size;
+ }
+ return index;
+}
+
+var bson = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ BSONError: BSONError,
+ BSONOffsetError: BSONOffsetError,
+ BSONRegExp: BSONRegExp,
+ BSONRuntimeError: BSONRuntimeError,
+ BSONSymbol: BSONSymbol,
+ BSONType: BSONType,
+ BSONValue: BSONValue,
+ BSONVersionError: BSONVersionError,
+ Binary: Binary,
+ Code: Code,
+ DBRef: DBRef,
+ Decimal128: Decimal128,
+ Double: Double,
+ EJSON: EJSON,
+ Int32: Int32,
+ Long: Long,
+ MaxKey: MaxKey,
+ MinKey: MinKey,
+ ObjectId: ObjectId,
+ Timestamp: Timestamp,
+ UUID: UUID,
+ calculateObjectSize: calculateObjectSize,
+ deserialize: deserialize,
+ deserializeStream: deserializeStream,
+ onDemand: onDemand,
+ serialize: serialize,
+ serializeWithBufferAndIndex: serializeWithBufferAndIndex,
+ setInternalBufferSize: setInternalBufferSize
+});
+
+exports.BSON = bson;
+exports.BSONError = BSONError;
+exports.BSONOffsetError = BSONOffsetError;
+exports.BSONRegExp = BSONRegExp;
+exports.BSONRuntimeError = BSONRuntimeError;
+exports.BSONSymbol = BSONSymbol;
+exports.BSONType = BSONType;
+exports.BSONValue = BSONValue;
+exports.BSONVersionError = BSONVersionError;
+exports.Binary = Binary;
+exports.Code = Code;
+exports.DBRef = DBRef;
+exports.Decimal128 = Decimal128;
+exports.Double = Double;
+exports.EJSON = EJSON;
+exports.Int32 = Int32;
+exports.Long = Long;
+exports.MaxKey = MaxKey;
+exports.MinKey = MinKey;
+exports.ObjectId = ObjectId;
+exports.Timestamp = Timestamp;
+exports.UUID = UUID;
+exports.calculateObjectSize = calculateObjectSize;
+exports.deserialize = deserialize;
+exports.deserializeStream = deserializeStream;
+exports.onDemand = onDemand;
+exports.serialize = serialize;
+exports.serializeWithBufferAndIndex = serializeWithBufferAndIndex;
+exports.setInternalBufferSize = setInternalBufferSize;
+//# sourceMappingURL=bson.rn.cjs.map
diff --git a/week-3/04-course-app-hard/node_modules/bson/lib/bson.rn.cjs.map b/week-3/04-course-app-hard/node_modules/bson/lib/bson.rn.cjs.map
new file mode 100644
index 000000000..27dfe757c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/lib/bson.rn.cjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"bson.rn.cjs","sources":["../src/parser/utils.ts","../src/constants.ts","../src/error.ts","../src/parse_utf8.ts","../src/utils/latin.ts","../src/utils/node_byte_utils.ts","../src/utils/web_byte_utils.ts","../src/utils/byte_utils.ts","../src/bson_value.ts","../src/binary.ts","../src/code.ts","../src/db_ref.ts","../src/utils/string_utils.ts","../src/long.ts","../src/decimal128.ts","../src/double.ts","../src/int_32.ts","../src/max_key.ts","../src/min_key.ts","../src/utils/number_utils.ts","../src/objectid.ts","../src/parser/calculate_size.ts","../src/regexp.ts","../src/symbol.ts","../src/timestamp.ts","../src/parser/deserializer.ts","../src/parser/serializer.ts","../src/extended_json.ts","../src/parser/on_demand/parse_to_elements.ts","../src/parser/on_demand/index.ts","../src/bson.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["StringUtils.validateStringCharacters","StringUtils.removeLeadingZerosAndExplicitPlus","constants.JS_INT_MIN","constants.JS_INT_MAX","constants.BSON_INT32_MIN","constants.BSON_INT32_MAX","constants.BSON_MAJOR_VERSION","constants.BSON_DATA_STRING","constants.BSON_DATA_OID","constants.BSON_DATA_INT","constants.BSON_DATA_NUMBER","constants.BSON_DATA_DATE","constants.BSON_DATA_BOOLEAN","constants.BSON_DATA_OBJECT","constants.BSON_DATA_ARRAY","constants.BSON_DATA_UNDEFINED","constants.BSON_DATA_NULL","constants.BSON_DATA_LONG","constants.BSON_DATA_DECIMAL128","constants.BSON_DATA_BINARY","constants.BSON_BINARY_SUBTYPE_UUID_NEW","constants.BSON_DATA_REGEXP","constants.BSON_DATA_SYMBOL","constants.BSON_DATA_TIMESTAMP","constants.BSON_DATA_MIN_KEY","constants.BSON_DATA_MAX_KEY","constants.BSON_DATA_CODE","constants.BSON_DATA_CODE_W_SCOPE","constants.BSON_DATA_DBPOINTER","constants.BSON_BINARY_SUBTYPE_DEFAULT"],"mappings":";;AAAM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,OAAO,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,CAAC,QAAQ,CACpE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CACtC,CAAC;AACJ,CAAC;AAEK,SAAU,YAAY,CAAC,KAAc,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,S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/package.json b/week-3/04-course-app-hard/node_modules/bson/package.json
new file mode 100644
index 000000000..80ce4ee2a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/package.json
@@ -0,0 +1,119 @@
+{
+ "name": "bson",
+ "description": "A bson parser for node.js and the browser",
+ "keywords": [
+ "mongodb",
+ "bson",
+ "parser"
+ ],
+ "files": [
+ "lib",
+ "src",
+ "bson.d.ts",
+ "etc/prepare.js",
+ "vendor"
+ ],
+ "types": "bson.d.ts",
+ "version": "6.8.0",
+ "author": {
+ "name": "The MongoDB NodeJS Team",
+ "email": "dbx-node@mongodb.com"
+ },
+ "license": "Apache-2.0",
+ "contributors": [],
+ "repository": "mongodb/js-bson",
+ "bugs": {
+ "url": "https://jira.mongodb.org/projects/NODE/issues/"
+ },
+ "devDependencies": {
+ "@istanbuljs/nyc-config-typescript": "^1.0.2",
+ "@microsoft/api-extractor": "^7.43.1",
+ "@rollup/plugin-node-resolve": "^15.2.3",
+ "@rollup/plugin-typescript": "^11.1.6",
+ "@types/chai": "^4.3.14",
+ "@types/mocha": "^10.0.6",
+ "@types/node": "^20.12.7",
+ "@types/sinon": "^17.0.3",
+ "@types/sinon-chai": "^3.2.12",
+ "@typescript-eslint/eslint-plugin": "^7.7.0",
+ "@typescript-eslint/parser": "^7.7.0",
+ "benchmark": "^2.1.4",
+ "chai": "^4.4.1",
+ "chalk": "^5.3.0",
+ "dbx-js-tools": "github:mongodb-js/dbx-js-tools",
+ "eslint": "^8.57.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-no-bigint-usage": "file:etc/eslint/no-bigint-usage",
+ "eslint-plugin-prettier": "^5.1.3",
+ "eslint-plugin-tsdoc": "^0.2.17",
+ "magic-string": "^0.30.10",
+ "mocha": "^10.4.0",
+ "node-fetch": "^3.3.2",
+ "nyc": "^15.1.0",
+ "prettier": "^3.2.5",
+ "rollup": "^4.14.3",
+ "sinon": "^17.0.1",
+ "sinon-chai": "^3.7.0",
+ "source-map-support": "^0.5.21",
+ "standard-version": "^9.5.0",
+ "tar": "^7.0.1",
+ "ts-node": "^10.9.2",
+ "tsd": "^0.31.0",
+ "typescript": "5.3",
+ "typescript-cached-transpile": "0.0.6",
+ "uuid": "^9.0.1"
+ },
+ "tsd": {
+ "directory": "test/types",
+ "compilerOptions": {
+ "strict": true,
+ "target": "esnext",
+ "module": "commonjs",
+ "moduleResolution": "node"
+ }
+ },
+ "config": {
+ "native": false
+ },
+ "main": "./lib/bson.cjs",
+ "module": "./lib/bson.mjs",
+ "exports": {
+ "import": {
+ "types": "./bson.d.ts",
+ "default": "./lib/bson.mjs"
+ },
+ "require": {
+ "types": "./bson.d.ts",
+ "default": "./lib/bson.cjs"
+ },
+ "react-native": "./lib/bson.rn.cjs",
+ "browser": "./lib/bson.mjs"
+ },
+ "compass:exports": {
+ "import": "./lib/bson.cjs",
+ "require": "./lib/bson.cjs"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "scripts": {
+ "pretest": "npm run build",
+ "test": "npm run check:node && npm run check:web && npm run check:web-no-bigint",
+ "check:node": "WEB=false mocha test/node",
+ "check:tsd": "npm run build:dts && tsd",
+ "check:web": "WEB=true mocha test/node",
+ "check:web-no-bigint": "WEB=true NO_BIGINT=true mocha test/node",
+ "check:granular-bench": "npm run build:bench && node ./test/bench/etc/run_granular_benchmarks.js",
+ "check:spec-bench": "npm run build:bench && node ./test/bench/lib/spec/bsonBench.js",
+ "build:bench": "cd test/bench && npx tsc",
+ "build:ts": "node ./node_modules/typescript/bin/tsc",
+ "build:dts": "npm run build:ts && api-extractor run --typescript-compiler-folder node_modules/typescript --local && node etc/clean_definition_files.cjs",
+ "build:bundle": "rollup -c rollup.config.mjs",
+ "build": "npm run build:dts && npm run build:bundle",
+ "check:lint": "eslint -v && eslint --ext '.js,.ts' --max-warnings=0 src test && npm run build:dts && npm run check:tsd",
+ "format": "eslint --ext '.js,.ts' src test --fix",
+ "check:coverage": "nyc --check-coverage npm run check:node",
+ "prepare": "node etc/prepare.js",
+ "release": "standard-version -i HISTORY.md"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/binary.ts b/week-3/04-course-app-hard/node_modules/bson/src/binary.ts
new file mode 100644
index 000000000..6a892b00a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/binary.ts
@@ -0,0 +1,472 @@
+import { type InspectFn, defaultInspect, isAnyArrayBuffer, isUint8Array } from './parser/utils';
+import type { EJSONOptions } from './extended_json';
+import { BSONError } from './error';
+import { BSON_BINARY_SUBTYPE_UUID_NEW } from './constants';
+import { ByteUtils } from './utils/byte_utils';
+import { BSONValue } from './bson_value';
+
+/** @public */
+export type BinarySequence = Uint8Array | number[];
+
+/** @public */
+export interface BinaryExtendedLegacy {
+ $type: string;
+ $binary: string;
+}
+
+/** @public */
+export interface BinaryExtended {
+ $binary: {
+ subType: string;
+ base64: string;
+ };
+}
+
+/**
+ * A class representation of the BSON Binary type.
+ * @public
+ * @category BSONType
+ */
+export class Binary extends BSONValue {
+ get _bsontype(): 'Binary' {
+ return 'Binary';
+ }
+
+ /**
+ * Binary default subtype
+ * @internal
+ */
+ private static readonly BSON_BINARY_SUBTYPE_DEFAULT = 0;
+
+ /** Initial buffer default size */
+ static readonly BUFFER_SIZE = 256;
+ /** Default BSON type */
+ static readonly SUBTYPE_DEFAULT = 0;
+ /** Function BSON type */
+ static readonly SUBTYPE_FUNCTION = 1;
+ /** Byte Array BSON type */
+ static readonly SUBTYPE_BYTE_ARRAY = 2;
+ /** Deprecated UUID BSON type @deprecated Please use SUBTYPE_UUID */
+ static readonly SUBTYPE_UUID_OLD = 3;
+ /** UUID BSON type */
+ static readonly SUBTYPE_UUID = 4;
+ /** MD5 BSON type */
+ static readonly SUBTYPE_MD5 = 5;
+ /** Encrypted BSON type */
+ static readonly SUBTYPE_ENCRYPTED = 6;
+ /** Column BSON type */
+ static readonly SUBTYPE_COLUMN = 7;
+ /** Sensitive BSON type */
+ static readonly SUBTYPE_SENSITIVE = 8;
+ /** User BSON type */
+ static readonly SUBTYPE_USER_DEFINED = 128;
+
+ buffer!: Uint8Array;
+ sub_type!: number;
+ position!: number;
+
+ /**
+ * Create a new Binary instance.
+ * @param buffer - a buffer object containing the binary data.
+ * @param subType - the option binary type.
+ */
+ constructor(buffer?: BinarySequence, subType?: number) {
+ super();
+ if (
+ !(buffer == null) &&
+ typeof buffer === 'string' &&
+ !ArrayBuffer.isView(buffer) &&
+ !isAnyArrayBuffer(buffer) &&
+ !Array.isArray(buffer)
+ ) {
+ throw new BSONError('Binary can only be constructed from Uint8Array or number[]');
+ }
+
+ this.sub_type = subType ?? Binary.BSON_BINARY_SUBTYPE_DEFAULT;
+
+ if (buffer == null) {
+ // create an empty binary buffer
+ this.buffer = ByteUtils.allocate(Binary.BUFFER_SIZE);
+ this.position = 0;
+ } else {
+ this.buffer = Array.isArray(buffer)
+ ? ByteUtils.fromNumberArray(buffer)
+ : ByteUtils.toLocalBufferType(buffer);
+ this.position = this.buffer.byteLength;
+ }
+ }
+
+ /**
+ * Updates this binary with byte_value.
+ *
+ * @param byteValue - a single byte we wish to write.
+ */
+ put(byteValue: string | number | Uint8Array | number[]): void {
+ // If it's a string and a has more than one character throw an error
+ if (typeof byteValue === 'string' && byteValue.length !== 1) {
+ throw new BSONError('only accepts single character String');
+ } else if (typeof byteValue !== 'number' && byteValue.length !== 1)
+ throw new BSONError('only accepts single character Uint8Array or Array');
+
+ // Decode the byte value once
+ let decodedByte: number;
+ if (typeof byteValue === 'string') {
+ decodedByte = byteValue.charCodeAt(0);
+ } else if (typeof byteValue === 'number') {
+ decodedByte = byteValue;
+ } else {
+ decodedByte = byteValue[0];
+ }
+
+ if (decodedByte < 0 || decodedByte > 255) {
+ throw new BSONError('only accepts number in a valid unsigned byte range 0-255');
+ }
+
+ if (this.buffer.byteLength > this.position) {
+ this.buffer[this.position++] = decodedByte;
+ } else {
+ const newSpace = ByteUtils.allocate(Binary.BUFFER_SIZE + this.buffer.length);
+ newSpace.set(this.buffer, 0);
+ this.buffer = newSpace;
+ this.buffer[this.position++] = decodedByte;
+ }
+ }
+
+ /**
+ * Writes a buffer to the binary.
+ *
+ * @param sequence - a string or buffer to be written to the Binary BSON object.
+ * @param offset - specify the binary of where to write the content.
+ */
+ write(sequence: BinarySequence, offset: number): void {
+ offset = typeof offset === 'number' ? offset : this.position;
+
+ // If the buffer is to small let's extend the buffer
+ if (this.buffer.byteLength < offset + sequence.length) {
+ const newSpace = ByteUtils.allocate(this.buffer.byteLength + sequence.length);
+ newSpace.set(this.buffer, 0);
+
+ // Assign the new buffer
+ this.buffer = newSpace;
+ }
+
+ if (ArrayBuffer.isView(sequence)) {
+ this.buffer.set(ByteUtils.toLocalBufferType(sequence), offset);
+ this.position =
+ offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;
+ } else if (typeof sequence === 'string') {
+ throw new BSONError('input cannot be string');
+ }
+ }
+
+ /**
+ * Reads **length** bytes starting at **position**.
+ *
+ * @param position - read from the given position in the Binary.
+ * @param length - the number of bytes to read.
+ */
+ read(position: number, length: number): BinarySequence {
+ length = length && length > 0 ? length : this.position;
+
+ // Let's return the data based on the type we have
+ return this.buffer.slice(position, position + length);
+ }
+
+ /** returns a view of the binary value as a Uint8Array */
+ value(): Uint8Array {
+ // Optimize to serialize for the situation where the data == size of buffer
+ return this.buffer.length === this.position
+ ? this.buffer
+ : this.buffer.subarray(0, this.position);
+ }
+
+ /** the length of the binary sequence */
+ length(): number {
+ return this.position;
+ }
+
+ toJSON(): string {
+ return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ }
+
+ toString(encoding?: 'hex' | 'base64' | 'utf8' | 'utf-8'): string {
+ if (encoding === 'hex') return ByteUtils.toHex(this.buffer.subarray(0, this.position));
+ if (encoding === 'base64') return ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ if (encoding === 'utf8' || encoding === 'utf-8')
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ return ByteUtils.toUTF8(this.buffer, 0, this.position, false);
+ }
+
+ /** @internal */
+ toExtendedJSON(options?: EJSONOptions): BinaryExtendedLegacy | BinaryExtended {
+ options = options || {};
+ const base64String = ByteUtils.toBase64(this.buffer);
+
+ const subType = Number(this.sub_type).toString(16);
+ if (options.legacy) {
+ return {
+ $binary: base64String,
+ $type: subType.length === 1 ? '0' + subType : subType
+ };
+ }
+ return {
+ $binary: {
+ base64: base64String,
+ subType: subType.length === 1 ? '0' + subType : subType
+ }
+ };
+ }
+
+ toUUID(): UUID {
+ if (this.sub_type === Binary.SUBTYPE_UUID) {
+ return new UUID(this.buffer.slice(0, this.position));
+ }
+
+ throw new BSONError(
+ `Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${Binary.SUBTYPE_UUID}" is currently supported.`
+ );
+ }
+
+ /** Creates an Binary instance from a hex digit string */
+ static createFromHexString(hex: string, subType?: number): Binary {
+ return new Binary(ByteUtils.fromHex(hex), subType);
+ }
+
+ /** Creates an Binary instance from a base64 string */
+ static createFromBase64(base64: string, subType?: number): Binary {
+ return new Binary(ByteUtils.fromBase64(base64), subType);
+ }
+
+ /** @internal */
+ static fromExtendedJSON(
+ doc: BinaryExtendedLegacy | BinaryExtended | UUIDExtended,
+ options?: EJSONOptions
+ ): Binary {
+ options = options || {};
+ let data: Uint8Array | undefined;
+ let type;
+ if ('$binary' in doc) {
+ if (options.legacy && typeof doc.$binary === 'string' && '$type' in doc) {
+ type = doc.$type ? parseInt(doc.$type, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary);
+ } else {
+ if (typeof doc.$binary !== 'string') {
+ type = doc.$binary.subType ? parseInt(doc.$binary.subType, 16) : 0;
+ data = ByteUtils.fromBase64(doc.$binary.base64);
+ }
+ }
+ } else if ('$uuid' in doc) {
+ type = 4;
+ data = UUID.bytesFromString(doc.$uuid);
+ }
+ if (!data) {
+ throw new BSONError(`Unexpected Binary Extended JSON format ${JSON.stringify(doc)}`);
+ }
+ return type === BSON_BINARY_SUBTYPE_UUID_NEW ? new UUID(data) : new Binary(data, type);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ const base64 = ByteUtils.toBase64(this.buffer.subarray(0, this.position));
+ const base64Arg = inspect(base64, options);
+ const subTypeArg = inspect(this.sub_type, options);
+ return `Binary.createFromBase64(${base64Arg}, ${subTypeArg})`;
+ }
+}
+
+/** @public */
+export type UUIDExtended = {
+ $uuid: string;
+};
+
+const UUID_BYTE_LENGTH = 16;
+const UUID_WITHOUT_DASHES = /^[0-9A-F]{32}$/i;
+const UUID_WITH_DASHES = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
+
+/**
+ * A class representation of the BSON UUID type.
+ * @public
+ */
+export class UUID extends Binary {
+ /**
+ * Create a UUID type
+ *
+ * When the argument to the constructor is omitted a random v4 UUID will be generated.
+ *
+ * @param input - Can be a 32 or 36 character hex string (dashes excluded/included) or a 16 byte binary Buffer.
+ */
+ constructor(input?: string | Uint8Array | UUID) {
+ let bytes: Uint8Array;
+ if (input == null) {
+ bytes = UUID.generate();
+ } else if (input instanceof UUID) {
+ bytes = ByteUtils.toLocalBufferType(new Uint8Array(input.buffer));
+ } else if (ArrayBuffer.isView(input) && input.byteLength === UUID_BYTE_LENGTH) {
+ bytes = ByteUtils.toLocalBufferType(input);
+ } else if (typeof input === 'string') {
+ bytes = UUID.bytesFromString(input);
+ } else {
+ throw new BSONError(
+ 'Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).'
+ );
+ }
+ super(bytes, BSON_BINARY_SUBTYPE_UUID_NEW);
+ }
+
+ /**
+ * The UUID bytes
+ * @readonly
+ */
+ get id(): Uint8Array {
+ return this.buffer;
+ }
+
+ set id(value: Uint8Array) {
+ this.buffer = value;
+ }
+
+ /**
+ * Returns the UUID id as a 32 or 36 character hex string representation, excluding/including dashes (defaults to 36 character dash separated)
+ * @param includeDashes - should the string exclude dash-separators.
+ */
+ toHexString(includeDashes = true): string {
+ if (includeDashes) {
+ return [
+ ByteUtils.toHex(this.buffer.subarray(0, 4)),
+ ByteUtils.toHex(this.buffer.subarray(4, 6)),
+ ByteUtils.toHex(this.buffer.subarray(6, 8)),
+ ByteUtils.toHex(this.buffer.subarray(8, 10)),
+ ByteUtils.toHex(this.buffer.subarray(10, 16))
+ ].join('-');
+ }
+ return ByteUtils.toHex(this.buffer);
+ }
+
+ /**
+ * Converts the id into a 36 character (dashes included) hex string, unless a encoding is specified.
+ */
+ toString(encoding?: 'hex' | 'base64'): string {
+ if (encoding === 'hex') return ByteUtils.toHex(this.id);
+ if (encoding === 'base64') return ByteUtils.toBase64(this.id);
+ return this.toHexString();
+ }
+
+ /**
+ * Converts the id into its JSON string representation.
+ * A 36 character (dashes included) hex string in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ */
+ toJSON(): string {
+ return this.toHexString();
+ }
+
+ /**
+ * Compares the equality of this UUID with `otherID`.
+ *
+ * @param otherId - UUID instance to compare against.
+ */
+ equals(otherId: string | Uint8Array | UUID): boolean {
+ if (!otherId) {
+ return false;
+ }
+
+ if (otherId instanceof UUID) {
+ return ByteUtils.equals(otherId.id, this.id);
+ }
+
+ try {
+ return ByteUtils.equals(new UUID(otherId).id, this.id);
+ } catch {
+ return false;
+ }
+ }
+
+ /**
+ * Creates a Binary instance from the current UUID.
+ */
+ toBinary(): Binary {
+ return new Binary(this.id, Binary.SUBTYPE_UUID);
+ }
+
+ /**
+ * Generates a populated buffer containing a v4 uuid
+ */
+ static generate(): Uint8Array {
+ const bytes = ByteUtils.randomBytes(UUID_BYTE_LENGTH);
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ // Kindly borrowed from https://github.com/uuidjs/uuid/blob/master/src/v4.js
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
+
+ return bytes;
+ }
+
+ /**
+ * Checks if a value is a valid bson UUID
+ * @param input - UUID, string or Buffer to validate.
+ */
+ static isValid(input: string | Uint8Array | UUID | Binary): boolean {
+ if (!input) {
+ return false;
+ }
+
+ if (typeof input === 'string') {
+ return UUID.isValidUUIDString(input);
+ }
+
+ if (isUint8Array(input)) {
+ return input.byteLength === UUID_BYTE_LENGTH;
+ }
+
+ return (
+ input._bsontype === 'Binary' &&
+ input.sub_type === this.SUBTYPE_UUID &&
+ input.buffer.byteLength === 16
+ );
+ }
+
+ /**
+ * Creates an UUID from a hex string representation of an UUID.
+ * @param hexString - 32 or 36 character hex string (dashes excluded/included).
+ */
+ static override createFromHexString(hexString: string): UUID {
+ const buffer = UUID.bytesFromString(hexString);
+ return new UUID(buffer);
+ }
+
+ /** Creates an UUID from a base64 string representation of an UUID. */
+ static override createFromBase64(base64: string): UUID {
+ return new UUID(ByteUtils.fromBase64(base64));
+ }
+
+ /** @internal */
+ static bytesFromString(representation: string) {
+ if (!UUID.isValidUUIDString(representation)) {
+ throw new BSONError(
+ 'UUID string representation must be 32 hex digits or canonical hyphenated representation'
+ );
+ }
+ return ByteUtils.fromHex(representation.replace(/-/g, ''));
+ }
+
+ /**
+ * @internal
+ *
+ * Validates a string to be a hex digit sequence with or without dashes.
+ * The canonical hyphenated representation of a uuid is hex in 8-4-4-4-12 groups.
+ */
+ static isValidUUIDString(representation: string) {
+ return UUID_WITHOUT_DASHES.test(representation) || UUID_WITH_DASHES.test(representation);
+ }
+
+ /**
+ * Converts to a string representation of this Id.
+ *
+ * @returns return the 36 character hex string representation.
+ *
+ */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ return `new UUID(${inspect(this.toHexString(), options)})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/bson.ts b/week-3/04-course-app-hard/node_modules/bson/src/bson.ts
new file mode 100644
index 000000000..0dc8346e8
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/bson.ts
@@ -0,0 +1,248 @@
+import { Binary, UUID } from './binary';
+import { Code } from './code';
+import { DBRef } from './db_ref';
+import { Decimal128 } from './decimal128';
+import { Double } from './double';
+import { Int32 } from './int_32';
+import { Long } from './long';
+import { MaxKey } from './max_key';
+import { MinKey } from './min_key';
+import { ObjectId } from './objectid';
+import { internalCalculateObjectSize } from './parser/calculate_size';
+// Parts of the parser
+import { internalDeserialize, type DeserializeOptions } from './parser/deserializer';
+import { serializeInto, type SerializeOptions } from './parser/serializer';
+import { BSONRegExp } from './regexp';
+import { BSONSymbol } from './symbol';
+import { Timestamp } from './timestamp';
+import { ByteUtils } from './utils/byte_utils';
+import { NumberUtils } from './utils/number_utils';
+export type { UUIDExtended, BinaryExtended, BinaryExtendedLegacy, BinarySequence } from './binary';
+export type { CodeExtended } from './code';
+export type { DBRefLike } from './db_ref';
+export type { Decimal128Extended } from './decimal128';
+export type { DoubleExtended } from './double';
+export type { EJSONOptions } from './extended_json';
+export type { Int32Extended } from './int_32';
+export type { LongExtended } from './long';
+export type { MaxKeyExtended } from './max_key';
+export type { MinKeyExtended } from './min_key';
+export type { ObjectIdExtended, ObjectIdLike } from './objectid';
+export type { BSONRegExpExtended, BSONRegExpExtendedLegacy } from './regexp';
+export type { BSONSymbolExtended } from './symbol';
+export type { LongWithoutOverrides, TimestampExtended, TimestampOverrides } from './timestamp';
+export type { LongWithoutOverridesClass } from './timestamp';
+export type { SerializeOptions, DeserializeOptions };
+
+export {
+ Code,
+ BSONSymbol,
+ DBRef,
+ Binary,
+ ObjectId,
+ UUID,
+ Long,
+ Timestamp,
+ Double,
+ Int32,
+ MinKey,
+ MaxKey,
+ BSONRegExp,
+ Decimal128
+};
+export { BSONValue } from './bson_value';
+export { BSONError, BSONVersionError, BSONRuntimeError, BSONOffsetError } from './error';
+export { BSONType } from './constants';
+export { EJSON } from './extended_json';
+export { onDemand, type OnDemand } from './parser/on_demand/index';
+
+/** @public */
+export interface Document {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [key: string]: any;
+}
+
+/** @internal */
+// Default Max Size
+const MAXSIZE = 1024 * 1024 * 17;
+
+// Current Internal Temporary Serialization Buffer
+let buffer = ByteUtils.allocate(MAXSIZE);
+
+/**
+ * Sets the size of the internal serialization buffer.
+ *
+ * @param size - The desired size for the internal serialization buffer in bytes
+ * @public
+ */
+export function setInternalBufferSize(size: number): void {
+ // Resize the internal serialization buffer if needed
+ if (buffer.length < size) {
+ buffer = ByteUtils.allocate(size);
+ }
+}
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param object - the Javascript object to serialize.
+ * @returns Buffer object containing the serialized object.
+ * @public
+ */
+export function serialize(object: Document, options: SerializeOptions = {}): Uint8Array {
+ // Unpack the options
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions =
+ typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined =
+ typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const minInternalBufferSize =
+ typeof options.minInternalBufferSize === 'number' ? options.minInternalBufferSize : MAXSIZE;
+
+ // Resize the internal serialization buffer if needed
+ if (buffer.length < minInternalBufferSize) {
+ buffer = ByteUtils.allocate(minInternalBufferSize);
+ }
+
+ // Attempt to serialize
+ const serializationIndex = serializeInto(
+ buffer,
+ object,
+ checkKeys,
+ 0,
+ 0,
+ serializeFunctions,
+ ignoreUndefined,
+ null
+ );
+
+ // Create the final buffer
+ const finishedBuffer = ByteUtils.allocateUnsafe(serializationIndex);
+
+ // Copy into the finished buffer
+ finishedBuffer.set(buffer.subarray(0, serializationIndex), 0);
+
+ // Return the buffer
+ return finishedBuffer;
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer,
+ * useful when pre-allocating the space for serialization.
+ *
+ * @param object - the Javascript object to serialize.
+ * @param finalBuffer - the Buffer you pre-allocated to store the serialized BSON object.
+ * @returns the index pointing to the last written byte in the buffer.
+ * @public
+ */
+export function serializeWithBufferAndIndex(
+ object: Document,
+ finalBuffer: Uint8Array,
+ options: SerializeOptions = {}
+): number {
+ // Unpack the options
+ const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ const serializeFunctions =
+ typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined =
+ typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+ const startIndex = typeof options.index === 'number' ? options.index : 0;
+
+ // Attempt to serialize
+ const serializationIndex = serializeInto(
+ buffer,
+ object,
+ checkKeys,
+ 0,
+ 0,
+ serializeFunctions,
+ ignoreUndefined,
+ null
+ );
+
+ finalBuffer.set(buffer.subarray(0, serializationIndex), startIndex);
+
+ // Return the index
+ return startIndex + serializationIndex - 1;
+}
+
+/**
+ * Deserialize data as BSON.
+ *
+ * @param buffer - the buffer containing the serialized set of BSON documents.
+ * @returns returns the deserialized Javascript Object.
+ * @public
+ */
+export function deserialize(buffer: Uint8Array, options: DeserializeOptions = {}): Document {
+ return internalDeserialize(ByteUtils.toLocalBufferType(buffer), options);
+}
+
+/** @public */
+export type CalculateObjectSizeOptions = Pick<
+ SerializeOptions,
+ 'serializeFunctions' | 'ignoreUndefined'
+>;
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param object - the Javascript object to calculate the BSON byte size for
+ * @returns size of BSON object in bytes
+ * @public
+ */
+export function calculateObjectSize(
+ object: Document,
+ options: CalculateObjectSizeOptions = {}
+): number {
+ options = options || {};
+
+ const serializeFunctions =
+ typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ const ignoreUndefined =
+ typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
+
+ return internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined);
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * @param data - the buffer containing the serialized set of BSON documents.
+ * @param startIndex - the start index in the data Buffer where the deserialization is to start.
+ * @param numberOfDocuments - number of documents to deserialize.
+ * @param documents - an array where to store the deserialized documents.
+ * @param docStartIndex - the index in the documents array from where to start inserting documents.
+ * @param options - additional options used for the deserialization.
+ * @returns next index in the buffer after deserialization **x** numbers of documents.
+ * @public
+ */
+export function deserializeStream(
+ data: Uint8Array | ArrayBuffer,
+ startIndex: number,
+ numberOfDocuments: number,
+ documents: Document[],
+ docStartIndex: number,
+ options: DeserializeOptions
+): number {
+ const internalOptions = Object.assign(
+ { allowObjectSmallerThanBufferSize: true, index: 0 },
+ options
+ );
+ const bufferData = ByteUtils.toLocalBufferType(data);
+
+ let index = startIndex;
+ // Loop over all documents
+ for (let i = 0; i < numberOfDocuments; i++) {
+ // Find size of the document
+ const size = NumberUtils.getInt32LE(bufferData, index);
+ // Update options with index
+ internalOptions.index = index;
+ // Parse the document at this point
+ documents[docStartIndex + i] = internalDeserialize(bufferData, internalOptions);
+ // Adjust index by the document size
+ index = index + size;
+ }
+
+ // Return object containing end index of parsing and list of documents
+ return index;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/bson_value.ts b/week-3/04-course-app-hard/node_modules/bson/src/bson_value.ts
new file mode 100644
index 000000000..069764d8c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/bson_value.ts
@@ -0,0 +1,31 @@
+import { BSON_MAJOR_VERSION } from './constants';
+import { type InspectFn } from './parser/utils';
+
+/** @public */
+export abstract class BSONValue {
+ /** @public */
+ public abstract get _bsontype(): string;
+
+ /** @internal */
+ get [Symbol.for('@@mdb.bson.version')](): typeof BSON_MAJOR_VERSION {
+ return BSON_MAJOR_VERSION;
+ }
+
+ [Symbol.for('nodejs.util.inspect.custom')](
+ depth?: number,
+ options?: unknown,
+ inspect?: InspectFn
+ ): string {
+ return this.inspect(depth, options, inspect);
+ }
+
+ /**
+ * @public
+ * Prints a human-readable string of BSON value information
+ * If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify
+ */
+ public abstract inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;
+
+ /** @internal */
+ abstract toExtendedJSON(): unknown;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/code.ts b/week-3/04-course-app-hard/node_modules/bson/src/code.ts
new file mode 100644
index 000000000..98b1ede9a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/code.ts
@@ -0,0 +1,69 @@
+import type { Document } from './bson';
+import { BSONValue } from './bson_value';
+import { type InspectFn, defaultInspect } from './parser/utils';
+
+/** @public */
+export interface CodeExtended {
+ $code: string;
+ $scope?: Document;
+}
+
+/**
+ * A class representation of the BSON Code type.
+ * @public
+ * @category BSONType
+ */
+export class Code extends BSONValue {
+ get _bsontype(): 'Code' {
+ return 'Code';
+ }
+
+ code: string;
+
+ // a code instance having a null scope is what determines whether
+ // it is BSONType 0x0D (just code) / 0x0F (code with scope)
+ scope: Document | null;
+
+ /**
+ * @param code - a string or function.
+ * @param scope - an optional scope for the function.
+ */
+ constructor(code: string | Function, scope?: Document | null) {
+ super();
+ this.code = code.toString();
+ this.scope = scope ?? null;
+ }
+
+ toJSON(): { code: string; scope?: Document } {
+ if (this.scope != null) {
+ return { code: this.code, scope: this.scope };
+ }
+
+ return { code: this.code };
+ }
+
+ /** @internal */
+ toExtendedJSON(): CodeExtended {
+ if (this.scope) {
+ return { $code: this.code, $scope: this.scope };
+ }
+
+ return { $code: this.code };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: CodeExtended): Code {
+ return new Code(doc.$code, doc.$scope);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ let parametersString = inspect(this.code, options);
+ const multiLineFn = parametersString.includes('\n');
+ if (this.scope != null) {
+ parametersString += `,${multiLineFn ? '\n' : ' '}${inspect(this.scope, options)}`;
+ }
+ const endingNewline = multiLineFn && this.scope === null;
+ return `new Code(${multiLineFn ? '\n' : ''}${parametersString}${endingNewline ? '\n' : ''})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/constants.ts b/week-3/04-course-app-hard/node_modules/bson/src/constants.ts
new file mode 100644
index 000000000..7f273948b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/constants.ts
@@ -0,0 +1,144 @@
+/** @internal */
+export const BSON_MAJOR_VERSION = 6;
+
+/** @internal */
+export const BSON_INT32_MAX = 0x7fffffff;
+/** @internal */
+export const BSON_INT32_MIN = -0x80000000;
+/** @internal */
+export const BSON_INT64_MAX = Math.pow(2, 63) - 1;
+/** @internal */
+export const BSON_INT64_MIN = -Math.pow(2, 63);
+
+/**
+ * Any integer up to 2^53 can be precisely represented by a double.
+ * @internal
+ */
+export const JS_INT_MAX = Math.pow(2, 53);
+
+/**
+ * Any integer down to -2^53 can be precisely represented by a double.
+ * @internal
+ */
+export const JS_INT_MIN = -Math.pow(2, 53);
+
+/** Number BSON Type @internal */
+export const BSON_DATA_NUMBER = 1;
+
+/** String BSON Type @internal */
+export const BSON_DATA_STRING = 2;
+
+/** Object BSON Type @internal */
+export const BSON_DATA_OBJECT = 3;
+
+/** Array BSON Type @internal */
+export const BSON_DATA_ARRAY = 4;
+
+/** Binary BSON Type @internal */
+export const BSON_DATA_BINARY = 5;
+
+/** Binary BSON Type @internal */
+export const BSON_DATA_UNDEFINED = 6;
+
+/** ObjectId BSON Type @internal */
+export const BSON_DATA_OID = 7;
+
+/** Boolean BSON Type @internal */
+export const BSON_DATA_BOOLEAN = 8;
+
+/** Date BSON Type @internal */
+export const BSON_DATA_DATE = 9;
+
+/** null BSON Type @internal */
+export const BSON_DATA_NULL = 10;
+
+/** RegExp BSON Type @internal */
+export const BSON_DATA_REGEXP = 11;
+
+/** Code BSON Type @internal */
+export const BSON_DATA_DBPOINTER = 12;
+
+/** Code BSON Type @internal */
+export const BSON_DATA_CODE = 13;
+
+/** Symbol BSON Type @internal */
+export const BSON_DATA_SYMBOL = 14;
+
+/** Code with Scope BSON Type @internal */
+export const BSON_DATA_CODE_W_SCOPE = 15;
+
+/** 32 bit Integer BSON Type @internal */
+export const BSON_DATA_INT = 16;
+
+/** Timestamp BSON Type @internal */
+export const BSON_DATA_TIMESTAMP = 17;
+
+/** Long BSON Type @internal */
+export const BSON_DATA_LONG = 18;
+
+/** Decimal128 BSON Type @internal */
+export const BSON_DATA_DECIMAL128 = 19;
+
+/** MinKey BSON Type @internal */
+export const BSON_DATA_MIN_KEY = 0xff;
+
+/** MaxKey BSON Type @internal */
+export const BSON_DATA_MAX_KEY = 0x7f;
+
+/** Binary Default Type @internal */
+export const BSON_BINARY_SUBTYPE_DEFAULT = 0;
+
+/** Binary Function Type @internal */
+export const BSON_BINARY_SUBTYPE_FUNCTION = 1;
+
+/** Binary Byte Array Type @internal */
+export const BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+
+/** Binary Deprecated UUID Type @deprecated Please use BSON_BINARY_SUBTYPE_UUID_NEW @internal */
+export const BSON_BINARY_SUBTYPE_UUID = 3;
+
+/** Binary UUID Type @internal */
+export const BSON_BINARY_SUBTYPE_UUID_NEW = 4;
+
+/** Binary MD5 Type @internal */
+export const BSON_BINARY_SUBTYPE_MD5 = 5;
+
+/** Encrypted BSON type @internal */
+export const BSON_BINARY_SUBTYPE_ENCRYPTED = 6;
+
+/** Column BSON type @internal */
+export const BSON_BINARY_SUBTYPE_COLUMN = 7;
+
+/** Sensitive BSON type @internal */
+export const BSON_BINARY_SUBTYPE_SENSITIVE = 8;
+
+/** Binary User Defined Type @internal */
+export const BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+/** @public */
+export const BSONType = Object.freeze({
+ double: 1,
+ string: 2,
+ object: 3,
+ array: 4,
+ binData: 5,
+ undefined: 6,
+ objectId: 7,
+ bool: 8,
+ date: 9,
+ null: 10,
+ regex: 11,
+ dbPointer: 12,
+ javascript: 13,
+ symbol: 14,
+ javascriptWithScope: 15,
+ int: 16,
+ timestamp: 17,
+ long: 18,
+ decimal: 19,
+ minKey: -1,
+ maxKey: 127
+} as const);
+
+/** @public */
+export type BSONType = (typeof BSONType)[keyof typeof BSONType];
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/db_ref.ts b/week-3/04-course-app-hard/node_modules/bson/src/db_ref.ts
new file mode 100644
index 000000000..fbb751f8a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/db_ref.ts
@@ -0,0 +1,128 @@
+import type { Document } from './bson';
+import { BSONValue } from './bson_value';
+import type { EJSONOptions } from './extended_json';
+import type { ObjectId } from './objectid';
+import { type InspectFn, defaultInspect } from './parser/utils';
+
+/** @public */
+export interface DBRefLike {
+ $ref: string;
+ $id: ObjectId;
+ $db?: string;
+}
+
+/** @internal */
+export function isDBRefLike(value: unknown): value is DBRefLike {
+ return (
+ value != null &&
+ typeof value === 'object' &&
+ '$id' in value &&
+ value.$id != null &&
+ '$ref' in value &&
+ typeof value.$ref === 'string' &&
+ // If '$db' is defined it MUST be a string, otherwise it should be absent
+ (!('$db' in value) || ('$db' in value && typeof value.$db === 'string'))
+ );
+}
+
+/**
+ * A class representation of the BSON DBRef type.
+ * @public
+ * @category BSONType
+ */
+export class DBRef extends BSONValue {
+ get _bsontype(): 'DBRef' {
+ return 'DBRef';
+ }
+
+ collection!: string;
+ oid!: ObjectId;
+ db?: string;
+ fields!: Document;
+
+ /**
+ * @param collection - the collection name.
+ * @param oid - the reference ObjectId.
+ * @param db - optional db name, if omitted the reference is local to the current db.
+ */
+ constructor(collection: string, oid: ObjectId, db?: string, fields?: Document) {
+ super();
+ // check if namespace has been provided
+ const parts = collection.split('.');
+ if (parts.length === 2) {
+ db = parts.shift();
+ collection = parts.shift()!;
+ }
+
+ this.collection = collection;
+ this.oid = oid;
+ this.db = db;
+ this.fields = fields || {};
+ }
+
+ // Property provided for compatibility with the 1.x parser
+ // the 1.x parser used a "namespace" property, while 4.x uses "collection"
+
+ /** @internal */
+ get namespace(): string {
+ return this.collection;
+ }
+
+ set namespace(value: string) {
+ this.collection = value;
+ }
+
+ toJSON(): DBRefLike & Document {
+ const o = Object.assign(
+ {
+ $ref: this.collection,
+ $id: this.oid
+ },
+ this.fields
+ );
+
+ if (this.db != null) o.$db = this.db;
+ return o;
+ }
+
+ /** @internal */
+ toExtendedJSON(options?: EJSONOptions): DBRefLike {
+ options = options || {};
+ let o: DBRefLike = {
+ $ref: this.collection,
+ $id: this.oid
+ };
+
+ if (options.legacy) {
+ return o;
+ }
+
+ if (this.db) o.$db = this.db;
+ o = Object.assign(o, this.fields);
+ return o;
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: DBRefLike): DBRef {
+ const copy = Object.assign({}, doc) as Partial;
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(doc.$ref, doc.$id, doc.$db, copy);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+
+ const args = [
+ inspect(this.namespace, options),
+ inspect(this.oid, options),
+ ...(this.db ? [inspect(this.db, options)] : []),
+ ...(Object.keys(this.fields).length > 0 ? [inspect(this.fields, options)] : [])
+ ];
+
+ args[1] = inspect === defaultInspect ? `new ObjectId(${args[1]})` : args[1];
+
+ return `new DBRef(${args.join(', ')})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/decimal128.ts b/week-3/04-course-app-hard/node_modules/bson/src/decimal128.ts
new file mode 100644
index 000000000..806938e30
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/decimal128.ts
@@ -0,0 +1,855 @@
+import { BSONValue } from './bson_value';
+import { BSONError } from './error';
+import { Long } from './long';
+import { type InspectFn, defaultInspect, isUint8Array } from './parser/utils';
+import { ByteUtils } from './utils/byte_utils';
+
+const PARSE_STRING_REGEXP = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/;
+const PARSE_INF_REGEXP = /^(\+|-)?(Infinity|inf)$/i;
+const PARSE_NAN_REGEXP = /^(\+|-)?NaN$/i;
+
+const EXPONENT_MAX = 6111;
+const EXPONENT_MIN = -6176;
+const EXPONENT_BIAS = 6176;
+const MAX_DIGITS = 34;
+
+// Nan value bits as 32 bit values (due to lack of longs)
+const NAN_BUFFER = ByteUtils.fromNumberArray(
+ [
+ 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ ].reverse()
+);
+// Infinity value bits 32 bit values (due to lack of longs)
+const INF_NEGATIVE_BUFFER = ByteUtils.fromNumberArray(
+ [
+ 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ ].reverse()
+);
+const INF_POSITIVE_BUFFER = ByteUtils.fromNumberArray(
+ [
+ 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ ].reverse()
+);
+
+const EXPONENT_REGEX = /^([-+])?(\d+)?$/;
+
+// Extract least significant 5 bits
+const COMBINATION_MASK = 0x1f;
+// Extract least significant 14 bits
+const EXPONENT_MASK = 0x3fff;
+// Value of combination field for Inf
+const COMBINATION_INFINITY = 30;
+// Value of combination field for NaN
+const COMBINATION_NAN = 31;
+
+// Detect if the value is a digit
+function isDigit(value: string): boolean {
+ return !isNaN(parseInt(value, 10));
+}
+
+// Divide two uint128 values
+function divideu128(value: { parts: [number, number, number, number] }) {
+ const DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ let _rem = Long.fromNumber(0);
+
+ if (!value.parts[0] && !value.parts[1] && !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+
+ for (let i = 0; i <= 3; i++) {
+ // Adjust remainder to match value of next dividend
+ _rem = _rem.shiftLeft(32);
+ // Add the divided to _rem
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low;
+ _rem = _rem.modulo(DIVISOR);
+ }
+
+ return { quotient: value, rem: _rem };
+}
+
+// Multiply two Long values and return the 128 bit value
+function multiply64x2(left: Long, right: Long): { high: Long; low: Long } {
+ if (!left && !right) {
+ return { high: Long.fromNumber(0), low: Long.fromNumber(0) };
+ }
+
+ const leftHigh = left.shiftRightUnsigned(32);
+ const leftLow = new Long(left.getLowBits(), 0);
+ const rightHigh = right.shiftRightUnsigned(32);
+ const rightLow = new Long(right.getLowBits(), 0);
+
+ let productHigh = leftHigh.multiply(rightHigh);
+ let productMid = leftHigh.multiply(rightLow);
+ const productMid2 = leftLow.multiply(rightHigh);
+ let productLow = leftLow.multiply(rightLow);
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0)
+ .add(productMid2)
+ .add(productLow.shiftRightUnsigned(32));
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+
+ // Return the 128 bit result
+ return { high: productHigh, low: productLow };
+}
+
+function lessThan(left: Long, right: Long): boolean {
+ // Make values unsigned
+ const uhleft = left.high >>> 0;
+ const uhright = right.high >>> 0;
+
+ // Compare high bits first
+ if (uhleft < uhright) {
+ return true;
+ } else if (uhleft === uhright) {
+ const ulleft = left.low >>> 0;
+ const ulright = right.low >>> 0;
+ if (ulleft < ulright) return true;
+ }
+
+ return false;
+}
+
+function invalidErr(string: string, message: string) {
+ throw new BSONError(`"${string}" is not a valid Decimal128 string - ${message}`);
+}
+
+/** @public */
+export interface Decimal128Extended {
+ $numberDecimal: string;
+}
+
+/**
+ * A class representation of the BSON Decimal128 type.
+ * @public
+ * @category BSONType
+ */
+export class Decimal128 extends BSONValue {
+ get _bsontype(): 'Decimal128' {
+ return 'Decimal128';
+ }
+
+ readonly bytes!: Uint8Array;
+
+ /**
+ * @param bytes - a buffer containing the raw Decimal128 bytes in little endian order,
+ * or a string representation as returned by .toString()
+ */
+ constructor(bytes: Uint8Array | string) {
+ super();
+ if (typeof bytes === 'string') {
+ this.bytes = Decimal128.fromString(bytes).bytes;
+ } else if (isUint8Array(bytes)) {
+ if (bytes.byteLength !== 16) {
+ throw new BSONError('Decimal128 must take a Buffer of 16 bytes');
+ }
+ this.bytes = bytes;
+ } else {
+ throw new BSONError('Decimal128 must take a Buffer or string');
+ }
+ }
+
+ /**
+ * Create a Decimal128 instance from a string representation
+ *
+ * @param representation - a numeric string representation.
+ */
+ static fromString(representation: string): Decimal128 {
+ return Decimal128._fromString(representation, { allowRounding: false });
+ }
+
+ /**
+ * Create a Decimal128 instance from a string representation, allowing for rounding to 34
+ * significant digits
+ *
+ * @example Example of a number that will be rounded
+ * ```ts
+ * > let d = Decimal128.fromString('37.499999999999999196428571428571375')
+ * Uncaught:
+ * BSONError: "37.499999999999999196428571428571375" is not a valid Decimal128 string - inexact rounding
+ * at invalidErr (/home/wajames/js-bson/lib/bson.cjs:1402:11)
+ * at Decimal128.fromStringInternal (/home/wajames/js-bson/lib/bson.cjs:1633:25)
+ * at Decimal128.fromString (/home/wajames/js-bson/lib/bson.cjs:1424:27)
+ *
+ * > d = Decimal128.fromStringWithRounding('37.499999999999999196428571428571375')
+ * new Decimal128("37.49999999999999919642857142857138")
+ * ```
+ * @param representation - a numeric string representation.
+ */
+ static fromStringWithRounding(representation: string): Decimal128 {
+ return Decimal128._fromString(representation, { allowRounding: true });
+ }
+
+ private static _fromString(representation: string, options: { allowRounding: boolean }) {
+ // Parse state tracking
+ let isNegative = false;
+ let sawSign = false;
+ let sawRadix = false;
+ let foundNonZero = false;
+
+ // Total number of significant digits (no leading or trailing zero)
+ let significantDigits = 0;
+ // Total number of significand digits read
+ let nDigitsRead = 0;
+ // Total number of digits (no leading zeros)
+ let nDigits = 0;
+ // The number of the digits after radix
+ let radixPosition = 0;
+ // The index of the first non-zero in *str*
+ let firstNonZero = 0;
+
+ // Digits Array
+ const digits = [0];
+ // The number of digits in digits
+ let nDigitsStored = 0;
+ // Insertion pointer for digits
+ let digitsInsert = 0;
+ // The index of the last digit
+ let lastDigit = 0;
+
+ // Exponent
+ let exponent = 0;
+ // The high 17 digits of the significand
+ let significandHigh = new Long(0, 0);
+ // The low 17 digits of the significand
+ let significandLow = new Long(0, 0);
+ // The biased exponent
+ let biasedExponent = 0;
+
+ // Read index
+ let index = 0;
+
+ // Naively prevent against REDOS attacks.
+ // TODO: implementing a custom parsing for this, or refactoring the regex would yield
+ // further gains.
+ if (representation.length >= 7000) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+
+ // Results
+ const stringMatch = representation.match(PARSE_STRING_REGEXP);
+ const infMatch = representation.match(PARSE_INF_REGEXP);
+ const nanMatch = representation.match(PARSE_NAN_REGEXP);
+
+ // Validate the string
+ if ((!stringMatch && !infMatch && !nanMatch) || representation.length === 0) {
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+ }
+
+ if (stringMatch) {
+ // full_match = stringMatch[0]
+ // sign = stringMatch[1]
+
+ const unsignedNumber = stringMatch[2];
+ // stringMatch[3] is undefined if a whole number (ex "1", 12")
+ // but defined if a number w/ decimal in it (ex "1.0, 12.2")
+
+ const e = stringMatch[4];
+ const expSign = stringMatch[5];
+ const expNumber = stringMatch[6];
+
+ // they provided e, but didn't give an exponent number. for ex "1e"
+ if (e && expNumber === undefined) invalidErr(representation, 'missing exponent power');
+
+ // they provided e, but didn't give a number before it. for ex "e1"
+ if (e && unsignedNumber === undefined) invalidErr(representation, 'missing exponent base');
+
+ if (e === undefined && (expSign || expNumber)) {
+ invalidErr(representation, 'missing e before exponent');
+ }
+ }
+
+ // Get the negative or positive sign
+ if (representation[index] === '+' || representation[index] === '-') {
+ sawSign = true;
+ isNegative = representation[index++] === '-';
+ }
+
+ // Check if user passed Infinity or NaN
+ if (!isDigit(representation[index]) && representation[index] !== '.') {
+ if (representation[index] === 'i' || representation[index] === 'I') {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ } else if (representation[index] === 'N') {
+ return new Decimal128(NAN_BUFFER);
+ }
+ }
+
+ // Read all the digits
+ while (isDigit(representation[index]) || representation[index] === '.') {
+ if (representation[index] === '.') {
+ if (sawRadix) invalidErr(representation, 'contains multiple periods');
+
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+
+ if (nDigitsStored < MAX_DIGITS) {
+ if (representation[index] !== '0' || foundNonZero) {
+ if (!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+
+ foundNonZero = true;
+
+ // Only store 34 digits
+ digits[digitsInsert++] = parseInt(representation[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+
+ if (foundNonZero) nDigits = nDigits + 1;
+ if (sawRadix) radixPosition = radixPosition + 1;
+
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+
+ if (sawRadix && !nDigitsRead)
+ throw new BSONError('' + representation + ' not a valid Decimal128 string');
+
+ // Read exponent if exists
+ if (representation[index] === 'e' || representation[index] === 'E') {
+ // Read exponent digits
+ const match = representation.substr(++index).match(EXPONENT_REGEX);
+
+ // No digits read
+ if (!match || !match[2]) return new Decimal128(NAN_BUFFER);
+
+ // Get exponent
+ exponent = parseInt(match[0], 10);
+
+ // Adjust the index
+ index = index + match[0].length;
+ }
+
+ // Return not a number
+ if (representation[index]) return new Decimal128(NAN_BUFFER);
+
+ // Done reading input
+ // Find first non-zero digit in digits
+ if (!nDigitsStored) {
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ } else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+ if (significantDigits !== 1) {
+ while (
+ representation[
+ firstNonZero + significantDigits - 1 + Number(sawSign) + Number(sawRadix)
+ ] === '0'
+ ) {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+
+ // Normalization of exponent
+ // Correct exponent based on radix position, and shift significand as needed
+ // to represent user input
+
+ // Overflow prevention
+ if (exponent <= radixPosition && radixPosition > exponent + (1 << 14)) {
+ exponent = EXPONENT_MIN;
+ } else {
+ exponent = exponent - radixPosition;
+ }
+
+ // Attempt to normalize the exponent
+ while (exponent > EXPONENT_MAX) {
+ // Shift exponent to significand and decrease
+ lastDigit = lastDigit + 1;
+ if (lastDigit >= MAX_DIGITS) {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+
+ invalidErr(representation, 'overflow');
+ }
+ exponent = exponent - 1;
+ }
+
+ if (options.allowRounding) {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ // Shift last digit. can only do this if < significant digits than # stored.
+ if (lastDigit === 0 && significantDigits < nDigitsStored) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+
+ if (nDigitsStored < nDigits) {
+ // adjust to match digits not stored
+ nDigits = nDigits - 1;
+ } else {
+ // adjust to round
+ lastDigit = lastDigit - 1;
+ }
+
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ } else {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ const digitsString = digits.join('');
+ if (digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ }
+ invalidErr(representation, 'overflow');
+ }
+ }
+
+ // Round
+ // We've normalized the exponent, but might still need to round.
+ if (lastDigit + 1 < significantDigits) {
+ let endOfString = nDigitsRead;
+
+ // If we have seen a radix point, 'string' is 1 longer than we have
+ // documented with ndigits_read, so inc the position of the first nonzero
+ // digit and the position that digits are read to.
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+ // if negative, we need to increment again to account for - sign at start.
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+ let roundBit = 0;
+
+ if (roundDigit >= 5) {
+ roundBit = 1;
+ if (roundDigit === 5) {
+ roundBit = digits[lastDigit] % 2 === 1 ? 1 : 0;
+ for (let i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if (parseInt(representation[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ if (roundBit) {
+ let dIdx = lastDigit;
+
+ for (; dIdx >= 0; dIdx--) {
+ if (++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+
+ // overflowed most significant digit
+ if (dIdx === 0) {
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ } else {
+ return new Decimal128(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER);
+ }
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ // Shift last digit. can only do this if < significant digits than # stored.
+ if (lastDigit === 0) {
+ if (significantDigits === 0) {
+ exponent = EXPONENT_MIN;
+ break;
+ }
+
+ invalidErr(representation, 'exponent underflow');
+ }
+
+ if (nDigitsStored < nDigits) {
+ if (
+ representation[nDigits - 1 + Number(sawSign) + Number(sawRadix)] !== '0' &&
+ significantDigits !== 0
+ ) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ // adjust to match digits not stored
+ nDigits = nDigits - 1;
+ } else {
+ if (digits[lastDigit] !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ // adjust to round
+ lastDigit = lastDigit - 1;
+ }
+
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ } else {
+ invalidErr(representation, 'overflow');
+ }
+ }
+
+ // Round
+ // We've normalized the exponent, but might still need to round.
+ if (lastDigit + 1 < significantDigits) {
+ // If we have seen a radix point, 'string' is 1 longer than we have
+ // documented with ndigits_read, so inc the position of the first nonzero
+ // digit and the position that digits are read to.
+ if (sawRadix) {
+ firstNonZero = firstNonZero + 1;
+ }
+ // if saw sign, we need to increment again to account for - or + sign at start.
+ if (sawSign) {
+ firstNonZero = firstNonZero + 1;
+ }
+
+ const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
+
+ if (roundDigit !== 0) {
+ invalidErr(representation, 'inexact rounding');
+ }
+ }
+ }
+
+ // Encode significand
+ // The high 17 digits of the significand
+ significandHigh = Long.fromNumber(0);
+ // The low 17 digits of the significand
+ significandLow = Long.fromNumber(0);
+
+ // read a zero
+ if (significantDigits === 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ } else if (lastDigit < 17) {
+ let dIdx = 0;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ } else {
+ let dIdx = 0;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+
+ for (; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+
+ significandLow = Long.fromNumber(digits[dIdx++]);
+
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+
+ const significand = multiply64x2(significandHigh, Long.fromString('100000000000000000'));
+ significand.low = significand.low.add(significandLow);
+
+ if (lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+
+ // Biased exponent
+ biasedExponent = exponent + EXPONENT_BIAS;
+ const dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+
+ // Encode combination, exponent, and significand.
+ if (
+ significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber(1))
+ ) {
+ // Encode '11' into bits 1 to 3
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(
+ Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47))
+ );
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ } else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+
+ dec.low = significand.low;
+
+ // Encode sign
+ if (isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+
+ // Encode into a buffer
+ const buffer = ByteUtils.allocateUnsafe(16);
+ index = 0;
+
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.low.low & 0xff;
+ buffer[index++] = (dec.low.low >> 8) & 0xff;
+ buffer[index++] = (dec.low.low >> 16) & 0xff;
+ buffer[index++] = (dec.low.low >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.low.high & 0xff;
+ buffer[index++] = (dec.low.high >> 8) & 0xff;
+ buffer[index++] = (dec.low.high >> 16) & 0xff;
+ buffer[index++] = (dec.low.high >> 24) & 0xff;
+
+ // Encode the high 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.high.low & 0xff;
+ buffer[index++] = (dec.high.low >> 8) & 0xff;
+ buffer[index++] = (dec.high.low >> 16) & 0xff;
+ buffer[index++] = (dec.high.low >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.high.high & 0xff;
+ buffer[index++] = (dec.high.high >> 8) & 0xff;
+ buffer[index++] = (dec.high.high >> 16) & 0xff;
+ buffer[index++] = (dec.high.high >> 24) & 0xff;
+
+ // Return the new Decimal128
+ return new Decimal128(buffer);
+ }
+ /** Create a string representation of the raw Decimal128 value */
+ toString(): string {
+ // Note: bits in this routine are referred to starting at 0,
+ // from the sign bit, towards the coefficient.
+
+ // decoded biased exponent (14 bits)
+ let biased_exponent;
+ // the number of significand digits
+ let significand_digits = 0;
+ // the base-10 digits in the significand
+ const significand = new Array(36);
+ for (let i = 0; i < significand.length; i++) significand[i] = 0;
+ // read pointer into significand
+ let index = 0;
+
+ // true if the number is zero
+ let is_zero = false;
+
+ // the most significant significand bits (50-46)
+ let significand_msb;
+ // temporary storage for significand decoding
+ let significand128: { parts: [number, number, number, number] } = { parts: [0, 0, 0, 0] };
+ // indexing variables
+ let j, k;
+
+ // Output string
+ const string: string[] = [];
+
+ // Unpack index
+ index = 0;
+
+ // Buffer reference
+ const buffer = this.bytes;
+
+ // Unpack the low 64bits into a long
+ // bits 96 - 127
+ const low =
+ buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ // bits 64 - 95
+ const midl =
+ buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+
+ // Unpack the high 64bits into a long
+ // bits 32 - 63
+ const midh =
+ buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+ // bits 0 - 31
+ const high =
+ buffer[index++] | (buffer[index++] << 8) | (buffer[index++] << 16) | (buffer[index++] << 24);
+
+ // Unpack index
+ index = 0;
+
+ // Create the state of the decimal
+ const dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high)
+ };
+
+ if (dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+
+ // Decode combination field and exponent
+ // bits 1 - 5
+ const combination = (high >> 26) & COMBINATION_MASK;
+
+ if (combination >> 3 === 3) {
+ // Check for 'special' values
+ if (combination === COMBINATION_INFINITY) {
+ return string.join('') + 'Infinity';
+ } else if (combination === COMBINATION_NAN) {
+ return 'NaN';
+ } else {
+ biased_exponent = (high >> 15) & EXPONENT_MASK;
+ significand_msb = 0x08 + ((high >> 14) & 0x01);
+ }
+ } else {
+ significand_msb = (high >> 14) & 0x07;
+ biased_exponent = (high >> 17) & EXPONENT_MASK;
+ }
+
+ // unbiased exponent
+ const exponent = biased_exponent - EXPONENT_BIAS;
+
+ // Create string of significand digits
+
+ // Convert the 114-bit binary number represented by
+ // (significand_high, significand_low) to at most 34 decimal
+ // digits through modulo and division.
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+
+ if (
+ significand128.parts[0] === 0 &&
+ significand128.parts[1] === 0 &&
+ significand128.parts[2] === 0 &&
+ significand128.parts[3] === 0
+ ) {
+ is_zero = true;
+ } else {
+ for (k = 3; k >= 0; k--) {
+ let least_digits = 0;
+ // Perform the divide
+ const result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low;
+
+ // We now have the 9 least significant digits (in base 2).
+ // Convert and output to string.
+ if (!least_digits) continue;
+
+ for (j = 8; j >= 0; j--) {
+ // significand[k * 9 + j] = Math.round(least_digits % 10);
+ significand[k * 9 + j] = least_digits % 10;
+ // least_digits = Math.round(least_digits / 10);
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+
+ // Output format options:
+ // Scientific - [-]d.dddE(+/-)dd or [-]dE(+/-)dd
+ // Regular - ddd.ddd
+
+ if (is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ } else {
+ significand_digits = 36;
+ while (!significand[index]) {
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+
+ // the exponent if scientific notation is used
+ const scientific_exponent = significand_digits - 1 + exponent;
+
+ // The scientific exponent checks are dictated by the string conversion
+ // specification and are somewhat arbitrary cutoffs.
+ //
+ // We must check exponent > 0, because if this is the case, the number
+ // has trailing zeros. However, we *cannot* output these trailing zeros,
+ // because doing so would change the precision of the value, and would
+ // change stored data if the string converted number is round tripped.
+ if (scientific_exponent >= 34 || scientific_exponent <= -7 || exponent > 0) {
+ // Scientific format
+
+ // if there are too many significant digits, we should just be treating numbers
+ // as + or - 0 and using the non-scientific exponent (this is for the "invalid
+ // representation should be treated as 0/-0" spec cases in decimal128-1.json)
+ if (significand_digits > 34) {
+ string.push(`${0}`);
+ if (exponent > 0) string.push(`E+${exponent}`);
+ else if (exponent < 0) string.push(`E${exponent}`);
+ return string.join('');
+ }
+
+ string.push(`${significand[index++]}`);
+ significand_digits = significand_digits - 1;
+
+ if (significand_digits) {
+ string.push('.');
+ }
+
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+
+ // Exponent
+ string.push('E');
+ if (scientific_exponent > 0) {
+ string.push(`+${scientific_exponent}`);
+ } else {
+ string.push(`${scientific_exponent}`);
+ }
+ } else {
+ // Regular format with no decimal place
+ if (exponent >= 0) {
+ for (let i = 0; i < significand_digits; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ } else {
+ let radix_position = significand_digits + exponent;
+
+ // non-zero digits before radix
+ if (radix_position > 0) {
+ for (let i = 0; i < radix_position; i++) {
+ string.push(`${significand[index++]}`);
+ }
+ } else {
+ string.push('0');
+ }
+
+ string.push('.');
+ // add leading zeros after radix
+ while (radix_position++ < 0) {
+ string.push('0');
+ }
+
+ for (let i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(`${significand[index++]}`);
+ }
+ }
+ }
+
+ return string.join('');
+ }
+
+ toJSON(): Decimal128Extended {
+ return { $numberDecimal: this.toString() };
+ }
+
+ /** @internal */
+ toExtendedJSON(): Decimal128Extended {
+ return { $numberDecimal: this.toString() };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: Decimal128Extended): Decimal128 {
+ return Decimal128.fromString(doc.$numberDecimal);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ const d128string = inspect(this.toString(), options);
+ return `new Decimal128(${d128string})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/double.ts b/week-3/04-course-app-hard/node_modules/bson/src/double.ts
new file mode 100644
index 000000000..4a3d12982
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/double.ts
@@ -0,0 +1,115 @@
+import { BSONValue } from './bson_value';
+import { BSONError } from './error';
+import type { EJSONOptions } from './extended_json';
+import { type InspectFn, defaultInspect } from './parser/utils';
+
+/** @public */
+export interface DoubleExtended {
+ $numberDouble: string;
+}
+
+/**
+ * A class representation of the BSON Double type.
+ * @public
+ * @category BSONType
+ */
+export class Double extends BSONValue {
+ get _bsontype(): 'Double' {
+ return 'Double';
+ }
+
+ value!: number;
+ /**
+ * Create a Double type
+ *
+ * @param value - the number we want to represent as a double.
+ */
+ constructor(value: number) {
+ super();
+ if ((value as unknown) instanceof Number) {
+ value = value.valueOf();
+ }
+
+ this.value = +value;
+ }
+
+ /**
+ * Attempt to create an double type from string.
+ *
+ * This method will throw a BSONError on any string input that is not representable as a IEEE-754 64-bit double.
+ * Notably, this method will also throw on the following string formats:
+ * - Strings in non-decimal and non-exponential formats (binary, hex, or octal digits)
+ * - Strings with characters other than numeric, floating point, or leading sign characters (Note: 'Infinity', '-Infinity', and 'NaN' input strings are still allowed)
+ * - Strings with leading and/or trailing whitespace
+ *
+ * Strings with leading zeros, however, are also allowed
+ *
+ * @param value - the string we want to represent as a double.
+ */
+ static fromString(value: string): Double {
+ const coercedValue = Number(value);
+
+ if (value === 'NaN') return new Double(NaN);
+ if (value === 'Infinity') return new Double(Infinity);
+ if (value === '-Infinity') return new Double(-Infinity);
+
+ if (!Number.isFinite(coercedValue)) {
+ throw new BSONError(`Input: ${value} is not representable as a Double`);
+ }
+ if (value.trim() !== value) {
+ throw new BSONError(`Input: '${value}' contains whitespace`);
+ }
+ if (value === '') {
+ throw new BSONError(`Input is an empty string`);
+ }
+ if (/[^-0-9.+eE]/.test(value)) {
+ throw new BSONError(`Input: '${value}' is not in decimal or exponential notation`);
+ }
+ return new Double(coercedValue);
+ }
+
+ /**
+ * Access the number value.
+ *
+ * @returns returns the wrapped double number.
+ */
+ valueOf(): number {
+ return this.value;
+ }
+
+ toJSON(): number {
+ return this.value;
+ }
+
+ toString(radix?: number): string {
+ return this.value.toString(radix);
+ }
+
+ /** @internal */
+ toExtendedJSON(options?: EJSONOptions): number | DoubleExtended {
+ if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
+ return this.value;
+ }
+
+ if (Object.is(Math.sign(this.value), -0)) {
+ // NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
+ // explicitly provided `-0` then we need to ensure the sign makes it into the output
+ return { $numberDouble: '-0.0' };
+ }
+
+ return {
+ $numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
+ };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: DoubleExtended, options?: EJSONOptions): number | Double {
+ const doubleValue = parseFloat(doc.$numberDouble);
+ return options && options.relaxed ? doubleValue : new Double(doubleValue);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ return `new Double(${inspect(this.value, options)})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/error.ts b/week-3/04-course-app-hard/node_modules/bson/src/error.ts
new file mode 100644
index 000000000..ef5184a4a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/error.ts
@@ -0,0 +1,105 @@
+import { BSON_MAJOR_VERSION } from './constants';
+
+/**
+ * @public
+ * @category Error
+ *
+ * `BSONError` objects are thrown when BSON encounters an error.
+ *
+ * This is the parent class for all the other errors thrown by this library.
+ */
+export class BSONError extends Error {
+ /**
+ * @internal
+ * The underlying algorithm for isBSONError may change to improve how strict it is
+ * about determining if an input is a BSONError. But it must remain backwards compatible
+ * with previous minors & patches of the current major version.
+ */
+ protected get bsonError(): true {
+ return true;
+ }
+
+ override get name(): string {
+ return 'BSONError';
+ }
+
+ constructor(message: string, options?: { cause?: unknown }) {
+ super(message, options);
+ }
+
+ /**
+ * @public
+ *
+ * All errors thrown from the BSON library inherit from `BSONError`.
+ * This method can assist with determining if an error originates from the BSON library
+ * even if it does not pass an `instanceof` check against this class' constructor.
+ *
+ * @param value - any javascript value that needs type checking
+ */
+ public static isBSONError(value: unknown): value is BSONError {
+ return (
+ value != null &&
+ typeof value === 'object' &&
+ 'bsonError' in value &&
+ value.bsonError === true &&
+ // Do not access the following properties, just check existence
+ 'name' in value &&
+ 'message' in value &&
+ 'stack' in value
+ );
+ }
+}
+
+/**
+ * @public
+ * @category Error
+ */
+export class BSONVersionError extends BSONError {
+ get name(): 'BSONVersionError' {
+ return 'BSONVersionError';
+ }
+
+ constructor() {
+ super(`Unsupported BSON version, bson types must be from bson ${BSON_MAJOR_VERSION}.x.x`);
+ }
+}
+
+/**
+ * @public
+ * @category Error
+ *
+ * An error generated when BSON functions encounter an unexpected input
+ * or reaches an unexpected/invalid internal state
+ *
+ */
+export class BSONRuntimeError extends BSONError {
+ get name(): 'BSONRuntimeError' {
+ return 'BSONRuntimeError';
+ }
+
+ constructor(message: string) {
+ super(message);
+ }
+}
+
+/**
+ * @public
+ * @category Error
+ *
+ * @experimental
+ *
+ * An error generated when BSON bytes are invalid.
+ * Reports the offset the parser was able to reach before encountering the error.
+ */
+export class BSONOffsetError extends BSONError {
+ public get name(): 'BSONOffsetError' {
+ return 'BSONOffsetError';
+ }
+
+ public offset: number;
+
+ constructor(message: string, offset: number, options?: { cause?: unknown }) {
+ super(`${message}. offset: ${offset}`, options);
+ this.offset = offset;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/extended_json.ts b/week-3/04-course-app-hard/node_modules/bson/src/extended_json.ts
new file mode 100644
index 000000000..eb08b3c1f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/extended_json.ts
@@ -0,0 +1,515 @@
+import { Binary } from './binary';
+import type { Document } from './bson';
+import { Code } from './code';
+import {
+ BSON_INT32_MAX,
+ BSON_INT32_MIN,
+ BSON_INT64_MAX,
+ BSON_INT64_MIN,
+ BSON_MAJOR_VERSION
+} from './constants';
+import { DBRef, isDBRefLike } from './db_ref';
+import { Decimal128 } from './decimal128';
+import { Double } from './double';
+import { BSONError, BSONRuntimeError, BSONVersionError } from './error';
+import { Int32 } from './int_32';
+import { Long } from './long';
+import { MaxKey } from './max_key';
+import { MinKey } from './min_key';
+import { ObjectId } from './objectid';
+import { isDate, isRegExp, isMap } from './parser/utils';
+import { BSONRegExp } from './regexp';
+import { BSONSymbol } from './symbol';
+import { Timestamp } from './timestamp';
+
+/** @public */
+export type EJSONOptions = {
+ /**
+ * Output using the Extended JSON v1 spec
+ * @defaultValue `false`
+ */
+ legacy?: boolean;
+ /**
+ * Enable Extended JSON's `relaxed` mode, which attempts to return native JS types where possible, rather than BSON types
+ * @defaultValue `false` */
+ relaxed?: boolean;
+ /**
+ * Enable native bigint support
+ * @defaultValue `false`
+ */
+ useBigInt64?: boolean;
+};
+
+/** @internal */
+type BSONType =
+ | Binary
+ | Code
+ | DBRef
+ | Decimal128
+ | Double
+ | Int32
+ | Long
+ | MaxKey
+ | MinKey
+ | ObjectId
+ | BSONRegExp
+ | BSONSymbol
+ | Timestamp;
+
+function isBSONType(value: unknown): value is BSONType {
+ return (
+ value != null &&
+ typeof value === 'object' &&
+ '_bsontype' in value &&
+ typeof value._bsontype === 'string'
+ );
+}
+
+// all the types where we don't need to do any special processing and can just pass the EJSON
+//straight to type.fromExtendedJSON
+const keysToCodecs = {
+ $oid: ObjectId,
+ $binary: Binary,
+ $uuid: Binary,
+ $symbol: BSONSymbol,
+ $numberInt: Int32,
+ $numberDecimal: Decimal128,
+ $numberDouble: Double,
+ $numberLong: Long,
+ $minKey: MinKey,
+ $maxKey: MaxKey,
+ $regex: BSONRegExp,
+ $regularExpression: BSONRegExp,
+ $timestamp: Timestamp
+} as const;
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function deserializeValue(value: any, options: EJSONOptions = {}) {
+ if (typeof value === 'number') {
+ // TODO(NODE-4377): EJSON js number handling diverges from BSON
+ const in32BitRange = value <= BSON_INT32_MAX && value >= BSON_INT32_MIN;
+ const in64BitRange = value <= BSON_INT64_MAX && value >= BSON_INT64_MIN;
+
+ if (options.relaxed || options.legacy) {
+ return value;
+ }
+
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ // interpret as being of the smallest BSON integer type that can represent the number exactly
+ if (in32BitRange) {
+ return new Int32(value);
+ }
+ if (in64BitRange) {
+ if (options.useBigInt64) {
+ // eslint-disable-next-line no-restricted-globals -- This is allowed here as useBigInt64=true
+ return BigInt(value);
+ }
+ return Long.fromNumber(value);
+ }
+ }
+
+ // If the number is a non-integer or out of integer range, should interpret as BSON Double.
+ return new Double(value);
+ }
+
+ // from here on out we're looking for bson types, so bail if its not an object
+ if (value == null || typeof value !== 'object') return value;
+
+ // upgrade deprecated undefined to null
+ if (value.$undefined) return null;
+
+ const keys = Object.keys(value).filter(
+ k => k.startsWith('$') && value[k] != null
+ ) as (keyof typeof keysToCodecs)[];
+ for (let i = 0; i < keys.length; i++) {
+ const c = keysToCodecs[keys[i]];
+ if (c) return c.fromExtendedJSON(value, options);
+ }
+
+ if (value.$date != null) {
+ const d = value.$date;
+ const date = new Date();
+
+ if (options.legacy) {
+ if (typeof d === 'number') date.setTime(d);
+ else if (typeof d === 'string') date.setTime(Date.parse(d));
+ else if (typeof d === 'bigint') date.setTime(Number(d));
+ else throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ } else {
+ if (typeof d === 'string') date.setTime(Date.parse(d));
+ else if (Long.isLong(d)) date.setTime(d.toNumber());
+ else if (typeof d === 'number' && options.relaxed) date.setTime(d);
+ else if (typeof d === 'bigint') date.setTime(Number(d));
+ else throw new BSONRuntimeError(`Unrecognized type for EJSON date: ${typeof d}`);
+ }
+ return date;
+ }
+
+ if (value.$code != null) {
+ const copy = Object.assign({}, value);
+ if (value.$scope) {
+ copy.$scope = deserializeValue(value.$scope);
+ }
+
+ return Code.fromExtendedJSON(value);
+ }
+
+ if (isDBRefLike(value) || value.$dbPointer) {
+ const v = value.$ref ? value : value.$dbPointer;
+
+ // we run into this in a "degenerate EJSON" case (with $id and $ref order flipped)
+ // because of the order JSON.parse goes through the document
+ if (v instanceof DBRef) return v;
+
+ const dollarKeys = Object.keys(v).filter(k => k.startsWith('$'));
+ let valid = true;
+ dollarKeys.forEach(k => {
+ if (['$ref', '$id', '$db'].indexOf(k) === -1) valid = false;
+ });
+
+ // only make DBRef if $ keys are all valid
+ if (valid) return DBRef.fromExtendedJSON(v);
+ }
+
+ return value;
+}
+
+type EJSONSerializeOptions = EJSONOptions & {
+ seenObjects: { obj: unknown; propertyName: string }[];
+};
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function serializeArray(array: any[], options: EJSONSerializeOptions): any[] {
+ return array.map((v: unknown, index: number) => {
+ options.seenObjects.push({ propertyName: `index ${index}`, obj: null });
+ try {
+ return serializeValue(v, options);
+ } finally {
+ options.seenObjects.pop();
+ }
+ });
+}
+
+function getISOString(date: Date) {
+ const isoStr = date.toISOString();
+ // we should only show milliseconds in timestamp if they're non-zero
+ return date.getUTCMilliseconds() !== 0 ? isoStr : isoStr.slice(0, -5) + 'Z';
+}
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function serializeValue(value: any, options: EJSONSerializeOptions): any {
+ if (value instanceof Map || isMap(value)) {
+ const obj: Record = Object.create(null);
+ for (const [k, v] of value) {
+ if (typeof k !== 'string') {
+ throw new BSONError('Can only serialize maps with string keys');
+ }
+ obj[k] = v;
+ }
+
+ return serializeValue(obj, options);
+ }
+
+ if ((typeof value === 'object' || typeof value === 'function') && value !== null) {
+ const index = options.seenObjects.findIndex(entry => entry.obj === value);
+ if (index !== -1) {
+ const props = options.seenObjects.map(entry => entry.propertyName);
+ const leadingPart = props
+ .slice(0, index)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const alreadySeen = props[index];
+ const circularPart =
+ ' -> ' +
+ props
+ .slice(index + 1, props.length - 1)
+ .map(prop => `${prop} -> `)
+ .join('');
+ const current = props[props.length - 1];
+ const leadingSpace = ' '.repeat(leadingPart.length + alreadySeen.length / 2);
+ const dashes = '-'.repeat(
+ circularPart.length + (alreadySeen.length + current.length) / 2 - 1
+ );
+
+ throw new BSONError(
+ 'Converting circular structure to EJSON:\n' +
+ ` ${leadingPart}${alreadySeen}${circularPart}${current}\n` +
+ ` ${leadingSpace}\\${dashes}/`
+ );
+ }
+ options.seenObjects[options.seenObjects.length - 1].obj = value;
+ }
+
+ if (Array.isArray(value)) return serializeArray(value, options);
+
+ if (value === undefined) return null;
+
+ if (value instanceof Date || isDate(value)) {
+ const dateNum = value.getTime(),
+ // is it in year range 1970-9999?
+ inRange = dateNum > -1 && dateNum < 253402318800000;
+
+ if (options.legacy) {
+ return options.relaxed && inRange
+ ? { $date: value.getTime() }
+ : { $date: getISOString(value) };
+ }
+ return options.relaxed && inRange
+ ? { $date: getISOString(value) }
+ : { $date: { $numberLong: value.getTime().toString() } };
+ }
+
+ if (typeof value === 'number' && (!options.relaxed || !isFinite(value))) {
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
+ // interpret as being of the smallest BSON integer type that can represent the number exactly
+ if (value >= BSON_INT32_MIN && value <= BSON_INT32_MAX) {
+ return { $numberInt: value.toString() };
+ }
+ if (value >= BSON_INT64_MIN && value <= BSON_INT64_MAX) {
+ // TODO(NODE-4377): EJSON js number handling diverges from BSON
+ return { $numberLong: value.toString() };
+ }
+ }
+ return { $numberDouble: Object.is(value, -0) ? '-0.0' : value.toString() };
+ }
+
+ if (typeof value === 'bigint') {
+ /* eslint-disable no-restricted-globals -- This is allowed as we are accepting a bigint as input */
+ if (!options.relaxed) {
+ return { $numberLong: BigInt.asIntN(64, value).toString() };
+ }
+ return Number(BigInt.asIntN(64, value));
+ /* eslint-enable */
+ }
+
+ if (value instanceof RegExp || isRegExp(value)) {
+ let flags = value.flags;
+ if (flags === undefined) {
+ const match = value.toString().match(/[gimuy]*$/);
+ if (match) {
+ flags = match[0];
+ }
+ }
+
+ const rx = new BSONRegExp(value.source, flags);
+ return rx.toExtendedJSON(options);
+ }
+
+ if (value != null && typeof value === 'object') return serializeDocument(value, options);
+ return value;
+}
+
+const BSON_TYPE_MAPPINGS = {
+ Binary: (o: Binary) => new Binary(o.value(), o.sub_type),
+ Code: (o: Code) => new Code(o.code, o.scope),
+ DBRef: (o: DBRef) => new DBRef(o.collection || o.namespace, o.oid, o.db, o.fields), // "namespace" for 1.x library backwards compat
+ Decimal128: (o: Decimal128) => new Decimal128(o.bytes),
+ Double: (o: Double) => new Double(o.value),
+ Int32: (o: Int32) => new Int32(o.value),
+ Long: (
+ o: Long & {
+ low_: number;
+ high_: number;
+ unsigned_: boolean | undefined;
+ }
+ ) =>
+ Long.fromBits(
+ // underscore variants for 1.x backwards compatibility
+ o.low != null ? o.low : o.low_,
+ o.low != null ? o.high : o.high_,
+ o.low != null ? o.unsigned : o.unsigned_
+ ),
+ MaxKey: () => new MaxKey(),
+ MinKey: () => new MinKey(),
+ ObjectId: (o: ObjectId) => new ObjectId(o),
+ BSONRegExp: (o: BSONRegExp) => new BSONRegExp(o.pattern, o.options),
+ BSONSymbol: (o: BSONSymbol) => new BSONSymbol(o.value),
+ Timestamp: (o: Timestamp) => Timestamp.fromBits(o.low, o.high)
+} as const;
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function serializeDocument(doc: any, options: EJSONSerializeOptions) {
+ if (doc == null || typeof doc !== 'object') throw new BSONError('not an object instance');
+
+ const bsontype: BSONType['_bsontype'] = doc._bsontype;
+ if (typeof bsontype === 'undefined') {
+ // It's a regular object. Recursively serialize its property values.
+ const _doc: Document = {};
+ for (const name of Object.keys(doc)) {
+ options.seenObjects.push({ propertyName: name, obj: null });
+ try {
+ const value = serializeValue(doc[name], options);
+ if (name === '__proto__') {
+ Object.defineProperty(_doc, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ } else {
+ _doc[name] = value;
+ }
+ } finally {
+ options.seenObjects.pop();
+ }
+ }
+ return _doc;
+ } else if (
+ doc != null &&
+ typeof doc === 'object' &&
+ typeof doc._bsontype === 'string' &&
+ doc[Symbol.for('@@mdb.bson.version')] !== BSON_MAJOR_VERSION
+ ) {
+ throw new BSONVersionError();
+ } else if (isBSONType(doc)) {
+ // the "document" is really just a BSON type object
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ let outDoc: any = doc;
+ if (typeof outDoc.toExtendedJSON !== 'function') {
+ // There's no EJSON serialization function on the object. It's probably an
+ // object created by a previous version of this library (or another library)
+ // that's duck-typing objects to look like they were generated by this library).
+ // Copy the object into this library's version of that type.
+ const mapper = BSON_TYPE_MAPPINGS[doc._bsontype];
+ if (!mapper) {
+ throw new BSONError('Unrecognized or invalid _bsontype: ' + doc._bsontype);
+ }
+ outDoc = mapper(outDoc);
+ }
+
+ // Two BSON types may have nested objects that may need to be serialized too
+ if (bsontype === 'Code' && outDoc.scope) {
+ outDoc = new Code(outDoc.code, serializeValue(outDoc.scope, options));
+ } else if (bsontype === 'DBRef' && outDoc.oid) {
+ outDoc = new DBRef(
+ serializeValue(outDoc.collection, options),
+ serializeValue(outDoc.oid, options),
+ serializeValue(outDoc.db, options),
+ serializeValue(outDoc.fields, options)
+ );
+ }
+
+ return outDoc.toExtendedJSON(options);
+ } else {
+ throw new BSONError('_bsontype must be a string, but was: ' + typeof bsontype);
+ }
+}
+
+/**
+ * Parse an Extended JSON string, constructing the JavaScript value or object described by that
+ * string.
+ *
+ * @example
+ * ```js
+ * const { EJSON } = require('bson');
+ * const text = '{ "int32": { "$numberInt": "10" } }';
+ *
+ * // prints { int32: { [String: '10'] _bsontype: 'Int32', value: '10' } }
+ * console.log(EJSON.parse(text, { relaxed: false }));
+ *
+ * // prints { int32: 10 }
+ * console.log(EJSON.parse(text));
+ * ```
+ */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function parse(text: string, options?: EJSONOptions): any {
+ const ejsonOptions = {
+ useBigInt64: options?.useBigInt64 ?? false,
+ relaxed: options?.relaxed ?? true,
+ legacy: options?.legacy ?? false
+ };
+ return JSON.parse(text, (key, value) => {
+ if (key.indexOf('\x00') !== -1) {
+ throw new BSONError(
+ `BSON Document field names cannot contain null bytes, found: ${JSON.stringify(key)}`
+ );
+ }
+ return deserializeValue(value, ejsonOptions);
+ });
+}
+
+/**
+ * Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer
+ * function is specified or optionally including only the specified properties if a replacer array
+ * is specified.
+ *
+ * @param value - The value to convert to extended JSON
+ * @param replacer - A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string
+ * @param space - A String or Number object that's used to insert white space into the output JSON string for readability purposes.
+ * @param options - Optional settings
+ *
+ * @example
+ * ```js
+ * const { EJSON } = require('bson');
+ * const Int32 = require('mongodb').Int32;
+ * const doc = { int32: new Int32(10) };
+ *
+ * // prints '{"int32":{"$numberInt":"10"}}'
+ * console.log(EJSON.stringify(doc, { relaxed: false }));
+ *
+ * // prints '{"int32":10}'
+ * console.log(EJSON.stringify(doc));
+ * ```
+ */
+function stringify(
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ value: any,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ replacer?: (number | string)[] | ((this: any, key: string, value: any) => any) | EJSONOptions,
+ space?: string | number,
+ options?: EJSONOptions
+): string {
+ if (space != null && typeof space === 'object') {
+ options = space;
+ space = 0;
+ }
+ if (replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) {
+ options = replacer;
+ replacer = undefined;
+ space = 0;
+ }
+ const serializeOptions = Object.assign({ relaxed: true, legacy: false }, options, {
+ seenObjects: [{ propertyName: '(root)', obj: null }]
+ });
+
+ const doc = serializeValue(value, serializeOptions);
+ return JSON.stringify(doc, replacer as Parameters[1], space);
+}
+
+/**
+ * Serializes an object to an Extended JSON string, and reparse it as a JavaScript object.
+ *
+ * @param value - The object to serialize
+ * @param options - Optional settings passed to the `stringify` function
+ */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function EJSONserialize(value: any, options?: EJSONOptions): Document {
+ options = options || {};
+ return JSON.parse(stringify(value, options));
+}
+
+/**
+ * Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types
+ *
+ * @param ejson - The Extended JSON object to deserialize
+ * @param options - Optional settings passed to the parse method
+ */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+function EJSONdeserialize(ejson: Document, options?: EJSONOptions): any {
+ options = options || {};
+ return parse(JSON.stringify(ejson), options);
+}
+
+/** @public */
+const EJSON: {
+ parse: typeof parse;
+ stringify: typeof stringify;
+ serialize: typeof EJSONserialize;
+ deserialize: typeof EJSONdeserialize;
+} = Object.create(null);
+EJSON.parse = parse;
+EJSON.stringify = stringify;
+EJSON.serialize = EJSONserialize;
+EJSON.deserialize = EJSONdeserialize;
+Object.freeze(EJSON);
+export { EJSON };
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/index.ts b/week-3/04-course-app-hard/node_modules/bson/src/index.ts
new file mode 100644
index 000000000..5ef415756
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/index.ts
@@ -0,0 +1,19 @@
+import * as BSON from './bson';
+
+// Export all named properties from BSON to support
+// import { ObjectId, serialize } from 'bson';
+// const { ObjectId, serialize } = require('bson');
+export * from './bson';
+
+// Export BSON as a namespace to support:
+// import { BSON } from 'bson';
+// const { BSON } = require('bson');
+export { BSON };
+
+// BSON does **NOT** have a default export
+
+// The following will crash in es module environments
+// import BSON from 'bson';
+
+// The following will work as expected, BSON as a namespace of all the APIs (BSON.ObjectId, BSON.serialize)
+// const BSON = require('bson');
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/int_32.ts b/week-3/04-course-app-hard/node_modules/bson/src/int_32.ts
new file mode 100644
index 000000000..7c95027ce
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/int_32.ts
@@ -0,0 +1,101 @@
+import { BSONValue } from './bson_value';
+import { BSON_INT32_MAX, BSON_INT32_MIN } from './constants';
+import { BSONError } from './error';
+import type { EJSONOptions } from './extended_json';
+import { type InspectFn, defaultInspect } from './parser/utils';
+import { removeLeadingZerosAndExplicitPlus } from './utils/string_utils';
+
+/** @public */
+export interface Int32Extended {
+ $numberInt: string;
+}
+
+/**
+ * A class representation of a BSON Int32 type.
+ * @public
+ * @category BSONType
+ */
+export class Int32 extends BSONValue {
+ get _bsontype(): 'Int32' {
+ return 'Int32';
+ }
+
+ value!: number;
+ /**
+ * Create an Int32 type
+ *
+ * @param value - the number we want to represent as an int32.
+ */
+ constructor(value: number | string) {
+ super();
+ if ((value as unknown) instanceof Number) {
+ value = value.valueOf();
+ }
+
+ this.value = +value | 0;
+ }
+
+ /**
+ * Attempt to create an Int32 type from string.
+ *
+ * This method will throw a BSONError on any string input that is not representable as an Int32.
+ * Notably, this method will also throw on the following string formats:
+ * - Strings in non-decimal formats (exponent notation, binary, hex, or octal digits)
+ * - Strings non-numeric and non-leading sign characters (ex: '2.0', '24,000')
+ * - Strings with leading and/or trailing whitespace
+ *
+ * Strings with leading zeros, however, are allowed.
+ *
+ * @param value - the string we want to represent as an int32.
+ */
+ static fromString(value: string): Int32 {
+ const cleanedValue = removeLeadingZerosAndExplicitPlus(value);
+
+ const coercedValue = Number(value);
+
+ if (BSON_INT32_MAX < coercedValue) {
+ throw new BSONError(`Input: '${value}' is larger than the maximum value for Int32`);
+ } else if (BSON_INT32_MIN > coercedValue) {
+ throw new BSONError(`Input: '${value}' is smaller than the minimum value for Int32`);
+ } else if (!Number.isSafeInteger(coercedValue)) {
+ throw new BSONError(`Input: '${value}' is not a safe integer`);
+ } else if (coercedValue.toString() !== cleanedValue) {
+ // catch all case
+ throw new BSONError(`Input: '${value}' is not a valid Int32 string`);
+ }
+ return new Int32(coercedValue);
+ }
+
+ /**
+ * Access the number value.
+ *
+ * @returns returns the wrapped int32 number.
+ */
+ valueOf(): number {
+ return this.value;
+ }
+
+ toString(radix?: number): string {
+ return this.value.toString(radix);
+ }
+
+ toJSON(): number {
+ return this.value;
+ }
+
+ /** @internal */
+ toExtendedJSON(options?: EJSONOptions): number | Int32Extended {
+ if (options && (options.relaxed || options.legacy)) return this.value;
+ return { $numberInt: this.value.toString() };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: Int32Extended, options?: EJSONOptions): number | Int32 {
+ return options && options.relaxed ? parseInt(doc.$numberInt, 10) : new Int32(doc.$numberInt);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ return `new Int32(${inspect(this.value, options)})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/long.ts b/week-3/04-course-app-hard/node_modules/bson/src/long.ts
new file mode 100644
index 000000000..07b2b2db1
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/long.ts
@@ -0,0 +1,1246 @@
+import { BSONValue } from './bson_value';
+import { BSONError } from './error';
+import type { EJSONOptions } from './extended_json';
+import { type InspectFn, defaultInspect } from './parser/utils';
+import type { Timestamp } from './timestamp';
+import * as StringUtils from './utils/string_utils';
+
+interface LongWASMHelpers {
+ /** Gets the high bits of the last operation performed */
+ get_high(this: void): number;
+ div_u(
+ this: void,
+ lowBits: number,
+ highBits: number,
+ lowBitsDivisor: number,
+ highBitsDivisor: number
+ ): number;
+ div_s(
+ this: void,
+ lowBits: number,
+ highBits: number,
+ lowBitsDivisor: number,
+ highBitsDivisor: number
+ ): number;
+ rem_u(
+ this: void,
+ lowBits: number,
+ highBits: number,
+ lowBitsDivisor: number,
+ highBitsDivisor: number
+ ): number;
+ rem_s(
+ this: void,
+ lowBits: number,
+ highBits: number,
+ lowBitsDivisor: number,
+ highBitsDivisor: number
+ ): number;
+ mul(
+ this: void,
+ lowBits: number,
+ highBits: number,
+ lowBitsMultiplier: number,
+ highBitsMultiplier: number
+ ): number;
+}
+
+/**
+ * wasm optimizations, to do native i64 multiplication and divide
+ */
+let wasm: LongWASMHelpers | undefined = undefined;
+
+/* We do not want to have to include DOM types just for this check */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+declare const WebAssembly: any;
+
+try {
+ wasm = new WebAssembly.Instance(
+ new WebAssembly.Module(
+ // prettier-ignore
+ new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])
+ ),
+ {}
+ ).exports as unknown as LongWASMHelpers;
+} catch {
+ // no wasm support
+}
+
+const TWO_PWR_16_DBL = 1 << 16;
+const TWO_PWR_24_DBL = 1 << 24;
+const TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
+const TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
+const TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
+
+/** A cache of the Long representations of small integer values. */
+const INT_CACHE: { [key: number]: Long } = {};
+
+/** A cache of the Long representations of small unsigned integer values. */
+const UINT_CACHE: { [key: number]: Long } = {};
+
+const MAX_INT64_STRING_LENGTH = 20;
+
+const DECIMAL_REG_EX = /^(\+?0|(\+|-)?[1-9][0-9]*)$/;
+
+/** @public */
+export interface LongExtended {
+ $numberLong: string;
+}
+
+/**
+ * A class representing a 64-bit integer
+ * @public
+ * @category BSONType
+ * @remarks
+ * The internal representation of a long is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16 bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ * Common constant values ZERO, ONE, NEG_ONE, etc. are found as static properties on this class.
+ */
+export class Long extends BSONValue {
+ get _bsontype(): 'Long' {
+ return 'Long';
+ }
+
+ /** An indicator used to reliably determine if an object is a Long or not. */
+ get __isLong__(): boolean {
+ return true;
+ }
+
+ /**
+ * The high 32 bits as a signed value.
+ */
+ high: number;
+
+ /**
+ * The low 32 bits as a signed value.
+ */
+ low: number;
+
+ /**
+ * Whether unsigned or not.
+ */
+ unsigned: boolean;
+
+ /**
+ * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.
+ *
+ * @param low - The low (signed) 32 bits of the long
+ * @param high - The high (signed) 32 bits of the long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ constructor(low: number, high?: number, unsigned?: boolean);
+ /**
+ * Constructs a 64 bit two's-complement integer, given a bigint representation.
+ *
+ * @param value - BigInt representation of the long value
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ constructor(value: bigint, unsigned?: boolean);
+ /**
+ * Constructs a 64 bit two's-complement integer, given a string representation.
+ *
+ * @param value - String representation of the long value
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ constructor(value: string, unsigned?: boolean);
+ constructor(
+ lowOrValue: number | bigint | string = 0,
+ highOrUnsigned?: number | boolean,
+ unsigned?: boolean
+ ) {
+ super();
+ const unsignedBool = typeof highOrUnsigned === 'boolean' ? highOrUnsigned : Boolean(unsigned);
+ const high = typeof highOrUnsigned === 'number' ? highOrUnsigned : 0;
+ const res =
+ typeof lowOrValue === 'string'
+ ? Long.fromString(lowOrValue, unsignedBool)
+ : typeof lowOrValue === 'bigint'
+ ? Long.fromBigInt(lowOrValue, unsignedBool)
+ : { low: lowOrValue | 0, high: high | 0, unsigned: unsignedBool };
+ this.low = res.low;
+ this.high = res.high;
+ this.unsigned = res.unsigned;
+ }
+
+ static TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
+
+ /** Maximum unsigned value. */
+ static MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
+ /** Signed zero */
+ static ZERO = Long.fromInt(0);
+ /** Unsigned zero. */
+ static UZERO = Long.fromInt(0, true);
+ /** Signed one. */
+ static ONE = Long.fromInt(1);
+ /** Unsigned one. */
+ static UONE = Long.fromInt(1, true);
+ /** Signed negative one. */
+ static NEG_ONE = Long.fromInt(-1);
+ /** Maximum signed value. */
+ static MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
+ /** Minimum signed value. */
+ static MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
+
+ /**
+ * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits.
+ * Each is assumed to use 32 bits.
+ * @param lowBits - The low 32 bits
+ * @param highBits - The high 32 bits
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long {
+ return new Long(lowBits, highBits, unsigned);
+ }
+
+ /**
+ * Returns a Long representing the given 32 bit integer value.
+ * @param value - The 32 bit integer in question
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromInt(value: number, unsigned?: boolean): Long {
+ let obj, cachedObj, cache;
+ if (unsigned) {
+ value >>>= 0;
+ if ((cache = 0 <= value && value < 256)) {
+ cachedObj = UINT_CACHE[value];
+ if (cachedObj) return cachedObj;
+ }
+ obj = Long.fromBits(value, (value | 0) < 0 ? -1 : 0, true);
+ if (cache) UINT_CACHE[value] = obj;
+ return obj;
+ } else {
+ value |= 0;
+ if ((cache = -128 <= value && value < 128)) {
+ cachedObj = INT_CACHE[value];
+ if (cachedObj) return cachedObj;
+ }
+ obj = Long.fromBits(value, value < 0 ? -1 : 0, false);
+ if (cache) INT_CACHE[value] = obj;
+ return obj;
+ }
+ }
+
+ /**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ * @param value - The number in question
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromNumber(value: number, unsigned?: boolean): Long {
+ if (isNaN(value)) return unsigned ? Long.UZERO : Long.ZERO;
+ if (unsigned) {
+ if (value < 0) return Long.UZERO;
+ if (value >= TWO_PWR_64_DBL) return Long.MAX_UNSIGNED_VALUE;
+ } else {
+ if (value <= -TWO_PWR_63_DBL) return Long.MIN_VALUE;
+ if (value + 1 >= TWO_PWR_63_DBL) return Long.MAX_VALUE;
+ }
+ if (value < 0) return Long.fromNumber(-value, unsigned).neg();
+ return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
+ }
+
+ /**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ * @param value - The number in question
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBigInt(value: bigint, unsigned?: boolean): Long {
+ // eslint-disable-next-line no-restricted-globals
+ const FROM_BIGINT_BIT_MASK = BigInt(0xffffffff);
+ // eslint-disable-next-line no-restricted-globals
+ const FROM_BIGINT_BIT_SHIFT = BigInt(32);
+ return new Long(
+ Number(value & FROM_BIGINT_BIT_MASK),
+ Number((value >> FROM_BIGINT_BIT_SHIFT) & FROM_BIGINT_BIT_MASK),
+ unsigned
+ );
+ }
+
+ /**
+ * @internal
+ * Returns a Long representation of the given string, written using the specified radix.
+ * Throws an error if `throwsError` is set to true and any of the following conditions are true:
+ * - the string contains invalid characters for the given radix
+ * - the string contains whitespace
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ private static _fromString(str: string, unsigned: boolean, radix: number): Long {
+ if (str.length === 0) throw new BSONError('empty string');
+ if (radix < 2 || 36 < radix) throw new BSONError('radix');
+
+ let p;
+ if ((p = str.indexOf('-')) > 0) throw new BSONError('interior hyphen');
+ else if (p === 0) {
+ return Long._fromString(str.substring(1), unsigned, radix).neg();
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ const radixToPower = Long.fromNumber(Math.pow(radix, 8));
+
+ let result = Long.ZERO;
+ for (let i = 0; i < str.length; i += 8) {
+ const size = Math.min(8, str.length - i),
+ value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ const power = Long.fromNumber(Math.pow(radix, size));
+ result = result.mul(power).add(Long.fromNumber(value));
+ } else {
+ result = result.mul(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ result.unsigned = unsigned;
+ return result;
+ }
+
+ /**
+ * Returns a signed Long representation of the given string, written using radix 10.
+ * Will throw an error if the given text is not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the radix 10
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string): Long;
+ /**
+ * Returns a Long representation of the given string, written using the radix 10.
+ * Will throw an error if the given parameters are not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the given radix
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string, unsigned?: boolean): Long;
+ /**
+ * Returns a signed Long representation of the given string, written using the specified radix.
+ * Will throw an error if the given parameters are not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the given radix
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string, radix?: boolean): Long;
+ /**
+ * Returns a Long representation of the given string, written using the specified radix.
+ * Will throw an error if the given parameters are not exactly representable as a Long.
+ * Throws an error if any of the following conditions are true:
+ * - the string contains invalid characters for the given radix
+ * - the string contains whitespace
+ * - the value the string represents is too large or too small to be a Long
+ * Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromStringStrict(str: string, unsigned?: boolean, radix?: number): Long;
+ static fromStringStrict(str: string, unsignedOrRadix?: boolean | number, radix?: number): Long {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ // For goog.math.long compatibility
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ } else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+
+ if (str.trim() !== str) {
+ throw new BSONError(`Input: '${str}' contains leading and/or trailing whitespace`);
+ }
+ if (!StringUtils.validateStringCharacters(str, radix)) {
+ throw new BSONError(`Input: '${str}' contains invalid characters for radix: ${radix}`);
+ }
+
+ // remove leading zeros (for later string comparison and to make math faster)
+ const cleanedStr = StringUtils.removeLeadingZerosAndExplicitPlus(str);
+
+ // check roundtrip result
+ const result = Long._fromString(cleanedStr, unsigned, radix);
+ if (result.toString(radix).toLowerCase() !== cleanedStr.toLowerCase()) {
+ throw new BSONError(
+ `Input: ${str} is not representable as ${result.unsigned ? 'an unsigned' : 'a signed'} 64-bit Long ${radix != null ? `with radix: ${radix}` : ''}`
+ );
+ }
+ return result;
+ }
+
+ /**
+ * Returns a signed Long representation of the given string, written using radix 10.
+ *
+ * If the input string is empty, this function will throw a BSONError.
+ *
+ * If input string does not have valid signed 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit signed long will be coerced to Long.MAX_VALUE and Long.MIN_VALUE respectively
+ * - 'NaN' or '+/-Infinity' are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ *
+ * @param str - The textual representation of the Long
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string): Long;
+ /**
+ * Returns a signed Long representation of the given string, written using the provided radix.
+ *
+ * If the input string is empty or a provided radix is not within (2-36), this function will throw a BSONError.
+ *
+ * If input parameters do not have valid signed 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit signed long will be coerced to Long.MAX_VALUE and Long.MIN_VALUE respectively
+ * - if the radix is less than 24, 'NaN' is coerced to Long.ZERO
+ * - if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ * @param str - The textual representation of the Long
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string, radix?: number): Long;
+ /**
+ * Returns a Long representation of the given string, written using radix 10.
+ *
+ * If the input string is empty, this function will throw a BSONError.
+ *
+ * If input parameters do not have a valid 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit long will be coerced to max or min (if signed) values
+ * - if the radix is less than 24, 'NaN' is coerced to Long.ZERO
+ * - if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string, unsigned?: boolean): Long;
+ /**
+ * Returns a Long representation of the given string, written using the specified radix.
+ *
+ * If the input string is empty or a provided radix is not within (2-36), this function will throw a BSONError.
+ *
+ * If input parameters do not have a valid 64-bit Long representation, this method will return a coerced value:
+ * - inputs that overflow 64-bit long will be coerced to max or min (if signed) values
+ * - if the radix is less than 24, 'NaN' is coerced to Long.ZERO
+ * - if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
+ * - other invalid characters sequences have variable behavior
+ * @param str - The textual representation of the Long
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ * @returns The corresponding Long value
+ */
+ static fromString(str: string, unsigned?: boolean, radix?: number): Long;
+ static fromString(str: string, unsignedOrRadix?: boolean | number, radix?: number): Long {
+ let unsigned = false;
+ if (typeof unsignedOrRadix === 'number') {
+ // For goog.math.long compatibility
+ (radix = unsignedOrRadix), (unsignedOrRadix = false);
+ } else {
+ unsigned = !!unsignedOrRadix;
+ }
+ radix ??= 10;
+ if (str === 'NaN' && radix < 24) {
+ // radix does not support n, so coerce to zero
+ return Long.ZERO;
+ } else if ((str === 'Infinity' || str === '+Infinity' || str === '-Infinity') && radix < 35) {
+ // radix does not support y, so coerce to zero
+ return Long.ZERO;
+ }
+ return Long._fromString(str, unsigned, radix);
+ }
+
+ /**
+ * Creates a Long from its byte representation.
+ * @param bytes - Byte representation
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @param le - Whether little or big endian, defaults to big endian
+ * @returns The corresponding Long value
+ */
+ static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long {
+ return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
+ }
+
+ /**
+ * Creates a Long from its little endian byte representation.
+ * @param bytes - Little endian byte representation
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBytesLE(bytes: number[], unsigned?: boolean): Long {
+ return new Long(
+ bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24),
+ bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24),
+ unsigned
+ );
+ }
+
+ /**
+ * Creates a Long from its big endian byte representation.
+ * @param bytes - Big endian byte representation
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ * @returns The corresponding Long value
+ */
+ static fromBytesBE(bytes: number[], unsigned?: boolean): Long {
+ return new Long(
+ (bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7],
+ (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3],
+ unsigned
+ );
+ }
+
+ /**
+ * Tests if the specified object is a Long.
+ */
+ static isLong(value: unknown): value is Long {
+ return (
+ value != null &&
+ typeof value === 'object' &&
+ '__isLong__' in value &&
+ value.__isLong__ === true
+ );
+ }
+
+ /**
+ * Converts the specified value to a Long.
+ * @param unsigned - Whether unsigned or not, defaults to signed
+ */
+ static fromValue(
+ val: number | string | { low: number; high: number; unsigned?: boolean },
+ unsigned?: boolean
+ ): Long {
+ if (typeof val === 'number') return Long.fromNumber(val, unsigned);
+ if (typeof val === 'string') return Long.fromString(val, unsigned);
+ // Throws for non-objects, converts non-instanceof Long:
+ return Long.fromBits(
+ val.low,
+ val.high,
+ typeof unsigned === 'boolean' ? unsigned : val.unsigned
+ );
+ }
+
+ /** Returns the sum of this and the specified Long. */
+ add(addend: string | number | Long | Timestamp): Long {
+ if (!Long.isLong(addend)) addend = Long.fromValue(addend);
+
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+
+ const b48 = addend.high >>> 16;
+ const b32 = addend.high & 0xffff;
+ const b16 = addend.low >>> 16;
+ const b00 = addend.low & 0xffff;
+
+ let c48 = 0,
+ c32 = 0,
+ c16 = 0,
+ c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 + b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+
+ /**
+ * Returns the sum of this and the specified Long.
+ * @returns Sum
+ */
+ and(other: string | number | Long | Timestamp): Long {
+ if (!Long.isLong(other)) other = Long.fromValue(other);
+ return Long.fromBits(this.low & other.low, this.high & other.high, this.unsigned);
+ }
+
+ /**
+ * Compares this Long's value with the specified's.
+ * @returns 0 if they are the same, 1 if the this is greater and -1 if the given one is greater
+ */
+ compare(other: string | number | Long | Timestamp): 0 | 1 | -1 {
+ if (!Long.isLong(other)) other = Long.fromValue(other);
+ if (this.eq(other)) return 0;
+ const thisNeg = this.isNegative(),
+ otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) return -1;
+ if (!thisNeg && otherNeg) return 1;
+ // At this point the sign bits are the same
+ if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;
+ // Both are positive if at least one is unsigned
+ return other.high >>> 0 > this.high >>> 0 ||
+ (other.high === this.high && other.low >>> 0 > this.low >>> 0)
+ ? -1
+ : 1;
+ }
+
+ /** This is an alias of {@link Long.compare} */
+ comp(other: string | number | Long | Timestamp): 0 | 1 | -1 {
+ return this.compare(other);
+ }
+
+ /**
+ * Returns this Long divided by the specified. The result is signed if this Long is signed or unsigned if this Long is unsigned.
+ * @returns Quotient
+ */
+ divide(divisor: string | number | Long | Timestamp): Long {
+ if (!Long.isLong(divisor)) divisor = Long.fromValue(divisor);
+ if (divisor.isZero()) throw new BSONError('division by zero');
+
+ // use wasm support if present
+ if (wasm) {
+ // guard against signed division overflow: the largest
+ // negative number / -1 would be 1 larger than the largest
+ // positive number, due to two's complement.
+ if (
+ !this.unsigned &&
+ this.high === -0x80000000 &&
+ divisor.low === -1 &&
+ divisor.high === -1
+ ) {
+ // be consistent with non-wasm code path
+ return this;
+ }
+ const low = (this.unsigned ? wasm.div_u : wasm.div_s)(
+ this.low,
+ this.high,
+ divisor.low,
+ divisor.high
+ );
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+
+ if (this.isZero()) return this.unsigned ? Long.UZERO : Long.ZERO;
+ let approx, rem, res;
+ if (!this.unsigned) {
+ // This section is only relevant for signed longs and is derived from the
+ // closure library as a whole.
+ if (this.eq(Long.MIN_VALUE)) {
+ if (divisor.eq(Long.ONE) || divisor.eq(Long.NEG_ONE)) return Long.MIN_VALUE;
+ // recall that -MIN_VALUE == MIN_VALUE
+ else if (divisor.eq(Long.MIN_VALUE)) return Long.ONE;
+ else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ const halfThis = this.shr(1);
+ approx = halfThis.div(divisor).shl(1);
+ if (approx.eq(Long.ZERO)) {
+ return divisor.isNegative() ? Long.ONE : Long.NEG_ONE;
+ } else {
+ rem = this.sub(divisor.mul(approx));
+ res = approx.add(rem.div(divisor));
+ return res;
+ }
+ }
+ } else if (divisor.eq(Long.MIN_VALUE)) return this.unsigned ? Long.UZERO : Long.ZERO;
+ if (this.isNegative()) {
+ if (divisor.isNegative()) return this.neg().div(divisor.neg());
+ return this.neg().div(divisor).neg();
+ } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();
+ res = Long.ZERO;
+ } else {
+ // The algorithm below has not been made for unsigned longs. It's therefore
+ // required to take special care of the MSB prior to running it.
+ if (!divisor.unsigned) divisor = divisor.toUnsigned();
+ if (divisor.gt(this)) return Long.UZERO;
+ if (divisor.gt(this.shru(1)))
+ // 15 >>> 1 = 7 ; with divisor = 8 ; true
+ return Long.UONE;
+ res = Long.UZERO;
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
+ rem = this;
+ while (rem.gte(divisor)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ const log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ const delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ let approxRes = Long.fromNumber(approx);
+ let approxRem = approxRes.mul(divisor);
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx, this.unsigned);
+ approxRem = approxRes.mul(divisor);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) approxRes = Long.ONE;
+
+ res = res.add(approxRes);
+ rem = rem.sub(approxRem);
+ }
+ return res;
+ }
+
+ /**This is an alias of {@link Long.divide} */
+ div(divisor: string | number | Long | Timestamp): Long {
+ return this.divide(divisor);
+ }
+
+ /**
+ * Tests if this Long's value equals the specified's.
+ * @param other - Other value
+ */
+ equals(other: string | number | Long | Timestamp): boolean {
+ if (!Long.isLong(other)) other = Long.fromValue(other);
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
+ return false;
+ return this.high === other.high && this.low === other.low;
+ }
+
+ /** This is an alias of {@link Long.equals} */
+ eq(other: string | number | Long | Timestamp): boolean {
+ return this.equals(other);
+ }
+
+ /** Gets the high 32 bits as a signed integer. */
+ getHighBits(): number {
+ return this.high;
+ }
+
+ /** Gets the high 32 bits as an unsigned integer. */
+ getHighBitsUnsigned(): number {
+ return this.high >>> 0;
+ }
+
+ /** Gets the low 32 bits as a signed integer. */
+ getLowBits(): number {
+ return this.low;
+ }
+
+ /** Gets the low 32 bits as an unsigned integer. */
+ getLowBitsUnsigned(): number {
+ return this.low >>> 0;
+ }
+
+ /** Gets the number of bits needed to represent the absolute value of this Long. */
+ getNumBitsAbs(): number {
+ if (this.isNegative()) {
+ // Unsigned Longs are never negative
+ return this.eq(Long.MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
+ }
+ const val = this.high !== 0 ? this.high : this.low;
+ let bit: number;
+ for (bit = 31; bit > 0; bit--) if ((val & (1 << bit)) !== 0) break;
+ return this.high !== 0 ? bit + 33 : bit + 1;
+ }
+
+ /** Tests if this Long's value is greater than the specified's. */
+ greaterThan(other: string | number | Long | Timestamp): boolean {
+ return this.comp(other) > 0;
+ }
+
+ /** This is an alias of {@link Long.greaterThan} */
+ gt(other: string | number | Long | Timestamp): boolean {
+ return this.greaterThan(other);
+ }
+
+ /** Tests if this Long's value is greater than or equal the specified's. */
+ greaterThanOrEqual(other: string | number | Long | Timestamp): boolean {
+ return this.comp(other) >= 0;
+ }
+
+ /** This is an alias of {@link Long.greaterThanOrEqual} */
+ gte(other: string | number | Long | Timestamp): boolean {
+ return this.greaterThanOrEqual(other);
+ }
+ /** This is an alias of {@link Long.greaterThanOrEqual} */
+ ge(other: string | number | Long | Timestamp): boolean {
+ return this.greaterThanOrEqual(other);
+ }
+
+ /** Tests if this Long's value is even. */
+ isEven(): boolean {
+ return (this.low & 1) === 0;
+ }
+
+ /** Tests if this Long's value is negative. */
+ isNegative(): boolean {
+ return !this.unsigned && this.high < 0;
+ }
+
+ /** Tests if this Long's value is odd. */
+ isOdd(): boolean {
+ return (this.low & 1) === 1;
+ }
+
+ /** Tests if this Long's value is positive. */
+ isPositive(): boolean {
+ return this.unsigned || this.high >= 0;
+ }
+
+ /** Tests if this Long's value equals zero. */
+ isZero(): boolean {
+ return this.high === 0 && this.low === 0;
+ }
+
+ /** Tests if this Long's value is less than the specified's. */
+ lessThan(other: string | number | Long | Timestamp): boolean {
+ return this.comp(other) < 0;
+ }
+
+ /** This is an alias of {@link Long#lessThan}. */
+ lt(other: string | number | Long | Timestamp): boolean {
+ return this.lessThan(other);
+ }
+
+ /** Tests if this Long's value is less than or equal the specified's. */
+ lessThanOrEqual(other: string | number | Long | Timestamp): boolean {
+ return this.comp(other) <= 0;
+ }
+
+ /** This is an alias of {@link Long.lessThanOrEqual} */
+ lte(other: string | number | Long | Timestamp): boolean {
+ return this.lessThanOrEqual(other);
+ }
+
+ /** Returns this Long modulo the specified. */
+ modulo(divisor: string | number | Long | Timestamp): Long {
+ if (!Long.isLong(divisor)) divisor = Long.fromValue(divisor);
+
+ // use wasm support if present
+ if (wasm) {
+ const low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
+ this.low,
+ this.high,
+ divisor.low,
+ divisor.high
+ );
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+
+ return this.sub(this.div(divisor).mul(divisor));
+ }
+
+ /** This is an alias of {@link Long.modulo} */
+ mod(divisor: string | number | Long | Timestamp): Long {
+ return this.modulo(divisor);
+ }
+ /** This is an alias of {@link Long.modulo} */
+ rem(divisor: string | number | Long | Timestamp): Long {
+ return this.modulo(divisor);
+ }
+
+ /**
+ * Returns the product of this and the specified Long.
+ * @param multiplier - Multiplier
+ * @returns Product
+ */
+ multiply(multiplier: string | number | Long | Timestamp): Long {
+ if (this.isZero()) return Long.ZERO;
+ if (!Long.isLong(multiplier)) multiplier = Long.fromValue(multiplier);
+
+ // use wasm support if present
+ if (wasm) {
+ const low = wasm.mul(this.low, this.high, multiplier.low, multiplier.high);
+ return Long.fromBits(low, wasm.get_high(), this.unsigned);
+ }
+
+ if (multiplier.isZero()) return Long.ZERO;
+ if (this.eq(Long.MIN_VALUE)) return multiplier.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ if (multiplier.eq(Long.MIN_VALUE)) return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+
+ if (this.isNegative()) {
+ if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());
+ else return this.neg().mul(multiplier).neg();
+ } else if (multiplier.isNegative()) return this.mul(multiplier.neg()).neg();
+
+ // If both longs are small, use float multiplication
+ if (this.lt(Long.TWO_PWR_24) && multiplier.lt(Long.TWO_PWR_24))
+ return Long.fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
+
+ // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ const a48 = this.high >>> 16;
+ const a32 = this.high & 0xffff;
+ const a16 = this.low >>> 16;
+ const a00 = this.low & 0xffff;
+
+ const b48 = multiplier.high >>> 16;
+ const b32 = multiplier.high & 0xffff;
+ const b16 = multiplier.low >>> 16;
+ const b00 = multiplier.low & 0xffff;
+
+ let c48 = 0,
+ c32 = 0,
+ c16 = 0,
+ c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xffff;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xffff;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xffff;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xffff;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
+ }
+
+ /** This is an alias of {@link Long.multiply} */
+ mul(multiplier: string | number | Long | Timestamp): Long {
+ return this.multiply(multiplier);
+ }
+
+ /** Returns the Negation of this Long's value. */
+ negate(): Long {
+ if (!this.unsigned && this.eq(Long.MIN_VALUE)) return Long.MIN_VALUE;
+ return this.not().add(Long.ONE);
+ }
+
+ /** This is an alias of {@link Long.negate} */
+ neg(): Long {
+ return this.negate();
+ }
+
+ /** Returns the bitwise NOT of this Long. */
+ not(): Long {
+ return Long.fromBits(~this.low, ~this.high, this.unsigned);
+ }
+
+ /** Tests if this Long's value differs from the specified's. */
+ notEquals(other: string | number | Long | Timestamp): boolean {
+ return !this.equals(other);
+ }
+
+ /** This is an alias of {@link Long.notEquals} */
+ neq(other: string | number | Long | Timestamp): boolean {
+ return this.notEquals(other);
+ }
+ /** This is an alias of {@link Long.notEquals} */
+ ne(other: string | number | Long | Timestamp): boolean {
+ return this.notEquals(other);
+ }
+
+ /**
+ * Returns the bitwise OR of this Long and the specified.
+ */
+ or(other: number | string | Long): Long {
+ if (!Long.isLong(other)) other = Long.fromValue(other);
+ return Long.fromBits(this.low | other.low, this.high | other.high, this.unsigned);
+ }
+
+ /**
+ * Returns this Long with bits shifted to the left by the given amount.
+ * @param numBits - Number of bits
+ * @returns Shifted Long
+ */
+ shiftLeft(numBits: number | Long): Long {
+ if (Long.isLong(numBits)) numBits = numBits.toInt();
+ if ((numBits &= 63) === 0) return this;
+ else if (numBits < 32)
+ return Long.fromBits(
+ this.low << numBits,
+ (this.high << numBits) | (this.low >>> (32 - numBits)),
+ this.unsigned
+ );
+ else return Long.fromBits(0, this.low << (numBits - 32), this.unsigned);
+ }
+
+ /** This is an alias of {@link Long.shiftLeft} */
+ shl(numBits: number | Long): Long {
+ return this.shiftLeft(numBits);
+ }
+
+ /**
+ * Returns this Long with bits arithmetically shifted to the right by the given amount.
+ * @param numBits - Number of bits
+ * @returns Shifted Long
+ */
+ shiftRight(numBits: number | Long): Long {
+ if (Long.isLong(numBits)) numBits = numBits.toInt();
+ if ((numBits &= 63) === 0) return this;
+ else if (numBits < 32)
+ return Long.fromBits(
+ (this.low >>> numBits) | (this.high << (32 - numBits)),
+ this.high >> numBits,
+ this.unsigned
+ );
+ else return Long.fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);
+ }
+
+ /** This is an alias of {@link Long.shiftRight} */
+ shr(numBits: number | Long): Long {
+ return this.shiftRight(numBits);
+ }
+
+ /**
+ * Returns this Long with bits logically shifted to the right by the given amount.
+ * @param numBits - Number of bits
+ * @returns Shifted Long
+ */
+ shiftRightUnsigned(numBits: Long | number): Long {
+ if (Long.isLong(numBits)) numBits = numBits.toInt();
+ numBits &= 63;
+ if (numBits === 0) return this;
+ else {
+ const high = this.high;
+ if (numBits < 32) {
+ const low = this.low;
+ return Long.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >>> numBits,
+ this.unsigned
+ );
+ } else if (numBits === 32) return Long.fromBits(high, 0, this.unsigned);
+ else return Long.fromBits(high >>> (numBits - 32), 0, this.unsigned);
+ }
+ }
+
+ /** This is an alias of {@link Long.shiftRightUnsigned} */
+ shr_u(numBits: number | Long): Long {
+ return this.shiftRightUnsigned(numBits);
+ }
+ /** This is an alias of {@link Long.shiftRightUnsigned} */
+ shru(numBits: number | Long): Long {
+ return this.shiftRightUnsigned(numBits);
+ }
+
+ /**
+ * Returns the difference of this and the specified Long.
+ * @param subtrahend - Subtrahend
+ * @returns Difference
+ */
+ subtract(subtrahend: string | number | Long | Timestamp): Long {
+ if (!Long.isLong(subtrahend)) subtrahend = Long.fromValue(subtrahend);
+ return this.add(subtrahend.neg());
+ }
+
+ /** This is an alias of {@link Long.subtract} */
+ sub(subtrahend: string | number | Long | Timestamp): Long {
+ return this.subtract(subtrahend);
+ }
+
+ /** Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. */
+ toInt(): number {
+ return this.unsigned ? this.low >>> 0 : this.low;
+ }
+
+ /** Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). */
+ toNumber(): number {
+ if (this.unsigned) return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
+ }
+
+ /** Converts the Long to a BigInt (arbitrary precision). */
+ toBigInt(): bigint {
+ // eslint-disable-next-line no-restricted-globals -- This is allowed here as it is explicitly requesting a bigint
+ return BigInt(this.toString());
+ }
+
+ /**
+ * Converts this Long to its byte representation.
+ * @param le - Whether little or big endian, defaults to big endian
+ * @returns Byte representation
+ */
+ toBytes(le?: boolean): number[] {
+ return le ? this.toBytesLE() : this.toBytesBE();
+ }
+
+ /**
+ * Converts this Long to its little endian byte representation.
+ * @returns Little endian byte representation
+ */
+ toBytesLE(): number[] {
+ const hi = this.high,
+ lo = this.low;
+ return [
+ lo & 0xff,
+ (lo >>> 8) & 0xff,
+ (lo >>> 16) & 0xff,
+ lo >>> 24,
+ hi & 0xff,
+ (hi >>> 8) & 0xff,
+ (hi >>> 16) & 0xff,
+ hi >>> 24
+ ];
+ }
+
+ /**
+ * Converts this Long to its big endian byte representation.
+ * @returns Big endian byte representation
+ */
+ toBytesBE(): number[] {
+ const hi = this.high,
+ lo = this.low;
+ return [
+ hi >>> 24,
+ (hi >>> 16) & 0xff,
+ (hi >>> 8) & 0xff,
+ hi & 0xff,
+ lo >>> 24,
+ (lo >>> 16) & 0xff,
+ (lo >>> 8) & 0xff,
+ lo & 0xff
+ ];
+ }
+
+ /**
+ * Converts this Long to signed.
+ */
+ toSigned(): Long {
+ if (!this.unsigned) return this;
+ return Long.fromBits(this.low, this.high, false);
+ }
+
+ /**
+ * Converts the Long to a string written in the specified radix.
+ * @param radix - Radix (2-36), defaults to 10
+ * @throws RangeError If `radix` is out of range
+ */
+ toString(radix?: number): string {
+ radix = radix || 10;
+ if (radix < 2 || 36 < radix) throw new BSONError('radix');
+ if (this.isZero()) return '0';
+ if (this.isNegative()) {
+ // Unsigned Longs are never negative
+ if (this.eq(Long.MIN_VALUE)) {
+ // We need to change the Long value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ const radixLong = Long.fromNumber(radix),
+ div = this.div(radixLong),
+ rem1 = div.mul(radixLong).sub(this);
+ return div.toString(radix) + rem1.toInt().toString(radix);
+ } else return '-' + this.neg().toString(radix);
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ const radixToPower = Long.fromNumber(Math.pow(radix, 6), this.unsigned);
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
+ let rem: Long = this;
+ let result = '';
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ const remDiv = rem.div(radixToPower);
+ const intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0;
+ let digits = intval.toString(radix);
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) digits = '0' + digits;
+ result = '' + digits + result;
+ }
+ }
+ }
+
+ /** Converts this Long to unsigned. */
+ toUnsigned(): Long {
+ if (this.unsigned) return this;
+ return Long.fromBits(this.low, this.high, true);
+ }
+
+ /** Returns the bitwise XOR of this Long and the given one. */
+ xor(other: Long | number | string): Long {
+ if (!Long.isLong(other)) other = Long.fromValue(other);
+ return Long.fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
+ }
+
+ /** This is an alias of {@link Long.isZero} */
+ eqz(): boolean {
+ return this.isZero();
+ }
+
+ /** This is an alias of {@link Long.lessThanOrEqual} */
+ le(other: string | number | Long | Timestamp): boolean {
+ return this.lessThanOrEqual(other);
+ }
+
+ /*
+ ****************************************************************
+ * BSON SPECIFIC ADDITIONS *
+ ****************************************************************
+ */
+ toExtendedJSON(options?: EJSONOptions): number | LongExtended {
+ if (options && options.relaxed) return this.toNumber();
+ return { $numberLong: this.toString() };
+ }
+ static fromExtendedJSON(
+ doc: { $numberLong: string },
+ options?: EJSONOptions
+ ): number | Long | bigint {
+ const { useBigInt64 = false, relaxed = true } = { ...options };
+
+ if (doc.$numberLong.length > MAX_INT64_STRING_LENGTH) {
+ throw new BSONError('$numberLong string is too long');
+ }
+
+ if (!DECIMAL_REG_EX.test(doc.$numberLong)) {
+ throw new BSONError(`$numberLong string "${doc.$numberLong}" is in an invalid format`);
+ }
+
+ if (useBigInt64) {
+ /* eslint-disable no-restricted-globals -- Can use BigInt here as useBigInt64=true */
+ const bigIntResult = BigInt(doc.$numberLong);
+ return BigInt.asIntN(64, bigIntResult);
+ /* eslint-enable */
+ }
+
+ const longResult = Long.fromString(doc.$numberLong);
+ if (relaxed) {
+ return longResult.toNumber();
+ }
+ return longResult;
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ const longVal = inspect(this.toString(), options);
+ const unsignedVal = this.unsigned ? `, ${inspect(this.unsigned, options)}` : '';
+ return `new Long(${longVal}${unsignedVal})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/max_key.ts b/week-3/04-course-app-hard/node_modules/bson/src/max_key.ts
new file mode 100644
index 000000000..903f1d165
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/max_key.ts
@@ -0,0 +1,31 @@
+import { BSONValue } from './bson_value';
+
+/** @public */
+export interface MaxKeyExtended {
+ $maxKey: 1;
+}
+
+/**
+ * A class representation of the BSON MaxKey type.
+ * @public
+ * @category BSONType
+ */
+export class MaxKey extends BSONValue {
+ get _bsontype(): 'MaxKey' {
+ return 'MaxKey';
+ }
+
+ /** @internal */
+ toExtendedJSON(): MaxKeyExtended {
+ return { $maxKey: 1 };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(): MaxKey {
+ return new MaxKey();
+ }
+
+ inspect(): string {
+ return 'new MaxKey()';
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/min_key.ts b/week-3/04-course-app-hard/node_modules/bson/src/min_key.ts
new file mode 100644
index 000000000..244e645ab
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/min_key.ts
@@ -0,0 +1,31 @@
+import { BSONValue } from './bson_value';
+
+/** @public */
+export interface MinKeyExtended {
+ $minKey: 1;
+}
+
+/**
+ * A class representation of the BSON MinKey type.
+ * @public
+ * @category BSONType
+ */
+export class MinKey extends BSONValue {
+ get _bsontype(): 'MinKey' {
+ return 'MinKey';
+ }
+
+ /** @internal */
+ toExtendedJSON(): MinKeyExtended {
+ return { $minKey: 1 };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(): MinKey {
+ return new MinKey();
+ }
+
+ inspect(): string {
+ return 'new MinKey()';
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/objectid.ts b/week-3/04-course-app-hard/node_modules/bson/src/objectid.ts
new file mode 100644
index 000000000..98daecc88
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/objectid.ts
@@ -0,0 +1,361 @@
+import { BSONValue } from './bson_value';
+import { BSONError } from './error';
+import { type InspectFn, defaultInspect } from './parser/utils';
+import { ByteUtils } from './utils/byte_utils';
+import { NumberUtils } from './utils/number_utils';
+
+// Regular expression that checks for hex value
+const checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');
+
+// Unique sequence for the current process (initialized on first use)
+let PROCESS_UNIQUE: Uint8Array | null = null;
+
+/** @public */
+export interface ObjectIdLike {
+ id: string | Uint8Array;
+ __id?: string;
+ toHexString(): string;
+}
+
+/** @public */
+export interface ObjectIdExtended {
+ $oid: string;
+}
+
+/**
+ * A class representation of the BSON ObjectId type.
+ * @public
+ * @category BSONType
+ */
+export class ObjectId extends BSONValue {
+ get _bsontype(): 'ObjectId' {
+ return 'ObjectId';
+ }
+
+ /** @internal */
+ private static index = Math.floor(Math.random() * 0xffffff);
+
+ static cacheHexString: boolean;
+
+ /** ObjectId Bytes @internal */
+ private buffer!: Uint8Array;
+ /** ObjectId hexString cache @internal */
+ private __id?: string;
+
+ /**
+ * Create ObjectId from a number.
+ *
+ * @param inputId - A number.
+ * @deprecated Instead, use `static createFromTime()` to set a numeric value for the new ObjectId.
+ */
+ constructor(inputId: number);
+ /**
+ * Create ObjectId from a 24 character hex string.
+ *
+ * @param inputId - A 24 character hex string.
+ */
+ constructor(inputId: string);
+ /**
+ * Create ObjectId from the BSON ObjectId type.
+ *
+ * @param inputId - The BSON ObjectId type.
+ */
+ constructor(inputId: ObjectId);
+ /**
+ * Create ObjectId from the object type that has the toHexString method.
+ *
+ * @param inputId - The ObjectIdLike type.
+ */
+ constructor(inputId: ObjectIdLike);
+ /**
+ * Create ObjectId from a 12 byte binary Buffer.
+ *
+ * @param inputId - A 12 byte binary Buffer.
+ */
+ constructor(inputId: Uint8Array);
+ /** To generate a new ObjectId, use ObjectId() with no argument. */
+ constructor();
+ /**
+ * Implementation overload.
+ *
+ * @param inputId - All input types that are used in the constructor implementation.
+ */
+ constructor(inputId?: string | number | ObjectId | ObjectIdLike | Uint8Array);
+ /**
+ * Create a new ObjectId.
+ *
+ * @param inputId - An input value to create a new ObjectId from.
+ */
+ constructor(inputId?: string | number | ObjectId | ObjectIdLike | Uint8Array) {
+ super();
+ // workingId is set based on type of input and whether valid id exists for the input
+ let workingId;
+ if (typeof inputId === 'object' && inputId && 'id' in inputId) {
+ if (typeof inputId.id !== 'string' && !ArrayBuffer.isView(inputId.id)) {
+ throw new BSONError('Argument passed in must have an id that is of type string or Buffer');
+ }
+ if ('toHexString' in inputId && typeof inputId.toHexString === 'function') {
+ workingId = ByteUtils.fromHex(inputId.toHexString());
+ } else {
+ workingId = inputId.id;
+ }
+ } else {
+ workingId = inputId;
+ }
+
+ // The following cases use workingId to construct an ObjectId
+ if (workingId == null || typeof workingId === 'number') {
+ // The most common use case (blank id, new objectId instance)
+ // Generate a new id
+ this.buffer = ObjectId.generate(typeof workingId === 'number' ? workingId : undefined);
+ } else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
+ // If intstanceof matches we can escape calling ensure buffer in Node.js environments
+ this.buffer = ByteUtils.toLocalBufferType(workingId);
+ } else if (typeof workingId === 'string') {
+ if (workingId.length === 24 && checkForHexRegExp.test(workingId)) {
+ this.buffer = ByteUtils.fromHex(workingId);
+ } else {
+ throw new BSONError(
+ 'input must be a 24 character hex string, 12 byte Uint8Array, or an integer'
+ );
+ }
+ } else {
+ throw new BSONError('Argument passed in does not match the accepted types');
+ }
+ // If we are caching the hex string
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(this.id);
+ }
+ }
+
+ /**
+ * The ObjectId bytes
+ * @readonly
+ */
+ get id(): Uint8Array {
+ return this.buffer;
+ }
+
+ set id(value: Uint8Array) {
+ this.buffer = value;
+ if (ObjectId.cacheHexString) {
+ this.__id = ByteUtils.toHex(value);
+ }
+ }
+
+ /** Returns the ObjectId id as a 24 lowercase character hex string representation */
+ toHexString(): string {
+ if (ObjectId.cacheHexString && this.__id) {
+ return this.__id;
+ }
+
+ const hexString = ByteUtils.toHex(this.id);
+
+ if (ObjectId.cacheHexString && !this.__id) {
+ this.__id = hexString;
+ }
+
+ return hexString;
+ }
+
+ /**
+ * Update the ObjectId index
+ * @internal
+ */
+ private static getInc(): number {
+ return (ObjectId.index = (ObjectId.index + 1) % 0xffffff);
+ }
+
+ /**
+ * Generate a 12 byte id buffer used in ObjectId's
+ *
+ * @param time - pass in a second based timestamp.
+ */
+ static generate(time?: number): Uint8Array {
+ if ('number' !== typeof time) {
+ time = Math.floor(Date.now() / 1000);
+ }
+
+ const inc = ObjectId.getInc();
+ const buffer = ByteUtils.allocateUnsafe(12);
+
+ // 4-byte timestamp
+ NumberUtils.setInt32BE(buffer, 0, time);
+
+ // set PROCESS_UNIQUE if yet not initialized
+ if (PROCESS_UNIQUE === null) {
+ PROCESS_UNIQUE = ByteUtils.randomBytes(5);
+ }
+
+ // 5-byte process unique
+ buffer[4] = PROCESS_UNIQUE[0];
+ buffer[5] = PROCESS_UNIQUE[1];
+ buffer[6] = PROCESS_UNIQUE[2];
+ buffer[7] = PROCESS_UNIQUE[3];
+ buffer[8] = PROCESS_UNIQUE[4];
+
+ // 3-byte counter
+ buffer[11] = inc & 0xff;
+ buffer[10] = (inc >> 8) & 0xff;
+ buffer[9] = (inc >> 16) & 0xff;
+
+ return buffer;
+ }
+
+ /**
+ * Converts the id into a 24 character hex string for printing, unless encoding is provided.
+ * @param encoding - hex or base64
+ */
+ toString(encoding?: 'hex' | 'base64'): string {
+ // Is the id a buffer then use the buffer toString method to return the format
+ if (encoding === 'base64') return ByteUtils.toBase64(this.id);
+ if (encoding === 'hex') return this.toHexString();
+ return this.toHexString();
+ }
+
+ /** Converts to its JSON the 24 character hex string representation. */
+ toJSON(): string {
+ return this.toHexString();
+ }
+
+ /** @internal */
+ private static is(variable: unknown): variable is ObjectId {
+ return (
+ variable != null &&
+ typeof variable === 'object' &&
+ '_bsontype' in variable &&
+ variable._bsontype === 'ObjectId'
+ );
+ }
+
+ /**
+ * Compares the equality of this ObjectId with `otherID`.
+ *
+ * @param otherId - ObjectId instance to compare against.
+ */
+ equals(otherId: string | ObjectId | ObjectIdLike | undefined | null): boolean {
+ if (otherId === undefined || otherId === null) {
+ return false;
+ }
+
+ if (ObjectId.is(otherId)) {
+ return (
+ this.buffer[11] === otherId.buffer[11] && ByteUtils.equals(this.buffer, otherId.buffer)
+ );
+ }
+
+ if (typeof otherId === 'string') {
+ return otherId.toLowerCase() === this.toHexString();
+ }
+
+ if (typeof otherId === 'object' && typeof otherId.toHexString === 'function') {
+ const otherIdString = otherId.toHexString();
+ const thisIdString = this.toHexString();
+ return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
+ }
+
+ return false;
+ }
+
+ /** Returns the generation date (accurate up to the second) that this ID was generated. */
+ getTimestamp(): Date {
+ const timestamp = new Date();
+ const time = NumberUtils.getUint32BE(this.buffer, 0);
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+ }
+
+ /** @internal */
+ static createPk(): ObjectId {
+ return new ObjectId();
+ }
+
+ /** @internal */
+ serializeInto(uint8array: Uint8Array, index: number): 12 {
+ uint8array[index] = this.buffer[0];
+ uint8array[index + 1] = this.buffer[1];
+ uint8array[index + 2] = this.buffer[2];
+ uint8array[index + 3] = this.buffer[3];
+ uint8array[index + 4] = this.buffer[4];
+ uint8array[index + 5] = this.buffer[5];
+ uint8array[index + 6] = this.buffer[6];
+ uint8array[index + 7] = this.buffer[7];
+ uint8array[index + 8] = this.buffer[8];
+ uint8array[index + 9] = this.buffer[9];
+ uint8array[index + 10] = this.buffer[10];
+ uint8array[index + 11] = this.buffer[11];
+ return 12;
+ }
+
+ /**
+ * Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.
+ *
+ * @param time - an integer number representing a number of seconds.
+ */
+ static createFromTime(time: number): ObjectId {
+ const buffer = ByteUtils.allocate(12);
+ for (let i = 11; i >= 4; i--) buffer[i] = 0;
+ // Encode time into first 4 bytes
+ NumberUtils.setInt32BE(buffer, 0, time);
+ // Return the new objectId
+ return new ObjectId(buffer);
+ }
+
+ /**
+ * Creates an ObjectId from a hex string representation of an ObjectId.
+ *
+ * @param hexString - create a ObjectId from a passed in 24 character hexstring.
+ */
+ static createFromHexString(hexString: string): ObjectId {
+ if (hexString?.length !== 24) {
+ throw new BSONError('hex string must be 24 characters');
+ }
+
+ return new ObjectId(ByteUtils.fromHex(hexString));
+ }
+
+ /** Creates an ObjectId instance from a base64 string */
+ static createFromBase64(base64: string): ObjectId {
+ if (base64?.length !== 16) {
+ throw new BSONError('base64 string must be 16 characters');
+ }
+
+ return new ObjectId(ByteUtils.fromBase64(base64));
+ }
+
+ /**
+ * Checks if a value can be used to create a valid bson ObjectId
+ * @param id - any JS value
+ */
+ static isValid(id: string | number | ObjectId | ObjectIdLike | Uint8Array): boolean {
+ if (id == null) return false;
+
+ try {
+ new ObjectId(id);
+ return true;
+ } catch {
+ return false;
+ }
+ }
+
+ /** @internal */
+ toExtendedJSON(): ObjectIdExtended {
+ if (this.toHexString) return { $oid: this.toHexString() };
+ return { $oid: this.toString('hex') };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: ObjectIdExtended): ObjectId {
+ return new ObjectId(doc.$oid);
+ }
+
+ /**
+ * Converts to a string representation of this Id.
+ *
+ * @returns return the 24 character hex string representation.
+ */
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ return `new ObjectId(${inspect(this.toHexString(), options)})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/parse_utf8.ts b/week-3/04-course-app-hard/node_modules/bson/src/parse_utf8.ts
new file mode 100644
index 000000000..045a9080b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/parse_utf8.ts
@@ -0,0 +1,35 @@
+import { BSONError } from './error';
+
+type TextDecoder = {
+ readonly encoding: string;
+ readonly fatal: boolean;
+ readonly ignoreBOM: boolean;
+ decode(input?: Uint8Array): string;
+};
+type TextDecoderConstructor = {
+ new (label: 'utf8', options: { fatal: boolean; ignoreBOM?: boolean }): TextDecoder;
+};
+
+// parse utf8 globals
+declare const TextDecoder: TextDecoderConstructor;
+let TextDecoderFatal: TextDecoder;
+let TextDecoderNonFatal: TextDecoder;
+
+/**
+ * Determines if the passed in bytes are valid utf8
+ * @param bytes - An array of 8-bit bytes. Must be indexable and have length property
+ * @param start - The index to start validating
+ * @param end - The index to end validating
+ */
+export function parseUtf8(buffer: Uint8Array, start: number, end: number, fatal: boolean): string {
+ if (fatal) {
+ TextDecoderFatal ??= new TextDecoder('utf8', { fatal: true });
+ try {
+ return TextDecoderFatal.decode(buffer.subarray(start, end));
+ } catch (cause) {
+ throw new BSONError('Invalid UTF-8 string in BSON document', { cause });
+ }
+ }
+ TextDecoderNonFatal ??= new TextDecoder('utf8', { fatal: false });
+ return TextDecoderNonFatal.decode(buffer.subarray(start, end));
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/parser/calculate_size.ts b/week-3/04-course-app-hard/node_modules/bson/src/parser/calculate_size.ts
new file mode 100644
index 000000000..fd1e4a029
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/parser/calculate_size.ts
@@ -0,0 +1,211 @@
+import { Binary } from '../binary';
+import type { Document } from '../bson';
+import { BSONVersionError } from '../error';
+import * as constants from '../constants';
+import { ByteUtils } from '../utils/byte_utils';
+import { isAnyArrayBuffer, isDate, isRegExp } from './utils';
+
+export function internalCalculateObjectSize(
+ object: Document,
+ serializeFunctions?: boolean,
+ ignoreUndefined?: boolean
+): number {
+ let totalLength = 4 + 1;
+
+ if (Array.isArray(object)) {
+ for (let i = 0; i < object.length; i++) {
+ totalLength += calculateElement(
+ i.toString(),
+ object[i],
+ serializeFunctions,
+ true,
+ ignoreUndefined
+ );
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+
+ if (typeof object?.toBSON === 'function') {
+ object = object.toBSON();
+ }
+
+ // Calculate size
+ for (const key of Object.keys(object)) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined);
+ }
+ }
+
+ return totalLength;
+}
+
+/** @internal */
+function calculateElement(
+ name: string,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ value: any,
+ serializeFunctions = false,
+ isArray = false,
+ ignoreUndefined = false
+) {
+ // If we have toBSON defined, override the current object
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+
+ switch (typeof value) {
+ case 'string':
+ return 1 + ByteUtils.utf8ByteLength(name) + 1 + 4 + ByteUtils.utf8ByteLength(value) + 1;
+ case 'number':
+ if (
+ Math.floor(value) === value &&
+ value >= constants.JS_INT_MIN &&
+ value <= constants.JS_INT_MAX
+ ) {
+ if (value >= constants.BSON_INT32_MIN && value <= constants.BSON_INT32_MAX) {
+ // 32 bit
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (4 + 1);
+ } else {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ } else {
+ // 64 bit
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if (isArray || !ignoreUndefined)
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ return 0;
+ case 'boolean':
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 1);
+ case 'object':
+ if (
+ value != null &&
+ typeof value._bsontype === 'string' &&
+ value[Symbol.for('@@mdb.bson.version')] !== constants.BSON_MAJOR_VERSION
+ ) {
+ throw new BSONVersionError();
+ } else if (value == null || value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + 1;
+ } else if (value._bsontype === 'ObjectId') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (12 + 1);
+ } else if (value instanceof Date || isDate(value)) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ } else if (
+ ArrayBuffer.isView(value) ||
+ value instanceof ArrayBuffer ||
+ isAnyArrayBuffer(value)
+ ) {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (1 + 4 + 1) + value.byteLength
+ );
+ } else if (
+ value._bsontype === 'Long' ||
+ value._bsontype === 'Double' ||
+ value._bsontype === 'Timestamp'
+ ) {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
+ } else if (value._bsontype === 'Decimal128') {
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (16 + 1);
+ } else if (value._bsontype === 'Code') {
+ // Calculate size depending on the availability of a scope
+ if (value.scope != null && Object.keys(value.scope).length > 0) {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1 +
+ internalCalculateObjectSize(value.scope, serializeFunctions, ignoreUndefined)
+ );
+ } else {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.code.toString()) +
+ 1
+ );
+ }
+ } else if (value._bsontype === 'Binary') {
+ const binary: Binary = value;
+ // Check what kind of subtype we have
+ if (binary.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ (binary.position + 1 + 4 + 1 + 4)
+ );
+ } else {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (binary.position + 1 + 4 + 1)
+ );
+ }
+ } else if (value._bsontype === 'Symbol') {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ ByteUtils.utf8ByteLength(value.value) +
+ 4 +
+ 1 +
+ 1
+ );
+ } else if (value._bsontype === 'DBRef') {
+ // Set up correct object for serialization
+ const ordered_values = Object.assign(
+ {
+ $ref: value.collection,
+ $id: value.oid
+ },
+ value.fields
+ );
+
+ // Add db reference if it exists
+ if (value.db != null) {
+ ordered_values['$db'] = value.db;
+ }
+
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ internalCalculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined)
+ );
+ } else if (value instanceof RegExp || isRegExp(value)) {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.source) +
+ 1 +
+ (value.global ? 1 : 0) +
+ (value.ignoreCase ? 1 : 0) +
+ (value.multiline ? 1 : 0) +
+ 1
+ );
+ } else if (value._bsontype === 'BSONRegExp') {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.pattern) +
+ 1 +
+ ByteUtils.utf8ByteLength(value.options) +
+ 1
+ );
+ } else {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ internalCalculateObjectSize(value, serializeFunctions, ignoreUndefined) +
+ 1
+ );
+ }
+ case 'function':
+ if (serializeFunctions) {
+ return (
+ (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) +
+ 1 +
+ 4 +
+ ByteUtils.utf8ByteLength(value.toString()) +
+ 1
+ );
+ }
+ }
+
+ return 0;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/parser/deserializer.ts b/week-3/04-course-app-hard/node_modules/bson/src/parser/deserializer.ts
new file mode 100644
index 000000000..165a529cf
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/parser/deserializer.ts
@@ -0,0 +1,655 @@
+import { Binary, UUID } from '../binary';
+import type { Document } from '../bson';
+import { Code } from '../code';
+import * as constants from '../constants';
+import { DBRef, type DBRefLike, isDBRefLike } from '../db_ref';
+import { Decimal128 } from '../decimal128';
+import { Double } from '../double';
+import { BSONError } from '../error';
+import { Int32 } from '../int_32';
+import { Long } from '../long';
+import { MaxKey } from '../max_key';
+import { MinKey } from '../min_key';
+import { ObjectId } from '../objectid';
+import { BSONRegExp } from '../regexp';
+import { BSONSymbol } from '../symbol';
+import { Timestamp } from '../timestamp';
+import { ByteUtils } from '../utils/byte_utils';
+import { NumberUtils } from '../utils/number_utils';
+
+/** @public */
+export interface DeserializeOptions {
+ /**
+ * when deserializing a Long return as a BigInt.
+ * @defaultValue `false`
+ */
+ useBigInt64?: boolean;
+ /**
+ * when deserializing a Long will fit it into a Number if it's smaller than 53 bits.
+ * @defaultValue `true`
+ */
+ promoteLongs?: boolean;
+ /**
+ * when deserializing a Binary will return it as a node.js Buffer instance.
+ * @defaultValue `false`
+ */
+ promoteBuffers?: boolean;
+ /**
+ * when deserializing will promote BSON values to their Node.js closest equivalent types.
+ * @defaultValue `true`
+ */
+ promoteValues?: boolean;
+ /**
+ * allow to specify if there what fields we wish to return as unserialized raw buffer.
+ * @defaultValue `null`
+ */
+ fieldsAsRaw?: Document;
+ /**
+ * return BSON regular expressions as BSONRegExp instances.
+ * @defaultValue `false`
+ */
+ bsonRegExp?: boolean;
+ /**
+ * allows the buffer to be larger than the parsed BSON object.
+ * @defaultValue `false`
+ */
+ allowObjectSmallerThanBufferSize?: boolean;
+ /**
+ * Offset into buffer to begin reading document from
+ * @defaultValue `0`
+ */
+ index?: number;
+
+ raw?: boolean;
+ /** Allows for opt-out utf-8 validation for all keys or
+ * specified keys. Must be all true or all false.
+ *
+ * @example
+ * ```js
+ * // disables validation on all keys
+ * validation: { utf8: false }
+ *
+ * // enables validation only on specified keys a, b, and c
+ * validation: { utf8: { a: true, b: true, c: true } }
+ *
+ * // disables validation only on specified keys a, b
+ * validation: { utf8: { a: false, b: false } }
+ * ```
+ */
+ validation?: { utf8: boolean | Record | Record };
+}
+
+// Internal long versions
+const JS_INT_MAX_LONG = Long.fromNumber(constants.JS_INT_MAX);
+const JS_INT_MIN_LONG = Long.fromNumber(constants.JS_INT_MIN);
+
+export function internalDeserialize(
+ buffer: Uint8Array,
+ options: DeserializeOptions,
+ isArray?: boolean
+): Document {
+ options = options == null ? {} : options;
+ const index = options && options.index ? options.index : 0;
+ // Read the document size
+ const size = NumberUtils.getInt32LE(buffer, index);
+
+ if (size < 5) {
+ throw new BSONError(`bson size must be >= 5, is ${size}`);
+ }
+
+ if (options.allowObjectSmallerThanBufferSize && buffer.length < size) {
+ throw new BSONError(`buffer length ${buffer.length} must be >= bson size ${size}`);
+ }
+
+ if (!options.allowObjectSmallerThanBufferSize && buffer.length !== size) {
+ throw new BSONError(`buffer length ${buffer.length} must === bson size ${size}`);
+ }
+
+ if (size + index > buffer.byteLength) {
+ throw new BSONError(
+ `(bson size ${size} + options.index ${index} must be <= buffer length ${buffer.byteLength})`
+ );
+ }
+
+ // Illegal end value
+ if (buffer[index + size - 1] !== 0) {
+ throw new BSONError(
+ "One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00"
+ );
+ }
+
+ // Start deserialization
+ return deserializeObject(buffer, index, options, isArray);
+}
+
+const allowedDBRefKeys = /^\$ref$|^\$id$|^\$db$/;
+
+function deserializeObject(
+ buffer: Uint8Array,
+ index: number,
+ options: DeserializeOptions,
+ isArray = false
+) {
+ const fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+
+ // Return raw bson buffer instead of parsing it
+ const raw = options['raw'] == null ? false : options['raw'];
+
+ // Return BSONRegExp objects instead of native regular expressions
+ const bsonRegExp = typeof options['bsonRegExp'] === 'boolean' ? options['bsonRegExp'] : false;
+
+ // Controls the promotion of values vs wrapper classes
+ const promoteBuffers = options.promoteBuffers ?? false;
+ const promoteLongs = options.promoteLongs ?? true;
+ const promoteValues = options.promoteValues ?? true;
+ const useBigInt64 = options.useBigInt64 ?? false;
+
+ if (useBigInt64 && !promoteValues) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+
+ if (useBigInt64 && !promoteLongs) {
+ throw new BSONError('Must either request bigint or Long for int64 deserialization');
+ }
+
+ // Ensures default validation option if none given
+ const validation = options.validation == null ? { utf8: true } : options.validation;
+
+ // Shows if global utf-8 validation is enabled or disabled
+ let globalUTFValidation = true;
+ // Reflects utf-8 validation setting regardless of global or specific key validation
+ let validationSetting: boolean;
+ // Set of keys either to enable or disable validation on
+ let utf8KeysSet;
+
+ // Check for boolean uniformity and empty validation option
+ const utf8ValidatedKeys = validation.utf8;
+ if (typeof utf8ValidatedKeys === 'boolean') {
+ validationSetting = utf8ValidatedKeys;
+ } else {
+ globalUTFValidation = false;
+ const utf8ValidationValues = Object.keys(utf8ValidatedKeys).map(function (key) {
+ return utf8ValidatedKeys[key];
+ });
+ if (utf8ValidationValues.length === 0) {
+ throw new BSONError('UTF-8 validation setting cannot be empty');
+ }
+ if (typeof utf8ValidationValues[0] !== 'boolean') {
+ throw new BSONError('Invalid UTF-8 validation option, must specify boolean values');
+ }
+ validationSetting = utf8ValidationValues[0];
+ // Ensures boolean uniformity in utf-8 validation (all true or all false)
+ if (!utf8ValidationValues.every(item => item === validationSetting)) {
+ throw new BSONError('Invalid UTF-8 validation option - keys must be all true or all false');
+ }
+ }
+
+ // Add keys to set that will either be validated or not based on validationSetting
+ if (!globalUTFValidation) {
+ utf8KeysSet = new Set();
+
+ for (const key of Object.keys(utf8ValidatedKeys)) {
+ utf8KeysSet.add(key);
+ }
+ }
+
+ // Set the start index
+ const startIndex = index;
+
+ // Validate that we have at least 4 bytes of buffer
+ if (buffer.length < 5) throw new BSONError('corrupt bson message < 5 bytes long');
+
+ // Read the document size
+ const size = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+
+ // Ensure buffer is valid size
+ if (size < 5 || size > buffer.length) throw new BSONError('corrupt bson message');
+
+ // Create holding object
+ const object: Document = isArray ? [] : {};
+ // Used for arrays to skip having to perform utf8 decoding
+ let arrayIndex = 0;
+ const done = false;
+
+ let isPossibleDBRef = isArray ? false : null;
+
+ // While we have more left data left keep parsing
+ while (!done) {
+ // Read the type
+ const elementType = buffer[index++];
+
+ // If we get a zero it's the last byte, exit
+ if (elementType === 0) break;
+
+ // Get the start search index
+ let i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.byteLength) throw new BSONError('Bad BSON Document: illegal CString');
+
+ // Represents the key
+ const name = isArray ? arrayIndex++ : ByteUtils.toUTF8(buffer, index, i, false);
+
+ // shouldValidateKey is true if the key should be validated, false otherwise
+ let shouldValidateKey = true;
+ if (globalUTFValidation || utf8KeysSet?.has(name)) {
+ shouldValidateKey = validationSetting;
+ } else {
+ shouldValidateKey = !validationSetting;
+ }
+
+ if (isPossibleDBRef !== false && (name as string)[0] === '$') {
+ isPossibleDBRef = allowedDBRefKeys.test(name as string);
+ }
+ let value;
+
+ index = i + 1;
+
+ if (elementType === constants.BSON_DATA_STRING) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (
+ stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0
+ ) {
+ throw new BSONError('bad string length in bson');
+ }
+ value = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ index = index + stringSize;
+ } else if (elementType === constants.BSON_DATA_OID) {
+ const oid = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++) oid[i] = buffer[index + i];
+ value = new ObjectId(oid);
+ index = index + 12;
+ } else if (elementType === constants.BSON_DATA_INT && promoteValues === false) {
+ value = new Int32(NumberUtils.getInt32LE(buffer, index));
+ index += 4;
+ } else if (elementType === constants.BSON_DATA_INT) {
+ value = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ } else if (elementType === constants.BSON_DATA_NUMBER) {
+ value = NumberUtils.getFloat64LE(buffer, index);
+ index += 8;
+ if (promoteValues === false) value = new Double(value);
+ } else if (elementType === constants.BSON_DATA_DATE) {
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+
+ value = new Date(new Long(lowBits, highBits).toNumber());
+ } else if (elementType === constants.BSON_DATA_BOOLEAN) {
+ if (buffer[index] !== 0 && buffer[index] !== 1)
+ throw new BSONError('illegal boolean type value');
+ value = buffer[index++] === 1;
+ } else if (elementType === constants.BSON_DATA_OBJECT) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+
+ if (objectSize <= 0 || objectSize > buffer.length - index)
+ throw new BSONError('bad embedded document length in bson');
+
+ // We have a raw value
+ if (raw) {
+ value = buffer.slice(index, index + objectSize);
+ } else {
+ let objectOptions = options;
+ if (!globalUTFValidation) {
+ objectOptions = { ...options, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, objectOptions, false);
+ }
+
+ index = index + objectSize;
+ } else if (elementType === constants.BSON_DATA_ARRAY) {
+ const _index = index;
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ let arrayOptions: DeserializeOptions = options;
+
+ // Stop index
+ const stopIndex = index + objectSize;
+
+ // All elements of array to be returned as raw bson
+ if (fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = { ...options, raw: true };
+ }
+
+ if (!globalUTFValidation) {
+ arrayOptions = { ...arrayOptions, validation: { utf8: shouldValidateKey } };
+ }
+ value = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+
+ if (buffer[index - 1] !== 0) throw new BSONError('invalid array terminator byte');
+ if (index !== stopIndex) throw new BSONError('corrupted array bson');
+ } else if (elementType === constants.BSON_DATA_UNDEFINED) {
+ value = undefined;
+ } else if (elementType === constants.BSON_DATA_NULL) {
+ value = null;
+ } else if (elementType === constants.BSON_DATA_LONG) {
+ if (useBigInt64) {
+ value = NumberUtils.getBigInt64LE(buffer, index);
+ index += 8;
+ } else {
+ // Unpack the low and high bits
+ const lowBits = NumberUtils.getInt32LE(buffer, index);
+ const highBits = NumberUtils.getInt32LE(buffer, index + 4);
+ index += 8;
+
+ const long = new Long(lowBits, highBits);
+ // Promote the long if possible
+ if (promoteLongs && promoteValues === true) {
+ value =
+ long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG)
+ ? long.toNumber()
+ : long;
+ } else {
+ value = long;
+ }
+ }
+ } else if (elementType === constants.BSON_DATA_DECIMAL128) {
+ // Buffer to contain the decimal bytes
+ const bytes = ByteUtils.allocateUnsafe(16);
+ // Copy the next 16 bytes into the bytes buffer
+ for (let i = 0; i < 16; i++) bytes[i] = buffer[index + i];
+ // Update index
+ index = index + 16;
+ // Assign the new Decimal128 value
+ value = new Decimal128(bytes);
+ } else if (elementType === constants.BSON_DATA_BINARY) {
+ let binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ const totalBinarySize = binarySize;
+ const subType = buffer[index++];
+
+ // Did we have a negative binary size, throw
+ if (binarySize < 0) throw new BSONError('Negative binary type element size found');
+
+ // Is the length longer than the document
+ if (binarySize > buffer.byteLength)
+ throw new BSONError('Binary type size larger than document size');
+
+ // Decode as raw Buffer object if options specifies it
+ if (buffer['slice'] != null) {
+ // If we have subtype 2 skip the 4 bytes for the size
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.toLocalBufferType(buffer.slice(index, index + binarySize));
+ } else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === constants.BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ } else {
+ // If we have subtype 2 skip the 4 bytes for the size
+ if (subType === Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (binarySize < 0)
+ throw new BSONError('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (binarySize < totalBinarySize - 4)
+ throw new BSONError('Binary type with subtype 0x02 contains too short binary size');
+ }
+
+ if (promoteBuffers && promoteValues) {
+ value = ByteUtils.allocateUnsafe(binarySize);
+ // Copy the data
+ for (i = 0; i < binarySize; i++) {
+ value[i] = buffer[index + i];
+ }
+ } else {
+ value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === constants.BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
+ }
+ }
+
+ // Update the index
+ index = index + binarySize;
+ } else if (elementType === constants.BSON_DATA_REGEXP && bsonRegExp === false) {
+ // Get the start search index
+ i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new BSONError('Bad BSON Document: illegal CString');
+ // Return the C string
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ // Create the regexp
+ index = i + 1;
+
+ // Get the start search index
+ i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new BSONError('Bad BSON Document: illegal CString');
+ // Return the C string
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+
+ // For each option add the corresponding one for javascript
+ const optionsArray = new Array(regExpOptions.length);
+
+ // Parse options
+ for (i = 0; i < regExpOptions.length; i++) {
+ switch (regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+
+ value = new RegExp(source, optionsArray.join(''));
+ } else if (elementType === constants.BSON_DATA_REGEXP && bsonRegExp === true) {
+ // Get the start search index
+ i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new BSONError('Bad BSON Document: illegal CString');
+ // Return the C string
+ const source = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+
+ // Get the start search index
+ i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new BSONError('Bad BSON Document: illegal CString');
+ // Return the C string
+ const regExpOptions = ByteUtils.toUTF8(buffer, index, i, false);
+ index = i + 1;
+
+ // Set the object
+ value = new BSONRegExp(source, regExpOptions);
+ } else if (elementType === constants.BSON_DATA_SYMBOL) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (
+ stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0
+ ) {
+ throw new BSONError('bad string length in bson');
+ }
+ const symbol = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ value = promoteValues ? symbol : new BSONSymbol(symbol);
+ index = index + stringSize;
+ } else if (elementType === constants.BSON_DATA_TIMESTAMP) {
+ value = new Timestamp({
+ i: NumberUtils.getUint32LE(buffer, index),
+ t: NumberUtils.getUint32LE(buffer, index + 4)
+ });
+ index += 8;
+ } else if (elementType === constants.BSON_DATA_MIN_KEY) {
+ value = new MinKey();
+ } else if (elementType === constants.BSON_DATA_MAX_KEY) {
+ value = new MaxKey();
+ } else if (elementType === constants.BSON_DATA_CODE) {
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ if (
+ stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0
+ ) {
+ throw new BSONError('bad string length in bson');
+ }
+ const functionString = ByteUtils.toUTF8(
+ buffer,
+ index,
+ index + stringSize - 1,
+ shouldValidateKey
+ );
+
+ value = new Code(functionString);
+
+ // Update parse index position
+ index = index + stringSize;
+ } else if (elementType === constants.BSON_DATA_CODE_W_SCOPE) {
+ const totalSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+
+ // Element cannot be shorter than totalSize + stringSize + documentSize + terminator
+ if (totalSize < 4 + 4 + 4 + 1) {
+ throw new BSONError('code_w_scope total size shorter minimum expected length');
+ }
+
+ // Get the code string size
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ // Check if we have a valid string
+ if (
+ stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0
+ ) {
+ throw new BSONError('bad string length in bson');
+ }
+
+ // Javascript function
+ const functionString = ByteUtils.toUTF8(
+ buffer,
+ index,
+ index + stringSize - 1,
+ shouldValidateKey
+ );
+ // Update parse index position
+ index = index + stringSize;
+ // Parse the element
+ const _index = index;
+ // Decode the size of the object document
+ const objectSize = NumberUtils.getInt32LE(buffer, index);
+ // Decode the scope object
+ const scopeObject = deserializeObject(buffer, _index, options, false);
+ // Adjust the index
+ index = index + objectSize;
+
+ // Check if field length is too short
+ if (totalSize < 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too short, truncating scope');
+ }
+
+ // Check if totalSize field is too long
+ if (totalSize > 4 + 4 + objectSize + stringSize) {
+ throw new BSONError('code_w_scope total size is too long, clips outer document');
+ }
+
+ value = new Code(functionString, scopeObject);
+ } else if (elementType === constants.BSON_DATA_DBPOINTER) {
+ // Get the code string size
+ const stringSize = NumberUtils.getInt32LE(buffer, index);
+ index += 4;
+ // Check if we have a valid string
+ if (
+ stringSize <= 0 ||
+ stringSize > buffer.length - index ||
+ buffer[index + stringSize - 1] !== 0
+ )
+ throw new BSONError('bad string length in bson');
+ // Namespace
+ const namespace = ByteUtils.toUTF8(buffer, index, index + stringSize - 1, shouldValidateKey);
+ // Update parse index position
+ index = index + stringSize;
+
+ // Read the oid
+ const oidBuffer = ByteUtils.allocateUnsafe(12);
+ for (let i = 0; i < 12; i++) oidBuffer[i] = buffer[index + i];
+ const oid = new ObjectId(oidBuffer);
+
+ // Update the index
+ index = index + 12;
+
+ // Upgrade to DBRef type
+ value = new DBRef(namespace, oid);
+ } else {
+ throw new BSONError(
+ `Detected unknown BSON type ${elementType.toString(16)} for fieldname "${name}"`
+ );
+ }
+ if (name === '__proto__') {
+ Object.defineProperty(object, name, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ } else {
+ object[name] = value;
+ }
+ }
+
+ // Check if the deserialization was against a valid array/object
+ if (size !== index - startIndex) {
+ if (isArray) throw new BSONError('corrupt array bson');
+ throw new BSONError('corrupt object bson');
+ }
+
+ // if we did not find "$ref", "$id", "$db", or found an extraneous $key, don't make a DBRef
+ if (!isPossibleDBRef) return object;
+
+ if (isDBRefLike(object)) {
+ const copy = Object.assign({}, object) as Partial;
+ delete copy.$ref;
+ delete copy.$id;
+ delete copy.$db;
+ return new DBRef(object.$ref, object.$id, object.$db, copy);
+ }
+
+ return object;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/parser/on_demand/index.ts b/week-3/04-course-app-hard/node_modules/bson/src/parser/on_demand/index.ts
new file mode 100644
index 000000000..f099c1152
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/parser/on_demand/index.ts
@@ -0,0 +1,32 @@
+import { ByteUtils } from '../../utils/byte_utils';
+import { NumberUtils } from '../../utils/number_utils';
+import { type BSONElement, parseToElements } from './parse_to_elements';
+/**
+ * @experimental
+ * @public
+ *
+ * A new set of BSON APIs that are currently experimental and not intended for production use.
+ */
+export type OnDemand = {
+ parseToElements: (this: void, bytes: Uint8Array, startOffset?: number) => Iterable;
+ // Types
+ BSONElement: BSONElement;
+
+ // Utils
+ ByteUtils: ByteUtils;
+ NumberUtils: NumberUtils;
+};
+
+/**
+ * @experimental
+ * @public
+ */
+const onDemand: OnDemand = Object.create(null);
+
+onDemand.parseToElements = parseToElements;
+onDemand.ByteUtils = ByteUtils;
+onDemand.NumberUtils = NumberUtils;
+
+Object.freeze(onDemand);
+
+export { onDemand };
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/parser/on_demand/parse_to_elements.ts b/week-3/04-course-app-hard/node_modules/bson/src/parser/on_demand/parse_to_elements.ts
new file mode 100644
index 000000000..f2c8e6972
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/parser/on_demand/parse_to_elements.ts
@@ -0,0 +1,188 @@
+import { BSONOffsetError } from '../../error';
+import { NumberUtils } from '../../utils/number_utils';
+
+/**
+ * @internal
+ *
+ * @remarks
+ * - This enum is const so the code we produce will inline the numbers
+ * - `minKey` is set to 255 so unsigned comparisons succeed
+ * - Modify with caution, double check the bundle contains literals
+ */
+const enum BSONElementType {
+ double = 1,
+ string = 2,
+ object = 3,
+ array = 4,
+ binData = 5,
+ undefined = 6,
+ objectId = 7,
+ bool = 8,
+ date = 9,
+ null = 10,
+ regex = 11,
+ dbPointer = 12,
+ javascript = 13,
+ symbol = 14,
+ javascriptWithScope = 15,
+ int = 16,
+ timestamp = 17,
+ long = 18,
+ decimal = 19,
+ minKey = 255,
+ maxKey = 127
+}
+
+/**
+ * @public
+ * @experimental
+ */
+export type BSONElement = [
+ type: number,
+ nameOffset: number,
+ nameLength: number,
+ offset: number,
+ length: number
+];
+
+function getSize(source: Uint8Array, offset: number) {
+ try {
+ return NumberUtils.getNonnegativeInt32LE(source, offset);
+ } catch (cause) {
+ throw new BSONOffsetError('BSON size cannot be negative', offset, { cause });
+ }
+}
+
+/**
+ * Searches for null terminator of a BSON element's value (Never the document null terminator)
+ * **Does not** bounds check since this should **ONLY** be used within parseToElements which has asserted that `bytes` ends with a `0x00`.
+ * So this will at most iterate to the document's terminator and error if that is the offset reached.
+ */
+function findNull(bytes: Uint8Array, offset: number): number {
+ let nullTerminatorOffset = offset;
+
+ for (; bytes[nullTerminatorOffset] !== 0x00; nullTerminatorOffset++);
+
+ if (nullTerminatorOffset === bytes.length - 1) {
+ // We reached the null terminator of the document, not a value's
+ throw new BSONOffsetError('Null terminator not found', offset);
+ }
+
+ return nullTerminatorOffset;
+}
+
+/**
+ * @public
+ * @experimental
+ */
+export function parseToElements(
+ bytes: Uint8Array,
+ startOffset: number | null = 0
+): Iterable {
+ startOffset ??= 0;
+
+ if (bytes.length < 5) {
+ throw new BSONOffsetError(
+ `Input must be at least 5 bytes, got ${bytes.length} bytes`,
+ startOffset
+ );
+ }
+
+ const documentSize = getSize(bytes, startOffset);
+
+ if (documentSize > bytes.length - startOffset) {
+ throw new BSONOffsetError(
+ `Parsed documentSize (${documentSize} bytes) does not match input length (${bytes.length} bytes)`,
+ startOffset
+ );
+ }
+
+ if (bytes[startOffset + documentSize - 1] !== 0x00) {
+ throw new BSONOffsetError('BSON documents must end in 0x00', startOffset + documentSize);
+ }
+
+ const elements: BSONElement[] = [];
+ let offset = startOffset + 4;
+
+ while (offset <= documentSize + startOffset) {
+ const type = bytes[offset];
+ offset += 1;
+
+ if (type === 0) {
+ if (offset - startOffset !== documentSize) {
+ throw new BSONOffsetError(`Invalid 0x00 type byte`, offset);
+ }
+ break;
+ }
+
+ const nameOffset = offset;
+ const nameLength = findNull(bytes, offset) - nameOffset;
+ offset += nameLength + 1;
+
+ let length: number;
+
+ if (
+ type === BSONElementType.double ||
+ type === BSONElementType.long ||
+ type === BSONElementType.date ||
+ type === BSONElementType.timestamp
+ ) {
+ length = 8;
+ } else if (type === BSONElementType.int) {
+ length = 4;
+ } else if (type === BSONElementType.objectId) {
+ length = 12;
+ } else if (type === BSONElementType.decimal) {
+ length = 16;
+ } else if (type === BSONElementType.bool) {
+ length = 1;
+ } else if (
+ type === BSONElementType.null ||
+ type === BSONElementType.undefined ||
+ type === BSONElementType.maxKey ||
+ type === BSONElementType.minKey
+ ) {
+ length = 0;
+ }
+ // Needs a size calculation
+ else if (type === BSONElementType.regex) {
+ length = findNull(bytes, findNull(bytes, offset) + 1) + 1 - offset;
+ } else if (
+ type === BSONElementType.object ||
+ type === BSONElementType.array ||
+ type === BSONElementType.javascriptWithScope
+ ) {
+ length = getSize(bytes, offset);
+ } else if (
+ type === BSONElementType.string ||
+ type === BSONElementType.binData ||
+ type === BSONElementType.dbPointer ||
+ type === BSONElementType.javascript ||
+ type === BSONElementType.symbol
+ ) {
+ length = getSize(bytes, offset) + 4;
+ if (type === BSONElementType.binData) {
+ // binary subtype
+ length += 1;
+ }
+ if (type === BSONElementType.dbPointer) {
+ // dbPointer's objectId
+ length += 12;
+ }
+ } else {
+ throw new BSONOffsetError(
+ `Invalid 0x${type.toString(16).padStart(2, '0')} type byte`,
+ offset
+ );
+ }
+
+ if (length > documentSize) {
+ throw new BSONOffsetError('value reports length larger than document', offset);
+ }
+
+ elements.push([type, nameOffset, nameLength, offset, length]);
+ offset += length;
+ }
+
+ return elements;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/parser/serializer.ts b/week-3/04-course-app-hard/node_modules/bson/src/parser/serializer.ts
new file mode 100644
index 000000000..86490798e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/parser/serializer.ts
@@ -0,0 +1,942 @@
+import { Binary } from '../binary';
+import type { BSONSymbol, DBRef, Document, MaxKey } from '../bson';
+import type { Code } from '../code';
+import * as constants from '../constants';
+import type { DBRefLike } from '../db_ref';
+import type { Decimal128 } from '../decimal128';
+import type { Double } from '../double';
+import { BSONError, BSONVersionError } from '../error';
+import type { Int32 } from '../int_32';
+import { Long } from '../long';
+import type { MinKey } from '../min_key';
+import type { ObjectId } from '../objectid';
+import type { BSONRegExp } from '../regexp';
+import { ByteUtils } from '../utils/byte_utils';
+import { NumberUtils } from '../utils/number_utils';
+import { isAnyArrayBuffer, isDate, isMap, isRegExp, isUint8Array } from './utils';
+
+/** @public */
+export interface SerializeOptions {
+ /**
+ * the serializer will check if keys are valid.
+ * @defaultValue `false`
+ */
+ checkKeys?: boolean;
+ /**
+ * serialize the javascript functions
+ * @defaultValue `false`
+ */
+ serializeFunctions?: boolean;
+ /**
+ * serialize will not emit undefined fields
+ * note that the driver sets this to `false`
+ * @defaultValue `true`
+ */
+ ignoreUndefined?: boolean;
+ /** @internal Resize internal buffer */
+ minInternalBufferSize?: number;
+ /**
+ * the index in the buffer where we wish to start serializing into
+ * @defaultValue `0`
+ */
+ index?: number;
+}
+
+const regexp = /\x00/; // eslint-disable-line no-control-regex
+const ignoreKeys = new Set(['$db', '$ref', '$id', '$clusterTime']);
+
+/*
+ * isArray indicates if we are writing to a BSON array (type 0x04)
+ * which forces the "key" which really an array index as a string to be written as ascii
+ * This will catch any errors in index as a string generation
+ */
+
+function serializeString(buffer: Uint8Array, key: string, value: string, index: number) {
+ // Encode String type
+ buffer[index++] = constants.BSON_DATA_STRING;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the string
+ const size = ByteUtils.encodeUTF8Into(buffer, value, index + 4);
+ // Write the size of the string to buffer
+ NumberUtils.setInt32LE(buffer, index, size + 1);
+ // Update index
+ index = index + 4 + size;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+function serializeNumber(buffer: Uint8Array, key: string, value: number, index: number) {
+ const isNegativeZero = Object.is(value, -0);
+
+ const type =
+ !isNegativeZero &&
+ Number.isSafeInteger(value) &&
+ value <= constants.BSON_INT32_MAX &&
+ value >= constants.BSON_INT32_MIN
+ ? constants.BSON_DATA_INT
+ : constants.BSON_DATA_NUMBER;
+
+ buffer[index++] = type;
+
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0x00;
+
+ if (type === constants.BSON_DATA_INT) {
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ } else {
+ index += NumberUtils.setFloat64LE(buffer, index, value);
+ }
+
+ return index;
+}
+
+function serializeBigInt(buffer: Uint8Array, key: string, value: bigint, index: number) {
+ buffer[index++] = constants.BSON_DATA_LONG;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index += numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ index += NumberUtils.setBigInt64LE(buffer, index, value);
+
+ return index;
+}
+
+function serializeNull(buffer: Uint8Array, key: string, _: unknown, index: number) {
+ // Set long type
+ buffer[index++] = constants.BSON_DATA_NULL;
+
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+
+function serializeBoolean(buffer: Uint8Array, key: string, value: boolean, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_BOOLEAN;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Encode the boolean value
+ buffer[index++] = value ? 1 : 0;
+ return index;
+}
+
+function serializeDate(buffer: Uint8Array, key: string, value: Date, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_DATE;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write the date
+ const dateInMilis = Long.fromNumber(value.getTime());
+ const lowBits = dateInMilis.getLowBits();
+ const highBits = dateInMilis.getHighBits();
+ // Encode low bits
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ // Encode high bits
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+
+function serializeRegExp(buffer: Uint8Array, key: string, value: RegExp, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_REGEXP;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw new BSONError('value ' + value.source + ' must not contain null bytes');
+ }
+ // Adjust the index
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.source, index);
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if (value.ignoreCase) buffer[index++] = 0x69; // i
+ if (value.global) buffer[index++] = 0x73; // s
+ if (value.multiline) buffer[index++] = 0x6d; // m
+
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+function serializeBSONRegExp(buffer: Uint8Array, key: string, value: BSONRegExp, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_REGEXP;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Check the pattern for 0 bytes
+ if (value.pattern.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw new BSONError('pattern ' + value.pattern + ' must not contain null bytes');
+ }
+
+ // Adjust the index
+ index = index + ByteUtils.encodeUTF8Into(buffer, value.pattern, index);
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the options
+ const sortedOptions = value.options.split('').sort().join('');
+ index = index + ByteUtils.encodeUTF8Into(buffer, sortedOptions, index);
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+function serializeMinMax(buffer: Uint8Array, key: string, value: MinKey | MaxKey, index: number) {
+ // Write the type of either min or max key
+ if (value === null) {
+ buffer[index++] = constants.BSON_DATA_NULL;
+ } else if (value._bsontype === 'MinKey') {
+ buffer[index++] = constants.BSON_DATA_MIN_KEY;
+ } else {
+ buffer[index++] = constants.BSON_DATA_MAX_KEY;
+ }
+
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+
+function serializeObjectId(buffer: Uint8Array, key: string, value: ObjectId, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_OID;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ index += value.serializeInto(buffer, index);
+
+ // Adjust index
+ return index;
+}
+
+function serializeBuffer(buffer: Uint8Array, key: string, value: Uint8Array, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_BINARY;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Get size of the buffer (current write point)
+ const size = value.length;
+ // Write the size of the string to buffer
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ // Write the default subtype
+ buffer[index++] = constants.BSON_BINARY_SUBTYPE_DEFAULT;
+ // Copy the content form the binary field to the buffer
+ if (size <= 16) {
+ for (let i = 0; i < size; i++) buffer[index + i] = value[i];
+ } else {
+ buffer.set(value, index);
+ }
+ // Adjust the index
+ index = index + size;
+ return index;
+}
+
+function serializeObject(
+ buffer: Uint8Array,
+ key: string,
+ value: Document,
+ index: number,
+ checkKeys: boolean,
+ depth: number,
+ serializeFunctions: boolean,
+ ignoreUndefined: boolean,
+ path: Set
+) {
+ if (path.has(value)) {
+ throw new BSONError('Cannot convert circular structure to BSON');
+ }
+
+ path.add(value);
+
+ // Write the type
+ buffer[index++] = Array.isArray(value) ? constants.BSON_DATA_ARRAY : constants.BSON_DATA_OBJECT;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ const endIndex = serializeInto(
+ buffer,
+ value,
+ checkKeys,
+ index,
+ depth + 1,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+
+ path.delete(value);
+
+ return endIndex;
+}
+
+function serializeDecimal128(buffer: Uint8Array, key: string, value: Decimal128, index: number) {
+ buffer[index++] = constants.BSON_DATA_DECIMAL128;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the data from the value
+ for (let i = 0; i < 16; i++) buffer[index + i] = value.bytes[i];
+ return index + 16;
+}
+
+function serializeLong(buffer: Uint8Array, key: string, value: Long, index: number) {
+ // Write the type
+ buffer[index++] =
+ value._bsontype === 'Long' ? constants.BSON_DATA_LONG : constants.BSON_DATA_TIMESTAMP;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the date
+ const lowBits = value.getLowBits();
+ const highBits = value.getHighBits();
+ // Encode low bits
+ index += NumberUtils.setInt32LE(buffer, index, lowBits);
+ // Encode high bits
+ index += NumberUtils.setInt32LE(buffer, index, highBits);
+ return index;
+}
+
+function serializeInt32(buffer: Uint8Array, key: string, value: Int32 | number, index: number) {
+ value = value.valueOf();
+ // Set int type 32 bits or less
+ buffer[index++] = constants.BSON_DATA_INT;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the int value
+ index += NumberUtils.setInt32LE(buffer, index, value);
+ return index;
+}
+
+function serializeDouble(buffer: Uint8Array, key: string, value: Double, index: number) {
+ // Encode as double
+ buffer[index++] = constants.BSON_DATA_NUMBER;
+
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write float
+ index += NumberUtils.setFloat64LE(buffer, index, value.value);
+
+ return index;
+}
+
+function serializeFunction(buffer: Uint8Array, key: string, value: Function, index: number) {
+ buffer[index++] = constants.BSON_DATA_CODE;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ const functionString = value.toString();
+
+ // Write the string
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ // Write the size of the string to buffer
+ NumberUtils.setInt32LE(buffer, index, size);
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+function serializeCode(
+ buffer: Uint8Array,
+ key: string,
+ value: Code,
+ index: number,
+ checkKeys = false,
+ depth = 0,
+ serializeFunctions = false,
+ ignoreUndefined = true,
+ path: Set
+) {
+ if (value.scope && typeof value.scope === 'object') {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Starting index
+ let startIndex = index;
+
+ // Serialize the function
+ // Get the function string
+ const functionString = value.code;
+ // Index adjustment
+ index = index + 4;
+ // Write string into buffer
+ const codeSize = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ // Write the size of the string to buffer
+ NumberUtils.setInt32LE(buffer, index, codeSize);
+ // Write end 0
+ buffer[index + 4 + codeSize - 1] = 0;
+ // Write the
+ index = index + codeSize + 4;
+
+ // Serialize the scope value
+ const endIndex = serializeInto(
+ buffer,
+ value.scope,
+ checkKeys,
+ index,
+ depth + 1,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+ index = endIndex - 1;
+
+ // Writ the total
+ const totalSize = endIndex - startIndex;
+
+ // Write the total size of the object
+ startIndex += NumberUtils.setInt32LE(buffer, startIndex, totalSize);
+ // Write trailing zero
+ buffer[index++] = 0;
+ } else {
+ buffer[index++] = constants.BSON_DATA_CODE;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ const functionString = value.code.toString();
+ // Write the string
+ const size = ByteUtils.encodeUTF8Into(buffer, functionString, index + 4) + 1;
+ // Write the size of the string to buffer
+ NumberUtils.setInt32LE(buffer, index, size);
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ }
+
+ return index;
+}
+
+function serializeBinary(buffer: Uint8Array, key: string, value: Binary, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_BINARY;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Extract the buffer
+ const data = value.buffer;
+ // Calculate size
+ let size = value.position;
+ // Add the deprecated 02 type 4 bytes of size to total
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY) size = size + 4;
+ // Write the size of the string to buffer
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ // Write the subtype to the buffer
+ buffer[index++] = value.sub_type;
+
+ // If we have binary type 2 the 4 first bytes are the size
+ if (value.sub_type === Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ index += NumberUtils.setInt32LE(buffer, index, size);
+ }
+
+ if (size <= 16) {
+ for (let i = 0; i < size; i++) buffer[index + i] = data[i];
+ } else {
+ buffer.set(data, index);
+ }
+ // Adjust the index
+ index = index + value.position;
+ return index;
+}
+
+function serializeSymbol(buffer: Uint8Array, key: string, value: BSONSymbol, index: number) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_SYMBOL;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the string
+ const size = ByteUtils.encodeUTF8Into(buffer, value.value, index + 4) + 1;
+ // Write the size of the string to buffer
+ NumberUtils.setInt32LE(buffer, index, size);
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+function serializeDBRef(
+ buffer: Uint8Array,
+ key: string,
+ value: DBRef,
+ index: number,
+ depth: number,
+ serializeFunctions: boolean,
+ path: Set
+) {
+ // Write the type
+ buffer[index++] = constants.BSON_DATA_OBJECT;
+ // Number of written bytes
+ const numberOfWrittenBytes = ByteUtils.encodeUTF8Into(buffer, key, index);
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ let startIndex = index;
+ let output: DBRefLike = {
+ $ref: value.collection || value.namespace, // "namespace" was what library 1.x called "collection"
+ $id: value.oid
+ };
+
+ if (value.db != null) {
+ output.$db = value.db;
+ }
+
+ output = Object.assign(output, value.fields);
+ const endIndex = serializeInto(
+ buffer,
+ output,
+ false,
+ index,
+ depth + 1,
+ serializeFunctions,
+ true,
+ path
+ );
+
+ // Calculate object size
+ const size = endIndex - startIndex;
+ // Write the size
+ startIndex += NumberUtils.setInt32LE(buffer, index, size);
+ // Set index
+ return endIndex;
+}
+
+export function serializeInto(
+ buffer: Uint8Array,
+ object: Document,
+ checkKeys: boolean,
+ startingIndex: number,
+ depth: number,
+ serializeFunctions: boolean,
+ ignoreUndefined: boolean,
+ path: Set | null
+): number {
+ if (path == null) {
+ // We are at the root input
+ if (object == null) {
+ // ONLY the root should turn into an empty document
+ // BSON Empty document has a size of 5 (LE)
+ buffer[0] = 0x05;
+ buffer[1] = 0x00;
+ buffer[2] = 0x00;
+ buffer[3] = 0x00;
+ // All documents end with null terminator
+ buffer[4] = 0x00;
+ return 5;
+ }
+
+ if (Array.isArray(object)) {
+ throw new BSONError('serialize does not support an array as the root input');
+ }
+ if (typeof object !== 'object') {
+ throw new BSONError('serialize does not support non-object as the root input');
+ } else if ('_bsontype' in object && typeof object._bsontype === 'string') {
+ throw new BSONError(`BSON types cannot be serialized as a document`);
+ } else if (
+ isDate(object) ||
+ isRegExp(object) ||
+ isUint8Array(object) ||
+ isAnyArrayBuffer(object)
+ ) {
+ throw new BSONError(`date, regexp, typedarray, and arraybuffer cannot be BSON documents`);
+ }
+
+ path = new Set();
+ }
+
+ // Push the object to the path
+ path.add(object);
+
+ // Start place to serialize into
+ let index = startingIndex + 4;
+
+ // Special case isArray
+ if (Array.isArray(object)) {
+ // Get object keys
+ for (let i = 0; i < object.length; i++) {
+ const key = `${i}`;
+ let value = object[i];
+
+ // Is there an override value
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+
+ if (typeof value === 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if (typeof value === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if (typeof value === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ } else if (typeof value === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if (value === undefined) {
+ index = serializeNull(buffer, key, value, index);
+ } else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ } else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if (typeof value === 'object' && value._bsontype == null) {
+ index = serializeObject(
+ buffer,
+ key,
+ value,
+ index,
+ checkKeys,
+ depth,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+ } else if (
+ typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== constants.BSON_MAJOR_VERSION
+ ) {
+ throw new BSONVersionError();
+ } else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if (value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ } else if (value._bsontype === 'Code') {
+ index = serializeCode(
+ buffer,
+ key,
+ value,
+ index,
+ checkKeys,
+ depth,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+ } else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ } else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ } else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ } else if (object instanceof Map || isMap(object)) {
+ const iterator = object.entries();
+ let done = false;
+
+ while (!done) {
+ // Unpack the next entry
+ const entry = iterator.next();
+ done = !!entry.done;
+ // Are we done, then skip and terminate
+ if (done) continue;
+
+ // Get the entry values
+ const key = entry.value[0];
+ let value = entry.value[1];
+
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+
+ // Check the type of the value
+ const type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ } else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ } else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if (value === null || (value === undefined && ignoreUndefined === false)) {
+ index = serializeNull(buffer, key, value, index);
+ } else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(
+ buffer,
+ key,
+ value,
+ index,
+ checkKeys,
+ depth,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+ } else if (
+ typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== constants.BSON_MAJOR_VERSION
+ ) {
+ throw new BSONVersionError();
+ } else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if (value._bsontype === 'Code') {
+ index = serializeCode(
+ buffer,
+ key,
+ value,
+ index,
+ checkKeys,
+ depth,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+ } else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ } else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ } else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ } else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ } else {
+ if (typeof object?.toBSON === 'function') {
+ // Provided a custom serialization method
+ object = object.toBSON();
+ if (object != null && typeof object !== 'object') {
+ throw new BSONError('toBSON function did not return an object');
+ }
+ }
+
+ // Iterate over all the keys
+ for (const key of Object.keys(object)) {
+ let value = object[key];
+ // Is there an override value
+ if (typeof value?.toBSON === 'function') {
+ value = value.toBSON();
+ }
+
+ // Check the type of the value
+ const type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw new BSONError('key ' + key + ' must not contain null bytes');
+ }
+
+ if (checkKeys) {
+ if ('$' === key[0]) {
+ throw new BSONError('key ' + key + " must not start with '$'");
+ } else if (key.includes('.')) {
+ throw new BSONError('key ' + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if (type === 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if (type === 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if (type === 'bigint') {
+ index = serializeBigInt(buffer, key, value, index);
+ } else if (type === 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if (value === undefined) {
+ if (ignoreUndefined === false) index = serializeNull(buffer, key, value, index);
+ } else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ } else if (isUint8Array(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if (type === 'object' && value._bsontype == null) {
+ index = serializeObject(
+ buffer,
+ key,
+ value,
+ index,
+ checkKeys,
+ depth,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+ } else if (
+ typeof value === 'object' &&
+ value[Symbol.for('@@mdb.bson.version')] !== constants.BSON_MAJOR_VERSION
+ ) {
+ throw new BSONVersionError();
+ } else if (value._bsontype === 'ObjectId') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if (type === 'object' && value._bsontype === 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if (value._bsontype === 'Long' || value._bsontype === 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if (value._bsontype === 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if (value._bsontype === 'Code') {
+ index = serializeCode(
+ buffer,
+ key,
+ value,
+ index,
+ checkKeys,
+ depth,
+ serializeFunctions,
+ ignoreUndefined,
+ path
+ );
+ } else if (typeof value === 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index);
+ } else if (value._bsontype === 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if (value._bsontype === 'BSONSymbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if (value._bsontype === 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, path);
+ } else if (value._bsontype === 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if (value._bsontype === 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if (value._bsontype === 'MinKey' || value._bsontype === 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ } else if (typeof value._bsontype !== 'undefined') {
+ throw new BSONError(`Unrecognized or invalid _bsontype: ${String(value._bsontype)}`);
+ }
+ }
+ }
+
+ // Remove the path
+ path.delete(object);
+
+ // Final padding byte for object
+ buffer[index++] = 0x00;
+
+ // Final size
+ const size = index - startingIndex;
+ // Write the size of the object
+ startingIndex += NumberUtils.setInt32LE(buffer, startingIndex, size);
+ return index;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/parser/utils.ts b/week-3/04-course-app-hard/node_modules/bson/src/parser/utils.ts
new file mode 100644
index 000000000..0b27249ee
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/parser/utils.ts
@@ -0,0 +1,56 @@
+export function isAnyArrayBuffer(value: unknown): value is ArrayBuffer {
+ return ['[object ArrayBuffer]', '[object SharedArrayBuffer]'].includes(
+ Object.prototype.toString.call(value)
+ );
+}
+
+export function isUint8Array(value: unknown): value is Uint8Array {
+ return Object.prototype.toString.call(value) === '[object Uint8Array]';
+}
+
+export function isBigInt64Array(value: unknown): value is BigInt64Array {
+ return Object.prototype.toString.call(value) === '[object BigInt64Array]';
+}
+
+export function isBigUInt64Array(value: unknown): value is BigUint64Array {
+ return Object.prototype.toString.call(value) === '[object BigUint64Array]';
+}
+
+export function isRegExp(d: unknown): d is RegExp {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+}
+
+export function isMap(d: unknown): d is Map {
+ return Object.prototype.toString.call(d) === '[object Map]';
+}
+
+export function isDate(d: unknown): d is Date {
+ return Object.prototype.toString.call(d) === '[object Date]';
+}
+
+export type InspectFn = (x: unknown, options?: unknown) => string;
+export function defaultInspect(x: unknown, _options?: unknown): string {
+ return JSON.stringify(x, (k: string, v: unknown) => {
+ if (typeof v === 'bigint') {
+ return { $numberLong: `${v}` };
+ } else if (isMap(v)) {
+ return Object.fromEntries(v);
+ }
+ return v;
+ });
+}
+
+/** @internal */
+type StylizeFunction = (x: string, style: string) => string;
+/** @internal */
+export function getStylizeFunction(options?: unknown): StylizeFunction | undefined {
+ const stylizeExists =
+ options != null &&
+ typeof options === 'object' &&
+ 'stylize' in options &&
+ typeof options.stylize === 'function';
+
+ if (stylizeExists) {
+ return options.stylize as StylizeFunction;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/regexp.ts b/week-3/04-course-app-hard/node_modules/bson/src/regexp.ts
new file mode 100644
index 000000000..e401a2909
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/regexp.ts
@@ -0,0 +1,114 @@
+import { BSONValue } from './bson_value';
+import { BSONError } from './error';
+import type { EJSONOptions } from './extended_json';
+import { type InspectFn, defaultInspect, getStylizeFunction } from './parser/utils';
+
+function alphabetize(str: string): string {
+ return str.split('').sort().join('');
+}
+
+/** @public */
+export interface BSONRegExpExtendedLegacy {
+ $regex: string | BSONRegExp;
+ $options: string;
+}
+
+/** @public */
+export interface BSONRegExpExtended {
+ $regularExpression: {
+ pattern: string;
+ options: string;
+ };
+}
+
+/**
+ * A class representation of the BSON RegExp type.
+ * @public
+ * @category BSONType
+ */
+export class BSONRegExp extends BSONValue {
+ get _bsontype(): 'BSONRegExp' {
+ return 'BSONRegExp';
+ }
+
+ pattern!: string;
+ options!: string;
+ /**
+ * @param pattern - The regular expression pattern to match
+ * @param options - The regular expression options
+ */
+ constructor(pattern: string, options?: string) {
+ super();
+ this.pattern = pattern;
+ this.options = alphabetize(options ?? '');
+
+ if (this.pattern.indexOf('\x00') !== -1) {
+ throw new BSONError(
+ `BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`
+ );
+ }
+ if (this.options.indexOf('\x00') !== -1) {
+ throw new BSONError(
+ `BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`
+ );
+ }
+
+ // Validate options
+ for (let i = 0; i < this.options.length; i++) {
+ if (
+ !(
+ this.options[i] === 'i' ||
+ this.options[i] === 'm' ||
+ this.options[i] === 'x' ||
+ this.options[i] === 'l' ||
+ this.options[i] === 's' ||
+ this.options[i] === 'u'
+ )
+ ) {
+ throw new BSONError(`The regular expression option [${this.options[i]}] is not supported`);
+ }
+ }
+ }
+
+ static parseOptions(options?: string): string {
+ return options ? options.split('').sort().join('') : '';
+ }
+
+ /** @internal */
+ toExtendedJSON(options?: EJSONOptions): BSONRegExpExtendedLegacy | BSONRegExpExtended {
+ options = options || {};
+ if (options.legacy) {
+ return { $regex: this.pattern, $options: this.options };
+ }
+ return { $regularExpression: { pattern: this.pattern, options: this.options } };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: BSONRegExpExtendedLegacy | BSONRegExpExtended): BSONRegExp {
+ if ('$regex' in doc) {
+ if (typeof doc.$regex !== 'string') {
+ // This is for $regex query operators that have extended json values.
+ if (doc.$regex._bsontype === 'BSONRegExp') {
+ return doc as unknown as BSONRegExp;
+ }
+ } else {
+ return new BSONRegExp(doc.$regex, BSONRegExp.parseOptions(doc.$options));
+ }
+ }
+ if ('$regularExpression' in doc) {
+ return new BSONRegExp(
+ doc.$regularExpression.pattern,
+ BSONRegExp.parseOptions(doc.$regularExpression.options)
+ );
+ }
+ throw new BSONError(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(doc)}`);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ const stylize = getStylizeFunction(options) ?? (v => v);
+ inspect ??= defaultInspect;
+ const pattern = stylize(inspect(this.pattern), 'regexp');
+ const flags = stylize(inspect(this.options), 'regexp');
+ return `new BSONRegExp(${pattern}, ${flags})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/symbol.ts b/week-3/04-course-app-hard/node_modules/bson/src/symbol.ts
new file mode 100644
index 000000000..6835ab959
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/symbol.ts
@@ -0,0 +1,55 @@
+import { BSONValue } from './bson_value';
+import { type InspectFn, defaultInspect } from './parser/utils';
+
+/** @public */
+export interface BSONSymbolExtended {
+ $symbol: string;
+}
+
+/**
+ * A class representation of the BSON Symbol type.
+ * @public
+ * @category BSONType
+ */
+export class BSONSymbol extends BSONValue {
+ get _bsontype(): 'BSONSymbol' {
+ return 'BSONSymbol';
+ }
+
+ value!: string;
+ /**
+ * @param value - the string representing the symbol.
+ */
+ constructor(value: string) {
+ super();
+ this.value = value;
+ }
+
+ /** Access the wrapped string value. */
+ valueOf(): string {
+ return this.value;
+ }
+
+ toString(): string {
+ return this.value;
+ }
+
+ toJSON(): string {
+ return this.value;
+ }
+
+ /** @internal */
+ toExtendedJSON(): BSONSymbolExtended {
+ return { $symbol: this.value };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: BSONSymbolExtended): BSONSymbol {
+ return new BSONSymbol(doc.$symbol);
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ return `new BSONSymbol(${inspect(this.value, options)})`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/timestamp.ts b/week-3/04-course-app-hard/node_modules/bson/src/timestamp.ts
new file mode 100644
index 000000000..9d1e205ce
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/timestamp.ts
@@ -0,0 +1,151 @@
+import { BSONError } from './error';
+import type { Int32 } from './int_32';
+import { Long } from './long';
+import { type InspectFn, defaultInspect } from './parser/utils';
+
+/** @public */
+export type TimestampOverrides = '_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect';
+/** @public */
+export type LongWithoutOverrides = new (
+ low: unknown,
+ high?: number | boolean,
+ unsigned?: boolean
+) => {
+ [P in Exclude]: Long[P];
+};
+/** @public */
+export const LongWithoutOverridesClass: LongWithoutOverrides =
+ Long as unknown as LongWithoutOverrides;
+
+/** @public */
+export interface TimestampExtended {
+ $timestamp: {
+ t: number;
+ i: number;
+ };
+}
+
+/**
+ * @public
+ * @category BSONType
+ */
+export class Timestamp extends LongWithoutOverridesClass {
+ get _bsontype(): 'Timestamp' {
+ return 'Timestamp';
+ }
+
+ static readonly MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
+
+ /**
+ * @param int - A 64-bit bigint representing the Timestamp.
+ */
+ constructor(int: bigint);
+ /**
+ * @param long - A 64-bit Long representing the Timestamp.
+ */
+ constructor(long: Long);
+ /**
+ * @param value - A pair of two values indicating timestamp and increment.
+ */
+ constructor(value: { t: number; i: number });
+ constructor(low?: bigint | Long | { t: number | Int32; i: number | Int32 }) {
+ if (low == null) {
+ super(0, 0, true);
+ } else if (typeof low === 'bigint') {
+ super(low, true);
+ } else if (Long.isLong(low)) {
+ super(low.low, low.high, true);
+ } else if (typeof low === 'object' && 't' in low && 'i' in low) {
+ if (typeof low.t !== 'number' && (typeof low.t !== 'object' || low.t._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide t as a number');
+ }
+ if (typeof low.i !== 'number' && (typeof low.i !== 'object' || low.i._bsontype !== 'Int32')) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide i as a number');
+ }
+ const t = Number(low.t);
+ const i = Number(low.i);
+ if (t < 0 || Number.isNaN(t)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive t');
+ }
+ if (i < 0 || Number.isNaN(i)) {
+ throw new BSONError('Timestamp constructed from { t, i } must provide a positive i');
+ }
+ if (t > 0xffff_ffff) {
+ throw new BSONError(
+ 'Timestamp constructed from { t, i } must provide t equal or less than uint32 max'
+ );
+ }
+ if (i > 0xffff_ffff) {
+ throw new BSONError(
+ 'Timestamp constructed from { t, i } must provide i equal or less than uint32 max'
+ );
+ }
+
+ super(i, t, true);
+ } else {
+ throw new BSONError(
+ 'A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }'
+ );
+ }
+ }
+
+ toJSON(): { $timestamp: string } {
+ return {
+ $timestamp: this.toString()
+ };
+ }
+
+ /** Returns a Timestamp represented by the given (32-bit) integer value. */
+ static fromInt(value: number): Timestamp {
+ return new Timestamp(Long.fromInt(value, true));
+ }
+
+ /** Returns a Timestamp representing the given number value, provided that it is a finite number. Otherwise, zero is returned. */
+ static fromNumber(value: number): Timestamp {
+ return new Timestamp(Long.fromNumber(value, true));
+ }
+
+ /**
+ * Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @param lowBits - the low 32-bits.
+ * @param highBits - the high 32-bits.
+ */
+ static fromBits(lowBits: number, highBits: number): Timestamp {
+ return new Timestamp({ i: lowBits, t: highBits });
+ }
+
+ /**
+ * Returns a Timestamp from the given string, optionally using the given radix.
+ *
+ * @param str - the textual representation of the Timestamp.
+ * @param optRadix - the radix in which the text is written.
+ */
+ static fromString(str: string, optRadix: number): Timestamp {
+ return new Timestamp(Long.fromString(str, true, optRadix));
+ }
+
+ /** @internal */
+ toExtendedJSON(): TimestampExtended {
+ return { $timestamp: { t: this.high >>> 0, i: this.low >>> 0 } };
+ }
+
+ /** @internal */
+ static fromExtendedJSON(doc: TimestampExtended): Timestamp {
+ // The Long check is necessary because extended JSON has different behavior given the size of the input number
+ const i = Long.isLong(doc.$timestamp.i)
+ ? doc.$timestamp.i.getLowBitsUnsigned() // Need to fetch the least significant 32 bits
+ : doc.$timestamp.i;
+ const t = Long.isLong(doc.$timestamp.t)
+ ? doc.$timestamp.t.getLowBitsUnsigned() // Need to fetch the least significant 32 bits
+ : doc.$timestamp.t;
+ return new Timestamp({ t, i });
+ }
+
+ inspect(depth?: number, options?: unknown, inspect?: InspectFn): string {
+ inspect ??= defaultInspect;
+ const t = inspect(this.high >>> 0, options);
+ const i = inspect(this.low >>> 0, options);
+ return `new Timestamp({ t: ${t}, i: ${i} })`;
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/utils/byte_utils.ts b/week-3/04-course-app-hard/node_modules/bson/src/utils/byte_utils.ts
new file mode 100644
index 000000000..f3da53fda
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/utils/byte_utils.ts
@@ -0,0 +1,61 @@
+import { nodeJsByteUtils } from './node_byte_utils';
+import { webByteUtils } from './web_byte_utils';
+
+/**
+ * @public
+ * @experimental
+ *
+ * A collection of functions that help work with data in a Uint8Array.
+ * ByteUtils is configured at load time to use Node.js or Web based APIs for the internal implementations.
+ */
+export type ByteUtils = {
+ /** Transforms the input to an instance of Buffer if running on node, otherwise Uint8Array */
+ toLocalBufferType: (buffer: Uint8Array | ArrayBufferView | ArrayBuffer) => Uint8Array;
+ /** Create empty space of size */
+ allocate: (size: number) => Uint8Array;
+ /** Create empty space of size, use pooled memory when available */
+ allocateUnsafe: (size: number) => Uint8Array;
+ /** Check if two Uint8Arrays are deep equal */
+ equals: (a: Uint8Array, b: Uint8Array) => boolean;
+ /** Check if two Uint8Arrays are deep equal */
+ fromNumberArray: (array: number[]) => Uint8Array;
+ /** Create a Uint8Array from a base64 string */
+ fromBase64: (base64: string) => Uint8Array;
+ /** Create a base64 string from bytes */
+ toBase64: (buffer: Uint8Array) => string;
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ fromISO88591: (codePoints: string) => Uint8Array;
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ toISO88591: (buffer: Uint8Array) => string;
+ /** Create a Uint8Array from a hex string */
+ fromHex: (hex: string) => Uint8Array;
+ /** Create a lowercase hex string from bytes */
+ toHex: (buffer: Uint8Array) => string;
+ /** Create a string from utf8 code units, fatal=true will throw an error if UTF-8 bytes are invalid, fatal=false will insert replacement characters */
+ toUTF8: (buffer: Uint8Array, start: number, end: number, fatal: boolean) => string;
+ /** Get the utf8 code unit count from a string if it were to be transformed to utf8 */
+ utf8ByteLength: (input: string) => number;
+ /** Encode UTF8 bytes generated from `source` string into `destination` at byteOffset. Returns the number of bytes encoded. */
+ encodeUTF8Into: (destination: Uint8Array, source: string, byteOffset: number) => number;
+ /** Generate a Uint8Array filled with random bytes with byteLength */
+ randomBytes: (byteLength: number) => Uint8Array;
+};
+
+declare const Buffer: { new (): unknown; prototype?: { _isBuffer?: boolean } } | undefined;
+
+/**
+ * Check that a global Buffer exists that is a function and
+ * does not have a '_isBuffer' property defined on the prototype
+ * (this is to prevent using the npm buffer)
+ */
+const hasGlobalBuffer = typeof Buffer === 'function' && Buffer.prototype?._isBuffer !== true;
+
+/**
+ * This is the only ByteUtils that should be used across the rest of the BSON library.
+ *
+ * The type annotation is important here, it asserts that each of the platform specific
+ * utils implementations are compatible with the common one.
+ *
+ * @internal
+ */
+export const ByteUtils: ByteUtils = hasGlobalBuffer ? nodeJsByteUtils : webByteUtils;
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/utils/latin.ts b/week-3/04-course-app-hard/node_modules/bson/src/utils/latin.ts
new file mode 100644
index 000000000..5dd5c91f6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/utils/latin.ts
@@ -0,0 +1,104 @@
+/**
+ * This function is an optimization for small basic latin strings.
+ * @internal
+ * @remarks
+ * ### Important characteristics:
+ * - If the uint8array or distance between start and end is 0 this function returns an empty string
+ * - If the byteLength of the string is 1, 2, or 3 we invoke String.fromCharCode and manually offset into the buffer
+ * - If the byteLength of the string is less than or equal to 20 an array of bytes is built and `String.fromCharCode.apply` is called with the result
+ * - If any byte exceeds 128 this function returns null
+ *
+ * @param uint8array - A sequence of bytes that may contain basic latin characters
+ * @param start - The start index from which to search the uint8array
+ * @param end - The index to stop searching the uint8array
+ * @returns string if all bytes are within the basic latin range, otherwise null
+ */
+export function tryReadBasicLatin(
+ uint8array: Uint8Array,
+ start: number,
+ end: number
+): string | null {
+ if (uint8array.length === 0) {
+ return '';
+ }
+
+ const stringByteLength = end - start;
+ if (stringByteLength === 0) {
+ return '';
+ }
+
+ if (stringByteLength > 20) {
+ return null;
+ }
+
+ if (stringByteLength === 1 && uint8array[start] < 128) {
+ return String.fromCharCode(uint8array[start]);
+ }
+
+ if (stringByteLength === 2 && uint8array[start] < 128 && uint8array[start + 1] < 128) {
+ return String.fromCharCode(uint8array[start]) + String.fromCharCode(uint8array[start + 1]);
+ }
+
+ if (
+ stringByteLength === 3 &&
+ uint8array[start] < 128 &&
+ uint8array[start + 1] < 128 &&
+ uint8array[start + 2] < 128
+ ) {
+ return (
+ String.fromCharCode(uint8array[start]) +
+ String.fromCharCode(uint8array[start + 1]) +
+ String.fromCharCode(uint8array[start + 2])
+ );
+ }
+
+ const latinBytes = [];
+ for (let i = start; i < end; i++) {
+ const byte = uint8array[i];
+ if (byte > 127) {
+ return null;
+ }
+ latinBytes.push(byte);
+ }
+
+ return String.fromCharCode(...latinBytes);
+}
+
+/**
+ * This function is an optimization for writing small basic latin strings.
+ * @internal
+ * @remarks
+ * ### Important characteristics:
+ * - If the string length is 0 return 0, do not perform any work
+ * - If a string is longer than 25 code units return null
+ * - If any code unit exceeds 128 this function returns null
+ *
+ * @param destination - The uint8array to serialize the string to
+ * @param source - The string to turn into UTF-8 bytes if it fits in the basic latin range
+ * @param offset - The position in the destination to begin writing bytes to
+ * @returns the number of bytes written to destination if all code units are below 128, otherwise null
+ */
+export function tryWriteBasicLatin(
+ destination: Uint8Array,
+ source: string,
+ offset: number
+): number | null {
+ if (source.length === 0) return 0;
+
+ if (source.length > 25) return null;
+
+ if (destination.length - offset < source.length) return null;
+
+ for (
+ let charOffset = 0, destinationOffset = offset;
+ charOffset < source.length;
+ charOffset++, destinationOffset++
+ ) {
+ const char = source.charCodeAt(charOffset);
+ if (char > 127) return null;
+
+ destination[destinationOffset] = char;
+ }
+
+ return source.length;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/utils/node_byte_utils.ts b/week-3/04-course-app-hard/node_modules/bson/src/utils/node_byte_utils.ts
new file mode 100644
index 000000000..ca1482ca0
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/utils/node_byte_utils.ts
@@ -0,0 +1,163 @@
+import { BSONError } from '../error';
+import { parseUtf8 } from '../parse_utf8';
+import { tryReadBasicLatin, tryWriteBasicLatin } from './latin';
+
+type NodeJsEncoding = 'base64' | 'hex' | 'utf8' | 'binary';
+type NodeJsBuffer = ArrayBufferView &
+ Uint8Array & {
+ write(string: string, offset: number, length: undefined, encoding: 'utf8'): number;
+ copy(target: Uint8Array, targetStart: number, sourceStart: number, sourceEnd: number): number;
+ toString: (this: Uint8Array, encoding: NodeJsEncoding, start?: number, end?: number) => string;
+ equals: (this: Uint8Array, other: Uint8Array) => boolean;
+ };
+type NodeJsBufferConstructor = Omit & {
+ alloc: (size: number) => NodeJsBuffer;
+ allocUnsafe: (size: number) => NodeJsBuffer;
+ from(array: number[]): NodeJsBuffer;
+ from(array: Uint8Array): NodeJsBuffer;
+ from(array: ArrayBuffer): NodeJsBuffer;
+ from(array: ArrayBuffer, byteOffset: number, byteLength: number): NodeJsBuffer;
+ from(base64: string, encoding: NodeJsEncoding): NodeJsBuffer;
+ byteLength(input: string, encoding: 'utf8'): number;
+ isBuffer(value: unknown): value is NodeJsBuffer;
+};
+
+// This can be nullish, but we gate the nodejs functions on being exported whether or not this exists
+// Node.js global
+declare const Buffer: NodeJsBufferConstructor;
+declare const require: (mod: 'crypto') => { randomBytes: (byteLength: number) => Uint8Array };
+
+/** @internal */
+export function nodejsMathRandomBytes(byteLength: number) {
+ return nodeJsByteUtils.fromNumberArray(
+ Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256))
+ );
+}
+
+/**
+ * @internal
+ * WARNING: REQUIRE WILL BE REWRITTEN
+ *
+ * This code is carefully used by require_rewriter.mjs any modifications must be reflected in the plugin.
+ *
+ * @remarks
+ * "crypto" is the only dependency BSON needs. This presents a problem for creating a bundle of the BSON library
+ * in an es module format that can be used both on the browser and in Node.js. In Node.js when BSON is imported as
+ * an es module, there will be no global require function defined, making the code below fallback to the much less desireable math.random bytes.
+ * In order to make our es module bundle work as expected on Node.js we need to change this `require()` to a dynamic import, and the dynamic
+ * import must be top-level awaited since es modules are async. So we rely on a custom rollup plugin to seek out the following lines of code
+ * and replace `require` with `await import` and the IIFE line (`nodejsRandomBytes = (() => { ... })()`) with `nodejsRandomBytes = await (async () => { ... })()`
+ * when generating an es module bundle.
+ */
+const nodejsRandomBytes: (byteLength: number) => Uint8Array = (() => {
+ try {
+ return require('crypto').randomBytes;
+ } catch {
+ return nodejsMathRandomBytes;
+ }
+})();
+
+/** @internal */
+export const nodeJsByteUtils = {
+ toLocalBufferType(potentialBuffer: Uint8Array | NodeJsBuffer | ArrayBuffer): NodeJsBuffer {
+ if (Buffer.isBuffer(potentialBuffer)) {
+ return potentialBuffer;
+ }
+
+ if (ArrayBuffer.isView(potentialBuffer)) {
+ return Buffer.from(
+ potentialBuffer.buffer,
+ potentialBuffer.byteOffset,
+ potentialBuffer.byteLength
+ );
+ }
+
+ const stringTag =
+ potentialBuffer?.[Symbol.toStringTag] ?? Object.prototype.toString.call(potentialBuffer);
+ if (
+ stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]'
+ ) {
+ return Buffer.from(potentialBuffer);
+ }
+
+ throw new BSONError(`Cannot create Buffer from ${String(potentialBuffer)}`);
+ },
+
+ allocate(size: number): NodeJsBuffer {
+ return Buffer.alloc(size);
+ },
+
+ allocateUnsafe(size: number): NodeJsBuffer {
+ return Buffer.allocUnsafe(size);
+ },
+
+ equals(a: Uint8Array, b: Uint8Array): boolean {
+ return nodeJsByteUtils.toLocalBufferType(a).equals(b);
+ },
+
+ fromNumberArray(array: number[]): NodeJsBuffer {
+ return Buffer.from(array);
+ },
+
+ fromBase64(base64: string): NodeJsBuffer {
+ return Buffer.from(base64, 'base64');
+ },
+
+ toBase64(buffer: Uint8Array): string {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('base64');
+ },
+
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ fromISO88591(codePoints: string): NodeJsBuffer {
+ return Buffer.from(codePoints, 'binary');
+ },
+
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ toISO88591(buffer: Uint8Array): string {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('binary');
+ },
+
+ fromHex(hex: string): NodeJsBuffer {
+ return Buffer.from(hex, 'hex');
+ },
+
+ toHex(buffer: Uint8Array): string {
+ return nodeJsByteUtils.toLocalBufferType(buffer).toString('hex');
+ },
+
+ toUTF8(buffer: Uint8Array, start: number, end: number, fatal: boolean): string {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(buffer, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+
+ const string = nodeJsByteUtils.toLocalBufferType(buffer).toString('utf8', start, end);
+ if (fatal) {
+ for (let i = 0; i < string.length; i++) {
+ if (string.charCodeAt(i) === 0xfffd) {
+ parseUtf8(buffer, start, end, true);
+ break;
+ }
+ }
+ }
+ return string;
+ },
+
+ utf8ByteLength(input: string): number {
+ return Buffer.byteLength(input, 'utf8');
+ },
+
+ encodeUTF8Into(buffer: Uint8Array, source: string, byteOffset: number): number {
+ const latinBytesWritten = tryWriteBasicLatin(buffer, source, byteOffset);
+ if (latinBytesWritten != null) {
+ return latinBytesWritten;
+ }
+
+ return nodeJsByteUtils.toLocalBufferType(buffer).write(source, byteOffset, undefined, 'utf8');
+ },
+
+ randomBytes: nodejsRandomBytes
+};
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/utils/number_utils.ts b/week-3/04-course-app-hard/node_modules/bson/src/utils/number_utils.ts
new file mode 100644
index 000000000..32f6f5cc0
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/utils/number_utils.ts
@@ -0,0 +1,200 @@
+const FLOAT = new Float64Array(1);
+const FLOAT_BYTES = new Uint8Array(FLOAT.buffer, 0, 8);
+
+FLOAT[0] = -1;
+// Little endian [0, 0, 0, 0, 0, 0, 240, 191]
+// Big endian [191, 240, 0, 0, 0, 0, 0, 0]
+const isBigEndian = FLOAT_BYTES[7] === 0;
+
+/**
+ * @experimental
+ * @public
+ *
+ * A collection of functions that get or set various numeric types and bit widths from a Uint8Array.
+ */
+export type NumberUtils = {
+ /**
+ * Parses a signed int32 at offset. Throws a `RangeError` if value is negative.
+ */
+ getNonnegativeInt32LE: (source: Uint8Array, offset: number) => number;
+ getInt32LE: (source: Uint8Array, offset: number) => number;
+ getUint32LE: (source: Uint8Array, offset: number) => number;
+ getUint32BE: (source: Uint8Array, offset: number) => number;
+ getBigInt64LE: (source: Uint8Array, offset: number) => bigint;
+ getFloat64LE: (source: Uint8Array, offset: number) => number;
+ setInt32BE: (destination: Uint8Array, offset: number, value: number) => 4;
+ setInt32LE: (destination: Uint8Array, offset: number, value: number) => 4;
+ setBigInt64LE: (destination: Uint8Array, offset: number, value: bigint) => 8;
+ setFloat64LE: (destination: Uint8Array, offset: number, value: number) => 8;
+};
+
+/**
+ * Number parsing and serializing utilities.
+ *
+ * @experimental
+ * @public
+ */
+export const NumberUtils: NumberUtils = {
+ getNonnegativeInt32LE(source: Uint8Array, offset: number): number {
+ if (source[offset + 3] > 127) {
+ throw new RangeError(`Size cannot be negative at offset: ${offset}`);
+ }
+ return (
+ source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24)
+ );
+ },
+
+ /** Reads a little-endian 32-bit integer from source */
+ getInt32LE(source: Uint8Array, offset: number): number {
+ return (
+ source[offset] |
+ (source[offset + 1] << 8) |
+ (source[offset + 2] << 16) |
+ (source[offset + 3] << 24)
+ );
+ },
+
+ /** Reads a little-endian 32-bit unsigned integer from source */
+ getUint32LE(source: Uint8Array, offset: number): number {
+ return (
+ source[offset] +
+ source[offset + 1] * 256 +
+ source[offset + 2] * 65536 +
+ source[offset + 3] * 16777216
+ );
+ },
+
+ /** Reads a big-endian 32-bit integer from source */
+ getUint32BE(source: Uint8Array, offset: number): number {
+ return (
+ source[offset + 3] +
+ source[offset + 2] * 256 +
+ source[offset + 1] * 65536 +
+ source[offset] * 16777216
+ );
+ },
+
+ /** Reads a little-endian 64-bit integer from source */
+ getBigInt64LE(source: Uint8Array, offset: number): bigint {
+ const lo = NumberUtils.getUint32LE(source, offset);
+ const hi = NumberUtils.getUint32LE(source, offset + 4);
+
+ /*
+ eslint-disable-next-line no-restricted-globals
+ -- This is allowed since this helper should not be called unless bigint features are enabled
+ */
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo);
+ },
+
+ /** Reads a little-endian 64-bit float from source */
+ getFloat64LE: isBigEndian
+ ? (source: Uint8Array, offset: number) => {
+ FLOAT_BYTES[7] = source[offset];
+ FLOAT_BYTES[6] = source[offset + 1];
+ FLOAT_BYTES[5] = source[offset + 2];
+ FLOAT_BYTES[4] = source[offset + 3];
+ FLOAT_BYTES[3] = source[offset + 4];
+ FLOAT_BYTES[2] = source[offset + 5];
+ FLOAT_BYTES[1] = source[offset + 6];
+ FLOAT_BYTES[0] = source[offset + 7];
+ return FLOAT[0];
+ }
+ : (source: Uint8Array, offset: number) => {
+ FLOAT_BYTES[0] = source[offset];
+ FLOAT_BYTES[1] = source[offset + 1];
+ FLOAT_BYTES[2] = source[offset + 2];
+ FLOAT_BYTES[3] = source[offset + 3];
+ FLOAT_BYTES[4] = source[offset + 4];
+ FLOAT_BYTES[5] = source[offset + 5];
+ FLOAT_BYTES[6] = source[offset + 6];
+ FLOAT_BYTES[7] = source[offset + 7];
+ return FLOAT[0];
+ },
+
+ /** Writes a big-endian 32-bit integer to destination, can be signed or unsigned */
+ setInt32BE(destination: Uint8Array, offset: number, value: number): 4 {
+ destination[offset + 3] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset] = value;
+ return 4;
+ },
+
+ /** Writes a little-endian 32-bit integer to destination, can be signed or unsigned */
+ setInt32LE(destination: Uint8Array, offset: number, value: number): 4 {
+ destination[offset] = value;
+ value >>>= 8;
+ destination[offset + 1] = value;
+ value >>>= 8;
+ destination[offset + 2] = value;
+ value >>>= 8;
+ destination[offset + 3] = value;
+ return 4;
+ },
+
+ /** Write a little-endian 64-bit integer to source */
+ setBigInt64LE(destination: Uint8Array, offset: number, value: bigint): 8 {
+ /* eslint-disable-next-line no-restricted-globals -- This is allowed here as useBigInt64=true */
+ const mask32bits = BigInt(0xffff_ffff);
+
+ /** lower 32 bits */
+ let lo = Number(value & mask32bits);
+ destination[offset] = lo;
+ lo >>= 8;
+ destination[offset + 1] = lo;
+ lo >>= 8;
+ destination[offset + 2] = lo;
+ lo >>= 8;
+ destination[offset + 3] = lo;
+
+ /*
+ eslint-disable-next-line no-restricted-globals
+ -- This is allowed here as useBigInt64=true
+
+ upper 32 bits
+ */
+ let hi = Number((value >> BigInt(32)) & mask32bits);
+ destination[offset + 4] = hi;
+ hi >>= 8;
+ destination[offset + 5] = hi;
+ hi >>= 8;
+ destination[offset + 6] = hi;
+ hi >>= 8;
+ destination[offset + 7] = hi;
+
+ return 8;
+ },
+
+ /** Writes a little-endian 64-bit float to destination */
+ setFloat64LE: isBigEndian
+ ? (destination: Uint8Array, offset: number, value: number) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[7];
+ destination[offset + 1] = FLOAT_BYTES[6];
+ destination[offset + 2] = FLOAT_BYTES[5];
+ destination[offset + 3] = FLOAT_BYTES[4];
+ destination[offset + 4] = FLOAT_BYTES[3];
+ destination[offset + 5] = FLOAT_BYTES[2];
+ destination[offset + 6] = FLOAT_BYTES[1];
+ destination[offset + 7] = FLOAT_BYTES[0];
+ return 8;
+ }
+ : (destination: Uint8Array, offset: number, value: number) => {
+ FLOAT[0] = value;
+ destination[offset] = FLOAT_BYTES[0];
+ destination[offset + 1] = FLOAT_BYTES[1];
+ destination[offset + 2] = FLOAT_BYTES[2];
+ destination[offset + 3] = FLOAT_BYTES[3];
+ destination[offset + 4] = FLOAT_BYTES[4];
+ destination[offset + 5] = FLOAT_BYTES[5];
+ destination[offset + 6] = FLOAT_BYTES[6];
+ destination[offset + 7] = FLOAT_BYTES[7];
+ return 8;
+ }
+};
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/utils/string_utils.ts b/week-3/04-course-app-hard/node_modules/bson/src/utils/string_utils.ts
new file mode 100644
index 000000000..1ffb118e9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/utils/string_utils.ts
@@ -0,0 +1,44 @@
+/**
+ * @internal
+ * Removes leading zeros and explicit plus from textual representation of a number.
+ */
+export function removeLeadingZerosAndExplicitPlus(str: string): string {
+ if (str === '') {
+ return str;
+ }
+
+ let startIndex = 0;
+
+ const isNegative = str[startIndex] === '-';
+ const isExplicitlyPositive = str[startIndex] === '+';
+
+ if (isExplicitlyPositive || isNegative) {
+ startIndex += 1;
+ }
+
+ let foundInsignificantZero = false;
+
+ for (; startIndex < str.length && str[startIndex] === '0'; ++startIndex) {
+ foundInsignificantZero = true;
+ }
+
+ if (!foundInsignificantZero) {
+ return isExplicitlyPositive ? str.slice(1) : str;
+ }
+
+ return `${isNegative ? '-' : ''}${str.length === startIndex ? '0' : str.slice(startIndex)}`;
+}
+
+/**
+ * @internal
+ * Returns false for an string that contains invalid characters for its radix, else returns the original string.
+ * @param str - The textual representation of the Long
+ * @param radix - The radix in which the text is written (2-36), defaults to 10
+ */
+export function validateStringCharacters(str: string, radix?: number): false | string {
+ radix = radix ?? 10;
+ const validCharacters = '0123456789abcdefghijklmnopqrstuvwxyz'.slice(0, radix);
+ // regex is case insensitive and checks that each character within the string is one of the validCharacters
+ const regex = new RegExp(`[^-+${validCharacters}]`, 'i');
+ return regex.test(str) ? false : str;
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/src/utils/web_byte_utils.ts b/week-3/04-course-app-hard/node_modules/bson/src/utils/web_byte_utils.ts
new file mode 100644
index 000000000..0f79f0df3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/src/utils/web_byte_utils.ts
@@ -0,0 +1,197 @@
+import { BSONError } from '../error';
+import { tryReadBasicLatin } from './latin';
+import { parseUtf8 } from '../parse_utf8';
+
+type TextDecoder = {
+ readonly encoding: string;
+ readonly fatal: boolean;
+ readonly ignoreBOM: boolean;
+ decode(input?: Uint8Array): string;
+};
+type TextDecoderConstructor = {
+ new (label: 'utf8', options: { fatal: boolean; ignoreBOM?: boolean }): TextDecoder;
+};
+
+type TextEncoder = {
+ readonly encoding: string;
+ encode(input?: string): Uint8Array;
+};
+type TextEncoderConstructor = {
+ new (): TextEncoder;
+};
+
+// Web global
+declare const TextDecoder: TextDecoderConstructor;
+declare const TextEncoder: TextEncoderConstructor;
+declare const atob: (base64: string) => string;
+declare const btoa: (binary: string) => string;
+
+type ArrayBufferViewWithTag = ArrayBufferView & {
+ [Symbol.toStringTag]?: string;
+};
+
+function isReactNative() {
+ const { navigator } = globalThis as { navigator?: { product?: string } };
+ return typeof navigator === 'object' && navigator.product === 'ReactNative';
+}
+
+/** @internal */
+export function webMathRandomBytes(byteLength: number) {
+ if (byteLength < 0) {
+ throw new RangeError(`The argument 'byteLength' is invalid. Received ${byteLength}`);
+ }
+ return webByteUtils.fromNumberArray(
+ Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256))
+ );
+}
+
+/** @internal */
+const webRandomBytes: (byteLength: number) => Uint8Array = (() => {
+ const { crypto } = globalThis as {
+ crypto?: { getRandomValues?: (space: Uint8Array) => Uint8Array };
+ };
+ if (crypto != null && typeof crypto.getRandomValues === 'function') {
+ return (byteLength: number) => {
+ // @ts-expect-error: crypto.getRandomValues cannot actually be null here
+ // You cannot separate getRandomValues from crypto (need to have this === crypto)
+ return crypto.getRandomValues(webByteUtils.allocate(byteLength));
+ };
+ } else {
+ if (isReactNative()) {
+ const { console } = globalThis as { console?: { warn?: (message: string) => void } };
+ console?.warn?.(
+ 'BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.'
+ );
+ }
+ return webMathRandomBytes;
+ }
+})();
+
+const HEX_DIGIT = /(\d|[a-f])/i;
+
+/** @internal */
+export const webByteUtils = {
+ toLocalBufferType(
+ potentialUint8array: Uint8Array | ArrayBufferViewWithTag | ArrayBuffer
+ ): Uint8Array {
+ const stringTag =
+ potentialUint8array?.[Symbol.toStringTag] ??
+ Object.prototype.toString.call(potentialUint8array);
+
+ if (stringTag === 'Uint8Array') {
+ return potentialUint8array as Uint8Array;
+ }
+
+ if (ArrayBuffer.isView(potentialUint8array)) {
+ return new Uint8Array(
+ potentialUint8array.buffer.slice(
+ potentialUint8array.byteOffset,
+ potentialUint8array.byteOffset + potentialUint8array.byteLength
+ )
+ );
+ }
+
+ if (
+ stringTag === 'ArrayBuffer' ||
+ stringTag === 'SharedArrayBuffer' ||
+ stringTag === '[object ArrayBuffer]' ||
+ stringTag === '[object SharedArrayBuffer]'
+ ) {
+ return new Uint8Array(potentialUint8array);
+ }
+
+ throw new BSONError(`Cannot make a Uint8Array from ${String(potentialUint8array)}`);
+ },
+
+ allocate(size: number): Uint8Array {
+ if (typeof size !== 'number') {
+ throw new TypeError(`The "size" argument must be of type number. Received ${String(size)}`);
+ }
+ return new Uint8Array(size);
+ },
+
+ allocateUnsafe(size: number): Uint8Array {
+ return webByteUtils.allocate(size);
+ },
+
+ equals(a: Uint8Array, b: Uint8Array): boolean {
+ if (a.byteLength !== b.byteLength) {
+ return false;
+ }
+ for (let i = 0; i < a.byteLength; i++) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ fromNumberArray(array: number[]): Uint8Array {
+ return Uint8Array.from(array);
+ },
+
+ fromBase64(base64: string): Uint8Array {
+ return Uint8Array.from(atob(base64), c => c.charCodeAt(0));
+ },
+
+ toBase64(uint8array: Uint8Array): string {
+ return btoa(webByteUtils.toISO88591(uint8array));
+ },
+
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ fromISO88591(codePoints: string): Uint8Array {
+ return Uint8Array.from(codePoints, c => c.charCodeAt(0) & 0xff);
+ },
+
+ /** **Legacy** binary strings are an outdated method of data transfer. Do not add public API support for interpreting this format */
+ toISO88591(uint8array: Uint8Array): string {
+ return Array.from(Uint16Array.from(uint8array), b => String.fromCharCode(b)).join('');
+ },
+
+ fromHex(hex: string): Uint8Array {
+ const evenLengthHex = hex.length % 2 === 0 ? hex : hex.slice(0, hex.length - 1);
+ const buffer = [];
+
+ for (let i = 0; i < evenLengthHex.length; i += 2) {
+ const firstDigit = evenLengthHex[i];
+ const secondDigit = evenLengthHex[i + 1];
+
+ if (!HEX_DIGIT.test(firstDigit)) {
+ break;
+ }
+ if (!HEX_DIGIT.test(secondDigit)) {
+ break;
+ }
+
+ const hexDigit = Number.parseInt(`${firstDigit}${secondDigit}`, 16);
+ buffer.push(hexDigit);
+ }
+
+ return Uint8Array.from(buffer);
+ },
+
+ toHex(uint8array: Uint8Array): string {
+ return Array.from(uint8array, byte => byte.toString(16).padStart(2, '0')).join('');
+ },
+
+ toUTF8(uint8array: Uint8Array, start: number, end: number, fatal: boolean): string {
+ const basicLatin = end - start <= 20 ? tryReadBasicLatin(uint8array, start, end) : null;
+ if (basicLatin != null) {
+ return basicLatin;
+ }
+
+ return parseUtf8(uint8array, start, end, fatal);
+ },
+
+ utf8ByteLength(input: string): number {
+ return new TextEncoder().encode(input).byteLength;
+ },
+
+ encodeUTF8Into(uint8array: Uint8Array, source: string, byteOffset: number): number {
+ const bytes = new TextEncoder().encode(source);
+ uint8array.set(bytes, byteOffset);
+ return bytes.byteLength;
+ },
+
+ randomBytes: webRandomBytes
+};
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/base64/LICENSE-MIT.txt b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/LICENSE-MIT.txt
new file mode 100644
index 000000000..a41e0a7ef
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/LICENSE-MIT.txt
@@ -0,0 +1,20 @@
+Copyright Mathias Bynens
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/base64/README.md b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/README.md
new file mode 100644
index 000000000..ab0ef251e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/README.md
@@ -0,0 +1,112 @@
+# base64 [![Build status](https://travis-ci.org/mathiasbynens/base64.svg?branch=master)](https://travis-ci.org/mathiasbynens/base64) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/base64/master.svg)](https://coveralls.io/r/mathiasbynens/base64)
+
+_base64_ is a robust base64 encoder/decoder that is fully compatible with [`atob()` and `btoa()`](https://html.spec.whatwg.org/multipage/webappapis.html#atob), written in JavaScript. The base64-encoding and -decoding algorithms it uses are fully [RFC 4648](https://tools.ietf.org/html/rfc4648#section-4) compliant.
+
+## Installation
+
+Via [npm](https://www.npmjs.com/):
+
+```bash
+npm install base-64
+```
+
+In a browser:
+
+```html
+
+```
+
+In [Narwhal](http://narwhaljs.org/), [Node.js](https://nodejs.org/), and [RingoJS](http://ringojs.org/):
+
+```js
+var base64 = require('base-64');
+```
+
+In [Rhino](http://www.mozilla.org/rhino/):
+
+```js
+load('base64.js');
+```
+
+Using an AMD loader like [RequireJS](http://requirejs.org/):
+
+```js
+require(
+ {
+ 'paths': {
+ 'base64': 'path/to/base64'
+ }
+ },
+ ['base64'],
+ function(base64) {
+ console.log(base64);
+ }
+);
+```
+
+## API
+
+### `base64.version`
+
+A string representing the semantic version number.
+
+### `base64.encode(input)`
+
+This function takes a byte string (the `input` parameter) and encodes it according to base64. The input data must be in the form of a string containing only characters in the range from U+0000 to U+00FF, each representing a binary byte with values `0x00` to `0xFF`. The `base64.encode()` function is designed to be fully compatible with [`btoa()` as described in the HTML Standard](https://html.spec.whatwg.org/multipage/webappapis.html#dom-windowbase64-btoa).
+
+```js
+var encodedData = base64.encode(input);
+```
+
+To base64-encode any Unicode string, [encode it as UTF-8 first](https://github.com/mathiasbynens/utf8.js#utf8encodestring):
+
+```js
+var base64 = require('base-64');
+var utf8 = require('utf8');
+
+var text = 'foo © bar 𝌆 baz';
+var bytes = utf8.encode(text);
+var encoded = base64.encode(bytes);
+console.log(encoded);
+// → 'Zm9vIMKpIGJhciDwnYyGIGJheg=='
+```
+
+### `base64.decode(input)`
+
+This function takes a base64-encoded string (the `input` parameter) and decodes it. The return value is in the form of a string containing only characters in the range from U+0000 to U+00FF, each representing a binary byte with values `0x00` to `0xFF`. The `base64.decode()` function is designed to be fully compatible with [`atob()` as described in the HTML Standard](https://html.spec.whatwg.org/multipage/webappapis.html#dom-windowbase64-atob).
+
+```js
+var decodedData = base64.decode(encodedData);
+```
+
+To base64-decode UTF-8-encoded data back into a Unicode string, [UTF-8-decode it](https://github.com/mathiasbynens/utf8.js#utf8decodebytestring) after base64-decoding it:
+
+```js
+var encoded = 'Zm9vIMKpIGJhciDwnYyGIGJheg==';
+var bytes = base64.decode(encoded);
+var text = utf8.decode(bytes);
+console.log(text);
+// → 'foo © bar 𝌆 baz'
+```
+
+## Support
+
+_base64_ is designed to work in at least Node.js v0.10.0, Narwhal 0.3.2, RingoJS 0.8-0.9, PhantomJS 1.9.0, Rhino 1.7RC4, as well as old and modern versions of Chrome, Firefox, Safari, Opera, and Internet Explorer.
+
+## Unit tests & code coverage
+
+After cloning this repository, run `npm install` to install the dependencies needed for development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.
+
+Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`.
+
+To generate the code coverage report, use `grunt cover`.
+
+## Author
+
+| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|
+| [Mathias Bynens](https://mathiasbynens.be/) |
+
+## License
+
+_base64_ is available under the [MIT](https://mths.be/mit) license.
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/base64/base64.js b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/base64.js
new file mode 100644
index 000000000..611b4461f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/base64.js
@@ -0,0 +1,157 @@
+/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */
+;(function(root) {
+
+ // Detect free variables `exports`.
+ var freeExports = typeof exports == 'object' && exports;
+
+ // Detect free variable `module`.
+ var freeModule = typeof module == 'object' && module &&
+ module.exports == freeExports && module;
+
+ /*--------------------------------------------------------------------------*/
+
+ var InvalidCharacterError = function(message) {
+ this.message = message;
+ };
+ InvalidCharacterError.prototype = new Error;
+ InvalidCharacterError.prototype.name = 'InvalidCharacterError';
+
+ var error = function(message) {
+ // Note: the error messages used throughout this file match those used by
+ // the native `atob`/`btoa` implementation in Chromium.
+ throw new InvalidCharacterError(message);
+ };
+
+ var TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+ // http://whatwg.org/html/common-microsyntaxes.html#space-character
+ var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g;
+
+ // `decode` is designed to be fully compatible with `atob` as described in the
+ // HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob
+ // The optimized base64-decoding algorithm used is based on @atk’s excellent
+ // implementation. https://gist.github.com/atk/1020396
+ var decode = function(input) {
+ input = String(input)
+ .replace(REGEX_SPACE_CHARACTERS, '');
+ var length = input.length;
+ if (length % 4 == 0) {
+ input = input.replace(/==?$/, '');
+ length = input.length;
+ }
+ if (
+ length % 4 == 1 ||
+ // http://whatwg.org/C#alphanumeric-ascii-characters
+ /[^+a-zA-Z0-9/]/.test(input)
+ ) {
+ error(
+ 'Invalid character: the string to be decoded is not correctly encoded.'
+ );
+ }
+ var bitCounter = 0;
+ var bitStorage;
+ var buffer;
+ var output = '';
+ var position = -1;
+ while (++position < length) {
+ buffer = TABLE.indexOf(input.charAt(position));
+ bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer;
+ // Unless this is the first of a group of 4 characters…
+ if (bitCounter++ % 4) {
+ // …convert the first 8 bits to a single ASCII character.
+ output += String.fromCharCode(
+ 0xFF & bitStorage >> (-2 * bitCounter & 6)
+ );
+ }
+ }
+ return output;
+ };
+
+ // `encode` is designed to be fully compatible with `btoa` as described in the
+ // HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa
+ var encode = function(input) {
+ input = String(input);
+ if (/[^\0-\xFF]/.test(input)) {
+ // Note: no need to special-case astral symbols here, as surrogates are
+ // matched, and the input is supposed to only contain ASCII anyway.
+ error(
+ 'The string to be encoded contains characters outside of the ' +
+ 'Latin1 range.'
+ );
+ }
+ var padding = input.length % 3;
+ var output = '';
+ var position = -1;
+ var a;
+ var b;
+ var c;
+ var buffer;
+ // Make sure any padding is handled outside of the loop.
+ var length = input.length - padding;
+
+ while (++position < length) {
+ // Read three bytes, i.e. 24 bits.
+ a = input.charCodeAt(position) << 16;
+ b = input.charCodeAt(++position) << 8;
+ c = input.charCodeAt(++position);
+ buffer = a + b + c;
+ // Turn the 24 bits into four chunks of 6 bits each, and append the
+ // matching character for each of them to the output.
+ output += (
+ TABLE.charAt(buffer >> 18 & 0x3F) +
+ TABLE.charAt(buffer >> 12 & 0x3F) +
+ TABLE.charAt(buffer >> 6 & 0x3F) +
+ TABLE.charAt(buffer & 0x3F)
+ );
+ }
+
+ if (padding == 2) {
+ a = input.charCodeAt(position) << 8;
+ b = input.charCodeAt(++position);
+ buffer = a + b;
+ output += (
+ TABLE.charAt(buffer >> 10) +
+ TABLE.charAt((buffer >> 4) & 0x3F) +
+ TABLE.charAt((buffer << 2) & 0x3F) +
+ '='
+ );
+ } else if (padding == 1) {
+ buffer = input.charCodeAt(position);
+ output += (
+ TABLE.charAt(buffer >> 2) +
+ TABLE.charAt((buffer << 4) & 0x3F) +
+ '=='
+ );
+ }
+
+ return output;
+ };
+
+ var base64 = {
+ 'encode': encode,
+ 'decode': decode,
+ 'version': '1.0.0'
+ };
+
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ typeof define == 'function' &&
+ typeof define.amd == 'object' &&
+ define.amd
+ ) {
+ define(function() {
+ return base64;
+ });
+ } else if (freeExports && !freeExports.nodeType) {
+ if (freeModule) { // in Node.js or RingoJS v0.8.0+
+ freeModule.exports = base64;
+ } else { // in Narwhal or RingoJS v0.7.0-
+ for (var key in base64) {
+ base64.hasOwnProperty(key) && (freeExports[key] = base64[key]);
+ }
+ }
+ } else { // in Rhino or a web browser
+ root.base64 = base64;
+ }
+
+}(this));
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/base64/package.json b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/package.json
new file mode 100644
index 000000000..479b0a180
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/base64/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "base-64",
+ "version": "1.0.0",
+ "description": "A robust base64 encoder/decoder that is fully compatible with `atob()` and `btoa()`, written in JavaScript.",
+ "homepage": "https://mths.be/base64",
+ "main": "base64.js",
+ "keywords": [
+ "codec",
+ "decoder",
+ "encoder",
+ "base64",
+ "atob",
+ "btoa"
+ ],
+ "license": "MIT",
+ "author": {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mathiasbynens/base64.git"
+ },
+ "bugs": "https://github.com/mathiasbynens/base64/issues",
+ "files": [
+ "LICENSE-MIT.txt",
+ "base64.js"
+ ],
+ "scripts": {
+ "test": "mocha tests/tests.js",
+ "build": "grunt build"
+ },
+ "devDependencies": {
+ "coveralls": "^2.11.4",
+ "grunt": "^0.4.5",
+ "grunt-cli": "^1.3.2",
+ "grunt-shell": "^1.1.2",
+ "grunt-template": "^0.2.3",
+ "istanbul": "^0.4.0",
+ "mocha": "^6.2.0",
+ "regenerate": "^1.2.1"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/LICENSE.md b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/LICENSE.md
new file mode 100644
index 000000000..5ab10466b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/LICENSE.md
@@ -0,0 +1,237 @@
+The encoding indexes, algorithms, and many comments in the code
+derive from the Encoding Standard https://encoding.spec.whatwg.org/
+
+Otherwise, the code of this repository is released under the Unlicense
+license and is also dual-licensed under an Apache 2.0 license. Both
+are included below.
+
+# Unlicense
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to
+
+# Apache 2.0 License
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/README.md b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/README.md
new file mode 100644
index 000000000..b9af0e311
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/README.md
@@ -0,0 +1,111 @@
+text-encoding
+==============
+
+This is a polyfill for the [Encoding Living
+Standard](https://encoding.spec.whatwg.org/) API for the Web, allowing
+encoding and decoding of textual data to and from Typed Array buffers
+for binary data in JavaScript.
+
+By default it adheres to the spec and does not support *encoding* to
+legacy encodings, only *decoding*. It is also implemented to match the
+specification's algorithms, rather than for performance. The intended
+use is within Web pages, so it has no dependency on server frameworks
+or particular module schemes.
+
+Basic examples and tests are included.
+
+### Install ###
+
+There are a few ways you can get and use the `text-encoding` library.
+
+### HTML Page Usage ###
+
+Clone the repo and include the files directly:
+
+```html
+
+
+
+```
+
+This is the only use case the developer cares about. If you want those
+fancy module and/or package manager things that are popular these days
+you should probably use a different library.
+
+#### Package Managers ####
+
+The package is published to **npm** and **bower** as `text-encoding`.
+Use through these is not really supported, since they aren't used by
+the developer of the library. Using `require()` in interesting ways
+probably breaks. Patches welcome, as long as they don't break the
+basic use of the files via `
+```
+
+To support the legacy encodings (which may be stateful), the
+TextEncoder `encode()` method accepts an optional dictionary and
+`stream` option, e.g. `encoder.encode(string, {stream: true});` This
+is not needed for standard encoding since the input is always in
+complete code points.
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/index.js b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/index.js
new file mode 100644
index 000000000..cc57d658f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/index.js
@@ -0,0 +1,9 @@
+// This is free and unencumbered software released into the public domain.
+// See LICENSE.md for more information.
+
+var encoding = require("./lib/encoding.js");
+
+module.exports = {
+ TextEncoder: encoding.TextEncoder,
+ TextDecoder: encoding.TextDecoder,
+};
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/lib/encoding-indexes.js b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/lib/encoding-indexes.js
new file mode 100644
index 000000000..4f170c3bb
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/lib/encoding-indexes.js
@@ -0,0 +1,47 @@
+(function(global) {
+ 'use strict';
+
+ if (typeof module !== "undefined" && module.exports) {
+ module.exports = global;
+ }
+
+ global["encoding-indexes"] =
+{
+ "big5":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,17392,19506,17923,17830,17784,160359,19831,17843,162993,19682,163013,15253,18230,18244,19527,19520,148159,144919,160594,159371,159954,19543,172881,18255,17882,19589,162924,19719,19108,18081,158499,29221,154196,137827,146950,147297,26189,22267,null,32149,22813,166841,15860,38708,162799,23515,138590,23204,13861,171696,23249,23479,23804,26478,34195,170309,29793,29853,14453,138579,145054,155681,16108,153822,15093,31484,40855,147809,166157,143850,133770,143966,17162,33924,40854,37935,18736,34323,22678,38730,37400,31184,31282,26208,27177,34973,29772,31685,26498,31276,21071,36934,13542,29636,155065,29894,40903,22451,18735,21580,16689,145038,22552,31346,162661,35727,18094,159368,16769,155033,31662,140476,40904,140481,140489,140492,40905,34052,144827,16564,40906,17633,175615,25281,28782,40907,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,12736,12737,12738,12739,12740,131340,12741,131281,131277,12742,12743,131275,139240,12744,131274,12745,12746,12747,12748,131342,12749,12750,256,193,461,192,274,201,282,200,332,211,465,210,null,7870,null,7872,202,257,225,462,224,593,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,null,7871,null,7873,234,609,9178,9179,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,172969,135493,null,25866,null,null,20029,28381,40270,37343,null,null,161589,25745,20250,20264,20392,20822,20852,20892,20964,21153,21160,21307,21326,21457,21464,22242,22768,22788,22791,22834,22836,23398,23454,23455,23706,24198,24635,25993,26622,26628,26725,27982,28860,30005,32420,32428,32442,32455,32463,32479,32518,32567,33402,33487,33647,35270,35774,35810,36710,36711,36718,29713,31996,32205,26950,31433,21031,null,null,null,null,37260,30904,37214,32956,null,36107,33014,133607,null,null,32927,40647,19661,40393,40460,19518,171510,159758,40458,172339,13761,null,28314,33342,29977,null,18705,39532,39567,40857,31111,164972,138698,132560,142054,20004,20097,20096,20103,20159,20203,20279,13388,20413,15944,20483,20616,13437,13459,13477,20870,22789,20955,20988,20997,20105,21113,21136,21287,13767,21417,13649,21424,13651,21442,21539,13677,13682,13953,21651,21667,21684,21689,21712,21743,21784,21795,21800,13720,21823,13733,13759,21975,13765,163204,21797,null,134210,134421,151851,21904,142534,14828,131905,36422,150968,169189,16467,164030,30586,142392,14900,18389,164189,158194,151018,25821,134524,135092,134357,135412,25741,36478,134806,134155,135012,142505,164438,148691,null,134470,170573,164073,18420,151207,142530,39602,14951,169460,16365,13574,152263,169940,161992,142660,40302,38933,null,17369,155813,25780,21731,142668,142282,135287,14843,135279,157402,157462,162208,25834,151634,134211,36456,139681,166732,132913,null,18443,131497,16378,22643,142733,null,148936,132348,155799,134988,134550,21881,16571,17338,null,19124,141926,135325,33194,39157,134556,25465,14846,141173,36288,22177,25724,15939,null,173569,134665,142031,142537,null,135368,145858,14738,14854,164507,13688,155209,139463,22098,134961,142514,169760,13500,27709,151099,null,null,161140,142987,139784,173659,167117,134778,134196,157724,32659,135375,141315,141625,13819,152035,134796,135053,134826,16275,134960,134471,135503,134732,null,134827,134057,134472,135360,135485,16377,140950,25650,135085,144372,161337,142286,134526,134527,142417,142421,14872,134808,135367,134958,173618,158544,167122,167321,167114,38314,21708,33476,21945,null,171715,39974,39606,161630,142830,28992,33133,33004,23580,157042,33076,14231,21343,164029,37302,134906,134671,134775,134907,13789,151019,13833,134358,22191,141237,135369,134672,134776,135288,135496,164359,136277,134777,151120,142756,23124,135197,135198,135413,135414,22428,134673,161428,164557,135093,134779,151934,14083,135094,135552,152280,172733,149978,137274,147831,164476,22681,21096,13850,153405,31666,23400,18432,19244,40743,18919,39967,39821,154484,143677,22011,13810,22153,20008,22786,138177,194680,38737,131206,20059,20155,13630,23587,24401,24516,14586,25164,25909,27514,27701,27706,28780,29227,20012,29357,149737,32594,31035,31993,32595,156266,13505,null,156491,32770,32896,157202,158033,21341,34916,35265,161970,35744,36125,38021,38264,38271,38376,167439,38886,39029,39118,39134,39267,170000,40060,40479,40644,27503,63751,20023,131207,38429,25143,38050,null,20539,28158,171123,40870,15817,34959,147790,28791,23797,19232,152013,13657,154928,24866,166450,36775,37366,29073,26393,29626,144001,172295,15499,137600,19216,30948,29698,20910,165647,16393,27235,172730,16931,34319,133743,31274,170311,166634,38741,28749,21284,139390,37876,30425,166371,40871,30685,20131,20464,20668,20015,20247,40872,21556,32139,22674,22736,138678,24210,24217,24514,141074,25995,144377,26905,27203,146531,27903,null,29184,148741,29580,16091,150035,23317,29881,35715,154788,153237,31379,31724,31939,32364,33528,34199,40873,34960,40874,36537,40875,36815,34143,39392,37409,40876,167353,136255,16497,17058,23066,null,null,null,39016,26475,17014,22333,null,34262,149883,33471,160013,19585,159092,23931,158485,159678,40877,40878,23446,40879,26343,32347,28247,31178,15752,17603,143958,141206,17306,17718,null,23765,146202,35577,23672,15634,144721,23928,40882,29015,17752,147692,138787,19575,14712,13386,131492,158785,35532,20404,131641,22975,33132,38998,170234,24379,134047,null,139713,166253,16642,18107,168057,16135,40883,172469,16632,14294,18167,158790,16764,165554,160767,17773,14548,152730,17761,17691,19849,19579,19830,17898,16328,150287,13921,17630,17597,16877,23870,23880,23894,15868,14351,23972,23993,14368,14392,24130,24253,24357,24451,14600,14612,14655,14669,24791,24893,23781,14729,25015,25017,25039,14776,25132,25232,25317,25368,14840,22193,14851,25570,25595,25607,25690,14923,25792,23829,22049,40863,14999,25990,15037,26111,26195,15090,26258,15138,26390,15170,26532,26624,15192,26698,26756,15218,15217,15227,26889,26947,29276,26980,27039,27013,15292,27094,15325,27237,27252,27249,27266,15340,27289,15346,27307,27317,27348,27382,27521,27585,27626,27765,27818,15563,27906,27910,27942,28033,15599,28068,28081,28181,28184,28201,28294,166336,28347,28386,28378,40831,28392,28393,28452,28468,15686,147265,28545,28606,15722,15733,29111,23705,15754,28716,15761,28752,28756,28783,28799,28809,131877,17345,13809,134872,147159,22462,159443,28990,153568,13902,27042,166889,23412,31305,153825,169177,31333,31357,154028,31419,31408,31426,31427,29137,156813,16842,31450,31453,31466,16879,21682,154625,31499,31573,31529,152334,154878,31650,31599,33692,154548,158847,31696,33825,31634,31672,154912,15789,154725,33938,31738,31750,31797,154817,31812,31875,149634,31910,26237,148856,31945,31943,31974,31860,31987,31989,31950,32359,17693,159300,32093,159446,29837,32137,32171,28981,32179,32210,147543,155689,32228,15635,32245,137209,32229,164717,32285,155937,155994,32366,32402,17195,37996,32295,32576,32577,32583,31030,156368,39393,32663,156497,32675,136801,131176,17756,145254,17667,164666,32762,156809,32773,32776,32797,32808,32815,172167,158915,32827,32828,32865,141076,18825,157222,146915,157416,26405,32935,166472,33031,33050,22704,141046,27775,156824,151480,25831,136330,33304,137310,27219,150117,150165,17530,33321,133901,158290,146814,20473,136445,34018,33634,158474,149927,144688,137075,146936,33450,26907,194964,16859,34123,33488,33562,134678,137140,14017,143741,144730,33403,33506,33560,147083,159139,158469,158615,144846,15807,33565,21996,33669,17675,159141,33708,33729,33747,13438,159444,27223,34138,13462,159298,143087,33880,154596,33905,15827,17636,27303,33866,146613,31064,33960,158614,159351,159299,34014,33807,33681,17568,33939,34020,154769,16960,154816,17731,34100,23282,159385,17703,34163,17686,26559,34326,165413,165435,34241,159880,34306,136578,159949,194994,17770,34344,13896,137378,21495,160666,34430,34673,172280,34798,142375,34737,34778,34831,22113,34412,26710,17935,34885,34886,161248,146873,161252,34910,34972,18011,34996,34997,25537,35013,30583,161551,35207,35210,35238,35241,35239,35260,166437,35303,162084,162493,35484,30611,37374,35472,162393,31465,162618,147343,18195,162616,29052,35596,35615,152624,152933,35647,35660,35661,35497,150138,35728,35739,35503,136927,17941,34895,35995,163156,163215,195028,14117,163155,36054,163224,163261,36114,36099,137488,36059,28764,36113,150729,16080,36215,36265,163842,135188,149898,15228,164284,160012,31463,36525,36534,36547,37588,36633,36653,164709,164882,36773,37635,172703,133712,36787,18730,166366,165181,146875,24312,143970,36857,172052,165564,165121,140069,14720,159447,36919,165180,162494,36961,165228,165387,37032,165651,37060,165606,37038,37117,37223,15088,37289,37316,31916,166195,138889,37390,27807,37441,37474,153017,37561,166598,146587,166668,153051,134449,37676,37739,166625,166891,28815,23235,166626,166629,18789,37444,166892,166969,166911,37747,37979,36540,38277,38310,37926,38304,28662,17081,140922,165592,135804,146990,18911,27676,38523,38550,16748,38563,159445,25050,38582,30965,166624,38589,21452,18849,158904,131700,156688,168111,168165,150225,137493,144138,38705,34370,38710,18959,17725,17797,150249,28789,23361,38683,38748,168405,38743,23370,168427,38751,37925,20688,143543,143548,38793,38815,38833,38846,38848,38866,38880,152684,38894,29724,169011,38911,38901,168989,162170,19153,38964,38963,38987,39014,15118,160117,15697,132656,147804,153350,39114,39095,39112,39111,19199,159015,136915,21936,39137,39142,39148,37752,39225,150057,19314,170071,170245,39413,39436,39483,39440,39512,153381,14020,168113,170965,39648,39650,170757,39668,19470,39700,39725,165376,20532,39732,158120,14531,143485,39760,39744,171326,23109,137315,39822,148043,39938,39935,39948,171624,40404,171959,172434,172459,172257,172323,172511,40318,40323,172340,40462,26760,40388,139611,172435,172576,137531,172595,40249,172217,172724,40592,40597,40606,40610,19764,40618,40623,148324,40641,15200,14821,15645,20274,14270,166955,40706,40712,19350,37924,159138,40727,40726,40761,22175,22154,40773,39352,168075,38898,33919,40802,40809,31452,40846,29206,19390,149877,149947,29047,150008,148296,150097,29598,166874,137466,31135,166270,167478,37737,37875,166468,37612,37761,37835,166252,148665,29207,16107,30578,31299,28880,148595,148472,29054,137199,28835,137406,144793,16071,137349,152623,137208,14114,136955,137273,14049,137076,137425,155467,14115,136896,22363,150053,136190,135848,136134,136374,34051,145062,34051,33877,149908,160101,146993,152924,147195,159826,17652,145134,170397,159526,26617,14131,15381,15847,22636,137506,26640,16471,145215,147681,147595,147727,158753,21707,22174,157361,22162,135135,134056,134669,37830,166675,37788,20216,20779,14361,148534,20156,132197,131967,20299,20362,153169,23144,131499,132043,14745,131850,132116,13365,20265,131776,167603,131701,35546,131596,20120,20685,20749,20386,20227,150030,147082,20290,20526,20588,20609,20428,20453,20568,20732,20825,20827,20829,20830,28278,144789,147001,147135,28018,137348,147081,20904,20931,132576,17629,132259,132242,132241,36218,166556,132878,21081,21156,133235,21217,37742,18042,29068,148364,134176,149932,135396,27089,134685,29817,16094,29849,29716,29782,29592,19342,150204,147597,21456,13700,29199,147657,21940,131909,21709,134086,22301,37469,38644,37734,22493,22413,22399,13886,22731,23193,166470,136954,137071,136976,23084,22968,37519,23166,23247,23058,153926,137715,137313,148117,14069,27909,29763,23073,155267,23169,166871,132115,37856,29836,135939,28933,18802,37896,166395,37821,14240,23582,23710,24158,24136,137622,137596,146158,24269,23375,137475,137476,14081,137376,14045,136958,14035,33066,166471,138682,144498,166312,24332,24334,137511,137131,23147,137019,23364,34324,161277,34912,24702,141408,140843,24539,16056,140719,140734,168072,159603,25024,131134,131142,140827,24985,24984,24693,142491,142599,149204,168269,25713,149093,142186,14889,142114,144464,170218,142968,25399,173147,25782,25393,25553,149987,142695,25252,142497,25659,25963,26994,15348,143502,144045,149897,144043,21773,144096,137433,169023,26318,144009,143795,15072,16784,152964,166690,152975,136956,152923,152613,30958,143619,137258,143924,13412,143887,143746,148169,26254,159012,26219,19347,26160,161904,138731,26211,144082,144097,26142,153714,14545,145466,145340,15257,145314,144382,29904,15254,26511,149034,26806,26654,15300,27326,14435,145365,148615,27187,27218,27337,27397,137490,25873,26776,27212,15319,27258,27479,147392,146586,37792,37618,166890,166603,37513,163870,166364,37991,28069,28427,149996,28007,147327,15759,28164,147516,23101,28170,22599,27940,30786,28987,148250,148086,28913,29264,29319,29332,149391,149285,20857,150180,132587,29818,147192,144991,150090,149783,155617,16134,16049,150239,166947,147253,24743,16115,29900,29756,37767,29751,17567,159210,17745,30083,16227,150745,150790,16216,30037,30323,173510,15129,29800,166604,149931,149902,15099,15821,150094,16127,149957,149747,37370,22322,37698,166627,137316,20703,152097,152039,30584,143922,30478,30479,30587,149143,145281,14942,149744,29752,29851,16063,150202,150215,16584,150166,156078,37639,152961,30750,30861,30856,30930,29648,31065,161601,153315,16654,31131,33942,31141,27181,147194,31290,31220,16750,136934,16690,37429,31217,134476,149900,131737,146874,137070,13719,21867,13680,13994,131540,134157,31458,23129,141045,154287,154268,23053,131675,30960,23082,154566,31486,16889,31837,31853,16913,154547,155324,155302,31949,150009,137136,31886,31868,31918,27314,32220,32263,32211,32590,156257,155996,162632,32151,155266,17002,158581,133398,26582,131150,144847,22468,156690,156664,149858,32733,31527,133164,154345,154947,31500,155150,39398,34373,39523,27164,144447,14818,150007,157101,39455,157088,33920,160039,158929,17642,33079,17410,32966,33033,33090,157620,39107,158274,33378,33381,158289,33875,159143,34320,160283,23174,16767,137280,23339,137377,23268,137432,34464,195004,146831,34861,160802,23042,34926,20293,34951,35007,35046,35173,35149,153219,35156,161669,161668,166901,166873,166812,166393,16045,33955,18165,18127,14322,35389,35356,169032,24397,37419,148100,26068,28969,28868,137285,40301,35999,36073,163292,22938,30659,23024,17262,14036,36394,36519,150537,36656,36682,17140,27736,28603,140065,18587,28537,28299,137178,39913,14005,149807,37051,37015,21873,18694,37307,37892,166475,16482,166652,37927,166941,166971,34021,35371,38297,38311,38295,38294,167220,29765,16066,149759,150082,148458,16103,143909,38543,167655,167526,167525,16076,149997,150136,147438,29714,29803,16124,38721,168112,26695,18973,168083,153567,38749,37736,166281,166950,166703,156606,37562,23313,35689,18748,29689,147995,38811,38769,39224,134950,24001,166853,150194,38943,169178,37622,169431,37349,17600,166736,150119,166756,39132,166469,16128,37418,18725,33812,39227,39245,162566,15869,39323,19311,39338,39516,166757,153800,27279,39457,23294,39471,170225,19344,170312,39356,19389,19351,37757,22642,135938,22562,149944,136424,30788,141087,146872,26821,15741,37976,14631,24912,141185,141675,24839,40015,40019,40059,39989,39952,39807,39887,171565,39839,172533,172286,40225,19630,147716,40472,19632,40204,172468,172269,172275,170287,40357,33981,159250,159711,158594,34300,17715,159140,159364,159216,33824,34286,159232,145367,155748,31202,144796,144960,18733,149982,15714,37851,37566,37704,131775,30905,37495,37965,20452,13376,36964,152925,30781,30804,30902,30795,137047,143817,149825,13978,20338,28634,28633,28702,28702,21524,147893,22459,22771,22410,40214,22487,28980,13487,147884,29163,158784,151447,23336,137141,166473,24844,23246,23051,17084,148616,14124,19323,166396,37819,37816,137430,134941,33906,158912,136211,148218,142374,148417,22932,146871,157505,32168,155995,155812,149945,149899,166394,37605,29666,16105,29876,166755,137375,16097,150195,27352,29683,29691,16086,150078,150164,137177,150118,132007,136228,149989,29768,149782,28837,149878,37508,29670,37727,132350,37681,166606,166422,37766,166887,153045,18741,166530,29035,149827,134399,22180,132634,134123,134328,21762,31172,137210,32254,136898,150096,137298,17710,37889,14090,166592,149933,22960,137407,137347,160900,23201,14050,146779,14000,37471,23161,166529,137314,37748,15565,133812,19094,14730,20724,15721,15692,136092,29045,17147,164376,28175,168164,17643,27991,163407,28775,27823,15574,147437,146989,28162,28428,15727,132085,30033,14012,13512,18048,16090,18545,22980,37486,18750,36673,166940,158656,22546,22472,14038,136274,28926,148322,150129,143331,135856,140221,26809,26983,136088,144613,162804,145119,166531,145366,144378,150687,27162,145069,158903,33854,17631,17614,159014,159057,158850,159710,28439,160009,33597,137018,33773,158848,159827,137179,22921,23170,137139,23137,23153,137477,147964,14125,23023,137020,14023,29070,37776,26266,148133,23150,23083,148115,27179,147193,161590,148571,148170,28957,148057,166369,20400,159016,23746,148686,163405,148413,27148,148054,135940,28838,28979,148457,15781,27871,194597,150095,32357,23019,23855,15859,24412,150109,137183,32164,33830,21637,146170,144128,131604,22398,133333,132633,16357,139166,172726,28675,168283,23920,29583,31955,166489,168992,20424,32743,29389,29456,162548,29496,29497,153334,29505,29512,16041,162584,36972,29173,149746,29665,33270,16074,30476,16081,27810,22269,29721,29726,29727,16098,16112,16116,16122,29907,16142,16211,30018,30061,30066,30093,16252,30152,30172,16320,30285,16343,30324,16348,30330,151388,29064,22051,35200,22633,16413,30531,16441,26465,16453,13787,30616,16490,16495,23646,30654,30667,22770,30744,28857,30748,16552,30777,30791,30801,30822,33864,152885,31027,26627,31026,16643,16649,31121,31129,36795,31238,36796,16743,31377,16818,31420,33401,16836,31439,31451,16847,20001,31586,31596,31611,31762,31771,16992,17018,31867,31900,17036,31928,17044,31981,36755,28864,134351,32207,32212,32208,32253,32686,32692,29343,17303,32800,32805,31545,32814,32817,32852,15820,22452,28832,32951,33001,17389,33036,29482,33038,33042,30048,33044,17409,15161,33110,33113,33114,17427,22586,33148,33156,17445,33171,17453,33189,22511,33217,33252,33364,17551,33446,33398,33482,33496,33535,17584,33623,38505,27018,33797,28917,33892,24803,33928,17668,33982,34017,34040,34064,34104,34130,17723,34159,34160,34272,17783,34418,34450,34482,34543,38469,34699,17926,17943,34990,35071,35108,35143,35217,162151,35369,35384,35476,35508,35921,36052,36082,36124,18328,22623,36291,18413,20206,36410,21976,22356,36465,22005,36528,18487,36558,36578,36580,36589,36594,36791,36801,36810,36812,36915,39364,18605,39136,37395,18718,37416,37464,37483,37553,37550,37567,37603,37611,37619,37620,37629,37699,37764,37805,18757,18769,40639,37911,21249,37917,37933,37950,18794,37972,38009,38189,38306,18855,38388,38451,18917,26528,18980,38720,18997,38834,38850,22100,19172,24808,39097,19225,39153,22596,39182,39193,20916,39196,39223,39234,39261,39266,19312,39365,19357,39484,39695,31363,39785,39809,39901,39921,39924,19565,39968,14191,138178,40265,39994,40702,22096,40339,40381,40384,40444,38134,36790,40571,40620,40625,40637,40646,38108,40674,40689,40696,31432,40772,131220,131767,132000,26906,38083,22956,132311,22592,38081,14265,132565,132629,132726,136890,22359,29043,133826,133837,134079,21610,194619,134091,21662,134139,134203,134227,134245,134268,24807,134285,22138,134325,134365,134381,134511,134578,134600,26965,39983,34725,134660,134670,134871,135056,134957,134771,23584,135100,24075,135260,135247,135286,26398,135291,135304,135318,13895,135359,135379,135471,135483,21348,33965,135907,136053,135990,35713,136567,136729,137155,137159,20088,28859,137261,137578,137773,137797,138282,138352,138412,138952,25283,138965,139029,29080,26709,139333,27113,14024,139900,140247,140282,141098,141425,141647,33533,141671,141715,142037,35237,142056,36768,142094,38840,142143,38983,39613,142412,null,142472,142519,154600,142600,142610,142775,142741,142914,143220,143308,143411,143462,144159,144350,24497,26184,26303,162425,144743,144883,29185,149946,30679,144922,145174,32391,131910,22709,26382,26904,146087,161367,155618,146961,147129,161278,139418,18640,19128,147737,166554,148206,148237,147515,148276,148374,150085,132554,20946,132625,22943,138920,15294,146687,148484,148694,22408,149108,14747,149295,165352,170441,14178,139715,35678,166734,39382,149522,149755,150037,29193,150208,134264,22885,151205,151430,132985,36570,151596,21135,22335,29041,152217,152601,147274,150183,21948,152646,152686,158546,37332,13427,152895,161330,152926,18200,152930,152934,153543,149823,153693,20582,13563,144332,24798,153859,18300,166216,154286,154505,154630,138640,22433,29009,28598,155906,162834,36950,156082,151450,35682,156674,156746,23899,158711,36662,156804,137500,35562,150006,156808,147439,156946,19392,157119,157365,141083,37989,153569,24981,23079,194765,20411,22201,148769,157436,20074,149812,38486,28047,158909,13848,35191,157593,157806,156689,157790,29151,157895,31554,168128,133649,157990,37124,158009,31301,40432,158202,39462,158253,13919,156777,131105,31107,158260,158555,23852,144665,33743,158621,18128,158884,30011,34917,159150,22710,14108,140685,159819,160205,15444,160384,160389,37505,139642,160395,37680,160486,149968,27705,38047,160848,134904,34855,35061,141606,164979,137137,28344,150058,137248,14756,14009,23568,31203,17727,26294,171181,170148,35139,161740,161880,22230,16607,136714,14753,145199,164072,136133,29101,33638,162269,168360,23143,19639,159919,166315,162301,162314,162571,163174,147834,31555,31102,163849,28597,172767,27139,164632,21410,159239,37823,26678,38749,164207,163875,158133,136173,143919,163912,23941,166960,163971,22293,38947,166217,23979,149896,26046,27093,21458,150181,147329,15377,26422,163984,164084,164142,139169,164175,164233,164271,164378,164614,164655,164746,13770,164968,165546,18682,25574,166230,30728,37461,166328,17394,166375,17375,166376,166726,166868,23032,166921,36619,167877,168172,31569,168208,168252,15863,168286,150218,36816,29327,22155,169191,169449,169392,169400,169778,170193,170313,170346,170435,170536,170766,171354,171419,32415,171768,171811,19620,38215,172691,29090,172799,19857,36882,173515,19868,134300,36798,21953,36794,140464,36793,150163,17673,32383,28502,27313,20202,13540,166700,161949,14138,36480,137205,163876,166764,166809,162366,157359,15851,161365,146615,153141,153942,20122,155265,156248,22207,134765,36366,23405,147080,150686,25566,25296,137206,137339,25904,22061,154698,21530,152337,15814,171416,19581,22050,22046,32585,155352,22901,146752,34672,19996,135146,134473,145082,33047,40286,36120,30267,40005,30286,30649,37701,21554,33096,33527,22053,33074,33816,32957,21994,31074,22083,21526,134813,13774,22021,22001,26353,164578,13869,30004,22000,21946,21655,21874,134209,134294,24272,151880,134774,142434,134818,40619,32090,21982,135285,25245,38765,21652,36045,29174,37238,25596,25529,25598,21865,142147,40050,143027,20890,13535,134567,20903,21581,21790,21779,30310,36397,157834,30129,32950,34820,34694,35015,33206,33820,135361,17644,29444,149254,23440,33547,157843,22139,141044,163119,147875,163187,159440,160438,37232,135641,37384,146684,173737,134828,134905,29286,138402,18254,151490,163833,135147,16634,40029,25887,142752,18675,149472,171388,135148,134666,24674,161187,135149,null,155720,135559,29091,32398,40272,19994,19972,13687,23309,27826,21351,13996,14812,21373,13989,149016,22682,150382,33325,21579,22442,154261,133497,null,14930,140389,29556,171692,19721,39917,146686,171824,19547,151465,169374,171998,33884,146870,160434,157619,145184,25390,32037,147191,146988,14890,36872,21196,15988,13946,17897,132238,30272,23280,134838,30842,163630,22695,16575,22140,39819,23924,30292,173108,40581,19681,30201,14331,24857,143578,148466,null,22109,135849,22439,149859,171526,21044,159918,13741,27722,40316,31830,39737,22494,137068,23635,25811,169168,156469,160100,34477,134440,159010,150242,134513,null,20990,139023,23950,38659,138705,40577,36940,31519,39682,23761,31651,25192,25397,39679,31695,39722,31870,39726,31810,31878,39957,31740,39689,40727,39963,149822,40794,21875,23491,20477,40600,20466,21088,15878,21201,22375,20566,22967,24082,38856,40363,36700,21609,38836,39232,38842,21292,24880,26924,21466,39946,40194,19515,38465,27008,20646,30022,137069,39386,21107,null,37209,38529,37212,null,37201,167575,25471,159011,27338,22033,37262,30074,25221,132092,29519,31856,154657,146685,null,149785,30422,39837,20010,134356,33726,34882,null,23626,27072,20717,22394,21023,24053,20174,27697,131570,20281,21660,21722,21146,36226,13822,24332,13811,null,27474,37244,40869,39831,38958,39092,39610,40616,40580,29050,31508,null,27642,34840,32632,null,22048,173642,36471,40787,null,36308,36431,40476,36353,25218,164733,36392,36469,31443,150135,31294,30936,27882,35431,30215,166490,40742,27854,34774,30147,172722,30803,194624,36108,29410,29553,35629,29442,29937,36075,150203,34351,24506,34976,17591,null,137275,159237,null,35454,140571,null,24829,30311,39639,40260,37742,39823,34805,null,34831,36087,29484,38689,39856,13782,29362,19463,31825,39242,155993,24921,19460,40598,24957,null,22367,24943,25254,25145,25294,14940,25058,21418,144373,25444,26626,13778,23895,166850,36826,167481,null,20697,138566,30982,21298,38456,134971,16485,null,30718,null,31938,155418,31962,31277,32870,32867,32077,29957,29938,35220,33306,26380,32866,160902,32859,29936,33027,30500,35209,157644,30035,159441,34729,34766,33224,34700,35401,36013,35651,30507,29944,34010,13877,27058,36262,null,35241,29800,28089,34753,147473,29927,15835,29046,24740,24988,15569,29026,24695,null,32625,166701,29264,24809,19326,21024,15384,146631,155351,161366,152881,137540,135934,170243,159196,159917,23745,156077,166415,145015,131310,157766,151310,17762,23327,156492,40784,40614,156267,12288,65292,12289,12290,65294,8231,65307,65306,65311,65281,65072,8230,8229,65104,65105,65106,183,65108,65109,65110,65111,65372,8211,65073,8212,65075,9588,65076,65103,65288,65289,65077,65078,65371,65373,65079,65080,12308,12309,65081,65082,12304,12305,65083,65084,12298,12299,65085,65086,12296,12297,65087,65088,12300,12301,65089,65090,12302,12303,65091,65092,65113,65114,65115,65116,65117,65118,8216,8217,8220,8221,12317,12318,8245,8242,65283,65286,65290,8251,167,12291,9675,9679,9651,9650,9678,9734,9733,9671,9670,9633,9632,9661,9660,12963,8453,175,65507,65343,717,65097,65098,65101,65102,65099,65100,65119,65120,65121,65291,65293,215,247,177,8730,65308,65310,65309,8806,8807,8800,8734,8786,8801,65122,65123,65124,65125,65126,65374,8745,8746,8869,8736,8735,8895,13266,13265,8747,8750,8757,8756,9792,9794,8853,8857,8593,8595,8592,8594,8598,8599,8601,8600,8741,8739,65295,65340,8725,65128,65284,65509,12306,65504,65505,65285,65312,8451,8457,65129,65130,65131,13269,13212,13213,13214,13262,13217,13198,13199,13252,176,20825,20827,20830,20829,20833,20835,21991,29929,31950,9601,9602,9603,9604,9605,9606,9607,9608,9615,9614,9613,9612,9611,9610,9609,9532,9524,9516,9508,9500,9620,9472,9474,9621,9484,9488,9492,9496,9581,9582,9584,9583,9552,9566,9578,9569,9698,9699,9701,9700,9585,9586,9587,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,12321,12322,12323,12324,12325,12326,12327,12328,12329,21313,21316,21317,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,729,713,714,711,715,9216,9217,9218,9219,9220,9221,9222,9223,9224,9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240,9241,9242,9243,9244,9245,9246,9247,9249,8364,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19968,20057,19969,19971,20035,20061,20102,20108,20154,20799,20837,20843,20960,20992,20993,21147,21269,21313,21340,21448,19977,19979,19976,19978,20011,20024,20961,20037,20040,20063,20062,20110,20129,20800,20995,21242,21315,21449,21475,22303,22763,22805,22823,22899,23376,23377,23379,23544,23567,23586,23608,23665,24029,24037,24049,24050,24051,24062,24178,24318,24331,24339,25165,19985,19984,19981,20013,20016,20025,20043,23609,20104,20113,20117,20114,20116,20130,20161,20160,20163,20166,20167,20173,20170,20171,20164,20803,20801,20839,20845,20846,20844,20887,20982,20998,20999,21000,21243,21246,21247,21270,21305,21320,21319,21317,21342,21380,21451,21450,21453,22764,22825,22827,22826,22829,23380,23569,23588,23610,23663,24052,24187,24319,24340,24341,24515,25096,25142,25163,25166,25903,25991,26007,26020,26041,26085,26352,26376,26408,27424,27490,27513,27595,27604,27611,27663,27700,28779,29226,29238,29243,29255,29273,29275,29356,29579,19993,19990,19989,19988,19992,20027,20045,20047,20046,20197,20184,20180,20181,20182,20183,20195,20196,20185,20190,20805,20804,20873,20874,20908,20985,20986,20984,21002,21152,21151,21253,21254,21271,21277,20191,21322,21321,21345,21344,21359,21358,21435,21487,21476,21491,21484,21486,21481,21480,21500,21496,21493,21483,21478,21482,21490,21489,21488,21477,21485,21499,22235,22234,22806,22830,22833,22900,22902,23381,23427,23612,24040,24039,24038,24066,24067,24179,24188,24321,24344,24343,24517,25098,25171,25172,25170,25169,26021,26086,26414,26412,26410,26411,26413,27491,27597,27665,27664,27704,27713,27712,27710,29359,29572,29577,29916,29926,29976,29983,29992,29993,30000,30001,30002,30003,30091,30333,30382,30399,30446,30683,30690,30707,31034,31166,31348,31435,19998,19999,20050,20051,20073,20121,20132,20134,20133,20223,20233,20249,20234,20245,20237,20240,20241,20239,20210,20214,20219,20208,20211,20221,20225,20235,20809,20807,20806,20808,20840,20849,20877,20912,21015,21009,21010,21006,21014,21155,21256,21281,21280,21360,21361,21513,21519,21516,21514,21520,21505,21515,21508,21521,21517,21512,21507,21518,21510,21522,22240,22238,22237,22323,22320,22312,22317,22316,22319,22313,22809,22810,22839,22840,22916,22904,22915,22909,22905,22914,22913,23383,23384,23431,23432,23429,23433,23546,23574,23673,24030,24070,24182,24180,24335,24347,24537,24534,25102,25100,25101,25104,25187,25179,25176,25910,26089,26088,26092,26093,26354,26355,26377,26429,26420,26417,26421,27425,27492,27515,27670,27741,27735,27737,27743,27744,27728,27733,27745,27739,27725,27726,28784,29279,29277,30334,31481,31859,31992,32566,32650,32701,32769,32771,32780,32786,32819,32895,32905,32907,32908,33251,33258,33267,33276,33292,33307,33311,33390,33394,33406,34411,34880,34892,34915,35199,38433,20018,20136,20301,20303,20295,20311,20318,20276,20315,20309,20272,20304,20305,20285,20282,20280,20291,20308,20284,20294,20323,20316,20320,20271,20302,20278,20313,20317,20296,20314,20812,20811,20813,20853,20918,20919,21029,21028,21033,21034,21032,21163,21161,21162,21164,21283,21363,21365,21533,21549,21534,21566,21542,21582,21543,21574,21571,21555,21576,21570,21531,21545,21578,21561,21563,21560,21550,21557,21558,21536,21564,21568,21553,21547,21535,21548,22250,22256,22244,22251,22346,22353,22336,22349,22343,22350,22334,22352,22351,22331,22767,22846,22941,22930,22952,22942,22947,22937,22934,22925,22948,22931,22922,22949,23389,23388,23386,23387,23436,23435,23439,23596,23616,23617,23615,23614,23696,23697,23700,23692,24043,24076,24207,24199,24202,24311,24324,24351,24420,24418,24439,24441,24536,24524,24535,24525,24561,24555,24568,24554,25106,25105,25220,25239,25238,25216,25206,25225,25197,25226,25212,25214,25209,25203,25234,25199,25240,25198,25237,25235,25233,25222,25913,25915,25912,26097,26356,26463,26446,26447,26448,26449,26460,26454,26462,26441,26438,26464,26451,26455,27493,27599,27714,27742,27801,27777,27784,27785,27781,27803,27754,27770,27792,27760,27788,27752,27798,27794,27773,27779,27762,27774,27764,27782,27766,27789,27796,27800,27778,28790,28796,28797,28792,29282,29281,29280,29380,29378,29590,29996,29995,30007,30008,30338,30447,30691,31169,31168,31167,31350,31995,32597,32918,32915,32925,32920,32923,32922,32946,33391,33426,33419,33421,35211,35282,35328,35895,35910,35925,35997,36196,36208,36275,36523,36554,36763,36784,36802,36806,36805,36804,24033,37009,37026,37034,37030,37027,37193,37318,37324,38450,38446,38449,38442,38444,20006,20054,20083,20107,20123,20126,20139,20140,20335,20381,20365,20339,20351,20332,20379,20363,20358,20355,20336,20341,20360,20329,20347,20374,20350,20367,20369,20346,20820,20818,20821,20841,20855,20854,20856,20925,20989,21051,21048,21047,21050,21040,21038,21046,21057,21182,21179,21330,21332,21331,21329,21350,21367,21368,21369,21462,21460,21463,21619,21621,21654,21624,21653,21632,21627,21623,21636,21650,21638,21628,21648,21617,21622,21644,21658,21602,21608,21643,21629,21646,22266,22403,22391,22378,22377,22369,22374,22372,22396,22812,22857,22855,22856,22852,22868,22974,22971,22996,22969,22958,22993,22982,22992,22989,22987,22995,22986,22959,22963,22994,22981,23391,23396,23395,23447,23450,23448,23452,23449,23451,23578,23624,23621,23622,23735,23713,23736,23721,23723,23729,23731,24088,24090,24086,24085,24091,24081,24184,24218,24215,24220,24213,24214,24310,24358,24359,24361,24448,24449,24447,24444,24541,24544,24573,24565,24575,24591,24596,24623,24629,24598,24618,24597,24609,24615,24617,24619,24603,25110,25109,25151,25150,25152,25215,25289,25292,25284,25279,25282,25273,25298,25307,25259,25299,25300,25291,25288,25256,25277,25276,25296,25305,25287,25293,25269,25306,25265,25304,25302,25303,25286,25260,25294,25918,26023,26044,26106,26132,26131,26124,26118,26114,26126,26112,26127,26133,26122,26119,26381,26379,26477,26507,26517,26481,26524,26483,26487,26503,26525,26519,26479,26480,26495,26505,26494,26512,26485,26522,26515,26492,26474,26482,27427,27494,27495,27519,27667,27675,27875,27880,27891,27825,27852,27877,27827,27837,27838,27836,27874,27819,27861,27859,27832,27844,27833,27841,27822,27863,27845,27889,27839,27835,27873,27867,27850,27820,27887,27868,27862,27872,28821,28814,28818,28810,28825,29228,29229,29240,29256,29287,29289,29376,29390,29401,29399,29392,29609,29608,29599,29611,29605,30013,30109,30105,30106,30340,30402,30450,30452,30693,30717,31038,31040,31041,31177,31176,31354,31353,31482,31998,32596,32652,32651,32773,32954,32933,32930,32945,32929,32939,32937,32948,32938,32943,33253,33278,33293,33459,33437,33433,33453,33469,33439,33465,33457,33452,33445,33455,33464,33443,33456,33470,33463,34382,34417,21021,34920,36555,36814,36820,36817,37045,37048,37041,37046,37319,37329,38263,38272,38428,38464,38463,38459,38468,38466,38585,38632,38738,38750,20127,20141,20142,20449,20405,20399,20415,20448,20433,20431,20445,20419,20406,20440,20447,20426,20439,20398,20432,20420,20418,20442,20430,20446,20407,20823,20882,20881,20896,21070,21059,21066,21069,21068,21067,21063,21191,21193,21187,21185,21261,21335,21371,21402,21467,21676,21696,21672,21710,21705,21688,21670,21683,21703,21698,21693,21674,21697,21700,21704,21679,21675,21681,21691,21673,21671,21695,22271,22402,22411,22432,22435,22434,22478,22446,22419,22869,22865,22863,22862,22864,23004,23000,23039,23011,23016,23043,23013,23018,23002,23014,23041,23035,23401,23459,23462,23460,23458,23461,23553,23630,23631,23629,23627,23769,23762,24055,24093,24101,24095,24189,24224,24230,24314,24328,24365,24421,24456,24453,24458,24459,24455,24460,24457,24594,24605,24608,24613,24590,24616,24653,24688,24680,24674,24646,24643,24684,24683,24682,24676,25153,25308,25366,25353,25340,25325,25345,25326,25341,25351,25329,25335,25327,25324,25342,25332,25361,25346,25919,25925,26027,26045,26082,26149,26157,26144,26151,26159,26143,26152,26161,26148,26359,26623,26579,26609,26580,26576,26604,26550,26543,26613,26601,26607,26564,26577,26548,26586,26597,26552,26575,26590,26611,26544,26585,26594,26589,26578,27498,27523,27526,27573,27602,27607,27679,27849,27915,27954,27946,27969,27941,27916,27953,27934,27927,27963,27965,27966,27958,27931,27893,27961,27943,27960,27945,27950,27957,27918,27947,28843,28858,28851,28844,28847,28845,28856,28846,28836,29232,29298,29295,29300,29417,29408,29409,29623,29642,29627,29618,29645,29632,29619,29978,29997,30031,30028,30030,30027,30123,30116,30117,30114,30115,30328,30342,30343,30344,30408,30406,30403,30405,30465,30457,30456,30473,30475,30462,30460,30471,30684,30722,30740,30732,30733,31046,31049,31048,31047,31161,31162,31185,31186,31179,31359,31361,31487,31485,31869,32002,32005,32000,32009,32007,32004,32006,32568,32654,32703,32772,32784,32781,32785,32822,32982,32997,32986,32963,32964,32972,32993,32987,32974,32990,32996,32989,33268,33314,33511,33539,33541,33507,33499,33510,33540,33509,33538,33545,33490,33495,33521,33537,33500,33492,33489,33502,33491,33503,33519,33542,34384,34425,34427,34426,34893,34923,35201,35284,35336,35330,35331,35998,36000,36212,36211,36276,36557,36556,36848,36838,36834,36842,36837,36845,36843,36836,36840,37066,37070,37057,37059,37195,37194,37325,38274,38480,38475,38476,38477,38754,38761,38859,38893,38899,38913,39080,39131,39135,39318,39321,20056,20147,20492,20493,20515,20463,20518,20517,20472,20521,20502,20486,20540,20511,20506,20498,20497,20474,20480,20500,20520,20465,20513,20491,20505,20504,20467,20462,20525,20522,20478,20523,20489,20860,20900,20901,20898,20941,20940,20934,20939,21078,21084,21076,21083,21085,21290,21375,21407,21405,21471,21736,21776,21761,21815,21756,21733,21746,21766,21754,21780,21737,21741,21729,21769,21742,21738,21734,21799,21767,21757,21775,22275,22276,22466,22484,22475,22467,22537,22799,22871,22872,22874,23057,23064,23068,23071,23067,23059,23020,23072,23075,23081,23077,23052,23049,23403,23640,23472,23475,23478,23476,23470,23477,23481,23480,23556,23633,23637,23632,23789,23805,23803,23786,23784,23792,23798,23809,23796,24046,24109,24107,24235,24237,24231,24369,24466,24465,24464,24665,24675,24677,24656,24661,24685,24681,24687,24708,24735,24730,24717,24724,24716,24709,24726,25159,25331,25352,25343,25422,25406,25391,25429,25410,25414,25423,25417,25402,25424,25405,25386,25387,25384,25421,25420,25928,25929,26009,26049,26053,26178,26185,26191,26179,26194,26188,26181,26177,26360,26388,26389,26391,26657,26680,26696,26694,26707,26681,26690,26708,26665,26803,26647,26700,26705,26685,26612,26704,26688,26684,26691,26666,26693,26643,26648,26689,27530,27529,27575,27683,27687,27688,27686,27684,27888,28010,28053,28040,28039,28006,28024,28023,27993,28051,28012,28041,28014,27994,28020,28009,28044,28042,28025,28037,28005,28052,28874,28888,28900,28889,28872,28879,29241,29305,29436,29433,29437,29432,29431,29574,29677,29705,29678,29664,29674,29662,30036,30045,30044,30042,30041,30142,30149,30151,30130,30131,30141,30140,30137,30146,30136,30347,30384,30410,30413,30414,30505,30495,30496,30504,30697,30768,30759,30776,30749,30772,30775,30757,30765,30752,30751,30770,31061,31056,31072,31071,31062,31070,31069,31063,31066,31204,31203,31207,31199,31206,31209,31192,31364,31368,31449,31494,31505,31881,32033,32023,32011,32010,32032,32034,32020,32016,32021,32026,32028,32013,32025,32027,32570,32607,32660,32709,32705,32774,32792,32789,32793,32791,32829,32831,33009,33026,33008,33029,33005,33012,33030,33016,33011,33032,33021,33034,33020,33007,33261,33260,33280,33296,33322,33323,33320,33324,33467,33579,33618,33620,33610,33592,33616,33609,33589,33588,33615,33586,33593,33590,33559,33600,33585,33576,33603,34388,34442,34474,34451,34468,34473,34444,34467,34460,34928,34935,34945,34946,34941,34937,35352,35344,35342,35340,35349,35338,35351,35347,35350,35343,35345,35912,35962,35961,36001,36002,36215,36524,36562,36564,36559,36785,36865,36870,36855,36864,36858,36852,36867,36861,36869,36856,37013,37089,37085,37090,37202,37197,37196,37336,37341,37335,37340,37337,38275,38498,38499,38497,38491,38493,38500,38488,38494,38587,39138,39340,39592,39640,39717,39730,39740,20094,20602,20605,20572,20551,20547,20556,20570,20553,20581,20598,20558,20565,20597,20596,20599,20559,20495,20591,20589,20828,20885,20976,21098,21103,21202,21209,21208,21205,21264,21263,21273,21311,21312,21310,21443,26364,21830,21866,21862,21828,21854,21857,21827,21834,21809,21846,21839,21845,21807,21860,21816,21806,21852,21804,21859,21811,21825,21847,22280,22283,22281,22495,22533,22538,22534,22496,22500,22522,22530,22581,22519,22521,22816,22882,23094,23105,23113,23142,23146,23104,23100,23138,23130,23110,23114,23408,23495,23493,23492,23490,23487,23494,23561,23560,23559,23648,23644,23645,23815,23814,23822,23835,23830,23842,23825,23849,23828,23833,23844,23847,23831,24034,24120,24118,24115,24119,24247,24248,24246,24245,24254,24373,24375,24407,24428,24425,24427,24471,24473,24478,24472,24481,24480,24476,24703,24739,24713,24736,24744,24779,24756,24806,24765,24773,24763,24757,24796,24764,24792,24789,24774,24799,24760,24794,24775,25114,25115,25160,25504,25511,25458,25494,25506,25509,25463,25447,25496,25514,25457,25513,25481,25475,25499,25451,25512,25476,25480,25497,25505,25516,25490,25487,25472,25467,25449,25448,25466,25949,25942,25937,25945,25943,21855,25935,25944,25941,25940,26012,26011,26028,26063,26059,26060,26062,26205,26202,26212,26216,26214,26206,26361,21207,26395,26753,26799,26786,26771,26805,26751,26742,26801,26791,26775,26800,26755,26820,26797,26758,26757,26772,26781,26792,26783,26785,26754,27442,27578,27627,27628,27691,28046,28092,28147,28121,28082,28129,28108,28132,28155,28154,28165,28103,28107,28079,28113,28078,28126,28153,28088,28151,28149,28101,28114,28186,28085,28122,28139,28120,28138,28145,28142,28136,28102,28100,28074,28140,28095,28134,28921,28937,28938,28925,28911,29245,29309,29313,29468,29467,29462,29459,29465,29575,29701,29706,29699,29702,29694,29709,29920,29942,29943,29980,29986,30053,30054,30050,30064,30095,30164,30165,30133,30154,30157,30350,30420,30418,30427,30519,30526,30524,30518,30520,30522,30827,30787,30798,31077,31080,31085,31227,31378,31381,31520,31528,31515,31532,31526,31513,31518,31534,31890,31895,31893,32070,32067,32113,32046,32057,32060,32064,32048,32051,32068,32047,32066,32050,32049,32573,32670,32666,32716,32718,32722,32796,32842,32838,33071,33046,33059,33067,33065,33072,33060,33282,33333,33335,33334,33337,33678,33694,33688,33656,33698,33686,33725,33707,33682,33674,33683,33673,33696,33655,33659,33660,33670,33703,34389,24426,34503,34496,34486,34500,34485,34502,34507,34481,34479,34505,34899,34974,34952,34987,34962,34966,34957,34955,35219,35215,35370,35357,35363,35365,35377,35373,35359,35355,35362,35913,35930,36009,36012,36011,36008,36010,36007,36199,36198,36286,36282,36571,36575,36889,36877,36890,36887,36899,36895,36893,36880,36885,36894,36896,36879,36898,36886,36891,36884,37096,37101,37117,37207,37326,37365,37350,37347,37351,37357,37353,38281,38506,38517,38515,38520,38512,38516,38518,38519,38508,38592,38634,38633,31456,31455,38914,38915,39770,40165,40565,40575,40613,40635,20642,20621,20613,20633,20625,20608,20630,20632,20634,26368,20977,21106,21108,21109,21097,21214,21213,21211,21338,21413,21883,21888,21927,21884,21898,21917,21912,21890,21916,21930,21908,21895,21899,21891,21939,21934,21919,21822,21938,21914,21947,21932,21937,21886,21897,21931,21913,22285,22575,22570,22580,22564,22576,22577,22561,22557,22560,22777,22778,22880,23159,23194,23167,23186,23195,23207,23411,23409,23506,23500,23507,23504,23562,23563,23601,23884,23888,23860,23879,24061,24133,24125,24128,24131,24190,24266,24257,24258,24260,24380,24429,24489,24490,24488,24785,24801,24754,24758,24800,24860,24867,24826,24853,24816,24827,24820,24936,24817,24846,24822,24841,24832,24850,25119,25161,25507,25484,25551,25536,25577,25545,25542,25549,25554,25571,25552,25569,25558,25581,25582,25462,25588,25578,25563,25682,25562,25593,25950,25958,25954,25955,26001,26000,26031,26222,26224,26228,26230,26223,26257,26234,26238,26231,26366,26367,26399,26397,26874,26837,26848,26840,26839,26885,26847,26869,26862,26855,26873,26834,26866,26851,26827,26829,26893,26898,26894,26825,26842,26990,26875,27454,27450,27453,27544,27542,27580,27631,27694,27695,27692,28207,28216,28244,28193,28210,28263,28234,28192,28197,28195,28187,28251,28248,28196,28246,28270,28205,28198,28271,28212,28237,28218,28204,28227,28189,28222,28363,28297,28185,28238,28259,28228,28274,28265,28255,28953,28954,28966,28976,28961,28982,29038,28956,29260,29316,29312,29494,29477,29492,29481,29754,29738,29747,29730,29733,29749,29750,29748,29743,29723,29734,29736,29989,29990,30059,30058,30178,30171,30179,30169,30168,30174,30176,30331,30332,30358,30355,30388,30428,30543,30701,30813,30828,30831,31245,31240,31243,31237,31232,31384,31383,31382,31461,31459,31561,31574,31558,31568,31570,31572,31565,31563,31567,31569,31903,31909,32094,32080,32104,32085,32043,32110,32114,32097,32102,32098,32112,32115,21892,32724,32725,32779,32850,32901,33109,33108,33099,33105,33102,33081,33094,33086,33100,33107,33140,33298,33308,33769,33795,33784,33805,33760,33733,33803,33729,33775,33777,33780,33879,33802,33776,33804,33740,33789,33778,33738,33848,33806,33796,33756,33799,33748,33759,34395,34527,34521,34541,34516,34523,34532,34512,34526,34903,35009,35010,34993,35203,35222,35387,35424,35413,35422,35388,35393,35412,35419,35408,35398,35380,35386,35382,35414,35937,35970,36015,36028,36019,36029,36033,36027,36032,36020,36023,36022,36031,36024,36234,36229,36225,36302,36317,36299,36314,36305,36300,36315,36294,36603,36600,36604,36764,36910,36917,36913,36920,36914,36918,37122,37109,37129,37118,37219,37221,37327,37396,37397,37411,37385,37406,37389,37392,37383,37393,38292,38287,38283,38289,38291,38290,38286,38538,38542,38539,38525,38533,38534,38541,38514,38532,38593,38597,38596,38598,38599,38639,38642,38860,38917,38918,38920,39143,39146,39151,39145,39154,39149,39342,39341,40643,40653,40657,20098,20653,20661,20658,20659,20677,20670,20652,20663,20667,20655,20679,21119,21111,21117,21215,21222,21220,21218,21219,21295,21983,21992,21971,21990,21966,21980,21959,21969,21987,21988,21999,21978,21985,21957,21958,21989,21961,22290,22291,22622,22609,22616,22615,22618,22612,22635,22604,22637,22602,22626,22610,22603,22887,23233,23241,23244,23230,23229,23228,23219,23234,23218,23913,23919,24140,24185,24265,24264,24338,24409,24492,24494,24858,24847,24904,24863,24819,24859,24825,24833,24840,24910,24908,24900,24909,24894,24884,24871,24845,24838,24887,25121,25122,25619,25662,25630,25642,25645,25661,25644,25615,25628,25620,25613,25654,25622,25623,25606,25964,26015,26032,26263,26249,26247,26248,26262,26244,26264,26253,26371,27028,26989,26970,26999,26976,26964,26997,26928,27010,26954,26984,26987,26974,26963,27001,27014,26973,26979,26971,27463,27506,27584,27583,27603,27645,28322,28335,28371,28342,28354,28304,28317,28359,28357,28325,28312,28348,28346,28331,28369,28310,28316,28356,28372,28330,28327,28340,29006,29017,29033,29028,29001,29031,29020,29036,29030,29004,29029,29022,28998,29032,29014,29242,29266,29495,29509,29503,29502,29807,29786,29781,29791,29790,29761,29759,29785,29787,29788,30070,30072,30208,30192,30209,30194,30193,30202,30207,30196,30195,30430,30431,30555,30571,30566,30558,30563,30585,30570,30572,30556,30565,30568,30562,30702,30862,30896,30871,30872,30860,30857,30844,30865,30867,30847,31098,31103,31105,33836,31165,31260,31258,31264,31252,31263,31262,31391,31392,31607,31680,31584,31598,31591,31921,31923,31925,32147,32121,32145,32129,32143,32091,32622,32617,32618,32626,32681,32680,32676,32854,32856,32902,32900,33137,33136,33144,33125,33134,33139,33131,33145,33146,33126,33285,33351,33922,33911,33853,33841,33909,33894,33899,33865,33900,33883,33852,33845,33889,33891,33897,33901,33862,34398,34396,34399,34553,34579,34568,34567,34560,34558,34555,34562,34563,34566,34570,34905,35039,35028,35033,35036,35032,35037,35041,35018,35029,35026,35228,35299,35435,35442,35443,35430,35433,35440,35463,35452,35427,35488,35441,35461,35437,35426,35438,35436,35449,35451,35390,35432,35938,35978,35977,36042,36039,36040,36036,36018,36035,36034,36037,36321,36319,36328,36335,36339,36346,36330,36324,36326,36530,36611,36617,36606,36618,36767,36786,36939,36938,36947,36930,36948,36924,36949,36944,36935,36943,36942,36941,36945,36926,36929,37138,37143,37228,37226,37225,37321,37431,37463,37432,37437,37440,37438,37467,37451,37476,37457,37428,37449,37453,37445,37433,37439,37466,38296,38552,38548,38549,38605,38603,38601,38602,38647,38651,38649,38646,38742,38772,38774,38928,38929,38931,38922,38930,38924,39164,39156,39165,39166,39347,39345,39348,39649,40169,40578,40718,40723,40736,20711,20718,20709,20694,20717,20698,20693,20687,20689,20721,20686,20713,20834,20979,21123,21122,21297,21421,22014,22016,22043,22039,22013,22036,22022,22025,22029,22030,22007,22038,22047,22024,22032,22006,22296,22294,22645,22654,22659,22675,22666,22649,22661,22653,22781,22821,22818,22820,22890,22889,23265,23270,23273,23255,23254,23256,23267,23413,23518,23527,23521,23525,23526,23528,23522,23524,23519,23565,23650,23940,23943,24155,24163,24149,24151,24148,24275,24278,24330,24390,24432,24505,24903,24895,24907,24951,24930,24931,24927,24922,24920,24949,25130,25735,25688,25684,25764,25720,25695,25722,25681,25703,25652,25709,25723,25970,26017,26071,26070,26274,26280,26269,27036,27048,27029,27073,27054,27091,27083,27035,27063,27067,27051,27060,27088,27085,27053,27084,27046,27075,27043,27465,27468,27699,28467,28436,28414,28435,28404,28457,28478,28448,28460,28431,28418,28450,28415,28399,28422,28465,28472,28466,28451,28437,28459,28463,28552,28458,28396,28417,28402,28364,28407,29076,29081,29053,29066,29060,29074,29246,29330,29334,29508,29520,29796,29795,29802,29808,29805,29956,30097,30247,30221,30219,30217,30227,30433,30435,30596,30589,30591,30561,30913,30879,30887,30899,30889,30883,31118,31119,31117,31278,31281,31402,31401,31469,31471,31649,31637,31627,31605,31639,31645,31636,31631,31672,31623,31620,31929,31933,31934,32187,32176,32156,32189,32190,32160,32202,32180,32178,32177,32186,32162,32191,32181,32184,32173,32210,32199,32172,32624,32736,32737,32735,32862,32858,32903,33104,33152,33167,33160,33162,33151,33154,33255,33274,33287,33300,33310,33355,33993,33983,33990,33988,33945,33950,33970,33948,33995,33976,33984,34003,33936,33980,34001,33994,34623,34588,34619,34594,34597,34612,34584,34645,34615,34601,35059,35074,35060,35065,35064,35069,35048,35098,35055,35494,35468,35486,35491,35469,35489,35475,35492,35498,35493,35496,35480,35473,35482,35495,35946,35981,35980,36051,36049,36050,36203,36249,36245,36348,36628,36626,36629,36627,36771,36960,36952,36956,36963,36953,36958,36962,36957,36955,37145,37144,37150,37237,37240,37239,37236,37496,37504,37509,37528,37526,37499,37523,37532,37544,37500,37521,38305,38312,38313,38307,38309,38308,38553,38556,38555,38604,38610,38656,38780,38789,38902,38935,38936,39087,39089,39171,39173,39180,39177,39361,39599,39600,39654,39745,39746,40180,40182,40179,40636,40763,40778,20740,20736,20731,20725,20729,20738,20744,20745,20741,20956,21127,21128,21129,21133,21130,21232,21426,22062,22075,22073,22066,22079,22068,22057,22099,22094,22103,22132,22070,22063,22064,22656,22687,22686,22707,22684,22702,22697,22694,22893,23305,23291,23307,23285,23308,23304,23534,23532,23529,23531,23652,23653,23965,23956,24162,24159,24161,24290,24282,24287,24285,24291,24288,24392,24433,24503,24501,24950,24935,24942,24925,24917,24962,24956,24944,24939,24958,24999,24976,25003,24974,25004,24986,24996,24980,25006,25134,25705,25711,25721,25758,25778,25736,25744,25776,25765,25747,25749,25769,25746,25774,25773,25771,25754,25772,25753,25762,25779,25973,25975,25976,26286,26283,26292,26289,27171,27167,27112,27137,27166,27161,27133,27169,27155,27146,27123,27138,27141,27117,27153,27472,27470,27556,27589,27590,28479,28540,28548,28497,28518,28500,28550,28525,28507,28536,28526,28558,28538,28528,28516,28567,28504,28373,28527,28512,28511,29087,29100,29105,29096,29270,29339,29518,29527,29801,29835,29827,29822,29824,30079,30240,30249,30239,30244,30246,30241,30242,30362,30394,30436,30606,30599,30604,30609,30603,30923,30917,30906,30922,30910,30933,30908,30928,31295,31292,31296,31293,31287,31291,31407,31406,31661,31665,31684,31668,31686,31687,31681,31648,31692,31946,32224,32244,32239,32251,32216,32236,32221,32232,32227,32218,32222,32233,32158,32217,32242,32249,32629,32631,32687,32745,32806,33179,33180,33181,33184,33178,33176,34071,34109,34074,34030,34092,34093,34067,34065,34083,34081,34068,34028,34085,34047,34054,34690,34676,34678,34656,34662,34680,34664,34649,34647,34636,34643,34907,34909,35088,35079,35090,35091,35093,35082,35516,35538,35527,35524,35477,35531,35576,35506,35529,35522,35519,35504,35542,35533,35510,35513,35547,35916,35918,35948,36064,36062,36070,36068,36076,36077,36066,36067,36060,36074,36065,36205,36255,36259,36395,36368,36381,36386,36367,36393,36383,36385,36382,36538,36637,36635,36639,36649,36646,36650,36636,36638,36645,36969,36974,36968,36973,36983,37168,37165,37159,37169,37255,37257,37259,37251,37573,37563,37559,37610,37548,37604,37569,37555,37564,37586,37575,37616,37554,38317,38321,38660,38662,38663,38665,38752,38797,38795,38799,38945,38955,38940,39091,39178,39187,39186,39192,39389,39376,39391,39387,39377,39381,39378,39385,39607,39662,39663,39719,39749,39748,39799,39791,40198,40201,40195,40617,40638,40654,22696,40786,20754,20760,20756,20752,20757,20864,20906,20957,21137,21139,21235,22105,22123,22137,22121,22116,22136,22122,22120,22117,22129,22127,22124,22114,22134,22721,22718,22727,22725,22894,23325,23348,23416,23536,23566,24394,25010,24977,25001,24970,25037,25014,25022,25034,25032,25136,25797,25793,25803,25787,25788,25818,25796,25799,25794,25805,25791,25810,25812,25790,25972,26310,26313,26297,26308,26311,26296,27197,27192,27194,27225,27243,27224,27193,27204,27234,27233,27211,27207,27189,27231,27208,27481,27511,27653,28610,28593,28577,28611,28580,28609,28583,28595,28608,28601,28598,28582,28576,28596,29118,29129,29136,29138,29128,29141,29113,29134,29145,29148,29123,29124,29544,29852,29859,29848,29855,29854,29922,29964,29965,30260,30264,30266,30439,30437,30624,30622,30623,30629,30952,30938,30956,30951,31142,31309,31310,31302,31308,31307,31418,31705,31761,31689,31716,31707,31713,31721,31718,31957,31958,32266,32273,32264,32283,32291,32286,32285,32265,32272,32633,32690,32752,32753,32750,32808,33203,33193,33192,33275,33288,33368,33369,34122,34137,34120,34152,34153,34115,34121,34157,34154,34142,34691,34719,34718,34722,34701,34913,35114,35122,35109,35115,35105,35242,35238,35558,35578,35563,35569,35584,35548,35559,35566,35582,35585,35586,35575,35565,35571,35574,35580,35947,35949,35987,36084,36420,36401,36404,36418,36409,36405,36667,36655,36664,36659,36776,36774,36981,36980,36984,36978,36988,36986,37172,37266,37664,37686,37624,37683,37679,37666,37628,37675,37636,37658,37648,37670,37665,37653,37678,37657,38331,38567,38568,38570,38613,38670,38673,38678,38669,38675,38671,38747,38748,38758,38808,38960,38968,38971,38967,38957,38969,38948,39184,39208,39198,39195,39201,39194,39405,39394,39409,39608,39612,39675,39661,39720,39825,40213,40227,40230,40232,40210,40219,40664,40660,40845,40860,20778,20767,20769,20786,21237,22158,22144,22160,22149,22151,22159,22741,22739,22737,22734,23344,23338,23332,23418,23607,23656,23996,23994,23997,23992,24171,24396,24509,25033,25026,25031,25062,25035,25138,25140,25806,25802,25816,25824,25840,25830,25836,25841,25826,25837,25986,25987,26329,26326,27264,27284,27268,27298,27292,27355,27299,27262,27287,27280,27296,27484,27566,27610,27656,28632,28657,28639,28640,28635,28644,28651,28655,28544,28652,28641,28649,28629,28654,28656,29159,29151,29166,29158,29157,29165,29164,29172,29152,29237,29254,29552,29554,29865,29872,29862,29864,30278,30274,30284,30442,30643,30634,30640,30636,30631,30637,30703,30967,30970,30964,30959,30977,31143,31146,31319,31423,31751,31757,31742,31735,31756,31712,31968,31964,31966,31970,31967,31961,31965,32302,32318,32326,32311,32306,32323,32299,32317,32305,32325,32321,32308,32313,32328,32309,32319,32303,32580,32755,32764,32881,32882,32880,32879,32883,33222,33219,33210,33218,33216,33215,33213,33225,33214,33256,33289,33393,34218,34180,34174,34204,34193,34196,34223,34203,34183,34216,34186,34407,34752,34769,34739,34770,34758,34731,34747,34746,34760,34763,35131,35126,35140,35128,35133,35244,35598,35607,35609,35611,35594,35616,35613,35588,35600,35905,35903,35955,36090,36093,36092,36088,36091,36264,36425,36427,36424,36426,36676,36670,36674,36677,36671,36991,36989,36996,36993,36994,36992,37177,37283,37278,37276,37709,37762,37672,37749,37706,37733,37707,37656,37758,37740,37723,37744,37722,37716,38346,38347,38348,38344,38342,38577,38584,38614,38684,38686,38816,38867,38982,39094,39221,39425,39423,39854,39851,39850,39853,40251,40255,40587,40655,40670,40668,40669,40667,40766,40779,21474,22165,22190,22745,22744,23352,24413,25059,25139,25844,25842,25854,25862,25850,25851,25847,26039,26332,26406,27315,27308,27331,27323,27320,27330,27310,27311,27487,27512,27567,28681,28683,28670,28678,28666,28689,28687,29179,29180,29182,29176,29559,29557,29863,29887,29973,30294,30296,30290,30653,30655,30651,30652,30990,31150,31329,31330,31328,31428,31429,31787,31783,31786,31774,31779,31777,31975,32340,32341,32350,32346,32353,32338,32345,32584,32761,32763,32887,32886,33229,33231,33290,34255,34217,34253,34256,34249,34224,34234,34233,34214,34799,34796,34802,34784,35206,35250,35316,35624,35641,35628,35627,35920,36101,36441,36451,36454,36452,36447,36437,36544,36681,36685,36999,36995,37000,37291,37292,37328,37780,37770,37782,37794,37811,37806,37804,37808,37784,37786,37783,38356,38358,38352,38357,38626,38620,38617,38619,38622,38692,38819,38822,38829,38905,38989,38991,38988,38990,38995,39098,39230,39231,39229,39214,39333,39438,39617,39683,39686,39759,39758,39757,39882,39881,39933,39880,39872,40273,40285,40288,40672,40725,40748,20787,22181,22750,22751,22754,23541,40848,24300,25074,25079,25078,25077,25856,25871,26336,26333,27365,27357,27354,27347,28699,28703,28712,28698,28701,28693,28696,29190,29197,29272,29346,29560,29562,29885,29898,29923,30087,30086,30303,30305,30663,31001,31153,31339,31337,31806,31807,31800,31805,31799,31808,32363,32365,32377,32361,32362,32645,32371,32694,32697,32696,33240,34281,34269,34282,34261,34276,34277,34295,34811,34821,34829,34809,34814,35168,35167,35158,35166,35649,35676,35672,35657,35674,35662,35663,35654,35673,36104,36106,36476,36466,36487,36470,36460,36474,36468,36692,36686,36781,37002,37003,37297,37294,37857,37841,37855,37827,37832,37852,37853,37846,37858,37837,37848,37860,37847,37864,38364,38580,38627,38698,38695,38753,38876,38907,39006,39000,39003,39100,39237,39241,39446,39449,39693,39912,39911,39894,39899,40329,40289,40306,40298,40300,40594,40599,40595,40628,21240,22184,22199,22198,22196,22204,22756,23360,23363,23421,23542,24009,25080,25082,25880,25876,25881,26342,26407,27372,28734,28720,28722,29200,29563,29903,30306,30309,31014,31018,31020,31019,31431,31478,31820,31811,31821,31983,31984,36782,32381,32380,32386,32588,32768,33242,33382,34299,34297,34321,34298,34310,34315,34311,34314,34836,34837,35172,35258,35320,35696,35692,35686,35695,35679,35691,36111,36109,36489,36481,36485,36482,37300,37323,37912,37891,37885,38369,38704,39108,39250,39249,39336,39467,39472,39479,39477,39955,39949,40569,40629,40680,40751,40799,40803,40801,20791,20792,22209,22208,22210,22804,23660,24013,25084,25086,25885,25884,26005,26345,27387,27396,27386,27570,28748,29211,29351,29910,29908,30313,30675,31824,32399,32396,32700,34327,34349,34330,34851,34850,34849,34847,35178,35180,35261,35700,35703,35709,36115,36490,36493,36491,36703,36783,37306,37934,37939,37941,37946,37944,37938,37931,38370,38712,38713,38706,38911,39015,39013,39255,39493,39491,39488,39486,39631,39764,39761,39981,39973,40367,40372,40386,40376,40605,40687,40729,40796,40806,40807,20796,20795,22216,22218,22217,23423,24020,24018,24398,25087,25892,27402,27489,28753,28760,29568,29924,30090,30318,30316,31155,31840,31839,32894,32893,33247,35186,35183,35324,35712,36118,36119,36497,36499,36705,37192,37956,37969,37970,38717,38718,38851,38849,39019,39253,39509,39501,39634,39706,40009,39985,39998,39995,40403,40407,40756,40812,40810,40852,22220,24022,25088,25891,25899,25898,26348,27408,29914,31434,31844,31843,31845,32403,32406,32404,33250,34360,34367,34865,35722,37008,37007,37987,37984,37988,38760,39023,39260,39514,39515,39511,39635,39636,39633,40020,40023,40022,40421,40607,40692,22225,22761,25900,28766,30321,30322,30679,32592,32648,34870,34873,34914,35731,35730,35734,33399,36123,37312,37994,38722,38728,38724,38854,39024,39519,39714,39768,40031,40441,40442,40572,40573,40711,40823,40818,24307,27414,28771,31852,31854,34875,35264,36513,37313,38002,38000,39025,39262,39638,39715,40652,28772,30682,35738,38007,38857,39522,39525,32412,35740,36522,37317,38013,38014,38012,40055,40056,40695,35924,38015,40474,29224,39530,39729,40475,40478,31858,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,20022,20031,20101,20128,20866,20886,20907,21241,21304,21353,21430,22794,23424,24027,12083,24191,24308,24400,24417,25908,26080,30098,30326,36789,38582,168,710,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,65339,65341,10045,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8679,8632,8633,12751,131276,20058,131210,20994,17553,40880,20872,40881,161287,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65506,65508,65287,65282,12849,8470,8481,12443,12444,11904,11908,11910,11911,11912,11914,11916,11917,11925,11932,11933,11941,11943,11946,11948,11950,11958,11964,11966,11974,11978,11980,11981,11983,11990,11991,11998,12003,null,null,null,643,592,603,596,629,339,248,331,650,618,20034,20060,20981,21274,21378,19975,19980,20039,20109,22231,64012,23662,24435,19983,20871,19982,20014,20115,20162,20169,20168,20888,21244,21356,21433,22304,22787,22828,23568,24063,26081,27571,27596,27668,29247,20017,20028,20200,20188,20201,20193,20189,20186,21004,21276,21324,22306,22307,22807,22831,23425,23428,23570,23611,23668,23667,24068,24192,24194,24521,25097,25168,27669,27702,27715,27711,27707,29358,29360,29578,31160,32906,38430,20238,20248,20268,20213,20244,20209,20224,20215,20232,20253,20226,20229,20258,20243,20228,20212,20242,20913,21011,21001,21008,21158,21282,21279,21325,21386,21511,22241,22239,22318,22314,22324,22844,22912,22908,22917,22907,22910,22903,22911,23382,23573,23589,23676,23674,23675,23678,24031,24181,24196,24322,24346,24436,24533,24532,24527,25180,25182,25188,25185,25190,25186,25177,25184,25178,25189,26095,26094,26430,26425,26424,26427,26426,26431,26428,26419,27672,27718,27730,27740,27727,27722,27732,27723,27724,28785,29278,29364,29365,29582,29994,30335,31349,32593,33400,33404,33408,33405,33407,34381,35198,37017,37015,37016,37019,37012,38434,38436,38432,38435,20310,20283,20322,20297,20307,20324,20286,20327,20306,20319,20289,20312,20269,20275,20287,20321,20879,20921,21020,21022,21025,21165,21166,21257,21347,21362,21390,21391,21552,21559,21546,21588,21573,21529,21532,21541,21528,21565,21583,21569,21544,21540,21575,22254,22247,22245,22337,22341,22348,22345,22347,22354,22790,22848,22950,22936,22944,22935,22926,22946,22928,22927,22951,22945,23438,23442,23592,23594,23693,23695,23688,23691,23689,23698,23690,23686,23699,23701,24032,24074,24078,24203,24201,24204,24200,24205,24325,24349,24440,24438,24530,24529,24528,24557,24552,24558,24563,24545,24548,24547,24570,24559,24567,24571,24576,24564,25146,25219,25228,25230,25231,25236,25223,25201,25211,25210,25200,25217,25224,25207,25213,25202,25204,25911,26096,26100,26099,26098,26101,26437,26439,26457,26453,26444,26440,26461,26445,26458,26443,27600,27673,27674,27768,27751,27755,27780,27787,27791,27761,27759,27753,27802,27757,27783,27797,27804,27750,27763,27749,27771,27790,28788,28794,29283,29375,29373,29379,29382,29377,29370,29381,29589,29591,29587,29588,29586,30010,30009,30100,30101,30337,31037,32820,32917,32921,32912,32914,32924,33424,33423,33413,33422,33425,33427,33418,33411,33412,35960,36809,36799,37023,37025,37029,37022,37031,37024,38448,38440,38447,38445,20019,20376,20348,20357,20349,20352,20359,20342,20340,20361,20356,20343,20300,20375,20330,20378,20345,20353,20344,20368,20380,20372,20382,20370,20354,20373,20331,20334,20894,20924,20926,21045,21042,21043,21062,21041,21180,21258,21259,21308,21394,21396,21639,21631,21633,21649,21634,21640,21611,21626,21630,21605,21612,21620,21606,21645,21615,21601,21600,21656,21603,21607,21604,22263,22265,22383,22386,22381,22379,22385,22384,22390,22400,22389,22395,22387,22388,22370,22376,22397,22796,22853,22965,22970,22991,22990,22962,22988,22977,22966,22972,22979,22998,22961,22973,22976,22984,22964,22983,23394,23397,23443,23445,23620,23623,23726,23716,23712,23733,23727,23720,23724,23711,23715,23725,23714,23722,23719,23709,23717,23734,23728,23718,24087,24084,24089,24360,24354,24355,24356,24404,24450,24446,24445,24542,24549,24621,24614,24601,24626,24587,24628,24586,24599,24627,24602,24606,24620,24610,24589,24592,24622,24595,24593,24588,24585,24604,25108,25149,25261,25268,25297,25278,25258,25270,25290,25262,25267,25263,25275,25257,25264,25272,25917,26024,26043,26121,26108,26116,26130,26120,26107,26115,26123,26125,26117,26109,26129,26128,26358,26378,26501,26476,26510,26514,26486,26491,26520,26502,26500,26484,26509,26508,26490,26527,26513,26521,26499,26493,26497,26488,26489,26516,27429,27520,27518,27614,27677,27795,27884,27883,27886,27865,27830,27860,27821,27879,27831,27856,27842,27834,27843,27846,27885,27890,27858,27869,27828,27786,27805,27776,27870,27840,27952,27853,27847,27824,27897,27855,27881,27857,28820,28824,28805,28819,28806,28804,28817,28822,28802,28826,28803,29290,29398,29387,29400,29385,29404,29394,29396,29402,29388,29393,29604,29601,29613,29606,29602,29600,29612,29597,29917,29928,30015,30016,30014,30092,30104,30383,30451,30449,30448,30453,30712,30716,30713,30715,30714,30711,31042,31039,31173,31352,31355,31483,31861,31997,32821,32911,32942,32931,32952,32949,32941,33312,33440,33472,33451,33434,33432,33435,33461,33447,33454,33468,33438,33466,33460,33448,33441,33449,33474,33444,33475,33462,33442,34416,34415,34413,34414,35926,36818,36811,36819,36813,36822,36821,36823,37042,37044,37039,37043,37040,38457,38461,38460,38458,38467,20429,20421,20435,20402,20425,20427,20417,20436,20444,20441,20411,20403,20443,20423,20438,20410,20416,20409,20460,21060,21065,21184,21186,21309,21372,21399,21398,21401,21400,21690,21665,21677,21669,21711,21699,33549,21687,21678,21718,21686,21701,21702,21664,21616,21692,21666,21694,21618,21726,21680,22453,22430,22431,22436,22412,22423,22429,22427,22420,22424,22415,22425,22437,22426,22421,22772,22797,22867,23009,23006,23022,23040,23025,23005,23034,23037,23036,23030,23012,23026,23031,23003,23017,23027,23029,23008,23038,23028,23021,23464,23628,23760,23768,23756,23767,23755,23771,23774,23770,23753,23751,23754,23766,23763,23764,23759,23752,23750,23758,23775,23800,24057,24097,24098,24099,24096,24100,24240,24228,24226,24219,24227,24229,24327,24366,24406,24454,24631,24633,24660,24690,24670,24645,24659,24647,24649,24667,24652,24640,24642,24671,24612,24644,24664,24678,24686,25154,25155,25295,25357,25355,25333,25358,25347,25323,25337,25359,25356,25336,25334,25344,25363,25364,25338,25365,25339,25328,25921,25923,26026,26047,26166,26145,26162,26165,26140,26150,26146,26163,26155,26170,26141,26164,26169,26158,26383,26384,26561,26610,26568,26554,26588,26555,26616,26584,26560,26551,26565,26603,26596,26591,26549,26573,26547,26615,26614,26606,26595,26562,26553,26574,26599,26608,26546,26620,26566,26605,26572,26542,26598,26587,26618,26569,26570,26563,26602,26571,27432,27522,27524,27574,27606,27608,27616,27680,27681,27944,27956,27949,27935,27964,27967,27922,27914,27866,27955,27908,27929,27962,27930,27921,27904,27933,27970,27905,27928,27959,27907,27919,27968,27911,27936,27948,27912,27938,27913,27920,28855,28831,28862,28849,28848,28833,28852,28853,28841,29249,29257,29258,29292,29296,29299,29294,29386,29412,29416,29419,29407,29418,29414,29411,29573,29644,29634,29640,29637,29625,29622,29621,29620,29675,29631,29639,29630,29635,29638,29624,29643,29932,29934,29998,30023,30024,30119,30122,30329,30404,30472,30467,30468,30469,30474,30455,30459,30458,30695,30696,30726,30737,30738,30725,30736,30735,30734,30729,30723,30739,31050,31052,31051,31045,31044,31189,31181,31183,31190,31182,31360,31358,31441,31488,31489,31866,31864,31865,31871,31872,31873,32003,32008,32001,32600,32657,32653,32702,32775,32782,32783,32788,32823,32984,32967,32992,32977,32968,32962,32976,32965,32995,32985,32988,32970,32981,32969,32975,32983,32998,32973,33279,33313,33428,33497,33534,33529,33543,33512,33536,33493,33594,33515,33494,33524,33516,33505,33522,33525,33548,33531,33526,33520,33514,33508,33504,33530,33523,33517,34423,34420,34428,34419,34881,34894,34919,34922,34921,35283,35332,35335,36210,36835,36833,36846,36832,37105,37053,37055,37077,37061,37054,37063,37067,37064,37332,37331,38484,38479,38481,38483,38474,38478,20510,20485,20487,20499,20514,20528,20507,20469,20468,20531,20535,20524,20470,20471,20503,20508,20512,20519,20533,20527,20529,20494,20826,20884,20883,20938,20932,20933,20936,20942,21089,21082,21074,21086,21087,21077,21090,21197,21262,21406,21798,21730,21783,21778,21735,21747,21732,21786,21759,21764,21768,21739,21777,21765,21745,21770,21755,21751,21752,21728,21774,21763,21771,22273,22274,22476,22578,22485,22482,22458,22470,22461,22460,22456,22454,22463,22471,22480,22457,22465,22798,22858,23065,23062,23085,23086,23061,23055,23063,23050,23070,23091,23404,23463,23469,23468,23555,23638,23636,23788,23807,23790,23793,23799,23808,23801,24105,24104,24232,24238,24234,24236,24371,24368,24423,24669,24666,24679,24641,24738,24712,24704,24722,24705,24733,24707,24725,24731,24727,24711,24732,24718,25113,25158,25330,25360,25430,25388,25412,25413,25398,25411,25572,25401,25419,25418,25404,25385,25409,25396,25432,25428,25433,25389,25415,25395,25434,25425,25400,25431,25408,25416,25930,25926,26054,26051,26052,26050,26186,26207,26183,26193,26386,26387,26655,26650,26697,26674,26675,26683,26699,26703,26646,26673,26652,26677,26667,26669,26671,26702,26692,26676,26653,26642,26644,26662,26664,26670,26701,26682,26661,26656,27436,27439,27437,27441,27444,27501,32898,27528,27622,27620,27624,27619,27618,27623,27685,28026,28003,28004,28022,27917,28001,28050,27992,28002,28013,28015,28049,28045,28143,28031,28038,27998,28007,28000,28055,28016,28028,27999,28034,28056,27951,28008,28043,28030,28032,28036,27926,28035,28027,28029,28021,28048,28892,28883,28881,28893,28875,32569,28898,28887,28882,28894,28896,28884,28877,28869,28870,28871,28890,28878,28897,29250,29304,29303,29302,29440,29434,29428,29438,29430,29427,29435,29441,29651,29657,29669,29654,29628,29671,29667,29673,29660,29650,29659,29652,29661,29658,29655,29656,29672,29918,29919,29940,29941,29985,30043,30047,30128,30145,30139,30148,30144,30143,30134,30138,30346,30409,30493,30491,30480,30483,30482,30499,30481,30485,30489,30490,30498,30503,30755,30764,30754,30773,30767,30760,30766,30763,30753,30761,30771,30762,30769,31060,31067,31055,31068,31059,31058,31057,31211,31212,31200,31214,31213,31210,31196,31198,31197,31366,31369,31365,31371,31372,31370,31367,31448,31504,31492,31507,31493,31503,31496,31498,31502,31497,31506,31876,31889,31882,31884,31880,31885,31877,32030,32029,32017,32014,32024,32022,32019,32031,32018,32015,32012,32604,32609,32606,32608,32605,32603,32662,32658,32707,32706,32704,32790,32830,32825,33018,33010,33017,33013,33025,33019,33024,33281,33327,33317,33587,33581,33604,33561,33617,33573,33622,33599,33601,33574,33564,33570,33602,33614,33563,33578,33544,33596,33613,33558,33572,33568,33591,33583,33577,33607,33605,33612,33619,33566,33580,33611,33575,33608,34387,34386,34466,34472,34454,34445,34449,34462,34439,34455,34438,34443,34458,34437,34469,34457,34465,34471,34453,34456,34446,34461,34448,34452,34883,34884,34925,34933,34934,34930,34944,34929,34943,34927,34947,34942,34932,34940,35346,35911,35927,35963,36004,36003,36214,36216,36277,36279,36278,36561,36563,36862,36853,36866,36863,36859,36868,36860,36854,37078,37088,37081,37082,37091,37087,37093,37080,37083,37079,37084,37092,37200,37198,37199,37333,37346,37338,38492,38495,38588,39139,39647,39727,20095,20592,20586,20577,20574,20576,20563,20555,20573,20594,20552,20557,20545,20571,20554,20578,20501,20549,20575,20585,20587,20579,20580,20550,20544,20590,20595,20567,20561,20944,21099,21101,21100,21102,21206,21203,21293,21404,21877,21878,21820,21837,21840,21812,21802,21841,21858,21814,21813,21808,21842,21829,21772,21810,21861,21838,21817,21832,21805,21819,21824,21835,22282,22279,22523,22548,22498,22518,22492,22516,22528,22509,22525,22536,22520,22539,22515,22479,22535,22510,22499,22514,22501,22508,22497,22542,22524,22544,22503,22529,22540,22513,22505,22512,22541,22532,22876,23136,23128,23125,23143,23134,23096,23093,23149,23120,23135,23141,23148,23123,23140,23127,23107,23133,23122,23108,23131,23112,23182,23102,23117,23097,23116,23152,23145,23111,23121,23126,23106,23132,23410,23406,23489,23488,23641,23838,23819,23837,23834,23840,23820,23848,23821,23846,23845,23823,23856,23826,23843,23839,23854,24126,24116,24241,24244,24249,24242,24243,24374,24376,24475,24470,24479,24714,24720,24710,24766,24752,24762,24787,24788,24783,24804,24793,24797,24776,24753,24795,24759,24778,24767,24771,24781,24768,25394,25445,25482,25474,25469,25533,25502,25517,25501,25495,25515,25486,25455,25479,25488,25454,25519,25461,25500,25453,25518,25468,25508,25403,25503,25464,25477,25473,25489,25485,25456,25939,26061,26213,26209,26203,26201,26204,26210,26392,26745,26759,26768,26780,26733,26734,26798,26795,26966,26735,26787,26796,26793,26741,26740,26802,26767,26743,26770,26748,26731,26738,26794,26752,26737,26750,26779,26774,26763,26784,26761,26788,26744,26747,26769,26764,26762,26749,27446,27443,27447,27448,27537,27535,27533,27534,27532,27690,28096,28075,28084,28083,28276,28076,28137,28130,28087,28150,28116,28160,28104,28128,28127,28118,28094,28133,28124,28125,28123,28148,28106,28093,28141,28144,28090,28117,28098,28111,28105,28112,28146,28115,28157,28119,28109,28131,28091,28922,28941,28919,28951,28916,28940,28912,28932,28915,28944,28924,28927,28934,28947,28928,28920,28918,28939,28930,28942,29310,29307,29308,29311,29469,29463,29447,29457,29464,29450,29448,29439,29455,29470,29576,29686,29688,29685,29700,29697,29693,29703,29696,29690,29692,29695,29708,29707,29684,29704,30052,30051,30158,30162,30159,30155,30156,30161,30160,30351,30345,30419,30521,30511,30509,30513,30514,30516,30515,30525,30501,30523,30517,30792,30802,30793,30797,30794,30796,30758,30789,30800,31076,31079,31081,31082,31075,31083,31073,31163,31226,31224,31222,31223,31375,31380,31376,31541,31559,31540,31525,31536,31522,31524,31539,31512,31530,31517,31537,31531,31533,31535,31538,31544,31514,31523,31892,31896,31894,31907,32053,32061,32056,32054,32058,32069,32044,32041,32065,32071,32062,32063,32074,32059,32040,32611,32661,32668,32669,32667,32714,32715,32717,32720,32721,32711,32719,32713,32799,32798,32795,32839,32835,32840,33048,33061,33049,33051,33069,33055,33068,33054,33057,33045,33063,33053,33058,33297,33336,33331,33338,33332,33330,33396,33680,33699,33704,33677,33658,33651,33700,33652,33679,33665,33685,33689,33653,33684,33705,33661,33667,33676,33693,33691,33706,33675,33662,33701,33711,33672,33687,33712,33663,33702,33671,33710,33654,33690,34393,34390,34495,34487,34498,34497,34501,34490,34480,34504,34489,34483,34488,34508,34484,34491,34492,34499,34493,34494,34898,34953,34965,34984,34978,34986,34970,34961,34977,34975,34968,34983,34969,34971,34967,34980,34988,34956,34963,34958,35202,35286,35289,35285,35376,35367,35372,35358,35897,35899,35932,35933,35965,36005,36221,36219,36217,36284,36290,36281,36287,36289,36568,36574,36573,36572,36567,36576,36577,36900,36875,36881,36892,36876,36897,37103,37098,37104,37108,37106,37107,37076,37099,37100,37097,37206,37208,37210,37203,37205,37356,37364,37361,37363,37368,37348,37369,37354,37355,37367,37352,37358,38266,38278,38280,38524,38509,38507,38513,38511,38591,38762,38916,39141,39319,20635,20629,20628,20638,20619,20643,20611,20620,20622,20637,20584,20636,20626,20610,20615,20831,20948,21266,21265,21412,21415,21905,21928,21925,21933,21879,22085,21922,21907,21896,21903,21941,21889,21923,21906,21924,21885,21900,21926,21887,21909,21921,21902,22284,22569,22583,22553,22558,22567,22563,22568,22517,22600,22565,22556,22555,22579,22591,22582,22574,22585,22584,22573,22572,22587,22881,23215,23188,23199,23162,23202,23198,23160,23206,23164,23205,23212,23189,23214,23095,23172,23178,23191,23171,23179,23209,23163,23165,23180,23196,23183,23187,23197,23530,23501,23499,23508,23505,23498,23502,23564,23600,23863,23875,23915,23873,23883,23871,23861,23889,23886,23893,23859,23866,23890,23869,23857,23897,23874,23865,23881,23864,23868,23858,23862,23872,23877,24132,24129,24408,24486,24485,24491,24777,24761,24780,24802,24782,24772,24852,24818,24842,24854,24837,24821,24851,24824,24828,24830,24769,24835,24856,24861,24848,24831,24836,24843,25162,25492,25521,25520,25550,25573,25576,25583,25539,25757,25587,25546,25568,25590,25557,25586,25589,25697,25567,25534,25565,25564,25540,25560,25555,25538,25543,25548,25547,25544,25584,25559,25561,25906,25959,25962,25956,25948,25960,25957,25996,26013,26014,26030,26064,26066,26236,26220,26235,26240,26225,26233,26218,26226,26369,26892,26835,26884,26844,26922,26860,26858,26865,26895,26838,26871,26859,26852,26870,26899,26896,26867,26849,26887,26828,26888,26992,26804,26897,26863,26822,26900,26872,26832,26877,26876,26856,26891,26890,26903,26830,26824,26845,26846,26854,26868,26833,26886,26836,26857,26901,26917,26823,27449,27451,27455,27452,27540,27543,27545,27541,27581,27632,27634,27635,27696,28156,28230,28231,28191,28233,28296,28220,28221,28229,28258,28203,28223,28225,28253,28275,28188,28211,28235,28224,28241,28219,28163,28206,28254,28264,28252,28257,28209,28200,28256,28273,28267,28217,28194,28208,28243,28261,28199,28280,28260,28279,28245,28281,28242,28262,28213,28214,28250,28960,28958,28975,28923,28974,28977,28963,28965,28962,28978,28959,28968,28986,28955,29259,29274,29320,29321,29318,29317,29323,29458,29451,29488,29474,29489,29491,29479,29490,29485,29478,29475,29493,29452,29742,29740,29744,29739,29718,29722,29729,29741,29745,29732,29731,29725,29737,29728,29746,29947,29999,30063,30060,30183,30170,30177,30182,30173,30175,30180,30167,30357,30354,30426,30534,30535,30532,30541,30533,30538,30542,30539,30540,30686,30700,30816,30820,30821,30812,30829,30833,30826,30830,30832,30825,30824,30814,30818,31092,31091,31090,31088,31234,31242,31235,31244,31236,31385,31462,31460,31562,31547,31556,31560,31564,31566,31552,31576,31557,31906,31902,31912,31905,32088,32111,32099,32083,32086,32103,32106,32079,32109,32092,32107,32082,32084,32105,32081,32095,32078,32574,32575,32613,32614,32674,32672,32673,32727,32849,32847,32848,33022,32980,33091,33098,33106,33103,33095,33085,33101,33082,33254,33262,33271,33272,33273,33284,33340,33341,33343,33397,33595,33743,33785,33827,33728,33768,33810,33767,33764,33788,33782,33808,33734,33736,33771,33763,33727,33793,33757,33765,33752,33791,33761,33739,33742,33750,33781,33737,33801,33807,33758,33809,33798,33730,33779,33749,33786,33735,33745,33770,33811,33731,33772,33774,33732,33787,33751,33762,33819,33755,33790,34520,34530,34534,34515,34531,34522,34538,34525,34539,34524,34540,34537,34519,34536,34513,34888,34902,34901,35002,35031,35001,35000,35008,35006,34998,35004,34999,35005,34994,35073,35017,35221,35224,35223,35293,35290,35291,35406,35405,35385,35417,35392,35415,35416,35396,35397,35410,35400,35409,35402,35404,35407,35935,35969,35968,36026,36030,36016,36025,36021,36228,36224,36233,36312,36307,36301,36295,36310,36316,36303,36309,36313,36296,36311,36293,36591,36599,36602,36601,36582,36590,36581,36597,36583,36584,36598,36587,36593,36588,36596,36585,36909,36916,36911,37126,37164,37124,37119,37116,37128,37113,37115,37121,37120,37127,37125,37123,37217,37220,37215,37218,37216,37377,37386,37413,37379,37402,37414,37391,37388,37376,37394,37375,37373,37382,37380,37415,37378,37404,37412,37401,37399,37381,37398,38267,38285,38284,38288,38535,38526,38536,38537,38531,38528,38594,38600,38595,38641,38640,38764,38768,38766,38919,39081,39147,40166,40697,20099,20100,20150,20669,20671,20678,20654,20676,20682,20660,20680,20674,20656,20673,20666,20657,20683,20681,20662,20664,20951,21114,21112,21115,21116,21955,21979,21964,21968,21963,21962,21981,21952,21972,21956,21993,21951,21970,21901,21967,21973,21986,21974,21960,22002,21965,21977,21954,22292,22611,22632,22628,22607,22605,22601,22639,22613,22606,22621,22617,22629,22619,22589,22627,22641,22780,23239,23236,23243,23226,23224,23217,23221,23216,23231,23240,23227,23238,23223,23232,23242,23220,23222,23245,23225,23184,23510,23512,23513,23583,23603,23921,23907,23882,23909,23922,23916,23902,23912,23911,23906,24048,24143,24142,24138,24141,24139,24261,24268,24262,24267,24263,24384,24495,24493,24823,24905,24906,24875,24901,24886,24882,24878,24902,24879,24911,24873,24896,25120,37224,25123,25125,25124,25541,25585,25579,25616,25618,25609,25632,25636,25651,25667,25631,25621,25624,25657,25655,25634,25635,25612,25638,25648,25640,25665,25653,25647,25610,25626,25664,25637,25639,25611,25575,25627,25646,25633,25614,25967,26002,26067,26246,26252,26261,26256,26251,26250,26265,26260,26232,26400,26982,26975,26936,26958,26978,26993,26943,26949,26986,26937,26946,26967,26969,27002,26952,26953,26933,26988,26931,26941,26981,26864,27000,26932,26985,26944,26991,26948,26998,26968,26945,26996,26956,26939,26955,26935,26972,26959,26961,26930,26962,26927,27003,26940,27462,27461,27459,27458,27464,27457,27547,64013,27643,27644,27641,27639,27640,28315,28374,28360,28303,28352,28319,28307,28308,28320,28337,28345,28358,28370,28349,28353,28318,28361,28343,28336,28365,28326,28367,28338,28350,28355,28380,28376,28313,28306,28302,28301,28324,28321,28351,28339,28368,28362,28311,28334,28323,28999,29012,29010,29027,29024,28993,29021,29026,29042,29048,29034,29025,28994,29016,28995,29003,29040,29023,29008,29011,28996,29005,29018,29263,29325,29324,29329,29328,29326,29500,29506,29499,29498,29504,29514,29513,29764,29770,29771,29778,29777,29783,29760,29775,29776,29774,29762,29766,29773,29780,29921,29951,29950,29949,29981,30073,30071,27011,30191,30223,30211,30199,30206,30204,30201,30200,30224,30203,30198,30189,30197,30205,30361,30389,30429,30549,30559,30560,30546,30550,30554,30569,30567,30548,30553,30573,30688,30855,30874,30868,30863,30852,30869,30853,30854,30881,30851,30841,30873,30848,30870,30843,31100,31106,31101,31097,31249,31256,31257,31250,31255,31253,31266,31251,31259,31248,31395,31394,31390,31467,31590,31588,31597,31604,31593,31602,31589,31603,31601,31600,31585,31608,31606,31587,31922,31924,31919,32136,32134,32128,32141,32127,32133,32122,32142,32123,32131,32124,32140,32148,32132,32125,32146,32621,32619,32615,32616,32620,32678,32677,32679,32731,32732,32801,33124,33120,33143,33116,33129,33115,33122,33138,26401,33118,33142,33127,33135,33092,33121,33309,33353,33348,33344,33346,33349,34033,33855,33878,33910,33913,33935,33933,33893,33873,33856,33926,33895,33840,33869,33917,33882,33881,33908,33907,33885,34055,33886,33847,33850,33844,33914,33859,33912,33842,33861,33833,33753,33867,33839,33858,33837,33887,33904,33849,33870,33868,33874,33903,33989,33934,33851,33863,33846,33843,33896,33918,33860,33835,33888,33876,33902,33872,34571,34564,34551,34572,34554,34518,34549,34637,34552,34574,34569,34561,34550,34573,34565,35030,35019,35021,35022,35038,35035,35034,35020,35024,35205,35227,35295,35301,35300,35297,35296,35298,35292,35302,35446,35462,35455,35425,35391,35447,35458,35460,35445,35459,35457,35444,35450,35900,35915,35914,35941,35940,35942,35974,35972,35973,36044,36200,36201,36241,36236,36238,36239,36237,36243,36244,36240,36242,36336,36320,36332,36337,36334,36304,36329,36323,36322,36327,36338,36331,36340,36614,36607,36609,36608,36613,36615,36616,36610,36619,36946,36927,36932,36937,36925,37136,37133,37135,37137,37142,37140,37131,37134,37230,37231,37448,37458,37424,37434,37478,37427,37477,37470,37507,37422,37450,37446,37485,37484,37455,37472,37479,37487,37430,37473,37488,37425,37460,37475,37456,37490,37454,37459,37452,37462,37426,38303,38300,38302,38299,38546,38547,38545,38551,38606,38650,38653,38648,38645,38771,38775,38776,38770,38927,38925,38926,39084,39158,39161,39343,39346,39344,39349,39597,39595,39771,40170,40173,40167,40576,40701,20710,20692,20695,20712,20723,20699,20714,20701,20708,20691,20716,20720,20719,20707,20704,20952,21120,21121,21225,21227,21296,21420,22055,22037,22028,22034,22012,22031,22044,22017,22035,22018,22010,22045,22020,22015,22009,22665,22652,22672,22680,22662,22657,22655,22644,22667,22650,22663,22673,22670,22646,22658,22664,22651,22676,22671,22782,22891,23260,23278,23269,23253,23274,23258,23277,23275,23283,23266,23264,23259,23276,23262,23261,23257,23272,23263,23415,23520,23523,23651,23938,23936,23933,23942,23930,23937,23927,23946,23945,23944,23934,23932,23949,23929,23935,24152,24153,24147,24280,24273,24279,24270,24284,24277,24281,24274,24276,24388,24387,24431,24502,24876,24872,24897,24926,24945,24947,24914,24915,24946,24940,24960,24948,24916,24954,24923,24933,24891,24938,24929,24918,25129,25127,25131,25643,25677,25691,25693,25716,25718,25714,25715,25725,25717,25702,25766,25678,25730,25694,25692,25675,25683,25696,25680,25727,25663,25708,25707,25689,25701,25719,25971,26016,26273,26272,26271,26373,26372,26402,27057,27062,27081,27040,27086,27030,27056,27052,27068,27025,27033,27022,27047,27021,27049,27070,27055,27071,27076,27069,27044,27092,27065,27082,27034,27087,27059,27027,27050,27041,27038,27097,27031,27024,27074,27061,27045,27078,27466,27469,27467,27550,27551,27552,27587,27588,27646,28366,28405,28401,28419,28453,28408,28471,28411,28462,28425,28494,28441,28442,28455,28440,28475,28434,28397,28426,28470,28531,28409,28398,28461,28480,28464,28476,28469,28395,28423,28430,28483,28421,28413,28406,28473,28444,28412,28474,28447,28429,28446,28424,28449,29063,29072,29065,29056,29061,29058,29071,29051,29062,29057,29079,29252,29267,29335,29333,29331,29507,29517,29521,29516,29794,29811,29809,29813,29810,29799,29806,29952,29954,29955,30077,30096,30230,30216,30220,30229,30225,30218,30228,30392,30593,30588,30597,30594,30574,30592,30575,30590,30595,30898,30890,30900,30893,30888,30846,30891,30878,30885,30880,30892,30882,30884,31128,31114,31115,31126,31125,31124,31123,31127,31112,31122,31120,31275,31306,31280,31279,31272,31270,31400,31403,31404,31470,31624,31644,31626,31633,31632,31638,31629,31628,31643,31630,31621,31640,21124,31641,31652,31618,31931,31935,31932,31930,32167,32183,32194,32163,32170,32193,32192,32197,32157,32206,32196,32198,32203,32204,32175,32185,32150,32188,32159,32166,32174,32169,32161,32201,32627,32738,32739,32741,32734,32804,32861,32860,33161,33158,33155,33159,33165,33164,33163,33301,33943,33956,33953,33951,33978,33998,33986,33964,33966,33963,33977,33972,33985,33997,33962,33946,33969,34000,33949,33959,33979,33954,33940,33991,33996,33947,33961,33967,33960,34006,33944,33974,33999,33952,34007,34004,34002,34011,33968,33937,34401,34611,34595,34600,34667,34624,34606,34590,34593,34585,34587,34627,34604,34625,34622,34630,34592,34610,34602,34605,34620,34578,34618,34609,34613,34626,34598,34599,34616,34596,34586,34608,34577,35063,35047,35057,35058,35066,35070,35054,35068,35062,35067,35056,35052,35051,35229,35233,35231,35230,35305,35307,35304,35499,35481,35467,35474,35471,35478,35901,35944,35945,36053,36047,36055,36246,36361,36354,36351,36365,36349,36362,36355,36359,36358,36357,36350,36352,36356,36624,36625,36622,36621,37155,37148,37152,37154,37151,37149,37146,37156,37153,37147,37242,37234,37241,37235,37541,37540,37494,37531,37498,37536,37524,37546,37517,37542,37530,37547,37497,37527,37503,37539,37614,37518,37506,37525,37538,37501,37512,37537,37514,37510,37516,37529,37543,37502,37511,37545,37533,37515,37421,38558,38561,38655,38744,38781,38778,38782,38787,38784,38786,38779,38788,38785,38783,38862,38861,38934,39085,39086,39170,39168,39175,39325,39324,39363,39353,39355,39354,39362,39357,39367,39601,39651,39655,39742,39743,39776,39777,39775,40177,40178,40181,40615,20735,20739,20784,20728,20742,20743,20726,20734,20747,20748,20733,20746,21131,21132,21233,21231,22088,22082,22092,22069,22081,22090,22089,22086,22104,22106,22080,22067,22077,22060,22078,22072,22058,22074,22298,22699,22685,22705,22688,22691,22703,22700,22693,22689,22783,23295,23284,23293,23287,23286,23299,23288,23298,23289,23297,23303,23301,23311,23655,23961,23959,23967,23954,23970,23955,23957,23968,23964,23969,23962,23966,24169,24157,24160,24156,32243,24283,24286,24289,24393,24498,24971,24963,24953,25009,25008,24994,24969,24987,24979,25007,25005,24991,24978,25002,24993,24973,24934,25011,25133,25710,25712,25750,25760,25733,25751,25756,25743,25739,25738,25740,25763,25759,25704,25777,25752,25974,25978,25977,25979,26034,26035,26293,26288,26281,26290,26295,26282,26287,27136,27142,27159,27109,27128,27157,27121,27108,27168,27135,27116,27106,27163,27165,27134,27175,27122,27118,27156,27127,27111,27200,27144,27110,27131,27149,27132,27115,27145,27140,27160,27173,27151,27126,27174,27143,27124,27158,27473,27557,27555,27554,27558,27649,27648,27647,27650,28481,28454,28542,28551,28614,28562,28557,28553,28556,28514,28495,28549,28506,28566,28534,28524,28546,28501,28530,28498,28496,28503,28564,28563,28509,28416,28513,28523,28541,28519,28560,28499,28555,28521,28543,28565,28515,28535,28522,28539,29106,29103,29083,29104,29088,29082,29097,29109,29085,29093,29086,29092,29089,29098,29084,29095,29107,29336,29338,29528,29522,29534,29535,29536,29533,29531,29537,29530,29529,29538,29831,29833,29834,29830,29825,29821,29829,29832,29820,29817,29960,29959,30078,30245,30238,30233,30237,30236,30243,30234,30248,30235,30364,30365,30366,30363,30605,30607,30601,30600,30925,30907,30927,30924,30929,30926,30932,30920,30915,30916,30921,31130,31137,31136,31132,31138,31131,27510,31289,31410,31412,31411,31671,31691,31678,31660,31694,31663,31673,31690,31669,31941,31944,31948,31947,32247,32219,32234,32231,32215,32225,32259,32250,32230,32246,32241,32240,32238,32223,32630,32684,32688,32685,32749,32747,32746,32748,32742,32744,32868,32871,33187,33183,33182,33173,33186,33177,33175,33302,33359,33363,33362,33360,33358,33361,34084,34107,34063,34048,34089,34062,34057,34061,34079,34058,34087,34076,34043,34091,34042,34056,34060,34036,34090,34034,34069,34039,34027,34035,34044,34066,34026,34025,34070,34046,34088,34077,34094,34050,34045,34078,34038,34097,34086,34023,34024,34032,34031,34041,34072,34080,34096,34059,34073,34095,34402,34646,34659,34660,34679,34785,34675,34648,34644,34651,34642,34657,34650,34641,34654,34669,34666,34640,34638,34655,34653,34671,34668,34682,34670,34652,34661,34639,34683,34677,34658,34663,34665,34906,35077,35084,35092,35083,35095,35096,35097,35078,35094,35089,35086,35081,35234,35236,35235,35309,35312,35308,35535,35526,35512,35539,35537,35540,35541,35515,35543,35518,35520,35525,35544,35523,35514,35517,35545,35902,35917,35983,36069,36063,36057,36072,36058,36061,36071,36256,36252,36257,36251,36384,36387,36389,36388,36398,36373,36379,36374,36369,36377,36390,36391,36372,36370,36376,36371,36380,36375,36378,36652,36644,36632,36634,36640,36643,36630,36631,36979,36976,36975,36967,36971,37167,37163,37161,37162,37170,37158,37166,37253,37254,37258,37249,37250,37252,37248,37584,37571,37572,37568,37593,37558,37583,37617,37599,37592,37609,37591,37597,37580,37615,37570,37608,37578,37576,37582,37606,37581,37589,37577,37600,37598,37607,37585,37587,37557,37601,37574,37556,38268,38316,38315,38318,38320,38564,38562,38611,38661,38664,38658,38746,38794,38798,38792,38864,38863,38942,38941,38950,38953,38952,38944,38939,38951,39090,39176,39162,39185,39188,39190,39191,39189,39388,39373,39375,39379,39380,39374,39369,39382,39384,39371,39383,39372,39603,39660,39659,39667,39666,39665,39750,39747,39783,39796,39793,39782,39798,39797,39792,39784,39780,39788,40188,40186,40189,40191,40183,40199,40192,40185,40187,40200,40197,40196,40579,40659,40719,40720,20764,20755,20759,20762,20753,20958,21300,21473,22128,22112,22126,22131,22118,22115,22125,22130,22110,22135,22300,22299,22728,22717,22729,22719,22714,22722,22716,22726,23319,23321,23323,23329,23316,23315,23312,23318,23336,23322,23328,23326,23535,23980,23985,23977,23975,23989,23984,23982,23978,23976,23986,23981,23983,23988,24167,24168,24166,24175,24297,24295,24294,24296,24293,24395,24508,24989,25000,24982,25029,25012,25030,25025,25036,25018,25023,25016,24972,25815,25814,25808,25807,25801,25789,25737,25795,25819,25843,25817,25907,25983,25980,26018,26312,26302,26304,26314,26315,26319,26301,26299,26298,26316,26403,27188,27238,27209,27239,27186,27240,27198,27229,27245,27254,27227,27217,27176,27226,27195,27199,27201,27242,27236,27216,27215,27220,27247,27241,27232,27196,27230,27222,27221,27213,27214,27206,27477,27476,27478,27559,27562,27563,27592,27591,27652,27651,27654,28589,28619,28579,28615,28604,28622,28616,28510,28612,28605,28574,28618,28584,28676,28581,28590,28602,28588,28586,28623,28607,28600,28578,28617,28587,28621,28591,28594,28592,29125,29122,29119,29112,29142,29120,29121,29131,29140,29130,29127,29135,29117,29144,29116,29126,29146,29147,29341,29342,29545,29542,29543,29548,29541,29547,29546,29823,29850,29856,29844,29842,29845,29857,29963,30080,30255,30253,30257,30269,30259,30268,30261,30258,30256,30395,30438,30618,30621,30625,30620,30619,30626,30627,30613,30617,30615,30941,30953,30949,30954,30942,30947,30939,30945,30946,30957,30943,30944,31140,31300,31304,31303,31414,31416,31413,31409,31415,31710,31715,31719,31709,31701,31717,31706,31720,31737,31700,31722,31714,31708,31723,31704,31711,31954,31956,31959,31952,31953,32274,32289,32279,32268,32287,32288,32275,32270,32284,32277,32282,32290,32267,32271,32278,32269,32276,32293,32292,32579,32635,32636,32634,32689,32751,32810,32809,32876,33201,33190,33198,33209,33205,33195,33200,33196,33204,33202,33207,33191,33266,33365,33366,33367,34134,34117,34155,34125,34131,34145,34136,34112,34118,34148,34113,34146,34116,34129,34119,34147,34110,34139,34161,34126,34158,34165,34133,34151,34144,34188,34150,34141,34132,34149,34156,34403,34405,34404,34715,34703,34711,34707,34706,34696,34689,34710,34712,34681,34695,34723,34693,34704,34705,34717,34692,34708,34716,34714,34697,35102,35110,35120,35117,35118,35111,35121,35106,35113,35107,35119,35116,35103,35313,35552,35554,35570,35572,35573,35549,35604,35556,35551,35568,35528,35550,35553,35560,35583,35567,35579,35985,35986,35984,36085,36078,36081,36080,36083,36204,36206,36261,36263,36403,36414,36408,36416,36421,36406,36412,36413,36417,36400,36415,36541,36662,36654,36661,36658,36665,36663,36660,36982,36985,36987,36998,37114,37171,37173,37174,37267,37264,37265,37261,37263,37671,37662,37640,37663,37638,37647,37754,37688,37692,37659,37667,37650,37633,37702,37677,37646,37645,37579,37661,37626,37669,37651,37625,37623,37684,37634,37668,37631,37673,37689,37685,37674,37652,37644,37643,37630,37641,37632,37627,37654,38332,38349,38334,38329,38330,38326,38335,38325,38333,38569,38612,38667,38674,38672,38809,38807,38804,38896,38904,38965,38959,38962,39204,39199,39207,39209,39326,39406,39404,39397,39396,39408,39395,39402,39401,39399,39609,39615,39604,39611,39670,39674,39673,39671,39731,39808,39813,39815,39804,39806,39803,39810,39827,39826,39824,39802,39829,39805,39816,40229,40215,40224,40222,40212,40233,40221,40216,40226,40208,40217,40223,40584,40582,40583,40622,40621,40661,40662,40698,40722,40765,20774,20773,20770,20772,20768,20777,21236,22163,22156,22157,22150,22148,22147,22142,22146,22143,22145,22742,22740,22735,22738,23341,23333,23346,23331,23340,23335,23334,23343,23342,23419,23537,23538,23991,24172,24170,24510,24507,25027,25013,25020,25063,25056,25061,25060,25064,25054,25839,25833,25827,25835,25828,25832,25985,25984,26038,26074,26322,27277,27286,27265,27301,27273,27295,27291,27297,27294,27271,27283,27278,27285,27267,27304,27300,27281,27263,27302,27290,27269,27276,27282,27483,27565,27657,28620,28585,28660,28628,28643,28636,28653,28647,28646,28638,28658,28637,28642,28648,29153,29169,29160,29170,29156,29168,29154,29555,29550,29551,29847,29874,29867,29840,29866,29869,29873,29861,29871,29968,29969,29970,29967,30084,30275,30280,30281,30279,30372,30441,30645,30635,30642,30647,30646,30644,30641,30632,30704,30963,30973,30978,30971,30972,30962,30981,30969,30974,30980,31147,31144,31324,31323,31318,31320,31316,31322,31422,31424,31425,31749,31759,31730,31744,31743,31739,31758,31732,31755,31731,31746,31753,31747,31745,31736,31741,31750,31728,31729,31760,31754,31976,32301,32316,32322,32307,38984,32312,32298,32329,32320,32327,32297,32332,32304,32315,32310,32324,32314,32581,32639,32638,32637,32756,32754,32812,33211,33220,33228,33226,33221,33223,33212,33257,33371,33370,33372,34179,34176,34191,34215,34197,34208,34187,34211,34171,34212,34202,34206,34167,34172,34185,34209,34170,34168,34135,34190,34198,34182,34189,34201,34205,34177,34210,34178,34184,34181,34169,34166,34200,34192,34207,34408,34750,34730,34733,34757,34736,34732,34745,34741,34748,34734,34761,34755,34754,34764,34743,34735,34756,34762,34740,34742,34751,34744,34749,34782,34738,35125,35123,35132,35134,35137,35154,35127,35138,35245,35247,35246,35314,35315,35614,35608,35606,35601,35589,35595,35618,35599,35602,35605,35591,35597,35592,35590,35612,35603,35610,35919,35952,35954,35953,35951,35989,35988,36089,36207,36430,36429,36435,36432,36428,36423,36675,36672,36997,36990,37176,37274,37282,37275,37273,37279,37281,37277,37280,37793,37763,37807,37732,37718,37703,37756,37720,37724,37750,37705,37712,37713,37728,37741,37775,37708,37738,37753,37719,37717,37714,37711,37745,37751,37755,37729,37726,37731,37735,37760,37710,37721,38343,38336,38345,38339,38341,38327,38574,38576,38572,38688,38687,38680,38685,38681,38810,38817,38812,38814,38813,38869,38868,38897,38977,38980,38986,38985,38981,38979,39205,39211,39212,39210,39219,39218,39215,39213,39217,39216,39320,39331,39329,39426,39418,39412,39415,39417,39416,39414,39419,39421,39422,39420,39427,39614,39678,39677,39681,39676,39752,39834,39848,39838,39835,39846,39841,39845,39844,39814,39842,39840,39855,40243,40257,40295,40246,40238,40239,40241,40248,40240,40261,40258,40259,40254,40247,40256,40253,32757,40237,40586,40585,40589,40624,40648,40666,40699,40703,40740,40739,40738,40788,40864,20785,20781,20782,22168,22172,22167,22170,22173,22169,22896,23356,23657,23658,24000,24173,24174,25048,25055,25069,25070,25073,25066,25072,25067,25046,25065,25855,25860,25853,25848,25857,25859,25852,26004,26075,26330,26331,26328,27333,27321,27325,27361,27334,27322,27318,27319,27335,27316,27309,27486,27593,27659,28679,28684,28685,28673,28677,28692,28686,28671,28672,28667,28710,28668,28663,28682,29185,29183,29177,29187,29181,29558,29880,29888,29877,29889,29886,29878,29883,29890,29972,29971,30300,30308,30297,30288,30291,30295,30298,30374,30397,30444,30658,30650,30975,30988,30995,30996,30985,30992,30994,30993,31149,31148,31327,31772,31785,31769,31776,31775,31789,31773,31782,31784,31778,31781,31792,32348,32336,32342,32355,32344,32354,32351,32337,32352,32343,32339,32693,32691,32759,32760,32885,33233,33234,33232,33375,33374,34228,34246,34240,34243,34242,34227,34229,34237,34247,34244,34239,34251,34254,34248,34245,34225,34230,34258,34340,34232,34231,34238,34409,34791,34790,34786,34779,34795,34794,34789,34783,34803,34788,34772,34780,34771,34797,34776,34787,34724,34775,34777,34817,34804,34792,34781,35155,35147,35151,35148,35142,35152,35153,35145,35626,35623,35619,35635,35632,35637,35655,35631,35644,35646,35633,35621,35639,35622,35638,35630,35620,35643,35645,35642,35906,35957,35993,35992,35991,36094,36100,36098,36096,36444,36450,36448,36439,36438,36446,36453,36455,36443,36442,36449,36445,36457,36436,36678,36679,36680,36683,37160,37178,37179,37182,37288,37285,37287,37295,37290,37813,37772,37778,37815,37787,37789,37769,37799,37774,37802,37790,37798,37781,37768,37785,37791,37773,37809,37777,37810,37796,37800,37812,37795,37797,38354,38355,38353,38579,38615,38618,24002,38623,38616,38621,38691,38690,38693,38828,38830,38824,38827,38820,38826,38818,38821,38871,38873,38870,38872,38906,38992,38993,38994,39096,39233,39228,39226,39439,39435,39433,39437,39428,39441,39434,39429,39431,39430,39616,39644,39688,39684,39685,39721,39733,39754,39756,39755,39879,39878,39875,39871,39873,39861,39864,39891,39862,39876,39865,39869,40284,40275,40271,40266,40283,40267,40281,40278,40268,40279,40274,40276,40287,40280,40282,40590,40588,40671,40705,40704,40726,40741,40747,40746,40745,40744,40780,40789,20788,20789,21142,21239,21428,22187,22189,22182,22183,22186,22188,22746,22749,22747,22802,23357,23358,23359,24003,24176,24511,25083,25863,25872,25869,25865,25868,25870,25988,26078,26077,26334,27367,27360,27340,27345,27353,27339,27359,27356,27344,27371,27343,27341,27358,27488,27568,27660,28697,28711,28704,28694,28715,28705,28706,28707,28713,28695,28708,28700,28714,29196,29194,29191,29186,29189,29349,29350,29348,29347,29345,29899,29893,29879,29891,29974,30304,30665,30666,30660,30705,31005,31003,31009,31004,30999,31006,31152,31335,31336,31795,31804,31801,31788,31803,31980,31978,32374,32373,32376,32368,32375,32367,32378,32370,32372,32360,32587,32586,32643,32646,32695,32765,32766,32888,33239,33237,33380,33377,33379,34283,34289,34285,34265,34273,34280,34266,34263,34284,34290,34296,34264,34271,34275,34268,34257,34288,34278,34287,34270,34274,34816,34810,34819,34806,34807,34825,34828,34827,34822,34812,34824,34815,34826,34818,35170,35162,35163,35159,35169,35164,35160,35165,35161,35208,35255,35254,35318,35664,35656,35658,35648,35667,35670,35668,35659,35669,35665,35650,35666,35671,35907,35959,35958,35994,36102,36103,36105,36268,36266,36269,36267,36461,36472,36467,36458,36463,36475,36546,36690,36689,36687,36688,36691,36788,37184,37183,37296,37293,37854,37831,37839,37826,37850,37840,37881,37868,37836,37849,37801,37862,37834,37844,37870,37859,37845,37828,37838,37824,37842,37863,38269,38362,38363,38625,38697,38699,38700,38696,38694,38835,38839,38838,38877,38878,38879,39004,39001,39005,38999,39103,39101,39099,39102,39240,39239,39235,39334,39335,39450,39445,39461,39453,39460,39451,39458,39456,39463,39459,39454,39452,39444,39618,39691,39690,39694,39692,39735,39914,39915,39904,39902,39908,39910,39906,39920,39892,39895,39916,39900,39897,39909,39893,39905,39898,40311,40321,40330,40324,40328,40305,40320,40312,40326,40331,40332,40317,40299,40308,40309,40304,40297,40325,40307,40315,40322,40303,40313,40319,40327,40296,40596,40593,40640,40700,40749,40768,40769,40781,40790,40791,40792,21303,22194,22197,22195,22755,23365,24006,24007,24302,24303,24512,24513,25081,25879,25878,25877,25875,26079,26344,26339,26340,27379,27376,27370,27368,27385,27377,27374,27375,28732,28725,28719,28727,28724,28721,28738,28728,28735,28730,28729,28736,28731,28723,28737,29203,29204,29352,29565,29564,29882,30379,30378,30398,30445,30668,30670,30671,30669,30706,31013,31011,31015,31016,31012,31017,31154,31342,31340,31341,31479,31817,31816,31818,31815,31813,31982,32379,32382,32385,32384,32698,32767,32889,33243,33241,33291,33384,33385,34338,34303,34305,34302,34331,34304,34294,34308,34313,34309,34316,34301,34841,34832,34833,34839,34835,34838,35171,35174,35257,35319,35680,35690,35677,35688,35683,35685,35687,35693,36270,36486,36488,36484,36697,36694,36695,36693,36696,36698,37005,37187,37185,37303,37301,37298,37299,37899,37907,37883,37920,37903,37908,37886,37909,37904,37928,37913,37901,37877,37888,37879,37895,37902,37910,37906,37882,37897,37880,37898,37887,37884,37900,37878,37905,37894,38366,38368,38367,38702,38703,38841,38843,38909,38910,39008,39010,39011,39007,39105,39106,39248,39246,39257,39244,39243,39251,39474,39476,39473,39468,39466,39478,39465,39470,39480,39469,39623,39626,39622,39696,39698,39697,39947,39944,39927,39941,39954,39928,40000,39943,39950,39942,39959,39956,39945,40351,40345,40356,40349,40338,40344,40336,40347,40352,40340,40348,40362,40343,40353,40346,40354,40360,40350,40355,40383,40361,40342,40358,40359,40601,40603,40602,40677,40676,40679,40678,40752,40750,40795,40800,40798,40797,40793,40849,20794,20793,21144,21143,22211,22205,22206,23368,23367,24011,24015,24305,25085,25883,27394,27388,27395,27384,27392,28739,28740,28746,28744,28745,28741,28742,29213,29210,29209,29566,29975,30314,30672,31021,31025,31023,31828,31827,31986,32394,32391,32392,32395,32390,32397,32589,32699,32816,33245,34328,34346,34342,34335,34339,34332,34329,34343,34350,34337,34336,34345,34334,34341,34857,34845,34843,34848,34852,34844,34859,34890,35181,35177,35182,35179,35322,35705,35704,35653,35706,35707,36112,36116,36271,36494,36492,36702,36699,36701,37190,37188,37189,37305,37951,37947,37942,37929,37949,37948,37936,37945,37930,37943,37932,37952,37937,38373,38372,38371,38709,38714,38847,38881,39012,39113,39110,39104,39256,39254,39481,39485,39494,39492,39490,39489,39482,39487,39629,39701,39703,39704,39702,39738,39762,39979,39965,39964,39980,39971,39976,39977,39972,39969,40375,40374,40380,40385,40391,40394,40399,40382,40389,40387,40379,40373,40398,40377,40378,40364,40392,40369,40365,40396,40371,40397,40370,40570,40604,40683,40686,40685,40731,40728,40730,40753,40782,40805,40804,40850,20153,22214,22213,22219,22897,23371,23372,24021,24017,24306,25889,25888,25894,25890,27403,27400,27401,27661,28757,28758,28759,28754,29214,29215,29353,29567,29912,29909,29913,29911,30317,30381,31029,31156,31344,31345,31831,31836,31833,31835,31834,31988,31985,32401,32591,32647,33246,33387,34356,34357,34355,34348,34354,34358,34860,34856,34854,34858,34853,35185,35263,35262,35323,35710,35716,35714,35718,35717,35711,36117,36501,36500,36506,36498,36496,36502,36503,36704,36706,37191,37964,37968,37962,37963,37967,37959,37957,37960,37961,37958,38719,38883,39018,39017,39115,39252,39259,39502,39507,39508,39500,39503,39496,39498,39497,39506,39504,39632,39705,39723,39739,39766,39765,40006,40008,39999,40004,39993,39987,40001,39996,39991,39988,39986,39997,39990,40411,40402,40414,40410,40395,40400,40412,40401,40415,40425,40409,40408,40406,40437,40405,40413,40630,40688,40757,40755,40754,40770,40811,40853,40866,20797,21145,22760,22759,22898,23373,24024,34863,24399,25089,25091,25092,25897,25893,26006,26347,27409,27410,27407,27594,28763,28762,29218,29570,29569,29571,30320,30676,31847,31846,32405,33388,34362,34368,34361,34364,34353,34363,34366,34864,34866,34862,34867,35190,35188,35187,35326,35724,35726,35723,35720,35909,36121,36504,36708,36707,37308,37986,37973,37981,37975,37982,38852,38853,38912,39510,39513,39710,39711,39712,40018,40024,40016,40010,40013,40011,40021,40025,40012,40014,40443,40439,40431,40419,40427,40440,40420,40438,40417,40430,40422,40434,40432,40418,40428,40436,40435,40424,40429,40642,40656,40690,40691,40710,40732,40760,40759,40758,40771,40783,40817,40816,40814,40815,22227,22221,23374,23661,25901,26349,26350,27411,28767,28769,28765,28768,29219,29915,29925,30677,31032,31159,31158,31850,32407,32649,33389,34371,34872,34871,34869,34891,35732,35733,36510,36511,36512,36509,37310,37309,37314,37995,37992,37993,38629,38726,38723,38727,38855,38885,39518,39637,39769,40035,40039,40038,40034,40030,40032,40450,40446,40455,40451,40454,40453,40448,40449,40457,40447,40445,40452,40608,40734,40774,40820,40821,40822,22228,25902,26040,27416,27417,27415,27418,28770,29222,29354,30680,30681,31033,31849,31851,31990,32410,32408,32411,32409,33248,33249,34374,34375,34376,35193,35194,35196,35195,35327,35736,35737,36517,36516,36515,37998,37997,37999,38001,38003,38729,39026,39263,40040,40046,40045,40459,40461,40464,40463,40466,40465,40609,40693,40713,40775,40824,40827,40826,40825,22302,28774,31855,34876,36274,36518,37315,38004,38008,38006,38005,39520,40052,40051,40049,40053,40468,40467,40694,40714,40868,28776,28773,31991,34410,34878,34877,34879,35742,35996,36521,36553,38731,39027,39028,39116,39265,39339,39524,39526,39527,39716,40469,40471,40776,25095,27422,29223,34380,36520,38018,38016,38017,39529,39528,39726,40473,29225,34379,35743,38019,40057,40631,30325,39531,40058,40477,28777,28778,40612,40830,40777,40856,30849,37561,35023,22715,24658,31911,23290,9556,9574,9559,9568,9580,9571,9562,9577,9565,9554,9572,9557,9566,9578,9569,9560,9575,9563,9555,9573,9558,9567,9579,9570,9561,9576,9564,9553,9552,9581,9582,9584,9583,65517,132423,37595,132575,147397,34124,17077,29679,20917,13897,149826,166372,37700,137691,33518,146632,30780,26436,25311,149811,166314,131744,158643,135941,20395,140525,20488,159017,162436,144896,150193,140563,20521,131966,24484,131968,131911,28379,132127,20605,20737,13434,20750,39020,14147,33814,149924,132231,20832,144308,20842,134143,139516,131813,140592,132494,143923,137603,23426,34685,132531,146585,20914,20920,40244,20937,20943,20945,15580,20947,150182,20915,20962,21314,20973,33741,26942,145197,24443,21003,21030,21052,21173,21079,21140,21177,21189,31765,34114,21216,34317,158483,21253,166622,21833,28377,147328,133460,147436,21299,21316,134114,27851,136998,26651,29653,24650,16042,14540,136936,29149,17570,21357,21364,165547,21374,21375,136598,136723,30694,21395,166555,21408,21419,21422,29607,153458,16217,29596,21441,21445,27721,20041,22526,21465,15019,134031,21472,147435,142755,21494,134263,21523,28793,21803,26199,27995,21613,158547,134516,21853,21647,21668,18342,136973,134877,15796,134477,166332,140952,21831,19693,21551,29719,21894,21929,22021,137431,147514,17746,148533,26291,135348,22071,26317,144010,26276,26285,22093,22095,30961,22257,38791,21502,22272,22255,22253,166758,13859,135759,22342,147877,27758,28811,22338,14001,158846,22502,136214,22531,136276,148323,22566,150517,22620,22698,13665,22752,22748,135740,22779,23551,22339,172368,148088,37843,13729,22815,26790,14019,28249,136766,23076,21843,136850,34053,22985,134478,158849,159018,137180,23001,137211,137138,159142,28017,137256,136917,23033,159301,23211,23139,14054,149929,23159,14088,23190,29797,23251,159649,140628,15749,137489,14130,136888,24195,21200,23414,25992,23420,162318,16388,18525,131588,23509,24928,137780,154060,132517,23539,23453,19728,23557,138052,23571,29646,23572,138405,158504,23625,18653,23685,23785,23791,23947,138745,138807,23824,23832,23878,138916,23738,24023,33532,14381,149761,139337,139635,33415,14390,15298,24110,27274,24181,24186,148668,134355,21414,20151,24272,21416,137073,24073,24308,164994,24313,24315,14496,24316,26686,37915,24333,131521,194708,15070,18606,135994,24378,157832,140240,24408,140401,24419,38845,159342,24434,37696,166454,24487,23990,15711,152144,139114,159992,140904,37334,131742,166441,24625,26245,137335,14691,15815,13881,22416,141236,31089,15936,24734,24740,24755,149890,149903,162387,29860,20705,23200,24932,33828,24898,194726,159442,24961,20980,132694,24967,23466,147383,141407,25043,166813,170333,25040,14642,141696,141505,24611,24924,25886,25483,131352,25285,137072,25301,142861,25452,149983,14871,25656,25592,136078,137212,25744,28554,142902,38932,147596,153373,25825,25829,38011,14950,25658,14935,25933,28438,150056,150051,25989,25965,25951,143486,26037,149824,19255,26065,16600,137257,26080,26083,24543,144384,26136,143863,143864,26180,143780,143781,26187,134773,26215,152038,26227,26228,138813,143921,165364,143816,152339,30661,141559,39332,26370,148380,150049,15147,27130,145346,26462,26471,26466,147917,168173,26583,17641,26658,28240,37436,26625,144358,159136,26717,144495,27105,27147,166623,26995,26819,144845,26881,26880,15666,14849,144956,15232,26540,26977,166474,17148,26934,27032,15265,132041,33635,20624,27129,144985,139562,27205,145155,27293,15347,26545,27336,168348,15373,27421,133411,24798,27445,27508,141261,28341,146139,132021,137560,14144,21537,146266,27617,147196,27612,27703,140427,149745,158545,27738,33318,27769,146876,17605,146877,147876,149772,149760,146633,14053,15595,134450,39811,143865,140433,32655,26679,159013,159137,159211,28054,27996,28284,28420,149887,147589,159346,34099,159604,20935,27804,28189,33838,166689,28207,146991,29779,147330,31180,28239,23185,143435,28664,14093,28573,146992,28410,136343,147517,17749,37872,28484,28508,15694,28532,168304,15675,28575,147780,28627,147601,147797,147513,147440,147380,147775,20959,147798,147799,147776,156125,28747,28798,28839,28801,28876,28885,28886,28895,16644,15848,29108,29078,148087,28971,28997,23176,29002,29038,23708,148325,29007,37730,148161,28972,148570,150055,150050,29114,166888,28861,29198,37954,29205,22801,37955,29220,37697,153093,29230,29248,149876,26813,29269,29271,15957,143428,26637,28477,29314,29482,29483,149539,165931,18669,165892,29480,29486,29647,29610,134202,158254,29641,29769,147938,136935,150052,26147,14021,149943,149901,150011,29687,29717,26883,150054,29753,132547,16087,29788,141485,29792,167602,29767,29668,29814,33721,29804,14128,29812,37873,27180,29826,18771,150156,147807,150137,166799,23366,166915,137374,29896,137608,29966,29929,29982,167641,137803,23511,167596,37765,30029,30026,30055,30062,151426,16132,150803,30094,29789,30110,30132,30210,30252,30289,30287,30319,30326,156661,30352,33263,14328,157969,157966,30369,30373,30391,30412,159647,33890,151709,151933,138780,30494,30502,30528,25775,152096,30552,144044,30639,166244,166248,136897,30708,30729,136054,150034,26826,30895,30919,30931,38565,31022,153056,30935,31028,30897,161292,36792,34948,166699,155779,140828,31110,35072,26882,31104,153687,31133,162617,31036,31145,28202,160038,16040,31174,168205,31188],
+ "euc-kr":[44034,44035,44037,44038,44043,44044,44045,44046,44047,44056,44062,44063,44065,44066,44067,44069,44070,44071,44072,44073,44074,44075,44078,44082,44083,44084,null,null,null,null,null,null,44085,44086,44087,44090,44091,44093,44094,44095,44097,44098,44099,44100,44101,44102,44103,44104,44105,44106,44108,44110,44111,44112,44113,44114,44115,44117,null,null,null,null,null,null,44118,44119,44121,44122,44123,44125,44126,44127,44128,44129,44130,44131,44132,44133,44134,44135,44136,44137,44138,44139,44140,44141,44142,44143,44146,44147,44149,44150,44153,44155,44156,44157,44158,44159,44162,44167,44168,44173,44174,44175,44177,44178,44179,44181,44182,44183,44184,44185,44186,44187,44190,44194,44195,44196,44197,44198,44199,44203,44205,44206,44209,44210,44211,44212,44213,44214,44215,44218,44222,44223,44224,44226,44227,44229,44230,44231,44233,44234,44235,44237,44238,44239,44240,44241,44242,44243,44244,44246,44248,44249,44250,44251,44252,44253,44254,44255,44258,44259,44261,44262,44265,44267,44269,44270,44274,44276,44279,44280,44281,44282,44283,44286,44287,44289,44290,44291,44293,44295,44296,44297,44298,44299,44302,44304,44306,44307,44308,44309,44310,44311,44313,44314,44315,44317,44318,44319,44321,44322,44323,44324,44325,44326,44327,44328,44330,44331,44334,44335,44336,44337,44338,44339,null,null,null,null,null,null,44342,44343,44345,44346,44347,44349,44350,44351,44352,44353,44354,44355,44358,44360,44362,44363,44364,44365,44366,44367,44369,44370,44371,44373,44374,44375,null,null,null,null,null,null,44377,44378,44379,44380,44381,44382,44383,44384,44386,44388,44389,44390,44391,44392,44393,44394,44395,44398,44399,44401,44402,44407,44408,44409,44410,44414,44416,44419,44420,44421,44422,44423,44426,44427,44429,44430,44431,44433,44434,44435,44436,44437,44438,44439,44440,44441,44442,44443,44446,44447,44448,44449,44450,44451,44453,44454,44455,44456,44457,44458,44459,44460,44461,44462,44463,44464,44465,44466,44467,44468,44469,44470,44472,44473,44474,44475,44476,44477,44478,44479,44482,44483,44485,44486,44487,44489,44490,44491,44492,44493,44494,44495,44498,44500,44501,44502,44503,44504,44505,44506,44507,44509,44510,44511,44513,44514,44515,44517,44518,44519,44520,44521,44522,44523,44524,44525,44526,44527,44528,44529,44530,44531,44532,44533,44534,44535,44538,44539,44541,44542,44546,44547,44548,44549,44550,44551,44554,44556,44558,44559,44560,44561,44562,44563,44565,44566,44567,44568,44569,44570,44571,44572,null,null,null,null,null,null,44573,44574,44575,44576,44577,44578,44579,44580,44581,44582,44583,44584,44585,44586,44587,44588,44589,44590,44591,44594,44595,44597,44598,44601,44603,44604,null,null,null,null,null,null,44605,44606,44607,44610,44612,44615,44616,44617,44619,44623,44625,44626,44627,44629,44631,44632,44633,44634,44635,44638,44642,44643,44644,44646,44647,44650,44651,44653,44654,44655,44657,44658,44659,44660,44661,44662,44663,44666,44670,44671,44672,44673,44674,44675,44678,44679,44680,44681,44682,44683,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699,44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727,44728,44729,44730,44731,44735,44737,44738,44739,44741,44742,44743,44744,44745,44746,44747,44750,44754,44755,44756,44757,44758,44759,44762,44763,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44777,44778,44780,44782,44783,44784,44785,44786,44787,44789,44790,44791,44793,44794,44795,44797,44798,44799,44800,44801,44802,44803,44804,44805,null,null,null,null,null,null,44806,44809,44810,44811,44812,44814,44815,44817,44818,44819,44820,44821,44822,44823,44824,44825,44826,44827,44828,44829,44830,44831,44832,44833,44834,44835,null,null,null,null,null,null,44836,44837,44838,44839,44840,44841,44842,44843,44846,44847,44849,44851,44853,44854,44855,44856,44857,44858,44859,44862,44864,44868,44869,44870,44871,44874,44875,44876,44877,44878,44879,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44894,44895,44896,44897,44898,44899,44902,44903,44904,44905,44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44922,44923,44924,44925,44926,44927,44929,44930,44931,44933,44934,44935,44937,44938,44939,44940,44941,44942,44943,44946,44947,44948,44950,44951,44952,44953,44954,44955,44957,44958,44959,44960,44961,44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44986,44987,44989,44990,44991,44993,44994,44995,44996,44997,44998,45002,45004,45007,45008,45009,45010,45011,45013,45014,45015,45016,45017,45018,45019,45021,45022,45023,45024,45025,null,null,null,null,null,null,45026,45027,45028,45029,45030,45031,45034,45035,45036,45037,45038,45039,45042,45043,45045,45046,45047,45049,45050,45051,45052,45053,45054,45055,45058,45059,null,null,null,null,null,null,45061,45062,45063,45064,45065,45066,45067,45069,45070,45071,45073,45074,45075,45077,45078,45079,45080,45081,45082,45083,45086,45087,45088,45089,45090,45091,45092,45093,45094,45095,45097,45098,45099,45100,45101,45102,45103,45104,45105,45106,45107,45108,45109,45110,45111,45112,45113,45114,45115,45116,45117,45118,45119,45120,45121,45122,45123,45126,45127,45129,45131,45133,45135,45136,45137,45138,45142,45144,45146,45147,45148,45150,45151,45152,45153,45154,45155,45156,45157,45158,45159,45160,45161,45162,45163,45164,45165,45166,45167,45168,45169,45170,45171,45172,45173,45174,45175,45176,45177,45178,45179,45182,45183,45185,45186,45187,45189,45190,45191,45192,45193,45194,45195,45198,45200,45202,45203,45204,45205,45206,45207,45211,45213,45214,45219,45220,45221,45222,45223,45226,45232,45234,45238,45239,45241,45242,45243,45245,45246,45247,45248,45249,45250,45251,45254,45258,45259,45260,45261,45262,45263,45266,null,null,null,null,null,null,45267,45269,45270,45271,45273,45274,45275,45276,45277,45278,45279,45281,45282,45283,45284,45286,45287,45288,45289,45290,45291,45292,45293,45294,45295,45296,null,null,null,null,null,null,45297,45298,45299,45300,45301,45302,45303,45304,45305,45306,45307,45308,45309,45310,45311,45312,45313,45314,45315,45316,45317,45318,45319,45322,45325,45326,45327,45329,45332,45333,45334,45335,45338,45342,45343,45344,45345,45346,45350,45351,45353,45354,45355,45357,45358,45359,45360,45361,45362,45363,45366,45370,45371,45372,45373,45374,45375,45378,45379,45381,45382,45383,45385,45386,45387,45388,45389,45390,45391,45394,45395,45398,45399,45401,45402,45403,45405,45406,45407,45409,45410,45411,45412,45413,45414,45415,45416,45417,45418,45419,45420,45421,45422,45423,45424,45425,45426,45427,45428,45429,45430,45431,45434,45435,45437,45438,45439,45441,45443,45444,45445,45446,45447,45450,45452,45454,45455,45456,45457,45461,45462,45463,45465,45466,45467,45469,45470,45471,45472,45473,45474,45475,45476,45477,45478,45479,45481,45482,45483,45484,45485,45486,45487,45488,45489,45490,45491,45492,45493,45494,45495,45496,null,null,null,null,null,null,45497,45498,45499,45500,45501,45502,45503,45504,45505,45506,45507,45508,45509,45510,45511,45512,45513,45514,45515,45517,45518,45519,45521,45522,45523,45525,null,null,null,null,null,null,45526,45527,45528,45529,45530,45531,45534,45536,45537,45538,45539,45540,45541,45542,45543,45546,45547,45549,45550,45551,45553,45554,45555,45556,45557,45558,45559,45560,45562,45564,45566,45567,45568,45569,45570,45571,45574,45575,45577,45578,45581,45582,45583,45584,45585,45586,45587,45590,45592,45594,45595,45596,45597,45598,45599,45601,45602,45603,45604,45605,45606,45607,45608,45609,45610,45611,45612,45613,45614,45615,45616,45617,45618,45619,45621,45622,45623,45624,45625,45626,45627,45629,45630,45631,45632,45633,45634,45635,45636,45637,45638,45639,45640,45641,45642,45643,45644,45645,45646,45647,45648,45649,45650,45651,45652,45653,45654,45655,45657,45658,45659,45661,45662,45663,45665,45666,45667,45668,45669,45670,45671,45674,45675,45676,45677,45678,45679,45680,45681,45682,45683,45686,45687,45688,45689,45690,45691,45693,45694,45695,45696,45697,45698,45699,45702,45703,45704,45706,45707,45708,45709,45710,null,null,null,null,null,null,45711,45714,45715,45717,45718,45719,45723,45724,45725,45726,45727,45730,45732,45735,45736,45737,45739,45741,45742,45743,45745,45746,45747,45749,45750,45751,null,null,null,null,null,null,45752,45753,45754,45755,45756,45757,45758,45759,45760,45761,45762,45763,45764,45765,45766,45767,45770,45771,45773,45774,45775,45777,45779,45780,45781,45782,45783,45786,45788,45790,45791,45792,45793,45795,45799,45801,45802,45808,45809,45810,45814,45820,45821,45822,45826,45827,45829,45830,45831,45833,45834,45835,45836,45837,45838,45839,45842,45846,45847,45848,45849,45850,45851,45853,45854,45855,45856,45857,45858,45859,45860,45861,45862,45863,45864,45865,45866,45867,45868,45869,45870,45871,45872,45873,45874,45875,45876,45877,45878,45879,45880,45881,45882,45883,45884,45885,45886,45887,45888,45889,45890,45891,45892,45893,45894,45895,45896,45897,45898,45899,45900,45901,45902,45903,45904,45905,45906,45907,45911,45913,45914,45917,45920,45921,45922,45923,45926,45928,45930,45932,45933,45935,45938,45939,45941,45942,45943,45945,45946,45947,45948,45949,45950,45951,45954,45958,45959,45960,45961,45962,45963,45965,null,null,null,null,null,null,45966,45967,45969,45970,45971,45973,45974,45975,45976,45977,45978,45979,45980,45981,45982,45983,45986,45987,45988,45989,45990,45991,45993,45994,45995,45997,null,null,null,null,null,null,45998,45999,46000,46001,46002,46003,46004,46005,46006,46007,46008,46009,46010,46011,46012,46013,46014,46015,46016,46017,46018,46019,46022,46023,46025,46026,46029,46031,46033,46034,46035,46038,46040,46042,46044,46046,46047,46049,46050,46051,46053,46054,46055,46057,46058,46059,46060,46061,46062,46063,46064,46065,46066,46067,46068,46069,46070,46071,46072,46073,46074,46075,46077,46078,46079,46080,46081,46082,46083,46084,46085,46086,46087,46088,46089,46090,46091,46092,46093,46094,46095,46097,46098,46099,46100,46101,46102,46103,46105,46106,46107,46109,46110,46111,46113,46114,46115,46116,46117,46118,46119,46122,46124,46125,46126,46127,46128,46129,46130,46131,46133,46134,46135,46136,46137,46138,46139,46140,46141,46142,46143,46144,46145,46146,46147,46148,46149,46150,46151,46152,46153,46154,46155,46156,46157,46158,46159,46162,46163,46165,46166,46167,46169,46170,46171,46172,46173,46174,46175,46178,46180,46182,null,null,null,null,null,null,46183,46184,46185,46186,46187,46189,46190,46191,46192,46193,46194,46195,46196,46197,46198,46199,46200,46201,46202,46203,46204,46205,46206,46207,46209,46210,null,null,null,null,null,null,46211,46212,46213,46214,46215,46217,46218,46219,46220,46221,46222,46223,46224,46225,46226,46227,46228,46229,46230,46231,46232,46233,46234,46235,46236,46238,46239,46240,46241,46242,46243,46245,46246,46247,46249,46250,46251,46253,46254,46255,46256,46257,46258,46259,46260,46262,46264,46266,46267,46268,46269,46270,46271,46273,46274,46275,46277,46278,46279,46281,46282,46283,46284,46285,46286,46287,46289,46290,46291,46292,46294,46295,46296,46297,46298,46299,46302,46303,46305,46306,46309,46311,46312,46313,46314,46315,46318,46320,46322,46323,46324,46325,46326,46327,46329,46330,46331,46332,46333,46334,46335,46336,46337,46338,46339,46340,46341,46342,46343,46344,46345,46346,46347,46348,46349,46350,46351,46352,46353,46354,46355,46358,46359,46361,46362,46365,46366,46367,46368,46369,46370,46371,46374,46379,46380,46381,46382,46383,46386,46387,46389,46390,46391,46393,46394,46395,46396,46397,46398,46399,46402,46406,null,null,null,null,null,null,46407,46408,46409,46410,46414,46415,46417,46418,46419,46421,46422,46423,46424,46425,46426,46427,46430,46434,46435,46436,46437,46438,46439,46440,46441,46442,null,null,null,null,null,null,46443,46444,46445,46446,46447,46448,46449,46450,46451,46452,46453,46454,46455,46456,46457,46458,46459,46460,46461,46462,46463,46464,46465,46466,46467,46468,46469,46470,46471,46472,46473,46474,46475,46476,46477,46478,46479,46480,46481,46482,46483,46484,46485,46486,46487,46488,46489,46490,46491,46492,46493,46494,46495,46498,46499,46501,46502,46503,46505,46508,46509,46510,46511,46514,46518,46519,46520,46521,46522,46526,46527,46529,46530,46531,46533,46534,46535,46536,46537,46538,46539,46542,46546,46547,46548,46549,46550,46551,46553,46554,46555,46556,46557,46558,46559,46560,46561,46562,46563,46564,46565,46566,46567,46568,46569,46570,46571,46573,46574,46575,46576,46577,46578,46579,46580,46581,46582,46583,46584,46585,46586,46587,46588,46589,46590,46591,46592,46593,46594,46595,46596,46597,46598,46599,46600,46601,46602,46603,46604,46605,46606,46607,46610,46611,46613,46614,46615,46617,46618,46619,46620,46621,null,null,null,null,null,null,46622,46623,46624,46625,46626,46627,46628,46630,46631,46632,46633,46634,46635,46637,46638,46639,46640,46641,46642,46643,46645,46646,46647,46648,46649,46650,null,null,null,null,null,null,46651,46652,46653,46654,46655,46656,46657,46658,46659,46660,46661,46662,46663,46665,46666,46667,46668,46669,46670,46671,46672,46673,46674,46675,46676,46677,46678,46679,46680,46681,46682,46683,46684,46685,46686,46687,46688,46689,46690,46691,46693,46694,46695,46697,46698,46699,46700,46701,46702,46703,46704,46705,46706,46707,46708,46709,46710,46711,46712,46713,46714,46715,46716,46717,46718,46719,46720,46721,46722,46723,46724,46725,46726,46727,46728,46729,46730,46731,46732,46733,46734,46735,46736,46737,46738,46739,46740,46741,46742,46743,46744,46745,46746,46747,46750,46751,46753,46754,46755,46757,46758,46759,46760,46761,46762,46765,46766,46767,46768,46770,46771,46772,46773,46774,46775,46776,46777,46778,46779,46780,46781,46782,46783,46784,46785,46786,46787,46788,46789,46790,46791,46792,46793,46794,46795,46796,46797,46798,46799,46800,46801,46802,46803,46805,46806,46807,46808,46809,46810,46811,46812,46813,null,null,null,null,null,null,46814,46815,46816,46817,46818,46819,46820,46821,46822,46823,46824,46825,46826,46827,46828,46829,46830,46831,46833,46834,46835,46837,46838,46839,46841,46842,null,null,null,null,null,null,46843,46844,46845,46846,46847,46850,46851,46852,46854,46855,46856,46857,46858,46859,46860,46861,46862,46863,46864,46865,46866,46867,46868,46869,46870,46871,46872,46873,46874,46875,46876,46877,46878,46879,46880,46881,46882,46883,46884,46885,46886,46887,46890,46891,46893,46894,46897,46898,46899,46900,46901,46902,46903,46906,46908,46909,46910,46911,46912,46913,46914,46915,46917,46918,46919,46921,46922,46923,46925,46926,46927,46928,46929,46930,46931,46934,46935,46936,46937,46938,46939,46940,46941,46942,46943,46945,46946,46947,46949,46950,46951,46953,46954,46955,46956,46957,46958,46959,46962,46964,46966,46967,46968,46969,46970,46971,46974,46975,46977,46978,46979,46981,46982,46983,46984,46985,46986,46987,46990,46995,46996,46997,47002,47003,47005,47006,47007,47009,47010,47011,47012,47013,47014,47015,47018,47022,47023,47024,47025,47026,47027,47030,47031,47033,47034,47035,47036,47037,47038,47039,47040,47041,null,null,null,null,null,null,47042,47043,47044,47045,47046,47048,47050,47051,47052,47053,47054,47055,47056,47057,47058,47059,47060,47061,47062,47063,47064,47065,47066,47067,47068,47069,null,null,null,null,null,null,47070,47071,47072,47073,47074,47075,47076,47077,47078,47079,47080,47081,47082,47083,47086,47087,47089,47090,47091,47093,47094,47095,47096,47097,47098,47099,47102,47106,47107,47108,47109,47110,47114,47115,47117,47118,47119,47121,47122,47123,47124,47125,47126,47127,47130,47132,47134,47135,47136,47137,47138,47139,47142,47143,47145,47146,47147,47149,47150,47151,47152,47153,47154,47155,47158,47162,47163,47164,47165,47166,47167,47169,47170,47171,47173,47174,47175,47176,47177,47178,47179,47180,47181,47182,47183,47184,47186,47188,47189,47190,47191,47192,47193,47194,47195,47198,47199,47201,47202,47203,47205,47206,47207,47208,47209,47210,47211,47214,47216,47218,47219,47220,47221,47222,47223,47225,47226,47227,47229,47230,47231,47232,47233,47234,47235,47236,47237,47238,47239,47240,47241,47242,47243,47244,47246,47247,47248,47249,47250,47251,47252,47253,47254,47255,47256,47257,47258,47259,47260,47261,47262,47263,null,null,null,null,null,null,47264,47265,47266,47267,47268,47269,47270,47271,47273,47274,47275,47276,47277,47278,47279,47281,47282,47283,47285,47286,47287,47289,47290,47291,47292,47293,null,null,null,null,null,null,47294,47295,47298,47300,47302,47303,47304,47305,47306,47307,47309,47310,47311,47313,47314,47315,47317,47318,47319,47320,47321,47322,47323,47324,47326,47328,47330,47331,47332,47333,47334,47335,47338,47339,47341,47342,47343,47345,47346,47347,47348,47349,47350,47351,47354,47356,47358,47359,47360,47361,47362,47363,47365,47366,47367,47368,47369,47370,47371,47372,47373,47374,47375,47376,47377,47378,47379,47380,47381,47382,47383,47385,47386,47387,47388,47389,47390,47391,47393,47394,47395,47396,47397,47398,47399,47400,47401,47402,47403,47404,47405,47406,47407,47408,47409,47410,47411,47412,47413,47414,47415,47416,47417,47418,47419,47422,47423,47425,47426,47427,47429,47430,47431,47432,47433,47434,47435,47437,47438,47440,47442,47443,47444,47445,47446,47447,47450,47451,47453,47454,47455,47457,47458,47459,47460,47461,47462,47463,47466,47468,47470,47471,47472,47473,47474,47475,47478,47479,47481,47482,47483,47485,null,null,null,null,null,null,47486,47487,47488,47489,47490,47491,47494,47496,47499,47500,47503,47504,47505,47506,47507,47508,47509,47510,47511,47512,47513,47514,47515,47516,47517,47518,null,null,null,null,null,null,47519,47520,47521,47522,47523,47524,47525,47526,47527,47528,47529,47530,47531,47534,47535,47537,47538,47539,47541,47542,47543,47544,47545,47546,47547,47550,47552,47554,47555,47556,47557,47558,47559,47562,47563,47565,47571,47572,47573,47574,47575,47578,47580,47583,47584,47586,47590,47591,47593,47594,47595,47597,47598,47599,47600,47601,47602,47603,47606,47611,47612,47613,47614,47615,47618,47619,47620,47621,47622,47623,47625,47626,47627,47628,47629,47630,47631,47632,47633,47634,47635,47636,47638,47639,47640,47641,47642,47643,47644,47645,47646,47647,47648,47649,47650,47651,47652,47653,47654,47655,47656,47657,47658,47659,47660,47661,47662,47663,47664,47665,47666,47667,47668,47669,47670,47671,47674,47675,47677,47678,47679,47681,47683,47684,47685,47686,47687,47690,47692,47695,47696,47697,47698,47702,47703,47705,47706,47707,47709,47710,47711,47712,47713,47714,47715,47718,47722,47723,47724,47725,47726,47727,null,null,null,null,null,null,47730,47731,47733,47734,47735,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47750,47752,47753,47754,47755,47757,47758,47759,47760,47761,47762,null,null,null,null,null,null,47763,47764,47765,47766,47767,47768,47769,47770,47771,47772,47773,47774,47775,47776,47777,47778,47779,47780,47781,47782,47783,47786,47789,47790,47791,47793,47795,47796,47797,47798,47799,47802,47804,47806,47807,47808,47809,47810,47811,47813,47814,47815,47817,47818,47819,47820,47821,47822,47823,47824,47825,47826,47827,47828,47829,47830,47831,47834,47835,47836,47837,47838,47839,47840,47841,47842,47843,47844,47845,47846,47847,47848,47849,47850,47851,47852,47853,47854,47855,47856,47857,47858,47859,47860,47861,47862,47863,47864,47865,47866,47867,47869,47870,47871,47873,47874,47875,47877,47878,47879,47880,47881,47882,47883,47884,47886,47888,47890,47891,47892,47893,47894,47895,47897,47898,47899,47901,47902,47903,47905,47906,47907,47908,47909,47910,47911,47912,47914,47916,47917,47918,47919,47920,47921,47922,47923,47927,47929,47930,47935,47936,47937,47938,47939,47942,47944,47946,47947,47948,47950,47953,47954,null,null,null,null,null,null,47955,47957,47958,47959,47961,47962,47963,47964,47965,47966,47967,47968,47970,47972,47973,47974,47975,47976,47977,47978,47979,47981,47982,47983,47984,47985,null,null,null,null,null,null,47986,47987,47988,47989,47990,47991,47992,47993,47994,47995,47996,47997,47998,47999,48000,48001,48002,48003,48004,48005,48006,48007,48009,48010,48011,48013,48014,48015,48017,48018,48019,48020,48021,48022,48023,48024,48025,48026,48027,48028,48029,48030,48031,48032,48033,48034,48035,48037,48038,48039,48041,48042,48043,48045,48046,48047,48048,48049,48050,48051,48053,48054,48056,48057,48058,48059,48060,48061,48062,48063,48065,48066,48067,48069,48070,48071,48073,48074,48075,48076,48077,48078,48079,48081,48082,48084,48085,48086,48087,48088,48089,48090,48091,48092,48093,48094,48095,48096,48097,48098,48099,48100,48101,48102,48103,48104,48105,48106,48107,48108,48109,48110,48111,48112,48113,48114,48115,48116,48117,48118,48119,48122,48123,48125,48126,48129,48131,48132,48133,48134,48135,48138,48142,48144,48146,48147,48153,48154,48160,48161,48162,48163,48166,48168,48170,48171,48172,48174,48175,48178,48179,48181,null,null,null,null,null,null,48182,48183,48185,48186,48187,48188,48189,48190,48191,48194,48198,48199,48200,48202,48203,48206,48207,48209,48210,48211,48212,48213,48214,48215,48216,48217,null,null,null,null,null,null,48218,48219,48220,48222,48223,48224,48225,48226,48227,48228,48229,48230,48231,48232,48233,48234,48235,48236,48237,48238,48239,48240,48241,48242,48243,48244,48245,48246,48247,48248,48249,48250,48251,48252,48253,48254,48255,48256,48257,48258,48259,48262,48263,48265,48266,48269,48271,48272,48273,48274,48275,48278,48280,48283,48284,48285,48286,48287,48290,48291,48293,48294,48297,48298,48299,48300,48301,48302,48303,48306,48310,48311,48312,48313,48314,48315,48318,48319,48321,48322,48323,48325,48326,48327,48328,48329,48330,48331,48332,48334,48338,48339,48340,48342,48343,48345,48346,48347,48349,48350,48351,48352,48353,48354,48355,48356,48357,48358,48359,48360,48361,48362,48363,48364,48365,48366,48367,48368,48369,48370,48371,48375,48377,48378,48379,48381,48382,48383,48384,48385,48386,48387,48390,48392,48394,48395,48396,48397,48398,48399,48401,48402,48403,48405,48406,48407,48408,48409,48410,48411,48412,48413,null,null,null,null,null,null,48414,48415,48416,48417,48418,48419,48421,48422,48423,48424,48425,48426,48427,48429,48430,48431,48432,48433,48434,48435,48436,48437,48438,48439,48440,48441,null,null,null,null,null,null,48442,48443,48444,48445,48446,48447,48449,48450,48451,48452,48453,48454,48455,48458,48459,48461,48462,48463,48465,48466,48467,48468,48469,48470,48471,48474,48475,48476,48477,48478,48479,48480,48481,48482,48483,48485,48486,48487,48489,48490,48491,48492,48493,48494,48495,48496,48497,48498,48499,48500,48501,48502,48503,48504,48505,48506,48507,48508,48509,48510,48511,48514,48515,48517,48518,48523,48524,48525,48526,48527,48530,48532,48534,48535,48536,48539,48541,48542,48543,48544,48545,48546,48547,48549,48550,48551,48552,48553,48554,48555,48556,48557,48558,48559,48561,48562,48563,48564,48565,48566,48567,48569,48570,48571,48572,48573,48574,48575,48576,48577,48578,48579,48580,48581,48582,48583,48584,48585,48586,48587,48588,48589,48590,48591,48592,48593,48594,48595,48598,48599,48601,48602,48603,48605,48606,48607,48608,48609,48610,48611,48612,48613,48614,48615,48616,48618,48619,48620,48621,48622,48623,48625,null,null,null,null,null,null,48626,48627,48629,48630,48631,48633,48634,48635,48636,48637,48638,48639,48641,48642,48644,48646,48647,48648,48649,48650,48651,48654,48655,48657,48658,48659,null,null,null,null,null,null,48661,48662,48663,48664,48665,48666,48667,48670,48672,48673,48674,48675,48676,48677,48678,48679,48680,48681,48682,48683,48684,48685,48686,48687,48688,48689,48690,48691,48692,48693,48694,48695,48696,48697,48698,48699,48700,48701,48702,48703,48704,48705,48706,48707,48710,48711,48713,48714,48715,48717,48719,48720,48721,48722,48723,48726,48728,48732,48733,48734,48735,48738,48739,48741,48742,48743,48745,48747,48748,48749,48750,48751,48754,48758,48759,48760,48761,48762,48766,48767,48769,48770,48771,48773,48774,48775,48776,48777,48778,48779,48782,48786,48787,48788,48789,48790,48791,48794,48795,48796,48797,48798,48799,48800,48801,48802,48803,48804,48805,48806,48807,48809,48810,48811,48812,48813,48814,48815,48816,48817,48818,48819,48820,48821,48822,48823,48824,48825,48826,48827,48828,48829,48830,48831,48832,48833,48834,48835,48836,48837,48838,48839,48840,48841,48842,48843,48844,48845,48846,48847,48850,48851,null,null,null,null,null,null,48853,48854,48857,48858,48859,48860,48861,48862,48863,48865,48866,48870,48871,48872,48873,48874,48875,48877,48878,48879,48880,48881,48882,48883,48884,48885,null,null,null,null,null,null,48886,48887,48888,48889,48890,48891,48892,48893,48894,48895,48896,48898,48899,48900,48901,48902,48903,48906,48907,48908,48909,48910,48911,48912,48913,48914,48915,48916,48917,48918,48919,48922,48926,48927,48928,48929,48930,48931,48932,48933,48934,48935,48936,48937,48938,48939,48940,48941,48942,48943,48944,48945,48946,48947,48948,48949,48950,48951,48952,48953,48954,48955,48956,48957,48958,48959,48962,48963,48965,48966,48967,48969,48970,48971,48972,48973,48974,48975,48978,48979,48980,48982,48983,48984,48985,48986,48987,48988,48989,48990,48991,48992,48993,48994,48995,48996,48997,48998,48999,49000,49001,49002,49003,49004,49005,49006,49007,49008,49009,49010,49011,49012,49013,49014,49015,49016,49017,49018,49019,49020,49021,49022,49023,49024,49025,49026,49027,49028,49029,49030,49031,49032,49033,49034,49035,49036,49037,49038,49039,49040,49041,49042,49043,49045,49046,49047,49048,49049,49050,49051,49052,49053,null,null,null,null,null,null,49054,49055,49056,49057,49058,49059,49060,49061,49062,49063,49064,49065,49066,49067,49068,49069,49070,49071,49073,49074,49075,49076,49077,49078,49079,49080,null,null,null,null,null,null,49081,49082,49083,49084,49085,49086,49087,49088,49089,49090,49091,49092,49094,49095,49096,49097,49098,49099,49102,49103,49105,49106,49107,49109,49110,49111,49112,49113,49114,49115,49117,49118,49120,49122,49123,49124,49125,49126,49127,49128,49129,49130,49131,49132,49133,49134,49135,49136,49137,49138,49139,49140,49141,49142,49143,49144,49145,49146,49147,49148,49149,49150,49151,49152,49153,49154,49155,49156,49157,49158,49159,49160,49161,49162,49163,49164,49165,49166,49167,49168,49169,49170,49171,49172,49173,49174,49175,49176,49177,49178,49179,49180,49181,49182,49183,49184,49185,49186,49187,49188,49189,49190,49191,49192,49193,49194,49195,49196,49197,49198,49199,49200,49201,49202,49203,49204,49205,49206,49207,49208,49209,49210,49211,49213,49214,49215,49216,49217,49218,49219,49220,49221,49222,49223,49224,49225,49226,49227,49228,49229,49230,49231,49232,49234,49235,49236,49237,49238,49239,49241,49242,49243,null,null,null,null,null,null,49245,49246,49247,49249,49250,49251,49252,49253,49254,49255,49258,49259,49260,49261,49262,49263,49264,49265,49266,49267,49268,49269,49270,49271,49272,49273,null,null,null,null,null,null,49274,49275,49276,49277,49278,49279,49280,49281,49282,49283,49284,49285,49286,49287,49288,49289,49290,49291,49292,49293,49294,49295,49298,49299,49301,49302,49303,49305,49306,49307,49308,49309,49310,49311,49314,49316,49318,49319,49320,49321,49322,49323,49326,49329,49330,49335,49336,49337,49338,49339,49342,49346,49347,49348,49350,49351,49354,49355,49357,49358,49359,49361,49362,49363,49364,49365,49366,49367,49370,49374,49375,49376,49377,49378,49379,49382,49383,49385,49386,49387,49389,49390,49391,49392,49393,49394,49395,49398,49400,49402,49403,49404,49405,49406,49407,49409,49410,49411,49413,49414,49415,49417,49418,49419,49420,49421,49422,49423,49425,49426,49427,49428,49430,49431,49432,49433,49434,49435,49441,49442,49445,49448,49449,49450,49451,49454,49458,49459,49460,49461,49463,49466,49467,49469,49470,49471,49473,49474,49475,49476,49477,49478,49479,49482,49486,49487,49488,49489,49490,49491,49494,49495,null,null,null,null,null,null,49497,49498,49499,49501,49502,49503,49504,49505,49506,49507,49510,49514,49515,49516,49517,49518,49519,49521,49522,49523,49525,49526,49527,49529,49530,49531,null,null,null,null,null,null,49532,49533,49534,49535,49536,49537,49538,49539,49540,49542,49543,49544,49545,49546,49547,49551,49553,49554,49555,49557,49559,49560,49561,49562,49563,49566,49568,49570,49571,49572,49574,49575,49578,49579,49581,49582,49583,49585,49586,49587,49588,49589,49590,49591,49592,49593,49594,49595,49596,49598,49599,49600,49601,49602,49603,49605,49606,49607,49609,49610,49611,49613,49614,49615,49616,49617,49618,49619,49621,49622,49625,49626,49627,49628,49629,49630,49631,49633,49634,49635,49637,49638,49639,49641,49642,49643,49644,49645,49646,49647,49650,49652,49653,49654,49655,49656,49657,49658,49659,49662,49663,49665,49666,49667,49669,49670,49671,49672,49673,49674,49675,49678,49680,49682,49683,49684,49685,49686,49687,49690,49691,49693,49694,49697,49698,49699,49700,49701,49702,49703,49706,49708,49710,49712,49715,49717,49718,49719,49720,49721,49722,49723,49724,49725,49726,49727,49728,49729,49730,49731,49732,49733,null,null,null,null,null,null,49734,49735,49737,49738,49739,49740,49741,49742,49743,49746,49747,49749,49750,49751,49753,49754,49755,49756,49757,49758,49759,49761,49762,49763,49764,49766,null,null,null,null,null,null,49767,49768,49769,49770,49771,49774,49775,49777,49778,49779,49781,49782,49783,49784,49785,49786,49787,49790,49792,49794,49795,49796,49797,49798,49799,49802,49803,49804,49805,49806,49807,49809,49810,49811,49812,49813,49814,49815,49817,49818,49820,49822,49823,49824,49825,49826,49827,49830,49831,49833,49834,49835,49838,49839,49840,49841,49842,49843,49846,49848,49850,49851,49852,49853,49854,49855,49856,49857,49858,49859,49860,49861,49862,49863,49864,49865,49866,49867,49868,49869,49870,49871,49872,49873,49874,49875,49876,49877,49878,49879,49880,49881,49882,49883,49886,49887,49889,49890,49893,49894,49895,49896,49897,49898,49902,49904,49906,49907,49908,49909,49911,49914,49917,49918,49919,49921,49922,49923,49924,49925,49926,49927,49930,49931,49934,49935,49936,49937,49938,49942,49943,49945,49946,49947,49949,49950,49951,49952,49953,49954,49955,49958,49959,49962,49963,49964,49965,49966,49967,49968,49969,49970,null,null,null,null,null,null,49971,49972,49973,49974,49975,49976,49977,49978,49979,49980,49981,49982,49983,49984,49985,49986,49987,49988,49990,49991,49992,49993,49994,49995,49996,49997,null,null,null,null,null,null,49998,49999,50000,50001,50002,50003,50004,50005,50006,50007,50008,50009,50010,50011,50012,50013,50014,50015,50016,50017,50018,50019,50020,50021,50022,50023,50026,50027,50029,50030,50031,50033,50035,50036,50037,50038,50039,50042,50043,50046,50047,50048,50049,50050,50051,50053,50054,50055,50057,50058,50059,50061,50062,50063,50064,50065,50066,50067,50068,50069,50070,50071,50072,50073,50074,50075,50076,50077,50078,50079,50080,50081,50082,50083,50084,50085,50086,50087,50088,50089,50090,50091,50092,50093,50094,50095,50096,50097,50098,50099,50100,50101,50102,50103,50104,50105,50106,50107,50108,50109,50110,50111,50113,50114,50115,50116,50117,50118,50119,50120,50121,50122,50123,50124,50125,50126,50127,50128,50129,50130,50131,50132,50133,50134,50135,50138,50139,50141,50142,50145,50147,50148,50149,50150,50151,50154,50155,50156,50158,50159,50160,50161,50162,50163,50166,50167,50169,50170,50171,50172,50173,50174,null,null,null,null,null,null,50175,50176,50177,50178,50179,50180,50181,50182,50183,50185,50186,50187,50188,50189,50190,50191,50193,50194,50195,50196,50197,50198,50199,50200,50201,50202,null,null,null,null,null,null,50203,50204,50205,50206,50207,50208,50209,50210,50211,50213,50214,50215,50216,50217,50218,50219,50221,50222,50223,50225,50226,50227,50229,50230,50231,50232,50233,50234,50235,50238,50239,50240,50241,50242,50243,50244,50245,50246,50247,50249,50250,50251,50252,50253,50254,50255,50256,50257,50258,50259,50260,50261,50262,50263,50264,50265,50266,50267,50268,50269,50270,50271,50272,50273,50274,50275,50278,50279,50281,50282,50283,50285,50286,50287,50288,50289,50290,50291,50294,50295,50296,50298,50299,50300,50301,50302,50303,50305,50306,50307,50308,50309,50310,50311,50312,50313,50314,50315,50316,50317,50318,50319,50320,50321,50322,50323,50325,50326,50327,50328,50329,50330,50331,50333,50334,50335,50336,50337,50338,50339,50340,50341,50342,50343,50344,50345,50346,50347,50348,50349,50350,50351,50352,50353,50354,50355,50356,50357,50358,50359,50361,50362,50363,50365,50366,50367,50368,50369,50370,50371,50372,50373,null,null,null,null,null,null,50374,50375,50376,50377,50378,50379,50380,50381,50382,50383,50384,50385,50386,50387,50388,50389,50390,50391,50392,50393,50394,50395,50396,50397,50398,50399,null,null,null,null,null,null,50400,50401,50402,50403,50404,50405,50406,50407,50408,50410,50411,50412,50413,50414,50415,50418,50419,50421,50422,50423,50425,50427,50428,50429,50430,50434,50435,50436,50437,50438,50439,50440,50441,50442,50443,50445,50446,50447,50449,50450,50451,50453,50454,50455,50456,50457,50458,50459,50461,50462,50463,50464,50465,50466,50467,50468,50469,50470,50471,50474,50475,50477,50478,50479,50481,50482,50483,50484,50485,50486,50487,50490,50492,50494,50495,50496,50497,50498,50499,50502,50503,50507,50511,50512,50513,50514,50518,50522,50523,50524,50527,50530,50531,50533,50534,50535,50537,50538,50539,50540,50541,50542,50543,50546,50550,50551,50552,50553,50554,50555,50558,50559,50561,50562,50563,50565,50566,50568,50569,50570,50571,50574,50576,50578,50579,50580,50582,50585,50586,50587,50589,50590,50591,50593,50594,50595,50596,50597,50598,50599,50600,50602,50603,50604,50605,50606,50607,50608,50609,50610,50611,50614,null,null,null,null,null,null,50615,50618,50623,50624,50625,50626,50627,50635,50637,50639,50642,50643,50645,50646,50647,50649,50650,50651,50652,50653,50654,50655,50658,50660,50662,50663,null,null,null,null,null,null,50664,50665,50666,50667,50671,50673,50674,50675,50677,50680,50681,50682,50683,50690,50691,50692,50697,50698,50699,50701,50702,50703,50705,50706,50707,50708,50709,50710,50711,50714,50717,50718,50719,50720,50721,50722,50723,50726,50727,50729,50730,50731,50735,50737,50738,50742,50744,50746,50748,50749,50750,50751,50754,50755,50757,50758,50759,50761,50762,50763,50764,50765,50766,50767,50770,50774,50775,50776,50777,50778,50779,50782,50783,50785,50786,50787,50788,50789,50790,50791,50792,50793,50794,50795,50797,50798,50800,50802,50803,50804,50805,50806,50807,50810,50811,50813,50814,50815,50817,50818,50819,50820,50821,50822,50823,50826,50828,50830,50831,50832,50833,50834,50835,50838,50839,50841,50842,50843,50845,50846,50847,50848,50849,50850,50851,50854,50856,50858,50859,50860,50861,50862,50863,50866,50867,50869,50870,50871,50875,50876,50877,50878,50879,50882,50884,50886,50887,50888,50889,50890,50891,50894,null,null,null,null,null,null,50895,50897,50898,50899,50901,50902,50903,50904,50905,50906,50907,50910,50911,50914,50915,50916,50917,50918,50919,50922,50923,50925,50926,50927,50929,50930,null,null,null,null,null,null,50931,50932,50933,50934,50935,50938,50939,50940,50942,50943,50944,50945,50946,50947,50950,50951,50953,50954,50955,50957,50958,50959,50960,50961,50962,50963,50966,50968,50970,50971,50972,50973,50974,50975,50978,50979,50981,50982,50983,50985,50986,50987,50988,50989,50990,50991,50994,50996,50998,51000,51001,51002,51003,51006,51007,51009,51010,51011,51013,51014,51015,51016,51017,51019,51022,51024,51033,51034,51035,51037,51038,51039,51041,51042,51043,51044,51045,51046,51047,51049,51050,51052,51053,51054,51055,51056,51057,51058,51059,51062,51063,51065,51066,51067,51071,51072,51073,51074,51078,51083,51084,51085,51087,51090,51091,51093,51097,51099,51100,51101,51102,51103,51106,51111,51112,51113,51114,51115,51118,51119,51121,51122,51123,51125,51126,51127,51128,51129,51130,51131,51134,51138,51139,51140,51141,51142,51143,51146,51147,51149,51151,51153,51154,51155,51156,51157,51158,51159,51161,51162,51163,51164,null,null,null,null,null,null,51166,51167,51168,51169,51170,51171,51173,51174,51175,51177,51178,51179,51181,51182,51183,51184,51185,51186,51187,51188,51189,51190,51191,51192,51193,51194,null,null,null,null,null,null,51195,51196,51197,51198,51199,51202,51203,51205,51206,51207,51209,51211,51212,51213,51214,51215,51218,51220,51223,51224,51225,51226,51227,51230,51231,51233,51234,51235,51237,51238,51239,51240,51241,51242,51243,51246,51248,51250,51251,51252,51253,51254,51255,51257,51258,51259,51261,51262,51263,51265,51266,51267,51268,51269,51270,51271,51274,51275,51278,51279,51280,51281,51282,51283,51285,51286,51287,51288,51289,51290,51291,51292,51293,51294,51295,51296,51297,51298,51299,51300,51301,51302,51303,51304,51305,51306,51307,51308,51309,51310,51311,51314,51315,51317,51318,51319,51321,51323,51324,51325,51326,51327,51330,51332,51336,51337,51338,51342,51343,51344,51345,51346,51347,51349,51350,51351,51352,51353,51354,51355,51356,51358,51360,51362,51363,51364,51365,51366,51367,51369,51370,51371,51372,51373,51374,51375,51376,51377,51378,51379,51380,51381,51382,51383,51384,51385,51386,51387,51390,51391,51392,51393,null,null,null,null,null,null,51394,51395,51397,51398,51399,51401,51402,51403,51405,51406,51407,51408,51409,51410,51411,51414,51416,51418,51419,51420,51421,51422,51423,51426,51427,51429,null,null,null,null,null,null,51430,51431,51432,51433,51434,51435,51436,51437,51438,51439,51440,51441,51442,51443,51444,51446,51447,51448,51449,51450,51451,51454,51455,51457,51458,51459,51463,51464,51465,51466,51467,51470,12288,12289,12290,183,8229,8230,168,12291,173,8213,8741,65340,8764,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,177,215,247,8800,8804,8805,8734,8756,176,8242,8243,8451,8491,65504,65505,65509,9794,9792,8736,8869,8978,8706,8711,8801,8786,167,8251,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8594,8592,8593,8595,8596,12307,8810,8811,8730,8765,8733,8757,8747,8748,8712,8715,8838,8839,8834,8835,8746,8745,8743,8744,65506,51472,51474,51475,51476,51477,51478,51479,51481,51482,51483,51484,51485,51486,51487,51488,51489,51490,51491,51492,51493,51494,51495,51496,51497,51498,51499,null,null,null,null,null,null,51501,51502,51503,51504,51505,51506,51507,51509,51510,51511,51512,51513,51514,51515,51516,51517,51518,51519,51520,51521,51522,51523,51524,51525,51526,51527,null,null,null,null,null,null,51528,51529,51530,51531,51532,51533,51534,51535,51538,51539,51541,51542,51543,51545,51546,51547,51548,51549,51550,51551,51554,51556,51557,51558,51559,51560,51561,51562,51563,51565,51566,51567,8658,8660,8704,8707,180,65374,711,728,733,730,729,184,731,161,191,720,8750,8721,8719,164,8457,8240,9665,9664,9655,9654,9828,9824,9825,9829,9831,9827,8857,9672,9635,9680,9681,9618,9636,9637,9640,9639,9638,9641,9832,9743,9742,9756,9758,182,8224,8225,8597,8599,8601,8598,8600,9837,9833,9834,9836,12927,12828,8470,13255,8482,13250,13272,8481,8364,174,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51569,51570,51571,51573,51574,51575,51576,51577,51578,51579,51581,51582,51583,51584,51585,51586,51587,51588,51589,51590,51591,51594,51595,51597,51598,51599,null,null,null,null,null,null,51601,51602,51603,51604,51605,51606,51607,51610,51612,51614,51615,51616,51617,51618,51619,51620,51621,51622,51623,51624,51625,51626,51627,51628,51629,51630,null,null,null,null,null,null,51631,51632,51633,51634,51635,51636,51637,51638,51639,51640,51641,51642,51643,51644,51645,51646,51647,51650,51651,51653,51654,51657,51659,51660,51661,51662,51663,51666,51668,51671,51672,51675,65281,65282,65283,65284,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65510,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,51678,51679,51681,51683,51685,51686,51688,51689,51690,51691,51694,51698,51699,51700,51701,51702,51703,51706,51707,51709,51710,51711,51713,51714,51715,51716,null,null,null,null,null,null,51717,51718,51719,51722,51726,51727,51728,51729,51730,51731,51733,51734,51735,51737,51738,51739,51740,51741,51742,51743,51744,51745,51746,51747,51748,51749,null,null,null,null,null,null,51750,51751,51752,51754,51755,51756,51757,51758,51759,51760,51761,51762,51763,51764,51765,51766,51767,51768,51769,51770,51771,51772,51773,51774,51775,51776,51777,51778,51779,51780,51781,51782,12593,12594,12595,12596,12597,12598,12599,12600,12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616,12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679,12680,12681,12682,12683,12684,12685,12686,51783,51784,51785,51786,51787,51790,51791,51793,51794,51795,51797,51798,51799,51800,51801,51802,51803,51806,51810,51811,51812,51813,51814,51815,51817,51818,null,null,null,null,null,null,51819,51820,51821,51822,51823,51824,51825,51826,51827,51828,51829,51830,51831,51832,51833,51834,51835,51836,51838,51839,51840,51841,51842,51843,51845,51846,null,null,null,null,null,null,51847,51848,51849,51850,51851,51852,51853,51854,51855,51856,51857,51858,51859,51860,51861,51862,51863,51865,51866,51867,51868,51869,51870,51871,51872,51873,51874,51875,51876,51877,51878,51879,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,null,null,null,null,null,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,51880,51881,51882,51883,51884,51885,51886,51887,51888,51889,51890,51891,51892,51893,51894,51895,51896,51897,51898,51899,51902,51903,51905,51906,51907,51909,null,null,null,null,null,null,51910,51911,51912,51913,51914,51915,51918,51920,51922,51924,51925,51926,51927,51930,51931,51932,51933,51934,51935,51937,51938,51939,51940,51941,51942,51943,null,null,null,null,null,null,51944,51945,51946,51947,51949,51950,51951,51952,51953,51954,51955,51957,51958,51959,51960,51961,51962,51963,51964,51965,51966,51967,51968,51969,51970,51971,51972,51973,51974,51975,51977,51978,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,9490,9489,9498,9497,9494,9493,9486,9485,9502,9503,9505,9506,9510,9511,9513,9514,9517,9518,9521,9522,9525,9526,9529,9530,9533,9534,9536,9537,9539,9540,9541,9542,9543,9544,9545,9546,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51979,51980,51981,51982,51983,51985,51986,51987,51989,51990,51991,51993,51994,51995,51996,51997,51998,51999,52002,52003,52004,52005,52006,52007,52008,52009,null,null,null,null,null,null,52010,52011,52012,52013,52014,52015,52016,52017,52018,52019,52020,52021,52022,52023,52024,52025,52026,52027,52028,52029,52030,52031,52032,52034,52035,52036,null,null,null,null,null,null,52037,52038,52039,52042,52043,52045,52046,52047,52049,52050,52051,52052,52053,52054,52055,52058,52059,52060,52062,52063,52064,52065,52066,52067,52069,52070,52071,52072,52073,52074,52075,52076,13205,13206,13207,8467,13208,13252,13219,13220,13221,13222,13209,13210,13211,13212,13213,13214,13215,13216,13217,13218,13258,13197,13198,13199,13263,13192,13193,13256,13223,13224,13232,13233,13234,13235,13236,13237,13238,13239,13240,13241,13184,13185,13186,13187,13188,13242,13243,13244,13245,13246,13247,13200,13201,13202,13203,13204,8486,13248,13249,13194,13195,13196,13270,13253,13229,13230,13231,13275,13225,13226,13227,13228,13277,13264,13267,13251,13257,13276,13254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52077,52078,52079,52080,52081,52082,52083,52084,52085,52086,52087,52090,52091,52092,52093,52094,52095,52096,52097,52098,52099,52100,52101,52102,52103,52104,null,null,null,null,null,null,52105,52106,52107,52108,52109,52110,52111,52112,52113,52114,52115,52116,52117,52118,52119,52120,52121,52122,52123,52125,52126,52127,52128,52129,52130,52131,null,null,null,null,null,null,52132,52133,52134,52135,52136,52137,52138,52139,52140,52141,52142,52143,52144,52145,52146,52147,52148,52149,52150,52151,52153,52154,52155,52156,52157,52158,52159,52160,52161,52162,52163,52164,198,208,170,294,null,306,null,319,321,216,338,186,222,358,330,null,12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911,12912,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,9424,9425,9426,9427,9428,9429,9430,9431,9432,9433,9434,9435,9436,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446,9447,9448,9449,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,189,8531,8532,188,190,8539,8540,8541,8542,52165,52166,52167,52168,52169,52170,52171,52172,52173,52174,52175,52176,52177,52178,52179,52181,52182,52183,52184,52185,52186,52187,52188,52189,52190,52191,null,null,null,null,null,null,52192,52193,52194,52195,52197,52198,52200,52202,52203,52204,52205,52206,52207,52208,52209,52210,52211,52212,52213,52214,52215,52216,52217,52218,52219,52220,null,null,null,null,null,null,52221,52222,52223,52224,52225,52226,52227,52228,52229,52230,52231,52232,52233,52234,52235,52238,52239,52241,52242,52243,52245,52246,52247,52248,52249,52250,52251,52254,52255,52256,52259,52260,230,273,240,295,305,307,312,320,322,248,339,223,254,359,331,329,12800,12801,12802,12803,12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819,12820,12821,12822,12823,12824,12825,12826,12827,9372,9373,9374,9375,9376,9377,9378,9379,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389,9390,9391,9392,9393,9394,9395,9396,9397,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,185,178,179,8308,8319,8321,8322,8323,8324,52261,52262,52266,52267,52269,52271,52273,52274,52275,52276,52277,52278,52279,52282,52287,52288,52289,52290,52291,52294,52295,52297,52298,52299,52301,52302,null,null,null,null,null,null,52303,52304,52305,52306,52307,52310,52314,52315,52316,52317,52318,52319,52321,52322,52323,52325,52327,52329,52330,52331,52332,52333,52334,52335,52337,52338,null,null,null,null,null,null,52339,52340,52342,52343,52344,52345,52346,52347,52348,52349,52350,52351,52352,52353,52354,52355,52356,52357,52358,52359,52360,52361,52362,52363,52364,52365,52366,52367,52368,52369,52370,52371,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,52372,52373,52374,52375,52378,52379,52381,52382,52383,52385,52386,52387,52388,52389,52390,52391,52394,52398,52399,52400,52401,52402,52403,52406,52407,52409,null,null,null,null,null,null,52410,52411,52413,52414,52415,52416,52417,52418,52419,52422,52424,52426,52427,52428,52429,52430,52431,52433,52434,52435,52437,52438,52439,52440,52441,52442,null,null,null,null,null,null,52443,52444,52445,52446,52447,52448,52449,52450,52451,52453,52454,52455,52456,52457,52458,52459,52461,52462,52463,52465,52466,52467,52468,52469,52470,52471,52472,52473,52474,52475,52476,52477,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,52478,52479,52480,52482,52483,52484,52485,52486,52487,52490,52491,52493,52494,52495,52497,52498,52499,52500,52501,52502,52503,52506,52508,52510,52511,52512,null,null,null,null,null,null,52513,52514,52515,52517,52518,52519,52521,52522,52523,52525,52526,52527,52528,52529,52530,52531,52532,52533,52534,52535,52536,52538,52539,52540,52541,52542,null,null,null,null,null,null,52543,52544,52545,52546,52547,52548,52549,52550,52551,52552,52553,52554,52555,52556,52557,52558,52559,52560,52561,52562,52563,52564,52565,52566,52567,52568,52569,52570,52571,52573,52574,52575,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,52577,52578,52579,52581,52582,52583,52584,52585,52586,52587,52590,52592,52594,52595,52596,52597,52598,52599,52601,52602,52603,52604,52605,52606,52607,52608,null,null,null,null,null,null,52609,52610,52611,52612,52613,52614,52615,52617,52618,52619,52620,52621,52622,52623,52624,52625,52626,52627,52630,52631,52633,52634,52635,52637,52638,52639,null,null,null,null,null,null,52640,52641,52642,52643,52646,52648,52650,52651,52652,52653,52654,52655,52657,52658,52659,52660,52661,52662,52663,52664,52665,52666,52667,52668,52669,52670,52671,52672,52673,52674,52675,52677,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52678,52679,52680,52681,52682,52683,52685,52686,52687,52689,52690,52691,52692,52693,52694,52695,52696,52697,52698,52699,52700,52701,52702,52703,52704,52705,null,null,null,null,null,null,52706,52707,52708,52709,52710,52711,52713,52714,52715,52717,52718,52719,52721,52722,52723,52724,52725,52726,52727,52730,52732,52734,52735,52736,52737,52738,null,null,null,null,null,null,52739,52741,52742,52743,52745,52746,52747,52749,52750,52751,52752,52753,52754,52755,52757,52758,52759,52760,52762,52763,52764,52765,52766,52767,52770,52771,52773,52774,52775,52777,52778,52779,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52780,52781,52782,52783,52786,52788,52790,52791,52792,52793,52794,52795,52796,52797,52798,52799,52800,52801,52802,52803,52804,52805,52806,52807,52808,52809,null,null,null,null,null,null,52810,52811,52812,52813,52814,52815,52816,52817,52818,52819,52820,52821,52822,52823,52826,52827,52829,52830,52834,52835,52836,52837,52838,52839,52842,52844,null,null,null,null,null,null,52846,52847,52848,52849,52850,52851,52854,52855,52857,52858,52859,52861,52862,52863,52864,52865,52866,52867,52870,52872,52874,52875,52876,52877,52878,52879,52882,52883,52885,52886,52887,52889,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52890,52891,52892,52893,52894,52895,52898,52902,52903,52904,52905,52906,52907,52910,52911,52912,52913,52914,52915,52916,52917,52918,52919,52920,52921,52922,null,null,null,null,null,null,52923,52924,52925,52926,52927,52928,52930,52931,52932,52933,52934,52935,52936,52937,52938,52939,52940,52941,52942,52943,52944,52945,52946,52947,52948,52949,null,null,null,null,null,null,52950,52951,52952,52953,52954,52955,52956,52957,52958,52959,52960,52961,52962,52963,52966,52967,52969,52970,52973,52974,52975,52976,52977,52978,52979,52982,52986,52987,52988,52989,52990,52991,44032,44033,44036,44039,44040,44041,44042,44048,44049,44050,44051,44052,44053,44054,44055,44057,44058,44059,44060,44061,44064,44068,44076,44077,44079,44080,44081,44088,44089,44092,44096,44107,44109,44116,44120,44124,44144,44145,44148,44151,44152,44154,44160,44161,44163,44164,44165,44166,44169,44170,44171,44172,44176,44180,44188,44189,44191,44192,44193,44200,44201,44202,44204,44207,44208,44216,44217,44219,44220,44221,44225,44228,44232,44236,44245,44247,44256,44257,44260,44263,44264,44266,44268,44271,44272,44273,44275,44277,44278,44284,44285,44288,44292,44294,52994,52995,52997,52998,52999,53001,53002,53003,53004,53005,53006,53007,53010,53012,53014,53015,53016,53017,53018,53019,53021,53022,53023,53025,53026,53027,null,null,null,null,null,null,53029,53030,53031,53032,53033,53034,53035,53038,53042,53043,53044,53045,53046,53047,53049,53050,53051,53052,53053,53054,53055,53056,53057,53058,53059,53060,null,null,null,null,null,null,53061,53062,53063,53064,53065,53066,53067,53068,53069,53070,53071,53072,53073,53074,53075,53078,53079,53081,53082,53083,53085,53086,53087,53088,53089,53090,53091,53094,53096,53098,53099,53100,44300,44301,44303,44305,44312,44316,44320,44329,44332,44333,44340,44341,44344,44348,44356,44357,44359,44361,44368,44372,44376,44385,44387,44396,44397,44400,44403,44404,44405,44406,44411,44412,44413,44415,44417,44418,44424,44425,44428,44432,44444,44445,44452,44471,44480,44481,44484,44488,44496,44497,44499,44508,44512,44516,44536,44537,44540,44543,44544,44545,44552,44553,44555,44557,44564,44592,44593,44596,44599,44600,44602,44608,44609,44611,44613,44614,44618,44620,44621,44622,44624,44628,44630,44636,44637,44639,44640,44641,44645,44648,44649,44652,44656,44664,53101,53102,53103,53106,53107,53109,53110,53111,53113,53114,53115,53116,53117,53118,53119,53121,53122,53123,53124,53126,53127,53128,53129,53130,53131,53133,null,null,null,null,null,null,53134,53135,53136,53137,53138,53139,53140,53141,53142,53143,53144,53145,53146,53147,53148,53149,53150,53151,53152,53154,53155,53156,53157,53158,53159,53161,null,null,null,null,null,null,53162,53163,53164,53165,53166,53167,53169,53170,53171,53172,53173,53174,53175,53176,53177,53178,53179,53180,53181,53182,53183,53184,53185,53186,53187,53189,53190,53191,53192,53193,53194,53195,44665,44667,44668,44669,44676,44677,44684,44732,44733,44734,44736,44740,44748,44749,44751,44752,44753,44760,44761,44764,44776,44779,44781,44788,44792,44796,44807,44808,44813,44816,44844,44845,44848,44850,44852,44860,44861,44863,44865,44866,44867,44872,44873,44880,44892,44893,44900,44901,44921,44928,44932,44936,44944,44945,44949,44956,44984,44985,44988,44992,44999,45000,45001,45003,45005,45006,45012,45020,45032,45033,45040,45041,45044,45048,45056,45057,45060,45068,45072,45076,45084,45085,45096,45124,45125,45128,45130,45132,45134,45139,45140,45141,45143,45145,53196,53197,53198,53199,53200,53201,53202,53203,53204,53205,53206,53207,53208,53209,53210,53211,53212,53213,53214,53215,53218,53219,53221,53222,53223,53225,null,null,null,null,null,null,53226,53227,53228,53229,53230,53231,53234,53236,53238,53239,53240,53241,53242,53243,53245,53246,53247,53249,53250,53251,53253,53254,53255,53256,53257,53258,null,null,null,null,null,null,53259,53260,53261,53262,53263,53264,53266,53267,53268,53269,53270,53271,53273,53274,53275,53276,53277,53278,53279,53280,53281,53282,53283,53284,53285,53286,53287,53288,53289,53290,53291,53292,45149,45180,45181,45184,45188,45196,45197,45199,45201,45208,45209,45210,45212,45215,45216,45217,45218,45224,45225,45227,45228,45229,45230,45231,45233,45235,45236,45237,45240,45244,45252,45253,45255,45256,45257,45264,45265,45268,45272,45280,45285,45320,45321,45323,45324,45328,45330,45331,45336,45337,45339,45340,45341,45347,45348,45349,45352,45356,45364,45365,45367,45368,45369,45376,45377,45380,45384,45392,45393,45396,45397,45400,45404,45408,45432,45433,45436,45440,45442,45448,45449,45451,45453,45458,45459,45460,45464,45468,45480,45516,45520,45524,45532,45533,53294,53295,53296,53297,53298,53299,53302,53303,53305,53306,53307,53309,53310,53311,53312,53313,53314,53315,53318,53320,53322,53323,53324,53325,53326,53327,null,null,null,null,null,null,53329,53330,53331,53333,53334,53335,53337,53338,53339,53340,53341,53342,53343,53345,53346,53347,53348,53349,53350,53351,53352,53353,53354,53355,53358,53359,null,null,null,null,null,null,53361,53362,53363,53365,53366,53367,53368,53369,53370,53371,53374,53375,53376,53378,53379,53380,53381,53382,53383,53384,53385,53386,53387,53388,53389,53390,53391,53392,53393,53394,53395,53396,45535,45544,45545,45548,45552,45561,45563,45565,45572,45573,45576,45579,45580,45588,45589,45591,45593,45600,45620,45628,45656,45660,45664,45672,45673,45684,45685,45692,45700,45701,45705,45712,45713,45716,45720,45721,45722,45728,45729,45731,45733,45734,45738,45740,45744,45748,45768,45769,45772,45776,45778,45784,45785,45787,45789,45794,45796,45797,45798,45800,45803,45804,45805,45806,45807,45811,45812,45813,45815,45816,45817,45818,45819,45823,45824,45825,45828,45832,45840,45841,45843,45844,45845,45852,45908,45909,45910,45912,45915,45916,45918,45919,45924,45925,53397,53398,53399,53400,53401,53402,53403,53404,53405,53406,53407,53408,53409,53410,53411,53414,53415,53417,53418,53419,53421,53422,53423,53424,53425,53426,null,null,null,null,null,null,53427,53430,53432,53434,53435,53436,53437,53438,53439,53442,53443,53445,53446,53447,53450,53451,53452,53453,53454,53455,53458,53462,53463,53464,53465,53466,null,null,null,null,null,null,53467,53470,53471,53473,53474,53475,53477,53478,53479,53480,53481,53482,53483,53486,53490,53491,53492,53493,53494,53495,53497,53498,53499,53500,53501,53502,53503,53504,53505,53506,53507,53508,45927,45929,45931,45934,45936,45937,45940,45944,45952,45953,45955,45956,45957,45964,45968,45972,45984,45985,45992,45996,46020,46021,46024,46027,46028,46030,46032,46036,46037,46039,46041,46043,46045,46048,46052,46056,46076,46096,46104,46108,46112,46120,46121,46123,46132,46160,46161,46164,46168,46176,46177,46179,46181,46188,46208,46216,46237,46244,46248,46252,46261,46263,46265,46272,46276,46280,46288,46293,46300,46301,46304,46307,46308,46310,46316,46317,46319,46321,46328,46356,46357,46360,46363,46364,46372,46373,46375,46376,46377,46378,46384,46385,46388,46392,53509,53510,53511,53512,53513,53514,53515,53516,53518,53519,53520,53521,53522,53523,53524,53525,53526,53527,53528,53529,53530,53531,53532,53533,53534,53535,null,null,null,null,null,null,53536,53537,53538,53539,53540,53541,53542,53543,53544,53545,53546,53547,53548,53549,53550,53551,53554,53555,53557,53558,53559,53561,53563,53564,53565,53566,null,null,null,null,null,null,53567,53570,53574,53575,53576,53577,53578,53579,53582,53583,53585,53586,53587,53589,53590,53591,53592,53593,53594,53595,53598,53600,53602,53603,53604,53605,53606,53607,53609,53610,53611,53613,46400,46401,46403,46404,46405,46411,46412,46413,46416,46420,46428,46429,46431,46432,46433,46496,46497,46500,46504,46506,46507,46512,46513,46515,46516,46517,46523,46524,46525,46528,46532,46540,46541,46543,46544,46545,46552,46572,46608,46609,46612,46616,46629,46636,46644,46664,46692,46696,46748,46749,46752,46756,46763,46764,46769,46804,46832,46836,46840,46848,46849,46853,46888,46889,46892,46895,46896,46904,46905,46907,46916,46920,46924,46932,46933,46944,46948,46952,46960,46961,46963,46965,46972,46973,46976,46980,46988,46989,46991,46992,46993,46994,46998,46999,53614,53615,53616,53617,53618,53619,53620,53621,53622,53623,53624,53625,53626,53627,53629,53630,53631,53632,53633,53634,53635,53637,53638,53639,53641,53642,null,null,null,null,null,null,53643,53644,53645,53646,53647,53648,53649,53650,53651,53652,53653,53654,53655,53656,53657,53658,53659,53660,53661,53662,53663,53666,53667,53669,53670,53671,null,null,null,null,null,null,53673,53674,53675,53676,53677,53678,53679,53682,53684,53686,53687,53688,53689,53691,53693,53694,53695,53697,53698,53699,53700,53701,53702,53703,53704,53705,53706,53707,53708,53709,53710,53711,47000,47001,47004,47008,47016,47017,47019,47020,47021,47028,47029,47032,47047,47049,47084,47085,47088,47092,47100,47101,47103,47104,47105,47111,47112,47113,47116,47120,47128,47129,47131,47133,47140,47141,47144,47148,47156,47157,47159,47160,47161,47168,47172,47185,47187,47196,47197,47200,47204,47212,47213,47215,47217,47224,47228,47245,47272,47280,47284,47288,47296,47297,47299,47301,47308,47312,47316,47325,47327,47329,47336,47337,47340,47344,47352,47353,47355,47357,47364,47384,47392,47420,47421,47424,47428,47436,47439,47441,47448,47449,47452,47456,47464,47465,53712,53713,53714,53715,53716,53717,53718,53719,53721,53722,53723,53724,53725,53726,53727,53728,53729,53730,53731,53732,53733,53734,53735,53736,53737,53738,null,null,null,null,null,null,53739,53740,53741,53742,53743,53744,53745,53746,53747,53749,53750,53751,53753,53754,53755,53756,53757,53758,53759,53760,53761,53762,53763,53764,53765,53766,null,null,null,null,null,null,53768,53770,53771,53772,53773,53774,53775,53777,53778,53779,53780,53781,53782,53783,53784,53785,53786,53787,53788,53789,53790,53791,53792,53793,53794,53795,53796,53797,53798,53799,53800,53801,47467,47469,47476,47477,47480,47484,47492,47493,47495,47497,47498,47501,47502,47532,47533,47536,47540,47548,47549,47551,47553,47560,47561,47564,47566,47567,47568,47569,47570,47576,47577,47579,47581,47582,47585,47587,47588,47589,47592,47596,47604,47605,47607,47608,47609,47610,47616,47617,47624,47637,47672,47673,47676,47680,47682,47688,47689,47691,47693,47694,47699,47700,47701,47704,47708,47716,47717,47719,47720,47721,47728,47729,47732,47736,47747,47748,47749,47751,47756,47784,47785,47787,47788,47792,47794,47800,47801,47803,47805,47812,47816,47832,47833,47868,53802,53803,53806,53807,53809,53810,53811,53813,53814,53815,53816,53817,53818,53819,53822,53824,53826,53827,53828,53829,53830,53831,53833,53834,53835,53836,null,null,null,null,null,null,53837,53838,53839,53840,53841,53842,53843,53844,53845,53846,53847,53848,53849,53850,53851,53853,53854,53855,53856,53857,53858,53859,53861,53862,53863,53864,null,null,null,null,null,null,53865,53866,53867,53868,53869,53870,53871,53872,53873,53874,53875,53876,53877,53878,53879,53880,53881,53882,53883,53884,53885,53886,53887,53890,53891,53893,53894,53895,53897,53898,53899,53900,47872,47876,47885,47887,47889,47896,47900,47904,47913,47915,47924,47925,47926,47928,47931,47932,47933,47934,47940,47941,47943,47945,47949,47951,47952,47956,47960,47969,47971,47980,48008,48012,48016,48036,48040,48044,48052,48055,48064,48068,48072,48080,48083,48120,48121,48124,48127,48128,48130,48136,48137,48139,48140,48141,48143,48145,48148,48149,48150,48151,48152,48155,48156,48157,48158,48159,48164,48165,48167,48169,48173,48176,48177,48180,48184,48192,48193,48195,48196,48197,48201,48204,48205,48208,48221,48260,48261,48264,48267,48268,48270,48276,48277,48279,53901,53902,53903,53906,53907,53908,53910,53911,53912,53913,53914,53915,53917,53918,53919,53921,53922,53923,53925,53926,53927,53928,53929,53930,53931,53933,null,null,null,null,null,null,53934,53935,53936,53938,53939,53940,53941,53942,53943,53946,53947,53949,53950,53953,53955,53956,53957,53958,53959,53962,53964,53965,53966,53967,53968,53969,null,null,null,null,null,null,53970,53971,53973,53974,53975,53977,53978,53979,53981,53982,53983,53984,53985,53986,53987,53990,53991,53992,53993,53994,53995,53996,53997,53998,53999,54002,54003,54005,54006,54007,54009,54010,48281,48282,48288,48289,48292,48295,48296,48304,48305,48307,48308,48309,48316,48317,48320,48324,48333,48335,48336,48337,48341,48344,48348,48372,48373,48374,48376,48380,48388,48389,48391,48393,48400,48404,48420,48428,48448,48456,48457,48460,48464,48472,48473,48484,48488,48512,48513,48516,48519,48520,48521,48522,48528,48529,48531,48533,48537,48538,48540,48548,48560,48568,48596,48597,48600,48604,48617,48624,48628,48632,48640,48643,48645,48652,48653,48656,48660,48668,48669,48671,48708,48709,48712,48716,48718,48724,48725,48727,48729,48730,48731,48736,48737,48740,54011,54012,54013,54014,54015,54018,54020,54022,54023,54024,54025,54026,54027,54031,54033,54034,54035,54037,54039,54040,54041,54042,54043,54046,54050,54051,null,null,null,null,null,null,54052,54054,54055,54058,54059,54061,54062,54063,54065,54066,54067,54068,54069,54070,54071,54074,54078,54079,54080,54081,54082,54083,54086,54087,54088,54089,null,null,null,null,null,null,54090,54091,54092,54093,54094,54095,54096,54097,54098,54099,54100,54101,54102,54103,54104,54105,54106,54107,54108,54109,54110,54111,54112,54113,54114,54115,54116,54117,54118,54119,54120,54121,48744,48746,48752,48753,48755,48756,48757,48763,48764,48765,48768,48772,48780,48781,48783,48784,48785,48792,48793,48808,48848,48849,48852,48855,48856,48864,48867,48868,48869,48876,48897,48904,48905,48920,48921,48923,48924,48925,48960,48961,48964,48968,48976,48977,48981,49044,49072,49093,49100,49101,49104,49108,49116,49119,49121,49212,49233,49240,49244,49248,49256,49257,49296,49297,49300,49304,49312,49313,49315,49317,49324,49325,49327,49328,49331,49332,49333,49334,49340,49341,49343,49344,49345,49349,49352,49353,49356,49360,49368,49369,49371,49372,49373,49380,54122,54123,54124,54125,54126,54127,54128,54129,54130,54131,54132,54133,54134,54135,54136,54137,54138,54139,54142,54143,54145,54146,54147,54149,54150,54151,null,null,null,null,null,null,54152,54153,54154,54155,54158,54162,54163,54164,54165,54166,54167,54170,54171,54173,54174,54175,54177,54178,54179,54180,54181,54182,54183,54186,54188,54190,null,null,null,null,null,null,54191,54192,54193,54194,54195,54197,54198,54199,54201,54202,54203,54205,54206,54207,54208,54209,54210,54211,54214,54215,54218,54219,54220,54221,54222,54223,54225,54226,54227,54228,54229,54230,49381,49384,49388,49396,49397,49399,49401,49408,49412,49416,49424,49429,49436,49437,49438,49439,49440,49443,49444,49446,49447,49452,49453,49455,49456,49457,49462,49464,49465,49468,49472,49480,49481,49483,49484,49485,49492,49493,49496,49500,49508,49509,49511,49512,49513,49520,49524,49528,49541,49548,49549,49550,49552,49556,49558,49564,49565,49567,49569,49573,49576,49577,49580,49584,49597,49604,49608,49612,49620,49623,49624,49632,49636,49640,49648,49649,49651,49660,49661,49664,49668,49676,49677,49679,49681,49688,49689,49692,49695,49696,49704,49705,49707,49709,54231,54233,54234,54235,54236,54237,54238,54239,54240,54242,54244,54245,54246,54247,54248,54249,54250,54251,54254,54255,54257,54258,54259,54261,54262,54263,null,null,null,null,null,null,54264,54265,54266,54267,54270,54272,54274,54275,54276,54277,54278,54279,54281,54282,54283,54284,54285,54286,54287,54288,54289,54290,54291,54292,54293,54294,null,null,null,null,null,null,54295,54296,54297,54298,54299,54300,54302,54303,54304,54305,54306,54307,54308,54309,54310,54311,54312,54313,54314,54315,54316,54317,54318,54319,54320,54321,54322,54323,54324,54325,54326,54327,49711,49713,49714,49716,49736,49744,49745,49748,49752,49760,49765,49772,49773,49776,49780,49788,49789,49791,49793,49800,49801,49808,49816,49819,49821,49828,49829,49832,49836,49837,49844,49845,49847,49849,49884,49885,49888,49891,49892,49899,49900,49901,49903,49905,49910,49912,49913,49915,49916,49920,49928,49929,49932,49933,49939,49940,49941,49944,49948,49956,49957,49960,49961,49989,50024,50025,50028,50032,50034,50040,50041,50044,50045,50052,50056,50060,50112,50136,50137,50140,50143,50144,50146,50152,50153,50157,50164,50165,50168,50184,50192,50212,50220,50224,54328,54329,54330,54331,54332,54333,54334,54335,54337,54338,54339,54341,54342,54343,54344,54345,54346,54347,54348,54349,54350,54351,54352,54353,54354,54355,null,null,null,null,null,null,54356,54357,54358,54359,54360,54361,54362,54363,54365,54366,54367,54369,54370,54371,54373,54374,54375,54376,54377,54378,54379,54380,54382,54384,54385,54386,null,null,null,null,null,null,54387,54388,54389,54390,54391,54394,54395,54397,54398,54401,54403,54404,54405,54406,54407,54410,54412,54414,54415,54416,54417,54418,54419,54421,54422,54423,54424,54425,54426,54427,54428,54429,50228,50236,50237,50248,50276,50277,50280,50284,50292,50293,50297,50304,50324,50332,50360,50364,50409,50416,50417,50420,50424,50426,50431,50432,50433,50444,50448,50452,50460,50472,50473,50476,50480,50488,50489,50491,50493,50500,50501,50504,50505,50506,50508,50509,50510,50515,50516,50517,50519,50520,50521,50525,50526,50528,50529,50532,50536,50544,50545,50547,50548,50549,50556,50557,50560,50564,50567,50572,50573,50575,50577,50581,50583,50584,50588,50592,50601,50612,50613,50616,50617,50619,50620,50621,50622,50628,50629,50630,50631,50632,50633,50634,50636,50638,54430,54431,54432,54433,54434,54435,54436,54437,54438,54439,54440,54442,54443,54444,54445,54446,54447,54448,54449,54450,54451,54452,54453,54454,54455,54456,null,null,null,null,null,null,54457,54458,54459,54460,54461,54462,54463,54464,54465,54466,54467,54468,54469,54470,54471,54472,54473,54474,54475,54477,54478,54479,54481,54482,54483,54485,null,null,null,null,null,null,54486,54487,54488,54489,54490,54491,54493,54494,54496,54497,54498,54499,54500,54501,54502,54503,54505,54506,54507,54509,54510,54511,54513,54514,54515,54516,54517,54518,54519,54521,54522,54524,50640,50641,50644,50648,50656,50657,50659,50661,50668,50669,50670,50672,50676,50678,50679,50684,50685,50686,50687,50688,50689,50693,50694,50695,50696,50700,50704,50712,50713,50715,50716,50724,50725,50728,50732,50733,50734,50736,50739,50740,50741,50743,50745,50747,50752,50753,50756,50760,50768,50769,50771,50772,50773,50780,50781,50784,50796,50799,50801,50808,50809,50812,50816,50824,50825,50827,50829,50836,50837,50840,50844,50852,50853,50855,50857,50864,50865,50868,50872,50873,50874,50880,50881,50883,50885,50892,50893,50896,50900,50908,50909,50912,50913,50920,54526,54527,54528,54529,54530,54531,54533,54534,54535,54537,54538,54539,54541,54542,54543,54544,54545,54546,54547,54550,54552,54553,54554,54555,54556,54557,null,null,null,null,null,null,54558,54559,54560,54561,54562,54563,54564,54565,54566,54567,54568,54569,54570,54571,54572,54573,54574,54575,54576,54577,54578,54579,54580,54581,54582,54583,null,null,null,null,null,null,54584,54585,54586,54587,54590,54591,54593,54594,54595,54597,54598,54599,54600,54601,54602,54603,54606,54608,54610,54611,54612,54613,54614,54615,54618,54619,54621,54622,54623,54625,54626,54627,50921,50924,50928,50936,50937,50941,50948,50949,50952,50956,50964,50965,50967,50969,50976,50977,50980,50984,50992,50993,50995,50997,50999,51004,51005,51008,51012,51018,51020,51021,51023,51025,51026,51027,51028,51029,51030,51031,51032,51036,51040,51048,51051,51060,51061,51064,51068,51069,51070,51075,51076,51077,51079,51080,51081,51082,51086,51088,51089,51092,51094,51095,51096,51098,51104,51105,51107,51108,51109,51110,51116,51117,51120,51124,51132,51133,51135,51136,51137,51144,51145,51148,51150,51152,51160,51165,51172,51176,51180,51200,51201,51204,51208,51210,54628,54630,54631,54634,54636,54638,54639,54640,54641,54642,54643,54646,54647,54649,54650,54651,54653,54654,54655,54656,54657,54658,54659,54662,54666,54667,null,null,null,null,null,null,54668,54669,54670,54671,54673,54674,54675,54676,54677,54678,54679,54680,54681,54682,54683,54684,54685,54686,54687,54688,54689,54690,54691,54692,54694,54695,null,null,null,null,null,null,54696,54697,54698,54699,54700,54701,54702,54703,54704,54705,54706,54707,54708,54709,54710,54711,54712,54713,54714,54715,54716,54717,54718,54719,54720,54721,54722,54723,54724,54725,54726,54727,51216,51217,51219,51221,51222,51228,51229,51232,51236,51244,51245,51247,51249,51256,51260,51264,51272,51273,51276,51277,51284,51312,51313,51316,51320,51322,51328,51329,51331,51333,51334,51335,51339,51340,51341,51348,51357,51359,51361,51368,51388,51389,51396,51400,51404,51412,51413,51415,51417,51424,51425,51428,51445,51452,51453,51456,51460,51461,51462,51468,51469,51471,51473,51480,51500,51508,51536,51537,51540,51544,51552,51553,51555,51564,51568,51572,51580,51592,51593,51596,51600,51608,51609,51611,51613,51648,51649,51652,51655,51656,51658,51664,51665,51667,54730,54731,54733,54734,54735,54737,54739,54740,54741,54742,54743,54746,54748,54750,54751,54752,54753,54754,54755,54758,54759,54761,54762,54763,54765,54766,null,null,null,null,null,null,54767,54768,54769,54770,54771,54774,54776,54778,54779,54780,54781,54782,54783,54786,54787,54789,54790,54791,54793,54794,54795,54796,54797,54798,54799,54802,null,null,null,null,null,null,54806,54807,54808,54809,54810,54811,54813,54814,54815,54817,54818,54819,54821,54822,54823,54824,54825,54826,54827,54828,54830,54831,54832,54833,54834,54835,54836,54837,54838,54839,54842,54843,51669,51670,51673,51674,51676,51677,51680,51682,51684,51687,51692,51693,51695,51696,51697,51704,51705,51708,51712,51720,51721,51723,51724,51725,51732,51736,51753,51788,51789,51792,51796,51804,51805,51807,51808,51809,51816,51837,51844,51864,51900,51901,51904,51908,51916,51917,51919,51921,51923,51928,51929,51936,51948,51956,51976,51984,51988,51992,52000,52001,52033,52040,52041,52044,52048,52056,52057,52061,52068,52088,52089,52124,52152,52180,52196,52199,52201,52236,52237,52240,52244,52252,52253,52257,52258,52263,52264,52265,52268,52270,52272,52280,52281,52283,54845,54846,54847,54849,54850,54851,54852,54854,54855,54858,54860,54862,54863,54864,54866,54867,54870,54871,54873,54874,54875,54877,54878,54879,54880,54881,null,null,null,null,null,null,54882,54883,54884,54885,54886,54888,54890,54891,54892,54893,54894,54895,54898,54899,54901,54902,54903,54904,54905,54906,54907,54908,54909,54910,54911,54912,null,null,null,null,null,null,54913,54914,54916,54918,54919,54920,54921,54922,54923,54926,54927,54929,54930,54931,54933,54934,54935,54936,54937,54938,54939,54940,54942,54944,54946,54947,54948,54949,54950,54951,54953,54954,52284,52285,52286,52292,52293,52296,52300,52308,52309,52311,52312,52313,52320,52324,52326,52328,52336,52341,52376,52377,52380,52384,52392,52393,52395,52396,52397,52404,52405,52408,52412,52420,52421,52423,52425,52432,52436,52452,52460,52464,52481,52488,52489,52492,52496,52504,52505,52507,52509,52516,52520,52524,52537,52572,52576,52580,52588,52589,52591,52593,52600,52616,52628,52629,52632,52636,52644,52645,52647,52649,52656,52676,52684,52688,52712,52716,52720,52728,52729,52731,52733,52740,52744,52748,52756,52761,52768,52769,52772,52776,52784,52785,52787,52789,54955,54957,54958,54959,54961,54962,54963,54964,54965,54966,54967,54968,54970,54972,54973,54974,54975,54976,54977,54978,54979,54982,54983,54985,54986,54987,null,null,null,null,null,null,54989,54990,54991,54992,54994,54995,54997,54998,55000,55002,55003,55004,55005,55006,55007,55009,55010,55011,55013,55014,55015,55017,55018,55019,55020,55021,null,null,null,null,null,null,55022,55023,55025,55026,55027,55028,55030,55031,55032,55033,55034,55035,55038,55039,55041,55042,55043,55045,55046,55047,55048,55049,55050,55051,55052,55053,55054,55055,55056,55058,55059,55060,52824,52825,52828,52831,52832,52833,52840,52841,52843,52845,52852,52853,52856,52860,52868,52869,52871,52873,52880,52881,52884,52888,52896,52897,52899,52900,52901,52908,52909,52929,52964,52965,52968,52971,52972,52980,52981,52983,52984,52985,52992,52993,52996,53000,53008,53009,53011,53013,53020,53024,53028,53036,53037,53039,53040,53041,53048,53076,53077,53080,53084,53092,53093,53095,53097,53104,53105,53108,53112,53120,53125,53132,53153,53160,53168,53188,53216,53217,53220,53224,53232,53233,53235,53237,53244,53248,53252,53265,53272,53293,53300,53301,53304,53308,55061,55062,55063,55066,55067,55069,55070,55071,55073,55074,55075,55076,55077,55078,55079,55082,55084,55086,55087,55088,55089,55090,55091,55094,55095,55097,null,null,null,null,null,null,55098,55099,55101,55102,55103,55104,55105,55106,55107,55109,55110,55112,55114,55115,55116,55117,55118,55119,55122,55123,55125,55130,55131,55132,55133,55134,null,null,null,null,null,null,55135,55138,55140,55142,55143,55144,55146,55147,55149,55150,55151,55153,55154,55155,55157,55158,55159,55160,55161,55162,55163,55166,55167,55168,55170,55171,55172,55173,55174,55175,55178,55179,53316,53317,53319,53321,53328,53332,53336,53344,53356,53357,53360,53364,53372,53373,53377,53412,53413,53416,53420,53428,53429,53431,53433,53440,53441,53444,53448,53449,53456,53457,53459,53460,53461,53468,53469,53472,53476,53484,53485,53487,53488,53489,53496,53517,53552,53553,53556,53560,53562,53568,53569,53571,53572,53573,53580,53581,53584,53588,53596,53597,53599,53601,53608,53612,53628,53636,53640,53664,53665,53668,53672,53680,53681,53683,53685,53690,53692,53696,53720,53748,53752,53767,53769,53776,53804,53805,53808,53812,53820,53821,53823,53825,53832,53852,55181,55182,55183,55185,55186,55187,55188,55189,55190,55191,55194,55196,55198,55199,55200,55201,55202,55203,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,53860,53888,53889,53892,53896,53904,53905,53909,53916,53920,53924,53932,53937,53944,53945,53948,53951,53952,53954,53960,53961,53963,53972,53976,53980,53988,53989,54000,54001,54004,54008,54016,54017,54019,54021,54028,54029,54030,54032,54036,54038,54044,54045,54047,54048,54049,54053,54056,54057,54060,54064,54072,54073,54075,54076,54077,54084,54085,54140,54141,54144,54148,54156,54157,54159,54160,54161,54168,54169,54172,54176,54184,54185,54187,54189,54196,54200,54204,54212,54213,54216,54217,54224,54232,54241,54243,54252,54253,54256,54260,54268,54269,54271,54273,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54280,54301,54336,54340,54364,54368,54372,54381,54383,54392,54393,54396,54399,54400,54402,54408,54409,54411,54413,54420,54441,54476,54480,54484,54492,54495,54504,54508,54512,54520,54523,54525,54532,54536,54540,54548,54549,54551,54588,54589,54592,54596,54604,54605,54607,54609,54616,54617,54620,54624,54629,54632,54633,54635,54637,54644,54645,54648,54652,54660,54661,54663,54664,54665,54672,54693,54728,54729,54732,54736,54738,54744,54745,54747,54749,54756,54757,54760,54764,54772,54773,54775,54777,54784,54785,54788,54792,54800,54801,54803,54804,54805,54812,54816,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54820,54829,54840,54841,54844,54848,54853,54856,54857,54859,54861,54865,54868,54869,54872,54876,54887,54889,54896,54897,54900,54915,54917,54924,54925,54928,54932,54941,54943,54945,54952,54956,54960,54969,54971,54980,54981,54984,54988,54993,54996,54999,55001,55008,55012,55016,55024,55029,55036,55037,55040,55044,55057,55064,55065,55068,55072,55080,55081,55083,55085,55092,55093,55096,55100,55108,55111,55113,55120,55121,55124,55126,55127,55128,55129,55136,55137,55139,55141,55145,55148,55152,55156,55164,55165,55169,55176,55177,55180,55184,55192,55193,55195,55197,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20285,20339,20551,20729,21152,21487,21621,21733,22025,23233,23478,26247,26550,26551,26607,27468,29634,30146,31292,33499,33540,34903,34952,35382,36040,36303,36603,36838,39381,21051,21364,21508,24682,24932,27580,29647,33050,35258,35282,38307,20355,21002,22718,22904,23014,24178,24185,25031,25536,26438,26604,26751,28567,30286,30475,30965,31240,31487,31777,32925,33390,33393,35563,38291,20075,21917,26359,28212,30883,31469,33883,35088,34638,38824,21208,22350,22570,23884,24863,25022,25121,25954,26577,27204,28187,29976,30131,30435,30640,32058,37039,37969,37970,40853,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21283,23724,30002,32987,37440,38296,21083,22536,23004,23713,23831,24247,24378,24394,24951,27743,30074,30086,31968,32115,32177,32652,33108,33313,34193,35137,35611,37628,38477,40007,20171,20215,20491,20977,22607,24887,24894,24936,25913,27114,28433,30117,30342,30422,31623,33445,33995,63744,37799,38283,21888,23458,22353,63745,31923,32697,37301,20520,21435,23621,24040,25298,25454,25818,25831,28192,28844,31067,36317,36382,63746,36989,37445,37624,20094,20214,20581,24062,24314,24838,26967,33137,34388,36423,37749,39467,20062,20625,26480,26688,20745,21133,21138,27298,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30652,37392,40660,21163,24623,36850,20552,25001,25581,25802,26684,27268,28608,33160,35233,38548,22533,29309,29356,29956,32121,32365,32937,35211,35700,36963,40273,25225,27770,28500,32080,32570,35363,20860,24906,31645,35609,37463,37772,20140,20435,20510,20670,20742,21185,21197,21375,22384,22659,24218,24465,24950,25004,25806,25964,26223,26299,26356,26775,28039,28805,28913,29855,29861,29898,30169,30828,30956,31455,31478,32069,32147,32789,32831,33051,33686,35686,36629,36885,37857,38915,38968,39514,39912,20418,21843,22586,22865,23395,23622,24760,25106,26690,26800,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26856,28330,30028,30328,30926,31293,31995,32363,32380,35336,35489,35903,38542,40388,21476,21481,21578,21617,22266,22993,23396,23611,24235,25335,25911,25925,25970,26272,26543,27073,27837,30204,30352,30590,31295,32660,32771,32929,33167,33510,33533,33776,34241,34865,34996,35493,63747,36764,37678,38599,39015,39640,40723,21741,26011,26354,26767,31296,35895,40288,22256,22372,23825,26118,26801,26829,28414,29736,34974,39908,27752,63748,39592,20379,20844,20849,21151,23380,24037,24656,24685,25329,25511,25915,29657,31354,34467,36002,38799,20018,23521,25096,26524,29916,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31185,33747,35463,35506,36328,36942,37707,38982,24275,27112,34303,37101,63749,20896,23448,23532,24931,26874,27454,28748,29743,29912,31649,32592,33733,35264,36011,38364,39208,21038,24669,25324,36866,20362,20809,21281,22745,24291,26336,27960,28826,29378,29654,31568,33009,37979,21350,25499,32619,20054,20608,22602,22750,24618,24871,25296,27088,39745,23439,32024,32945,36703,20132,20689,21676,21932,23308,23968,24039,25898,25934,26657,27211,29409,30350,30703,32094,32761,33184,34126,34527,36611,36686,37066,39171,39509,39851,19992,20037,20061,20167,20465,20855,21246,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21312,21475,21477,21646,22036,22389,22434,23495,23943,24272,25084,25304,25937,26552,26601,27083,27472,27590,27628,27714,28317,28792,29399,29590,29699,30655,30697,31350,32127,32777,33276,33285,33290,33503,34914,35635,36092,36544,36881,37041,37476,37558,39378,39493,40169,40407,40860,22283,23616,33738,38816,38827,40628,21531,31384,32676,35033,36557,37089,22528,23624,25496,31391,23470,24339,31353,31406,33422,36524,20518,21048,21240,21367,22280,25331,25458,27402,28099,30519,21413,29527,34152,36470,38357,26426,27331,28528,35437,36556,39243,63750,26231,27512,36020,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,39740,63751,21483,22317,22862,25542,27131,29674,30789,31418,31429,31998,33909,35215,36211,36917,38312,21243,22343,30023,31584,33740,37406,63752,27224,20811,21067,21127,25119,26840,26997,38553,20677,21156,21220,25027,26020,26681,27135,29822,31563,33465,33771,35250,35641,36817,39241,63753,20170,22935,25810,26129,27278,29748,31105,31165,33449,34942,34943,35167,63754,37670,20235,21450,24613,25201,27762,32026,32102,20120,20834,30684,32943,20225,20238,20854,20864,21980,22120,22331,22522,22524,22804,22855,22931,23492,23696,23822,24049,24190,24524,25216,26071,26083,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26398,26399,26462,26827,26820,27231,27450,27683,27773,27778,28103,29592,29734,29738,29826,29859,30072,30079,30849,30959,31041,31047,31048,31098,31637,32000,32186,32648,32774,32813,32908,35352,35663,35912,36215,37665,37668,39138,39249,39438,39439,39525,40594,32202,20342,21513,25326,26708,37329,21931,20794,63755,63756,23068,25062,63757,25295,25343,63758,63759,63760,63761,63762,63763,37027,63764,63765,63766,63767,63768,35582,63769,63770,63771,63772,26262,63773,29014,63774,63775,38627,63776,25423,25466,21335,63777,26511,26976,28275,63778,30007,63779,63780,63781,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32013,63782,63783,34930,22218,23064,63784,63785,63786,63787,63788,20035,63789,20839,22856,26608,32784,63790,22899,24180,25754,31178,24565,24684,25288,25467,23527,23511,21162,63791,22900,24361,24594,63792,63793,63794,29785,63795,63796,63797,63798,63799,63800,39377,63801,63802,63803,63804,63805,63806,63807,63808,63809,63810,63811,28611,63812,63813,33215,36786,24817,63814,63815,33126,63816,63817,23615,63818,63819,63820,63821,63822,63823,63824,63825,23273,35365,26491,32016,63826,63827,63828,63829,63830,63831,33021,63832,63833,23612,27877,21311,28346,22810,33590,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20025,20150,20294,21934,22296,22727,24406,26039,26086,27264,27573,28237,30701,31471,31774,32222,34507,34962,37170,37723,25787,28606,29562,30136,36948,21846,22349,25018,25812,26311,28129,28251,28525,28601,30192,32835,33213,34113,35203,35527,35674,37663,27795,30035,31572,36367,36957,21776,22530,22616,24162,25095,25758,26848,30070,31958,34739,40680,20195,22408,22382,22823,23565,23729,24118,24453,25140,25825,29619,33274,34955,36024,38538,40667,23429,24503,24755,20498,20992,21040,22294,22581,22615,23566,23648,23798,23947,24230,24466,24764,25361,25481,25623,26691,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26873,27330,28120,28193,28372,28644,29182,30428,30585,31153,31291,33796,35241,36077,36339,36424,36867,36884,36947,37117,37709,38518,38876,27602,28678,29272,29346,29544,30563,31167,31716,32411,35712,22697,24775,25958,26109,26302,27788,28958,29129,35930,38931,20077,31361,20189,20908,20941,21205,21516,24999,26481,26704,26847,27934,28540,30140,30643,31461,33012,33891,37509,20828,26007,26460,26515,30168,31431,33651,63834,35910,36887,38957,23663,33216,33434,36929,36975,37389,24471,23965,27225,29128,30331,31561,34276,35588,37159,39472,21895,25078,63835,30313,32645,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34367,34746,35064,37007,63836,27931,28889,29662,32097,33853,63837,37226,39409,63838,20098,21365,27396,27410,28734,29211,34349,40478,21068,36771,23888,25829,25900,27414,28651,31811,32412,34253,35172,35261,25289,33240,34847,24266,26391,28010,29436,29701,29807,34690,37086,20358,23821,24480,33802,20919,25504,30053,20142,20486,20841,20937,26753,27153,31918,31921,31975,33391,35538,36635,37327,20406,20791,21237,21570,24300,24942,25150,26053,27354,28670,31018,34268,34851,38317,39522,39530,40599,40654,21147,26310,27511,28701,31019,36706,38722,24976,25088,25891,28451,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29001,29833,32244,32879,34030,36646,36899,37706,20925,21015,21155,27916,28872,35010,24265,25986,27566,28610,31806,29557,20196,20278,22265,63839,23738,23994,24604,29618,31533,32666,32718,32838,36894,37428,38646,38728,38936,40801,20363,28583,31150,37300,38583,21214,63840,25736,25796,27347,28510,28696,29200,30439,32769,34310,34396,36335,36613,38706,39791,40442,40565,30860,31103,32160,33737,37636,40575,40595,35542,22751,24324,26407,28711,29903,31840,32894,20769,28712,29282,30922,36034,36058,36084,38647,20102,20698,23534,24278,26009,29134,30274,30637,32842,34044,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36988,39719,40845,22744,23105,23650,27155,28122,28431,30267,32047,32311,34078,35128,37860,38475,21129,26066,26611,27060,27969,28316,28687,29705,29792,30041,30244,30827,35628,39006,20845,25134,38520,20374,20523,23833,28138,32184,36650,24459,24900,26647,63841,38534,21202,32907,20956,20940,26974,31260,32190,33777,38517,20442,21033,21400,21519,21774,23653,24743,26446,26792,28012,29313,29432,29702,29827,63842,30178,31852,32633,32696,33673,35023,35041,37324,37328,38626,39881,21533,28542,29136,29848,34298,36522,38563,40023,40607,26519,28107,29747,33256,38678,30764,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31435,31520,31890,25705,29802,30194,30908,30952,39340,39764,40635,23518,24149,28448,33180,33707,37000,19975,21325,23081,24018,24398,24930,25405,26217,26364,28415,28459,28771,30622,33836,34067,34875,36627,39237,39995,21788,25273,26411,27819,33545,35178,38778,20129,22916,24536,24537,26395,32178,32596,33426,33579,33725,36638,37017,22475,22969,23186,23504,26151,26522,26757,27599,29028,32629,36023,36067,36993,39749,33032,35978,38476,39488,40613,23391,27667,29467,30450,30431,33804,20906,35219,20813,20885,21193,26825,27796,30468,30496,32191,32236,38754,40629,28357,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34065,20901,21517,21629,26126,26269,26919,28319,30399,30609,33559,33986,34719,37225,37528,40180,34946,20398,20882,21215,22982,24125,24917,25720,25721,26286,26576,27169,27597,27611,29279,29281,29761,30520,30683,32791,33468,33541,35584,35624,35980,26408,27792,29287,30446,30566,31302,40361,27519,27794,22818,26406,33945,21359,22675,22937,24287,25551,26164,26483,28218,29483,31447,33495,37672,21209,24043,25006,25035,25098,25287,25771,26080,26969,27494,27595,28961,29687,30045,32326,33310,33538,34154,35491,36031,38695,40289,22696,40664,20497,21006,21563,21839,25991,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27766,32010,32011,32862,34442,38272,38639,21247,27797,29289,21619,23194,23614,23883,24396,24494,26410,26806,26979,28220,28228,30473,31859,32654,34183,35598,36855,38753,40692,23735,24758,24845,25003,25935,26107,26108,27665,27887,29599,29641,32225,38292,23494,34588,35600,21085,21338,25293,25615,25778,26420,27192,27850,29632,29854,31636,31893,32283,33162,33334,34180,36843,38649,39361,20276,21322,21453,21467,25292,25644,25856,26001,27075,27886,28504,29677,30036,30242,30436,30460,30928,30971,31020,32070,33324,34784,36820,38930,39151,21187,25300,25765,28196,28497,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30332,36299,37297,37474,39662,39747,20515,20621,22346,22952,23592,24135,24439,25151,25918,26041,26049,26121,26507,27036,28354,30917,32033,32938,33152,33323,33459,33953,34444,35370,35607,37030,38450,40848,20493,20467,63843,22521,24472,25308,25490,26479,28227,28953,30403,32972,32986,35060,35061,35097,36064,36649,37197,38506,20271,20336,24091,26575,26658,30333,30334,39748,24161,27146,29033,29140,30058,63844,32321,34115,34281,39132,20240,31567,32624,38309,20961,24070,26805,27710,27726,27867,29359,31684,33539,27861,29754,20731,21128,22721,25816,27287,29863,30294,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30887,34327,38370,38713,63845,21342,24321,35722,36776,36783,37002,21029,30629,40009,40712,19993,20482,20853,23643,24183,26142,26170,26564,26821,28851,29953,30149,31177,31453,36647,39200,39432,20445,22561,22577,23542,26222,27493,27921,28282,28541,29668,29995,33769,35036,35091,35676,36628,20239,20693,21264,21340,23443,24489,26381,31119,33145,33583,34068,35079,35206,36665,36667,39333,39954,26412,20086,20472,22857,23553,23791,23792,25447,26834,28925,29090,29739,32299,34028,34562,36898,37586,40179,19981,20184,20463,20613,21078,21103,21542,21648,22496,22827,23142,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23386,23413,23500,24220,63846,25206,25975,26023,28014,28325,29238,31526,31807,32566,33104,33105,33178,33344,33433,33705,35331,36000,36070,36091,36212,36282,37096,37340,38428,38468,39385,40167,21271,20998,21545,22132,22707,22868,22894,24575,24996,25198,26128,27774,28954,30406,31881,31966,32027,33452,36033,38640,63847,20315,24343,24447,25282,23849,26379,26842,30844,32323,40300,19989,20633,21269,21290,21329,22915,23138,24199,24754,24970,25161,25209,26000,26503,27047,27604,27606,27607,27608,27832,63848,29749,30202,30738,30865,31189,31192,31875,32203,32737,32933,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,33086,33218,33778,34586,35048,35513,35692,36027,37145,38750,39131,40763,22188,23338,24428,25996,27315,27567,27996,28657,28693,29277,29613,36007,36051,38971,24977,27703,32856,39425,20045,20107,20123,20181,20282,20284,20351,20447,20735,21490,21496,21766,21987,22235,22763,22882,23057,23531,23546,23556,24051,24107,24473,24605,25448,26012,26031,26614,26619,26797,27515,27801,27863,28195,28681,29509,30722,31038,31040,31072,31169,31721,32023,32114,32902,33293,33678,34001,34503,35039,35408,35422,35613,36060,36198,36781,37034,39164,39391,40605,21066,63849,26388,63850,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20632,21034,23665,25955,27733,29642,29987,30109,31639,33948,37240,38704,20087,25746,27578,29022,34217,19977,63851,26441,26862,28183,33439,34072,34923,25591,28545,37394,39087,19978,20663,20687,20767,21830,21930,22039,23360,23577,23776,24120,24202,24224,24258,24819,26705,27233,28248,29245,29248,29376,30456,31077,31665,32724,35059,35316,35443,35937,36062,38684,22622,29885,36093,21959,63852,31329,32034,33394,29298,29983,29989,63853,31513,22661,22779,23996,24207,24246,24464,24661,25234,25471,25933,26257,26329,26360,26646,26866,29312,29790,31598,32110,32214,32626,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32997,33298,34223,35199,35475,36893,37604,40653,40736,22805,22893,24109,24796,26132,26227,26512,27728,28101,28511,30707,30889,33990,37323,37675,20185,20682,20808,21892,23307,23459,25159,25982,26059,28210,29053,29697,29764,29831,29887,30316,31146,32218,32341,32680,33146,33203,33337,34330,34796,35445,36323,36984,37521,37925,39245,39854,21352,23633,26964,27844,27945,28203,33292,34203,35131,35373,35498,38634,40807,21089,26297,27570,32406,34814,36109,38275,38493,25885,28041,29166,63854,22478,22995,23468,24615,24826,25104,26143,26207,29481,29689,30427,30465,31596,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32854,32882,33125,35488,37266,19990,21218,27506,27927,31237,31545,32048,63855,36016,21484,22063,22609,23477,23567,23569,24034,25152,25475,25620,26157,26803,27836,28040,28335,28703,28836,29138,29990,30095,30094,30233,31505,31712,31787,32032,32057,34092,34157,34311,35380,36877,36961,37045,37559,38902,39479,20439,23660,26463,28049,31903,32396,35606,36118,36895,23403,24061,25613,33984,36956,39137,29575,23435,24730,26494,28126,35359,35494,36865,38924,21047,63856,28753,30862,37782,34928,37335,20462,21463,22013,22234,22402,22781,23234,23432,23723,23744,24101,24833,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,25101,25163,25480,25628,25910,25976,27193,27530,27700,27929,28465,29159,29417,29560,29703,29874,30246,30561,31168,31319,31466,31929,32143,32172,32353,32670,33065,33585,33936,34010,34282,34966,35504,35728,36664,36930,36995,37228,37526,37561,38539,38567,38568,38614,38656,38920,39318,39635,39706,21460,22654,22809,23408,23487,28113,28506,29087,29729,29881,32901,33789,24033,24455,24490,24642,26092,26642,26991,27219,27529,27957,28147,29667,30462,30636,31565,32020,33059,33308,33600,34036,34147,35426,35524,37255,37662,38918,39348,25100,34899,36848,37477,23815,23847,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23913,29791,33181,34664,28629,25342,32722,35126,35186,19998,20056,20711,21213,21319,25215,26119,32361,34821,38494,20365,21273,22070,22987,23204,23608,23630,23629,24066,24337,24643,26045,26159,26178,26558,26612,29468,30690,31034,32709,33940,33997,35222,35430,35433,35553,35925,35962,22516,23508,24335,24687,25325,26893,27542,28252,29060,31698,34645,35672,36606,39135,39166,20280,20353,20449,21627,23072,23480,24892,26032,26216,29180,30003,31070,32051,33102,33251,33688,34218,34254,34563,35338,36523,36763,63857,36805,22833,23460,23526,24713,23529,23563,24515,27777,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63858,28145,28683,29978,33455,35574,20160,21313,63859,38617,27663,20126,20420,20818,21854,23077,23784,25105,29273,33469,33706,34558,34905,35357,38463,38597,39187,40201,40285,22538,23731,23997,24132,24801,24853,25569,27138,28197,37122,37716,38990,39952,40823,23433,23736,25353,26191,26696,30524,38593,38797,38996,39839,26017,35585,36555,38332,21813,23721,24022,24245,26263,30284,33780,38343,22739,25276,29390,40232,20208,22830,24591,26171,27523,31207,40230,21395,21696,22467,23830,24859,26326,28079,30861,33406,38552,38724,21380,25212,25494,28082,32266,33099,38989,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27387,32588,40367,40474,20063,20539,20918,22812,24825,25590,26928,29242,32822,63860,37326,24369,63861,63862,32004,33509,33903,33979,34277,36493,63863,20335,63864,63865,22756,23363,24665,25562,25880,25965,26264,63866,26954,27171,27915,28673,29036,30162,30221,31155,31344,63867,32650,63868,35140,63869,35731,37312,38525,63870,39178,22276,24481,26044,28417,30208,31142,35486,39341,39770,40812,20740,25014,25233,27277,33222,20547,22576,24422,28937,35328,35578,23420,34326,20474,20796,22196,22852,25513,28153,23978,26989,20870,20104,20313,63871,63872,63873,22914,63874,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63875,27487,27741,63876,29877,30998,63877,33287,33349,33593,36671,36701,63878,39192,63879,63880,63881,20134,63882,22495,24441,26131,63883,63884,30123,32377,35695,63885,36870,39515,22181,22567,23032,23071,23476,63886,24310,63887,63888,25424,25403,63889,26941,27783,27839,28046,28051,28149,28436,63890,28895,28982,29017,63891,29123,29141,63892,30799,30831,63893,31605,32227,63894,32303,63895,34893,36575,63896,63897,63898,37467,63899,40182,63900,63901,63902,24709,28037,63903,29105,63904,63905,38321,21421,63906,63907,63908,26579,63909,28814,28976,29744,33398,33490,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63910,38331,39653,40573,26308,63911,29121,33865,63912,63913,22603,63914,63915,23992,24433,63916,26144,26254,27001,27054,27704,27891,28214,28481,28634,28699,28719,29008,29151,29552,63917,29787,63918,29908,30408,31310,32403,63919,63920,33521,35424,36814,63921,37704,63922,38681,63923,63924,20034,20522,63925,21000,21473,26355,27757,28618,29450,30591,31330,33454,34269,34306,63926,35028,35427,35709,35947,63927,37555,63928,38675,38928,20116,20237,20425,20658,21320,21566,21555,21978,22626,22714,22887,23067,23524,24735,63929,25034,25942,26111,26212,26791,27738,28595,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28879,29100,29522,31613,34568,35492,39986,40711,23627,27779,29508,29577,37434,28331,29797,30239,31337,32277,34314,20800,22725,25793,29934,29973,30320,32705,37013,38605,39252,28198,29926,31401,31402,33253,34521,34680,35355,23113,23436,23451,26785,26880,28003,29609,29715,29740,30871,32233,32747,33048,33109,33694,35916,38446,38929,26352,24448,26106,26505,27754,29579,20525,23043,27498,30702,22806,23916,24013,29477,30031,63930,63931,20709,20985,22575,22829,22934,23002,23525,63932,63933,23970,25303,25622,25747,25854,63934,26332,63935,27208,63936,29183,29796,63937,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31368,31407,32327,32350,32768,33136,63938,34799,35201,35616,36953,63939,36992,39250,24958,27442,28020,32287,35109,36785,20433,20653,20887,21191,22471,22665,23481,24248,24898,27029,28044,28263,28342,29076,29794,29992,29996,32883,33592,33993,36362,37780,37854,63940,20110,20305,20598,20778,21448,21451,21491,23431,23507,23588,24858,24962,26100,29275,29591,29760,30402,31056,31121,31161,32006,32701,33419,34261,34398,36802,36935,37109,37354,38533,38632,38633,21206,24423,26093,26161,26671,29020,31286,37057,38922,20113,63941,27218,27550,28560,29065,32792,33464,34131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36939,38549,38642,38907,34074,39729,20112,29066,38596,20803,21407,21729,22291,22290,22435,23195,23236,23491,24616,24895,25588,27781,27961,28274,28304,29232,29503,29783,33489,34945,36677,36960,63942,38498,39000,40219,26376,36234,37470,20301,20553,20702,21361,22285,22996,23041,23561,24944,26256,28205,29234,29771,32239,32963,33806,33894,34111,34655,34907,35096,35586,36949,38859,39759,20083,20369,20754,20842,63943,21807,21929,23418,23461,24188,24189,24254,24736,24799,24840,24841,25540,25912,26377,63944,26580,26586,63945,26977,26978,27833,27943,63946,28216,63947,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28641,29494,29495,63948,29788,30001,63949,30290,63950,63951,32173,33278,33848,35029,35480,35547,35565,36400,36418,36938,36926,36986,37193,37321,37742,63952,63953,22537,63954,27603,32905,32946,63955,63956,20801,22891,23609,63957,63958,28516,29607,32996,36103,63959,37399,38287,63960,63961,63962,63963,32895,25102,28700,32104,34701,63964,22432,24681,24903,27575,35518,37504,38577,20057,21535,28139,34093,38512,38899,39150,25558,27875,37009,20957,25033,33210,40441,20381,20506,20736,23452,24847,25087,25836,26885,27589,30097,30691,32681,33380,34191,34811,34915,35516,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,35696,37291,20108,20197,20234,63965,63966,22839,23016,63967,24050,24347,24411,24609,63968,63969,63970,63971,29246,29669,63972,30064,30157,63973,31227,63974,32780,32819,32900,33505,33617,63975,63976,36029,36019,36999,63977,63978,39156,39180,63979,63980,28727,30410,32714,32716,32764,35610,20154,20161,20995,21360,63981,21693,22240,23035,23493,24341,24525,28270,63982,63983,32106,33589,63984,34451,35469,63985,38765,38775,63986,63987,19968,20314,20350,22777,26085,28322,36920,37808,39353,20219,22764,22922,23001,24641,63988,63989,31252,63990,33615,36035,20837,21316,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63991,63992,63993,20173,21097,23381,33471,20180,21050,21672,22985,23039,23376,23383,23388,24675,24904,28363,28825,29038,29574,29943,30133,30913,32043,32773,33258,33576,34071,34249,35566,36039,38604,20316,21242,22204,26027,26152,28796,28856,29237,32189,33421,37196,38592,40306,23409,26855,27544,28538,30430,23697,26283,28507,31668,31786,34870,38620,19976,20183,21280,22580,22715,22767,22892,23559,24115,24196,24373,25484,26290,26454,27167,27299,27404,28479,29254,63994,29520,29835,31456,31911,33144,33247,33255,33674,33900,34083,34196,34255,35037,36115,37292,38263,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38556,20877,21705,22312,23472,25165,26448,26685,26771,28221,28371,28797,32289,35009,36001,36617,40779,40782,29229,31631,35533,37658,20295,20302,20786,21632,22992,24213,25269,26485,26990,27159,27822,28186,29401,29482,30141,31672,32053,33511,33785,33879,34295,35419,36015,36487,36889,37048,38606,40799,21219,21514,23265,23490,25688,25973,28404,29380,63995,30340,31309,31515,31821,32318,32735,33659,35627,36042,36196,36321,36447,36842,36857,36969,37841,20291,20346,20659,20840,20856,21069,21098,22625,22652,22880,23560,23637,24283,24731,25136,26643,27583,27656,28593,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29006,29728,30000,30008,30033,30322,31564,31627,31661,31686,32399,35438,36670,36681,37439,37523,37666,37931,38651,39002,39019,39198,20999,25130,25240,27993,30308,31434,31680,32118,21344,23742,24215,28472,28857,31896,38673,39822,40670,25509,25722,34678,19969,20117,20141,20572,20597,21576,22979,23450,24128,24237,24311,24449,24773,25402,25919,25972,26060,26230,26232,26622,26984,27273,27491,27712,28096,28136,28191,28254,28702,28833,29582,29693,30010,30555,30855,31118,31243,31357,31934,32142,33351,35330,35562,35998,37165,37194,37336,37478,37580,37664,38662,38742,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38748,38914,40718,21046,21137,21884,22564,24093,24351,24716,25552,26799,28639,31085,31532,33229,34234,35069,35576,36420,37261,38500,38555,38717,38988,40778,20430,20806,20939,21161,22066,24340,24427,25514,25805,26089,26177,26362,26361,26397,26781,26839,27133,28437,28526,29031,29157,29226,29866,30522,31062,31066,31199,31264,31381,31895,31967,32068,32368,32903,34299,34468,35412,35519,36249,36481,36896,36973,37347,38459,38613,40165,26063,31751,36275,37827,23384,23562,21330,25305,29469,20519,23447,24478,24752,24939,26837,28121,29742,31278,32066,32156,32305,33131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36394,36405,37758,37912,20304,22352,24038,24231,25387,32618,20027,20303,20367,20570,23005,32964,21610,21608,22014,22863,23449,24030,24282,26205,26417,26609,26666,27880,27954,28234,28557,28855,29664,30087,31820,32002,32044,32162,33311,34523,35387,35461,36208,36490,36659,36913,37198,37202,37956,39376,31481,31909,20426,20737,20934,22472,23535,23803,26201,27197,27994,28310,28652,28940,30063,31459,34850,36897,36981,38603,39423,33537,20013,20210,34886,37325,21373,27355,26987,27713,33914,22686,24974,26366,25327,28893,29969,30151,32338,33976,35657,36104,20043,21482,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21675,22320,22336,24535,25345,25351,25711,25903,26088,26234,26525,26547,27490,27744,27802,28460,30693,30757,31049,31063,32025,32930,33026,33267,33437,33463,34584,35468,63996,36100,36286,36978,30452,31257,31287,32340,32887,21767,21972,22645,25391,25634,26185,26187,26733,27035,27524,27941,28337,29645,29800,29857,30043,30137,30433,30494,30603,31206,32265,32285,33275,34095,34967,35386,36049,36587,36784,36914,37805,38499,38515,38663,20356,21489,23018,23241,24089,26702,29894,30142,31209,31378,33187,34541,36074,36300,36845,26015,26389,63997,22519,28503,32221,36655,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37878,38598,24501,25074,28548,19988,20376,20511,21449,21983,23919,24046,27425,27492,30923,31642,63998,36425,36554,36974,25417,25662,30528,31364,37679,38015,40810,25776,28591,29158,29864,29914,31428,31762,32386,31922,32408,35738,36106,38013,39184,39244,21049,23519,25830,26413,32046,20717,21443,22649,24920,24921,25082,26028,31449,35730,35734,20489,20513,21109,21809,23100,24288,24432,24884,25950,26124,26166,26274,27085,28356,28466,29462,30241,31379,33081,33369,33750,33980,20661,22512,23488,23528,24425,25505,30758,32181,33756,34081,37319,37365,20874,26613,31574,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36012,20932,22971,24765,34389,20508,63999,21076,23610,24957,25114,25299,25842,26021,28364,30240,33034,36448,38495,38587,20191,21315,21912,22825,24029,25797,27849,28154,29588,31359,33307,34214,36068,36368,36983,37351,38369,38433,38854,20984,21746,21894,24505,25764,28552,32180,36639,36685,37941,20681,23574,27838,28155,29979,30651,31805,31844,35449,35522,22558,22974,24086,25463,29266,30090,30571,35548,36028,36626,24307,26228,28152,32893,33729,35531,38737,39894,64000,21059,26367,28053,28399,32224,35558,36910,36958,39636,21021,21119,21736,24980,25220,25307,26786,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26898,26970,27189,28818,28966,30813,30977,30990,31186,31245,32918,33400,33493,33609,34121,35970,36229,37218,37259,37294,20419,22225,29165,30679,34560,35320,23544,24534,26449,37032,21474,22618,23541,24740,24961,25696,32317,32880,34085,37507,25774,20652,23828,26368,22684,25277,25512,26894,27000,27166,28267,30394,31179,33467,33833,35535,36264,36861,37138,37195,37276,37648,37656,37786,38619,39478,39949,19985,30044,31069,31482,31569,31689,32302,33988,36441,36468,36600,36880,26149,26943,29763,20986,26414,40668,20805,24544,27798,34802,34909,34935,24756,33205,33795,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36101,21462,21561,22068,23094,23601,28810,32736,32858,33030,33261,36259,37257,39519,40434,20596,20164,21408,24827,28204,23652,20360,20516,21988,23769,24159,24677,26772,27835,28100,29118,30164,30196,30305,31258,31305,32199,32251,32622,33268,34473,36636,38601,39347,40786,21063,21189,39149,35242,19971,26578,28422,20405,23522,26517,27784,28024,29723,30759,37341,37756,34756,31204,31281,24555,20182,21668,21822,22702,22949,24816,25171,25302,26422,26965,33333,38464,39345,39389,20524,21331,21828,22396,64001,25176,64002,25826,26219,26589,28609,28655,29730,29752,35351,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37944,21585,22022,22374,24392,24986,27470,28760,28845,32187,35477,22890,33067,25506,30472,32829,36010,22612,25645,27067,23445,24081,28271,64003,34153,20812,21488,22826,24608,24907,27526,27760,27888,31518,32974,33492,36294,37040,39089,64004,25799,28580,25745,25860,20814,21520,22303,35342,24927,26742,64005,30171,31570,32113,36890,22534,27084,33151,35114,36864,38969,20600,22871,22956,25237,36879,39722,24925,29305,38358,22369,23110,24052,25226,25773,25850,26487,27874,27966,29228,29750,30772,32631,33453,36315,38935,21028,22338,26495,29256,29923,36009,36774,37393,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38442,20843,21485,25420,20329,21764,24726,25943,27803,28031,29260,29437,31255,35207,35997,24429,28558,28921,33192,24846,20415,20559,25153,29255,31687,32232,32745,36941,38829,39449,36022,22378,24179,26544,33805,35413,21536,23318,24163,24290,24330,25987,32954,34109,38281,38491,20296,21253,21261,21263,21638,21754,22275,24067,24598,25243,25265,25429,64006,27873,28006,30129,30770,32990,33071,33502,33889,33970,34957,35090,36875,37610,39165,39825,24133,26292,26333,28689,29190,64007,20469,21117,24426,24915,26451,27161,28418,29922,31080,34920,35961,39111,39108,39491,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21697,31263,26963,35575,35914,39080,39342,24444,25259,30130,30382,34987,36991,38466,21305,24380,24517,27852,29644,30050,30091,31558,33534,39325,20047,36924,19979,20309,21414,22799,24264,26160,27827,29781,33655,34662,36032,36944,38686,39957,22737,23416,34384,35604,40372,23506,24680,24717,26097,27735,28450,28579,28698,32597,32752,38289,38290,38480,38867,21106,36676,20989,21547,21688,21859,21898,27323,28085,32216,33382,37532,38519,40569,21512,21704,30418,34532,38308,38356,38492,20130,20233,23022,23270,24055,24658,25239,26477,26689,27782,28207,32568,32923,33322,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,64008,64009,38917,20133,20565,21683,22419,22874,23401,23475,25032,26999,28023,28707,34809,35299,35442,35559,36994,39405,39608,21182,26680,20502,24184,26447,33607,34892,20139,21521,22190,29670,37141,38911,39177,39255,39321,22099,22687,34395,35377,25010,27382,29563,36562,27463,38570,39511,22869,29184,36203,38761,20436,23796,24358,25080,26203,27883,28843,29572,29625,29694,30505,30541,32067,32098,32291,33335,34898,64010,36066,37449,39023,23377,31348,34880,38913,23244,20448,21332,22846,23805,25406,28025,29433,33029,33031,33698,37583,38960,20136,20804,21009,22411,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24418,27842,28366,28677,28752,28847,29074,29673,29801,33610,34722,34913,36872,37026,37795,39336,20846,24407,24800,24935,26291,34137,36426,37295,38795,20046,20114,21628,22741,22778,22909,23733,24359,25142,25160,26122,26215,27627,28009,28111,28246,28408,28564,28640,28649,28765,29392,29733,29786,29920,30355,31068,31946,32286,32993,33446,33899,33983,34382,34399,34676,35703,35946,37804,38912,39013,24785,25110,37239,23130,26127,28151,28222,29759,39746,24573,24794,31503,21700,24344,27742,27859,27946,28888,32005,34425,35340,40251,21270,21644,23301,27194,28779,30069,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31117,31166,33457,33775,35441,35649,36008,38772,64011,25844,25899,30906,30907,31339,20024,21914,22864,23462,24187,24739,25563,27489,26213,26707,28185,29029,29872,32008,36996,39529,39973,27963,28369,29502,35905,38346,20976,24140,24488,24653,24822,24880,24908,26179,26180,27045,27841,28255,28361,28514,29004,29852,30343,31681,31783,33618,34647,36945,38541,40643,21295,22238,24315,24458,24674,24724,25079,26214,26371,27292,28142,28590,28784,29546,32362,33214,33588,34516,35496,36036,21123,29554,23446,27243,37892,21742,22150,23389,25928,25989,26313,26783,28045,28102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29243,32948,37237,39501,20399,20505,21402,21518,21564,21897,21957,24127,24460,26429,29030,29661,36869,21211,21235,22628,22734,28932,29071,29179,34224,35347,26248,34216,21927,26244,29002,33841,21321,21913,27585,24409,24509,25582,26249,28999,35569,36637,40638,20241,25658,28875,30054,34407,24676,35662,40440,20807,20982,21256,27958,33016,40657,26133,27427,28824,30165,21507,23673,32007,35350,27424,27453,27462,21560,24688,27965,32725,33288,20694,20958,21916,22123,22221,23020,23305,24076,24985,24984,25137,26206,26342,29081,29113,29114,29351,31143,31232,32690,35440,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "gb18030":[19970,19972,19973,19974,19983,19986,19991,19999,20000,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,20515,20516,20519,20523,20527,20528,20529,20530,20531,20532,20533,20534,20535,20536,20537,20539,20541,20543,20544,20545,20546,20548,20549,20550,20553,20554,20555,20557,20560,20561,20562,20563,20564,20566,20567,20568,20569,20571,20573,20574,20575,20576,20577,20578,20579,20580,20582,20583,20584,20585,20586,20587,20589,20590,20591,20592,20593,20594,20595,20596,20597,20600,20601,20602,20604,20605,20609,20610,20611,20612,20614,20615,20617,20618,20619,20620,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20644,20646,20650,20651,20653,20654,20655,20656,20657,20659,20660,20661,20662,20663,20664,20665,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20688,20689,20690,20691,20692,20693,20695,20696,20697,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20712,20713,20714,20715,20719,20720,20721,20722,20724,20726,20727,20728,20729,20730,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20744,20745,20746,20748,20749,20750,20751,20752,20753,20755,20756,20757,20758,20759,20760,20761,20762,20763,20764,20765,20766,20767,20768,20770,20771,20772,20773,20774,20775,20776,20777,20778,20779,20780,20781,20782,20783,20784,20785,20786,20787,20788,20789,20790,20791,20792,20793,20794,20795,20796,20797,20798,20802,20807,20810,20812,20814,20815,20816,20818,20819,20823,20824,20825,20827,20829,20830,20831,20832,20833,20835,20836,20838,20839,20841,20842,20847,20850,20858,20862,20863,20867,20868,20870,20871,20874,20875,20878,20879,20880,20881,20883,20884,20888,20890,20893,20894,20895,20897,20899,20902,20903,20904,20905,20906,20909,20910,20916,20920,20921,20922,20926,20927,20929,20930,20931,20933,20936,20938,20941,20942,20944,20946,20947,20948,20949,20950,20951,20952,20953,20954,20956,20958,20959,20962,20963,20965,20966,20967,20968,20969,20970,20972,20974,20977,20978,20980,20983,20990,20996,20997,21001,21003,21004,21007,21008,21011,21012,21013,21020,21022,21023,21025,21026,21027,21029,21030,21031,21034,21036,21039,21041,21042,21044,21045,21052,21054,21060,21061,21062,21063,21064,21065,21067,21070,21071,21074,21075,21077,21079,21080,21081,21082,21083,21085,21087,21088,21090,21091,21092,21094,21096,21099,21100,21101,21102,21104,21105,21107,21108,21109,21110,21111,21112,21113,21114,21115,21116,21118,21120,21123,21124,21125,21126,21127,21129,21130,21131,21132,21133,21134,21135,21137,21138,21140,21141,21142,21143,21144,21145,21146,21148,21156,21157,21158,21159,21166,21167,21168,21172,21173,21174,21175,21176,21177,21178,21179,21180,21181,21184,21185,21186,21188,21189,21190,21192,21194,21196,21197,21198,21199,21201,21203,21204,21205,21207,21209,21210,21211,21212,21213,21214,21216,21217,21218,21219,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21233,21234,21235,21236,21237,21238,21239,21240,21243,21244,21245,21249,21250,21251,21252,21255,21257,21258,21259,21260,21262,21265,21266,21267,21268,21272,21275,21276,21278,21279,21282,21284,21285,21287,21288,21289,21291,21292,21293,21295,21296,21297,21298,21299,21300,21301,21302,21303,21304,21308,21309,21312,21314,21316,21318,21323,21324,21325,21328,21332,21336,21337,21339,21341,21349,21352,21354,21356,21357,21362,21366,21369,21371,21372,21373,21374,21376,21377,21379,21383,21384,21386,21390,21391,21392,21393,21394,21395,21396,21398,21399,21401,21403,21404,21406,21408,21409,21412,21415,21418,21419,21420,21421,21423,21424,21425,21426,21427,21428,21429,21431,21432,21433,21434,21436,21437,21438,21440,21443,21444,21445,21446,21447,21454,21455,21456,21458,21459,21461,21466,21468,21469,21470,21473,21474,21479,21492,21498,21502,21503,21504,21506,21509,21511,21515,21524,21528,21529,21530,21532,21538,21540,21541,21546,21552,21555,21558,21559,21562,21565,21567,21569,21570,21572,21573,21575,21577,21580,21581,21582,21583,21585,21594,21597,21598,21599,21600,21601,21603,21605,21607,21609,21610,21611,21612,21613,21614,21615,21616,21620,21625,21626,21630,21631,21633,21635,21637,21639,21640,21641,21642,21645,21649,21651,21655,21656,21660,21662,21663,21664,21665,21666,21669,21678,21680,21682,21685,21686,21687,21689,21690,21692,21694,21699,21701,21706,21707,21718,21720,21723,21728,21729,21730,21731,21732,21739,21740,21743,21744,21745,21748,21749,21750,21751,21752,21753,21755,21758,21760,21762,21763,21764,21765,21768,21770,21771,21772,21773,21774,21778,21779,21781,21782,21783,21784,21785,21786,21788,21789,21790,21791,21793,21797,21798,21800,21801,21803,21805,21810,21812,21813,21814,21816,21817,21818,21819,21821,21824,21826,21829,21831,21832,21835,21836,21837,21838,21839,21841,21842,21843,21844,21847,21848,21849,21850,21851,21853,21854,21855,21856,21858,21859,21864,21865,21867,21871,21872,21873,21874,21875,21876,21881,21882,21885,21887,21893,21894,21900,21901,21902,21904,21906,21907,21909,21910,21911,21914,21915,21918,21920,21921,21922,21923,21924,21925,21926,21928,21929,21930,21931,21932,21933,21934,21935,21936,21938,21940,21942,21944,21946,21948,21951,21952,21953,21954,21955,21958,21959,21960,21962,21963,21966,21967,21968,21973,21975,21976,21977,21978,21979,21982,21984,21986,21991,21993,21997,21998,22000,22001,22004,22006,22008,22009,22010,22011,22012,22015,22018,22019,22020,22021,22022,22023,22026,22027,22029,22032,22033,22034,22035,22036,22037,22038,22039,22041,22042,22044,22045,22048,22049,22050,22053,22054,22056,22057,22058,22059,22062,22063,22064,22067,22069,22071,22072,22074,22076,22077,22078,22080,22081,22082,22083,22084,22085,22086,22087,22088,22089,22090,22091,22095,22096,22097,22098,22099,22101,22102,22106,22107,22109,22110,22111,22112,22113,22115,22117,22118,22119,22125,22126,22127,22128,22130,22131,22132,22133,22135,22136,22137,22138,22141,22142,22143,22144,22145,22146,22147,22148,22151,22152,22153,22154,22155,22156,22157,22160,22161,22162,22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22180,22181,22182,22183,22184,22185,22186,22187,22188,22189,22190,22192,22193,22194,22195,22196,22197,22198,22200,22201,22202,22203,22205,22206,22207,22208,22209,22210,22211,22212,22213,22214,22215,22216,22217,22219,22220,22221,22222,22223,22224,22225,22226,22227,22229,22230,22232,22233,22236,22243,22245,22246,22247,22248,22249,22250,22252,22254,22255,22258,22259,22262,22263,22264,22267,22268,22272,22273,22274,22277,22279,22283,22284,22285,22286,22287,22288,22289,22290,22291,22292,22293,22294,22295,22296,22297,22298,22299,22301,22302,22304,22305,22306,22308,22309,22310,22311,22315,22321,22322,22324,22325,22326,22327,22328,22332,22333,22335,22337,22339,22340,22341,22342,22344,22345,22347,22354,22355,22356,22357,22358,22360,22361,22370,22371,22373,22375,22380,22382,22384,22385,22386,22388,22389,22392,22393,22394,22397,22398,22399,22400,22401,22407,22408,22409,22410,22413,22414,22415,22416,22417,22420,22421,22422,22423,22424,22425,22426,22428,22429,22430,22431,22437,22440,22442,22444,22447,22448,22449,22451,22453,22454,22455,22457,22458,22459,22460,22461,22462,22463,22464,22465,22468,22469,22470,22471,22472,22473,22474,22476,22477,22480,22481,22483,22486,22487,22491,22492,22494,22497,22498,22499,22501,22502,22503,22504,22505,22506,22507,22508,22510,22512,22513,22514,22515,22517,22518,22519,22523,22524,22526,22527,22529,22531,22532,22533,22536,22537,22538,22540,22542,22543,22544,22546,22547,22548,22550,22551,22552,22554,22555,22556,22557,22559,22562,22563,22565,22566,22567,22568,22569,22571,22572,22573,22574,22575,22577,22578,22579,22580,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22597,22598,22599,22600,22601,22602,22603,22606,22607,22608,22610,22611,22613,22614,22615,22617,22618,22619,22620,22621,22623,22624,22625,22626,22627,22628,22630,22631,22632,22633,22634,22637,22638,22639,22640,22641,22642,22643,22644,22645,22646,22647,22648,22649,22650,22651,22652,22653,22655,22658,22660,22662,22663,22664,22666,22667,22668,22669,22670,22671,22672,22673,22676,22677,22678,22679,22680,22683,22684,22685,22688,22689,22690,22691,22692,22693,22694,22695,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22717,22718,22719,22720,22722,22723,22724,22726,22727,22728,22729,22730,22731,22732,22733,22734,22735,22736,22738,22739,22740,22742,22743,22744,22745,22746,22747,22748,22749,22750,22751,22752,22753,22754,22755,22757,22758,22759,22760,22761,22762,22765,22767,22769,22770,22772,22773,22775,22776,22778,22779,22780,22781,22782,22783,22784,22785,22787,22789,22790,22792,22793,22794,22795,22796,22798,22800,22801,22802,22803,22807,22808,22811,22813,22814,22816,22817,22818,22819,22822,22824,22828,22832,22834,22835,22837,22838,22843,22845,22846,22847,22848,22851,22853,22854,22858,22860,22861,22864,22866,22867,22873,22875,22876,22877,22878,22879,22881,22883,22884,22886,22887,22888,22889,22890,22891,22892,22893,22894,22895,22896,22897,22898,22901,22903,22906,22907,22908,22910,22911,22912,22917,22921,22923,22924,22926,22927,22928,22929,22932,22933,22936,22938,22939,22940,22941,22943,22944,22945,22946,22950,22951,22956,22957,22960,22961,22963,22964,22965,22966,22967,22968,22970,22972,22973,22975,22976,22977,22978,22979,22980,22981,22983,22984,22985,22988,22989,22990,22991,22997,22998,23001,23003,23006,23007,23008,23009,23010,23012,23014,23015,23017,23018,23019,23021,23022,23023,23024,23025,23026,23027,23028,23029,23030,23031,23032,23034,23036,23037,23038,23040,23042,23050,23051,23053,23054,23055,23056,23058,23060,23061,23062,23063,23065,23066,23067,23069,23070,23073,23074,23076,23078,23079,23080,23082,23083,23084,23085,23086,23087,23088,23091,23093,23095,23096,23097,23098,23099,23101,23102,23103,23105,23106,23107,23108,23109,23111,23112,23115,23116,23117,23118,23119,23120,23121,23122,23123,23124,23126,23127,23128,23129,23131,23132,23133,23134,23135,23136,23137,23139,23140,23141,23142,23144,23145,23147,23148,23149,23150,23151,23152,23153,23154,23155,23160,23161,23163,23164,23165,23166,23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23187,23188,23189,23190,23191,23192,23193,23196,23197,23198,23199,23200,23201,23202,23203,23204,23205,23206,23207,23208,23209,23211,23212,23213,23214,23215,23216,23217,23220,23222,23223,23225,23226,23227,23228,23229,23231,23232,23235,23236,23237,23238,23239,23240,23242,23243,23245,23246,23247,23248,23249,23251,23253,23255,23257,23258,23259,23261,23262,23263,23266,23268,23269,23271,23272,23274,23276,23277,23278,23279,23280,23282,23283,23284,23285,23286,23287,23288,23289,23290,23291,23292,23293,23294,23295,23296,23297,23298,23299,23300,23301,23302,23303,23304,23306,23307,23308,23309,23310,23311,23312,23313,23314,23315,23316,23317,23320,23321,23322,23323,23324,23325,23326,23327,23328,23329,23330,23331,23332,23333,23334,23335,23336,23337,23338,23339,23340,23341,23342,23343,23344,23345,23347,23349,23350,23352,23353,23354,23355,23356,23357,23358,23359,23361,23362,23363,23364,23365,23366,23367,23368,23369,23370,23371,23372,23373,23374,23375,23378,23382,23390,23392,23393,23399,23400,23403,23405,23406,23407,23410,23412,23414,23415,23416,23417,23419,23420,23422,23423,23426,23430,23434,23437,23438,23440,23441,23442,23444,23446,23455,23463,23464,23465,23468,23469,23470,23471,23473,23474,23479,23482,23483,23484,23488,23489,23491,23496,23497,23498,23499,23501,23502,23503,23505,23508,23509,23510,23511,23512,23513,23514,23515,23516,23520,23522,23523,23526,23527,23529,23530,23531,23532,23533,23535,23537,23538,23539,23540,23541,23542,23543,23549,23550,23552,23554,23555,23557,23559,23560,23563,23564,23565,23566,23568,23570,23571,23575,23577,23579,23582,23583,23584,23585,23587,23590,23592,23593,23594,23595,23597,23598,23599,23600,23602,23603,23605,23606,23607,23619,23620,23622,23623,23628,23629,23634,23635,23636,23638,23639,23640,23642,23643,23644,23645,23647,23650,23652,23655,23656,23657,23658,23659,23660,23661,23664,23666,23667,23668,23669,23670,23671,23672,23675,23676,23677,23678,23680,23683,23684,23685,23686,23687,23689,23690,23691,23694,23695,23698,23699,23701,23709,23710,23711,23712,23713,23716,23717,23718,23719,23720,23722,23726,23727,23728,23730,23732,23734,23737,23738,23739,23740,23742,23744,23746,23747,23749,23750,23751,23752,23753,23754,23756,23757,23758,23759,23760,23761,23763,23764,23765,23766,23767,23768,23770,23771,23772,23773,23774,23775,23776,23778,23779,23783,23785,23787,23788,23790,23791,23793,23794,23795,23796,23797,23798,23799,23800,23801,23802,23804,23805,23806,23807,23808,23809,23812,23813,23816,23817,23818,23819,23820,23821,23823,23824,23825,23826,23827,23829,23831,23832,23833,23834,23836,23837,23839,23840,23841,23842,23843,23845,23848,23850,23851,23852,23855,23856,23857,23858,23859,23861,23862,23863,23864,23865,23866,23867,23868,23871,23872,23873,23874,23875,23876,23877,23878,23880,23881,23885,23886,23887,23888,23889,23890,23891,23892,23893,23894,23895,23897,23898,23900,23902,23903,23904,23905,23906,23907,23908,23909,23910,23911,23912,23914,23917,23918,23920,23921,23922,23923,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23939,23940,23941,23942,23943,23944,23945,23946,23947,23948,23949,23950,23951,23952,23953,23954,23955,23956,23957,23958,23959,23960,23962,23963,23964,23966,23967,23968,23969,23970,23971,23972,23973,23974,23975,23976,23977,23978,23979,23980,23981,23982,23983,23984,23985,23986,23987,23988,23989,23990,23992,23993,23994,23995,23996,23997,23998,23999,24000,24001,24002,24003,24004,24006,24007,24008,24009,24010,24011,24012,24014,24015,24016,24017,24018,24019,24020,24021,24022,24023,24024,24025,24026,24028,24031,24032,24035,24036,24042,24044,24045,24048,24053,24054,24056,24057,24058,24059,24060,24063,24064,24068,24071,24073,24074,24075,24077,24078,24082,24083,24087,24094,24095,24096,24097,24098,24099,24100,24101,24104,24105,24106,24107,24108,24111,24112,24114,24115,24116,24117,24118,24121,24122,24126,24127,24128,24129,24131,24134,24135,24136,24137,24138,24139,24141,24142,24143,24144,24145,24146,24147,24150,24151,24152,24153,24154,24156,24157,24159,24160,24163,24164,24165,24166,24167,24168,24169,24170,24171,24172,24173,24174,24175,24176,24177,24181,24183,24185,24190,24193,24194,24195,24197,24200,24201,24204,24205,24206,24210,24216,24219,24221,24225,24226,24227,24228,24232,24233,24234,24235,24236,24238,24239,24240,24241,24242,24244,24250,24251,24252,24253,24255,24256,24257,24258,24259,24260,24261,24262,24263,24264,24267,24268,24269,24270,24271,24272,24276,24277,24279,24280,24281,24282,24284,24285,24286,24287,24288,24289,24290,24291,24292,24293,24294,24295,24297,24299,24300,24301,24302,24303,24304,24305,24306,24307,24309,24312,24313,24315,24316,24317,24325,24326,24327,24329,24332,24333,24334,24336,24338,24340,24342,24345,24346,24348,24349,24350,24353,24354,24355,24356,24360,24363,24364,24366,24368,24370,24371,24372,24373,24374,24375,24376,24379,24381,24382,24383,24385,24386,24387,24388,24389,24390,24391,24392,24393,24394,24395,24396,24397,24398,24399,24401,24404,24409,24410,24411,24412,24414,24415,24416,24419,24421,24423,24424,24427,24430,24431,24434,24436,24437,24438,24440,24442,24445,24446,24447,24451,24454,24461,24462,24463,24465,24467,24468,24470,24474,24475,24477,24478,24479,24480,24482,24483,24484,24485,24486,24487,24489,24491,24492,24495,24496,24497,24498,24499,24500,24502,24504,24505,24506,24507,24510,24511,24512,24513,24514,24519,24520,24522,24523,24526,24531,24532,24533,24538,24539,24540,24542,24543,24546,24547,24549,24550,24552,24553,24556,24559,24560,24562,24563,24564,24566,24567,24569,24570,24572,24583,24584,24585,24587,24588,24592,24593,24595,24599,24600,24602,24606,24607,24610,24611,24612,24620,24621,24622,24624,24625,24626,24627,24628,24630,24631,24632,24633,24634,24637,24638,24640,24644,24645,24646,24647,24648,24649,24650,24652,24654,24655,24657,24659,24660,24662,24663,24664,24667,24668,24670,24671,24672,24673,24677,24678,24686,24689,24690,24692,24693,24695,24702,24704,24705,24706,24709,24710,24711,24712,24714,24715,24718,24719,24720,24721,24723,24725,24727,24728,24729,24732,24734,24737,24738,24740,24741,24743,24745,24746,24750,24752,24755,24757,24758,24759,24761,24762,24765,24766,24767,24768,24769,24770,24771,24772,24775,24776,24777,24780,24781,24782,24783,24784,24786,24787,24788,24790,24791,24793,24795,24798,24801,24802,24803,24804,24805,24810,24817,24818,24821,24823,24824,24827,24828,24829,24830,24831,24834,24835,24836,24837,24839,24842,24843,24844,24848,24849,24850,24851,24852,24854,24855,24856,24857,24859,24860,24861,24862,24865,24866,24869,24872,24873,24874,24876,24877,24878,24879,24880,24881,24882,24883,24884,24885,24886,24887,24888,24889,24890,24891,24892,24893,24894,24896,24897,24898,24899,24900,24901,24902,24903,24905,24907,24909,24911,24912,24914,24915,24916,24918,24919,24920,24921,24922,24923,24924,24926,24927,24928,24929,24931,24932,24933,24934,24937,24938,24939,24940,24941,24942,24943,24945,24946,24947,24948,24950,24952,24953,24954,24955,24956,24957,24958,24959,24960,24961,24962,24963,24964,24965,24966,24967,24968,24969,24970,24972,24973,24975,24976,24977,24978,24979,24981,24982,24983,24984,24985,24986,24987,24988,24990,24991,24992,24993,24994,24995,24996,24997,24998,25002,25003,25005,25006,25007,25008,25009,25010,25011,25012,25013,25014,25016,25017,25018,25019,25020,25021,25023,25024,25025,25027,25028,25029,25030,25031,25033,25036,25037,25038,25039,25040,25043,25045,25046,25047,25048,25049,25050,25051,25052,25053,25054,25055,25056,25057,25058,25059,25060,25061,25063,25064,25065,25066,25067,25068,25069,25070,25071,25072,25073,25074,25075,25076,25078,25079,25080,25081,25082,25083,25084,25085,25086,25088,25089,25090,25091,25092,25093,25095,25097,25107,25108,25113,25116,25117,25118,25120,25123,25126,25127,25128,25129,25131,25133,25135,25136,25137,25138,25141,25142,25144,25145,25146,25147,25148,25154,25156,25157,25158,25162,25167,25168,25173,25174,25175,25177,25178,25180,25181,25182,25183,25184,25185,25186,25188,25189,25192,25201,25202,25204,25205,25207,25208,25210,25211,25213,25217,25218,25219,25221,25222,25223,25224,25227,25228,25229,25230,25231,25232,25236,25241,25244,25245,25246,25251,25254,25255,25257,25258,25261,25262,25263,25264,25266,25267,25268,25270,25271,25272,25274,25278,25280,25281,25283,25291,25295,25297,25301,25309,25310,25312,25313,25316,25322,25323,25328,25330,25333,25336,25337,25338,25339,25344,25347,25348,25349,25350,25354,25355,25356,25357,25359,25360,25362,25363,25364,25365,25367,25368,25369,25372,25382,25383,25385,25388,25389,25390,25392,25393,25395,25396,25397,25398,25399,25400,25403,25404,25406,25407,25408,25409,25412,25415,25416,25418,25425,25426,25427,25428,25430,25431,25432,25433,25434,25435,25436,25437,25440,25444,25445,25446,25448,25450,25451,25452,25455,25456,25458,25459,25460,25461,25464,25465,25468,25469,25470,25471,25473,25475,25476,25477,25478,25483,25485,25489,25491,25492,25493,25495,25497,25498,25499,25500,25501,25502,25503,25505,25508,25510,25515,25519,25521,25522,25525,25526,25529,25531,25533,25535,25536,25537,25538,25539,25541,25543,25544,25546,25547,25548,25553,25555,25556,25557,25559,25560,25561,25562,25563,25564,25565,25567,25570,25572,25573,25574,25575,25576,25579,25580,25582,25583,25584,25585,25587,25589,25591,25593,25594,25595,25596,25598,25603,25604,25606,25607,25608,25609,25610,25613,25614,25617,25618,25621,25622,25623,25624,25625,25626,25629,25631,25634,25635,25636,25637,25639,25640,25641,25643,25646,25647,25648,25649,25650,25651,25653,25654,25655,25656,25657,25659,25660,25662,25664,25666,25667,25673,25675,25676,25677,25678,25679,25680,25681,25683,25685,25686,25687,25689,25690,25691,25692,25693,25695,25696,25697,25698,25699,25700,25701,25702,25704,25706,25707,25708,25710,25711,25712,25713,25714,25715,25716,25717,25718,25719,25723,25724,25725,25726,25727,25728,25729,25731,25734,25736,25737,25738,25739,25740,25741,25742,25743,25744,25747,25748,25751,25752,25754,25755,25756,25757,25759,25760,25761,25762,25763,25765,25766,25767,25768,25770,25771,25775,25777,25778,25779,25780,25782,25785,25787,25789,25790,25791,25793,25795,25796,25798,25799,25800,25801,25802,25803,25804,25807,25809,25811,25812,25813,25814,25817,25818,25819,25820,25821,25823,25824,25825,25827,25829,25831,25832,25833,25834,25835,25836,25837,25838,25839,25840,25841,25842,25843,25844,25845,25846,25847,25848,25849,25850,25851,25852,25853,25854,25855,25857,25858,25859,25860,25861,25862,25863,25864,25866,25867,25868,25869,25870,25871,25872,25873,25875,25876,25877,25878,25879,25881,25882,25883,25884,25885,25886,25887,25888,25889,25890,25891,25892,25894,25895,25896,25897,25898,25900,25901,25904,25905,25906,25907,25911,25914,25916,25917,25920,25921,25922,25923,25924,25926,25927,25930,25931,25933,25934,25936,25938,25939,25940,25943,25944,25946,25948,25951,25952,25953,25956,25957,25959,25960,25961,25962,25965,25966,25967,25969,25971,25973,25974,25976,25977,25978,25979,25980,25981,25982,25983,25984,25985,25986,25987,25988,25989,25990,25992,25993,25994,25997,25998,25999,26002,26004,26005,26006,26008,26010,26013,26014,26016,26018,26019,26022,26024,26026,26028,26030,26033,26034,26035,26036,26037,26038,26039,26040,26042,26043,26046,26047,26048,26050,26055,26056,26057,26058,26061,26064,26065,26067,26068,26069,26072,26073,26074,26075,26076,26077,26078,26079,26081,26083,26084,26090,26091,26098,26099,26100,26101,26104,26105,26107,26108,26109,26110,26111,26113,26116,26117,26119,26120,26121,26123,26125,26128,26129,26130,26134,26135,26136,26138,26139,26140,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26162,26163,26167,26168,26169,26170,26171,26173,26175,26176,26178,26180,26181,26182,26183,26184,26185,26186,26189,26190,26192,26193,26200,26201,26203,26204,26205,26206,26208,26210,26211,26213,26215,26217,26218,26219,26220,26221,26225,26226,26227,26229,26232,26233,26235,26236,26237,26239,26240,26241,26243,26245,26246,26248,26249,26250,26251,26253,26254,26255,26256,26258,26259,26260,26261,26264,26265,26266,26267,26268,26270,26271,26272,26273,26274,26275,26276,26277,26278,26281,26282,26283,26284,26285,26287,26288,26289,26290,26291,26293,26294,26295,26296,26298,26299,26300,26301,26303,26304,26305,26306,26307,26308,26309,26310,26311,26312,26313,26314,26315,26316,26317,26318,26319,26320,26321,26322,26323,26324,26325,26326,26327,26328,26330,26334,26335,26336,26337,26338,26339,26340,26341,26343,26344,26346,26347,26348,26349,26350,26351,26353,26357,26358,26360,26362,26363,26365,26369,26370,26371,26372,26373,26374,26375,26380,26382,26383,26385,26386,26387,26390,26392,26393,26394,26396,26398,26400,26401,26402,26403,26404,26405,26407,26409,26414,26416,26418,26419,26422,26423,26424,26425,26427,26428,26430,26431,26433,26436,26437,26439,26442,26443,26445,26450,26452,26453,26455,26456,26457,26458,26459,26461,26466,26467,26468,26470,26471,26475,26476,26478,26481,26484,26486,26488,26489,26490,26491,26493,26496,26498,26499,26501,26502,26504,26506,26508,26509,26510,26511,26513,26514,26515,26516,26518,26521,26523,26527,26528,26529,26532,26534,26537,26540,26542,26545,26546,26548,26553,26554,26555,26556,26557,26558,26559,26560,26562,26565,26566,26567,26568,26569,26570,26571,26572,26573,26574,26581,26582,26583,26587,26591,26593,26595,26596,26598,26599,26600,26602,26603,26605,26606,26610,26613,26614,26615,26616,26617,26618,26619,26620,26622,26625,26626,26627,26628,26630,26637,26640,26642,26644,26645,26648,26649,26650,26651,26652,26654,26655,26656,26658,26659,26660,26661,26662,26663,26664,26667,26668,26669,26670,26671,26672,26673,26676,26677,26678,26682,26683,26687,26695,26699,26701,26703,26706,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26730,26732,26733,26734,26735,26736,26737,26738,26739,26741,26744,26745,26746,26747,26748,26749,26750,26751,26752,26754,26756,26759,26760,26761,26762,26763,26764,26765,26766,26768,26769,26770,26772,26773,26774,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26787,26788,26789,26793,26794,26795,26796,26798,26801,26802,26804,26806,26807,26808,26809,26810,26811,26812,26813,26814,26815,26817,26819,26820,26821,26822,26823,26824,26826,26828,26830,26831,26832,26833,26835,26836,26838,26839,26841,26843,26844,26845,26846,26847,26849,26850,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26863,26866,26867,26868,26870,26871,26872,26875,26877,26878,26879,26880,26882,26883,26884,26886,26887,26888,26889,26890,26892,26895,26897,26899,26900,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26913,26914,26915,26917,26918,26919,26920,26921,26922,26923,26924,26926,26927,26929,26930,26931,26933,26934,26935,26936,26938,26939,26940,26942,26944,26945,26947,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26965,26966,26968,26969,26971,26972,26975,26977,26978,26980,26981,26983,26984,26985,26986,26988,26989,26991,26992,26994,26995,26996,26997,26998,27002,27003,27005,27006,27007,27009,27011,27013,27018,27019,27020,27022,27023,27024,27025,27026,27027,27030,27031,27033,27034,27037,27038,27039,27040,27041,27042,27043,27044,27045,27046,27049,27050,27052,27054,27055,27056,27058,27059,27061,27062,27064,27065,27066,27068,27069,27070,27071,27072,27074,27075,27076,27077,27078,27079,27080,27081,27083,27085,27087,27089,27090,27091,27093,27094,27095,27096,27097,27098,27100,27101,27102,27105,27106,27107,27108,27109,27110,27111,27112,27113,27114,27115,27116,27118,27119,27120,27121,27123,27124,27125,27126,27127,27128,27129,27130,27131,27132,27134,27136,27137,27138,27139,27140,27141,27142,27143,27144,27145,27147,27148,27149,27150,27151,27152,27153,27154,27155,27156,27157,27158,27161,27162,27163,27164,27165,27166,27168,27170,27171,27172,27173,27174,27175,27177,27179,27180,27181,27182,27184,27186,27187,27188,27190,27191,27192,27193,27194,27195,27196,27199,27200,27201,27202,27203,27205,27206,27208,27209,27210,27211,27212,27213,27214,27215,27217,27218,27219,27220,27221,27222,27223,27226,27228,27229,27230,27231,27232,27234,27235,27236,27238,27239,27240,27241,27242,27243,27244,27245,27246,27247,27248,27250,27251,27252,27253,27254,27255,27256,27258,27259,27261,27262,27263,27265,27266,27267,27269,27270,27271,27272,27273,27274,27275,27276,27277,27279,27282,27283,27284,27285,27286,27288,27289,27290,27291,27292,27293,27294,27295,27297,27298,27299,27300,27301,27302,27303,27304,27306,27309,27310,27311,27312,27313,27314,27315,27316,27317,27318,27319,27320,27321,27322,27323,27324,27325,27326,27327,27328,27329,27330,27331,27332,27333,27334,27335,27336,27337,27338,27339,27340,27341,27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27357,27358,27359,27360,27361,27362,27363,27364,27365,27366,27367,27368,27369,27370,27371,27372,27373,27374,27375,27376,27377,27378,27379,27380,27381,27382,27383,27384,27385,27386,27387,27388,27389,27390,27391,27392,27393,27394,27395,27396,27397,27398,27399,27400,27401,27402,27403,27404,27405,27406,27407,27408,27409,27410,27411,27412,27413,27414,27415,27416,27417,27418,27419,27420,27421,27422,27423,27429,27430,27432,27433,27434,27435,27436,27437,27438,27439,27440,27441,27443,27444,27445,27446,27448,27451,27452,27453,27455,27456,27457,27458,27460,27461,27464,27466,27467,27469,27470,27471,27472,27473,27474,27475,27476,27477,27478,27479,27480,27482,27483,27484,27485,27486,27487,27488,27489,27496,27497,27499,27500,27501,27502,27503,27504,27505,27506,27507,27508,27509,27510,27511,27512,27514,27517,27518,27519,27520,27525,27528,27532,27534,27535,27536,27537,27540,27541,27543,27544,27545,27548,27549,27550,27551,27552,27554,27555,27556,27557,27558,27559,27560,27561,27563,27564,27565,27566,27567,27568,27569,27570,27574,27576,27577,27578,27579,27580,27581,27582,27584,27587,27588,27590,27591,27592,27593,27594,27596,27598,27600,27601,27608,27610,27612,27613,27614,27615,27616,27618,27619,27620,27621,27622,27623,27624,27625,27628,27629,27630,27632,27633,27634,27636,27638,27639,27640,27642,27643,27644,27646,27647,27648,27649,27650,27651,27652,27656,27657,27658,27659,27660,27662,27666,27671,27676,27677,27678,27680,27683,27685,27691,27692,27693,27697,27699,27702,27703,27705,27706,27707,27708,27710,27711,27715,27716,27717,27720,27723,27724,27725,27726,27727,27729,27730,27731,27734,27736,27737,27738,27746,27747,27749,27750,27751,27755,27756,27757,27758,27759,27761,27763,27765,27767,27768,27770,27771,27772,27775,27776,27780,27783,27786,27787,27789,27790,27793,27794,27797,27798,27799,27800,27802,27804,27805,27806,27808,27810,27816,27820,27823,27824,27828,27829,27830,27831,27834,27840,27841,27842,27843,27846,27847,27848,27851,27853,27854,27855,27857,27858,27864,27865,27866,27868,27869,27871,27876,27878,27879,27881,27884,27885,27890,27892,27897,27903,27904,27906,27907,27909,27910,27912,27913,27914,27917,27919,27920,27921,27923,27924,27925,27926,27928,27932,27933,27935,27936,27937,27938,27939,27940,27942,27944,27945,27948,27949,27951,27952,27956,27958,27959,27960,27962,27967,27968,27970,27972,27977,27980,27984,27989,27990,27991,27992,27995,27997,27999,28001,28002,28004,28005,28007,28008,28011,28012,28013,28016,28017,28018,28019,28021,28022,28025,28026,28027,28029,28030,28031,28032,28033,28035,28036,28038,28039,28042,28043,28045,28047,28048,28050,28054,28055,28056,28057,28058,28060,28066,28069,28076,28077,28080,28081,28083,28084,28086,28087,28089,28090,28091,28092,28093,28094,28097,28098,28099,28104,28105,28106,28109,28110,28111,28112,28114,28115,28116,28117,28119,28122,28123,28124,28127,28130,28131,28133,28135,28136,28137,28138,28141,28143,28144,28146,28148,28149,28150,28152,28154,28157,28158,28159,28160,28161,28162,28163,28164,28166,28167,28168,28169,28171,28175,28178,28179,28181,28184,28185,28187,28188,28190,28191,28194,28198,28199,28200,28202,28204,28206,28208,28209,28211,28213,28214,28215,28217,28219,28220,28221,28222,28223,28224,28225,28226,28229,28230,28231,28232,28233,28234,28235,28236,28239,28240,28241,28242,28245,28247,28249,28250,28252,28253,28254,28256,28257,28258,28259,28260,28261,28262,28263,28264,28265,28266,28268,28269,28271,28272,28273,28274,28275,28276,28277,28278,28279,28280,28281,28282,28283,28284,28285,28288,28289,28290,28292,28295,28296,28298,28299,28300,28301,28302,28305,28306,28307,28308,28309,28310,28311,28313,28314,28315,28317,28318,28320,28321,28323,28324,28326,28328,28329,28331,28332,28333,28334,28336,28339,28341,28344,28345,28348,28350,28351,28352,28355,28356,28357,28358,28360,28361,28362,28364,28365,28366,28368,28370,28374,28376,28377,28379,28380,28381,28387,28391,28394,28395,28396,28397,28398,28399,28400,28401,28402,28403,28405,28406,28407,28408,28410,28411,28412,28413,28414,28415,28416,28417,28419,28420,28421,28423,28424,28426,28427,28428,28429,28430,28432,28433,28434,28438,28439,28440,28441,28442,28443,28444,28445,28446,28447,28449,28450,28451,28453,28454,28455,28456,28460,28462,28464,28466,28468,28469,28471,28472,28473,28474,28475,28476,28477,28479,28480,28481,28482,28483,28484,28485,28488,28489,28490,28492,28494,28495,28496,28497,28498,28499,28500,28501,28502,28503,28505,28506,28507,28509,28511,28512,28513,28515,28516,28517,28519,28520,28521,28522,28523,28524,28527,28528,28529,28531,28533,28534,28535,28537,28539,28541,28542,28543,28544,28545,28546,28547,28549,28550,28551,28554,28555,28559,28560,28561,28562,28563,28564,28565,28566,28567,28568,28569,28570,28571,28573,28574,28575,28576,28578,28579,28580,28581,28582,28584,28585,28586,28587,28588,28589,28590,28591,28592,28593,28594,28596,28597,28599,28600,28602,28603,28604,28605,28606,28607,28609,28611,28612,28613,28614,28615,28616,28618,28619,28620,28621,28622,28623,28624,28627,28628,28629,28630,28631,28632,28633,28634,28635,28636,28637,28639,28642,28643,28644,28645,28646,28647,28648,28649,28650,28651,28652,28653,28656,28657,28658,28659,28660,28661,28662,28663,28664,28665,28666,28667,28668,28669,28670,28671,28672,28673,28674,28675,28676,28677,28678,28679,28680,28681,28682,28683,28684,28685,28686,28687,28688,28690,28691,28692,28693,28694,28695,28696,28697,28700,28701,28702,28703,28704,28705,28706,28708,28709,28710,28711,28712,28713,28714,28715,28716,28717,28718,28719,28720,28721,28722,28723,28724,28726,28727,28728,28730,28731,28732,28733,28734,28735,28736,28737,28738,28739,28740,28741,28742,28743,28744,28745,28746,28747,28749,28750,28752,28753,28754,28755,28756,28757,28758,28759,28760,28761,28762,28763,28764,28765,28767,28768,28769,28770,28771,28772,28773,28774,28775,28776,28777,28778,28782,28785,28786,28787,28788,28791,28793,28794,28795,28797,28801,28802,28803,28804,28806,28807,28808,28811,28812,28813,28815,28816,28817,28819,28823,28824,28826,28827,28830,28831,28832,28833,28834,28835,28836,28837,28838,28839,28840,28841,28842,28848,28850,28852,28853,28854,28858,28862,28863,28868,28869,28870,28871,28873,28875,28876,28877,28878,28879,28880,28881,28882,28883,28884,28885,28886,28887,28890,28892,28893,28894,28896,28897,28898,28899,28901,28906,28910,28912,28913,28914,28915,28916,28917,28918,28920,28922,28923,28924,28926,28927,28928,28929,28930,28931,28932,28933,28934,28935,28936,28939,28940,28941,28942,28943,28945,28946,28948,28951,28955,28956,28957,28958,28959,28960,28961,28962,28963,28964,28965,28967,28968,28969,28970,28971,28972,28973,28974,28978,28979,28980,28981,28983,28984,28985,28986,28987,28988,28989,28990,28991,28992,28993,28994,28995,28996,28998,28999,29000,29001,29003,29005,29007,29008,29009,29010,29011,29012,29013,29014,29015,29016,29017,29018,29019,29021,29023,29024,29025,29026,29027,29029,29033,29034,29035,29036,29037,29039,29040,29041,29044,29045,29046,29047,29049,29051,29052,29054,29055,29056,29057,29058,29059,29061,29062,29063,29064,29065,29067,29068,29069,29070,29072,29073,29074,29075,29077,29078,29079,29082,29083,29084,29085,29086,29089,29090,29091,29092,29093,29094,29095,29097,29098,29099,29101,29102,29103,29104,29105,29106,29108,29110,29111,29112,29114,29115,29116,29117,29118,29119,29120,29121,29122,29124,29125,29126,29127,29128,29129,29130,29131,29132,29133,29135,29136,29137,29138,29139,29142,29143,29144,29145,29146,29147,29148,29149,29150,29151,29153,29154,29155,29156,29158,29160,29161,29162,29163,29164,29165,29167,29168,29169,29170,29171,29172,29173,29174,29175,29176,29178,29179,29180,29181,29182,29183,29184,29185,29186,29187,29188,29189,29191,29192,29193,29194,29195,29196,29197,29198,29199,29200,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29211,29212,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29225,29227,29229,29230,29231,29234,29235,29236,29242,29244,29246,29248,29249,29250,29251,29252,29253,29254,29257,29258,29259,29262,29263,29264,29265,29267,29268,29269,29271,29272,29274,29276,29278,29280,29283,29284,29285,29288,29290,29291,29292,29293,29296,29297,29299,29300,29302,29303,29304,29307,29308,29309,29314,29315,29317,29318,29319,29320,29321,29324,29326,29328,29329,29331,29332,29333,29334,29335,29336,29337,29338,29339,29340,29341,29342,29344,29345,29346,29347,29348,29349,29350,29351,29352,29353,29354,29355,29358,29361,29362,29363,29365,29370,29371,29372,29373,29374,29375,29376,29381,29382,29383,29385,29386,29387,29388,29391,29393,29395,29396,29397,29398,29400,29402,29403,58566,58567,58568,58569,58570,58571,58572,58573,58574,58575,58576,58577,58578,58579,58580,58581,58582,58583,58584,58585,58586,58587,58588,58589,58590,58591,58592,58593,58594,58595,58596,58597,58598,58599,58600,58601,58602,58603,58604,58605,58606,58607,58608,58609,58610,58611,58612,58613,58614,58615,58616,58617,58618,58619,58620,58621,58622,58623,58624,58625,58626,58627,58628,58629,58630,58631,58632,58633,58634,58635,58636,58637,58638,58639,58640,58641,58642,58643,58644,58645,58646,58647,58648,58649,58650,58651,58652,58653,58654,58655,58656,58657,58658,58659,58660,58661,12288,12289,12290,183,713,711,168,12291,12293,8212,65374,8214,8230,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12310,12311,12304,12305,177,215,247,8758,8743,8744,8721,8719,8746,8745,8712,8759,8730,8869,8741,8736,8978,8857,8747,8750,8801,8780,8776,8765,8733,8800,8814,8815,8804,8805,8734,8757,8756,9794,9792,176,8242,8243,8451,65284,164,65504,65505,8240,167,8470,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,8251,8594,8592,8593,8595,12307,58662,58663,58664,58665,58666,58667,58668,58669,58670,58671,58672,58673,58674,58675,58676,58677,58678,58679,58680,58681,58682,58683,58684,58685,58686,58687,58688,58689,58690,58691,58692,58693,58694,58695,58696,58697,58698,58699,58700,58701,58702,58703,58704,58705,58706,58707,58708,58709,58710,58711,58712,58713,58714,58715,58716,58717,58718,58719,58720,58721,58722,58723,58724,58725,58726,58727,58728,58729,58730,58731,58732,58733,58734,58735,58736,58737,58738,58739,58740,58741,58742,58743,58744,58745,58746,58747,58748,58749,58750,58751,58752,58753,58754,58755,58756,58757,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,59238,59239,59240,59241,59242,59243,9352,9353,9354,9355,9356,9357,9358,9359,9360,9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,9347,9348,9349,9350,9351,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,8364,59245,12832,12833,12834,12835,12836,12837,12838,12839,12840,12841,59246,59247,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,59248,59249,58758,58759,58760,58761,58762,58763,58764,58765,58766,58767,58768,58769,58770,58771,58772,58773,58774,58775,58776,58777,58778,58779,58780,58781,58782,58783,58784,58785,58786,58787,58788,58789,58790,58791,58792,58793,58794,58795,58796,58797,58798,58799,58800,58801,58802,58803,58804,58805,58806,58807,58808,58809,58810,58811,58812,58813,58814,58815,58816,58817,58818,58819,58820,58821,58822,58823,58824,58825,58826,58827,58828,58829,58830,58831,58832,58833,58834,58835,58836,58837,58838,58839,58840,58841,58842,58843,58844,58845,58846,58847,58848,58849,58850,58851,58852,12288,65281,65282,65283,65509,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65340,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,58854,58855,58856,58857,58858,58859,58860,58861,58862,58863,58864,58865,58866,58867,58868,58869,58870,58871,58872,58873,58874,58875,58876,58877,58878,58879,58880,58881,58882,58883,58884,58885,58886,58887,58888,58889,58890,58891,58892,58893,58894,58895,58896,58897,58898,58899,58900,58901,58902,58903,58904,58905,58906,58907,58908,58909,58910,58911,58912,58913,58914,58915,58916,58917,58918,58919,58920,58921,58922,58923,58924,58925,58926,58927,58928,58929,58930,58931,58932,58933,58934,58935,58936,58937,58938,58939,58940,58941,58942,58943,58944,58945,58946,58947,58948,58949,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,59250,59251,59252,59253,59254,59255,59256,59257,59258,59259,59260,58950,58951,58952,58953,58954,58955,58956,58957,58958,58959,58960,58961,58962,58963,58964,58965,58966,58967,58968,58969,58970,58971,58972,58973,58974,58975,58976,58977,58978,58979,58980,58981,58982,58983,58984,58985,58986,58987,58988,58989,58990,58991,58992,58993,58994,58995,58996,58997,58998,58999,59000,59001,59002,59003,59004,59005,59006,59007,59008,59009,59010,59011,59012,59013,59014,59015,59016,59017,59018,59019,59020,59021,59022,59023,59024,59025,59026,59027,59028,59029,59030,59031,59032,59033,59034,59035,59036,59037,59038,59039,59040,59041,59042,59043,59044,59045,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,59261,59262,59263,59264,59265,59266,59267,59268,59046,59047,59048,59049,59050,59051,59052,59053,59054,59055,59056,59057,59058,59059,59060,59061,59062,59063,59064,59065,59066,59067,59068,59069,59070,59071,59072,59073,59074,59075,59076,59077,59078,59079,59080,59081,59082,59083,59084,59085,59086,59087,59088,59089,59090,59091,59092,59093,59094,59095,59096,59097,59098,59099,59100,59101,59102,59103,59104,59105,59106,59107,59108,59109,59110,59111,59112,59113,59114,59115,59116,59117,59118,59119,59120,59121,59122,59123,59124,59125,59126,59127,59128,59129,59130,59131,59132,59133,59134,59135,59136,59137,59138,59139,59140,59141,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,59269,59270,59271,59272,59273,59274,59275,59276,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,59277,59278,59279,59280,59281,59282,59283,65077,65078,65081,65082,65087,65088,65085,65086,65089,65090,65091,65092,59284,59285,65083,65084,65079,65080,65073,59286,65075,65076,59287,59288,59289,59290,59291,59292,59293,59294,59295,59142,59143,59144,59145,59146,59147,59148,59149,59150,59151,59152,59153,59154,59155,59156,59157,59158,59159,59160,59161,59162,59163,59164,59165,59166,59167,59168,59169,59170,59171,59172,59173,59174,59175,59176,59177,59178,59179,59180,59181,59182,59183,59184,59185,59186,59187,59188,59189,59190,59191,59192,59193,59194,59195,59196,59197,59198,59199,59200,59201,59202,59203,59204,59205,59206,59207,59208,59209,59210,59211,59212,59213,59214,59215,59216,59217,59218,59219,59220,59221,59222,59223,59224,59225,59226,59227,59228,59229,59230,59231,59232,59233,59234,59235,59236,59237,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,59296,59297,59298,59299,59300,59301,59302,59303,59304,59305,59306,59307,59308,59309,59310,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,59311,59312,59313,59314,59315,59316,59317,59318,59319,59320,59321,59322,59323,714,715,729,8211,8213,8229,8245,8453,8457,8598,8599,8600,8601,8725,8735,8739,8786,8806,8807,8895,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584,9585,9586,9587,9601,9602,9603,9604,9605,9606,9607,9608,9609,9610,9611,9612,9613,9614,9615,9619,9620,9621,9660,9661,9698,9699,9700,9701,9737,8853,12306,12317,12318,59324,59325,59326,59327,59328,59329,59330,59331,59332,59333,59334,257,225,462,224,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,234,593,7743,324,328,505,609,59337,59338,59339,59340,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,59341,59342,59343,59344,59345,59346,59347,59348,59349,59350,59351,59352,59353,59354,59355,59356,59357,59358,59359,59360,59361,12321,12322,12323,12324,12325,12326,12327,12328,12329,12963,13198,13199,13212,13213,13214,13217,13252,13262,13265,13266,13269,65072,65506,65508,59362,8481,12849,59363,8208,59364,59365,59366,12540,12443,12444,12541,12542,12294,12445,12446,65097,65098,65099,65100,65101,65102,65103,65104,65105,65106,65108,65109,65110,65111,65113,65114,65115,65116,65117,65118,65119,65120,65121,65122,65123,65124,65125,65126,65128,65129,65130,65131,12350,12272,12273,12274,12275,12276,12277,12278,12279,12280,12281,12282,12283,12295,59380,59381,59382,59383,59384,59385,59386,59387,59388,59389,59390,59391,59392,9472,9473,9474,9475,9476,9477,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,9489,9490,9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506,9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,9521,9522,9523,9524,9525,9526,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536,9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,59393,59394,59395,59396,59397,59398,59399,59400,59401,59402,59403,59404,59405,59406,59407,29404,29405,29407,29410,29411,29412,29413,29414,29415,29418,29419,29429,29430,29433,29437,29438,29439,29440,29442,29444,29445,29446,29447,29448,29449,29451,29452,29453,29455,29456,29457,29458,29460,29464,29465,29466,29471,29472,29475,29476,29478,29479,29480,29485,29487,29488,29490,29491,29493,29494,29498,29499,29500,29501,29504,29505,29506,29507,29508,29509,29510,29511,29512,29513,29514,29515,29516,29518,29519,29521,29523,29524,29525,29526,29528,29529,29530,29531,29532,29533,29534,29535,29537,29538,29539,29540,29541,29542,29543,29544,29545,29546,29547,29550,29552,29553,57344,57345,57346,57347,57348,57349,57350,57351,57352,57353,57354,57355,57356,57357,57358,57359,57360,57361,57362,57363,57364,57365,57366,57367,57368,57369,57370,57371,57372,57373,57374,57375,57376,57377,57378,57379,57380,57381,57382,57383,57384,57385,57386,57387,57388,57389,57390,57391,57392,57393,57394,57395,57396,57397,57398,57399,57400,57401,57402,57403,57404,57405,57406,57407,57408,57409,57410,57411,57412,57413,57414,57415,57416,57417,57418,57419,57420,57421,57422,57423,57424,57425,57426,57427,57428,57429,57430,57431,57432,57433,57434,57435,57436,57437,29554,29555,29556,29557,29558,29559,29560,29561,29562,29563,29564,29565,29567,29568,29569,29570,29571,29573,29574,29576,29578,29580,29581,29583,29584,29586,29587,29588,29589,29591,29592,29593,29594,29596,29597,29598,29600,29601,29603,29604,29605,29606,29607,29608,29610,29612,29613,29617,29620,29621,29622,29624,29625,29628,29629,29630,29631,29633,29635,29636,29637,29638,29639,29643,29644,29646,29650,29651,29652,29653,29654,29655,29656,29658,29659,29660,29661,29663,29665,29666,29667,29668,29670,29672,29674,29675,29676,29678,29679,29680,29681,29683,29684,29685,29686,29687,57438,57439,57440,57441,57442,57443,57444,57445,57446,57447,57448,57449,57450,57451,57452,57453,57454,57455,57456,57457,57458,57459,57460,57461,57462,57463,57464,57465,57466,57467,57468,57469,57470,57471,57472,57473,57474,57475,57476,57477,57478,57479,57480,57481,57482,57483,57484,57485,57486,57487,57488,57489,57490,57491,57492,57493,57494,57495,57496,57497,57498,57499,57500,57501,57502,57503,57504,57505,57506,57507,57508,57509,57510,57511,57512,57513,57514,57515,57516,57517,57518,57519,57520,57521,57522,57523,57524,57525,57526,57527,57528,57529,57530,57531,29688,29689,29690,29691,29692,29693,29694,29695,29696,29697,29698,29700,29703,29704,29707,29708,29709,29710,29713,29714,29715,29716,29717,29718,29719,29720,29721,29724,29725,29726,29727,29728,29729,29731,29732,29735,29737,29739,29741,29743,29745,29746,29751,29752,29753,29754,29755,29757,29758,29759,29760,29762,29763,29764,29765,29766,29767,29768,29769,29770,29771,29772,29773,29774,29775,29776,29777,29778,29779,29780,29782,29784,29789,29792,29793,29794,29795,29796,29797,29798,29799,29800,29801,29802,29803,29804,29806,29807,29809,29810,29811,29812,29813,29816,29817,29818,57532,57533,57534,57535,57536,57537,57538,57539,57540,57541,57542,57543,57544,57545,57546,57547,57548,57549,57550,57551,57552,57553,57554,57555,57556,57557,57558,57559,57560,57561,57562,57563,57564,57565,57566,57567,57568,57569,57570,57571,57572,57573,57574,57575,57576,57577,57578,57579,57580,57581,57582,57583,57584,57585,57586,57587,57588,57589,57590,57591,57592,57593,57594,57595,57596,57597,57598,57599,57600,57601,57602,57603,57604,57605,57606,57607,57608,57609,57610,57611,57612,57613,57614,57615,57616,57617,57618,57619,57620,57621,57622,57623,57624,57625,29819,29820,29821,29823,29826,29828,29829,29830,29832,29833,29834,29836,29837,29839,29841,29842,29843,29844,29845,29846,29847,29848,29849,29850,29851,29853,29855,29856,29857,29858,29859,29860,29861,29862,29866,29867,29868,29869,29870,29871,29872,29873,29874,29875,29876,29877,29878,29879,29880,29881,29883,29884,29885,29886,29887,29888,29889,29890,29891,29892,29893,29894,29895,29896,29897,29898,29899,29900,29901,29902,29903,29904,29905,29907,29908,29909,29910,29911,29912,29913,29914,29915,29917,29919,29921,29925,29927,29928,29929,29930,29931,29932,29933,29936,29937,29938,57626,57627,57628,57629,57630,57631,57632,57633,57634,57635,57636,57637,57638,57639,57640,57641,57642,57643,57644,57645,57646,57647,57648,57649,57650,57651,57652,57653,57654,57655,57656,57657,57658,57659,57660,57661,57662,57663,57664,57665,57666,57667,57668,57669,57670,57671,57672,57673,57674,57675,57676,57677,57678,57679,57680,57681,57682,57683,57684,57685,57686,57687,57688,57689,57690,57691,57692,57693,57694,57695,57696,57697,57698,57699,57700,57701,57702,57703,57704,57705,57706,57707,57708,57709,57710,57711,57712,57713,57714,57715,57716,57717,57718,57719,29939,29941,29944,29945,29946,29947,29948,29949,29950,29952,29953,29954,29955,29957,29958,29959,29960,29961,29962,29963,29964,29966,29968,29970,29972,29973,29974,29975,29979,29981,29982,29984,29985,29986,29987,29988,29990,29991,29994,29998,30004,30006,30009,30012,30013,30015,30017,30018,30019,30020,30022,30023,30025,30026,30029,30032,30033,30034,30035,30037,30038,30039,30040,30045,30046,30047,30048,30049,30050,30051,30052,30055,30056,30057,30059,30060,30061,30062,30063,30064,30065,30067,30069,30070,30071,30074,30075,30076,30077,30078,30080,30081,30082,30084,30085,30087,57720,57721,57722,57723,57724,57725,57726,57727,57728,57729,57730,57731,57732,57733,57734,57735,57736,57737,57738,57739,57740,57741,57742,57743,57744,57745,57746,57747,57748,57749,57750,57751,57752,57753,57754,57755,57756,57757,57758,57759,57760,57761,57762,57763,57764,57765,57766,57767,57768,57769,57770,57771,57772,57773,57774,57775,57776,57777,57778,57779,57780,57781,57782,57783,57784,57785,57786,57787,57788,57789,57790,57791,57792,57793,57794,57795,57796,57797,57798,57799,57800,57801,57802,57803,57804,57805,57806,57807,57808,57809,57810,57811,57812,57813,30088,30089,30090,30092,30093,30094,30096,30099,30101,30104,30107,30108,30110,30114,30118,30119,30120,30121,30122,30125,30134,30135,30138,30139,30143,30144,30145,30150,30155,30156,30158,30159,30160,30161,30163,30167,30169,30170,30172,30173,30175,30176,30177,30181,30185,30188,30189,30190,30191,30194,30195,30197,30198,30199,30200,30202,30203,30205,30206,30210,30212,30214,30215,30216,30217,30219,30221,30222,30223,30225,30226,30227,30228,30230,30234,30236,30237,30238,30241,30243,30247,30248,30252,30254,30255,30257,30258,30262,30263,30265,30266,30267,30269,30273,30274,30276,57814,57815,57816,57817,57818,57819,57820,57821,57822,57823,57824,57825,57826,57827,57828,57829,57830,57831,57832,57833,57834,57835,57836,57837,57838,57839,57840,57841,57842,57843,57844,57845,57846,57847,57848,57849,57850,57851,57852,57853,57854,57855,57856,57857,57858,57859,57860,57861,57862,57863,57864,57865,57866,57867,57868,57869,57870,57871,57872,57873,57874,57875,57876,57877,57878,57879,57880,57881,57882,57883,57884,57885,57886,57887,57888,57889,57890,57891,57892,57893,57894,57895,57896,57897,57898,57899,57900,57901,57902,57903,57904,57905,57906,57907,30277,30278,30279,30280,30281,30282,30283,30286,30287,30288,30289,30290,30291,30293,30295,30296,30297,30298,30299,30301,30303,30304,30305,30306,30308,30309,30310,30311,30312,30313,30314,30316,30317,30318,30320,30321,30322,30323,30324,30325,30326,30327,30329,30330,30332,30335,30336,30337,30339,30341,30345,30346,30348,30349,30351,30352,30354,30356,30357,30359,30360,30362,30363,30364,30365,30366,30367,30368,30369,30370,30371,30373,30374,30375,30376,30377,30378,30379,30380,30381,30383,30384,30387,30389,30390,30391,30392,30393,30394,30395,30396,30397,30398,30400,30401,30403,21834,38463,22467,25384,21710,21769,21696,30353,30284,34108,30702,33406,30861,29233,38552,38797,27688,23433,20474,25353,26263,23736,33018,26696,32942,26114,30414,20985,25942,29100,32753,34948,20658,22885,25034,28595,33453,25420,25170,21485,21543,31494,20843,30116,24052,25300,36299,38774,25226,32793,22365,38712,32610,29240,30333,26575,30334,25670,20336,36133,25308,31255,26001,29677,25644,25203,33324,39041,26495,29256,25198,25292,20276,29923,21322,21150,32458,37030,24110,26758,27036,33152,32465,26834,30917,34444,38225,20621,35876,33502,32990,21253,35090,21093,30404,30407,30409,30411,30412,30419,30421,30425,30426,30428,30429,30430,30432,30433,30434,30435,30436,30438,30439,30440,30441,30442,30443,30444,30445,30448,30451,30453,30454,30455,30458,30459,30461,30463,30464,30466,30467,30469,30470,30474,30476,30478,30479,30480,30481,30482,30483,30484,30485,30486,30487,30488,30491,30492,30493,30494,30497,30499,30500,30501,30503,30506,30507,30508,30510,30512,30513,30514,30515,30516,30521,30523,30525,30526,30527,30530,30532,30533,30534,30536,30537,30538,30539,30540,30541,30542,30543,30546,30547,30548,30549,30550,30551,30552,30553,30556,34180,38649,20445,22561,39281,23453,25265,25253,26292,35961,40077,29190,26479,30865,24754,21329,21271,36744,32972,36125,38049,20493,29384,22791,24811,28953,34987,22868,33519,26412,31528,23849,32503,29997,27893,36454,36856,36924,40763,27604,37145,31508,24444,30887,34006,34109,27605,27609,27606,24065,24199,30201,38381,25949,24330,24517,36767,22721,33218,36991,38491,38829,36793,32534,36140,25153,20415,21464,21342,36776,36777,36779,36941,26631,24426,33176,34920,40150,24971,21035,30250,24428,25996,28626,28392,23486,25672,20853,20912,26564,19993,31177,39292,28851,30557,30558,30559,30560,30564,30567,30569,30570,30573,30574,30575,30576,30577,30578,30579,30580,30581,30582,30583,30584,30586,30587,30588,30593,30594,30595,30598,30599,30600,30601,30602,30603,30607,30608,30611,30612,30613,30614,30615,30616,30617,30618,30619,30620,30621,30622,30625,30627,30628,30630,30632,30635,30637,30638,30639,30641,30642,30644,30646,30647,30648,30649,30650,30652,30654,30656,30657,30658,30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30670,30671,30672,30673,30674,30675,30676,30677,30678,30680,30681,30682,30685,30686,30687,30688,30689,30692,30149,24182,29627,33760,25773,25320,38069,27874,21338,21187,25615,38082,31636,20271,24091,33334,33046,33162,28196,27850,39539,25429,21340,21754,34917,22496,19981,24067,27493,31807,37096,24598,25830,29468,35009,26448,25165,36130,30572,36393,37319,24425,33756,34081,39184,21442,34453,27531,24813,24808,28799,33485,33329,20179,27815,34255,25805,31961,27133,26361,33609,21397,31574,20391,20876,27979,23618,36461,25554,21449,33580,33590,26597,30900,25661,23519,23700,24046,35815,25286,26612,35962,25600,25530,34633,39307,35863,32544,38130,20135,38416,39076,26124,29462,30694,30696,30698,30703,30704,30705,30706,30708,30709,30711,30713,30714,30715,30716,30723,30724,30725,30726,30727,30728,30730,30731,30734,30735,30736,30739,30741,30745,30747,30750,30752,30753,30754,30756,30760,30762,30763,30766,30767,30769,30770,30771,30773,30774,30781,30783,30785,30786,30787,30788,30790,30792,30793,30794,30795,30797,30799,30801,30803,30804,30808,30809,30810,30811,30812,30814,30815,30816,30817,30818,30819,30820,30821,30822,30823,30824,30825,30831,30832,30833,30834,30835,30836,30837,30838,30840,30841,30842,30843,30845,30846,30847,30848,30849,30850,30851,22330,23581,24120,38271,20607,32928,21378,25950,30021,21809,20513,36229,25220,38046,26397,22066,28526,24034,21557,28818,36710,25199,25764,25507,24443,28552,37108,33251,36784,23576,26216,24561,27785,38472,36225,34924,25745,31216,22478,27225,25104,21576,20056,31243,24809,28548,35802,25215,36894,39563,31204,21507,30196,25345,21273,27744,36831,24347,39536,32827,40831,20360,23610,36196,32709,26021,28861,20805,20914,34411,23815,23456,25277,37228,30068,36364,31264,24833,31609,20167,32504,30597,19985,33261,21021,20986,27249,21416,36487,38148,38607,28353,38500,26970,30852,30853,30854,30856,30858,30859,30863,30864,30866,30868,30869,30870,30873,30877,30878,30880,30882,30884,30886,30888,30889,30890,30891,30892,30893,30894,30895,30901,30902,30903,30904,30906,30907,30908,30909,30911,30912,30914,30915,30916,30918,30919,30920,30924,30925,30926,30927,30929,30930,30931,30934,30935,30936,30938,30939,30940,30941,30942,30943,30944,30945,30946,30947,30948,30949,30950,30951,30953,30954,30955,30957,30958,30959,30960,30961,30963,30965,30966,30968,30969,30971,30972,30973,30974,30975,30976,30978,30979,30980,30982,30983,30984,30985,30986,30987,30988,30784,20648,30679,25616,35302,22788,25571,24029,31359,26941,20256,33337,21912,20018,30126,31383,24162,24202,38383,21019,21561,28810,25462,38180,22402,26149,26943,37255,21767,28147,32431,34850,25139,32496,30133,33576,30913,38604,36766,24904,29943,35789,27492,21050,36176,27425,32874,33905,22257,21254,20174,19995,20945,31895,37259,31751,20419,36479,31713,31388,25703,23828,20652,33030,30209,31929,28140,32736,26449,23384,23544,30923,25774,25619,25514,25387,38169,25645,36798,31572,30249,25171,22823,21574,27513,20643,25140,24102,27526,20195,36151,34955,24453,36910,30989,30990,30991,30992,30993,30994,30996,30997,30998,30999,31000,31001,31002,31003,31004,31005,31007,31008,31009,31010,31011,31013,31014,31015,31016,31017,31018,31019,31020,31021,31022,31023,31024,31025,31026,31027,31029,31030,31031,31032,31033,31037,31039,31042,31043,31044,31045,31047,31050,31051,31052,31053,31054,31055,31056,31057,31058,31060,31061,31064,31065,31073,31075,31076,31078,31081,31082,31083,31084,31086,31088,31089,31090,31091,31092,31093,31094,31097,31099,31100,31101,31102,31103,31106,31107,31110,31111,31112,31113,31115,31116,31117,31118,31120,31121,31122,24608,32829,25285,20025,21333,37112,25528,32966,26086,27694,20294,24814,28129,35806,24377,34507,24403,25377,20826,33633,26723,20992,25443,36424,20498,23707,31095,23548,21040,31291,24764,36947,30423,24503,24471,30340,36460,28783,30331,31561,30634,20979,37011,22564,20302,28404,36842,25932,31515,29380,28068,32735,23265,25269,24213,22320,33922,31532,24093,24351,36882,32532,39072,25474,28359,30872,28857,20856,38747,22443,30005,20291,30008,24215,24806,22880,28096,27583,30857,21500,38613,20939,20993,25481,21514,38035,35843,36300,29241,30879,34678,36845,35853,21472,31123,31124,31125,31126,31127,31128,31129,31131,31132,31133,31134,31135,31136,31137,31138,31139,31140,31141,31142,31144,31145,31146,31147,31148,31149,31150,31151,31152,31153,31154,31156,31157,31158,31159,31160,31164,31167,31170,31172,31173,31175,31176,31178,31180,31182,31183,31184,31187,31188,31190,31191,31193,31194,31195,31196,31197,31198,31200,31201,31202,31205,31208,31210,31212,31214,31217,31218,31219,31220,31221,31222,31223,31225,31226,31228,31230,31231,31233,31236,31237,31239,31240,31241,31242,31244,31247,31248,31249,31250,31251,31253,31254,31256,31257,31259,31260,19969,30447,21486,38025,39030,40718,38189,23450,35746,20002,19996,20908,33891,25026,21160,26635,20375,24683,20923,27934,20828,25238,26007,38497,35910,36887,30168,37117,30563,27602,29322,29420,35835,22581,30585,36172,26460,38208,32922,24230,28193,22930,31471,30701,38203,27573,26029,32526,22534,20817,38431,23545,22697,21544,36466,25958,39039,22244,38045,30462,36929,25479,21702,22810,22842,22427,36530,26421,36346,33333,21057,24816,22549,34558,23784,40517,20420,39069,35769,23077,24694,21380,25212,36943,37122,39295,24681,32780,20799,32819,23572,39285,27953,20108,31261,31263,31265,31266,31268,31269,31270,31271,31272,31273,31274,31275,31276,31277,31278,31279,31280,31281,31282,31284,31285,31286,31288,31290,31294,31296,31297,31298,31299,31300,31301,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,31314,31315,31316,31317,31318,31320,31321,31322,31323,31324,31325,31326,31327,31328,31329,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31345,31346,31347,31349,31355,31356,31357,31358,31362,31365,31367,31369,31370,31371,31372,31374,31375,31376,31379,31380,31385,31386,31387,31390,31393,31394,36144,21457,32602,31567,20240,20047,38400,27861,29648,34281,24070,30058,32763,27146,30718,38034,32321,20961,28902,21453,36820,33539,36137,29359,39277,27867,22346,33459,26041,32938,25151,38450,22952,20223,35775,32442,25918,33778,38750,21857,39134,32933,21290,35837,21536,32954,24223,27832,36153,33452,37210,21545,27675,20998,32439,22367,28954,27774,31881,22859,20221,24575,24868,31914,20016,23553,26539,34562,23792,38155,39118,30127,28925,36898,20911,32541,35773,22857,20964,20315,21542,22827,25975,32932,23413,25206,25282,36752,24133,27679,31526,20239,20440,26381,31395,31396,31399,31401,31402,31403,31406,31407,31408,31409,31410,31412,31413,31414,31415,31416,31417,31418,31419,31420,31421,31422,31424,31425,31426,31427,31428,31429,31430,31431,31432,31433,31434,31436,31437,31438,31439,31440,31441,31442,31443,31444,31445,31447,31448,31450,31451,31452,31453,31457,31458,31460,31463,31464,31465,31466,31467,31468,31470,31472,31473,31474,31475,31476,31477,31478,31479,31480,31483,31484,31486,31488,31489,31490,31493,31495,31497,31500,31501,31502,31504,31506,31507,31510,31511,31512,31514,31516,31517,31519,31521,31522,31523,31527,31529,31533,28014,28074,31119,34993,24343,29995,25242,36741,20463,37340,26023,33071,33105,24220,33104,36212,21103,35206,36171,22797,20613,20184,38428,29238,33145,36127,23500,35747,38468,22919,32538,21648,22134,22030,35813,25913,27010,38041,30422,28297,24178,29976,26438,26577,31487,32925,36214,24863,31174,25954,36195,20872,21018,38050,32568,32923,32434,23703,28207,26464,31705,30347,39640,33167,32660,31957,25630,38224,31295,21578,21733,27468,25601,25096,40509,33011,30105,21106,38761,33883,26684,34532,38401,38548,38124,20010,21508,32473,26681,36319,32789,26356,24218,32697,31535,31536,31538,31540,31541,31542,31543,31545,31547,31549,31551,31552,31553,31554,31555,31556,31558,31560,31562,31565,31566,31571,31573,31575,31577,31580,31582,31583,31585,31587,31588,31589,31590,31591,31592,31593,31594,31595,31596,31597,31599,31600,31603,31604,31606,31608,31610,31612,31613,31615,31617,31618,31619,31620,31622,31623,31624,31625,31626,31627,31628,31630,31631,31633,31634,31635,31638,31640,31641,31642,31643,31646,31647,31648,31651,31652,31653,31662,31663,31664,31666,31667,31669,31670,31671,31673,31674,31675,31676,31677,31678,31679,31680,31682,31683,31684,22466,32831,26775,24037,25915,21151,24685,40858,20379,36524,20844,23467,24339,24041,27742,25329,36129,20849,38057,21246,27807,33503,29399,22434,26500,36141,22815,36764,33735,21653,31629,20272,27837,23396,22993,40723,21476,34506,39592,35895,32929,25925,39038,22266,38599,21038,29916,21072,23521,25346,35074,20054,25296,24618,26874,20851,23448,20896,35266,31649,39302,32592,24815,28748,36143,20809,24191,36891,29808,35268,22317,30789,24402,40863,38394,36712,39740,35809,30328,26690,26588,36330,36149,21053,36746,28378,26829,38149,37101,22269,26524,35065,36807,21704,31685,31688,31689,31690,31691,31693,31694,31695,31696,31698,31700,31701,31702,31703,31704,31707,31708,31710,31711,31712,31714,31715,31716,31719,31720,31721,31723,31724,31725,31727,31728,31730,31731,31732,31733,31734,31736,31737,31738,31739,31741,31743,31744,31745,31746,31747,31748,31749,31750,31752,31753,31754,31757,31758,31760,31761,31762,31763,31764,31765,31767,31768,31769,31770,31771,31772,31773,31774,31776,31777,31778,31779,31780,31781,31784,31785,31787,31788,31789,31790,31791,31792,31793,31794,31795,31796,31797,31798,31799,31801,31802,31803,31804,31805,31806,31810,39608,23401,28023,27686,20133,23475,39559,37219,25000,37039,38889,21547,28085,23506,20989,21898,32597,32752,25788,25421,26097,25022,24717,28938,27735,27721,22831,26477,33322,22741,22158,35946,27627,37085,22909,32791,21495,28009,21621,21917,33655,33743,26680,31166,21644,20309,21512,30418,35977,38402,27827,28088,36203,35088,40548,36154,22079,40657,30165,24456,29408,24680,21756,20136,27178,34913,24658,36720,21700,28888,34425,40511,27946,23439,24344,32418,21897,20399,29492,21564,21402,20505,21518,21628,20046,24573,29786,22774,33899,32993,34676,29392,31946,28246,31811,31812,31813,31814,31815,31816,31817,31818,31819,31820,31822,31823,31824,31825,31826,31827,31828,31829,31830,31831,31832,31833,31834,31835,31836,31837,31838,31839,31840,31841,31842,31843,31844,31845,31846,31847,31848,31849,31850,31851,31852,31853,31854,31855,31856,31857,31858,31861,31862,31863,31864,31865,31866,31870,31871,31872,31873,31874,31875,31876,31877,31878,31879,31880,31882,31883,31884,31885,31886,31887,31888,31891,31892,31894,31897,31898,31899,31904,31905,31907,31910,31911,31912,31913,31915,31916,31917,31919,31920,31924,31925,31926,31927,31928,31930,31931,24359,34382,21804,25252,20114,27818,25143,33457,21719,21326,29502,28369,30011,21010,21270,35805,27088,24458,24576,28142,22351,27426,29615,26707,36824,32531,25442,24739,21796,30186,35938,28949,28067,23462,24187,33618,24908,40644,30970,34647,31783,30343,20976,24822,29004,26179,24140,24653,35854,28784,25381,36745,24509,24674,34516,22238,27585,24724,24935,21321,24800,26214,36159,31229,20250,28905,27719,35763,35826,32472,33636,26127,23130,39746,27985,28151,35905,27963,20249,28779,33719,25110,24785,38669,36135,31096,20987,22334,22522,26426,30072,31293,31215,31637,31935,31936,31938,31939,31940,31942,31945,31947,31950,31951,31952,31953,31954,31955,31956,31960,31962,31963,31965,31966,31969,31970,31971,31972,31973,31974,31975,31977,31978,31979,31980,31981,31982,31984,31985,31986,31987,31988,31989,31990,31991,31993,31994,31996,31997,31998,31999,32000,32001,32002,32003,32004,32005,32006,32007,32008,32009,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32035,32036,32037,32038,32040,32041,32042,32044,32045,32046,32048,32049,32050,32051,32052,32053,32054,32908,39269,36857,28608,35749,40481,23020,32489,32521,21513,26497,26840,36753,31821,38598,21450,24613,30142,27762,21363,23241,32423,25380,20960,33034,24049,34015,25216,20864,23395,20238,31085,21058,24760,27982,23492,23490,35745,35760,26082,24524,38469,22931,32487,32426,22025,26551,22841,20339,23478,21152,33626,39050,36158,30002,38078,20551,31292,20215,26550,39550,23233,27516,30417,22362,23574,31546,38388,29006,20860,32937,33392,22904,32516,33575,26816,26604,30897,30839,25315,25441,31616,20461,21098,20943,33616,27099,37492,36341,36145,35265,38190,31661,20214,32055,32056,32057,32058,32059,32060,32061,32062,32063,32064,32065,32066,32067,32068,32069,32070,32071,32072,32073,32074,32075,32076,32077,32078,32079,32080,32081,32082,32083,32084,32085,32086,32087,32088,32089,32090,32091,32092,32093,32094,32095,32096,32097,32098,32099,32100,32101,32102,32103,32104,32105,32106,32107,32108,32109,32111,32112,32113,32114,32115,32116,32117,32118,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32131,32132,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,20581,33328,21073,39279,28176,28293,28071,24314,20725,23004,23558,27974,27743,30086,33931,26728,22870,35762,21280,37233,38477,34121,26898,30977,28966,33014,20132,37066,27975,39556,23047,22204,25605,38128,30699,20389,33050,29409,35282,39290,32564,32478,21119,25945,37237,36735,36739,21483,31382,25581,25509,30342,31224,34903,38454,25130,21163,33410,26708,26480,25463,30571,31469,27905,32467,35299,22992,25106,34249,33445,30028,20511,20171,30117,35819,23626,24062,31563,26020,37329,20170,27941,35167,32039,38182,20165,35880,36827,38771,26187,31105,36817,28908,28024,32153,32154,32155,32156,32157,32158,32159,32160,32161,32162,32163,32164,32165,32167,32168,32169,32170,32171,32172,32173,32175,32176,32177,32178,32179,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32200,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,23613,21170,33606,20834,33550,30555,26230,40120,20140,24778,31934,31923,32463,20117,35686,26223,39048,38745,22659,25964,38236,24452,30153,38742,31455,31454,20928,28847,31384,25578,31350,32416,29590,38893,20037,28792,20061,37202,21417,25937,26087,33276,33285,21646,23601,30106,38816,25304,29401,30141,23621,39545,33738,23616,21632,30697,20030,27822,32858,25298,25454,24040,20855,36317,36382,38191,20465,21477,24807,28844,21095,25424,40515,23071,20518,30519,21367,32482,25733,25899,25225,25496,20500,29237,35273,20915,35776,32477,22343,33740,38055,20891,21531,23803,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32261,32262,32263,32264,32265,32266,32267,32268,32269,32270,32271,32272,32273,32274,32275,32276,32277,32278,32279,32280,32281,32282,32283,32284,32285,32286,32287,32288,32289,32290,32291,32292,32293,32294,32295,32296,32297,32298,32299,32300,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32316,32317,32318,32319,32320,32322,32323,32324,32325,32326,32328,32329,32330,32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,20426,31459,27994,37089,39567,21888,21654,21345,21679,24320,25577,26999,20975,24936,21002,22570,21208,22350,30733,30475,24247,24951,31968,25179,25239,20130,28821,32771,25335,28900,38752,22391,33499,26607,26869,30933,39063,31185,22771,21683,21487,28212,20811,21051,23458,35838,32943,21827,22438,24691,22353,21549,31354,24656,23380,25511,25248,21475,25187,23495,26543,21741,31391,33510,37239,24211,35044,22840,22446,25358,36328,33007,22359,31607,20393,24555,23485,27454,21281,31568,29378,26694,30719,30518,26103,20917,20111,30420,23743,31397,33909,22862,39745,20608,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32361,32362,32363,32364,32365,32366,32367,32368,32369,32370,32371,32372,32373,32374,32375,32376,32377,32378,32379,32380,32381,32382,32383,32384,32385,32387,32388,32389,32390,32391,32392,32393,32394,32395,32396,32397,32398,32399,32400,32401,32402,32403,32404,32405,32406,32407,32408,32409,32410,32412,32413,32414,32430,32436,32443,32444,32470,32484,32492,32505,32522,32528,32542,32567,32569,32571,32572,32573,32574,32575,32576,32577,32579,32582,32583,32584,32585,32586,32587,32588,32589,32590,32591,32594,32595,39304,24871,28291,22372,26118,25414,22256,25324,25193,24275,38420,22403,25289,21895,34593,33098,36771,21862,33713,26469,36182,34013,23146,26639,25318,31726,38417,20848,28572,35888,25597,35272,25042,32518,28866,28389,29701,27028,29436,24266,37070,26391,28010,25438,21171,29282,32769,20332,23013,37226,28889,28061,21202,20048,38647,38253,34174,30922,32047,20769,22418,25794,32907,31867,27882,26865,26974,20919,21400,26792,29313,40654,31729,29432,31163,28435,29702,26446,37324,40100,31036,33673,33620,21519,26647,20029,21385,21169,30782,21382,21033,20616,20363,20432,32598,32601,32603,32604,32605,32606,32608,32611,32612,32613,32614,32615,32619,32620,32621,32623,32624,32627,32629,32630,32631,32632,32634,32635,32636,32637,32639,32640,32642,32643,32644,32645,32646,32647,32648,32649,32651,32653,32655,32656,32657,32658,32659,32661,32662,32663,32664,32665,32667,32668,32672,32674,32675,32677,32678,32680,32681,32682,32683,32684,32685,32686,32689,32691,32692,32693,32694,32695,32698,32699,32702,32704,32706,32707,32708,32710,32711,32712,32713,32715,32717,32719,32720,32721,32722,32723,32726,32727,32729,32730,32731,32732,32733,32734,32738,32739,30178,31435,31890,27813,38582,21147,29827,21737,20457,32852,33714,36830,38256,24265,24604,28063,24088,25947,33080,38142,24651,28860,32451,31918,20937,26753,31921,33391,20004,36742,37327,26238,20142,35845,25769,32842,20698,30103,29134,23525,36797,28518,20102,25730,38243,24278,26009,21015,35010,28872,21155,29454,29747,26519,30967,38678,20020,37051,40158,28107,20955,36161,21533,25294,29618,33777,38646,40836,38083,20278,32666,20940,28789,38517,23725,39046,21478,20196,28316,29705,27060,30827,39311,30041,21016,30244,27969,26611,20845,40857,32843,21657,31548,31423,32740,32743,32744,32746,32747,32748,32749,32751,32754,32756,32757,32758,32759,32760,32761,32762,32765,32766,32767,32770,32775,32776,32777,32778,32782,32783,32785,32787,32794,32795,32797,32798,32799,32801,32803,32804,32811,32812,32813,32814,32815,32816,32818,32820,32825,32826,32828,32830,32832,32833,32836,32837,32839,32840,32841,32846,32847,32848,32849,32851,32853,32854,32855,32857,32859,32860,32861,32862,32863,32864,32865,32866,32867,32868,32869,32870,32871,32872,32875,32876,32877,32878,32879,32880,32882,32883,32884,32885,32886,32887,32888,32889,32890,32891,32892,32893,38534,22404,25314,38471,27004,23044,25602,31699,28431,38475,33446,21346,39045,24208,28809,25523,21348,34383,40065,40595,30860,38706,36335,36162,40575,28510,31108,24405,38470,25134,39540,21525,38109,20387,26053,23653,23649,32533,34385,27695,24459,29575,28388,32511,23782,25371,23402,28390,21365,20081,25504,30053,25249,36718,20262,20177,27814,32438,35770,33821,34746,32599,36923,38179,31657,39585,35064,33853,27931,39558,32476,22920,40635,29595,30721,34434,39532,39554,22043,21527,22475,20080,40614,21334,36808,33033,30610,39314,34542,28385,34067,26364,24930,28459,32894,32897,32898,32901,32904,32906,32909,32910,32911,32912,32913,32914,32916,32917,32919,32921,32926,32931,32934,32935,32936,32940,32944,32947,32949,32950,32952,32953,32955,32965,32967,32968,32969,32970,32971,32975,32976,32977,32978,32979,32980,32981,32984,32991,32992,32994,32995,32998,33006,33013,33015,33017,33019,33022,33023,33024,33025,33027,33028,33029,33031,33032,33035,33036,33045,33047,33049,33051,33052,33053,33055,33056,33057,33058,33059,33060,33061,33062,33063,33064,33065,33066,33067,33069,33070,33072,33075,33076,33077,33079,33081,33082,33083,33084,33085,33087,35881,33426,33579,30450,27667,24537,33725,29483,33541,38170,27611,30683,38086,21359,33538,20882,24125,35980,36152,20040,29611,26522,26757,37238,38665,29028,27809,30473,23186,38209,27599,32654,26151,23504,22969,23194,38376,38391,20204,33804,33945,27308,30431,38192,29467,26790,23391,30511,37274,38753,31964,36855,35868,24357,31859,31192,35269,27852,34588,23494,24130,26825,30496,32501,20885,20813,21193,23081,32517,38754,33495,25551,30596,34256,31186,28218,24217,22937,34065,28781,27665,25279,30399,25935,24751,38397,26126,34719,40483,38125,21517,21629,35884,25720,33088,33089,33090,33091,33092,33093,33095,33097,33101,33102,33103,33106,33110,33111,33112,33115,33116,33117,33118,33119,33121,33122,33123,33124,33126,33128,33130,33131,33132,33135,33138,33139,33141,33142,33143,33144,33153,33155,33156,33157,33158,33159,33161,33163,33164,33165,33166,33168,33170,33171,33172,33173,33174,33175,33177,33178,33182,33183,33184,33185,33186,33188,33189,33191,33193,33195,33196,33197,33198,33199,33200,33201,33202,33204,33205,33206,33207,33208,33209,33212,33213,33214,33215,33220,33221,33223,33224,33225,33227,33229,33230,33231,33232,33233,33234,33235,25721,34321,27169,33180,30952,25705,39764,25273,26411,33707,22696,40664,27819,28448,23518,38476,35851,29279,26576,25287,29281,20137,22982,27597,22675,26286,24149,21215,24917,26408,30446,30566,29287,31302,25343,21738,21584,38048,37027,23068,32435,27670,20035,22902,32784,22856,21335,30007,38590,22218,25376,33041,24700,38393,28118,21602,39297,20869,23273,33021,22958,38675,20522,27877,23612,25311,20320,21311,33147,36870,28346,34091,25288,24180,30910,25781,25467,24565,23064,37247,40479,23615,25423,32834,23421,21870,38218,38221,28037,24744,26592,29406,20957,23425,33236,33237,33238,33239,33240,33241,33242,33243,33244,33245,33246,33247,33248,33249,33250,33252,33253,33254,33256,33257,33259,33262,33263,33264,33265,33266,33269,33270,33271,33272,33273,33274,33277,33279,33283,33287,33288,33289,33290,33291,33294,33295,33297,33299,33301,33302,33303,33304,33305,33306,33309,33312,33316,33317,33318,33319,33321,33326,33330,33338,33340,33341,33343,33344,33345,33346,33347,33349,33350,33352,33354,33356,33357,33358,33360,33361,33362,33363,33364,33365,33366,33367,33369,33371,33372,33373,33374,33376,33377,33378,33379,33380,33381,33382,33383,33385,25319,27870,29275,25197,38062,32445,33043,27987,20892,24324,22900,21162,24594,22899,26262,34384,30111,25386,25062,31983,35834,21734,27431,40485,27572,34261,21589,20598,27812,21866,36276,29228,24085,24597,29750,25293,25490,29260,24472,28227,27966,25856,28504,30424,30928,30460,30036,21028,21467,20051,24222,26049,32810,32982,25243,21638,21032,28846,34957,36305,27873,21624,32986,22521,35060,36180,38506,37197,20329,27803,21943,30406,30768,25256,28921,28558,24429,34028,26842,30844,31735,33192,26379,40527,25447,30896,22383,30738,38713,25209,25259,21128,29749,27607,33386,33387,33388,33389,33393,33397,33398,33399,33400,33403,33404,33408,33409,33411,33413,33414,33415,33417,33420,33424,33427,33428,33429,33430,33434,33435,33438,33440,33442,33443,33447,33458,33461,33462,33466,33467,33468,33471,33472,33474,33475,33477,33478,33481,33488,33494,33497,33498,33501,33506,33511,33512,33513,33514,33516,33517,33518,33520,33522,33523,33525,33526,33528,33530,33532,33533,33534,33535,33536,33546,33547,33549,33552,33554,33555,33558,33560,33561,33565,33566,33567,33568,33569,33570,33571,33572,33573,33574,33577,33578,33582,33584,33586,33591,33595,33597,21860,33086,30130,30382,21305,30174,20731,23617,35692,31687,20559,29255,39575,39128,28418,29922,31080,25735,30629,25340,39057,36139,21697,32856,20050,22378,33529,33805,24179,20973,29942,35780,23631,22369,27900,39047,23110,30772,39748,36843,31893,21078,25169,38138,20166,33670,33889,33769,33970,22484,26420,22275,26222,28006,35889,26333,28689,26399,27450,26646,25114,22971,19971,20932,28422,26578,27791,20854,26827,22855,27495,30054,23822,33040,40784,26071,31048,31041,39569,36215,23682,20062,20225,21551,22865,30732,22120,27668,36804,24323,27773,27875,35755,25488,33598,33599,33601,33602,33604,33605,33608,33610,33611,33612,33613,33614,33619,33621,33622,33623,33624,33625,33629,33634,33648,33649,33650,33651,33652,33653,33654,33657,33658,33662,33663,33664,33665,33666,33667,33668,33671,33672,33674,33675,33676,33677,33679,33680,33681,33684,33685,33686,33687,33689,33690,33693,33695,33697,33698,33699,33700,33701,33702,33703,33708,33709,33710,33711,33717,33723,33726,33727,33730,33731,33732,33734,33736,33737,33739,33741,33742,33744,33745,33746,33747,33749,33751,33753,33754,33755,33758,33762,33763,33764,33766,33767,33768,33771,33772,33773,24688,27965,29301,25190,38030,38085,21315,36801,31614,20191,35878,20094,40660,38065,38067,21069,28508,36963,27973,35892,22545,23884,27424,27465,26538,21595,33108,32652,22681,34103,24378,25250,27207,38201,25970,24708,26725,30631,20052,20392,24039,38808,25772,32728,23789,20431,31373,20999,33540,19988,24623,31363,38054,20405,20146,31206,29748,21220,33465,25810,31165,23517,27777,38738,36731,27682,20542,21375,28165,25806,26228,27696,24773,39031,35831,24198,29756,31351,31179,19992,37041,29699,27714,22234,37195,27845,36235,21306,34502,26354,36527,23624,39537,28192,33774,33775,33779,33780,33781,33782,33783,33786,33787,33788,33790,33791,33792,33794,33797,33799,33800,33801,33802,33808,33810,33811,33812,33813,33814,33815,33817,33818,33819,33822,33823,33824,33825,33826,33827,33833,33834,33835,33836,33837,33838,33839,33840,33842,33843,33844,33845,33846,33847,33849,33850,33851,33854,33855,33856,33857,33858,33859,33860,33861,33863,33864,33865,33866,33867,33868,33869,33870,33871,33872,33874,33875,33876,33877,33878,33880,33885,33886,33887,33888,33890,33892,33893,33894,33895,33896,33898,33902,33903,33904,33906,33908,33911,33913,33915,33916,21462,23094,40843,36259,21435,22280,39079,26435,37275,27849,20840,30154,25331,29356,21048,21149,32570,28820,30264,21364,40522,27063,30830,38592,35033,32676,28982,29123,20873,26579,29924,22756,25880,22199,35753,39286,25200,32469,24825,28909,22764,20161,20154,24525,38887,20219,35748,20995,22922,32427,25172,20173,26085,25102,33592,33993,33635,34701,29076,28342,23481,32466,20887,25545,26580,32905,33593,34837,20754,23418,22914,36785,20083,27741,20837,35109,36719,38446,34122,29790,38160,38384,28070,33509,24369,25746,27922,33832,33134,40131,22622,36187,19977,21441,33917,33918,33919,33920,33921,33923,33924,33925,33926,33930,33933,33935,33936,33937,33938,33939,33940,33941,33942,33944,33946,33947,33949,33950,33951,33952,33954,33955,33956,33957,33958,33959,33960,33961,33962,33963,33964,33965,33966,33968,33969,33971,33973,33974,33975,33979,33980,33982,33984,33986,33987,33989,33990,33991,33992,33995,33996,33998,33999,34002,34004,34005,34007,34008,34009,34010,34011,34012,34014,34017,34018,34020,34023,34024,34025,34026,34027,34029,34030,34031,34033,34034,34035,34036,34037,34038,34039,34040,34041,34042,34043,34045,34046,34048,34049,34050,20254,25955,26705,21971,20007,25620,39578,25195,23234,29791,33394,28073,26862,20711,33678,30722,26432,21049,27801,32433,20667,21861,29022,31579,26194,29642,33515,26441,23665,21024,29053,34923,38378,38485,25797,36193,33203,21892,27733,25159,32558,22674,20260,21830,36175,26188,19978,23578,35059,26786,25422,31245,28903,33421,21242,38902,23569,21736,37045,32461,22882,36170,34503,33292,33293,36198,25668,23556,24913,28041,31038,35774,30775,30003,21627,20280,36523,28145,23072,32453,31070,27784,23457,23158,29978,32958,24910,28183,22768,29983,29989,29298,21319,32499,34051,34052,34053,34054,34055,34056,34057,34058,34059,34061,34062,34063,34064,34066,34068,34069,34070,34072,34073,34075,34076,34077,34078,34080,34082,34083,34084,34085,34086,34087,34088,34089,34090,34093,34094,34095,34096,34097,34098,34099,34100,34101,34102,34110,34111,34112,34113,34114,34116,34117,34118,34119,34123,34124,34125,34126,34127,34128,34129,34130,34131,34132,34133,34135,34136,34138,34139,34140,34141,34143,34144,34145,34146,34147,34149,34150,34151,34153,34154,34155,34156,34157,34158,34159,34160,34161,34163,34165,34166,34167,34168,34172,34173,34175,34176,34177,30465,30427,21097,32988,22307,24072,22833,29422,26045,28287,35799,23608,34417,21313,30707,25342,26102,20160,39135,34432,23454,35782,21490,30690,20351,23630,39542,22987,24335,31034,22763,19990,26623,20107,25325,35475,36893,21183,26159,21980,22124,36866,20181,20365,37322,39280,27663,24066,24643,23460,35270,35797,25910,25163,39318,23432,23551,25480,21806,21463,30246,20861,34092,26530,26803,27530,25234,36755,21460,33298,28113,30095,20070,36174,23408,29087,34223,26257,26329,32626,34560,40653,40736,23646,26415,36848,26641,26463,25101,31446,22661,24246,25968,28465,34178,34179,34182,34184,34185,34186,34187,34188,34189,34190,34192,34193,34194,34195,34196,34197,34198,34199,34200,34201,34202,34205,34206,34207,34208,34209,34210,34211,34213,34214,34215,34217,34219,34220,34221,34225,34226,34227,34228,34229,34230,34232,34234,34235,34236,34237,34238,34239,34240,34242,34243,34244,34245,34246,34247,34248,34250,34251,34252,34253,34254,34257,34258,34260,34262,34263,34264,34265,34266,34267,34269,34270,34271,34272,34273,34274,34275,34277,34278,34279,34280,34282,34283,34284,34285,34286,34287,34288,34289,34290,34291,34292,34293,34294,34295,34296,24661,21047,32781,25684,34928,29993,24069,26643,25332,38684,21452,29245,35841,27700,30561,31246,21550,30636,39034,33308,35828,30805,26388,28865,26031,25749,22070,24605,31169,21496,19997,27515,32902,23546,21987,22235,20282,20284,39282,24051,26494,32824,24578,39042,36865,23435,35772,35829,25628,33368,25822,22013,33487,37221,20439,32032,36895,31903,20723,22609,28335,23487,35785,32899,37240,33948,31639,34429,38539,38543,32485,39635,30862,23681,31319,36930,38567,31071,23385,25439,31499,34001,26797,21766,32553,29712,32034,38145,25152,22604,20182,23427,22905,22612,34297,34298,34300,34301,34302,34304,34305,34306,34307,34308,34310,34311,34312,34313,34314,34315,34316,34317,34318,34319,34320,34322,34323,34324,34325,34327,34328,34329,34330,34331,34332,34333,34334,34335,34336,34337,34338,34339,34340,34341,34342,34344,34346,34347,34348,34349,34350,34351,34352,34353,34354,34355,34356,34357,34358,34359,34361,34362,34363,34365,34366,34367,34368,34369,34370,34371,34372,34373,34374,34375,34376,34377,34378,34379,34380,34386,34387,34389,34390,34391,34392,34393,34395,34396,34397,34399,34400,34401,34403,34404,34405,34406,34407,34408,34409,34410,29549,25374,36427,36367,32974,33492,25260,21488,27888,37214,22826,24577,27760,22349,25674,36138,30251,28393,22363,27264,30192,28525,35885,35848,22374,27631,34962,30899,25506,21497,28845,27748,22616,25642,22530,26848,33179,21776,31958,20504,36538,28108,36255,28907,25487,28059,28372,32486,33796,26691,36867,28120,38518,35752,22871,29305,34276,33150,30140,35466,26799,21076,36386,38161,25552,39064,36420,21884,20307,26367,22159,24789,28053,21059,23625,22825,28155,22635,30000,29980,24684,33300,33094,25361,26465,36834,30522,36339,36148,38081,24086,21381,21548,28867,34413,34415,34416,34418,34419,34420,34421,34422,34423,34424,34435,34436,34437,34438,34439,34440,34441,34446,34447,34448,34449,34450,34452,34454,34455,34456,34457,34458,34459,34462,34463,34464,34465,34466,34469,34470,34475,34477,34478,34482,34483,34487,34488,34489,34491,34492,34493,34494,34495,34497,34498,34499,34501,34504,34508,34509,34514,34515,34517,34518,34519,34522,34524,34525,34528,34529,34530,34531,34533,34534,34535,34536,34538,34539,34540,34543,34549,34550,34551,34554,34555,34556,34557,34559,34561,34564,34565,34566,34571,34572,34574,34575,34576,34577,34580,34582,27712,24311,20572,20141,24237,25402,33351,36890,26704,37230,30643,21516,38108,24420,31461,26742,25413,31570,32479,30171,20599,25237,22836,36879,20984,31171,31361,22270,24466,36884,28034,23648,22303,21520,20820,28237,22242,25512,39059,33151,34581,35114,36864,21534,23663,33216,25302,25176,33073,40501,38464,39534,39548,26925,22949,25299,21822,25366,21703,34521,27964,23043,29926,34972,27498,22806,35916,24367,28286,29609,39037,20024,28919,23436,30871,25405,26202,30358,24779,23451,23113,19975,33109,27754,29579,20129,26505,32593,24448,26106,26395,24536,22916,23041,34585,34587,34589,34591,34592,34596,34598,34599,34600,34602,34603,34604,34605,34607,34608,34610,34611,34613,34614,34616,34617,34618,34620,34621,34624,34625,34626,34627,34628,34629,34630,34634,34635,34637,34639,34640,34641,34642,34644,34645,34646,34648,34650,34651,34652,34653,34654,34655,34657,34658,34662,34663,34664,34665,34666,34667,34668,34669,34671,34673,34674,34675,34677,34679,34680,34681,34682,34687,34688,34689,34692,34694,34695,34697,34698,34700,34702,34703,34704,34705,34706,34708,34709,34710,34712,34713,34714,34715,34716,34717,34718,34720,34721,34722,34723,34724,24013,24494,21361,38886,36829,26693,22260,21807,24799,20026,28493,32500,33479,33806,22996,20255,20266,23614,32428,26410,34074,21619,30031,32963,21890,39759,20301,28205,35859,23561,24944,21355,30239,28201,34442,25991,38395,32441,21563,31283,32010,38382,21985,32705,29934,25373,34583,28065,31389,25105,26017,21351,25569,27779,24043,21596,38056,20044,27745,35820,23627,26080,33436,26791,21566,21556,27595,27494,20116,25410,21320,33310,20237,20398,22366,25098,38654,26212,29289,21247,21153,24735,35823,26132,29081,26512,35199,30802,30717,26224,22075,21560,38177,29306,34725,34726,34727,34729,34730,34734,34736,34737,34738,34740,34742,34743,34744,34745,34747,34748,34750,34751,34753,34754,34755,34756,34757,34759,34760,34761,34764,34765,34766,34767,34768,34772,34773,34774,34775,34776,34777,34778,34780,34781,34782,34783,34785,34786,34787,34788,34790,34791,34792,34793,34795,34796,34797,34799,34800,34801,34802,34803,34804,34805,34806,34807,34808,34810,34811,34812,34813,34815,34816,34817,34818,34820,34821,34822,34823,34824,34825,34827,34828,34829,34830,34831,34832,34833,34834,34836,34839,34840,34841,34842,34844,34845,34846,34847,34848,34851,31232,24687,24076,24713,33181,22805,24796,29060,28911,28330,27728,29312,27268,34989,24109,20064,23219,21916,38115,27927,31995,38553,25103,32454,30606,34430,21283,38686,36758,26247,23777,20384,29421,19979,21414,22799,21523,25472,38184,20808,20185,40092,32420,21688,36132,34900,33335,38386,28046,24358,23244,26174,38505,29616,29486,21439,33146,39301,32673,23466,38519,38480,32447,30456,21410,38262,39321,31665,35140,28248,20065,32724,31077,35814,24819,21709,20139,39033,24055,27233,20687,21521,35937,33831,30813,38660,21066,21742,22179,38144,28040,23477,28102,26195,34852,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34867,34868,34869,34870,34871,34872,34874,34875,34877,34878,34879,34881,34882,34883,34886,34887,34888,34889,34890,34891,34894,34895,34896,34897,34898,34899,34901,34902,34904,34906,34907,34908,34909,34910,34911,34912,34918,34919,34922,34925,34927,34929,34931,34932,34933,34934,34936,34937,34938,34939,34940,34944,34947,34950,34951,34953,34954,34956,34958,34959,34960,34961,34963,34964,34965,34967,34968,34969,34970,34971,34973,34974,34975,34976,34977,34979,34981,34982,34983,34984,34985,34986,23567,23389,26657,32918,21880,31505,25928,26964,20123,27463,34638,38795,21327,25375,25658,37034,26012,32961,35856,20889,26800,21368,34809,25032,27844,27899,35874,23633,34218,33455,38156,27427,36763,26032,24571,24515,20449,34885,26143,33125,29481,24826,20852,21009,22411,24418,37026,34892,37266,24184,26447,24615,22995,20804,20982,33016,21256,27769,38596,29066,20241,20462,32670,26429,21957,38152,31168,34966,32483,22687,25100,38656,34394,22040,39035,24464,35768,33988,37207,21465,26093,24207,30044,24676,32110,23167,32490,32493,36713,21927,23459,24748,26059,29572,34988,34990,34991,34992,34994,34995,34996,34997,34998,35000,35001,35002,35003,35005,35006,35007,35008,35011,35012,35015,35016,35018,35019,35020,35021,35023,35024,35025,35027,35030,35031,35034,35035,35036,35037,35038,35040,35041,35046,35047,35049,35050,35051,35052,35053,35054,35055,35058,35061,35062,35063,35066,35067,35069,35071,35072,35073,35075,35076,35077,35078,35079,35080,35081,35083,35084,35085,35086,35087,35089,35092,35093,35094,35095,35096,35100,35101,35102,35103,35104,35106,35107,35108,35110,35111,35112,35113,35116,35117,35118,35119,35121,35122,35123,35125,35127,36873,30307,30505,32474,38772,34203,23398,31348,38634,34880,21195,29071,24490,26092,35810,23547,39535,24033,27529,27739,35757,35759,36874,36805,21387,25276,40486,40493,21568,20011,33469,29273,34460,23830,34905,28079,38597,21713,20122,35766,28937,21693,38409,28895,28153,30416,20005,30740,34578,23721,24310,35328,39068,38414,28814,27839,22852,25513,30524,34893,28436,33395,22576,29141,21388,30746,38593,21761,24422,28976,23476,35866,39564,27523,22830,40495,31207,26472,25196,20335,30113,32650,27915,38451,27687,20208,30162,20859,26679,28478,36992,33136,22934,29814,35128,35129,35130,35131,35132,35133,35134,35135,35136,35138,35139,35141,35142,35143,35144,35145,35146,35147,35148,35149,35150,35151,35152,35153,35154,35155,35156,35157,35158,35159,35160,35161,35162,35163,35164,35165,35168,35169,35170,35171,35172,35173,35175,35176,35177,35178,35179,35180,35181,35182,35183,35184,35185,35186,35187,35188,35189,35190,35191,35192,35193,35194,35196,35197,35198,35200,35202,35204,35205,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35227,35228,35229,35230,35231,35232,35233,25671,23591,36965,31377,35875,23002,21676,33280,33647,35201,32768,26928,22094,32822,29239,37326,20918,20063,39029,25494,19994,21494,26355,33099,22812,28082,19968,22777,21307,25558,38129,20381,20234,34915,39056,22839,36951,31227,20202,33008,30097,27778,23452,23016,24413,26885,34433,20506,24050,20057,30691,20197,33402,25233,26131,37009,23673,20159,24441,33222,36920,32900,30123,20134,35028,24847,27589,24518,20041,30410,28322,35811,35758,35850,35793,24322,32764,32716,32462,33589,33643,22240,27575,38899,38452,23035,21535,38134,28139,23493,39278,23609,24341,38544,35234,35235,35236,35237,35238,35239,35240,35241,35242,35243,35244,35245,35246,35247,35248,35249,35250,35251,35252,35253,35254,35255,35256,35257,35258,35259,35260,35261,35262,35263,35264,35267,35277,35283,35284,35285,35287,35288,35289,35291,35293,35295,35296,35297,35298,35300,35303,35304,35305,35306,35308,35309,35310,35312,35313,35314,35316,35317,35318,35319,35320,35321,35322,35323,35324,35325,35326,35327,35329,35330,35331,35332,35333,35334,35336,35337,35338,35339,35340,35341,35342,35343,35344,35345,35346,35347,35348,35349,35350,35351,35352,35353,35354,35355,35356,35357,21360,33521,27185,23156,40560,24212,32552,33721,33828,33829,33639,34631,36814,36194,30408,24433,39062,30828,26144,21727,25317,20323,33219,30152,24248,38605,36362,34553,21647,27891,28044,27704,24703,21191,29992,24189,20248,24736,24551,23588,30001,37038,38080,29369,27833,28216,37193,26377,21451,21491,20305,37321,35825,21448,24188,36802,28132,20110,30402,27014,34398,24858,33286,20313,20446,36926,40060,24841,28189,28180,38533,20104,23089,38632,19982,23679,31161,23431,35821,32701,29577,22495,33419,37057,21505,36935,21947,23786,24481,24840,27442,29425,32946,35465,35358,35359,35360,35361,35362,35363,35364,35365,35366,35367,35368,35369,35370,35371,35372,35373,35374,35375,35376,35377,35378,35379,35380,35381,35382,35383,35384,35385,35386,35387,35388,35389,35391,35392,35393,35394,35395,35396,35397,35398,35399,35401,35402,35403,35404,35405,35406,35407,35408,35409,35410,35411,35412,35413,35414,35415,35416,35417,35418,35419,35420,35421,35422,35423,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35450,35451,35452,35453,35454,35455,35456,28020,23507,35029,39044,35947,39533,40499,28170,20900,20803,22435,34945,21407,25588,36757,22253,21592,22278,29503,28304,32536,36828,33489,24895,24616,38498,26352,32422,36234,36291,38053,23731,31908,26376,24742,38405,32792,20113,37095,21248,38504,20801,36816,34164,37213,26197,38901,23381,21277,30776,26434,26685,21705,28798,23472,36733,20877,22312,21681,25874,26242,36190,36163,33039,33900,36973,31967,20991,34299,26531,26089,28577,34468,36481,22122,36896,30338,28790,29157,36131,25321,21017,27901,36156,24590,22686,24974,26366,36192,25166,21939,28195,26413,36711,35457,35458,35459,35460,35461,35462,35463,35464,35467,35468,35469,35470,35471,35472,35473,35474,35476,35477,35478,35479,35480,35481,35482,35483,35484,35485,35486,35487,35488,35489,35490,35491,35492,35493,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,35515,35516,35517,35518,35519,35520,35521,35522,35523,35524,35525,35526,35527,35528,35529,35530,35531,35532,35533,35534,35535,35536,35537,35538,35539,35540,35541,35542,35543,35544,35545,35546,35547,35548,35549,35550,35551,35552,35553,35554,35555,38113,38392,30504,26629,27048,21643,20045,28856,35784,25688,25995,23429,31364,20538,23528,30651,27617,35449,31896,27838,30415,26025,36759,23853,23637,34360,26632,21344,25112,31449,28251,32509,27167,31456,24432,28467,24352,25484,28072,26454,19976,24080,36134,20183,32960,30260,38556,25307,26157,25214,27836,36213,29031,32617,20806,32903,21484,36974,25240,21746,34544,36761,32773,38167,34071,36825,27993,29645,26015,30495,29956,30759,33275,36126,38024,20390,26517,30137,35786,38663,25391,38215,38453,33976,25379,30529,24449,29424,20105,24596,25972,25327,27491,25919,35556,35557,35558,35559,35560,35561,35562,35563,35564,35565,35566,35567,35568,35569,35570,35571,35572,35573,35574,35575,35576,35577,35578,35579,35580,35581,35582,35583,35584,35585,35586,35587,35588,35589,35590,35592,35593,35594,35595,35596,35597,35598,35599,35600,35601,35602,35603,35604,35605,35606,35607,35608,35609,35610,35611,35612,35613,35614,35615,35616,35617,35618,35619,35620,35621,35623,35624,35625,35626,35627,35628,35629,35630,35631,35632,35633,35634,35635,35636,35637,35638,35639,35640,35641,35642,35643,35644,35645,35646,35647,35648,35649,35650,35651,35652,35653,24103,30151,37073,35777,33437,26525,25903,21553,34584,30693,32930,33026,27713,20043,32455,32844,30452,26893,27542,25191,20540,20356,22336,25351,27490,36286,21482,26088,32440,24535,25370,25527,33267,33268,32622,24092,23769,21046,26234,31209,31258,36136,28825,30164,28382,27835,31378,20013,30405,24544,38047,34935,32456,31181,32959,37325,20210,20247,33311,21608,24030,27954,35788,31909,36724,32920,24090,21650,30385,23449,26172,39588,29664,26666,34523,26417,29482,35832,35803,36880,31481,28891,29038,25284,30633,22065,20027,33879,26609,21161,34496,36142,38136,31569,35654,35655,35656,35657,35658,35659,35660,35661,35662,35663,35664,35665,35666,35667,35668,35669,35670,35671,35672,35673,35674,35675,35676,35677,35678,35679,35680,35681,35682,35683,35684,35685,35687,35688,35689,35690,35691,35693,35694,35695,35696,35697,35698,35699,35700,35701,35702,35703,35704,35705,35706,35707,35708,35709,35710,35711,35712,35713,35714,35715,35716,35717,35718,35719,35720,35721,35722,35723,35724,35725,35726,35727,35728,35729,35730,35731,35732,35733,35734,35735,35736,35737,35738,35739,35740,35741,35742,35743,35756,35761,35771,35783,35792,35818,35849,35870,20303,27880,31069,39547,25235,29226,25341,19987,30742,36716,25776,36186,31686,26729,24196,35013,22918,25758,22766,29366,26894,38181,36861,36184,22368,32512,35846,20934,25417,25305,21331,26700,29730,33537,37196,21828,30528,28796,27978,20857,21672,36164,23039,28363,28100,23388,32043,20180,31869,28371,23376,33258,28173,23383,39683,26837,36394,23447,32508,24635,32437,37049,36208,22863,25549,31199,36275,21330,26063,31062,35781,38459,32452,38075,32386,22068,37257,26368,32618,23562,36981,26152,24038,20304,26590,20570,20316,22352,24231,59408,59409,59410,59411,59412,35896,35897,35898,35899,35900,35901,35902,35903,35904,35906,35907,35908,35909,35912,35914,35915,35917,35918,35919,35920,35921,35922,35923,35924,35926,35927,35928,35929,35931,35932,35933,35934,35935,35936,35939,35940,35941,35942,35943,35944,35945,35948,35949,35950,35951,35952,35953,35954,35956,35957,35958,35959,35963,35964,35965,35966,35967,35968,35969,35971,35972,35974,35975,35976,35979,35981,35982,35983,35984,35985,35986,35987,35989,35990,35991,35993,35994,35995,35996,35997,35998,35999,36000,36001,36002,36003,36004,36005,36006,36007,36008,36009,36010,36011,36012,36013,20109,19980,20800,19984,24319,21317,19989,20120,19998,39730,23404,22121,20008,31162,20031,21269,20039,22829,29243,21358,27664,22239,32996,39319,27603,30590,40727,20022,20127,40720,20060,20073,20115,33416,23387,21868,22031,20164,21389,21405,21411,21413,21422,38757,36189,21274,21493,21286,21294,21310,36188,21350,21347,20994,21000,21006,21037,21043,21055,21056,21068,21086,21089,21084,33967,21117,21122,21121,21136,21139,20866,32596,20155,20163,20169,20162,20200,20193,20203,20190,20251,20211,20258,20324,20213,20261,20263,20233,20267,20318,20327,25912,20314,20317,36014,36015,36016,36017,36018,36019,36020,36021,36022,36023,36024,36025,36026,36027,36028,36029,36030,36031,36032,36033,36034,36035,36036,36037,36038,36039,36040,36041,36042,36043,36044,36045,36046,36047,36048,36049,36050,36051,36052,36053,36054,36055,36056,36057,36058,36059,36060,36061,36062,36063,36064,36065,36066,36067,36068,36069,36070,36071,36072,36073,36074,36075,36076,36077,36078,36079,36080,36081,36082,36083,36084,36085,36086,36087,36088,36089,36090,36091,36092,36093,36094,36095,36096,36097,36098,36099,36100,36101,36102,36103,36104,36105,36106,36107,36108,36109,20319,20311,20274,20285,20342,20340,20369,20361,20355,20367,20350,20347,20394,20348,20396,20372,20454,20456,20458,20421,20442,20451,20444,20433,20447,20472,20521,20556,20467,20524,20495,20526,20525,20478,20508,20492,20517,20520,20606,20547,20565,20552,20558,20588,20603,20645,20647,20649,20666,20694,20742,20717,20716,20710,20718,20743,20747,20189,27709,20312,20325,20430,40864,27718,31860,20846,24061,40649,39320,20865,22804,21241,21261,35335,21264,20971,22809,20821,20128,20822,20147,34926,34980,20149,33044,35026,31104,23348,34819,32696,20907,20913,20925,20924,36110,36111,36112,36113,36114,36115,36116,36117,36118,36119,36120,36121,36122,36123,36124,36128,36177,36178,36183,36191,36197,36200,36201,36202,36204,36206,36207,36209,36210,36216,36217,36218,36219,36220,36221,36222,36223,36224,36226,36227,36230,36231,36232,36233,36236,36237,36238,36239,36240,36242,36243,36245,36246,36247,36248,36249,36250,36251,36252,36253,36254,36256,36257,36258,36260,36261,36262,36263,36264,36265,36266,36267,36268,36269,36270,36271,36272,36274,36278,36279,36281,36283,36285,36288,36289,36290,36293,36295,36296,36297,36298,36301,36304,36306,36307,36308,20935,20886,20898,20901,35744,35750,35751,35754,35764,35765,35767,35778,35779,35787,35791,35790,35794,35795,35796,35798,35800,35801,35804,35807,35808,35812,35816,35817,35822,35824,35827,35830,35833,35836,35839,35840,35842,35844,35847,35852,35855,35857,35858,35860,35861,35862,35865,35867,35864,35869,35871,35872,35873,35877,35879,35882,35883,35886,35887,35890,35891,35893,35894,21353,21370,38429,38434,38433,38449,38442,38461,38460,38466,38473,38484,38495,38503,38508,38514,38516,38536,38541,38551,38576,37015,37019,37021,37017,37036,37025,37044,37043,37046,37050,36309,36312,36313,36316,36320,36321,36322,36325,36326,36327,36329,36333,36334,36336,36337,36338,36340,36342,36348,36350,36351,36352,36353,36354,36355,36356,36358,36359,36360,36363,36365,36366,36368,36369,36370,36371,36373,36374,36375,36376,36377,36378,36379,36380,36384,36385,36388,36389,36390,36391,36392,36395,36397,36400,36402,36403,36404,36406,36407,36408,36411,36412,36414,36415,36419,36421,36422,36428,36429,36430,36431,36432,36435,36436,36437,36438,36439,36440,36442,36443,36444,36445,36446,36447,36448,36449,36450,36451,36452,36453,36455,36456,36458,36459,36462,36465,37048,37040,37071,37061,37054,37072,37060,37063,37075,37094,37090,37084,37079,37083,37099,37103,37118,37124,37154,37150,37155,37169,37167,37177,37187,37190,21005,22850,21154,21164,21165,21182,21759,21200,21206,21232,21471,29166,30669,24308,20981,20988,39727,21430,24321,30042,24047,22348,22441,22433,22654,22716,22725,22737,22313,22316,22314,22323,22329,22318,22319,22364,22331,22338,22377,22405,22379,22406,22396,22395,22376,22381,22390,22387,22445,22436,22412,22450,22479,22439,22452,22419,22432,22485,22488,22490,22489,22482,22456,22516,22511,22520,22500,22493,36467,36469,36471,36472,36473,36474,36475,36477,36478,36480,36482,36483,36484,36486,36488,36489,36490,36491,36492,36493,36494,36497,36498,36499,36501,36502,36503,36504,36505,36506,36507,36509,36511,36512,36513,36514,36515,36516,36517,36518,36519,36520,36521,36522,36525,36526,36528,36529,36531,36532,36533,36534,36535,36536,36537,36539,36540,36541,36542,36543,36544,36545,36546,36547,36548,36549,36550,36551,36552,36553,36554,36555,36556,36557,36559,36560,36561,36562,36563,36564,36565,36566,36567,36568,36569,36570,36571,36572,36573,36574,36575,36576,36577,36578,36579,36580,22539,22541,22525,22509,22528,22558,22553,22596,22560,22629,22636,22657,22665,22682,22656,39336,40729,25087,33401,33405,33407,33423,33418,33448,33412,33422,33425,33431,33433,33451,33464,33470,33456,33480,33482,33507,33432,33463,33454,33483,33484,33473,33449,33460,33441,33450,33439,33476,33486,33444,33505,33545,33527,33508,33551,33543,33500,33524,33490,33496,33548,33531,33491,33553,33562,33542,33556,33557,33504,33493,33564,33617,33627,33628,33544,33682,33596,33588,33585,33691,33630,33583,33615,33607,33603,33631,33600,33559,33632,33581,33594,33587,33638,33637,36581,36582,36583,36584,36585,36586,36587,36588,36589,36590,36591,36592,36593,36594,36595,36596,36597,36598,36599,36600,36601,36602,36603,36604,36605,36606,36607,36608,36609,36610,36611,36612,36613,36614,36615,36616,36617,36618,36619,36620,36621,36622,36623,36624,36625,36626,36627,36628,36629,36630,36631,36632,36633,36634,36635,36636,36637,36638,36639,36640,36641,36642,36643,36644,36645,36646,36647,36648,36649,36650,36651,36652,36653,36654,36655,36656,36657,36658,36659,36660,36661,36662,36663,36664,36665,36666,36667,36668,36669,36670,36671,36672,36673,36674,36675,36676,33640,33563,33641,33644,33642,33645,33646,33712,33656,33715,33716,33696,33706,33683,33692,33669,33660,33718,33705,33661,33720,33659,33688,33694,33704,33722,33724,33729,33793,33765,33752,22535,33816,33803,33757,33789,33750,33820,33848,33809,33798,33748,33759,33807,33795,33784,33785,33770,33733,33728,33830,33776,33761,33884,33873,33882,33881,33907,33927,33928,33914,33929,33912,33852,33862,33897,33910,33932,33934,33841,33901,33985,33997,34000,34022,33981,34003,33994,33983,33978,34016,33953,33977,33972,33943,34021,34019,34060,29965,34104,34032,34105,34079,34106,36677,36678,36679,36680,36681,36682,36683,36684,36685,36686,36687,36688,36689,36690,36691,36692,36693,36694,36695,36696,36697,36698,36699,36700,36701,36702,36703,36704,36705,36706,36707,36708,36709,36714,36736,36748,36754,36765,36768,36769,36770,36772,36773,36774,36775,36778,36780,36781,36782,36783,36786,36787,36788,36789,36791,36792,36794,36795,36796,36799,36800,36803,36806,36809,36810,36811,36812,36813,36815,36818,36822,36823,36826,36832,36833,36835,36839,36844,36847,36849,36850,36852,36853,36854,36858,36859,36860,36862,36863,36871,36872,36876,36878,36883,36885,36888,34134,34107,34047,34044,34137,34120,34152,34148,34142,34170,30626,34115,34162,34171,34212,34216,34183,34191,34169,34222,34204,34181,34233,34231,34224,34259,34241,34268,34303,34343,34309,34345,34326,34364,24318,24328,22844,22849,32823,22869,22874,22872,21263,23586,23589,23596,23604,25164,25194,25247,25275,25290,25306,25303,25326,25378,25334,25401,25419,25411,25517,25590,25457,25466,25486,25524,25453,25516,25482,25449,25518,25532,25586,25592,25568,25599,25540,25566,25550,25682,25542,25534,25669,25665,25611,25627,25632,25612,25638,25633,25694,25732,25709,25750,36889,36892,36899,36900,36901,36903,36904,36905,36906,36907,36908,36912,36913,36914,36915,36916,36919,36921,36922,36925,36927,36928,36931,36933,36934,36936,36937,36938,36939,36940,36942,36948,36949,36950,36953,36954,36956,36957,36958,36959,36960,36961,36964,36966,36967,36969,36970,36971,36972,36975,36976,36977,36978,36979,36982,36983,36984,36985,36986,36987,36988,36990,36993,36996,36997,36998,36999,37001,37002,37004,37005,37006,37007,37008,37010,37012,37014,37016,37018,37020,37022,37023,37024,37028,37029,37031,37032,37033,37035,37037,37042,37047,37052,37053,37055,37056,25722,25783,25784,25753,25786,25792,25808,25815,25828,25826,25865,25893,25902,24331,24530,29977,24337,21343,21489,21501,21481,21480,21499,21522,21526,21510,21579,21586,21587,21588,21590,21571,21537,21591,21593,21539,21554,21634,21652,21623,21617,21604,21658,21659,21636,21622,21606,21661,21712,21677,21698,21684,21714,21671,21670,21715,21716,21618,21667,21717,21691,21695,21708,21721,21722,21724,21673,21674,21668,21725,21711,21726,21787,21735,21792,21757,21780,21747,21794,21795,21775,21777,21799,21802,21863,21903,21941,21833,21869,21825,21845,21823,21840,21820,37058,37059,37062,37064,37065,37067,37068,37069,37074,37076,37077,37078,37080,37081,37082,37086,37087,37088,37091,37092,37093,37097,37098,37100,37102,37104,37105,37106,37107,37109,37110,37111,37113,37114,37115,37116,37119,37120,37121,37123,37125,37126,37127,37128,37129,37130,37131,37132,37133,37134,37135,37136,37137,37138,37139,37140,37141,37142,37143,37144,37146,37147,37148,37149,37151,37152,37153,37156,37157,37158,37159,37160,37161,37162,37163,37164,37165,37166,37168,37170,37171,37172,37173,37174,37175,37176,37178,37179,37180,37181,37182,37183,37184,37185,37186,37188,21815,21846,21877,21878,21879,21811,21808,21852,21899,21970,21891,21937,21945,21896,21889,21919,21886,21974,21905,21883,21983,21949,21950,21908,21913,21994,22007,21961,22047,21969,21995,21996,21972,21990,21981,21956,21999,21989,22002,22003,21964,21965,21992,22005,21988,36756,22046,22024,22028,22017,22052,22051,22014,22016,22055,22061,22104,22073,22103,22060,22093,22114,22105,22108,22092,22100,22150,22116,22129,22123,22139,22140,22149,22163,22191,22228,22231,22237,22241,22261,22251,22265,22271,22276,22282,22281,22300,24079,24089,24084,24081,24113,24123,24124,37189,37191,37192,37201,37203,37204,37205,37206,37208,37209,37211,37212,37215,37216,37222,37223,37224,37227,37229,37235,37242,37243,37244,37248,37249,37250,37251,37252,37254,37256,37258,37262,37263,37267,37268,37269,37270,37271,37272,37273,37276,37277,37278,37279,37280,37281,37284,37285,37286,37287,37288,37289,37291,37292,37296,37297,37298,37299,37302,37303,37304,37305,37307,37308,37309,37310,37311,37312,37313,37314,37315,37316,37317,37318,37320,37323,37328,37330,37331,37332,37333,37334,37335,37336,37337,37338,37339,37341,37342,37343,37344,37345,37346,37347,37348,37349,24119,24132,24148,24155,24158,24161,23692,23674,23693,23696,23702,23688,23704,23705,23697,23706,23708,23733,23714,23741,23724,23723,23729,23715,23745,23735,23748,23762,23780,23755,23781,23810,23811,23847,23846,23854,23844,23838,23814,23835,23896,23870,23860,23869,23916,23899,23919,23901,23915,23883,23882,23913,23924,23938,23961,23965,35955,23991,24005,24435,24439,24450,24455,24457,24460,24469,24473,24476,24488,24493,24501,24508,34914,24417,29357,29360,29364,29367,29368,29379,29377,29390,29389,29394,29416,29423,29417,29426,29428,29431,29441,29427,29443,29434,37350,37351,37352,37353,37354,37355,37356,37357,37358,37359,37360,37361,37362,37363,37364,37365,37366,37367,37368,37369,37370,37371,37372,37373,37374,37375,37376,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37387,37388,37389,37390,37391,37392,37393,37394,37395,37396,37397,37398,37399,37400,37401,37402,37403,37404,37405,37406,37407,37408,37409,37410,37411,37412,37413,37414,37415,37416,37417,37418,37419,37420,37421,37422,37423,37424,37425,37426,37427,37428,37429,37430,37431,37432,37433,37434,37435,37436,37437,37438,37439,37440,37441,37442,37443,37444,37445,29435,29463,29459,29473,29450,29470,29469,29461,29474,29497,29477,29484,29496,29489,29520,29517,29527,29536,29548,29551,29566,33307,22821,39143,22820,22786,39267,39271,39272,39273,39274,39275,39276,39284,39287,39293,39296,39300,39303,39306,39309,39312,39313,39315,39316,39317,24192,24209,24203,24214,24229,24224,24249,24245,24254,24243,36179,24274,24273,24283,24296,24298,33210,24516,24521,24534,24527,24579,24558,24580,24545,24548,24574,24581,24582,24554,24557,24568,24601,24629,24614,24603,24591,24589,24617,24619,24586,24639,24609,24696,24697,24699,24698,24642,37446,37447,37448,37449,37450,37451,37452,37453,37454,37455,37456,37457,37458,37459,37460,37461,37462,37463,37464,37465,37466,37467,37468,37469,37470,37471,37472,37473,37474,37475,37476,37477,37478,37479,37480,37481,37482,37483,37484,37485,37486,37487,37488,37489,37490,37491,37493,37494,37495,37496,37497,37498,37499,37500,37501,37502,37503,37504,37505,37506,37507,37508,37509,37510,37511,37512,37513,37514,37515,37516,37517,37519,37520,37521,37522,37523,37524,37525,37526,37527,37528,37529,37530,37531,37532,37533,37534,37535,37536,37537,37538,37539,37540,37541,37542,37543,24682,24701,24726,24730,24749,24733,24707,24722,24716,24731,24812,24763,24753,24797,24792,24774,24794,24756,24864,24870,24853,24867,24820,24832,24846,24875,24906,24949,25004,24980,24999,25015,25044,25077,24541,38579,38377,38379,38385,38387,38389,38390,38396,38398,38403,38404,38406,38408,38410,38411,38412,38413,38415,38418,38421,38422,38423,38425,38426,20012,29247,25109,27701,27732,27740,27722,27811,27781,27792,27796,27788,27752,27753,27764,27766,27782,27817,27856,27860,27821,27895,27896,27889,27863,27826,27872,27862,27898,27883,27886,27825,27859,27887,27902,37544,37545,37546,37547,37548,37549,37551,37552,37553,37554,37555,37556,37557,37558,37559,37560,37561,37562,37563,37564,37565,37566,37567,37568,37569,37570,37571,37572,37573,37574,37575,37577,37578,37579,37580,37581,37582,37583,37584,37585,37586,37587,37588,37589,37590,37591,37592,37593,37594,37595,37596,37597,37598,37599,37600,37601,37602,37603,37604,37605,37606,37607,37608,37609,37610,37611,37612,37613,37614,37615,37616,37617,37618,37619,37620,37621,37622,37623,37624,37625,37626,37627,37628,37629,37630,37631,37632,37633,37634,37635,37636,37637,37638,37639,37640,37641,27961,27943,27916,27971,27976,27911,27908,27929,27918,27947,27981,27950,27957,27930,27983,27986,27988,27955,28049,28015,28062,28064,27998,28051,28052,27996,28000,28028,28003,28186,28103,28101,28126,28174,28095,28128,28177,28134,28125,28121,28182,28075,28172,28078,28203,28270,28238,28267,28338,28255,28294,28243,28244,28210,28197,28228,28383,28337,28312,28384,28461,28386,28325,28327,28349,28347,28343,28375,28340,28367,28303,28354,28319,28514,28486,28487,28452,28437,28409,28463,28470,28491,28532,28458,28425,28457,28553,28557,28556,28536,28530,28540,28538,28625,37642,37643,37644,37645,37646,37647,37648,37649,37650,37651,37652,37653,37654,37655,37656,37657,37658,37659,37660,37661,37662,37663,37664,37665,37666,37667,37668,37669,37670,37671,37672,37673,37674,37675,37676,37677,37678,37679,37680,37681,37682,37683,37684,37685,37686,37687,37688,37689,37690,37691,37692,37693,37695,37696,37697,37698,37699,37700,37701,37702,37703,37704,37705,37706,37707,37708,37709,37710,37711,37712,37713,37714,37715,37716,37717,37718,37719,37720,37721,37722,37723,37724,37725,37726,37727,37728,37729,37730,37731,37732,37733,37734,37735,37736,37737,37739,28617,28583,28601,28598,28610,28641,28654,28638,28640,28655,28698,28707,28699,28729,28725,28751,28766,23424,23428,23445,23443,23461,23480,29999,39582,25652,23524,23534,35120,23536,36423,35591,36790,36819,36821,36837,36846,36836,36841,36838,36851,36840,36869,36868,36875,36902,36881,36877,36886,36897,36917,36918,36909,36911,36932,36945,36946,36944,36968,36952,36962,36955,26297,36980,36989,36994,37000,36995,37003,24400,24407,24406,24408,23611,21675,23632,23641,23409,23651,23654,32700,24362,24361,24365,33396,24380,39739,23662,22913,22915,22925,22953,22954,22947,37740,37741,37742,37743,37744,37745,37746,37747,37748,37749,37750,37751,37752,37753,37754,37755,37756,37757,37758,37759,37760,37761,37762,37763,37764,37765,37766,37767,37768,37769,37770,37771,37772,37773,37774,37776,37777,37778,37779,37780,37781,37782,37783,37784,37785,37786,37787,37788,37789,37790,37791,37792,37793,37794,37795,37796,37797,37798,37799,37800,37801,37802,37803,37804,37805,37806,37807,37808,37809,37810,37811,37812,37813,37814,37815,37816,37817,37818,37819,37820,37821,37822,37823,37824,37825,37826,37827,37828,37829,37830,37831,37832,37833,37835,37836,37837,22935,22986,22955,22942,22948,22994,22962,22959,22999,22974,23045,23046,23005,23048,23011,23000,23033,23052,23049,23090,23092,23057,23075,23059,23104,23143,23114,23125,23100,23138,23157,33004,23210,23195,23159,23162,23230,23275,23218,23250,23252,23224,23264,23267,23281,23254,23270,23256,23260,23305,23319,23318,23346,23351,23360,23573,23580,23386,23397,23411,23377,23379,23394,39541,39543,39544,39546,39551,39549,39552,39553,39557,39560,39562,39568,39570,39571,39574,39576,39579,39580,39581,39583,39584,39586,39587,39589,39591,32415,32417,32419,32421,32424,32425,37838,37839,37840,37841,37842,37843,37844,37845,37847,37848,37849,37850,37851,37852,37853,37854,37855,37856,37857,37858,37859,37860,37861,37862,37863,37864,37865,37866,37867,37868,37869,37870,37871,37872,37873,37874,37875,37876,37877,37878,37879,37880,37881,37882,37883,37884,37885,37886,37887,37888,37889,37890,37891,37892,37893,37894,37895,37896,37897,37898,37899,37900,37901,37902,37903,37904,37905,37906,37907,37908,37909,37910,37911,37912,37913,37914,37915,37916,37917,37918,37919,37920,37921,37922,37923,37924,37925,37926,37927,37928,37929,37930,37931,37932,37933,37934,32429,32432,32446,32448,32449,32450,32457,32459,32460,32464,32468,32471,32475,32480,32481,32488,32491,32494,32495,32497,32498,32525,32502,32506,32507,32510,32513,32514,32515,32519,32520,32523,32524,32527,32529,32530,32535,32537,32540,32539,32543,32545,32546,32547,32548,32549,32550,32551,32554,32555,32556,32557,32559,32560,32561,32562,32563,32565,24186,30079,24027,30014,37013,29582,29585,29614,29602,29599,29647,29634,29649,29623,29619,29632,29641,29640,29669,29657,39036,29706,29673,29671,29662,29626,29682,29711,29738,29787,29734,29733,29736,29744,29742,29740,37935,37936,37937,37938,37939,37940,37941,37942,37943,37944,37945,37946,37947,37948,37949,37951,37952,37953,37954,37955,37956,37957,37958,37959,37960,37961,37962,37963,37964,37965,37966,37967,37968,37969,37970,37971,37972,37973,37974,37975,37976,37977,37978,37979,37980,37981,37982,37983,37984,37985,37986,37987,37988,37989,37990,37991,37992,37993,37994,37996,37997,37998,37999,38000,38001,38002,38003,38004,38005,38006,38007,38008,38009,38010,38011,38012,38013,38014,38015,38016,38017,38018,38019,38020,38033,38038,38040,38087,38095,38099,38100,38106,38118,38139,38172,38176,29723,29722,29761,29788,29783,29781,29785,29815,29805,29822,29852,29838,29824,29825,29831,29835,29854,29864,29865,29840,29863,29906,29882,38890,38891,38892,26444,26451,26462,26440,26473,26533,26503,26474,26483,26520,26535,26485,26536,26526,26541,26507,26487,26492,26608,26633,26584,26634,26601,26544,26636,26585,26549,26586,26547,26589,26624,26563,26552,26594,26638,26561,26621,26674,26675,26720,26721,26702,26722,26692,26724,26755,26653,26709,26726,26689,26727,26688,26686,26698,26697,26665,26805,26767,26740,26743,26771,26731,26818,26990,26876,26911,26912,26873,38183,38195,38205,38211,38216,38219,38229,38234,38240,38254,38260,38261,38263,38264,38265,38266,38267,38268,38269,38270,38272,38273,38274,38275,38276,38277,38278,38279,38280,38281,38282,38283,38284,38285,38286,38287,38288,38289,38290,38291,38292,38293,38294,38295,38296,38297,38298,38299,38300,38301,38302,38303,38304,38305,38306,38307,38308,38309,38310,38311,38312,38313,38314,38315,38316,38317,38318,38319,38320,38321,38322,38323,38324,38325,38326,38327,38328,38329,38330,38331,38332,38333,38334,38335,38336,38337,38338,38339,38340,38341,38342,38343,38344,38345,38346,38347,26916,26864,26891,26881,26967,26851,26896,26993,26937,26976,26946,26973,27012,26987,27008,27032,27000,26932,27084,27015,27016,27086,27017,26982,26979,27001,27035,27047,27067,27051,27053,27092,27057,27073,27082,27103,27029,27104,27021,27135,27183,27117,27159,27160,27237,27122,27204,27198,27296,27216,27227,27189,27278,27257,27197,27176,27224,27260,27281,27280,27305,27287,27307,29495,29522,27521,27522,27527,27524,27538,27539,27533,27546,27547,27553,27562,36715,36717,36721,36722,36723,36725,36726,36728,36727,36729,36730,36732,36734,36737,36738,36740,36743,36747,38348,38349,38350,38351,38352,38353,38354,38355,38356,38357,38358,38359,38360,38361,38362,38363,38364,38365,38366,38367,38368,38369,38370,38371,38372,38373,38374,38375,38380,38399,38407,38419,38424,38427,38430,38432,38435,38436,38437,38438,38439,38440,38441,38443,38444,38445,38447,38448,38455,38456,38457,38458,38462,38465,38467,38474,38478,38479,38481,38482,38483,38486,38487,38488,38489,38490,38492,38493,38494,38496,38499,38501,38502,38507,38509,38510,38511,38512,38513,38515,38520,38521,38522,38523,38524,38525,38526,38527,38528,38529,38530,38531,38532,38535,38537,38538,36749,36750,36751,36760,36762,36558,25099,25111,25115,25119,25122,25121,25125,25124,25132,33255,29935,29940,29951,29967,29969,29971,25908,26094,26095,26096,26122,26137,26482,26115,26133,26112,28805,26359,26141,26164,26161,26166,26165,32774,26207,26196,26177,26191,26198,26209,26199,26231,26244,26252,26279,26269,26302,26331,26332,26342,26345,36146,36147,36150,36155,36157,36160,36165,36166,36168,36169,36167,36173,36181,36185,35271,35274,35275,35276,35278,35279,35280,35281,29294,29343,29277,29286,29295,29310,29311,29316,29323,29325,29327,29330,25352,25394,25520,38540,38542,38545,38546,38547,38549,38550,38554,38555,38557,38558,38559,38560,38561,38562,38563,38564,38565,38566,38568,38569,38570,38571,38572,38573,38574,38575,38577,38578,38580,38581,38583,38584,38586,38587,38591,38594,38595,38600,38602,38603,38608,38609,38611,38612,38614,38615,38616,38617,38618,38619,38620,38621,38622,38623,38625,38626,38627,38628,38629,38630,38631,38635,38636,38637,38638,38640,38641,38642,38644,38645,38648,38650,38651,38652,38653,38655,38658,38659,38661,38666,38667,38668,38672,38673,38674,38676,38677,38679,38680,38681,38682,38683,38685,38687,38688,25663,25816,32772,27626,27635,27645,27637,27641,27653,27655,27654,27661,27669,27672,27673,27674,27681,27689,27684,27690,27698,25909,25941,25963,29261,29266,29270,29232,34402,21014,32927,32924,32915,32956,26378,32957,32945,32939,32941,32948,32951,32999,33000,33001,33002,32987,32962,32964,32985,32973,32983,26384,32989,33003,33009,33012,33005,33037,33038,33010,33020,26389,33042,35930,33078,33054,33068,33048,33074,33096,33100,33107,33140,33113,33114,33137,33120,33129,33148,33149,33133,33127,22605,23221,33160,33154,33169,28373,33187,33194,33228,26406,33226,33211,38689,38690,38691,38692,38693,38694,38695,38696,38697,38699,38700,38702,38703,38705,38707,38708,38709,38710,38711,38714,38715,38716,38717,38719,38720,38721,38722,38723,38724,38725,38726,38727,38728,38729,38730,38731,38732,38733,38734,38735,38736,38737,38740,38741,38743,38744,38746,38748,38749,38751,38755,38756,38758,38759,38760,38762,38763,38764,38765,38766,38767,38768,38769,38770,38773,38775,38776,38777,38778,38779,38781,38782,38783,38784,38785,38786,38787,38788,38790,38791,38792,38793,38794,38796,38798,38799,38800,38803,38805,38806,38807,38809,38810,38811,38812,38813,33217,33190,27428,27447,27449,27459,27462,27481,39121,39122,39123,39125,39129,39130,27571,24384,27586,35315,26000,40785,26003,26044,26054,26052,26051,26060,26062,26066,26070,28800,28828,28822,28829,28859,28864,28855,28843,28849,28904,28874,28944,28947,28950,28975,28977,29043,29020,29032,28997,29042,29002,29048,29050,29080,29107,29109,29096,29088,29152,29140,29159,29177,29213,29224,28780,28952,29030,29113,25150,25149,25155,25160,25161,31035,31040,31046,31049,31067,31068,31059,31066,31074,31063,31072,31087,31079,31098,31109,31114,31130,31143,31155,24529,24528,38814,38815,38817,38818,38820,38821,38822,38823,38824,38825,38826,38828,38830,38832,38833,38835,38837,38838,38839,38840,38841,38842,38843,38844,38845,38846,38847,38848,38849,38850,38851,38852,38853,38854,38855,38856,38857,38858,38859,38860,38861,38862,38863,38864,38865,38866,38867,38868,38869,38870,38871,38872,38873,38874,38875,38876,38877,38878,38879,38880,38881,38882,38883,38884,38885,38888,38894,38895,38896,38897,38898,38900,38903,38904,38905,38906,38907,38908,38909,38910,38911,38912,38913,38914,38915,38916,38917,38918,38919,38920,38921,38922,38923,38924,38925,38926,24636,24669,24666,24679,24641,24665,24675,24747,24838,24845,24925,25001,24989,25035,25041,25094,32896,32895,27795,27894,28156,30710,30712,30720,30729,30743,30744,30737,26027,30765,30748,30749,30777,30778,30779,30751,30780,30757,30764,30755,30761,30798,30829,30806,30807,30758,30800,30791,30796,30826,30875,30867,30874,30855,30876,30881,30883,30898,30905,30885,30932,30937,30921,30956,30962,30981,30964,30995,31012,31006,31028,40859,40697,40699,40700,30449,30468,30477,30457,30471,30472,30490,30498,30489,30509,30502,30517,30520,30544,30545,30535,30531,30554,30568,38927,38928,38929,38930,38931,38932,38933,38934,38935,38936,38937,38938,38939,38940,38941,38942,38943,38944,38945,38946,38947,38948,38949,38950,38951,38952,38953,38954,38955,38956,38957,38958,38959,38960,38961,38962,38963,38964,38965,38966,38967,38968,38969,38970,38971,38972,38973,38974,38975,38976,38977,38978,38979,38980,38981,38982,38983,38984,38985,38986,38987,38988,38989,38990,38991,38992,38993,38994,38995,38996,38997,38998,38999,39000,39001,39002,39003,39004,39005,39006,39007,39008,39009,39010,39011,39012,39013,39014,39015,39016,39017,39018,39019,39020,39021,39022,30562,30565,30591,30605,30589,30592,30604,30609,30623,30624,30640,30645,30653,30010,30016,30030,30027,30024,30043,30066,30073,30083,32600,32609,32607,35400,32616,32628,32625,32633,32641,32638,30413,30437,34866,38021,38022,38023,38027,38026,38028,38029,38031,38032,38036,38039,38037,38042,38043,38044,38051,38052,38059,38058,38061,38060,38063,38064,38066,38068,38070,38071,38072,38073,38074,38076,38077,38079,38084,38088,38089,38090,38091,38092,38093,38094,38096,38097,38098,38101,38102,38103,38105,38104,38107,38110,38111,38112,38114,38116,38117,38119,38120,38122,39023,39024,39025,39026,39027,39028,39051,39054,39058,39061,39065,39075,39080,39081,39082,39083,39084,39085,39086,39087,39088,39089,39090,39091,39092,39093,39094,39095,39096,39097,39098,39099,39100,39101,39102,39103,39104,39105,39106,39107,39108,39109,39110,39111,39112,39113,39114,39115,39116,39117,39119,39120,39124,39126,39127,39131,39132,39133,39136,39137,39138,39139,39140,39141,39142,39145,39146,39147,39148,39149,39150,39151,39152,39153,39154,39155,39156,39157,39158,39159,39160,39161,39162,39163,39164,39165,39166,39167,39168,39169,39170,39171,39172,39173,39174,39175,38121,38123,38126,38127,38131,38132,38133,38135,38137,38140,38141,38143,38147,38146,38150,38151,38153,38154,38157,38158,38159,38162,38163,38164,38165,38166,38168,38171,38173,38174,38175,38178,38186,38187,38185,38188,38193,38194,38196,38198,38199,38200,38204,38206,38207,38210,38197,38212,38213,38214,38217,38220,38222,38223,38226,38227,38228,38230,38231,38232,38233,38235,38238,38239,38237,38241,38242,38244,38245,38246,38247,38248,38249,38250,38251,38252,38255,38257,38258,38259,38202,30695,30700,38601,31189,31213,31203,31211,31238,23879,31235,31234,31262,31252,39176,39177,39178,39179,39180,39182,39183,39185,39186,39187,39188,39189,39190,39191,39192,39193,39194,39195,39196,39197,39198,39199,39200,39201,39202,39203,39204,39205,39206,39207,39208,39209,39210,39211,39212,39213,39215,39216,39217,39218,39219,39220,39221,39222,39223,39224,39225,39226,39227,39228,39229,39230,39231,39232,39233,39234,39235,39236,39237,39238,39239,39240,39241,39242,39243,39244,39245,39246,39247,39248,39249,39250,39251,39254,39255,39256,39257,39258,39259,39260,39261,39262,39263,39264,39265,39266,39268,39270,39283,39288,39289,39291,39294,39298,39299,39305,31289,31287,31313,40655,39333,31344,30344,30350,30355,30361,30372,29918,29920,29996,40480,40482,40488,40489,40490,40491,40492,40498,40497,40502,40504,40503,40505,40506,40510,40513,40514,40516,40518,40519,40520,40521,40523,40524,40526,40529,40533,40535,40538,40539,40540,40542,40547,40550,40551,40552,40553,40554,40555,40556,40561,40557,40563,30098,30100,30102,30112,30109,30124,30115,30131,30132,30136,30148,30129,30128,30147,30146,30166,30157,30179,30184,30182,30180,30187,30183,30211,30193,30204,30207,30224,30208,30213,30220,30231,30218,30245,30232,30229,30233,39308,39310,39322,39323,39324,39325,39326,39327,39328,39329,39330,39331,39332,39334,39335,39337,39338,39339,39340,39341,39342,39343,39344,39345,39346,39347,39348,39349,39350,39351,39352,39353,39354,39355,39356,39357,39358,39359,39360,39361,39362,39363,39364,39365,39366,39367,39368,39369,39370,39371,39372,39373,39374,39375,39376,39377,39378,39379,39380,39381,39382,39383,39384,39385,39386,39387,39388,39389,39390,39391,39392,39393,39394,39395,39396,39397,39398,39399,39400,39401,39402,39403,39404,39405,39406,39407,39408,39409,39410,39411,39412,39413,39414,39415,39416,39417,30235,30268,30242,30240,30272,30253,30256,30271,30261,30275,30270,30259,30285,30302,30292,30300,30294,30315,30319,32714,31462,31352,31353,31360,31366,31368,31381,31398,31392,31404,31400,31405,31411,34916,34921,34930,34941,34943,34946,34978,35014,34999,35004,35017,35042,35022,35043,35045,35057,35098,35068,35048,35070,35056,35105,35097,35091,35099,35082,35124,35115,35126,35137,35174,35195,30091,32997,30386,30388,30684,32786,32788,32790,32796,32800,32802,32805,32806,32807,32809,32808,32817,32779,32821,32835,32838,32845,32850,32873,32881,35203,39032,39040,39043,39418,39419,39420,39421,39422,39423,39424,39425,39426,39427,39428,39429,39430,39431,39432,39433,39434,39435,39436,39437,39438,39439,39440,39441,39442,39443,39444,39445,39446,39447,39448,39449,39450,39451,39452,39453,39454,39455,39456,39457,39458,39459,39460,39461,39462,39463,39464,39465,39466,39467,39468,39469,39470,39471,39472,39473,39474,39475,39476,39477,39478,39479,39480,39481,39482,39483,39484,39485,39486,39487,39488,39489,39490,39491,39492,39493,39494,39495,39496,39497,39498,39499,39500,39501,39502,39503,39504,39505,39506,39507,39508,39509,39510,39511,39512,39513,39049,39052,39053,39055,39060,39066,39067,39070,39071,39073,39074,39077,39078,34381,34388,34412,34414,34431,34426,34428,34427,34472,34445,34443,34476,34461,34471,34467,34474,34451,34473,34486,34500,34485,34510,34480,34490,34481,34479,34505,34511,34484,34537,34545,34546,34541,34547,34512,34579,34526,34548,34527,34520,34513,34563,34567,34552,34568,34570,34573,34569,34595,34619,34590,34597,34606,34586,34622,34632,34612,34609,34601,34615,34623,34690,34594,34685,34686,34683,34656,34672,34636,34670,34699,34643,34659,34684,34660,34649,34661,34707,34735,34728,34770,39514,39515,39516,39517,39518,39519,39520,39521,39522,39523,39524,39525,39526,39527,39528,39529,39530,39531,39538,39555,39561,39565,39566,39572,39573,39577,39590,39593,39594,39595,39596,39597,39598,39599,39602,39603,39604,39605,39609,39611,39613,39614,39615,39619,39620,39622,39623,39624,39625,39626,39629,39630,39631,39632,39634,39636,39637,39638,39639,39641,39642,39643,39644,39645,39646,39648,39650,39651,39652,39653,39655,39656,39657,39658,39660,39662,39664,39665,39666,39667,39668,39669,39670,39671,39672,39674,39676,39677,39678,39679,39680,39681,39682,39684,39685,39686,34758,34696,34693,34733,34711,34691,34731,34789,34732,34741,34739,34763,34771,34749,34769,34752,34762,34779,34794,34784,34798,34838,34835,34814,34826,34843,34849,34873,34876,32566,32578,32580,32581,33296,31482,31485,31496,31491,31492,31509,31498,31531,31503,31559,31544,31530,31513,31534,31537,31520,31525,31524,31539,31550,31518,31576,31578,31557,31605,31564,31581,31584,31598,31611,31586,31602,31601,31632,31654,31655,31672,31660,31645,31656,31621,31658,31644,31650,31659,31668,31697,31681,31692,31709,31706,31717,31718,31722,31756,31742,31740,31759,31766,31755,39687,39689,39690,39691,39692,39693,39694,39696,39697,39698,39700,39701,39702,39703,39704,39705,39706,39707,39708,39709,39710,39712,39713,39714,39716,39717,39718,39719,39720,39721,39722,39723,39724,39725,39726,39728,39729,39731,39732,39733,39734,39735,39736,39737,39738,39741,39742,39743,39744,39750,39754,39755,39756,39758,39760,39762,39763,39765,39766,39767,39768,39769,39770,39771,39772,39773,39774,39775,39776,39777,39778,39779,39780,39781,39782,39783,39784,39785,39786,39787,39788,39789,39790,39791,39792,39793,39794,39795,39796,39797,39798,39799,39800,39801,39802,39803,31775,31786,31782,31800,31809,31808,33278,33281,33282,33284,33260,34884,33313,33314,33315,33325,33327,33320,33323,33336,33339,33331,33332,33342,33348,33353,33355,33359,33370,33375,33384,34942,34949,34952,35032,35039,35166,32669,32671,32679,32687,32688,32690,31868,25929,31889,31901,31900,31902,31906,31922,31932,31933,31937,31943,31948,31949,31944,31941,31959,31976,33390,26280,32703,32718,32725,32741,32737,32742,32745,32750,32755,31992,32119,32166,32174,32327,32411,40632,40628,36211,36228,36244,36241,36273,36199,36205,35911,35913,37194,37200,37198,37199,37220,39804,39805,39806,39807,39808,39809,39810,39811,39812,39813,39814,39815,39816,39817,39818,39819,39820,39821,39822,39823,39824,39825,39826,39827,39828,39829,39830,39831,39832,39833,39834,39835,39836,39837,39838,39839,39840,39841,39842,39843,39844,39845,39846,39847,39848,39849,39850,39851,39852,39853,39854,39855,39856,39857,39858,39859,39860,39861,39862,39863,39864,39865,39866,39867,39868,39869,39870,39871,39872,39873,39874,39875,39876,39877,39878,39879,39880,39881,39882,39883,39884,39885,39886,39887,39888,39889,39890,39891,39892,39893,39894,39895,39896,39897,39898,39899,37218,37217,37232,37225,37231,37245,37246,37234,37236,37241,37260,37253,37264,37261,37265,37282,37283,37290,37293,37294,37295,37301,37300,37306,35925,40574,36280,36331,36357,36441,36457,36277,36287,36284,36282,36292,36310,36311,36314,36318,36302,36303,36315,36294,36332,36343,36344,36323,36345,36347,36324,36361,36349,36372,36381,36383,36396,36398,36387,36399,36410,36416,36409,36405,36413,36401,36425,36417,36418,36433,36434,36426,36464,36470,36476,36463,36468,36485,36495,36500,36496,36508,36510,35960,35970,35978,35973,35992,35988,26011,35286,35294,35290,35292,39900,39901,39902,39903,39904,39905,39906,39907,39908,39909,39910,39911,39912,39913,39914,39915,39916,39917,39918,39919,39920,39921,39922,39923,39924,39925,39926,39927,39928,39929,39930,39931,39932,39933,39934,39935,39936,39937,39938,39939,39940,39941,39942,39943,39944,39945,39946,39947,39948,39949,39950,39951,39952,39953,39954,39955,39956,39957,39958,39959,39960,39961,39962,39963,39964,39965,39966,39967,39968,39969,39970,39971,39972,39973,39974,39975,39976,39977,39978,39979,39980,39981,39982,39983,39984,39985,39986,39987,39988,39989,39990,39991,39992,39993,39994,39995,35301,35307,35311,35390,35622,38739,38633,38643,38639,38662,38657,38664,38671,38670,38698,38701,38704,38718,40832,40835,40837,40838,40839,40840,40841,40842,40844,40702,40715,40717,38585,38588,38589,38606,38610,30655,38624,37518,37550,37576,37694,37738,37834,37775,37950,37995,40063,40066,40069,40070,40071,40072,31267,40075,40078,40080,40081,40082,40084,40085,40090,40091,40094,40095,40096,40097,40098,40099,40101,40102,40103,40104,40105,40107,40109,40110,40112,40113,40114,40115,40116,40117,40118,40119,40122,40123,40124,40125,40132,40133,40134,40135,40138,40139,39996,39997,39998,39999,40000,40001,40002,40003,40004,40005,40006,40007,40008,40009,40010,40011,40012,40013,40014,40015,40016,40017,40018,40019,40020,40021,40022,40023,40024,40025,40026,40027,40028,40029,40030,40031,40032,40033,40034,40035,40036,40037,40038,40039,40040,40041,40042,40043,40044,40045,40046,40047,40048,40049,40050,40051,40052,40053,40054,40055,40056,40057,40058,40059,40061,40062,40064,40067,40068,40073,40074,40076,40079,40083,40086,40087,40088,40089,40093,40106,40108,40111,40121,40126,40127,40128,40129,40130,40136,40137,40145,40146,40154,40155,40160,40161,40140,40141,40142,40143,40144,40147,40148,40149,40151,40152,40153,40156,40157,40159,40162,38780,38789,38801,38802,38804,38831,38827,38819,38834,38836,39601,39600,39607,40536,39606,39610,39612,39617,39616,39621,39618,39627,39628,39633,39749,39747,39751,39753,39752,39757,39761,39144,39181,39214,39253,39252,39647,39649,39654,39663,39659,39675,39661,39673,39688,39695,39699,39711,39715,40637,40638,32315,40578,40583,40584,40587,40594,37846,40605,40607,40667,40668,40669,40672,40671,40674,40681,40679,40677,40682,40687,40738,40748,40751,40761,40759,40765,40766,40772,40163,40164,40165,40166,40167,40168,40169,40170,40171,40172,40173,40174,40175,40176,40177,40178,40179,40180,40181,40182,40183,40184,40185,40186,40187,40188,40189,40190,40191,40192,40193,40194,40195,40196,40197,40198,40199,40200,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213,40214,40215,40216,40217,40218,40219,40220,40221,40222,40223,40224,40225,40226,40227,40228,40229,40230,40231,40232,40233,40234,40235,40236,40237,40238,40239,40240,40241,40242,40243,40244,40245,40246,40247,40248,40249,40250,40251,40252,40253,40254,40255,40256,40257,40258,57908,57909,57910,57911,57912,57913,57914,57915,57916,57917,57918,57919,57920,57921,57922,57923,57924,57925,57926,57927,57928,57929,57930,57931,57932,57933,57934,57935,57936,57937,57938,57939,57940,57941,57942,57943,57944,57945,57946,57947,57948,57949,57950,57951,57952,57953,57954,57955,57956,57957,57958,57959,57960,57961,57962,57963,57964,57965,57966,57967,57968,57969,57970,57971,57972,57973,57974,57975,57976,57977,57978,57979,57980,57981,57982,57983,57984,57985,57986,57987,57988,57989,57990,57991,57992,57993,57994,57995,57996,57997,57998,57999,58000,58001,40259,40260,40261,40262,40263,40264,40265,40266,40267,40268,40269,40270,40271,40272,40273,40274,40275,40276,40277,40278,40279,40280,40281,40282,40283,40284,40285,40286,40287,40288,40289,40290,40291,40292,40293,40294,40295,40296,40297,40298,40299,40300,40301,40302,40303,40304,40305,40306,40307,40308,40309,40310,40311,40312,40313,40314,40315,40316,40317,40318,40319,40320,40321,40322,40323,40324,40325,40326,40327,40328,40329,40330,40331,40332,40333,40334,40335,40336,40337,40338,40339,40340,40341,40342,40343,40344,40345,40346,40347,40348,40349,40350,40351,40352,40353,40354,58002,58003,58004,58005,58006,58007,58008,58009,58010,58011,58012,58013,58014,58015,58016,58017,58018,58019,58020,58021,58022,58023,58024,58025,58026,58027,58028,58029,58030,58031,58032,58033,58034,58035,58036,58037,58038,58039,58040,58041,58042,58043,58044,58045,58046,58047,58048,58049,58050,58051,58052,58053,58054,58055,58056,58057,58058,58059,58060,58061,58062,58063,58064,58065,58066,58067,58068,58069,58070,58071,58072,58073,58074,58075,58076,58077,58078,58079,58080,58081,58082,58083,58084,58085,58086,58087,58088,58089,58090,58091,58092,58093,58094,58095,40355,40356,40357,40358,40359,40360,40361,40362,40363,40364,40365,40366,40367,40368,40369,40370,40371,40372,40373,40374,40375,40376,40377,40378,40379,40380,40381,40382,40383,40384,40385,40386,40387,40388,40389,40390,40391,40392,40393,40394,40395,40396,40397,40398,40399,40400,40401,40402,40403,40404,40405,40406,40407,40408,40409,40410,40411,40412,40413,40414,40415,40416,40417,40418,40419,40420,40421,40422,40423,40424,40425,40426,40427,40428,40429,40430,40431,40432,40433,40434,40435,40436,40437,40438,40439,40440,40441,40442,40443,40444,40445,40446,40447,40448,40449,40450,58096,58097,58098,58099,58100,58101,58102,58103,58104,58105,58106,58107,58108,58109,58110,58111,58112,58113,58114,58115,58116,58117,58118,58119,58120,58121,58122,58123,58124,58125,58126,58127,58128,58129,58130,58131,58132,58133,58134,58135,58136,58137,58138,58139,58140,58141,58142,58143,58144,58145,58146,58147,58148,58149,58150,58151,58152,58153,58154,58155,58156,58157,58158,58159,58160,58161,58162,58163,58164,58165,58166,58167,58168,58169,58170,58171,58172,58173,58174,58175,58176,58177,58178,58179,58180,58181,58182,58183,58184,58185,58186,58187,58188,58189,40451,40452,40453,40454,40455,40456,40457,40458,40459,40460,40461,40462,40463,40464,40465,40466,40467,40468,40469,40470,40471,40472,40473,40474,40475,40476,40477,40478,40484,40487,40494,40496,40500,40507,40508,40512,40525,40528,40530,40531,40532,40534,40537,40541,40543,40544,40545,40546,40549,40558,40559,40562,40564,40565,40566,40567,40568,40569,40570,40571,40572,40573,40576,40577,40579,40580,40581,40582,40585,40586,40588,40589,40590,40591,40592,40593,40596,40597,40598,40599,40600,40601,40602,40603,40604,40606,40608,40609,40610,40611,40612,40613,40615,40616,40617,40618,58190,58191,58192,58193,58194,58195,58196,58197,58198,58199,58200,58201,58202,58203,58204,58205,58206,58207,58208,58209,58210,58211,58212,58213,58214,58215,58216,58217,58218,58219,58220,58221,58222,58223,58224,58225,58226,58227,58228,58229,58230,58231,58232,58233,58234,58235,58236,58237,58238,58239,58240,58241,58242,58243,58244,58245,58246,58247,58248,58249,58250,58251,58252,58253,58254,58255,58256,58257,58258,58259,58260,58261,58262,58263,58264,58265,58266,58267,58268,58269,58270,58271,58272,58273,58274,58275,58276,58277,58278,58279,58280,58281,58282,58283,40619,40620,40621,40622,40623,40624,40625,40626,40627,40629,40630,40631,40633,40634,40636,40639,40640,40641,40642,40643,40645,40646,40647,40648,40650,40651,40652,40656,40658,40659,40661,40662,40663,40665,40666,40670,40673,40675,40676,40678,40680,40683,40684,40685,40686,40688,40689,40690,40691,40692,40693,40694,40695,40696,40698,40701,40703,40704,40705,40706,40707,40708,40709,40710,40711,40712,40713,40714,40716,40719,40721,40722,40724,40725,40726,40728,40730,40731,40732,40733,40734,40735,40737,40739,40740,40741,40742,40743,40744,40745,40746,40747,40749,40750,40752,40753,58284,58285,58286,58287,58288,58289,58290,58291,58292,58293,58294,58295,58296,58297,58298,58299,58300,58301,58302,58303,58304,58305,58306,58307,58308,58309,58310,58311,58312,58313,58314,58315,58316,58317,58318,58319,58320,58321,58322,58323,58324,58325,58326,58327,58328,58329,58330,58331,58332,58333,58334,58335,58336,58337,58338,58339,58340,58341,58342,58343,58344,58345,58346,58347,58348,58349,58350,58351,58352,58353,58354,58355,58356,58357,58358,58359,58360,58361,58362,58363,58364,58365,58366,58367,58368,58369,58370,58371,58372,58373,58374,58375,58376,58377,40754,40755,40756,40757,40758,40760,40762,40764,40767,40768,40769,40770,40771,40773,40774,40775,40776,40777,40778,40779,40780,40781,40782,40783,40786,40787,40788,40789,40790,40791,40792,40793,40794,40795,40796,40797,40798,40799,40800,40801,40802,40803,40804,40805,40806,40807,40808,40809,40810,40811,40812,40813,40814,40815,40816,40817,40818,40819,40820,40821,40822,40823,40824,40825,40826,40827,40828,40829,40830,40833,40834,40845,40846,40847,40848,40849,40850,40851,40852,40853,40854,40855,40856,40860,40861,40862,40865,40866,40867,40868,40869,63788,63865,63893,63975,63985,58378,58379,58380,58381,58382,58383,58384,58385,58386,58387,58388,58389,58390,58391,58392,58393,58394,58395,58396,58397,58398,58399,58400,58401,58402,58403,58404,58405,58406,58407,58408,58409,58410,58411,58412,58413,58414,58415,58416,58417,58418,58419,58420,58421,58422,58423,58424,58425,58426,58427,58428,58429,58430,58431,58432,58433,58434,58435,58436,58437,58438,58439,58440,58441,58442,58443,58444,58445,58446,58447,58448,58449,58450,58451,58452,58453,58454,58455,58456,58457,58458,58459,58460,58461,58462,58463,58464,58465,58466,58467,58468,58469,58470,58471,64012,64013,64014,64015,64017,64019,64020,64024,64031,64032,64033,64035,64036,64039,64040,64041,11905,59414,59415,59416,11908,13427,13383,11912,11915,59422,13726,13850,13838,11916,11927,14702,14616,59430,14799,14815,14963,14800,59435,59436,15182,15470,15584,11943,59441,59442,11946,16470,16735,11950,17207,11955,11958,11959,59451,17329,17324,11963,17373,17622,18017,17996,59459,18211,18217,18300,18317,11978,18759,18810,18813,18818,18819,18821,18822,18847,18843,18871,18870,59476,59477,19619,19615,19616,19617,19575,19618,19731,19732,19733,19734,19735,19736,19737,19886,59492,58472,58473,58474,58475,58476,58477,58478,58479,58480,58481,58482,58483,58484,58485,58486,58487,58488,58489,58490,58491,58492,58493,58494,58495,58496,58497,58498,58499,58500,58501,58502,58503,58504,58505,58506,58507,58508,58509,58510,58511,58512,58513,58514,58515,58516,58517,58518,58519,58520,58521,58522,58523,58524,58525,58526,58527,58528,58529,58530,58531,58532,58533,58534,58535,58536,58537,58538,58539,58540,58541,58542,58543,58544,58545,58546,58547,58548,58549,58550,58551,58552,58553,58554,58555,58556,58557,58558,58559,58560,58561,58562,58563,58564,58565],
+ "gb18030-ranges":[[0,128],[36,165],[38,169],[45,178],[50,184],[81,216],[89,226],[95,235],[96,238],[100,244],[103,248],[104,251],[105,253],[109,258],[126,276],[133,284],[148,300],[172,325],[175,329],[179,334],[208,364],[306,463],[307,465],[308,467],[309,469],[310,471],[311,473],[312,475],[313,477],[341,506],[428,594],[443,610],[544,712],[545,716],[558,730],[741,930],[742,938],[749,962],[750,970],[805,1026],[819,1104],[820,1106],[7922,8209],[7924,8215],[7925,8218],[7927,8222],[7934,8231],[7943,8241],[7944,8244],[7945,8246],[7950,8252],[8062,8365],[8148,8452],[8149,8454],[8152,8458],[8164,8471],[8174,8482],[8236,8556],[8240,8570],[8262,8596],[8264,8602],[8374,8713],[8380,8720],[8381,8722],[8384,8726],[8388,8731],[8390,8737],[8392,8740],[8393,8742],[8394,8748],[8396,8751],[8401,8760],[8406,8766],[8416,8777],[8419,8781],[8424,8787],[8437,8802],[8439,8808],[8445,8816],[8482,8854],[8485,8858],[8496,8870],[8521,8896],[8603,8979],[8936,9322],[8946,9372],[9046,9548],[9050,9588],[9063,9616],[9066,9622],[9076,9634],[9092,9652],[9100,9662],[9108,9672],[9111,9676],[9113,9680],[9131,9702],[9162,9735],[9164,9738],[9218,9793],[9219,9795],[11329,11906],[11331,11909],[11334,11913],[11336,11917],[11346,11928],[11361,11944],[11363,11947],[11366,11951],[11370,11956],[11372,11960],[11375,11964],[11389,11979],[11682,12284],[11686,12292],[11687,12312],[11692,12319],[11694,12330],[11714,12351],[11716,12436],[11723,12447],[11725,12535],[11730,12543],[11736,12586],[11982,12842],[11989,12850],[12102,12964],[12336,13200],[12348,13215],[12350,13218],[12384,13253],[12393,13263],[12395,13267],[12397,13270],[12510,13384],[12553,13428],[12851,13727],[12962,13839],[12973,13851],[13738,14617],[13823,14703],[13919,14801],[13933,14816],[14080,14964],[14298,15183],[14585,15471],[14698,15585],[15583,16471],[15847,16736],[16318,17208],[16434,17325],[16438,17330],[16481,17374],[16729,17623],[17102,17997],[17122,18018],[17315,18212],[17320,18218],[17402,18301],[17418,18318],[17859,18760],[17909,18811],[17911,18814],[17915,18820],[17916,18823],[17936,18844],[17939,18848],[17961,18872],[18664,19576],[18703,19620],[18814,19738],[18962,19887],[19043,40870],[33469,59244],[33470,59336],[33471,59367],[33484,59413],[33485,59417],[33490,59423],[33497,59431],[33501,59437],[33505,59443],[33513,59452],[33520,59460],[33536,59478],[33550,59493],[37845,63789],[37921,63866],[37948,63894],[38029,63976],[38038,63986],[38064,64016],[38065,64018],[38066,64021],[38069,64025],[38075,64034],[38076,64037],[38078,64042],[39108,65074],[39109,65093],[39113,65107],[39114,65112],[39115,65127],[39116,65132],[39265,65375],[39394,65510],[189000,65536]],
+ "jis0208":[12288,12289,12290,65292,65294,12539,65306,65307,65311,65281,12443,12444,180,65344,168,65342,65507,65343,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,8213,8208,65295,65340,65374,8741,65372,8230,8229,8216,8217,8220,8221,65288,65289,12308,12309,65339,65341,65371,65373,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,65291,65293,177,215,247,65309,8800,65308,65310,8806,8807,8734,8756,9794,9792,176,8242,8243,8451,65509,65284,65504,65505,65285,65283,65286,65290,65312,167,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8251,12306,8594,8592,8593,8595,12307,null,null,null,null,null,null,null,null,null,null,null,8712,8715,8838,8839,8834,8835,8746,8745,null,null,null,null,null,null,null,null,8743,8744,65506,8658,8660,8704,8707,null,null,null,null,null,null,null,null,null,null,null,8736,8869,8978,8706,8711,8801,8786,8810,8811,8730,8765,8733,8757,8747,8748,null,null,null,null,null,null,null,8491,8240,9839,9837,9834,8224,8225,182,null,null,null,null,9711,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,null,null,null,null,null,null,null,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,null,null,null,null,null,null,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,null,null,null,null,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,9327,9328,9329,9330,9331,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,13129,13076,13090,13133,13080,13095,13059,13110,13137,13143,13069,13094,13091,13099,13130,13115,13212,13213,13214,13198,13199,13252,13217,null,null,null,null,null,null,null,null,13179,12317,12319,8470,13261,8481,12964,12965,12966,12967,12968,12849,12850,12857,13182,13181,13180,8786,8801,8747,8750,8721,8730,8869,8736,8735,8895,8757,8745,8746,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20124,21782,23043,38463,21696,24859,25384,23030,36898,33909,33564,31312,24746,25569,28197,26093,33894,33446,39925,26771,22311,26017,25201,23451,22992,34427,39156,32098,32190,39822,25110,31903,34999,23433,24245,25353,26263,26696,38343,38797,26447,20197,20234,20301,20381,20553,22258,22839,22996,23041,23561,24799,24847,24944,26131,26885,28858,30031,30064,31227,32173,32239,32963,33806,34915,35586,36949,36986,21307,20117,20133,22495,32946,37057,30959,19968,22769,28322,36920,31282,33576,33419,39983,20801,21360,21693,21729,22240,23035,24341,39154,28139,32996,34093,38498,38512,38560,38907,21515,21491,23431,28879,32701,36802,38632,21359,40284,31418,19985,30867,33276,28198,22040,21764,27421,34074,39995,23013,21417,28006,29916,38287,22082,20113,36939,38642,33615,39180,21473,21942,23344,24433,26144,26355,26628,27704,27891,27945,29787,30408,31310,38964,33521,34907,35424,37613,28082,30123,30410,39365,24742,35585,36234,38322,27022,21421,20870,22290,22576,22852,23476,24310,24616,25513,25588,27839,28436,28814,28948,29017,29141,29503,32257,33398,33489,34199,36960,37467,40219,22633,26044,27738,29989,20985,22830,22885,24448,24540,25276,26106,27178,27431,27572,29579,32705,35158,40236,40206,40644,23713,27798,33659,20740,23627,25014,33222,26742,29281,20057,20474,21368,24681,28201,31311,38899,19979,21270,20206,20309,20285,20385,20339,21152,21487,22025,22799,23233,23478,23521,31185,26247,26524,26550,27468,27827,28779,29634,31117,31166,31292,31623,33457,33499,33540,33655,33775,33747,34662,35506,22057,36008,36838,36942,38686,34442,20420,23784,25105,29273,30011,33253,33469,34558,36032,38597,39187,39381,20171,20250,35299,22238,22602,22730,24315,24555,24618,24724,24674,25040,25106,25296,25913,39745,26214,26800,28023,28784,30028,30342,32117,33445,34809,38283,38542,35997,20977,21182,22806,21683,23475,23830,24936,27010,28079,30861,33995,34903,35442,37799,39608,28012,39336,34521,22435,26623,34510,37390,21123,22151,21508,24275,25313,25785,26684,26680,27579,29554,30906,31339,35226,35282,36203,36611,37101,38307,38548,38761,23398,23731,27005,38989,38990,25499,31520,27179,27263,26806,39949,28511,21106,21917,24688,25324,27963,28167,28369,33883,35088,36676,19988,39993,21494,26907,27194,38788,26666,20828,31427,33970,37340,37772,22107,40232,26658,33541,33841,31909,21000,33477,29926,20094,20355,20896,23506,21002,21208,21223,24059,21914,22570,23014,23436,23448,23515,24178,24185,24739,24863,24931,25022,25563,25954,26577,26707,26874,27454,27475,27735,28450,28567,28485,29872,29976,30435,30475,31487,31649,31777,32233,32566,32752,32925,33382,33694,35251,35532,36011,36996,37969,38291,38289,38306,38501,38867,39208,33304,20024,21547,23736,24012,29609,30284,30524,23721,32747,36107,38593,38929,38996,39000,20225,20238,21361,21916,22120,22522,22855,23305,23492,23696,24076,24190,24524,25582,26426,26071,26082,26399,26827,26820,27231,24112,27589,27671,27773,30079,31048,23395,31232,32000,24509,35215,35352,36020,36215,36556,36637,39138,39438,39740,20096,20605,20736,22931,23452,25135,25216,25836,27450,29344,30097,31047,32681,34811,35516,35696,25516,33738,38816,21513,21507,21931,26708,27224,35440,30759,26485,40653,21364,23458,33050,34384,36870,19992,20037,20167,20241,21450,21560,23470,24339,24613,25937,26429,27714,27762,27875,28792,29699,31350,31406,31496,32026,31998,32102,26087,29275,21435,23621,24040,25298,25312,25369,28192,34394,35377,36317,37624,28417,31142,39770,20136,20139,20140,20379,20384,20689,20807,31478,20849,20982,21332,21281,21375,21483,21932,22659,23777,24375,24394,24623,24656,24685,25375,25945,27211,27841,29378,29421,30703,33016,33029,33288,34126,37111,37857,38911,39255,39514,20208,20957,23597,26241,26989,23616,26354,26997,29577,26704,31873,20677,21220,22343,24062,37670,26020,27427,27453,29748,31105,31165,31563,32202,33465,33740,34943,35167,35641,36817,37329,21535,37504,20061,20534,21477,21306,29399,29590,30697,33510,36527,39366,39368,39378,20855,24858,34398,21936,31354,20598,23507,36935,38533,20018,27355,37351,23633,23624,25496,31391,27795,38772,36705,31402,29066,38536,31874,26647,32368,26705,37740,21234,21531,34219,35347,32676,36557,37089,21350,34952,31041,20418,20670,21009,20804,21843,22317,29674,22411,22865,24418,24452,24693,24950,24935,25001,25522,25658,25964,26223,26690,28179,30054,31293,31995,32076,32153,32331,32619,33550,33610,34509,35336,35427,35686,36605,38938,40335,33464,36814,39912,21127,25119,25731,28608,38553,26689,20625,27424,27770,28500,31348,32080,34880,35363,26376,20214,20537,20518,20581,20860,21048,21091,21927,22287,22533,23244,24314,25010,25080,25331,25458,26908,27177,29309,29356,29486,30740,30831,32121,30476,32937,35211,35609,36066,36562,36963,37749,38522,38997,39443,40568,20803,21407,21427,24187,24358,28187,28304,29572,29694,32067,33335,35328,35578,38480,20046,20491,21476,21628,22266,22993,23396,24049,24235,24359,25144,25925,26543,28246,29392,31946,34996,32929,32993,33776,34382,35463,36328,37431,38599,39015,40723,20116,20114,20237,21320,21577,21566,23087,24460,24481,24735,26791,27278,29786,30849,35486,35492,35703,37264,20062,39881,20132,20348,20399,20505,20502,20809,20844,21151,21177,21246,21402,21475,21521,21518,21897,22353,22434,22909,23380,23389,23439,24037,24039,24055,24184,24195,24218,24247,24344,24658,24908,25239,25304,25511,25915,26114,26179,26356,26477,26657,26775,27083,27743,27946,28009,28207,28317,30002,30343,30828,31295,31968,32005,32024,32094,32177,32789,32771,32943,32945,33108,33167,33322,33618,34892,34913,35611,36002,36092,37066,37237,37489,30783,37628,38308,38477,38917,39321,39640,40251,21083,21163,21495,21512,22741,25335,28640,35946,36703,40633,20811,21051,21578,22269,31296,37239,40288,40658,29508,28425,33136,29969,24573,24794,39592,29403,36796,27492,38915,20170,22256,22372,22718,23130,24680,25031,26127,26118,26681,26801,28151,30165,32058,33390,39746,20123,20304,21449,21766,23919,24038,24046,26619,27801,29811,30722,35408,37782,35039,22352,24231,25387,20661,20652,20877,26368,21705,22622,22971,23472,24425,25165,25505,26685,27507,28168,28797,37319,29312,30741,30758,31085,25998,32048,33756,35009,36617,38555,21092,22312,26448,32618,36001,20916,22338,38442,22586,27018,32948,21682,23822,22524,30869,40442,20316,21066,21643,25662,26152,26388,26613,31364,31574,32034,37679,26716,39853,31545,21273,20874,21047,23519,25334,25774,25830,26413,27578,34217,38609,30352,39894,25420,37638,39851,30399,26194,19977,20632,21442,23665,24808,25746,25955,26719,29158,29642,29987,31639,32386,34453,35715,36059,37240,39184,26028,26283,27531,20181,20180,20282,20351,21050,21496,21490,21987,22235,22763,22987,22985,23039,23376,23629,24066,24107,24535,24605,25351,25903,23388,26031,26045,26088,26525,27490,27515,27663,29509,31049,31169,31992,32025,32043,32930,33026,33267,35222,35422,35433,35430,35468,35566,36039,36060,38604,39164,27503,20107,20284,20365,20816,23383,23546,24904,25345,26178,27425,28363,27835,29246,29885,30164,30913,31034,32780,32819,33258,33940,36766,27728,40575,24335,35672,40235,31482,36600,23437,38635,19971,21489,22519,22833,23241,23460,24713,28287,28422,30142,36074,23455,34048,31712,20594,26612,33437,23649,34122,32286,33294,20889,23556,25448,36198,26012,29038,31038,32023,32773,35613,36554,36974,34503,37034,20511,21242,23610,26451,28796,29237,37196,37320,37675,33509,23490,24369,24825,20027,21462,23432,25163,26417,27530,29417,29664,31278,33131,36259,37202,39318,20754,21463,21610,23551,25480,27193,32172,38656,22234,21454,21608,23447,23601,24030,20462,24833,25342,27954,31168,31179,32066,32333,32722,33261,33311,33936,34886,35186,35728,36468,36655,36913,37195,37228,38598,37276,20160,20303,20805,21313,24467,25102,26580,27713,28171,29539,32294,37325,37507,21460,22809,23487,28113,31069,32302,31899,22654,29087,20986,34899,36848,20426,23803,26149,30636,31459,33308,39423,20934,24490,26092,26991,27529,28147,28310,28516,30462,32020,24033,36981,37255,38918,20966,21021,25152,26257,26329,28186,24246,32210,32626,26360,34223,34295,35576,21161,21465,22899,24207,24464,24661,37604,38500,20663,20767,21213,21280,21319,21484,21736,21830,21809,22039,22888,22974,23100,23477,23558,23567,23569,23578,24196,24202,24288,24432,25215,25220,25307,25484,25463,26119,26124,26157,26230,26494,26786,27167,27189,27836,28040,28169,28248,28988,28966,29031,30151,30465,30813,30977,31077,31216,31456,31505,31911,32057,32918,33750,33931,34121,34909,35059,35359,35388,35412,35443,35937,36062,37284,37478,37758,37912,38556,38808,19978,19976,19998,20055,20887,21104,22478,22580,22732,23330,24120,24773,25854,26465,26454,27972,29366,30067,31331,33976,35698,37304,37664,22065,22516,39166,25325,26893,27542,29165,32340,32887,33394,35302,39135,34645,36785,23611,20280,20449,20405,21767,23072,23517,23529,24515,24910,25391,26032,26187,26862,27035,28024,28145,30003,30137,30495,31070,31206,32051,33251,33455,34218,35242,35386,36523,36763,36914,37341,38663,20154,20161,20995,22645,22764,23563,29978,23613,33102,35338,36805,38499,38765,31525,35535,38920,37218,22259,21416,36887,21561,22402,24101,25512,27700,28810,30561,31883,32736,34928,36930,37204,37648,37656,38543,29790,39620,23815,23913,25968,26530,36264,38619,25454,26441,26905,33733,38935,38592,35070,28548,25722,23544,19990,28716,30045,26159,20932,21046,21218,22995,24449,24615,25104,25919,25972,26143,26228,26866,26646,27491,28165,29298,29983,30427,31934,32854,22768,35069,35199,35488,35475,35531,36893,37266,38738,38745,25993,31246,33030,38587,24109,24796,25114,26021,26132,26512,30707,31309,31821,32318,33034,36012,36196,36321,36447,30889,20999,25305,25509,25666,25240,35373,31363,31680,35500,38634,32118,33292,34633,20185,20808,21315,21344,23459,23554,23574,24029,25126,25159,25776,26643,26676,27849,27973,27927,26579,28508,29006,29053,26059,31359,31661,32218,32330,32680,33146,33307,33337,34214,35438,36046,36341,36984,36983,37549,37521,38275,39854,21069,21892,28472,28982,20840,31109,32341,33203,31950,22092,22609,23720,25514,26366,26365,26970,29401,30095,30094,30990,31062,31199,31895,32032,32068,34311,35380,38459,36961,40736,20711,21109,21452,21474,20489,21930,22766,22863,29245,23435,23652,21277,24803,24819,25436,25475,25407,25531,25805,26089,26361,24035,27085,27133,28437,29157,20105,30185,30456,31379,31967,32207,32156,32865,33609,33624,33900,33980,34299,35013,36208,36865,36973,37783,38684,39442,20687,22679,24974,33235,34101,36104,36896,20419,20596,21063,21363,24687,25417,26463,28204,36275,36895,20439,23646,36042,26063,32154,21330,34966,20854,25539,23384,23403,23562,25613,26449,36956,20182,22810,22826,27760,35409,21822,22549,22949,24816,25171,26561,33333,26965,38464,39364,39464,20307,22534,23550,32784,23729,24111,24453,24608,24907,25140,26367,27888,28382,32974,33151,33492,34955,36024,36864,36910,38538,40667,39899,20195,21488,22823,31532,37261,38988,40441,28381,28711,21331,21828,23429,25176,25246,25299,27810,28655,29730,35351,37944,28609,35582,33592,20967,34552,21482,21481,20294,36948,36784,22890,33073,24061,31466,36799,26842,35895,29432,40008,27197,35504,20025,21336,22022,22374,25285,25506,26086,27470,28129,28251,28845,30701,31471,31658,32187,32829,32966,34507,35477,37723,22243,22727,24382,26029,26262,27264,27573,30007,35527,20516,30693,22320,24347,24677,26234,27744,30196,31258,32622,33268,34584,36933,39347,31689,30044,31481,31569,33988,36880,31209,31378,33590,23265,30528,20013,20210,23449,24544,25277,26172,26609,27880,34411,34935,35387,37198,37619,39376,27159,28710,29482,33511,33879,36015,19969,20806,20939,21899,23541,24086,24115,24193,24340,24373,24427,24500,25074,25361,26274,26397,28526,29266,30010,30522,32884,33081,33144,34678,35519,35548,36229,36339,37530,38263,38914,40165,21189,25431,30452,26389,27784,29645,36035,37806,38515,27941,22684,26894,27084,36861,37786,30171,36890,22618,26626,25524,27131,20291,28460,26584,36795,34086,32180,37716,26943,28528,22378,22775,23340,32044,29226,21514,37347,40372,20141,20302,20572,20597,21059,35998,21576,22564,23450,24093,24213,24237,24311,24351,24716,25269,25402,25552,26799,27712,30855,31118,31243,32224,33351,35330,35558,36420,36883,37048,37165,37336,40718,27877,25688,25826,25973,28404,30340,31515,36969,37841,28346,21746,24505,25764,36685,36845,37444,20856,22635,22825,23637,24215,28155,32399,29980,36028,36578,39003,28857,20253,27583,28593,30000,38651,20814,21520,22581,22615,22956,23648,24466,26007,26460,28193,30331,33759,36077,36884,37117,37709,30757,30778,21162,24230,22303,22900,24594,20498,20826,20908,20941,20992,21776,22612,22616,22871,23445,23798,23947,24764,25237,25645,26481,26691,26812,26847,30423,28120,28271,28059,28783,29128,24403,30168,31095,31561,31572,31570,31958,32113,21040,33891,34153,34276,35342,35588,35910,36367,36867,36879,37913,38518,38957,39472,38360,20685,21205,21516,22530,23566,24999,25758,27934,30643,31461,33012,33796,36947,37509,23776,40199,21311,24471,24499,28060,29305,30563,31167,31716,27602,29420,35501,26627,27233,20984,31361,26932,23626,40182,33515,23493,37193,28702,22136,23663,24775,25958,27788,35930,36929,38931,21585,26311,37389,22856,37027,20869,20045,20970,34201,35598,28760,25466,37707,26978,39348,32260,30071,21335,26976,36575,38627,27741,20108,23612,24336,36841,21250,36049,32905,34425,24319,26085,20083,20837,22914,23615,38894,20219,22922,24525,35469,28641,31152,31074,23527,33905,29483,29105,24180,24565,25467,25754,29123,31896,20035,24316,20043,22492,22178,24745,28611,32013,33021,33075,33215,36786,35223,34468,24052,25226,25773,35207,26487,27874,27966,29750,30772,23110,32629,33453,39340,20467,24259,25309,25490,25943,26479,30403,29260,32972,32954,36649,37197,20493,22521,23186,26757,26995,29028,29437,36023,22770,36064,38506,36889,34687,31204,30695,33833,20271,21093,21338,25293,26575,27850,30333,31636,31893,33334,34180,36843,26333,28448,29190,32283,33707,39361,40614,20989,31665,30834,31672,32903,31560,27368,24161,32908,30033,30048,20843,37474,28300,30330,37271,39658,20240,32624,25244,31567,38309,40169,22138,22617,34532,38588,20276,21028,21322,21453,21467,24070,25644,26001,26495,27710,27726,29256,29359,29677,30036,32321,33324,34281,36009,31684,37318,29033,38930,39151,25405,26217,30058,30436,30928,34115,34542,21290,21329,21542,22915,24199,24444,24754,25161,25209,25259,26000,27604,27852,30130,30382,30865,31192,32203,32631,32933,34987,35513,36027,36991,38750,39131,27147,31800,20633,23614,24494,26503,27608,29749,30473,32654,40763,26570,31255,21305,30091,39661,24422,33181,33777,32920,24380,24517,30050,31558,36924,26727,23019,23195,32016,30334,35628,20469,24426,27161,27703,28418,29922,31080,34920,35413,35961,24287,25551,30149,31186,33495,37672,37618,33948,34541,39981,21697,24428,25996,27996,28693,36007,36051,38971,25935,29942,19981,20184,22496,22827,23142,23500,20904,24067,24220,24598,25206,25975,26023,26222,28014,29238,31526,33104,33178,33433,35676,36000,36070,36212,38428,38468,20398,25771,27494,33310,33889,34154,37096,23553,26963,39080,33914,34135,20239,21103,24489,24133,26381,31119,33145,35079,35206,28149,24343,25173,27832,20175,29289,39826,20998,21563,22132,22707,24996,25198,28954,22894,31881,31966,32027,38640,25991,32862,19993,20341,20853,22592,24163,24179,24330,26564,20006,34109,38281,38491,31859,38913,20731,22721,30294,30887,21029,30629,34065,31622,20559,22793,29255,31687,32232,36794,36820,36941,20415,21193,23081,24321,38829,20445,33303,37610,22275,25429,27497,29995,35036,36628,31298,21215,22675,24917,25098,26286,27597,31807,33769,20515,20472,21253,21574,22577,22857,23453,23792,23791,23849,24214,25265,25447,25918,26041,26379,27861,27873,28921,30770,32299,32990,33459,33804,34028,34562,35090,35370,35914,37030,37586,39165,40179,40300,20047,20129,20621,21078,22346,22952,24125,24536,24537,25151,26292,26395,26576,26834,20882,32033,32938,33192,35584,35980,36031,37502,38450,21536,38956,21271,20693,21340,22696,25778,26420,29287,30566,31302,37350,21187,27809,27526,22528,24140,22868,26412,32763,20961,30406,25705,30952,39764,40635,22475,22969,26151,26522,27598,21737,27097,24149,33180,26517,39850,26622,40018,26717,20134,20451,21448,25273,26411,27819,36804,20397,32365,40639,19975,24930,28288,28459,34067,21619,26410,39749,24051,31637,23724,23494,34588,28234,34001,31252,33032,22937,31885,27665,30496,21209,22818,28961,29279,30683,38695,40289,26891,23167,23064,20901,21517,21629,26126,30431,36855,37528,40180,23018,29277,28357,20813,26825,32191,32236,38754,40634,25720,27169,33538,22916,23391,27611,29467,30450,32178,32791,33945,20786,26408,40665,30446,26466,21247,39173,23588,25147,31870,36016,21839,24758,32011,38272,21249,20063,20918,22812,29242,32822,37326,24357,30690,21380,24441,32004,34220,35379,36493,38742,26611,34222,37971,24841,24840,27833,30290,35565,36664,21807,20305,20778,21191,21451,23461,24189,24736,24962,25558,26377,26586,28263,28044,29494,29495,30001,31056,35029,35480,36938,37009,37109,38596,34701,22805,20104,20313,19982,35465,36671,38928,20653,24188,22934,23481,24248,25562,25594,25793,26332,26954,27096,27915,28342,29076,29992,31407,32650,32768,33865,33993,35201,35617,36362,36965,38525,39178,24958,25233,27442,27779,28020,32716,32764,28096,32645,34746,35064,26469,33713,38972,38647,27931,32097,33853,37226,20081,21365,23888,27396,28651,34253,34349,35239,21033,21519,23653,26446,26792,29702,29827,30178,35023,35041,37324,38626,38520,24459,29575,31435,33870,25504,30053,21129,27969,28316,29705,30041,30827,31890,38534,31452,40845,20406,24942,26053,34396,20102,20142,20698,20001,20940,23534,26009,26753,28092,29471,30274,30637,31260,31975,33391,35538,36988,37327,38517,38936,21147,32209,20523,21400,26519,28107,29136,29747,33256,36650,38563,40023,40607,29792,22593,28057,32047,39006,20196,20278,20363,20919,21169,23994,24604,29618,31036,33491,37428,38583,38646,38666,40599,40802,26278,27508,21015,21155,28872,35010,24265,24651,24976,28451,29001,31806,32244,32879,34030,36899,37676,21570,39791,27347,28809,36034,36335,38706,21172,23105,24266,24324,26391,27004,27028,28010,28431,29282,29436,31725,32769,32894,34635,37070,20845,40595,31108,32907,37682,35542,20525,21644,35441,27498,36036,33031,24785,26528,40434,20121,20120,39952,35435,34241,34152,26880,28286,30871,33109,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24332,19984,19989,20010,20017,20022,20028,20031,20034,20054,20056,20098,20101,35947,20106,33298,24333,20110,20126,20127,20128,20130,20144,20147,20150,20174,20173,20164,20166,20162,20183,20190,20205,20191,20215,20233,20314,20272,20315,20317,20311,20295,20342,20360,20367,20376,20347,20329,20336,20369,20335,20358,20374,20760,20436,20447,20430,20440,20443,20433,20442,20432,20452,20453,20506,20520,20500,20522,20517,20485,20252,20470,20513,20521,20524,20478,20463,20497,20486,20547,20551,26371,20565,20560,20552,20570,20566,20588,20600,20608,20634,20613,20660,20658,20681,20682,20659,20674,20694,20702,20709,20717,20707,20718,20729,20725,20745,20737,20738,20758,20757,20756,20762,20769,20794,20791,20796,20795,20799,20800,20818,20812,20820,20834,31480,20841,20842,20846,20864,20866,22232,20876,20873,20879,20881,20883,20885,20886,20900,20902,20898,20905,20906,20907,20915,20913,20914,20912,20917,20925,20933,20937,20955,20960,34389,20969,20973,20976,20981,20990,20996,21003,21012,21006,21031,21034,21038,21043,21049,21071,21060,21067,21068,21086,21076,21098,21108,21097,21107,21119,21117,21133,21140,21138,21105,21128,21137,36776,36775,21164,21165,21180,21173,21185,21197,21207,21214,21219,21222,39149,21216,21235,21237,21240,21241,21254,21256,30008,21261,21264,21263,21269,21274,21283,21295,21297,21299,21304,21312,21318,21317,19991,21321,21325,20950,21342,21353,21358,22808,21371,21367,21378,21398,21408,21414,21413,21422,21424,21430,21443,31762,38617,21471,26364,29166,21486,21480,21485,21498,21505,21565,21568,21548,21549,21564,21550,21558,21545,21533,21582,21647,21621,21646,21599,21617,21623,21616,21650,21627,21632,21622,21636,21648,21638,21703,21666,21688,21669,21676,21700,21704,21672,21675,21698,21668,21694,21692,21720,21733,21734,21775,21780,21757,21742,21741,21754,21730,21817,21824,21859,21836,21806,21852,21829,21846,21847,21816,21811,21853,21913,21888,21679,21898,21919,21883,21886,21912,21918,21934,21884,21891,21929,21895,21928,21978,21957,21983,21956,21980,21988,21972,22036,22007,22038,22014,22013,22043,22009,22094,22096,29151,22068,22070,22066,22072,22123,22116,22063,22124,22122,22150,22144,22154,22176,22164,22159,22181,22190,22198,22196,22210,22204,22209,22211,22208,22216,22222,22225,22227,22231,22254,22265,22272,22271,22276,22281,22280,22283,22285,22291,22296,22294,21959,22300,22310,22327,22328,22350,22331,22336,22351,22377,22464,22408,22369,22399,22409,22419,22432,22451,22436,22442,22448,22467,22470,22484,22482,22483,22538,22486,22499,22539,22553,22557,22642,22561,22626,22603,22640,27584,22610,22589,22649,22661,22713,22687,22699,22714,22750,22715,22712,22702,22725,22739,22737,22743,22745,22744,22757,22748,22756,22751,22767,22778,22777,22779,22780,22781,22786,22794,22800,22811,26790,22821,22828,22829,22834,22840,22846,31442,22869,22864,22862,22874,22872,22882,22880,22887,22892,22889,22904,22913,22941,20318,20395,22947,22962,22982,23016,23004,22925,23001,23002,23077,23071,23057,23068,23049,23066,23104,23148,23113,23093,23094,23138,23146,23194,23228,23230,23243,23234,23229,23267,23255,23270,23273,23254,23290,23291,23308,23307,23318,23346,23248,23338,23350,23358,23363,23365,23360,23377,23381,23386,23387,23397,23401,23408,23411,23413,23416,25992,23418,23424,23427,23462,23480,23491,23495,23497,23508,23504,23524,23526,23522,23518,23525,23531,23536,23542,23539,23557,23559,23560,23565,23571,23584,23586,23592,23608,23609,23617,23622,23630,23635,23632,23631,23409,23660,23662,20066,23670,23673,23692,23697,23700,22939,23723,23739,23734,23740,23735,23749,23742,23751,23769,23785,23805,23802,23789,23948,23786,23819,23829,23831,23900,23839,23835,23825,23828,23842,23834,23833,23832,23884,23890,23886,23883,23916,23923,23926,23943,23940,23938,23970,23965,23980,23982,23997,23952,23991,23996,24009,24013,24019,24018,24022,24027,24043,24050,24053,24075,24090,24089,24081,24091,24118,24119,24132,24131,24128,24142,24151,24148,24159,24162,24164,24135,24181,24182,24186,40636,24191,24224,24257,24258,24264,24272,24271,24278,24291,24285,24282,24283,24290,24289,24296,24297,24300,24305,24307,24304,24308,24312,24318,24323,24329,24413,24412,24331,24337,24342,24361,24365,24376,24385,24392,24396,24398,24367,24401,24406,24407,24409,24417,24429,24435,24439,24451,24450,24447,24458,24456,24465,24455,24478,24473,24472,24480,24488,24493,24508,24534,24571,24548,24568,24561,24541,24755,24575,24609,24672,24601,24592,24617,24590,24625,24603,24597,24619,24614,24591,24634,24666,24641,24682,24695,24671,24650,24646,24653,24675,24643,24676,24642,24684,24683,24665,24705,24717,24807,24707,24730,24708,24731,24726,24727,24722,24743,24715,24801,24760,24800,24787,24756,24560,24765,24774,24757,24792,24909,24853,24838,24822,24823,24832,24820,24826,24835,24865,24827,24817,24845,24846,24903,24894,24872,24871,24906,24895,24892,24876,24884,24893,24898,24900,24947,24951,24920,24921,24922,24939,24948,24943,24933,24945,24927,24925,24915,24949,24985,24982,24967,25004,24980,24986,24970,24977,25003,25006,25036,25034,25033,25079,25032,25027,25030,25018,25035,32633,25037,25062,25059,25078,25082,25076,25087,25085,25084,25086,25088,25096,25097,25101,25100,25108,25115,25118,25121,25130,25134,25136,25138,25139,25153,25166,25182,25187,25179,25184,25192,25212,25218,25225,25214,25234,25235,25238,25300,25219,25236,25303,25297,25275,25295,25343,25286,25812,25288,25308,25292,25290,25282,25287,25243,25289,25356,25326,25329,25383,25346,25352,25327,25333,25424,25406,25421,25628,25423,25494,25486,25472,25515,25462,25507,25487,25481,25503,25525,25451,25449,25534,25577,25536,25542,25571,25545,25554,25590,25540,25622,25652,25606,25619,25638,25654,25885,25623,25640,25615,25703,25711,25718,25678,25898,25749,25747,25765,25769,25736,25788,25818,25810,25797,25799,25787,25816,25794,25841,25831,33289,25824,25825,25260,25827,25839,25900,25846,25844,25842,25850,25856,25853,25880,25884,25861,25892,25891,25899,25908,25909,25911,25910,25912,30027,25928,25942,25941,25933,25944,25950,25949,25970,25976,25986,25987,35722,26011,26015,26027,26039,26051,26054,26049,26052,26060,26066,26075,26073,26080,26081,26097,26482,26122,26115,26107,26483,26165,26166,26164,26140,26191,26180,26185,26177,26206,26205,26212,26215,26216,26207,26210,26224,26243,26248,26254,26249,26244,26264,26269,26305,26297,26313,26302,26300,26308,26296,26326,26330,26336,26175,26342,26345,26352,26357,26359,26383,26390,26398,26406,26407,38712,26414,26431,26422,26433,26424,26423,26438,26462,26464,26457,26467,26468,26505,26480,26537,26492,26474,26508,26507,26534,26529,26501,26551,26607,26548,26604,26547,26601,26552,26596,26590,26589,26594,26606,26553,26574,26566,26599,27292,26654,26694,26665,26688,26701,26674,26702,26803,26667,26713,26723,26743,26751,26783,26767,26797,26772,26781,26779,26755,27310,26809,26740,26805,26784,26810,26895,26765,26750,26881,26826,26888,26840,26914,26918,26849,26892,26829,26836,26855,26837,26934,26898,26884,26839,26851,26917,26873,26848,26863,26920,26922,26906,26915,26913,26822,27001,26999,26972,27000,26987,26964,27006,26990,26937,26996,26941,26969,26928,26977,26974,26973,27009,26986,27058,27054,27088,27071,27073,27091,27070,27086,23528,27082,27101,27067,27075,27047,27182,27025,27040,27036,27029,27060,27102,27112,27138,27163,27135,27402,27129,27122,27111,27141,27057,27166,27117,27156,27115,27146,27154,27329,27171,27155,27204,27148,27250,27190,27256,27207,27234,27225,27238,27208,27192,27170,27280,27277,27296,27268,27298,27299,27287,34327,27323,27331,27330,27320,27315,27308,27358,27345,27359,27306,27354,27370,27387,27397,34326,27386,27410,27414,39729,27423,27448,27447,30428,27449,39150,27463,27459,27465,27472,27481,27476,27483,27487,27489,27512,27513,27519,27520,27524,27523,27533,27544,27541,27550,27556,27562,27563,27567,27570,27569,27571,27575,27580,27590,27595,27603,27615,27628,27627,27635,27631,40638,27656,27667,27668,27675,27684,27683,27742,27733,27746,27754,27778,27789,27802,27777,27803,27774,27752,27763,27794,27792,27844,27889,27859,27837,27863,27845,27869,27822,27825,27838,27834,27867,27887,27865,27882,27935,34893,27958,27947,27965,27960,27929,27957,27955,27922,27916,28003,28051,28004,27994,28025,27993,28046,28053,28644,28037,28153,28181,28170,28085,28103,28134,28088,28102,28140,28126,28108,28136,28114,28101,28154,28121,28132,28117,28138,28142,28205,28270,28206,28185,28274,28255,28222,28195,28267,28203,28278,28237,28191,28227,28218,28238,28196,28415,28189,28216,28290,28330,28312,28361,28343,28371,28349,28335,28356,28338,28372,28373,28303,28325,28354,28319,28481,28433,28748,28396,28408,28414,28479,28402,28465,28399,28466,28364,28478,28435,28407,28550,28538,28536,28545,28544,28527,28507,28659,28525,28546,28540,28504,28558,28561,28610,28518,28595,28579,28577,28580,28601,28614,28586,28639,28629,28652,28628,28632,28657,28654,28635,28681,28683,28666,28689,28673,28687,28670,28699,28698,28532,28701,28696,28703,28720,28734,28722,28753,28771,28825,28818,28847,28913,28844,28856,28851,28846,28895,28875,28893,28889,28937,28925,28956,28953,29029,29013,29064,29030,29026,29004,29014,29036,29071,29179,29060,29077,29096,29100,29143,29113,29118,29138,29129,29140,29134,29152,29164,29159,29173,29180,29177,29183,29197,29200,29211,29224,29229,29228,29232,29234,29243,29244,29247,29248,29254,29259,29272,29300,29310,29314,29313,29319,29330,29334,29346,29351,29369,29362,29379,29382,29380,29390,29394,29410,29408,29409,29433,29431,20495,29463,29450,29468,29462,29469,29492,29487,29481,29477,29502,29518,29519,40664,29527,29546,29544,29552,29560,29557,29563,29562,29640,29619,29646,29627,29632,29669,29678,29662,29858,29701,29807,29733,29688,29746,29754,29781,29759,29791,29785,29761,29788,29801,29808,29795,29802,29814,29822,29835,29854,29863,29898,29903,29908,29681,29920,29923,29927,29929,29934,29938,29936,29937,29944,29943,29956,29955,29957,29964,29966,29965,29973,29971,29982,29990,29996,30012,30020,30029,30026,30025,30043,30022,30042,30057,30052,30055,30059,30061,30072,30070,30086,30087,30068,30090,30089,30082,30100,30106,30109,30117,30115,30146,30131,30147,30133,30141,30136,30140,30129,30157,30154,30162,30169,30179,30174,30206,30207,30204,30209,30192,30202,30194,30195,30219,30221,30217,30239,30247,30240,30241,30242,30244,30260,30256,30267,30279,30280,30278,30300,30296,30305,30306,30312,30313,30314,30311,30316,30320,30322,30326,30328,30332,30336,30339,30344,30347,30350,30358,30355,30361,30362,30384,30388,30392,30393,30394,30402,30413,30422,30418,30430,30433,30437,30439,30442,34351,30459,30472,30471,30468,30505,30500,30494,30501,30502,30491,30519,30520,30535,30554,30568,30571,30555,30565,30591,30590,30585,30606,30603,30609,30624,30622,30640,30646,30649,30655,30652,30653,30651,30663,30669,30679,30682,30684,30691,30702,30716,30732,30738,31014,30752,31018,30789,30862,30836,30854,30844,30874,30860,30883,30901,30890,30895,30929,30918,30923,30932,30910,30908,30917,30922,30956,30951,30938,30973,30964,30983,30994,30993,31001,31020,31019,31040,31072,31063,31071,31066,31061,31059,31098,31103,31114,31133,31143,40779,31146,31150,31155,31161,31162,31177,31189,31207,31212,31201,31203,31240,31245,31256,31257,31264,31263,31104,31281,31291,31294,31287,31299,31319,31305,31329,31330,31337,40861,31344,31353,31357,31368,31383,31381,31384,31382,31401,31432,31408,31414,31429,31428,31423,36995,31431,31434,31437,31439,31445,31443,31449,31450,31453,31457,31458,31462,31469,31472,31490,31503,31498,31494,31539,31512,31513,31518,31541,31528,31542,31568,31610,31492,31565,31499,31564,31557,31605,31589,31604,31591,31600,31601,31596,31598,31645,31640,31647,31629,31644,31642,31627,31634,31631,31581,31641,31691,31681,31692,31695,31668,31686,31709,31721,31761,31764,31718,31717,31840,31744,31751,31763,31731,31735,31767,31757,31734,31779,31783,31786,31775,31799,31787,31805,31820,31811,31828,31823,31808,31824,31832,31839,31844,31830,31845,31852,31861,31875,31888,31908,31917,31906,31915,31905,31912,31923,31922,31921,31918,31929,31933,31936,31941,31938,31960,31954,31964,31970,39739,31983,31986,31988,31990,31994,32006,32002,32028,32021,32010,32069,32075,32046,32050,32063,32053,32070,32115,32086,32078,32114,32104,32110,32079,32099,32147,32137,32091,32143,32125,32155,32186,32174,32163,32181,32199,32189,32171,32317,32162,32175,32220,32184,32159,32176,32216,32221,32228,32222,32251,32242,32225,32261,32266,32291,32289,32274,32305,32287,32265,32267,32290,32326,32358,32315,32309,32313,32323,32311,32306,32314,32359,32349,32342,32350,32345,32346,32377,32362,32361,32380,32379,32387,32213,32381,36782,32383,32392,32393,32396,32402,32400,32403,32404,32406,32398,32411,32412,32568,32570,32581,32588,32589,32590,32592,32593,32597,32596,32600,32607,32608,32616,32617,32615,32632,32642,32646,32643,32648,32647,32652,32660,32670,32669,32666,32675,32687,32690,32697,32686,32694,32696,35697,32709,32710,32714,32725,32724,32737,32742,32745,32755,32761,39132,32774,32772,32779,32786,32792,32793,32796,32801,32808,32831,32827,32842,32838,32850,32856,32858,32863,32866,32872,32883,32882,32880,32886,32889,32893,32895,32900,32902,32901,32923,32915,32922,32941,20880,32940,32987,32997,32985,32989,32964,32986,32982,33033,33007,33009,33051,33065,33059,33071,33099,38539,33094,33086,33107,33105,33020,33137,33134,33125,33126,33140,33155,33160,33162,33152,33154,33184,33173,33188,33187,33119,33171,33193,33200,33205,33214,33208,33213,33216,33218,33210,33225,33229,33233,33241,33240,33224,33242,33247,33248,33255,33274,33275,33278,33281,33282,33285,33287,33290,33293,33296,33302,33321,33323,33336,33331,33344,33369,33368,33373,33370,33375,33380,33378,33384,33386,33387,33326,33393,33399,33400,33406,33421,33426,33451,33439,33467,33452,33505,33507,33503,33490,33524,33523,33530,33683,33539,33531,33529,33502,33542,33500,33545,33497,33589,33588,33558,33586,33585,33600,33593,33616,33605,33583,33579,33559,33560,33669,33690,33706,33695,33698,33686,33571,33678,33671,33674,33660,33717,33651,33653,33696,33673,33704,33780,33811,33771,33742,33789,33795,33752,33803,33729,33783,33799,33760,33778,33805,33826,33824,33725,33848,34054,33787,33901,33834,33852,34138,33924,33911,33899,33965,33902,33922,33897,33862,33836,33903,33913,33845,33994,33890,33977,33983,33951,34009,33997,33979,34010,34000,33985,33990,34006,33953,34081,34047,34036,34071,34072,34092,34079,34069,34068,34044,34112,34147,34136,34120,34113,34306,34123,34133,34176,34212,34184,34193,34186,34216,34157,34196,34203,34282,34183,34204,34167,34174,34192,34249,34234,34255,34233,34256,34261,34269,34277,34268,34297,34314,34323,34315,34302,34298,34310,34338,34330,34352,34367,34381,20053,34388,34399,34407,34417,34451,34467,34473,34474,34443,34444,34486,34479,34500,34502,34480,34505,34851,34475,34516,34526,34537,34540,34527,34523,34543,34578,34566,34568,34560,34563,34555,34577,34569,34573,34553,34570,34612,34623,34615,34619,34597,34601,34586,34656,34655,34680,34636,34638,34676,34647,34664,34670,34649,34643,34659,34666,34821,34722,34719,34690,34735,34763,34749,34752,34768,38614,34731,34756,34739,34759,34758,34747,34799,34802,34784,34831,34829,34814,34806,34807,34830,34770,34833,34838,34837,34850,34849,34865,34870,34873,34855,34875,34884,34882,34898,34905,34910,34914,34923,34945,34942,34974,34933,34941,34997,34930,34946,34967,34962,34990,34969,34978,34957,34980,34992,35007,34993,35011,35012,35028,35032,35033,35037,35065,35074,35068,35060,35048,35058,35076,35084,35082,35091,35139,35102,35109,35114,35115,35137,35140,35131,35126,35128,35148,35101,35168,35166,35174,35172,35181,35178,35183,35188,35191,35198,35203,35208,35210,35219,35224,35233,35241,35238,35244,35247,35250,35258,35261,35263,35264,35290,35292,35293,35303,35316,35320,35331,35350,35344,35340,35355,35357,35365,35382,35393,35419,35410,35398,35400,35452,35437,35436,35426,35461,35458,35460,35496,35489,35473,35493,35494,35482,35491,35524,35533,35522,35546,35563,35571,35559,35556,35569,35604,35552,35554,35575,35550,35547,35596,35591,35610,35553,35606,35600,35607,35616,35635,38827,35622,35627,35646,35624,35649,35660,35663,35662,35657,35670,35675,35674,35691,35679,35692,35695,35700,35709,35712,35724,35726,35730,35731,35734,35737,35738,35898,35905,35903,35912,35916,35918,35920,35925,35938,35948,35960,35962,35970,35977,35973,35978,35981,35982,35988,35964,35992,25117,36013,36010,36029,36018,36019,36014,36022,36040,36033,36068,36067,36058,36093,36090,36091,36100,36101,36106,36103,36111,36109,36112,40782,36115,36045,36116,36118,36199,36205,36209,36211,36225,36249,36290,36286,36282,36303,36314,36310,36300,36315,36299,36330,36331,36319,36323,36348,36360,36361,36351,36381,36382,36368,36383,36418,36405,36400,36404,36426,36423,36425,36428,36432,36424,36441,36452,36448,36394,36451,36437,36470,36466,36476,36481,36487,36485,36484,36491,36490,36499,36497,36500,36505,36522,36513,36524,36528,36550,36529,36542,36549,36552,36555,36571,36579,36604,36603,36587,36606,36618,36613,36629,36626,36633,36627,36636,36639,36635,36620,36646,36659,36667,36665,36677,36674,36670,36684,36681,36678,36686,36695,36700,36706,36707,36708,36764,36767,36771,36781,36783,36791,36826,36837,36834,36842,36847,36999,36852,36869,36857,36858,36881,36885,36897,36877,36894,36886,36875,36903,36918,36917,36921,36856,36943,36944,36945,36946,36878,36937,36926,36950,36952,36958,36968,36975,36982,38568,36978,36994,36989,36993,36992,37002,37001,37007,37032,37039,37041,37045,37090,37092,25160,37083,37122,37138,37145,37170,37168,37194,37206,37208,37219,37221,37225,37235,37234,37259,37257,37250,37282,37291,37295,37290,37301,37300,37306,37312,37313,37321,37323,37328,37334,37343,37345,37339,37372,37365,37366,37406,37375,37396,37420,37397,37393,37470,37463,37445,37449,37476,37448,37525,37439,37451,37456,37532,37526,37523,37531,37466,37583,37561,37559,37609,37647,37626,37700,37678,37657,37666,37658,37667,37690,37685,37691,37724,37728,37756,37742,37718,37808,37804,37805,37780,37817,37846,37847,37864,37861,37848,37827,37853,37840,37832,37860,37914,37908,37907,37891,37895,37904,37942,37931,37941,37921,37946,37953,37970,37956,37979,37984,37986,37982,37994,37417,38000,38005,38007,38013,37978,38012,38014,38017,38015,38274,38279,38282,38292,38294,38296,38297,38304,38312,38311,38317,38332,38331,38329,38334,38346,28662,38339,38349,38348,38357,38356,38358,38364,38369,38373,38370,38433,38440,38446,38447,38466,38476,38479,38475,38519,38492,38494,38493,38495,38502,38514,38508,38541,38552,38549,38551,38570,38567,38577,38578,38576,38580,38582,38584,38585,38606,38603,38601,38605,35149,38620,38669,38613,38649,38660,38662,38664,38675,38670,38673,38671,38678,38681,38692,38698,38704,38713,38717,38718,38724,38726,38728,38722,38729,38748,38752,38756,38758,38760,21202,38763,38769,38777,38789,38780,38785,38778,38790,38795,38799,38800,38812,38824,38822,38819,38835,38836,38851,38854,38856,38859,38876,38893,40783,38898,31455,38902,38901,38927,38924,38968,38948,38945,38967,38973,38982,38991,38987,39019,39023,39024,39025,39028,39027,39082,39087,39089,39094,39108,39107,39110,39145,39147,39171,39177,39186,39188,39192,39201,39197,39198,39204,39200,39212,39214,39229,39230,39234,39241,39237,39248,39243,39249,39250,39244,39253,39319,39320,39333,39341,39342,39356,39391,39387,39389,39384,39377,39405,39406,39409,39410,39419,39416,39425,39439,39429,39394,39449,39467,39479,39493,39490,39488,39491,39486,39509,39501,39515,39511,39519,39522,39525,39524,39529,39531,39530,39597,39600,39612,39616,39631,39633,39635,39636,39646,39647,39650,39651,39654,39663,39659,39662,39668,39665,39671,39675,39686,39704,39706,39711,39714,39715,39717,39719,39720,39721,39722,39726,39727,39730,39748,39747,39759,39757,39758,39761,39768,39796,39827,39811,39825,39830,39831,39839,39840,39848,39860,39872,39882,39865,39878,39887,39889,39890,39907,39906,39908,39892,39905,39994,39922,39921,39920,39957,39956,39945,39955,39948,39942,39944,39954,39946,39940,39982,39963,39973,39972,39969,39984,40007,39986,40006,39998,40026,40032,40039,40054,40056,40167,40172,40176,40201,40200,40171,40195,40198,40234,40230,40367,40227,40223,40260,40213,40210,40257,40255,40254,40262,40264,40285,40286,40292,40273,40272,40281,40306,40329,40327,40363,40303,40314,40346,40356,40361,40370,40388,40385,40379,40376,40378,40390,40399,40386,40409,40403,40440,40422,40429,40431,40445,40474,40475,40478,40565,40569,40573,40577,40584,40587,40588,40594,40597,40593,40605,40613,40617,40632,40618,40621,38753,40652,40654,40655,40656,40660,40668,40670,40669,40672,40677,40680,40687,40692,40694,40695,40697,40699,40700,40701,40711,40712,30391,40725,40737,40748,40766,40778,40786,40788,40803,40799,40800,40801,40806,40807,40812,40810,40823,40818,40822,40853,40860,40864,22575,27079,36953,29796,20956,29081,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,65506,65508,65287,65282,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,65506,65508,65287,65282,12849,8470,8481,8757,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "jis0212":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,728,711,184,729,733,175,731,730,65374,900,901,null,null,null,null,null,null,null,null,161,166,191,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,186,170,169,174,8482,164,8470,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,902,904,905,906,938,null,908,null,910,939,null,911,null,null,null,null,940,941,942,943,970,912,972,962,973,971,944,974,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1038,1039,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1118,1119,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,198,272,null,294,null,306,null,321,319,null,330,216,338,null,358,222,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,230,273,240,295,305,307,312,322,320,329,331,248,339,223,359,254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,193,192,196,194,258,461,256,260,197,195,262,264,268,199,266,270,201,200,203,202,282,278,274,280,null,284,286,290,288,292,205,204,207,206,463,304,298,302,296,308,310,313,317,315,323,327,325,209,211,210,214,212,465,336,332,213,340,344,342,346,348,352,350,356,354,218,217,220,219,364,467,368,362,370,366,360,471,475,473,469,372,221,376,374,377,381,379,null,null,null,null,null,null,null,225,224,228,226,259,462,257,261,229,227,263,265,269,231,267,271,233,232,235,234,283,279,275,281,501,285,287,null,289,293,237,236,239,238,464,null,299,303,297,309,311,314,318,316,324,328,326,241,243,242,246,244,466,337,333,245,341,345,343,347,349,353,351,357,355,250,249,252,251,365,468,369,363,371,367,361,472,476,474,470,373,253,255,375,378,382,380,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19970,19972,19973,19980,19986,19999,20003,20004,20008,20011,20014,20015,20016,20021,20032,20033,20036,20039,20049,20058,20060,20067,20072,20073,20084,20085,20089,20095,20109,20118,20119,20125,20143,20153,20163,20176,20186,20187,20192,20193,20194,20200,20207,20209,20211,20213,20221,20222,20223,20224,20226,20227,20232,20235,20236,20242,20245,20246,20247,20249,20270,20273,20320,20275,20277,20279,20281,20283,20286,20288,20290,20296,20297,20299,20300,20306,20308,20310,20312,20319,20323,20330,20332,20334,20337,20343,20344,20345,20346,20349,20350,20353,20354,20356,20357,20361,20362,20364,20366,20368,20370,20371,20372,20375,20377,20378,20382,20383,20402,20407,20409,20411,20412,20413,20414,20416,20417,20421,20422,20424,20425,20427,20428,20429,20431,20434,20444,20448,20450,20464,20466,20476,20477,20479,20480,20481,20484,20487,20490,20492,20494,20496,20499,20503,20504,20507,20508,20509,20510,20514,20519,20526,20528,20530,20531,20533,20544,20545,20546,20549,20550,20554,20556,20558,20561,20562,20563,20567,20569,20575,20576,20578,20579,20582,20583,20586,20589,20592,20593,20539,20609,20611,20612,20614,20618,20622,20623,20624,20626,20627,20628,20630,20635,20636,20638,20639,20640,20641,20642,20650,20655,20656,20665,20666,20669,20672,20675,20676,20679,20684,20686,20688,20691,20692,20696,20700,20701,20703,20706,20708,20710,20712,20713,20719,20721,20726,20730,20734,20739,20742,20743,20744,20747,20748,20749,20750,20722,20752,20759,20761,20763,20764,20765,20766,20771,20775,20776,20780,20781,20783,20785,20787,20788,20789,20792,20793,20802,20810,20815,20819,20821,20823,20824,20831,20836,20838,20862,20867,20868,20875,20878,20888,20893,20897,20899,20909,20920,20922,20924,20926,20927,20930,20936,20943,20945,20946,20947,20949,20952,20958,20962,20965,20974,20978,20979,20980,20983,20993,20994,20997,21010,21011,21013,21014,21016,21026,21032,21041,21042,21045,21052,21061,21065,21077,21079,21080,21082,21084,21087,21088,21089,21094,21102,21111,21112,21113,21120,21122,21125,21130,21132,21139,21141,21142,21143,21144,21146,21148,21156,21157,21158,21159,21167,21168,21174,21175,21176,21178,21179,21181,21184,21188,21190,21192,21196,21199,21201,21204,21206,21211,21212,21217,21221,21224,21225,21226,21228,21232,21233,21236,21238,21239,21248,21251,21258,21259,21260,21265,21267,21272,21275,21276,21278,21279,21285,21287,21288,21289,21291,21292,21293,21296,21298,21301,21308,21309,21310,21314,21324,21323,21337,21339,21345,21347,21349,21356,21357,21362,21369,21374,21379,21383,21384,21390,21395,21396,21401,21405,21409,21412,21418,21419,21423,21426,21428,21429,21431,21432,21434,21437,21440,21445,21455,21458,21459,21461,21466,21469,21470,21472,21478,21479,21493,21506,21523,21530,21537,21543,21544,21546,21551,21553,21556,21557,21571,21572,21575,21581,21583,21598,21602,21604,21606,21607,21609,21611,21613,21614,21620,21631,21633,21635,21637,21640,21641,21645,21649,21653,21654,21660,21663,21665,21670,21671,21673,21674,21677,21678,21681,21687,21689,21690,21691,21695,21702,21706,21709,21710,21728,21738,21740,21743,21750,21756,21758,21759,21760,21761,21765,21768,21769,21772,21773,21774,21781,21802,21803,21810,21813,21814,21819,21820,21821,21825,21831,21833,21834,21837,21840,21841,21848,21850,21851,21854,21856,21857,21860,21862,21887,21889,21890,21894,21896,21902,21903,21905,21906,21907,21908,21911,21923,21924,21933,21938,21951,21953,21955,21958,21961,21963,21964,21966,21969,21970,21971,21975,21976,21979,21982,21986,21993,22006,22015,22021,22024,22026,22029,22030,22031,22032,22033,22034,22041,22060,22064,22067,22069,22071,22073,22075,22076,22077,22079,22080,22081,22083,22084,22086,22089,22091,22093,22095,22100,22110,22112,22113,22114,22115,22118,22121,22125,22127,22129,22130,22133,22148,22149,22152,22155,22156,22165,22169,22170,22173,22174,22175,22182,22183,22184,22185,22187,22188,22189,22193,22195,22199,22206,22213,22217,22218,22219,22223,22224,22220,22221,22233,22236,22237,22239,22241,22244,22245,22246,22247,22248,22257,22251,22253,22262,22263,22273,22274,22279,22282,22284,22289,22293,22298,22299,22301,22304,22306,22307,22308,22309,22313,22314,22316,22318,22319,22323,22324,22333,22334,22335,22341,22342,22348,22349,22354,22370,22373,22375,22376,22379,22381,22382,22383,22384,22385,22387,22388,22389,22391,22393,22394,22395,22396,22398,22401,22403,22412,22420,22423,22425,22426,22428,22429,22430,22431,22433,22421,22439,22440,22441,22444,22456,22461,22471,22472,22476,22479,22485,22493,22494,22500,22502,22503,22505,22509,22512,22517,22518,22520,22525,22526,22527,22531,22532,22536,22537,22497,22540,22541,22555,22558,22559,22560,22566,22567,22573,22578,22585,22591,22601,22604,22605,22607,22608,22613,22623,22625,22628,22631,22632,22648,22652,22655,22656,22657,22663,22664,22665,22666,22668,22669,22671,22672,22676,22678,22685,22688,22689,22690,22694,22697,22705,22706,22724,22716,22722,22728,22733,22734,22736,22738,22740,22742,22746,22749,22753,22754,22761,22771,22789,22790,22795,22796,22802,22803,22804,34369,22813,22817,22819,22820,22824,22831,22832,22835,22837,22838,22847,22851,22854,22866,22867,22873,22875,22877,22878,22879,22881,22883,22891,22893,22895,22898,22901,22902,22905,22907,22908,22923,22924,22926,22930,22933,22935,22943,22948,22951,22957,22958,22959,22960,22963,22967,22970,22972,22977,22979,22980,22984,22986,22989,22994,23005,23006,23007,23011,23012,23015,23022,23023,23025,23026,23028,23031,23040,23044,23052,23053,23054,23058,23059,23070,23075,23076,23079,23080,23082,23085,23088,23108,23109,23111,23112,23116,23120,23125,23134,23139,23141,23143,23149,23159,23162,23163,23166,23179,23184,23187,23190,23193,23196,23198,23199,23200,23202,23207,23212,23217,23218,23219,23221,23224,23226,23227,23231,23236,23238,23240,23247,23258,23260,23264,23269,23274,23278,23285,23286,23293,23296,23297,23304,23319,23348,23321,23323,23325,23329,23333,23341,23352,23361,23371,23372,23378,23382,23390,23400,23406,23407,23420,23421,23422,23423,23425,23428,23430,23434,23438,23440,23441,23443,23444,23446,23464,23465,23468,23469,23471,23473,23474,23479,23482,23484,23488,23489,23501,23503,23510,23511,23512,23513,23514,23520,23535,23537,23540,23549,23564,23575,23582,23583,23587,23590,23593,23595,23596,23598,23600,23602,23605,23606,23641,23642,23644,23650,23651,23655,23656,23657,23661,23664,23668,23669,23674,23675,23676,23677,23687,23688,23690,23695,23698,23709,23711,23712,23714,23715,23718,23722,23730,23732,23733,23738,23753,23755,23762,23773,23767,23790,23793,23794,23796,23809,23814,23821,23826,23851,23843,23844,23846,23847,23857,23860,23865,23869,23871,23874,23875,23878,23880,23893,23889,23897,23882,23903,23904,23905,23906,23908,23914,23917,23920,23929,23930,23934,23935,23937,23939,23944,23946,23954,23955,23956,23957,23961,23963,23967,23968,23975,23979,23984,23988,23992,23993,24003,24007,24011,24016,24014,24024,24025,24032,24036,24041,24056,24057,24064,24071,24077,24082,24084,24085,24088,24095,24096,24110,24104,24114,24117,24126,24139,24144,24137,24145,24150,24152,24155,24156,24158,24168,24170,24171,24172,24173,24174,24176,24192,24203,24206,24226,24228,24229,24232,24234,24236,24241,24243,24253,24254,24255,24262,24268,24267,24270,24273,24274,24276,24277,24284,24286,24293,24299,24322,24326,24327,24328,24334,24345,24348,24349,24353,24354,24355,24356,24360,24363,24364,24366,24368,24372,24374,24379,24381,24383,24384,24388,24389,24391,24397,24400,24404,24408,24411,24416,24419,24420,24423,24431,24434,24436,24437,24440,24442,24445,24446,24457,24461,24463,24470,24476,24477,24482,24487,24491,24484,24492,24495,24496,24497,24504,24516,24519,24520,24521,24523,24528,24529,24530,24531,24532,24542,24545,24546,24552,24553,24554,24556,24557,24558,24559,24562,24563,24566,24570,24572,24583,24586,24589,24595,24596,24599,24600,24602,24607,24612,24621,24627,24629,24640,24647,24648,24649,24652,24657,24660,24662,24663,24669,24673,24679,24689,24702,24703,24706,24710,24712,24714,24718,24721,24723,24725,24728,24733,24734,24738,24740,24741,24744,24752,24753,24759,24763,24766,24770,24772,24776,24777,24778,24779,24782,24783,24788,24789,24793,24795,24797,24798,24802,24805,24818,24821,24824,24828,24829,24834,24839,24842,24844,24848,24849,24850,24851,24852,24854,24855,24857,24860,24862,24866,24874,24875,24880,24881,24885,24886,24887,24889,24897,24901,24902,24905,24926,24928,24940,24946,24952,24955,24956,24959,24960,24961,24963,24964,24971,24973,24978,24979,24983,24984,24988,24989,24991,24992,24997,25000,25002,25005,25016,25017,25020,25024,25025,25026,25038,25039,25045,25052,25053,25054,25055,25057,25058,25063,25065,25061,25068,25069,25071,25089,25091,25092,25095,25107,25109,25116,25120,25122,25123,25127,25129,25131,25145,25149,25154,25155,25156,25158,25164,25168,25169,25170,25172,25174,25178,25180,25188,25197,25199,25203,25210,25213,25229,25230,25231,25232,25254,25256,25267,25270,25271,25274,25278,25279,25284,25294,25301,25302,25306,25322,25330,25332,25340,25341,25347,25348,25354,25355,25357,25360,25363,25366,25368,25385,25386,25389,25397,25398,25401,25404,25409,25410,25411,25412,25414,25418,25419,25422,25426,25427,25428,25432,25435,25445,25446,25452,25453,25457,25460,25461,25464,25468,25469,25471,25474,25476,25479,25482,25488,25492,25493,25497,25498,25502,25508,25510,25517,25518,25519,25533,25537,25541,25544,25550,25553,25555,25556,25557,25564,25568,25573,25578,25580,25586,25587,25589,25592,25593,25609,25610,25616,25618,25620,25624,25630,25632,25634,25636,25637,25641,25642,25647,25648,25653,25661,25663,25675,25679,25681,25682,25683,25684,25690,25691,25692,25693,25695,25696,25697,25699,25709,25715,25716,25723,25725,25733,25735,25743,25744,25745,25752,25753,25755,25757,25759,25761,25763,25766,25768,25772,25779,25789,25790,25791,25796,25801,25802,25803,25804,25806,25808,25809,25813,25815,25828,25829,25833,25834,25837,25840,25845,25847,25851,25855,25857,25860,25864,25865,25866,25871,25875,25876,25878,25881,25883,25886,25887,25890,25894,25897,25902,25905,25914,25916,25917,25923,25927,25929,25936,25938,25940,25951,25952,25959,25963,25978,25981,25985,25989,25994,26002,26005,26008,26013,26016,26019,26022,26030,26034,26035,26036,26047,26050,26056,26057,26062,26064,26068,26070,26072,26079,26096,26098,26100,26101,26105,26110,26111,26112,26116,26120,26121,26125,26129,26130,26133,26134,26141,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26161,26163,26169,26167,26176,26181,26182,26186,26188,26193,26190,26199,26200,26201,26203,26204,26208,26209,26363,26218,26219,26220,26238,26227,26229,26239,26231,26232,26233,26235,26240,26236,26251,26252,26253,26256,26258,26265,26266,26267,26268,26271,26272,26276,26285,26289,26290,26293,26299,26303,26304,26306,26307,26312,26316,26318,26319,26324,26331,26335,26344,26347,26348,26350,26362,26373,26375,26382,26387,26393,26396,26400,26402,26419,26430,26437,26439,26440,26444,26452,26453,26461,26470,26476,26478,26484,26486,26491,26497,26500,26510,26511,26513,26515,26518,26520,26521,26523,26544,26545,26546,26549,26555,26556,26557,26617,26560,26562,26563,26565,26568,26569,26578,26583,26585,26588,26593,26598,26608,26610,26614,26615,26706,26644,26649,26653,26655,26664,26663,26668,26669,26671,26672,26673,26675,26683,26687,26692,26693,26698,26700,26709,26711,26712,26715,26731,26734,26735,26736,26737,26738,26741,26745,26746,26747,26748,26754,26756,26758,26760,26774,26776,26778,26780,26785,26787,26789,26793,26794,26798,26802,26811,26821,26824,26828,26831,26832,26833,26835,26838,26841,26844,26845,26853,26856,26858,26859,26860,26861,26864,26865,26869,26870,26875,26876,26877,26886,26889,26890,26896,26897,26899,26902,26903,26929,26931,26933,26936,26939,26946,26949,26953,26958,26967,26971,26979,26980,26981,26982,26984,26985,26988,26992,26993,26994,27002,27003,27007,27008,27021,27026,27030,27032,27041,27045,27046,27048,27051,27053,27055,27063,27064,27066,27068,27077,27080,27089,27094,27095,27106,27109,27118,27119,27121,27123,27125,27134,27136,27137,27139,27151,27153,27157,27162,27165,27168,27172,27176,27184,27186,27188,27191,27195,27198,27199,27205,27206,27209,27210,27214,27216,27217,27218,27221,27222,27227,27236,27239,27242,27249,27251,27262,27265,27267,27270,27271,27273,27275,27281,27291,27293,27294,27295,27301,27307,27311,27312,27313,27316,27325,27326,27327,27334,27337,27336,27340,27344,27348,27349,27350,27356,27357,27364,27367,27372,27376,27377,27378,27388,27389,27394,27395,27398,27399,27401,27407,27408,27409,27415,27419,27422,27428,27432,27435,27436,27439,27445,27446,27451,27455,27462,27466,27469,27474,27478,27480,27485,27488,27495,27499,27502,27504,27509,27517,27518,27522,27525,27543,27547,27551,27552,27554,27555,27560,27561,27564,27565,27566,27568,27576,27577,27581,27582,27587,27588,27593,27596,27606,27610,27617,27619,27622,27623,27630,27633,27639,27641,27647,27650,27652,27653,27657,27661,27662,27664,27666,27673,27679,27686,27687,27688,27692,27694,27699,27701,27702,27706,27707,27711,27722,27723,27725,27727,27730,27732,27737,27739,27740,27755,27757,27759,27764,27766,27768,27769,27771,27781,27782,27783,27785,27796,27797,27799,27800,27804,27807,27824,27826,27828,27842,27846,27853,27855,27856,27857,27858,27860,27862,27866,27868,27872,27879,27881,27883,27884,27886,27890,27892,27908,27911,27914,27918,27919,27921,27923,27930,27942,27943,27944,27751,27950,27951,27953,27961,27964,27967,27991,27998,27999,28001,28005,28007,28015,28016,28028,28034,28039,28049,28050,28052,28054,28055,28056,28074,28076,28084,28087,28089,28093,28095,28100,28104,28106,28110,28111,28118,28123,28125,28127,28128,28130,28133,28137,28143,28144,28148,28150,28156,28160,28164,28190,28194,28199,28210,28214,28217,28219,28220,28228,28229,28232,28233,28235,28239,28241,28242,28243,28244,28247,28252,28253,28254,28258,28259,28264,28275,28283,28285,28301,28307,28313,28320,28327,28333,28334,28337,28339,28347,28351,28352,28353,28355,28359,28360,28362,28365,28366,28367,28395,28397,28398,28409,28411,28413,28420,28424,28426,28428,28429,28438,28440,28442,28443,28454,28457,28458,28463,28464,28467,28470,28475,28476,28461,28495,28497,28498,28499,28503,28505,28506,28509,28510,28513,28514,28520,28524,28541,28542,28547,28551,28552,28555,28556,28557,28560,28562,28563,28564,28566,28570,28575,28576,28581,28582,28583,28584,28590,28591,28592,28597,28598,28604,28613,28615,28616,28618,28634,28638,28648,28649,28656,28661,28665,28668,28669,28672,28677,28678,28679,28685,28695,28704,28707,28719,28724,28727,28729,28732,28739,28740,28744,28745,28746,28747,28756,28757,28765,28766,28750,28772,28773,28780,28782,28789,28790,28798,28801,28805,28806,28820,28821,28822,28823,28824,28827,28836,28843,28848,28849,28852,28855,28874,28881,28883,28884,28885,28886,28888,28892,28900,28922,28931,28932,28933,28934,28935,28939,28940,28943,28958,28960,28971,28973,28975,28976,28977,28984,28993,28997,28998,28999,29002,29003,29008,29010,29015,29018,29020,29022,29024,29032,29049,29056,29061,29063,29068,29074,29082,29083,29088,29090,29103,29104,29106,29107,29114,29119,29120,29121,29124,29131,29132,29139,29142,29145,29146,29148,29176,29182,29184,29191,29192,29193,29203,29207,29210,29213,29215,29220,29227,29231,29236,29240,29241,29249,29250,29251,29253,29262,29263,29264,29267,29269,29270,29274,29276,29278,29280,29283,29288,29291,29294,29295,29297,29303,29304,29307,29308,29311,29316,29321,29325,29326,29331,29339,29352,29357,29358,29361,29364,29374,29377,29383,29385,29388,29397,29398,29400,29407,29413,29427,29428,29434,29435,29438,29442,29444,29445,29447,29451,29453,29458,29459,29464,29465,29470,29474,29476,29479,29480,29484,29489,29490,29493,29498,29499,29501,29507,29517,29520,29522,29526,29528,29533,29534,29535,29536,29542,29543,29545,29547,29548,29550,29551,29553,29559,29561,29564,29568,29569,29571,29573,29574,29582,29584,29587,29589,29591,29592,29596,29598,29599,29600,29602,29605,29606,29610,29611,29613,29621,29623,29625,29628,29629,29631,29637,29638,29641,29643,29644,29647,29650,29651,29654,29657,29661,29665,29667,29670,29671,29673,29684,29685,29687,29689,29690,29691,29693,29695,29696,29697,29700,29703,29706,29713,29722,29723,29732,29734,29736,29737,29738,29739,29740,29741,29742,29743,29744,29745,29753,29760,29763,29764,29766,29767,29771,29773,29777,29778,29783,29789,29794,29798,29799,29800,29803,29805,29806,29809,29810,29824,29825,29829,29830,29831,29833,29839,29840,29841,29842,29848,29849,29850,29852,29855,29856,29857,29859,29862,29864,29865,29866,29867,29870,29871,29873,29874,29877,29881,29883,29887,29896,29897,29900,29904,29907,29912,29914,29915,29918,29919,29924,29928,29930,29931,29935,29940,29946,29947,29948,29951,29958,29970,29974,29975,29984,29985,29988,29991,29993,29994,29999,30006,30009,30013,30014,30015,30016,30019,30023,30024,30030,30032,30034,30039,30046,30047,30049,30063,30065,30073,30074,30075,30076,30077,30078,30081,30085,30096,30098,30099,30101,30105,30108,30114,30116,30132,30138,30143,30144,30145,30148,30150,30156,30158,30159,30167,30172,30175,30176,30177,30180,30183,30188,30190,30191,30193,30201,30208,30210,30211,30212,30215,30216,30218,30220,30223,30226,30227,30229,30230,30233,30235,30236,30237,30238,30243,30245,30246,30249,30253,30258,30259,30261,30264,30265,30266,30268,30282,30272,30273,30275,30276,30277,30281,30283,30293,30297,30303,30308,30309,30317,30318,30319,30321,30324,30337,30341,30348,30349,30357,30363,30364,30365,30367,30368,30370,30371,30372,30373,30374,30375,30376,30378,30381,30397,30401,30405,30409,30411,30412,30414,30420,30425,30432,30438,30440,30444,30448,30449,30454,30457,30460,30464,30470,30474,30478,30482,30484,30485,30487,30489,30490,30492,30498,30504,30509,30510,30511,30516,30517,30518,30521,30525,30526,30530,30533,30534,30538,30541,30542,30543,30546,30550,30551,30556,30558,30559,30560,30562,30564,30567,30570,30572,30576,30578,30579,30580,30586,30589,30592,30596,30604,30605,30612,30613,30614,30618,30623,30626,30631,30634,30638,30639,30641,30645,30654,30659,30665,30673,30674,30677,30681,30686,30687,30688,30692,30694,30698,30700,30704,30705,30708,30712,30715,30725,30726,30729,30733,30734,30737,30749,30753,30754,30755,30765,30766,30768,30773,30775,30787,30788,30791,30792,30796,30798,30802,30812,30814,30816,30817,30819,30820,30824,30826,30830,30842,30846,30858,30863,30868,30872,30881,30877,30878,30879,30884,30888,30892,30893,30896,30897,30898,30899,30907,30909,30911,30919,30920,30921,30924,30926,30930,30931,30933,30934,30948,30939,30943,30944,30945,30950,30954,30962,30963,30976,30966,30967,30970,30971,30975,30982,30988,30992,31002,31004,31006,31007,31008,31013,31015,31017,31021,31025,31028,31029,31035,31037,31039,31044,31045,31046,31050,31051,31055,31057,31060,31064,31067,31068,31079,31081,31083,31090,31097,31099,31100,31102,31115,31116,31121,31123,31124,31125,31126,31128,31131,31132,31137,31144,31145,31147,31151,31153,31156,31160,31163,31170,31172,31175,31176,31178,31183,31188,31190,31194,31197,31198,31200,31202,31205,31210,31211,31213,31217,31224,31228,31234,31235,31239,31241,31242,31244,31249,31253,31259,31262,31265,31271,31275,31277,31279,31280,31284,31285,31288,31289,31290,31300,31301,31303,31304,31308,31317,31318,31321,31324,31325,31327,31328,31333,31335,31338,31341,31349,31352,31358,31360,31362,31365,31366,31370,31371,31376,31377,31380,31390,31392,31395,31404,31411,31413,31417,31419,31420,31430,31433,31436,31438,31441,31451,31464,31465,31467,31468,31473,31476,31483,31485,31486,31495,31508,31519,31523,31527,31529,31530,31531,31533,31534,31535,31536,31537,31540,31549,31551,31552,31553,31559,31566,31573,31584,31588,31590,31593,31594,31597,31599,31602,31603,31607,31620,31625,31630,31632,31633,31638,31643,31646,31648,31653,31660,31663,31664,31666,31669,31670,31674,31675,31676,31677,31682,31685,31688,31690,31700,31702,31703,31705,31706,31707,31720,31722,31730,31732,31733,31736,31737,31738,31740,31742,31745,31746,31747,31748,31750,31753,31755,31756,31758,31759,31769,31771,31776,31781,31782,31784,31788,31793,31795,31796,31798,31801,31802,31814,31818,31829,31825,31826,31827,31833,31834,31835,31836,31837,31838,31841,31843,31847,31849,31853,31854,31856,31858,31865,31868,31869,31878,31879,31887,31892,31902,31904,31910,31920,31926,31927,31930,31931,31932,31935,31940,31943,31944,31945,31949,31951,31955,31956,31957,31959,31961,31962,31965,31974,31977,31979,31989,32003,32007,32008,32009,32015,32017,32018,32019,32022,32029,32030,32035,32038,32042,32045,32049,32060,32061,32062,32064,32065,32071,32072,32077,32081,32083,32087,32089,32090,32092,32093,32101,32103,32106,32112,32120,32122,32123,32127,32129,32130,32131,32133,32134,32136,32139,32140,32141,32145,32150,32151,32157,32158,32166,32167,32170,32179,32182,32183,32185,32194,32195,32196,32197,32198,32204,32205,32206,32215,32217,32256,32226,32229,32230,32234,32235,32237,32241,32245,32246,32249,32250,32264,32272,32273,32277,32279,32284,32285,32288,32295,32296,32300,32301,32303,32307,32310,32319,32324,32325,32327,32334,32336,32338,32344,32351,32353,32354,32357,32363,32366,32367,32371,32376,32382,32385,32390,32391,32394,32397,32401,32405,32408,32410,32413,32414,32572,32571,32573,32574,32575,32579,32580,32583,32591,32594,32595,32603,32604,32605,32609,32611,32612,32613,32614,32621,32625,32637,32638,32639,32640,32651,32653,32655,32656,32657,32662,32663,32668,32673,32674,32678,32682,32685,32692,32700,32703,32704,32707,32712,32718,32719,32731,32735,32739,32741,32744,32748,32750,32751,32754,32762,32765,32766,32767,32775,32776,32778,32781,32782,32783,32785,32787,32788,32790,32797,32798,32799,32800,32804,32806,32812,32814,32816,32820,32821,32823,32825,32826,32828,32830,32832,32836,32864,32868,32870,32877,32881,32885,32897,32904,32910,32924,32926,32934,32935,32939,32952,32953,32968,32973,32975,32978,32980,32981,32983,32984,32992,33005,33006,33008,33010,33011,33014,33017,33018,33022,33027,33035,33046,33047,33048,33052,33054,33056,33060,33063,33068,33072,33077,33082,33084,33093,33095,33098,33100,33106,33111,33120,33121,33127,33128,33129,33133,33135,33143,33153,33168,33156,33157,33158,33163,33166,33174,33176,33179,33182,33186,33198,33202,33204,33211,33227,33219,33221,33226,33230,33231,33237,33239,33243,33245,33246,33249,33252,33259,33260,33264,33265,33266,33269,33270,33272,33273,33277,33279,33280,33283,33295,33299,33300,33305,33306,33309,33313,33314,33320,33330,33332,33338,33347,33348,33349,33350,33355,33358,33359,33361,33366,33372,33376,33379,33383,33389,33396,33403,33405,33407,33408,33409,33411,33412,33415,33417,33418,33422,33425,33428,33430,33432,33434,33435,33440,33441,33443,33444,33447,33448,33449,33450,33454,33456,33458,33460,33463,33466,33468,33470,33471,33478,33488,33493,33498,33504,33506,33508,33512,33514,33517,33519,33526,33527,33533,33534,33536,33537,33543,33544,33546,33547,33620,33563,33565,33566,33567,33569,33570,33580,33581,33582,33584,33587,33591,33594,33596,33597,33602,33603,33604,33607,33613,33614,33617,33621,33622,33623,33648,33656,33661,33663,33664,33666,33668,33670,33677,33682,33684,33685,33688,33689,33691,33692,33693,33702,33703,33705,33708,33726,33727,33728,33735,33737,33743,33744,33745,33748,33757,33619,33768,33770,33782,33784,33785,33788,33793,33798,33802,33807,33809,33813,33817,33709,33839,33849,33861,33863,33864,33866,33869,33871,33873,33874,33878,33880,33881,33882,33884,33888,33892,33893,33895,33898,33904,33907,33908,33910,33912,33916,33917,33921,33925,33938,33939,33941,33950,33958,33960,33961,33962,33967,33969,33972,33978,33981,33982,33984,33986,33991,33992,33996,33999,34003,34012,34023,34026,34031,34032,34033,34034,34039,34098,34042,34043,34045,34050,34051,34055,34060,34062,34064,34076,34078,34082,34083,34084,34085,34087,34090,34091,34095,34099,34100,34102,34111,34118,34127,34128,34129,34130,34131,34134,34137,34140,34141,34142,34143,34144,34145,34146,34148,34155,34159,34169,34170,34171,34173,34175,34177,34181,34182,34185,34187,34188,34191,34195,34200,34205,34207,34208,34210,34213,34215,34228,34230,34231,34232,34236,34237,34238,34239,34242,34247,34250,34251,34254,34221,34264,34266,34271,34272,34278,34280,34285,34291,34294,34300,34303,34304,34308,34309,34317,34318,34320,34321,34322,34328,34329,34331,34334,34337,34343,34345,34358,34360,34362,34364,34365,34368,34370,34374,34386,34387,34390,34391,34392,34393,34397,34400,34401,34402,34403,34404,34409,34412,34415,34421,34422,34423,34426,34445,34449,34454,34456,34458,34460,34465,34470,34471,34472,34477,34481,34483,34484,34485,34487,34488,34489,34495,34496,34497,34499,34501,34513,34514,34517,34519,34522,34524,34528,34531,34533,34535,34440,34554,34556,34557,34564,34565,34567,34571,34574,34575,34576,34579,34580,34585,34590,34591,34593,34595,34600,34606,34607,34609,34610,34617,34618,34620,34621,34622,34624,34627,34629,34637,34648,34653,34657,34660,34661,34671,34673,34674,34683,34691,34692,34693,34694,34695,34696,34697,34699,34700,34704,34707,34709,34711,34712,34713,34718,34720,34723,34727,34732,34733,34734,34737,34741,34750,34751,34753,34760,34761,34762,34766,34773,34774,34777,34778,34780,34783,34786,34787,34788,34794,34795,34797,34801,34803,34808,34810,34815,34817,34819,34822,34825,34826,34827,34832,34841,34834,34835,34836,34840,34842,34843,34844,34846,34847,34856,34861,34862,34864,34866,34869,34874,34876,34881,34883,34885,34888,34889,34890,34891,34894,34897,34901,34902,34904,34906,34908,34911,34912,34916,34921,34929,34937,34939,34944,34968,34970,34971,34972,34975,34976,34984,34986,35002,35005,35006,35008,35018,35019,35020,35021,35022,35025,35026,35027,35035,35038,35047,35055,35056,35057,35061,35063,35073,35078,35085,35086,35087,35093,35094,35096,35097,35098,35100,35104,35110,35111,35112,35120,35121,35122,35125,35129,35130,35134,35136,35138,35141,35142,35145,35151,35154,35159,35162,35163,35164,35169,35170,35171,35179,35182,35184,35187,35189,35194,35195,35196,35197,35209,35213,35216,35220,35221,35227,35228,35231,35232,35237,35248,35252,35253,35254,35255,35260,35284,35285,35286,35287,35288,35301,35305,35307,35309,35313,35315,35318,35321,35325,35327,35332,35333,35335,35343,35345,35346,35348,35349,35358,35360,35362,35364,35366,35371,35372,35375,35381,35383,35389,35390,35392,35395,35397,35399,35401,35405,35406,35411,35414,35415,35416,35420,35421,35425,35429,35431,35445,35446,35447,35449,35450,35451,35454,35455,35456,35459,35462,35467,35471,35472,35474,35478,35479,35481,35487,35495,35497,35502,35503,35507,35510,35511,35515,35518,35523,35526,35528,35529,35530,35537,35539,35540,35541,35543,35549,35551,35564,35568,35572,35573,35574,35580,35583,35589,35590,35595,35601,35612,35614,35615,35594,35629,35632,35639,35644,35650,35651,35652,35653,35654,35656,35666,35667,35668,35673,35661,35678,35683,35693,35702,35704,35705,35708,35710,35713,35716,35717,35723,35725,35727,35732,35733,35740,35742,35743,35896,35897,35901,35902,35909,35911,35913,35915,35919,35921,35923,35924,35927,35928,35931,35933,35929,35939,35940,35942,35944,35945,35949,35955,35957,35958,35963,35966,35974,35975,35979,35984,35986,35987,35993,35995,35996,36004,36025,36026,36037,36038,36041,36043,36047,36054,36053,36057,36061,36065,36072,36076,36079,36080,36082,36085,36087,36088,36094,36095,36097,36099,36105,36114,36119,36123,36197,36201,36204,36206,36223,36226,36228,36232,36237,36240,36241,36245,36254,36255,36256,36262,36267,36268,36271,36274,36277,36279,36281,36283,36288,36293,36294,36295,36296,36298,36302,36305,36308,36309,36311,36313,36324,36325,36327,36332,36336,36284,36337,36338,36340,36349,36353,36356,36357,36358,36363,36369,36372,36374,36384,36385,36386,36387,36390,36391,36401,36403,36406,36407,36408,36409,36413,36416,36417,36427,36429,36430,36431,36436,36443,36444,36445,36446,36449,36450,36457,36460,36461,36463,36464,36465,36473,36474,36475,36482,36483,36489,36496,36498,36501,36506,36507,36509,36510,36514,36519,36521,36525,36526,36531,36533,36538,36539,36544,36545,36547,36548,36551,36559,36561,36564,36572,36584,36590,36592,36593,36599,36601,36602,36589,36608,36610,36615,36616,36623,36624,36630,36631,36632,36638,36640,36641,36643,36645,36647,36648,36652,36653,36654,36660,36661,36662,36663,36666,36672,36673,36675,36679,36687,36689,36690,36691,36692,36693,36696,36701,36702,36709,36765,36768,36769,36772,36773,36774,36789,36790,36792,36798,36800,36801,36806,36810,36811,36813,36816,36818,36819,36821,36832,36835,36836,36840,36846,36849,36853,36854,36859,36862,36866,36868,36872,36876,36888,36891,36904,36905,36911,36906,36908,36909,36915,36916,36919,36927,36931,36932,36940,36955,36957,36962,36966,36967,36972,36976,36980,36985,36997,37000,37003,37004,37006,37008,37013,37015,37016,37017,37019,37024,37025,37026,37029,37040,37042,37043,37044,37046,37053,37068,37054,37059,37060,37061,37063,37064,37077,37079,37080,37081,37084,37085,37087,37093,37074,37110,37099,37103,37104,37108,37118,37119,37120,37124,37125,37126,37128,37133,37136,37140,37142,37143,37144,37146,37148,37150,37152,37157,37154,37155,37159,37161,37166,37167,37169,37172,37174,37175,37177,37178,37180,37181,37187,37191,37192,37199,37203,37207,37209,37210,37211,37217,37220,37223,37229,37236,37241,37242,37243,37249,37251,37253,37254,37258,37262,37265,37267,37268,37269,37272,37278,37281,37286,37288,37292,37293,37294,37296,37297,37298,37299,37302,37307,37308,37309,37311,37314,37315,37317,37331,37332,37335,37337,37338,37342,37348,37349,37353,37354,37356,37357,37358,37359,37360,37361,37367,37369,37371,37373,37376,37377,37380,37381,37382,37383,37385,37386,37388,37392,37394,37395,37398,37400,37404,37405,37411,37412,37413,37414,37416,37422,37423,37424,37427,37429,37430,37432,37433,37434,37436,37438,37440,37442,37443,37446,37447,37450,37453,37454,37455,37457,37464,37465,37468,37469,37472,37473,37477,37479,37480,37481,37486,37487,37488,37493,37494,37495,37496,37497,37499,37500,37501,37503,37512,37513,37514,37517,37518,37522,37527,37529,37535,37536,37540,37541,37543,37544,37547,37551,37554,37558,37560,37562,37563,37564,37565,37567,37568,37569,37570,37571,37573,37574,37575,37576,37579,37580,37581,37582,37584,37587,37589,37591,37592,37593,37596,37597,37599,37600,37601,37603,37605,37607,37608,37612,37614,37616,37625,37627,37631,37632,37634,37640,37645,37649,37652,37653,37660,37661,37662,37663,37665,37668,37669,37671,37673,37674,37683,37684,37686,37687,37703,37704,37705,37712,37713,37714,37717,37719,37720,37722,37726,37732,37733,37735,37737,37738,37741,37743,37744,37745,37747,37748,37750,37754,37757,37759,37760,37761,37762,37768,37770,37771,37773,37775,37778,37781,37784,37787,37790,37793,37795,37796,37798,37800,37803,37812,37813,37814,37818,37801,37825,37828,37829,37830,37831,37833,37834,37835,37836,37837,37843,37849,37852,37854,37855,37858,37862,37863,37881,37879,37880,37882,37883,37885,37889,37890,37892,37896,37897,37901,37902,37903,37909,37910,37911,37919,37934,37935,37937,37938,37939,37940,37947,37951,37949,37955,37957,37960,37962,37964,37973,37977,37980,37983,37985,37987,37992,37995,37997,37998,37999,38001,38002,38020,38019,38264,38265,38270,38276,38280,38284,38285,38286,38301,38302,38303,38305,38310,38313,38315,38316,38324,38326,38330,38333,38335,38342,38344,38345,38347,38352,38353,38354,38355,38361,38362,38365,38366,38367,38368,38372,38374,38429,38430,38434,38436,38437,38438,38444,38449,38451,38455,38456,38457,38458,38460,38461,38465,38482,38484,38486,38487,38488,38497,38510,38516,38523,38524,38526,38527,38529,38530,38531,38532,38537,38545,38550,38554,38557,38559,38564,38565,38566,38569,38574,38575,38579,38586,38602,38610,23986,38616,38618,38621,38622,38623,38633,38639,38641,38650,38658,38659,38661,38665,38682,38683,38685,38689,38690,38691,38696,38705,38707,38721,38723,38730,38734,38735,38741,38743,38744,38746,38747,38755,38759,38762,38766,38771,38774,38775,38776,38779,38781,38783,38784,38793,38805,38806,38807,38809,38810,38814,38815,38818,38828,38830,38833,38834,38837,38838,38840,38841,38842,38844,38846,38847,38849,38852,38853,38855,38857,38858,38860,38861,38862,38864,38865,38868,38871,38872,38873,38877,38878,38880,38875,38881,38884,38895,38897,38900,38903,38904,38906,38919,38922,38937,38925,38926,38932,38934,38940,38942,38944,38947,38950,38955,38958,38959,38960,38962,38963,38965,38949,38974,38980,38983,38986,38993,38994,38995,38998,38999,39001,39002,39010,39011,39013,39014,39018,39020,39083,39085,39086,39088,39092,39095,39096,39098,39099,39103,39106,39109,39112,39116,39137,39139,39141,39142,39143,39146,39155,39158,39170,39175,39176,39185,39189,39190,39191,39194,39195,39196,39199,39202,39206,39207,39211,39217,39218,39219,39220,39221,39225,39226,39227,39228,39232,39233,39238,39239,39240,39245,39246,39252,39256,39257,39259,39260,39262,39263,39264,39323,39325,39327,39334,39344,39345,39346,39349,39353,39354,39357,39359,39363,39369,39379,39380,39385,39386,39388,39390,39399,39402,39403,39404,39408,39412,39413,39417,39421,39422,39426,39427,39428,39435,39436,39440,39441,39446,39454,39456,39458,39459,39460,39463,39469,39470,39475,39477,39478,39480,39495,39489,39492,39498,39499,39500,39502,39505,39508,39510,39517,39594,39596,39598,39599,39602,39604,39605,39606,39609,39611,39614,39615,39617,39619,39622,39624,39630,39632,39634,39637,39638,39639,39643,39644,39648,39652,39653,39655,39657,39660,39666,39667,39669,39673,39674,39677,39679,39680,39681,39682,39683,39684,39685,39688,39689,39691,39692,39693,39694,39696,39698,39702,39705,39707,39708,39712,39718,39723,39725,39731,39732,39733,39735,39737,39738,39741,39752,39755,39756,39765,39766,39767,39771,39774,39777,39779,39781,39782,39784,39786,39787,39788,39789,39790,39795,39797,39799,39800,39801,39807,39808,39812,39813,39814,39815,39817,39818,39819,39821,39823,39824,39828,39834,39837,39838,39846,39847,39849,39852,39856,39857,39858,39863,39864,39867,39868,39870,39871,39873,39879,39880,39886,39888,39895,39896,39901,39903,39909,39911,39914,39915,39919,39923,39927,39928,39929,39930,39933,39935,39936,39938,39947,39951,39953,39958,39960,39961,39962,39964,39966,39970,39971,39974,39975,39976,39977,39978,39985,39989,39990,39991,39997,40001,40003,40004,40005,40009,40010,40014,40015,40016,40019,40020,40022,40024,40027,40029,40030,40031,40035,40041,40042,40028,40043,40040,40046,40048,40050,40053,40055,40059,40166,40178,40183,40185,40203,40194,40209,40215,40216,40220,40221,40222,40239,40240,40242,40243,40244,40250,40252,40261,40253,40258,40259,40263,40266,40275,40276,40287,40291,40290,40293,40297,40298,40299,40304,40310,40311,40315,40316,40318,40323,40324,40326,40330,40333,40334,40338,40339,40341,40342,40343,40344,40353,40362,40364,40366,40369,40373,40377,40380,40383,40387,40391,40393,40394,40404,40405,40406,40407,40410,40414,40415,40416,40421,40423,40425,40427,40430,40432,40435,40436,40446,40458,40450,40455,40462,40464,40465,40466,40469,40470,40473,40476,40477,40570,40571,40572,40576,40578,40579,40580,40581,40583,40590,40591,40598,40600,40603,40606,40612,40616,40620,40622,40623,40624,40627,40628,40629,40646,40648,40651,40661,40671,40676,40679,40684,40685,40686,40688,40689,40690,40693,40696,40703,40706,40707,40713,40719,40720,40721,40722,40724,40726,40727,40729,40730,40731,40735,40738,40742,40746,40747,40751,40753,40754,40756,40759,40761,40762,40764,40765,40767,40769,40771,40772,40773,40774,40775,40787,40789,40790,40791,40792,40794,40797,40798,40808,40809,40813,40814,40815,40816,40817,40819,40821,40826,40829,40847,40848,40849,40850,40852,40854,40855,40862,40865,40866,40867,40869,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "ibm866":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],
+ "iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],
+ "iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],
+ "iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],
+ "iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],
+ "iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],
+ "iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],
+ "iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],
+ "iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],
+ "iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],
+ "iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],
+ "iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],
+ "koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],
+ "koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],
+ "macintosh":[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],
+ "windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],
+ "windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],
+ "windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],
+ "windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],
+ "windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],
+ "windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],
+ "windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],
+ "windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],
+ "windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],
+ "windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],
+ "x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]
+};
+
+// For strict environments where `this` inside the global scope
+// is `undefined`, take a pure object instead
+}(this || {}));
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/lib/encoding.js b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/lib/encoding.js
new file mode 100644
index 000000000..f01991a8e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/lib/encoding.js
@@ -0,0 +1,3301 @@
+// This is free and unencumbered software released into the public domain.
+// See LICENSE.md for more information.
+
+/**
+ * @fileoverview Global |this| required for resolving indexes in node.
+ * @suppress {globalThis}
+ */
+(function(global) {
+ 'use strict';
+
+ //
+ // Utilities
+ //
+
+ /**
+ * @param {number} a The number to test.
+ * @param {number} min The minimum value in the range, inclusive.
+ * @param {number} max The maximum value in the range, inclusive.
+ * @return {boolean} True if a >= min and a <= max.
+ */
+ function inRange(a, min, max) {
+ return min <= a && a <= max;
+ }
+
+ /**
+ * @param {!Array.<*>} array The array to check.
+ * @param {*} item The item to look for in the array.
+ * @return {boolean} True if the item appears in the array.
+ */
+ function includes(array, item) {
+ return array.indexOf(item) !== -1;
+ }
+
+ var floor = Math.floor;
+
+ /**
+ * @param {*} o
+ * @return {Object}
+ */
+ function ToDictionary(o) {
+ if (o === undefined) return {};
+ if (o === Object(o)) return o;
+ throw TypeError('Could not convert argument to dictionary');
+ }
+
+ /**
+ * @param {string} string Input string of UTF-16 code units.
+ * @return {!Array.} Code points.
+ */
+ function stringToCodePoints(string) {
+ // https://heycam.github.io/webidl/#dfn-obtain-unicode
+
+ // 1. Let S be the DOMString value.
+ var s = String(string);
+
+ // 2. Let n be the length of S.
+ var n = s.length;
+
+ // 3. Initialize i to 0.
+ var i = 0;
+
+ // 4. Initialize U to be an empty sequence of Unicode characters.
+ var u = [];
+
+ // 5. While i < n:
+ while (i < n) {
+
+ // 1. Let c be the code unit in S at index i.
+ var c = s.charCodeAt(i);
+
+ // 2. Depending on the value of c:
+
+ // c < 0xD800 or c > 0xDFFF
+ if (c < 0xD800 || c > 0xDFFF) {
+ // Append to U the Unicode character with code point c.
+ u.push(c);
+ }
+
+ // 0xDC00 ≤ c ≤ 0xDFFF
+ else if (0xDC00 <= c && c <= 0xDFFF) {
+ // Append to U a U+FFFD REPLACEMENT CHARACTER.
+ u.push(0xFFFD);
+ }
+
+ // 0xD800 ≤ c ≤ 0xDBFF
+ else if (0xD800 <= c && c <= 0xDBFF) {
+ // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT
+ // CHARACTER.
+ if (i === n - 1) {
+ u.push(0xFFFD);
+ }
+ // 2. Otherwise, i < n−1:
+ else {
+ // 1. Let d be the code unit in S at index i+1.
+ var d = s.charCodeAt(i + 1);
+
+ // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:
+ if (0xDC00 <= d && d <= 0xDFFF) {
+ // 1. Let a be c & 0x3FF.
+ var a = c & 0x3FF;
+
+ // 2. Let b be d & 0x3FF.
+ var b = d & 0x3FF;
+
+ // 3. Append to U the Unicode character with code point
+ // 2^16+2^10*a+b.
+ u.push(0x10000 + (a << 10) + b);
+
+ // 4. Set i to i+1.
+ i += 1;
+ }
+
+ // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a
+ // U+FFFD REPLACEMENT CHARACTER.
+ else {
+ u.push(0xFFFD);
+ }
+ }
+ }
+
+ // 3. Set i to i+1.
+ i += 1;
+ }
+
+ // 6. Return U.
+ return u;
+ }
+
+ /**
+ * @param {!Array.} code_points Array of code points.
+ * @return {string} string String of UTF-16 code units.
+ */
+ function codePointsToString(code_points) {
+ var s = '';
+ for (var i = 0; i < code_points.length; ++i) {
+ var cp = code_points[i];
+ if (cp <= 0xFFFF) {
+ s += String.fromCharCode(cp);
+ } else {
+ cp -= 0x10000;
+ s += String.fromCharCode((cp >> 10) + 0xD800,
+ (cp & 0x3FF) + 0xDC00);
+ }
+ }
+ return s;
+ }
+
+
+ //
+ // Implementation of Encoding specification
+ // https://encoding.spec.whatwg.org/
+ //
+
+ //
+ // 4. Terminology
+ //
+
+ /**
+ * An ASCII byte is a byte in the range 0x00 to 0x7F, inclusive.
+ * @param {number} a The number to test.
+ * @return {boolean} True if a is in the range 0x00 to 0x7F, inclusive.
+ */
+ function isASCIIByte(a) {
+ return 0x00 <= a && a <= 0x7F;
+ }
+
+ /**
+ * An ASCII code point is a code point in the range U+0000 to
+ * U+007F, inclusive.
+ */
+ var isASCIICodePoint = isASCIIByte;
+
+
+ /**
+ * End-of-stream is a special token that signifies no more tokens
+ * are in the stream.
+ * @const
+ */ var end_of_stream = -1;
+
+ /**
+ * A stream represents an ordered sequence of tokens.
+ *
+ * @constructor
+ * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide
+ * the stream.
+ */
+ function Stream(tokens) {
+ /** @type {!Array.} */
+ this.tokens = [].slice.call(tokens);
+ // Reversed as push/pop is more efficient than shift/unshift.
+ this.tokens.reverse();
+ }
+
+ Stream.prototype = {
+ /**
+ * @return {boolean} True if end-of-stream has been hit.
+ */
+ endOfStream: function() {
+ return !this.tokens.length;
+ },
+
+ /**
+ * When a token is read from a stream, the first token in the
+ * stream must be returned and subsequently removed, and
+ * end-of-stream must be returned otherwise.
+ *
+ * @return {number} Get the next token from the stream, or
+ * end_of_stream.
+ */
+ read: function() {
+ if (!this.tokens.length)
+ return end_of_stream;
+ return this.tokens.pop();
+ },
+
+ /**
+ * When one or more tokens are prepended to a stream, those tokens
+ * must be inserted, in given order, before the first token in the
+ * stream.
+ *
+ * @param {(number|!Array.)} token The token(s) to prepend to the
+ * stream.
+ */
+ prepend: function(token) {
+ if (Array.isArray(token)) {
+ var tokens = /**@type {!Array.}*/(token);
+ while (tokens.length)
+ this.tokens.push(tokens.pop());
+ } else {
+ this.tokens.push(token);
+ }
+ },
+
+ /**
+ * When one or more tokens are pushed to a stream, those tokens
+ * must be inserted, in given order, after the last token in the
+ * stream.
+ *
+ * @param {(number|!Array.)} token The tokens(s) to push to the
+ * stream.
+ */
+ push: function(token) {
+ if (Array.isArray(token)) {
+ var tokens = /**@type {!Array.}*/(token);
+ while (tokens.length)
+ this.tokens.unshift(tokens.shift());
+ } else {
+ this.tokens.unshift(token);
+ }
+ }
+ };
+
+ //
+ // 5. Encodings
+ //
+
+ // 5.1 Encoders and decoders
+
+ /** @const */
+ var finished = -1;
+
+ /**
+ * @param {boolean} fatal If true, decoding errors raise an exception.
+ * @param {number=} opt_code_point Override the standard fallback code point.
+ * @return {number} The code point to insert on a decoding error.
+ */
+ function decoderError(fatal, opt_code_point) {
+ if (fatal)
+ throw TypeError('Decoder error');
+ return opt_code_point || 0xFFFD;
+ }
+
+ /**
+ * @param {number} code_point The code point that could not be encoded.
+ * @return {number} Always throws, no value is actually returned.
+ */
+ function encoderError(code_point) {
+ throw TypeError('The code point ' + code_point + ' could not be encoded.');
+ }
+
+ /** @interface */
+ function Decoder() {}
+ Decoder.prototype = {
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point, or |finished|.
+ */
+ handler: function(stream, bite) {}
+ };
+
+ /** @interface */
+ function Encoder() {}
+ Encoder.prototype = {
+ /**
+ * @param {Stream} stream The stream of code points being encoded.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit, or |finished|.
+ */
+ handler: function(stream, code_point) {}
+ };
+
+ // 5.2 Names and labels
+
+ // TODO: Define @typedef for Encoding: {name:string,labels:Array.}
+ // https://github.com/google/closure-compiler/issues/247
+
+ /**
+ * @param {string} label The encoding label.
+ * @return {?{name:string,labels:Array.}}
+ */
+ function getEncoding(label) {
+ // 1. Remove any leading and trailing ASCII whitespace from label.
+ label = String(label).trim().toLowerCase();
+
+ // 2. If label is an ASCII case-insensitive match for any of the
+ // labels listed in the table below, return the corresponding
+ // encoding, and failure otherwise.
+ if (Object.prototype.hasOwnProperty.call(label_to_encoding, label)) {
+ return label_to_encoding[label];
+ }
+ return null;
+ }
+
+ /**
+ * Encodings table: https://encoding.spec.whatwg.org/encodings.json
+ * @const
+ * @type {!Array.<{
+ * heading: string,
+ * encodings: Array.<{name:string,labels:Array.}>
+ * }>}
+ */
+ var encodings = [
+ {
+ "encodings": [
+ {
+ "labels": [
+ "unicode-1-1-utf-8",
+ "utf-8",
+ "utf8"
+ ],
+ "name": "UTF-8"
+ }
+ ],
+ "heading": "The Encoding"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "866",
+ "cp866",
+ "csibm866",
+ "ibm866"
+ ],
+ "name": "IBM866"
+ },
+ {
+ "labels": [
+ "csisolatin2",
+ "iso-8859-2",
+ "iso-ir-101",
+ "iso8859-2",
+ "iso88592",
+ "iso_8859-2",
+ "iso_8859-2:1987",
+ "l2",
+ "latin2"
+ ],
+ "name": "ISO-8859-2"
+ },
+ {
+ "labels": [
+ "csisolatin3",
+ "iso-8859-3",
+ "iso-ir-109",
+ "iso8859-3",
+ "iso88593",
+ "iso_8859-3",
+ "iso_8859-3:1988",
+ "l3",
+ "latin3"
+ ],
+ "name": "ISO-8859-3"
+ },
+ {
+ "labels": [
+ "csisolatin4",
+ "iso-8859-4",
+ "iso-ir-110",
+ "iso8859-4",
+ "iso88594",
+ "iso_8859-4",
+ "iso_8859-4:1988",
+ "l4",
+ "latin4"
+ ],
+ "name": "ISO-8859-4"
+ },
+ {
+ "labels": [
+ "csisolatincyrillic",
+ "cyrillic",
+ "iso-8859-5",
+ "iso-ir-144",
+ "iso8859-5",
+ "iso88595",
+ "iso_8859-5",
+ "iso_8859-5:1988"
+ ],
+ "name": "ISO-8859-5"
+ },
+ {
+ "labels": [
+ "arabic",
+ "asmo-708",
+ "csiso88596e",
+ "csiso88596i",
+ "csisolatinarabic",
+ "ecma-114",
+ "iso-8859-6",
+ "iso-8859-6-e",
+ "iso-8859-6-i",
+ "iso-ir-127",
+ "iso8859-6",
+ "iso88596",
+ "iso_8859-6",
+ "iso_8859-6:1987"
+ ],
+ "name": "ISO-8859-6"
+ },
+ {
+ "labels": [
+ "csisolatingreek",
+ "ecma-118",
+ "elot_928",
+ "greek",
+ "greek8",
+ "iso-8859-7",
+ "iso-ir-126",
+ "iso8859-7",
+ "iso88597",
+ "iso_8859-7",
+ "iso_8859-7:1987",
+ "sun_eu_greek"
+ ],
+ "name": "ISO-8859-7"
+ },
+ {
+ "labels": [
+ "csiso88598e",
+ "csisolatinhebrew",
+ "hebrew",
+ "iso-8859-8",
+ "iso-8859-8-e",
+ "iso-ir-138",
+ "iso8859-8",
+ "iso88598",
+ "iso_8859-8",
+ "iso_8859-8:1988",
+ "visual"
+ ],
+ "name": "ISO-8859-8"
+ },
+ {
+ "labels": [
+ "csiso88598i",
+ "iso-8859-8-i",
+ "logical"
+ ],
+ "name": "ISO-8859-8-I"
+ },
+ {
+ "labels": [
+ "csisolatin6",
+ "iso-8859-10",
+ "iso-ir-157",
+ "iso8859-10",
+ "iso885910",
+ "l6",
+ "latin6"
+ ],
+ "name": "ISO-8859-10"
+ },
+ {
+ "labels": [
+ "iso-8859-13",
+ "iso8859-13",
+ "iso885913"
+ ],
+ "name": "ISO-8859-13"
+ },
+ {
+ "labels": [
+ "iso-8859-14",
+ "iso8859-14",
+ "iso885914"
+ ],
+ "name": "ISO-8859-14"
+ },
+ {
+ "labels": [
+ "csisolatin9",
+ "iso-8859-15",
+ "iso8859-15",
+ "iso885915",
+ "iso_8859-15",
+ "l9"
+ ],
+ "name": "ISO-8859-15"
+ },
+ {
+ "labels": [
+ "iso-8859-16"
+ ],
+ "name": "ISO-8859-16"
+ },
+ {
+ "labels": [
+ "cskoi8r",
+ "koi",
+ "koi8",
+ "koi8-r",
+ "koi8_r"
+ ],
+ "name": "KOI8-R"
+ },
+ {
+ "labels": [
+ "koi8-ru",
+ "koi8-u"
+ ],
+ "name": "KOI8-U"
+ },
+ {
+ "labels": [
+ "csmacintosh",
+ "mac",
+ "macintosh",
+ "x-mac-roman"
+ ],
+ "name": "macintosh"
+ },
+ {
+ "labels": [
+ "dos-874",
+ "iso-8859-11",
+ "iso8859-11",
+ "iso885911",
+ "tis-620",
+ "windows-874"
+ ],
+ "name": "windows-874"
+ },
+ {
+ "labels": [
+ "cp1250",
+ "windows-1250",
+ "x-cp1250"
+ ],
+ "name": "windows-1250"
+ },
+ {
+ "labels": [
+ "cp1251",
+ "windows-1251",
+ "x-cp1251"
+ ],
+ "name": "windows-1251"
+ },
+ {
+ "labels": [
+ "ansi_x3.4-1968",
+ "ascii",
+ "cp1252",
+ "cp819",
+ "csisolatin1",
+ "ibm819",
+ "iso-8859-1",
+ "iso-ir-100",
+ "iso8859-1",
+ "iso88591",
+ "iso_8859-1",
+ "iso_8859-1:1987",
+ "l1",
+ "latin1",
+ "us-ascii",
+ "windows-1252",
+ "x-cp1252"
+ ],
+ "name": "windows-1252"
+ },
+ {
+ "labels": [
+ "cp1253",
+ "windows-1253",
+ "x-cp1253"
+ ],
+ "name": "windows-1253"
+ },
+ {
+ "labels": [
+ "cp1254",
+ "csisolatin5",
+ "iso-8859-9",
+ "iso-ir-148",
+ "iso8859-9",
+ "iso88599",
+ "iso_8859-9",
+ "iso_8859-9:1989",
+ "l5",
+ "latin5",
+ "windows-1254",
+ "x-cp1254"
+ ],
+ "name": "windows-1254"
+ },
+ {
+ "labels": [
+ "cp1255",
+ "windows-1255",
+ "x-cp1255"
+ ],
+ "name": "windows-1255"
+ },
+ {
+ "labels": [
+ "cp1256",
+ "windows-1256",
+ "x-cp1256"
+ ],
+ "name": "windows-1256"
+ },
+ {
+ "labels": [
+ "cp1257",
+ "windows-1257",
+ "x-cp1257"
+ ],
+ "name": "windows-1257"
+ },
+ {
+ "labels": [
+ "cp1258",
+ "windows-1258",
+ "x-cp1258"
+ ],
+ "name": "windows-1258"
+ },
+ {
+ "labels": [
+ "x-mac-cyrillic",
+ "x-mac-ukrainian"
+ ],
+ "name": "x-mac-cyrillic"
+ }
+ ],
+ "heading": "Legacy single-byte encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "chinese",
+ "csgb2312",
+ "csiso58gb231280",
+ "gb2312",
+ "gb_2312",
+ "gb_2312-80",
+ "gbk",
+ "iso-ir-58",
+ "x-gbk"
+ ],
+ "name": "GBK"
+ },
+ {
+ "labels": [
+ "gb18030"
+ ],
+ "name": "gb18030"
+ }
+ ],
+ "heading": "Legacy multi-byte Chinese (simplified) encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "big5",
+ "big5-hkscs",
+ "cn-big5",
+ "csbig5",
+ "x-x-big5"
+ ],
+ "name": "Big5"
+ }
+ ],
+ "heading": "Legacy multi-byte Chinese (traditional) encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "cseucpkdfmtjapanese",
+ "euc-jp",
+ "x-euc-jp"
+ ],
+ "name": "EUC-JP"
+ },
+ {
+ "labels": [
+ "csiso2022jp",
+ "iso-2022-jp"
+ ],
+ "name": "ISO-2022-JP"
+ },
+ {
+ "labels": [
+ "csshiftjis",
+ "ms932",
+ "ms_kanji",
+ "shift-jis",
+ "shift_jis",
+ "sjis",
+ "windows-31j",
+ "x-sjis"
+ ],
+ "name": "Shift_JIS"
+ }
+ ],
+ "heading": "Legacy multi-byte Japanese encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "cseuckr",
+ "csksc56011987",
+ "euc-kr",
+ "iso-ir-149",
+ "korean",
+ "ks_c_5601-1987",
+ "ks_c_5601-1989",
+ "ksc5601",
+ "ksc_5601",
+ "windows-949"
+ ],
+ "name": "EUC-KR"
+ }
+ ],
+ "heading": "Legacy multi-byte Korean encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "csiso2022kr",
+ "hz-gb-2312",
+ "iso-2022-cn",
+ "iso-2022-cn-ext",
+ "iso-2022-kr"
+ ],
+ "name": "replacement"
+ },
+ {
+ "labels": [
+ "utf-16be"
+ ],
+ "name": "UTF-16BE"
+ },
+ {
+ "labels": [
+ "utf-16",
+ "utf-16le"
+ ],
+ "name": "UTF-16LE"
+ },
+ {
+ "labels": [
+ "x-user-defined"
+ ],
+ "name": "x-user-defined"
+ }
+ ],
+ "heading": "Legacy miscellaneous encodings"
+ }
+ ];
+
+ // Label to encoding registry.
+ /** @type {Object.}>} */
+ var label_to_encoding = {};
+ encodings.forEach(function(category) {
+ category.encodings.forEach(function(encoding) {
+ encoding.labels.forEach(function(label) {
+ label_to_encoding[label] = encoding;
+ });
+ });
+ });
+
+ // Registry of of encoder/decoder factories, by encoding name.
+ /** @type {Object.} */
+ var encoders = {};
+ /** @type {Object.} */
+ var decoders = {};
+
+ //
+ // 6. Indexes
+ //
+
+ /**
+ * @param {number} pointer The |pointer| to search for.
+ * @param {(!Array.|undefined)} index The |index| to search within.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in |index|.
+ */
+ function indexCodePointFor(pointer, index) {
+ if (!index) return null;
+ return index[pointer] || null;
+ }
+
+ /**
+ * @param {number} code_point The |code point| to search for.
+ * @param {!Array.} index The |index| to search within.
+ * @return {?number} The first pointer corresponding to |code point| in
+ * |index|, or null if |code point| is not in |index|.
+ */
+ function indexPointerFor(code_point, index) {
+ var pointer = index.indexOf(code_point);
+ return pointer === -1 ? null : pointer;
+ }
+
+ /**
+ * @param {string} name Name of the index.
+ * @return {(!Array.|!Array.>)}
+ * */
+ function index(name) {
+ if (!('encoding-indexes' in global)) {
+ throw Error("Indexes missing." +
+ " Did you forget to include encoding-indexes.js first?");
+ }
+ return global['encoding-indexes'][name];
+ }
+
+ /**
+ * @param {number} pointer The |pointer| to search for in the gb18030 index.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in the gb18030 index.
+ */
+ function indexGB18030RangesCodePointFor(pointer) {
+ // 1. If pointer is greater than 39419 and less than 189000, or
+ // pointer is greater than 1237575, return null.
+ if ((pointer > 39419 && pointer < 189000) || (pointer > 1237575))
+ return null;
+
+ // 2. If pointer is 7457, return code point U+E7C7.
+ if (pointer === 7457) return 0xE7C7;
+
+ // 3. Let offset be the last pointer in index gb18030 ranges that
+ // is equal to or less than pointer and let code point offset be
+ // its corresponding code point.
+ var offset = 0;
+ var code_point_offset = 0;
+ var idx = index('gb18030-ranges');
+ var i;
+ for (i = 0; i < idx.length; ++i) {
+ /** @type {!Array.} */
+ var entry = idx[i];
+ if (entry[0] <= pointer) {
+ offset = entry[0];
+ code_point_offset = entry[1];
+ } else {
+ break;
+ }
+ }
+
+ // 4. Return a code point whose value is code point offset +
+ // pointer − offset.
+ return code_point_offset + pointer - offset;
+ }
+
+ /**
+ * @param {number} code_point The |code point| to locate in the gb18030 index.
+ * @return {number} The first pointer corresponding to |code point| in the
+ * gb18030 index.
+ */
+ function indexGB18030RangesPointerFor(code_point) {
+ // 1. If code point is U+E7C7, return pointer 7457.
+ if (code_point === 0xE7C7) return 7457;
+
+ // 2. Let offset be the last code point in index gb18030 ranges
+ // that is equal to or less than code point and let pointer offset
+ // be its corresponding pointer.
+ var offset = 0;
+ var pointer_offset = 0;
+ var idx = index('gb18030-ranges');
+ var i;
+ for (i = 0; i < idx.length; ++i) {
+ /** @type {!Array.} */
+ var entry = idx[i];
+ if (entry[1] <= code_point) {
+ offset = entry[1];
+ pointer_offset = entry[0];
+ } else {
+ break;
+ }
+ }
+
+ // 3. Return a pointer whose value is pointer offset + code point
+ // − offset.
+ return pointer_offset + code_point - offset;
+ }
+
+ /**
+ * @param {number} code_point The |code_point| to search for in the Shift_JIS
+ * index.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in the Shift_JIS index.
+ */
+ function indexShiftJISPointerFor(code_point) {
+ // 1. Let index be index jis0208 excluding all entries whose
+ // pointer is in the range 8272 to 8835, inclusive.
+ shift_jis_index = shift_jis_index ||
+ index('jis0208').map(function(code_point, pointer) {
+ return inRange(pointer, 8272, 8835) ? null : code_point;
+ });
+ var index_ = shift_jis_index;
+
+ // 2. Return the index pointer for code point in index.
+ return index_.indexOf(code_point);
+ }
+ var shift_jis_index;
+
+ /**
+ * @param {number} code_point The |code_point| to search for in the big5
+ * index.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in the big5 index.
+ */
+ function indexBig5PointerFor(code_point) {
+ // 1. Let index be index Big5 excluding all entries whose pointer
+ big5_index_no_hkscs = big5_index_no_hkscs ||
+ index('big5').map(function(code_point, pointer) {
+ return (pointer < (0xA1 - 0x81) * 157) ? null : code_point;
+ });
+ var index_ = big5_index_no_hkscs;
+
+ // 2. If code point is U+2550, U+255E, U+2561, U+256A, U+5341, or
+ // U+5345, return the last pointer corresponding to code point in
+ // index.
+ if (code_point === 0x2550 || code_point === 0x255E ||
+ code_point === 0x2561 || code_point === 0x256A ||
+ code_point === 0x5341 || code_point === 0x5345) {
+ return index_.lastIndexOf(code_point);
+ }
+
+ // 3. Return the index pointer for code point in index.
+ return indexPointerFor(code_point, index_);
+ }
+ var big5_index_no_hkscs;
+
+ //
+ // 8. API
+ //
+
+ /** @const */ var DEFAULT_ENCODING = 'utf-8';
+
+ // 8.1 Interface TextDecoder
+
+ /**
+ * @constructor
+ * @param {string=} label The label of the encoding;
+ * defaults to 'utf-8'.
+ * @param {Object=} options
+ */
+ function TextDecoder(label, options) {
+ // Web IDL conventions
+ if (!(this instanceof TextDecoder))
+ throw TypeError('Called as a function. Did you forget \'new\'?');
+ label = label !== undefined ? String(label) : DEFAULT_ENCODING;
+ options = ToDictionary(options);
+
+ // A TextDecoder object has an associated encoding, decoder,
+ // stream, ignore BOM flag (initially unset), BOM seen flag
+ // (initially unset), error mode (initially replacement), and do
+ // not flush flag (initially unset).
+
+ /** @private */
+ this._encoding = null;
+ /** @private @type {?Decoder} */
+ this._decoder = null;
+ /** @private @type {boolean} */
+ this._ignoreBOM = false;
+ /** @private @type {boolean} */
+ this._BOMseen = false;
+ /** @private @type {string} */
+ this._error_mode = 'replacement';
+ /** @private @type {boolean} */
+ this._do_not_flush = false;
+
+
+ // 1. Let encoding be the result of getting an encoding from
+ // label.
+ var encoding = getEncoding(label);
+
+ // 2. If encoding is failure or replacement, throw a RangeError.
+ if (encoding === null || encoding.name === 'replacement')
+ throw RangeError('Unknown encoding: ' + label);
+ if (!decoders[encoding.name]) {
+ throw Error('Decoder not present.' +
+ ' Did you forget to include encoding-indexes.js first?');
+ }
+
+ // 3. Let dec be a new TextDecoder object.
+ var dec = this;
+
+ // 4. Set dec's encoding to encoding.
+ dec._encoding = encoding;
+
+ // 5. If options's fatal member is true, set dec's error mode to
+ // fatal.
+ if (Boolean(options['fatal']))
+ dec._error_mode = 'fatal';
+
+ // 6. If options's ignoreBOM member is true, set dec's ignore BOM
+ // flag.
+ if (Boolean(options['ignoreBOM']))
+ dec._ignoreBOM = true;
+
+ // For pre-ES5 runtimes:
+ if (!Object.defineProperty) {
+ this.encoding = dec._encoding.name.toLowerCase();
+ this.fatal = dec._error_mode === 'fatal';
+ this.ignoreBOM = dec._ignoreBOM;
+ }
+
+ // 7. Return dec.
+ return dec;
+ }
+
+ if (Object.defineProperty) {
+ // The encoding attribute's getter must return encoding's name.
+ Object.defineProperty(TextDecoder.prototype, 'encoding', {
+ /** @this {TextDecoder} */
+ get: function() { return this._encoding.name.toLowerCase(); }
+ });
+
+ // The fatal attribute's getter must return true if error mode
+ // is fatal, and false otherwise.
+ Object.defineProperty(TextDecoder.prototype, 'fatal', {
+ /** @this {TextDecoder} */
+ get: function() { return this._error_mode === 'fatal'; }
+ });
+
+ // The ignoreBOM attribute's getter must return true if ignore
+ // BOM flag is set, and false otherwise.
+ Object.defineProperty(TextDecoder.prototype, 'ignoreBOM', {
+ /** @this {TextDecoder} */
+ get: function() { return this._ignoreBOM; }
+ });
+ }
+
+ /**
+ * @param {BufferSource=} input The buffer of bytes to decode.
+ * @param {Object=} options
+ * @return {string} The decoded string.
+ */
+ TextDecoder.prototype.decode = function decode(input, options) {
+ var bytes;
+ if (typeof input === 'object' && input instanceof ArrayBuffer) {
+ bytes = new Uint8Array(input);
+ } else if (typeof input === 'object' && 'buffer' in input &&
+ input.buffer instanceof ArrayBuffer) {
+ bytes = new Uint8Array(input.buffer,
+ input.byteOffset,
+ input.byteLength);
+ } else {
+ bytes = new Uint8Array(0);
+ }
+
+ options = ToDictionary(options);
+
+ // 1. If the do not flush flag is unset, set decoder to a new
+ // encoding's decoder, set stream to a new stream, and unset the
+ // BOM seen flag.
+ if (!this._do_not_flush) {
+ this._decoder = decoders[this._encoding.name]({
+ fatal: this._error_mode === 'fatal'});
+ this._BOMseen = false;
+ }
+
+ // 2. If options's stream is true, set the do not flush flag, and
+ // unset the do not flush flag otherwise.
+ this._do_not_flush = Boolean(options['stream']);
+
+ // 3. If input is given, push a copy of input to stream.
+ // TODO: Align with spec algorithm - maintain stream on instance.
+ var input_stream = new Stream(bytes);
+
+ // 4. Let output be a new stream.
+ var output = [];
+
+ /** @type {?(number|!Array.)} */
+ var result;
+
+ // 5. While true:
+ while (true) {
+ // 1. Let token be the result of reading from stream.
+ var token = input_stream.read();
+
+ // 2. If token is end-of-stream and the do not flush flag is
+ // set, return output, serialized.
+ // TODO: Align with spec algorithm.
+ if (token === end_of_stream)
+ break;
+
+ // 3. Otherwise, run these subsubsteps:
+
+ // 1. Let result be the result of processing token for decoder,
+ // stream, output, and error mode.
+ result = this._decoder.handler(input_stream, token);
+
+ // 2. If result is finished, return output, serialized.
+ if (result === finished)
+ break;
+
+ if (result !== null) {
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ }
+
+ // 3. Otherwise, if result is error, throw a TypeError.
+ // (Thrown in handler)
+
+ // 4. Otherwise, do nothing.
+ }
+ // TODO: Align with spec algorithm.
+ if (!this._do_not_flush) {
+ do {
+ result = this._decoder.handler(input_stream, input_stream.read());
+ if (result === finished)
+ break;
+ if (result === null)
+ continue;
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ } while (!input_stream.endOfStream());
+ this._decoder = null;
+ }
+
+ // A TextDecoder object also has an associated serialize stream
+ // algorithm...
+ /**
+ * @param {!Array.} stream
+ * @return {string}
+ * @this {TextDecoder}
+ */
+ function serializeStream(stream) {
+ // 1. Let token be the result of reading from stream.
+ // (Done in-place on array, rather than as a stream)
+
+ // 2. If encoding is UTF-8, UTF-16BE, or UTF-16LE, and ignore
+ // BOM flag and BOM seen flag are unset, run these subsubsteps:
+ if (includes(['UTF-8', 'UTF-16LE', 'UTF-16BE'], this._encoding.name) &&
+ !this._ignoreBOM && !this._BOMseen) {
+ if (stream.length > 0 && stream[0] === 0xFEFF) {
+ // 1. If token is U+FEFF, set BOM seen flag.
+ this._BOMseen = true;
+ stream.shift();
+ } else if (stream.length > 0) {
+ // 2. Otherwise, if token is not end-of-stream, set BOM seen
+ // flag and append token to stream.
+ this._BOMseen = true;
+ } else {
+ // 3. Otherwise, if token is not end-of-stream, append token
+ // to output.
+ // (no-op)
+ }
+ }
+ // 4. Otherwise, return output.
+ return codePointsToString(stream);
+ }
+
+ return serializeStream.call(this, output);
+ };
+
+ // 8.2 Interface TextEncoder
+
+ /**
+ * @constructor
+ * @param {string=} label The label of the encoding. NONSTANDARD.
+ * @param {Object=} options NONSTANDARD.
+ */
+ function TextEncoder(label, options) {
+ // Web IDL conventions
+ if (!(this instanceof TextEncoder))
+ throw TypeError('Called as a function. Did you forget \'new\'?');
+ options = ToDictionary(options);
+
+ // A TextEncoder object has an associated encoding and encoder.
+
+ /** @private */
+ this._encoding = null;
+ /** @private @type {?Encoder} */
+ this._encoder = null;
+
+ // Non-standard
+ /** @private @type {boolean} */
+ this._do_not_flush = false;
+ /** @private @type {string} */
+ this._fatal = Boolean(options['fatal']) ? 'fatal' : 'replacement';
+
+ // 1. Let enc be a new TextEncoder object.
+ var enc = this;
+
+ // 2. Set enc's encoding to UTF-8's encoder.
+ if (Boolean(options['NONSTANDARD_allowLegacyEncoding'])) {
+ // NONSTANDARD behavior.
+ label = label !== undefined ? String(label) : DEFAULT_ENCODING;
+ var encoding = getEncoding(label);
+ if (encoding === null || encoding.name === 'replacement')
+ throw RangeError('Unknown encoding: ' + label);
+ if (!encoders[encoding.name]) {
+ throw Error('Encoder not present.' +
+ ' Did you forget to include encoding-indexes.js first?');
+ }
+ enc._encoding = encoding;
+ } else {
+ // Standard behavior.
+ enc._encoding = getEncoding('utf-8');
+
+ if (label !== undefined && 'console' in global) {
+ console.warn('TextEncoder constructor called with encoding label, '
+ + 'which is ignored.');
+ }
+ }
+
+ // For pre-ES5 runtimes:
+ if (!Object.defineProperty)
+ this.encoding = enc._encoding.name.toLowerCase();
+
+ // 3. Return enc.
+ return enc;
+ }
+
+ if (Object.defineProperty) {
+ // The encoding attribute's getter must return encoding's name.
+ Object.defineProperty(TextEncoder.prototype, 'encoding', {
+ /** @this {TextEncoder} */
+ get: function() { return this._encoding.name.toLowerCase(); }
+ });
+ }
+
+ /**
+ * @param {string=} opt_string The string to encode.
+ * @param {Object=} options
+ * @return {!Uint8Array} Encoded bytes, as a Uint8Array.
+ */
+ TextEncoder.prototype.encode = function encode(opt_string, options) {
+ opt_string = opt_string === undefined ? '' : String(opt_string);
+ options = ToDictionary(options);
+
+ // NOTE: This option is nonstandard. None of the encodings
+ // permitted for encoding (i.e. UTF-8, UTF-16) are stateful when
+ // the input is a USVString so streaming is not necessary.
+ if (!this._do_not_flush)
+ this._encoder = encoders[this._encoding.name]({
+ fatal: this._fatal === 'fatal'});
+ this._do_not_flush = Boolean(options['stream']);
+
+ // 1. Convert input to a stream.
+ var input = new Stream(stringToCodePoints(opt_string));
+
+ // 2. Let output be a new stream
+ var output = [];
+
+ /** @type {?(number|!Array.)} */
+ var result;
+ // 3. While true, run these substeps:
+ while (true) {
+ // 1. Let token be the result of reading from input.
+ var token = input.read();
+ if (token === end_of_stream)
+ break;
+ // 2. Let result be the result of processing token for encoder,
+ // input, output.
+ result = this._encoder.handler(input, token);
+ if (result === finished)
+ break;
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ }
+ // TODO: Align with spec algorithm.
+ if (!this._do_not_flush) {
+ while (true) {
+ result = this._encoder.handler(input, input.read());
+ if (result === finished)
+ break;
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ }
+ this._encoder = null;
+ }
+ // 3. If result is finished, convert output into a byte sequence,
+ // and then return a Uint8Array object wrapping an ArrayBuffer
+ // containing output.
+ return new Uint8Array(output);
+ };
+
+
+ //
+ // 9. The encoding
+ //
+
+ // 9.1 utf-8
+
+ // 9.1.1 utf-8 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function UTF8Decoder(options) {
+ var fatal = options.fatal;
+
+ // utf-8's decoder's has an associated utf-8 code point, utf-8
+ // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8
+ // lower boundary (initially 0x80), and a utf-8 upper boundary
+ // (initially 0xBF).
+ var /** @type {number} */ utf8_code_point = 0,
+ /** @type {number} */ utf8_bytes_seen = 0,
+ /** @type {number} */ utf8_bytes_needed = 0,
+ /** @type {number} */ utf8_lower_boundary = 0x80,
+ /** @type {number} */ utf8_upper_boundary = 0xBF;
+
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,
+ // set utf-8 bytes needed to 0 and return error.
+ if (bite === end_of_stream && utf8_bytes_needed !== 0) {
+ utf8_bytes_needed = 0;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream, return finished.
+ if (bite === end_of_stream)
+ return finished;
+
+ // 3. If utf-8 bytes needed is 0, based on byte:
+ if (utf8_bytes_needed === 0) {
+
+ // 0x00 to 0x7F
+ if (inRange(bite, 0x00, 0x7F)) {
+ // Return a code point whose value is byte.
+ return bite;
+ }
+
+ // 0xC2 to 0xDF
+ else if (inRange(bite, 0xC2, 0xDF)) {
+ // 1. Set utf-8 bytes needed to 1.
+ utf8_bytes_needed = 1;
+
+ // 2. Set UTF-8 code point to byte & 0x1F.
+ utf8_code_point = bite & 0x1F;
+ }
+
+ // 0xE0 to 0xEF
+ else if (inRange(bite, 0xE0, 0xEF)) {
+ // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.
+ if (bite === 0xE0)
+ utf8_lower_boundary = 0xA0;
+ // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.
+ if (bite === 0xED)
+ utf8_upper_boundary = 0x9F;
+ // 3. Set utf-8 bytes needed to 2.
+ utf8_bytes_needed = 2;
+ // 4. Set UTF-8 code point to byte & 0xF.
+ utf8_code_point = bite & 0xF;
+ }
+
+ // 0xF0 to 0xF4
+ else if (inRange(bite, 0xF0, 0xF4)) {
+ // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.
+ if (bite === 0xF0)
+ utf8_lower_boundary = 0x90;
+ // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.
+ if (bite === 0xF4)
+ utf8_upper_boundary = 0x8F;
+ // 3. Set utf-8 bytes needed to 3.
+ utf8_bytes_needed = 3;
+ // 4. Set UTF-8 code point to byte & 0x7.
+ utf8_code_point = bite & 0x7;
+ }
+
+ // Otherwise
+ else {
+ // Return error.
+ return decoderError(fatal);
+ }
+
+ // Return continue.
+ return null;
+ }
+
+ // 4. If byte is not in the range utf-8 lower boundary to utf-8
+ // upper boundary, inclusive, run these substeps:
+ if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {
+
+ // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8
+ // bytes seen to 0, set utf-8 lower boundary to 0x80, and set
+ // utf-8 upper boundary to 0xBF.
+ utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
+ utf8_lower_boundary = 0x80;
+ utf8_upper_boundary = 0xBF;
+
+ // 2. Prepend byte to stream.
+ stream.prepend(bite);
+
+ // 3. Return error.
+ return decoderError(fatal);
+ }
+
+ // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary
+ // to 0xBF.
+ utf8_lower_boundary = 0x80;
+ utf8_upper_boundary = 0xBF;
+
+ // 6. Set UTF-8 code point to (UTF-8 code point << 6) | (byte &
+ // 0x3F)
+ utf8_code_point = (utf8_code_point << 6) | (bite & 0x3F);
+
+ // 7. Increase utf-8 bytes seen by one.
+ utf8_bytes_seen += 1;
+
+ // 8. If utf-8 bytes seen is not equal to utf-8 bytes needed,
+ // continue.
+ if (utf8_bytes_seen !== utf8_bytes_needed)
+ return null;
+
+ // 9. Let code point be utf-8 code point.
+ var code_point = utf8_code_point;
+
+ // 10. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes
+ // seen to 0.
+ utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
+
+ // 11. Return a code point whose value is code point.
+ return code_point;
+ };
+ }
+
+ // 9.1.2 utf-8 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function UTF8Encoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Set count and offset based on the range code point is in:
+ var count, offset;
+ // U+0080 to U+07FF, inclusive:
+ if (inRange(code_point, 0x0080, 0x07FF)) {
+ // 1 and 0xC0
+ count = 1;
+ offset = 0xC0;
+ }
+ // U+0800 to U+FFFF, inclusive:
+ else if (inRange(code_point, 0x0800, 0xFFFF)) {
+ // 2 and 0xE0
+ count = 2;
+ offset = 0xE0;
+ }
+ // U+10000 to U+10FFFF, inclusive:
+ else if (inRange(code_point, 0x10000, 0x10FFFF)) {
+ // 3 and 0xF0
+ count = 3;
+ offset = 0xF0;
+ }
+
+ // 4. Let bytes be a byte sequence whose first byte is (code
+ // point >> (6 × count)) + offset.
+ var bytes = [(code_point >> (6 * count)) + offset];
+
+ // 5. Run these substeps while count is greater than 0:
+ while (count > 0) {
+
+ // 1. Set temp to code point >> (6 × (count − 1)).
+ var temp = code_point >> (6 * (count - 1));
+
+ // 2. Append to bytes 0x80 | (temp & 0x3F).
+ bytes.push(0x80 | (temp & 0x3F));
+
+ // 3. Decrease count by one.
+ count -= 1;
+ }
+
+ // 6. Return bytes bytes, in order.
+ return bytes;
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['UTF-8'] = function(options) {
+ return new UTF8Encoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['UTF-8'] = function(options) {
+ return new UTF8Decoder(options);
+ };
+
+ //
+ // 10. Legacy single-byte encodings
+ //
+
+ // 10.1 single-byte decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {!Array.} index The encoding index.
+ * @param {{fatal: boolean}} options
+ */
+ function SingleByteDecoder(index, options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream, return finished.
+ if (bite === end_of_stream)
+ return finished;
+
+ // 2. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 3. Let code point be the index code point for byte − 0x80 in
+ // index single-byte.
+ var code_point = index[bite - 0x80];
+
+ // 4. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 5. Return a code point whose value is code point.
+ return code_point;
+ };
+ }
+
+ // 10.2 single-byte encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {!Array.} index The encoding index.
+ * @param {{fatal: boolean}} options
+ */
+ function SingleByteEncoder(index, options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Let pointer be the index pointer for code point in index
+ // single-byte.
+ var pointer = indexPointerFor(code_point, index);
+
+ // 4. If pointer is null, return error with code point.
+ if (pointer === null)
+ encoderError(code_point);
+
+ // 5. Return a byte whose value is pointer + 0x80.
+ return pointer + 0x80;
+ };
+ }
+
+ (function() {
+ if (!('encoding-indexes' in global))
+ return;
+ encodings.forEach(function(category) {
+ if (category.heading !== 'Legacy single-byte encodings')
+ return;
+ category.encodings.forEach(function(encoding) {
+ var name = encoding.name;
+ var idx = index(name.toLowerCase());
+ /** @param {{fatal: boolean}} options */
+ decoders[name] = function(options) {
+ return new SingleByteDecoder(idx, options);
+ };
+ /** @param {{fatal: boolean}} options */
+ encoders[name] = function(options) {
+ return new SingleByteEncoder(idx, options);
+ };
+ });
+ });
+ }());
+
+ //
+ // 11. Legacy multi-byte Chinese (simplified) encodings
+ //
+
+ // 11.1 gbk
+
+ // 11.1.1 gbk decoder
+ // gbk's decoder is gb18030's decoder.
+ /** @param {{fatal: boolean}} options */
+ decoders['GBK'] = function(options) {
+ return new GB18030Decoder(options);
+ };
+
+ // 11.1.2 gbk encoder
+ // gbk's encoder is gb18030's encoder with its gbk flag set.
+ /** @param {{fatal: boolean}} options */
+ encoders['GBK'] = function(options) {
+ return new GB18030Encoder(options, true);
+ };
+
+ // 11.2 gb18030
+
+ // 11.2.1 gb18030 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function GB18030Decoder(options) {
+ var fatal = options.fatal;
+ // gb18030's decoder has an associated gb18030 first, gb18030
+ // second, and gb18030 third (all initially 0x00).
+ var /** @type {number} */ gb18030_first = 0x00,
+ /** @type {number} */ gb18030_second = 0x00,
+ /** @type {number} */ gb18030_third = 0x00;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and gb18030 first, gb18030
+ // second, and gb18030 third are 0x00, return finished.
+ if (bite === end_of_stream && gb18030_first === 0x00 &&
+ gb18030_second === 0x00 && gb18030_third === 0x00) {
+ return finished;
+ }
+ // 2. If byte is end-of-stream, and gb18030 first, gb18030
+ // second, or gb18030 third is not 0x00, set gb18030 first,
+ // gb18030 second, and gb18030 third to 0x00, and return error.
+ if (bite === end_of_stream &&
+ (gb18030_first !== 0x00 || gb18030_second !== 0x00 ||
+ gb18030_third !== 0x00)) {
+ gb18030_first = 0x00;
+ gb18030_second = 0x00;
+ gb18030_third = 0x00;
+ decoderError(fatal);
+ }
+ var code_point;
+ // 3. If gb18030 third is not 0x00, run these substeps:
+ if (gb18030_third !== 0x00) {
+ // 1. Let code point be null.
+ code_point = null;
+ // 2. If byte is in the range 0x30 to 0x39, inclusive, set
+ // code point to the index gb18030 ranges code point for
+ // (((gb18030 first − 0x81) × 10 + gb18030 second − 0x30) ×
+ // 126 + gb18030 third − 0x81) × 10 + byte − 0x30.
+ if (inRange(bite, 0x30, 0x39)) {
+ code_point = indexGB18030RangesCodePointFor(
+ (((gb18030_first - 0x81) * 10 + gb18030_second - 0x30) * 126 +
+ gb18030_third - 0x81) * 10 + bite - 0x30);
+ }
+
+ // 3. Let buffer be a byte sequence consisting of gb18030
+ // second, gb18030 third, and byte, in order.
+ var buffer = [gb18030_second, gb18030_third, bite];
+
+ // 4. Set gb18030 first, gb18030 second, and gb18030 third to
+ // 0x00.
+ gb18030_first = 0x00;
+ gb18030_second = 0x00;
+ gb18030_third = 0x00;
+
+ // 5. If code point is null, prepend buffer to stream and
+ // return error.
+ if (code_point === null) {
+ stream.prepend(buffer);
+ return decoderError(fatal);
+ }
+
+ // 6. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If gb18030 second is not 0x00, run these substeps:
+ if (gb18030_second !== 0x00) {
+
+ // 1. If byte is in the range 0x81 to 0xFE, inclusive, set
+ // gb18030 third to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ gb18030_third = bite;
+ return null;
+ }
+
+ // 2. Prepend gb18030 second followed by byte to stream, set
+ // gb18030 first and gb18030 second to 0x00, and return error.
+ stream.prepend([gb18030_second, bite]);
+ gb18030_first = 0x00;
+ gb18030_second = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 5. If gb18030 first is not 0x00, run these substeps:
+ if (gb18030_first !== 0x00) {
+
+ // 1. If byte is in the range 0x30 to 0x39, inclusive, set
+ // gb18030 second to byte and return continue.
+ if (inRange(bite, 0x30, 0x39)) {
+ gb18030_second = bite;
+ return null;
+ }
+
+ // 2. Let lead be gb18030 first, let pointer be null, and set
+ // gb18030 first to 0x00.
+ var lead = gb18030_first;
+ var pointer = null;
+ gb18030_first = 0x00;
+
+ // 3. Let offset be 0x40 if byte is less than 0x7F and 0x41
+ // otherwise.
+ var offset = bite < 0x7F ? 0x40 : 0x41;
+
+ // 4. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
+ // to 0xFE, inclusive, set pointer to (lead − 0x81) × 190 +
+ // (byte − offset).
+ if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFE))
+ pointer = (lead - 0x81) * 190 + (bite - offset);
+
+ // 5. Let code point be null if pointer is null and the index
+ // code point for pointer in index gb18030 otherwise.
+ code_point = pointer === null ? null :
+ indexCodePointFor(pointer, index('gb18030'));
+
+ // 6. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (code_point === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 7. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 8. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 6. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 7. If byte is 0x80, return code point U+20AC.
+ if (bite === 0x80)
+ return 0x20AC;
+
+ // 8. If byte is in the range 0x81 to 0xFE, inclusive, set
+ // gb18030 first to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ gb18030_first = bite;
+ return null;
+ }
+
+ // 9. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 11.2.2 gb18030 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ * @param {boolean=} gbk_flag
+ */
+ function GB18030Encoder(options, gbk_flag) {
+ var fatal = options.fatal;
+ // gb18030's decoder has an associated gbk flag (initially unset).
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. If code point is U+E5E5, return error with code point.
+ if (code_point === 0xE5E5)
+ return encoderError(code_point);
+
+ // 4. If the gbk flag is set and code point is U+20AC, return
+ // byte 0x80.
+ if (gbk_flag && code_point === 0x20AC)
+ return 0x80;
+
+ // 5. Let pointer be the index pointer for code point in index
+ // gb18030.
+ var pointer = indexPointerFor(code_point, index('gb18030'));
+
+ // 6. If pointer is not null, run these substeps:
+ if (pointer !== null) {
+
+ // 1. Let lead be floor(pointer / 190) + 0x81.
+ var lead = floor(pointer / 190) + 0x81;
+
+ // 2. Let trail be pointer % 190.
+ var trail = pointer % 190;
+
+ // 3. Let offset be 0x40 if trail is less than 0x3F and 0x41 otherwise.
+ var offset = trail < 0x3F ? 0x40 : 0x41;
+
+ // 4. Return two bytes whose values are lead and trail + offset.
+ return [lead, trail + offset];
+ }
+
+ // 7. If gbk flag is set, return error with code point.
+ if (gbk_flag)
+ return encoderError(code_point);
+
+ // 8. Set pointer to the index gb18030 ranges pointer for code
+ // point.
+ pointer = indexGB18030RangesPointerFor(code_point);
+
+ // 9. Let byte1 be floor(pointer / 10 / 126 / 10).
+ var byte1 = floor(pointer / 10 / 126 / 10);
+
+ // 10. Set pointer to pointer − byte1 × 10 × 126 × 10.
+ pointer = pointer - byte1 * 10 * 126 * 10;
+
+ // 11. Let byte2 be floor(pointer / 10 / 126).
+ var byte2 = floor(pointer / 10 / 126);
+
+ // 12. Set pointer to pointer − byte2 × 10 × 126.
+ pointer = pointer - byte2 * 10 * 126;
+
+ // 13. Let byte3 be floor(pointer / 10).
+ var byte3 = floor(pointer / 10);
+
+ // 14. Let byte4 be pointer − byte3 × 10.
+ var byte4 = pointer - byte3 * 10;
+
+ // 15. Return four bytes whose values are byte1 + 0x81, byte2 +
+ // 0x30, byte3 + 0x81, byte4 + 0x30.
+ return [byte1 + 0x81,
+ byte2 + 0x30,
+ byte3 + 0x81,
+ byte4 + 0x30];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['gb18030'] = function(options) {
+ return new GB18030Encoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['gb18030'] = function(options) {
+ return new GB18030Decoder(options);
+ };
+
+
+ //
+ // 12. Legacy multi-byte Chinese (traditional) encodings
+ //
+
+ // 12.1 Big5
+
+ // 12.1.1 Big5 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function Big5Decoder(options) {
+ var fatal = options.fatal;
+ // Big5's decoder has an associated Big5 lead (initially 0x00).
+ var /** @type {number} */ Big5_lead = 0x00;
+
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and Big5 lead is not 0x00, set
+ // Big5 lead to 0x00 and return error.
+ if (bite === end_of_stream && Big5_lead !== 0x00) {
+ Big5_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and Big5 lead is 0x00, return
+ // finished.
+ if (bite === end_of_stream && Big5_lead === 0x00)
+ return finished;
+
+ // 3. If Big5 lead is not 0x00, let lead be Big5 lead, let
+ // pointer be null, set Big5 lead to 0x00, and then run these
+ // substeps:
+ if (Big5_lead !== 0x00) {
+ var lead = Big5_lead;
+ var pointer = null;
+ Big5_lead = 0x00;
+
+ // 1. Let offset be 0x40 if byte is less than 0x7F and 0x62
+ // otherwise.
+ var offset = bite < 0x7F ? 0x40 : 0x62;
+
+ // 2. If byte is in the range 0x40 to 0x7E, inclusive, or 0xA1
+ // to 0xFE, inclusive, set pointer to (lead − 0x81) × 157 +
+ // (byte − offset).
+ if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0xA1, 0xFE))
+ pointer = (lead - 0x81) * 157 + (bite - offset);
+
+ // 3. If there is a row in the table below whose first column
+ // is pointer, return the two code points listed in its second
+ // column
+ // Pointer | Code points
+ // --------+--------------
+ // 1133 | U+00CA U+0304
+ // 1135 | U+00CA U+030C
+ // 1164 | U+00EA U+0304
+ // 1166 | U+00EA U+030C
+ switch (pointer) {
+ case 1133: return [0x00CA, 0x0304];
+ case 1135: return [0x00CA, 0x030C];
+ case 1164: return [0x00EA, 0x0304];
+ case 1166: return [0x00EA, 0x030C];
+ }
+
+ // 4. Let code point be null if pointer is null and the index
+ // code point for pointer in index Big5 otherwise.
+ var code_point = (pointer === null) ? null :
+ indexCodePointFor(pointer, index('big5'));
+
+ // 5. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (code_point === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 6. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 7. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 5. If byte is in the range 0x81 to 0xFE, inclusive, set Big5
+ // lead to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ Big5_lead = bite;
+ return null;
+ }
+
+ // 6. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 12.1.2 Big5 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function Big5Encoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Let pointer be the index Big5 pointer for code point.
+ var pointer = indexBig5PointerFor(code_point);
+
+ // 4. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 5. Let lead be floor(pointer / 157) + 0x81.
+ var lead = floor(pointer / 157) + 0x81;
+
+ // 6. If lead is less than 0xA1, return error with code point.
+ if (lead < 0xA1)
+ return encoderError(code_point);
+
+ // 7. Let trail be pointer % 157.
+ var trail = pointer % 157;
+
+ // 8. Let offset be 0x40 if trail is less than 0x3F and 0x62
+ // otherwise.
+ var offset = trail < 0x3F ? 0x40 : 0x62;
+
+ // Return two bytes whose values are lead and trail + offset.
+ return [lead, trail + offset];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['Big5'] = function(options) {
+ return new Big5Encoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['Big5'] = function(options) {
+ return new Big5Decoder(options);
+ };
+
+
+ //
+ // 13. Legacy multi-byte Japanese encodings
+ //
+
+ // 13.1 euc-jp
+
+ // 13.1.1 euc-jp decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCJPDecoder(options) {
+ var fatal = options.fatal;
+
+ // euc-jp's decoder has an associated euc-jp jis0212 flag
+ // (initially unset) and euc-jp lead (initially 0x00).
+ var /** @type {boolean} */ eucjp_jis0212_flag = false,
+ /** @type {number} */ eucjp_lead = 0x00;
+
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and euc-jp lead is not 0x00, set
+ // euc-jp lead to 0x00, and return error.
+ if (bite === end_of_stream && eucjp_lead !== 0x00) {
+ eucjp_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and euc-jp lead is 0x00, return
+ // finished.
+ if (bite === end_of_stream && eucjp_lead === 0x00)
+ return finished;
+
+ // 3. If euc-jp lead is 0x8E and byte is in the range 0xA1 to
+ // 0xDF, inclusive, set euc-jp lead to 0x00 and return a code
+ // point whose value is 0xFF61 − 0xA1 + byte.
+ if (eucjp_lead === 0x8E && inRange(bite, 0xA1, 0xDF)) {
+ eucjp_lead = 0x00;
+ return 0xFF61 - 0xA1 + bite;
+ }
+
+ // 4. If euc-jp lead is 0x8F and byte is in the range 0xA1 to
+ // 0xFE, inclusive, set the euc-jp jis0212 flag, set euc-jp lead
+ // to byte, and return continue.
+ if (eucjp_lead === 0x8F && inRange(bite, 0xA1, 0xFE)) {
+ eucjp_jis0212_flag = true;
+ eucjp_lead = bite;
+ return null;
+ }
+
+ // 5. If euc-jp lead is not 0x00, let lead be euc-jp lead, set
+ // euc-jp lead to 0x00, and run these substeps:
+ if (eucjp_lead !== 0x00) {
+ var lead = eucjp_lead;
+ eucjp_lead = 0x00;
+
+ // 1. Let code point be null.
+ var code_point = null;
+
+ // 2. If lead and byte are both in the range 0xA1 to 0xFE,
+ // inclusive, set code point to the index code point for (lead
+ // − 0xA1) × 94 + byte − 0xA1 in index jis0208 if the euc-jp
+ // jis0212 flag is unset and in index jis0212 otherwise.
+ if (inRange(lead, 0xA1, 0xFE) && inRange(bite, 0xA1, 0xFE)) {
+ code_point = indexCodePointFor(
+ (lead - 0xA1) * 94 + (bite - 0xA1),
+ index(!eucjp_jis0212_flag ? 'jis0208' : 'jis0212'));
+ }
+
+ // 3. Unset the euc-jp jis0212 flag.
+ eucjp_jis0212_flag = false;
+
+ // 4. If byte is not in the range 0xA1 to 0xFE, inclusive,
+ // prepend byte to stream.
+ if (!inRange(bite, 0xA1, 0xFE))
+ stream.prepend(bite);
+
+ // 5. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 6. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 6. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 7. If byte is 0x8E, 0x8F, or in the range 0xA1 to 0xFE,
+ // inclusive, set euc-jp lead to byte and return continue.
+ if (bite === 0x8E || bite === 0x8F || inRange(bite, 0xA1, 0xFE)) {
+ eucjp_lead = bite;
+ return null;
+ }
+
+ // 8. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 13.1.2 euc-jp encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCJPEncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. If code point is U+00A5, return byte 0x5C.
+ if (code_point === 0x00A5)
+ return 0x5C;
+
+ // 4. If code point is U+203E, return byte 0x7E.
+ if (code_point === 0x203E)
+ return 0x7E;
+
+ // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
+ // return two bytes whose values are 0x8E and code point −
+ // 0xFF61 + 0xA1.
+ if (inRange(code_point, 0xFF61, 0xFF9F))
+ return [0x8E, code_point - 0xFF61 + 0xA1];
+
+ // 6. If code point is U+2212, set it to U+FF0D.
+ if (code_point === 0x2212)
+ code_point = 0xFF0D;
+
+ // 7. Let pointer be the index pointer for code point in index
+ // jis0208.
+ var pointer = indexPointerFor(code_point, index('jis0208'));
+
+ // 8. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 9. Let lead be floor(pointer / 94) + 0xA1.
+ var lead = floor(pointer / 94) + 0xA1;
+
+ // 10. Let trail be pointer % 94 + 0xA1.
+ var trail = pointer % 94 + 0xA1;
+
+ // 11. Return two bytes whose values are lead and trail.
+ return [lead, trail];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['EUC-JP'] = function(options) {
+ return new EUCJPEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['EUC-JP'] = function(options) {
+ return new EUCJPDecoder(options);
+ };
+
+ // 13.2 iso-2022-jp
+
+ // 13.2.1 iso-2022-jp decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ISO2022JPDecoder(options) {
+ var fatal = options.fatal;
+ /** @enum */
+ var states = {
+ ASCII: 0,
+ Roman: 1,
+ Katakana: 2,
+ LeadByte: 3,
+ TrailByte: 4,
+ EscapeStart: 5,
+ Escape: 6
+ };
+ // iso-2022-jp's decoder has an associated iso-2022-jp decoder
+ // state (initially ASCII), iso-2022-jp decoder output state
+ // (initially ASCII), iso-2022-jp lead (initially 0x00), and
+ // iso-2022-jp output flag (initially unset).
+ var /** @type {number} */ iso2022jp_decoder_state = states.ASCII,
+ /** @type {number} */ iso2022jp_decoder_output_state = states.ASCII,
+ /** @type {number} */ iso2022jp_lead = 0x00,
+ /** @type {boolean} */ iso2022jp_output_flag = false;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // switching on iso-2022-jp decoder state:
+ switch (iso2022jp_decoder_state) {
+ default:
+ case states.ASCII:
+ // ASCII
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x00 to 0x7F, excluding 0x0E, 0x0F, and 0x1B
+ if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E
+ && bite !== 0x0F && bite !== 0x1B) {
+ // Unset the iso-2022-jp output flag and return a code point
+ // whose value is byte.
+ iso2022jp_output_flag = false;
+ return bite;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.Roman:
+ // Roman
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x5C
+ if (bite === 0x5C) {
+ // Unset the iso-2022-jp output flag and return code point
+ // U+00A5.
+ iso2022jp_output_flag = false;
+ return 0x00A5;
+ }
+
+ // 0x7E
+ if (bite === 0x7E) {
+ // Unset the iso-2022-jp output flag and return code point
+ // U+203E.
+ iso2022jp_output_flag = false;
+ return 0x203E;
+ }
+
+ // 0x00 to 0x7F, excluding 0x0E, 0x0F, 0x1B, 0x5C, and 0x7E
+ if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E && bite !== 0x0F
+ && bite !== 0x1B && bite !== 0x5C && bite !== 0x7E) {
+ // Unset the iso-2022-jp output flag and return a code point
+ // whose value is byte.
+ iso2022jp_output_flag = false;
+ return bite;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.Katakana:
+ // Katakana
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x21 to 0x5F
+ if (inRange(bite, 0x21, 0x5F)) {
+ // Unset the iso-2022-jp output flag and return a code point
+ // whose value is 0xFF61 − 0x21 + byte.
+ iso2022jp_output_flag = false;
+ return 0xFF61 - 0x21 + bite;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.LeadByte:
+ // Lead byte
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x21 to 0x7E
+ if (inRange(bite, 0x21, 0x7E)) {
+ // Unset the iso-2022-jp output flag, set iso-2022-jp lead
+ // to byte, iso-2022-jp decoder state to trail byte, and
+ // return continue.
+ iso2022jp_output_flag = false;
+ iso2022jp_lead = bite;
+ iso2022jp_decoder_state = states.TrailByte;
+ return null;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.TrailByte:
+ // Trail byte
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return decoderError(fatal);
+ }
+
+ // 0x21 to 0x7E
+ if (inRange(bite, 0x21, 0x7E)) {
+ // 1. Set the iso-2022-jp decoder state to lead byte.
+ iso2022jp_decoder_state = states.LeadByte;
+
+ // 2. Let pointer be (iso-2022-jp lead − 0x21) × 94 + byte − 0x21.
+ var pointer = (iso2022jp_lead - 0x21) * 94 + bite - 0x21;
+
+ // 3. Let code point be the index code point for pointer in
+ // index jis0208.
+ var code_point = indexCodePointFor(pointer, index('jis0208'));
+
+ // 4. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 5. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Set the iso-2022-jp decoder state to lead byte, prepend
+ // byte to stream, and return error.
+ iso2022jp_decoder_state = states.LeadByte;
+ stream.prepend(bite);
+ return decoderError(fatal);
+ }
+
+ // Otherwise
+ // Set iso-2022-jp decoder state to lead byte and return
+ // error.
+ iso2022jp_decoder_state = states.LeadByte;
+ return decoderError(fatal);
+
+ case states.EscapeStart:
+ // Escape start
+
+ // 1. If byte is either 0x24 or 0x28, set iso-2022-jp lead to
+ // byte, iso-2022-jp decoder state to escape, and return
+ // continue.
+ if (bite === 0x24 || bite === 0x28) {
+ iso2022jp_lead = bite;
+ iso2022jp_decoder_state = states.Escape;
+ return null;
+ }
+
+ // 2. Prepend byte to stream.
+ stream.prepend(bite);
+
+ // 3. Unset the iso-2022-jp output flag, set iso-2022-jp
+ // decoder state to iso-2022-jp decoder output state, and
+ // return error.
+ iso2022jp_output_flag = false;
+ iso2022jp_decoder_state = iso2022jp_decoder_output_state;
+ return decoderError(fatal);
+
+ case states.Escape:
+ // Escape
+
+ // 1. Let lead be iso-2022-jp lead and set iso-2022-jp lead to
+ // 0x00.
+ var lead = iso2022jp_lead;
+ iso2022jp_lead = 0x00;
+
+ // 2. Let state be null.
+ var state = null;
+
+ // 3. If lead is 0x28 and byte is 0x42, set state to ASCII.
+ if (lead === 0x28 && bite === 0x42)
+ state = states.ASCII;
+
+ // 4. If lead is 0x28 and byte is 0x4A, set state to Roman.
+ if (lead === 0x28 && bite === 0x4A)
+ state = states.Roman;
+
+ // 5. If lead is 0x28 and byte is 0x49, set state to Katakana.
+ if (lead === 0x28 && bite === 0x49)
+ state = states.Katakana;
+
+ // 6. If lead is 0x24 and byte is either 0x40 or 0x42, set
+ // state to lead byte.
+ if (lead === 0x24 && (bite === 0x40 || bite === 0x42))
+ state = states.LeadByte;
+
+ // 7. If state is non-null, run these substeps:
+ if (state !== null) {
+ // 1. Set iso-2022-jp decoder state and iso-2022-jp decoder
+ // output state to states.
+ iso2022jp_decoder_state = iso2022jp_decoder_state = state;
+
+ // 2. Let output flag be the iso-2022-jp output flag.
+ var output_flag = iso2022jp_output_flag;
+
+ // 3. Set the iso-2022-jp output flag.
+ iso2022jp_output_flag = true;
+
+ // 4. Return continue, if output flag is unset, and error
+ // otherwise.
+ return !output_flag ? null : decoderError(fatal);
+ }
+
+ // 8. Prepend lead and byte to stream.
+ stream.prepend([lead, bite]);
+
+ // 9. Unset the iso-2022-jp output flag, set iso-2022-jp
+ // decoder state to iso-2022-jp decoder output state and
+ // return error.
+ iso2022jp_output_flag = false;
+ iso2022jp_decoder_state = iso2022jp_decoder_output_state;
+ return decoderError(fatal);
+ }
+ };
+ }
+
+ // 13.2.2 iso-2022-jp encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ISO2022JPEncoder(options) {
+ var fatal = options.fatal;
+ // iso-2022-jp's encoder has an associated iso-2022-jp encoder
+ // state which is one of ASCII, Roman, and jis0208 (initially
+ // ASCII).
+ /** @enum */
+ var states = {
+ ASCII: 0,
+ Roman: 1,
+ jis0208: 2
+ };
+ var /** @type {number} */ iso2022jp_state = states.ASCII;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream and iso-2022-jp encoder
+ // state is not ASCII, prepend code point to stream, set
+ // iso-2022-jp encoder state to ASCII, and return three bytes
+ // 0x1B 0x28 0x42.
+ if (code_point === end_of_stream &&
+ iso2022jp_state !== states.ASCII) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.ASCII;
+ return [0x1B, 0x28, 0x42];
+ }
+
+ // 2. If code point is end-of-stream and iso-2022-jp encoder
+ // state is ASCII, return finished.
+ if (code_point === end_of_stream && iso2022jp_state === states.ASCII)
+ return finished;
+
+ // 3. If ISO-2022-JP encoder state is ASCII or Roman, and code
+ // point is U+000E, U+000F, or U+001B, return error with U+FFFD.
+ if ((iso2022jp_state === states.ASCII ||
+ iso2022jp_state === states.Roman) &&
+ (code_point === 0x000E || code_point === 0x000F ||
+ code_point === 0x001B)) {
+ return encoderError(0xFFFD);
+ }
+
+ // 4. If iso-2022-jp encoder state is ASCII and code point is an
+ // ASCII code point, return a byte whose value is code point.
+ if (iso2022jp_state === states.ASCII &&
+ isASCIICodePoint(code_point))
+ return code_point;
+
+ // 5. If iso-2022-jp encoder state is Roman and code point is an
+ // ASCII code point, excluding U+005C and U+007E, or is U+00A5
+ // or U+203E, run these substeps:
+ if (iso2022jp_state === states.Roman &&
+ ((isASCIICodePoint(code_point) &&
+ code_point !== 0x005C && code_point !== 0x007E) ||
+ (code_point == 0x00A5 || code_point == 0x203E))) {
+
+ // 1. If code point is an ASCII code point, return a byte
+ // whose value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 2. If code point is U+00A5, return byte 0x5C.
+ if (code_point === 0x00A5)
+ return 0x5C;
+
+ // 3. If code point is U+203E, return byte 0x7E.
+ if (code_point === 0x203E)
+ return 0x7E;
+ }
+
+ // 6. If code point is an ASCII code point, and iso-2022-jp
+ // encoder state is not ASCII, prepend code point to stream, set
+ // iso-2022-jp encoder state to ASCII, and return three bytes
+ // 0x1B 0x28 0x42.
+ if (isASCIICodePoint(code_point) &&
+ iso2022jp_state !== states.ASCII) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.ASCII;
+ return [0x1B, 0x28, 0x42];
+ }
+
+ // 7. If code point is either U+00A5 or U+203E, and iso-2022-jp
+ // encoder state is not Roman, prepend code point to stream, set
+ // iso-2022-jp encoder state to Roman, and return three bytes
+ // 0x1B 0x28 0x4A.
+ if ((code_point === 0x00A5 || code_point === 0x203E) &&
+ iso2022jp_state !== states.Roman) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.Roman;
+ return [0x1B, 0x28, 0x4A];
+ }
+
+ // 8. If code point is U+2212, set it to U+FF0D.
+ if (code_point === 0x2212)
+ code_point = 0xFF0D;
+
+ // 9. Let pointer be the index pointer for code point in index
+ // jis0208.
+ var pointer = indexPointerFor(code_point, index('jis0208'));
+
+ // 10. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 11. If iso-2022-jp encoder state is not jis0208, prepend code
+ // point to stream, set iso-2022-jp encoder state to jis0208,
+ // and return three bytes 0x1B 0x24 0x42.
+ if (iso2022jp_state !== states.jis0208) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.jis0208;
+ return [0x1B, 0x24, 0x42];
+ }
+
+ // 12. Let lead be floor(pointer / 94) + 0x21.
+ var lead = floor(pointer / 94) + 0x21;
+
+ // 13. Let trail be pointer % 94 + 0x21.
+ var trail = pointer % 94 + 0x21;
+
+ // 14. Return two bytes whose values are lead and trail.
+ return [lead, trail];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['ISO-2022-JP'] = function(options) {
+ return new ISO2022JPEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['ISO-2022-JP'] = function(options) {
+ return new ISO2022JPDecoder(options);
+ };
+
+ // 13.3 Shift_JIS
+
+ // 13.3.1 Shift_JIS decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ShiftJISDecoder(options) {
+ var fatal = options.fatal;
+ // Shift_JIS's decoder has an associated Shift_JIS lead (initially
+ // 0x00).
+ var /** @type {number} */ Shift_JIS_lead = 0x00;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and Shift_JIS lead is not 0x00,
+ // set Shift_JIS lead to 0x00 and return error.
+ if (bite === end_of_stream && Shift_JIS_lead !== 0x00) {
+ Shift_JIS_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and Shift_JIS lead is 0x00,
+ // return finished.
+ if (bite === end_of_stream && Shift_JIS_lead === 0x00)
+ return finished;
+
+ // 3. If Shift_JIS lead is not 0x00, let lead be Shift_JIS lead,
+ // let pointer be null, set Shift_JIS lead to 0x00, and then run
+ // these substeps:
+ if (Shift_JIS_lead !== 0x00) {
+ var lead = Shift_JIS_lead;
+ var pointer = null;
+ Shift_JIS_lead = 0x00;
+
+ // 1. Let offset be 0x40, if byte is less than 0x7F, and 0x41
+ // otherwise.
+ var offset = (bite < 0x7F) ? 0x40 : 0x41;
+
+ // 2. Let lead offset be 0x81, if lead is less than 0xA0, and
+ // 0xC1 otherwise.
+ var lead_offset = (lead < 0xA0) ? 0x81 : 0xC1;
+
+ // 3. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
+ // to 0xFC, inclusive, set pointer to (lead − lead offset) ×
+ // 188 + byte − offset.
+ if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFC))
+ pointer = (lead - lead_offset) * 188 + bite - offset;
+
+ // 4. If pointer is in the range 8836 to 10715, inclusive,
+ // return a code point whose value is 0xE000 − 8836 + pointer.
+ if (inRange(pointer, 8836, 10715))
+ return 0xE000 - 8836 + pointer;
+
+ // 5. Let code point be null, if pointer is null, and the
+ // index code point for pointer in index jis0208 otherwise.
+ var code_point = (pointer === null) ? null :
+ indexCodePointFor(pointer, index('jis0208'));
+
+ // 6. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (code_point === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 7. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 8. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If byte is an ASCII byte or 0x80, return a code point
+ // whose value is byte.
+ if (isASCIIByte(bite) || bite === 0x80)
+ return bite;
+
+ // 5. If byte is in the range 0xA1 to 0xDF, inclusive, return a
+ // code point whose value is 0xFF61 − 0xA1 + byte.
+ if (inRange(bite, 0xA1, 0xDF))
+ return 0xFF61 - 0xA1 + bite;
+
+ // 6. If byte is in the range 0x81 to 0x9F, inclusive, or 0xE0
+ // to 0xFC, inclusive, set Shift_JIS lead to byte and return
+ // continue.
+ if (inRange(bite, 0x81, 0x9F) || inRange(bite, 0xE0, 0xFC)) {
+ Shift_JIS_lead = bite;
+ return null;
+ }
+
+ // 7. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 13.3.2 Shift_JIS encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ShiftJISEncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point or U+0080, return a
+ // byte whose value is code point.
+ if (isASCIICodePoint(code_point) || code_point === 0x0080)
+ return code_point;
+
+ // 3. If code point is U+00A5, return byte 0x5C.
+ if (code_point === 0x00A5)
+ return 0x5C;
+
+ // 4. If code point is U+203E, return byte 0x7E.
+ if (code_point === 0x203E)
+ return 0x7E;
+
+ // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
+ // return a byte whose value is code point − 0xFF61 + 0xA1.
+ if (inRange(code_point, 0xFF61, 0xFF9F))
+ return code_point - 0xFF61 + 0xA1;
+
+ // 6. If code point is U+2212, set it to U+FF0D.
+ if (code_point === 0x2212)
+ code_point = 0xFF0D;
+
+ // 7. Let pointer be the index Shift_JIS pointer for code point.
+ var pointer = indexShiftJISPointerFor(code_point);
+
+ // 8. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 9. Let lead be floor(pointer / 188).
+ var lead = floor(pointer / 188);
+
+ // 10. Let lead offset be 0x81, if lead is less than 0x1F, and
+ // 0xC1 otherwise.
+ var lead_offset = (lead < 0x1F) ? 0x81 : 0xC1;
+
+ // 11. Let trail be pointer % 188.
+ var trail = pointer % 188;
+
+ // 12. Let offset be 0x40, if trail is less than 0x3F, and 0x41
+ // otherwise.
+ var offset = (trail < 0x3F) ? 0x40 : 0x41;
+
+ // 13. Return two bytes whose values are lead + lead offset and
+ // trail + offset.
+ return [lead + lead_offset, trail + offset];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['Shift_JIS'] = function(options) {
+ return new ShiftJISEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['Shift_JIS'] = function(options) {
+ return new ShiftJISDecoder(options);
+ };
+
+ //
+ // 14. Legacy multi-byte Korean encodings
+ //
+
+ // 14.1 euc-kr
+
+ // 14.1.1 euc-kr decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCKRDecoder(options) {
+ var fatal = options.fatal;
+
+ // euc-kr's decoder has an associated euc-kr lead (initially 0x00).
+ var /** @type {number} */ euckr_lead = 0x00;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and euc-kr lead is not 0x00, set
+ // euc-kr lead to 0x00 and return error.
+ if (bite === end_of_stream && euckr_lead !== 0) {
+ euckr_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and euc-kr lead is 0x00, return
+ // finished.
+ if (bite === end_of_stream && euckr_lead === 0)
+ return finished;
+
+ // 3. If euc-kr lead is not 0x00, let lead be euc-kr lead, let
+ // pointer be null, set euc-kr lead to 0x00, and then run these
+ // substeps:
+ if (euckr_lead !== 0x00) {
+ var lead = euckr_lead;
+ var pointer = null;
+ euckr_lead = 0x00;
+
+ // 1. If byte is in the range 0x41 to 0xFE, inclusive, set
+ // pointer to (lead − 0x81) × 190 + (byte − 0x41).
+ if (inRange(bite, 0x41, 0xFE))
+ pointer = (lead - 0x81) * 190 + (bite - 0x41);
+
+ // 2. Let code point be null, if pointer is null, and the
+ // index code point for pointer in index euc-kr otherwise.
+ var code_point = (pointer === null)
+ ? null : indexCodePointFor(pointer, index('euc-kr'));
+
+ // 3. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (pointer === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 4. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 5. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 5. If byte is in the range 0x81 to 0xFE, inclusive, set
+ // euc-kr lead to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ euckr_lead = bite;
+ return null;
+ }
+
+ // 6. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 14.1.2 euc-kr encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCKREncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Let pointer be the index pointer for code point in index
+ // euc-kr.
+ var pointer = indexPointerFor(code_point, index('euc-kr'));
+
+ // 4. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 5. Let lead be floor(pointer / 190) + 0x81.
+ var lead = floor(pointer / 190) + 0x81;
+
+ // 6. Let trail be pointer % 190 + 0x41.
+ var trail = (pointer % 190) + 0x41;
+
+ // 7. Return two bytes whose values are lead and trail.
+ return [lead, trail];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['EUC-KR'] = function(options) {
+ return new EUCKREncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['EUC-KR'] = function(options) {
+ return new EUCKRDecoder(options);
+ };
+
+
+ //
+ // 15. Legacy miscellaneous encodings
+ //
+
+ // 15.1 replacement
+
+ // Not needed - API throws RangeError
+
+ // 15.2 Common infrastructure for utf-16be and utf-16le
+
+ /**
+ * @param {number} code_unit
+ * @param {boolean} utf16be
+ * @return {!Array.} bytes
+ */
+ function convertCodeUnitToBytes(code_unit, utf16be) {
+ // 1. Let byte1 be code unit >> 8.
+ var byte1 = code_unit >> 8;
+
+ // 2. Let byte2 be code unit & 0x00FF.
+ var byte2 = code_unit & 0x00FF;
+
+ // 3. Then return the bytes in order:
+ // utf-16be flag is set: byte1, then byte2.
+ if (utf16be)
+ return [byte1, byte2];
+ // utf-16be flag is unset: byte2, then byte1.
+ return [byte2, byte1];
+ }
+
+ // 15.2.1 shared utf-16 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {boolean} utf16_be True if big-endian, false if little-endian.
+ * @param {{fatal: boolean}} options
+ */
+ function UTF16Decoder(utf16_be, options) {
+ var fatal = options.fatal;
+ var /** @type {?number} */ utf16_lead_byte = null,
+ /** @type {?number} */ utf16_lead_surrogate = null;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and either utf-16 lead byte or
+ // utf-16 lead surrogate is not null, set utf-16 lead byte and
+ // utf-16 lead surrogate to null, and return error.
+ if (bite === end_of_stream && (utf16_lead_byte !== null ||
+ utf16_lead_surrogate !== null)) {
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and utf-16 lead byte and utf-16
+ // lead surrogate are null, return finished.
+ if (bite === end_of_stream && utf16_lead_byte === null &&
+ utf16_lead_surrogate === null) {
+ return finished;
+ }
+
+ // 3. If utf-16 lead byte is null, set utf-16 lead byte to byte
+ // and return continue.
+ if (utf16_lead_byte === null) {
+ utf16_lead_byte = bite;
+ return null;
+ }
+
+ // 4. Let code unit be the result of:
+ var code_unit;
+ if (utf16_be) {
+ // utf-16be decoder flag is set
+ // (utf-16 lead byte << 8) + byte.
+ code_unit = (utf16_lead_byte << 8) + bite;
+ } else {
+ // utf-16be decoder flag is unset
+ // (byte << 8) + utf-16 lead byte.
+ code_unit = (bite << 8) + utf16_lead_byte;
+ }
+ // Then set utf-16 lead byte to null.
+ utf16_lead_byte = null;
+
+ // 5. If utf-16 lead surrogate is not null, let lead surrogate
+ // be utf-16 lead surrogate, set utf-16 lead surrogate to null,
+ // and then run these substeps:
+ if (utf16_lead_surrogate !== null) {
+ var lead_surrogate = utf16_lead_surrogate;
+ utf16_lead_surrogate = null;
+
+ // 1. If code unit is in the range U+DC00 to U+DFFF,
+ // inclusive, return a code point whose value is 0x10000 +
+ // ((lead surrogate − 0xD800) << 10) + (code unit − 0xDC00).
+ if (inRange(code_unit, 0xDC00, 0xDFFF)) {
+ return 0x10000 + (lead_surrogate - 0xD800) * 0x400 +
+ (code_unit - 0xDC00);
+ }
+
+ // 2. Prepend the sequence resulting of converting code unit
+ // to bytes using utf-16be decoder flag to stream and return
+ // error.
+ stream.prepend(convertCodeUnitToBytes(code_unit, utf16_be));
+ return decoderError(fatal);
+ }
+
+ // 6. If code unit is in the range U+D800 to U+DBFF, inclusive,
+ // set utf-16 lead surrogate to code unit and return continue.
+ if (inRange(code_unit, 0xD800, 0xDBFF)) {
+ utf16_lead_surrogate = code_unit;
+ return null;
+ }
+
+ // 7. If code unit is in the range U+DC00 to U+DFFF, inclusive,
+ // return error.
+ if (inRange(code_unit, 0xDC00, 0xDFFF))
+ return decoderError(fatal);
+
+ // 8. Return code point code unit.
+ return code_unit;
+ };
+ }
+
+ // 15.2.2 shared utf-16 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {boolean} utf16_be True if big-endian, false if little-endian.
+ * @param {{fatal: boolean}} options
+ */
+ function UTF16Encoder(utf16_be, options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is in the range U+0000 to U+FFFF, inclusive,
+ // return the sequence resulting of converting code point to
+ // bytes using utf-16be encoder flag.
+ if (inRange(code_point, 0x0000, 0xFFFF))
+ return convertCodeUnitToBytes(code_point, utf16_be);
+
+ // 3. Let lead be ((code point − 0x10000) >> 10) + 0xD800,
+ // converted to bytes using utf-16be encoder flag.
+ var lead = convertCodeUnitToBytes(
+ ((code_point - 0x10000) >> 10) + 0xD800, utf16_be);
+
+ // 4. Let trail be ((code point − 0x10000) & 0x3FF) + 0xDC00,
+ // converted to bytes using utf-16be encoder flag.
+ var trail = convertCodeUnitToBytes(
+ ((code_point - 0x10000) & 0x3FF) + 0xDC00, utf16_be);
+
+ // 5. Return a byte sequence of lead followed by trail.
+ return lead.concat(trail);
+ };
+ }
+
+ // 15.3 utf-16be
+ // 15.3.1 utf-16be decoder
+ /** @param {{fatal: boolean}} options */
+ encoders['UTF-16BE'] = function(options) {
+ return new UTF16Encoder(true, options);
+ };
+ // 15.3.2 utf-16be encoder
+ /** @param {{fatal: boolean}} options */
+ decoders['UTF-16BE'] = function(options) {
+ return new UTF16Decoder(true, options);
+ };
+
+ // 15.4 utf-16le
+ // 15.4.1 utf-16le decoder
+ /** @param {{fatal: boolean}} options */
+ encoders['UTF-16LE'] = function(options) {
+ return new UTF16Encoder(false, options);
+ };
+ // 15.4.2 utf-16le encoder
+ /** @param {{fatal: boolean}} options */
+ decoders['UTF-16LE'] = function(options) {
+ return new UTF16Decoder(false, options);
+ };
+
+ // 15.5 x-user-defined
+
+ // 15.5.1 x-user-defined decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function XUserDefinedDecoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream, return finished.
+ if (bite === end_of_stream)
+ return finished;
+
+ // 2. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 3. Return a code point whose value is 0xF780 + byte − 0x80.
+ return 0xF780 + bite - 0x80;
+ };
+ }
+
+ // 15.5.2 x-user-defined encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function XUserDefinedEncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1.If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. If code point is in the range U+F780 to U+F7FF, inclusive,
+ // return a byte whose value is code point − 0xF780 + 0x80.
+ if (inRange(code_point, 0xF780, 0xF7FF))
+ return code_point - 0xF780 + 0x80;
+
+ // 4. Return error with code point.
+ return encoderError(code_point);
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['x-user-defined'] = function(options) {
+ return new XUserDefinedEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['x-user-defined'] = function(options) {
+ return new XUserDefinedDecoder(options);
+ };
+
+ if (typeof module !== "undefined" && module.exports) {
+ module.exports = {
+ TextEncoder: TextEncoder,
+ TextDecoder: TextDecoder,
+ EncodingIndexes: require("./encoding-indexes.js")["encoding-indexes"]
+ };
+ }
+
+// For strict environments where `this` inside the global scope
+// is `undefined`, take a pure object instead
+}(this || {}));
diff --git a/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/package.json b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/package.json
new file mode 100644
index 000000000..ffc3155aa
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/bson/vendor/text-encoding/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "text-encoding",
+ "author": "Joshua Bell ",
+ "contributors": [
+ "Joshua Bell ",
+ "Rick Eyre ",
+ "Eugen Podaru ",
+ "Filip Dupanović ",
+ "Anne van Kesteren ",
+ "Author: Francis Avila ",
+ "Michael J. Ryan ",
+ "Pierre Queinnec ",
+ "Zack Weinberg "
+ ],
+ "version": "0.7.0",
+ "description": "Polyfill for the Encoding Living Standard's API.",
+ "main": "index.js",
+ "files": [
+ "index.js",
+ "lib/encoding.js",
+ "lib/encoding-indexes.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/inexorabletash/text-encoding.git"
+ },
+ "keywords": [
+ "encoding",
+ "decoding",
+ "living standard"
+ ],
+ "bugs": {
+ "url": "https://github.com/inexorabletash/text-encoding/issues"
+ },
+ "homepage": "https://github.com/inexorabletash/text-encoding",
+ "license": "(Unlicense OR Apache-2.0)"
+}
diff --git a/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/.npmignore b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/.npmignore
new file mode 100644
index 000000000..34e4f5c29
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/.npmignore
@@ -0,0 +1,2 @@
+.*.sw[mnop]
+node_modules/
diff --git a/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/.travis.yml b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/.travis.yml
new file mode 100644
index 000000000..78e1c0146
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+- "0.11"
+- "0.10"
diff --git a/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/LICENSE.txt b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/LICENSE.txt
new file mode 100644
index 000000000..9a064f3f4
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/LICENSE.txt
@@ -0,0 +1,12 @@
+Copyright (c) 2013, GoInstant Inc., a salesforce.com company
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/README.md b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/README.md
new file mode 100644
index 000000000..4f227f58b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/README.md
@@ -0,0 +1,50 @@
+# buffer-equal-constant-time
+
+Constant-time `Buffer` comparison for node.js. Should work with browserify too.
+
+[![Build Status](https://travis-ci.org/goinstant/buffer-equal-constant-time.png?branch=master)](https://travis-ci.org/goinstant/buffer-equal-constant-time)
+
+```sh
+ npm install buffer-equal-constant-time
+```
+
+# Usage
+
+```js
+ var bufferEq = require('buffer-equal-constant-time');
+
+ var a = new Buffer('asdf');
+ var b = new Buffer('asdf');
+ if (bufferEq(a,b)) {
+ // the same!
+ } else {
+ // different in at least one byte!
+ }
+```
+
+If you'd like to install an `.equal()` method onto the node.js `Buffer` and
+`SlowBuffer` prototypes:
+
+```js
+ require('buffer-equal-constant-time').install();
+
+ var a = new Buffer('asdf');
+ var b = new Buffer('asdf');
+ if (a.equal(b)) {
+ // the same!
+ } else {
+ // different in at least one byte!
+ }
+```
+
+To get rid of the installed `.equal()` method, call `.restore()`:
+
+```js
+ require('buffer-equal-constant-time').restore();
+```
+
+# Legal
+
+© 2013 GoInstant Inc., a salesforce.com company
+
+Licensed under the BSD 3-clause license.
diff --git a/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/index.js b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/index.js
new file mode 100644
index 000000000..5462c1f83
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/index.js
@@ -0,0 +1,41 @@
+/*jshint node:true */
+'use strict';
+var Buffer = require('buffer').Buffer; // browserify
+var SlowBuffer = require('buffer').SlowBuffer;
+
+module.exports = bufferEq;
+
+function bufferEq(a, b) {
+
+ // shortcutting on type is necessary for correctness
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ return false;
+ }
+
+ // buffer sizes should be well-known information, so despite this
+ // shortcutting, it doesn't leak any information about the *contents* of the
+ // buffers.
+ if (a.length !== b.length) {
+ return false;
+ }
+
+ var c = 0;
+ for (var i = 0; i < a.length; i++) {
+ /*jshint bitwise:false */
+ c |= a[i] ^ b[i]; // XOR
+ }
+ return c === 0;
+}
+
+bufferEq.install = function() {
+ Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
+ return bufferEq(this, that);
+ };
+};
+
+var origBufEqual = Buffer.prototype.equal;
+var origSlowBufEqual = SlowBuffer.prototype.equal;
+bufferEq.restore = function() {
+ Buffer.prototype.equal = origBufEqual;
+ SlowBuffer.prototype.equal = origSlowBufEqual;
+};
diff --git a/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/package.json b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/package.json
new file mode 100644
index 000000000..17c7de22c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "buffer-equal-constant-time",
+ "version": "1.0.1",
+ "description": "Constant-time comparison of Buffers",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha test.js"
+ },
+ "repository": "git@github.com:goinstant/buffer-equal-constant-time.git",
+ "keywords": [
+ "buffer",
+ "equal",
+ "constant-time",
+ "crypto"
+ ],
+ "author": "GoInstant Inc., a salesforce.com company",
+ "license": "BSD-3-Clause",
+ "devDependencies": {
+ "mocha": "~1.15.1"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/test.js b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/test.js
new file mode 100644
index 000000000..0bc972d84
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/buffer-equal-constant-time/test.js
@@ -0,0 +1,42 @@
+/*jshint node:true */
+'use strict';
+
+var bufferEq = require('./index');
+var assert = require('assert');
+
+describe('buffer-equal-constant-time', function() {
+ var a = new Buffer('asdfasdf123456');
+ var b = new Buffer('asdfasdf123456');
+ var c = new Buffer('asdfasdf');
+
+ describe('bufferEq', function() {
+ it('says a == b', function() {
+ assert.strictEqual(bufferEq(a, b), true);
+ });
+
+ it('says a != c', function() {
+ assert.strictEqual(bufferEq(a, c), false);
+ });
+ });
+
+ describe('install/restore', function() {
+ before(function() {
+ bufferEq.install();
+ });
+ after(function() {
+ bufferEq.restore();
+ });
+
+ it('installed an .equal method', function() {
+ var SlowBuffer = require('buffer').SlowBuffer;
+ assert.ok(Buffer.prototype.equal);
+ assert.ok(SlowBuffer.prototype.equal);
+ });
+
+ it('infected existing Buffers', function() {
+ assert.strictEqual(a.equal(b), true);
+ assert.strictEqual(a.equal(c), false);
+ });
+ });
+
+});
diff --git a/week-3/04-course-app-hard/node_modules/cors/CONTRIBUTING.md b/week-3/04-course-app-hard/node_modules/cors/CONTRIBUTING.md
new file mode 100644
index 000000000..591b09a13
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/cors/CONTRIBUTING.md
@@ -0,0 +1,33 @@
+# contributing to `cors`
+
+CORS is a node.js package for providing a [connect](http://www.senchalabs.org/connect/)/[express](http://expressjs.com/) middleware that can be used to enable [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) with various options. Learn more about the project in [the README](README.md).
+
+## The CORS Spec
+
+[http://www.w3.org/TR/cors/](http://www.w3.org/TR/cors/)
+
+## Pull Requests Welcome
+
+* Include `'use strict';` in every javascript file.
+* 2 space indentation.
+* Please run the testing steps below before submitting.
+
+## Testing
+
+```bash
+$ npm install
+$ npm test
+```
+
+## Interactive Testing Harness
+
+[http://node-cors-client.herokuapp.com](http://node-cors-client.herokuapp.com)
+
+Related git repositories:
+
+* [https://github.com/TroyGoode/node-cors-server](https://github.com/TroyGoode/node-cors-server)
+* [https://github.com/TroyGoode/node-cors-client](https://github.com/TroyGoode/node-cors-client)
+
+## License
+
+[MIT License](http://www.opensource.org/licenses/mit-license.php)
diff --git a/week-3/04-course-app-hard/node_modules/cors/HISTORY.md b/week-3/04-course-app-hard/node_modules/cors/HISTORY.md
new file mode 100644
index 000000000..5762bce92
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/cors/HISTORY.md
@@ -0,0 +1,58 @@
+2.8.5 / 2018-11-04
+==================
+
+ * Fix setting `maxAge` option to `0`
+
+2.8.4 / 2017-07-12
+==================
+
+ * Work-around Safari bug in default pre-flight response
+
+2.8.3 / 2017-03-29
+==================
+
+ * Fix error when options delegate missing `methods` option
+
+2.8.2 / 2017-03-28
+==================
+
+ * Fix error when frozen options are passed
+ * Send "Vary: Origin" when using regular expressions
+ * Send "Vary: Access-Control-Request-Headers" when dynamic `allowedHeaders`
+
+2.8.1 / 2016-09-08
+==================
+
+This release only changed documentation.
+
+2.8.0 / 2016-08-23
+==================
+
+ * Add `optionsSuccessStatus` option
+
+2.7.2 / 2016-08-23
+==================
+
+ * Fix error when Node.js running in strict mode
+
+2.7.1 / 2015-05-28
+==================
+
+ * Move module into expressjs organization
+
+2.7.0 / 2015-05-28
+==================
+
+ * Allow array of matching condition as `origin` option
+ * Allow regular expression as `origin` option
+
+2.6.1 / 2015-05-28
+==================
+
+ * Update `license` in package.json
+
+2.6.0 / 2015-04-27
+==================
+
+ * Add `preflightContinue` option
+ * Fix "Vary: Origin" header added for "*"
diff --git a/week-3/04-course-app-hard/node_modules/cors/LICENSE b/week-3/04-course-app-hard/node_modules/cors/LICENSE
new file mode 100644
index 000000000..fd10c843f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/cors/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2013 Troy Goode
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/cors/README.md b/week-3/04-course-app-hard/node_modules/cors/README.md
new file mode 100644
index 000000000..732b847ed
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/cors/README.md
@@ -0,0 +1,243 @@
+# cors
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+CORS is a node.js package for providing a [Connect](http://www.senchalabs.org/connect/)/[Express](http://expressjs.com/) middleware that can be used to enable [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) with various options.
+
+**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)**
+
+* [Installation](#installation)
+* [Usage](#usage)
+ * [Simple Usage](#simple-usage-enable-all-cors-requests)
+ * [Enable CORS for a Single Route](#enable-cors-for-a-single-route)
+ * [Configuring CORS](#configuring-cors)
+ * [Configuring CORS Asynchronously](#configuring-cors-asynchronously)
+ * [Enabling CORS Pre-Flight](#enabling-cors-pre-flight)
+* [Configuration Options](#configuration-options)
+* [Demo](#demo)
+* [License](#license)
+* [Author](#author)
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install cors
+```
+
+## Usage
+
+### Simple Usage (Enable *All* CORS Requests)
+
+```javascript
+var express = require('express')
+var cors = require('cors')
+var app = express()
+
+app.use(cors())
+
+app.get('/products/:id', function (req, res, next) {
+ res.json({msg: 'This is CORS-enabled for all origins!'})
+})
+
+app.listen(80, function () {
+ console.log('CORS-enabled web server listening on port 80')
+})
+```
+
+### Enable CORS for a Single Route
+
+```javascript
+var express = require('express')
+var cors = require('cors')
+var app = express()
+
+app.get('/products/:id', cors(), function (req, res, next) {
+ res.json({msg: 'This is CORS-enabled for a Single Route'})
+})
+
+app.listen(80, function () {
+ console.log('CORS-enabled web server listening on port 80')
+})
+```
+
+### Configuring CORS
+
+```javascript
+var express = require('express')
+var cors = require('cors')
+var app = express()
+
+var corsOptions = {
+ origin: 'http://example.com',
+ optionsSuccessStatus: 200 // some legacy browsers (IE11, various SmartTVs) choke on 204
+}
+
+app.get('/products/:id', cors(corsOptions), function (req, res, next) {
+ res.json({msg: 'This is CORS-enabled for only example.com.'})
+})
+
+app.listen(80, function () {
+ console.log('CORS-enabled web server listening on port 80')
+})
+```
+
+### Configuring CORS w/ Dynamic Origin
+
+```javascript
+var express = require('express')
+var cors = require('cors')
+var app = express()
+
+var whitelist = ['http://example1.com', 'http://example2.com']
+var corsOptions = {
+ origin: function (origin, callback) {
+ if (whitelist.indexOf(origin) !== -1) {
+ callback(null, true)
+ } else {
+ callback(new Error('Not allowed by CORS'))
+ }
+ }
+}
+
+app.get('/products/:id', cors(corsOptions), function (req, res, next) {
+ res.json({msg: 'This is CORS-enabled for a whitelisted domain.'})
+})
+
+app.listen(80, function () {
+ console.log('CORS-enabled web server listening on port 80')
+})
+```
+
+If you do not want to block REST tools or server-to-server requests,
+add a `!origin` check in the origin function like so:
+
+```javascript
+var corsOptions = {
+ origin: function (origin, callback) {
+ if (whitelist.indexOf(origin) !== -1 || !origin) {
+ callback(null, true)
+ } else {
+ callback(new Error('Not allowed by CORS'))
+ }
+ }
+}
+```
+
+### Enabling CORS Pre-Flight
+
+Certain CORS requests are considered 'complex' and require an initial
+`OPTIONS` request (called the "pre-flight request"). An example of a
+'complex' CORS request is one that uses an HTTP verb other than
+GET/HEAD/POST (such as DELETE) or that uses custom headers. To enable
+pre-flighting, you must add a new OPTIONS handler for the route you want
+to support:
+
+```javascript
+var express = require('express')
+var cors = require('cors')
+var app = express()
+
+app.options('/products/:id', cors()) // enable pre-flight request for DELETE request
+app.del('/products/:id', cors(), function (req, res, next) {
+ res.json({msg: 'This is CORS-enabled for all origins!'})
+})
+
+app.listen(80, function () {
+ console.log('CORS-enabled web server listening on port 80')
+})
+```
+
+You can also enable pre-flight across-the-board like so:
+
+```javascript
+app.options('*', cors()) // include before other routes
+```
+
+### Configuring CORS Asynchronously
+
+```javascript
+var express = require('express')
+var cors = require('cors')
+var app = express()
+
+var whitelist = ['http://example1.com', 'http://example2.com']
+var corsOptionsDelegate = function (req, callback) {
+ var corsOptions;
+ if (whitelist.indexOf(req.header('Origin')) !== -1) {
+ corsOptions = { origin: true } // reflect (enable) the requested origin in the CORS response
+ } else {
+ corsOptions = { origin: false } // disable CORS for this request
+ }
+ callback(null, corsOptions) // callback expects two parameters: error and options
+}
+
+app.get('/products/:id', cors(corsOptionsDelegate), function (req, res, next) {
+ res.json({msg: 'This is CORS-enabled for a whitelisted domain.'})
+})
+
+app.listen(80, function () {
+ console.log('CORS-enabled web server listening on port 80')
+})
+```
+
+## Configuration Options
+
+* `origin`: Configures the **Access-Control-Allow-Origin** CORS header. Possible values:
+ - `Boolean` - set `origin` to `true` to reflect the [request origin](http://tools.ietf.org/html/draft-abarth-origin-09), as defined by `req.header('Origin')`, or set it to `false` to disable CORS.
+ - `String` - set `origin` to a specific origin. For example if you set it to `"http://example.com"` only requests from "http://example.com" will be allowed.
+ - `RegExp` - set `origin` to a regular expression pattern which will be used to test the request origin. If it's a match, the request origin will be reflected. For example the pattern `/example\.com$/` will reflect any request that is coming from an origin ending with "example.com".
+ - `Array` - set `origin` to an array of valid origins. Each origin can be a `String` or a `RegExp`. For example `["http://example1.com", /\.example2\.com$/]` will accept any request from "http://example1.com" or from a subdomain of "example2.com".
+ - `Function` - set `origin` to a function implementing some custom logic. The function takes the request origin as the first parameter and a callback (which expects the signature `err [object], allow [bool]`) as the second.
+* `methods`: Configures the **Access-Control-Allow-Methods** CORS header. Expects a comma-delimited string (ex: 'GET,PUT,POST') or an array (ex: `['GET', 'PUT', 'POST']`).
+* `allowedHeaders`: Configures the **Access-Control-Allow-Headers** CORS header. Expects a comma-delimited string (ex: 'Content-Type,Authorization') or an array (ex: `['Content-Type', 'Authorization']`). If not specified, defaults to reflecting the headers specified in the request's **Access-Control-Request-Headers** header.
+* `exposedHeaders`: Configures the **Access-Control-Expose-Headers** CORS header. Expects a comma-delimited string (ex: 'Content-Range,X-Content-Range') or an array (ex: `['Content-Range', 'X-Content-Range']`). If not specified, no custom headers are exposed.
+* `credentials`: Configures the **Access-Control-Allow-Credentials** CORS header. Set to `true` to pass the header, otherwise it is omitted.
+* `maxAge`: Configures the **Access-Control-Max-Age** CORS header. Set to an integer to pass the header, otherwise it is omitted.
+* `preflightContinue`: Pass the CORS preflight response to the next handler.
+* `optionsSuccessStatus`: Provides a status code to use for successful `OPTIONS` requests, since some legacy browsers (IE11, various SmartTVs) choke on `204`.
+
+The default configuration is the equivalent of:
+
+```json
+{
+ "origin": "*",
+ "methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
+ "preflightContinue": false,
+ "optionsSuccessStatus": 204
+}
+```
+
+For details on the effect of each CORS header, read [this](http://www.html5rocks.com/en/tutorials/cors/) article on HTML5 Rocks.
+
+## Demo
+
+A demo that illustrates CORS working (and not working) using jQuery is available here: [http://node-cors-client.herokuapp.com/](http://node-cors-client.herokuapp.com/)
+
+Code for that demo can be found here:
+
+* Client: [https://github.com/TroyGoode/node-cors-client](https://github.com/TroyGoode/node-cors-client)
+* Server: [https://github.com/TroyGoode/node-cors-server](https://github.com/TroyGoode/node-cors-server)
+
+## License
+
+[MIT License](http://www.opensource.org/licenses/mit-license.php)
+
+## Author
+
+[Troy Goode](https://github.com/TroyGoode) ([troygoode@gmail.com](mailto:troygoode@gmail.com))
+
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/cors/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/cors?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/cors.svg
+[downloads-url]: https://npmjs.org/package/cors
+[npm-image]: https://img.shields.io/npm/v/cors.svg
+[npm-url]: https://npmjs.org/package/cors
+[travis-image]: https://img.shields.io/travis/expressjs/cors/master.svg
+[travis-url]: https://travis-ci.org/expressjs/cors
diff --git a/week-3/04-course-app-hard/node_modules/cors/lib/index.js b/week-3/04-course-app-hard/node_modules/cors/lib/index.js
new file mode 100644
index 000000000..5475aecd6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/cors/lib/index.js
@@ -0,0 +1,238 @@
+(function () {
+
+ 'use strict';
+
+ var assign = require('object-assign');
+ var vary = require('vary');
+
+ var defaults = {
+ origin: '*',
+ methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
+ preflightContinue: false,
+ optionsSuccessStatus: 204
+ };
+
+ function isString(s) {
+ return typeof s === 'string' || s instanceof String;
+ }
+
+ function isOriginAllowed(origin, allowedOrigin) {
+ if (Array.isArray(allowedOrigin)) {
+ for (var i = 0; i < allowedOrigin.length; ++i) {
+ if (isOriginAllowed(origin, allowedOrigin[i])) {
+ return true;
+ }
+ }
+ return false;
+ } else if (isString(allowedOrigin)) {
+ return origin === allowedOrigin;
+ } else if (allowedOrigin instanceof RegExp) {
+ return allowedOrigin.test(origin);
+ } else {
+ return !!allowedOrigin;
+ }
+ }
+
+ function configureOrigin(options, req) {
+ var requestOrigin = req.headers.origin,
+ headers = [],
+ isAllowed;
+
+ if (!options.origin || options.origin === '*') {
+ // allow any origin
+ headers.push([{
+ key: 'Access-Control-Allow-Origin',
+ value: '*'
+ }]);
+ } else if (isString(options.origin)) {
+ // fixed origin
+ headers.push([{
+ key: 'Access-Control-Allow-Origin',
+ value: options.origin
+ }]);
+ headers.push([{
+ key: 'Vary',
+ value: 'Origin'
+ }]);
+ } else {
+ isAllowed = isOriginAllowed(requestOrigin, options.origin);
+ // reflect origin
+ headers.push([{
+ key: 'Access-Control-Allow-Origin',
+ value: isAllowed ? requestOrigin : false
+ }]);
+ headers.push([{
+ key: 'Vary',
+ value: 'Origin'
+ }]);
+ }
+
+ return headers;
+ }
+
+ function configureMethods(options) {
+ var methods = options.methods;
+ if (methods.join) {
+ methods = options.methods.join(','); // .methods is an array, so turn it into a string
+ }
+ return {
+ key: 'Access-Control-Allow-Methods',
+ value: methods
+ };
+ }
+
+ function configureCredentials(options) {
+ if (options.credentials === true) {
+ return {
+ key: 'Access-Control-Allow-Credentials',
+ value: 'true'
+ };
+ }
+ return null;
+ }
+
+ function configureAllowedHeaders(options, req) {
+ var allowedHeaders = options.allowedHeaders || options.headers;
+ var headers = [];
+
+ if (!allowedHeaders) {
+ allowedHeaders = req.headers['access-control-request-headers']; // .headers wasn't specified, so reflect the request headers
+ headers.push([{
+ key: 'Vary',
+ value: 'Access-Control-Request-Headers'
+ }]);
+ } else if (allowedHeaders.join) {
+ allowedHeaders = allowedHeaders.join(','); // .headers is an array, so turn it into a string
+ }
+ if (allowedHeaders && allowedHeaders.length) {
+ headers.push([{
+ key: 'Access-Control-Allow-Headers',
+ value: allowedHeaders
+ }]);
+ }
+
+ return headers;
+ }
+
+ function configureExposedHeaders(options) {
+ var headers = options.exposedHeaders;
+ if (!headers) {
+ return null;
+ } else if (headers.join) {
+ headers = headers.join(','); // .headers is an array, so turn it into a string
+ }
+ if (headers && headers.length) {
+ return {
+ key: 'Access-Control-Expose-Headers',
+ value: headers
+ };
+ }
+ return null;
+ }
+
+ function configureMaxAge(options) {
+ var maxAge = (typeof options.maxAge === 'number' || options.maxAge) && options.maxAge.toString()
+ if (maxAge && maxAge.length) {
+ return {
+ key: 'Access-Control-Max-Age',
+ value: maxAge
+ };
+ }
+ return null;
+ }
+
+ function applyHeaders(headers, res) {
+ for (var i = 0, n = headers.length; i < n; i++) {
+ var header = headers[i];
+ if (header) {
+ if (Array.isArray(header)) {
+ applyHeaders(header, res);
+ } else if (header.key === 'Vary' && header.value) {
+ vary(res, header.value);
+ } else if (header.value) {
+ res.setHeader(header.key, header.value);
+ }
+ }
+ }
+ }
+
+ function cors(options, req, res, next) {
+ var headers = [],
+ method = req.method && req.method.toUpperCase && req.method.toUpperCase();
+
+ if (method === 'OPTIONS') {
+ // preflight
+ headers.push(configureOrigin(options, req));
+ headers.push(configureCredentials(options, req));
+ headers.push(configureMethods(options, req));
+ headers.push(configureAllowedHeaders(options, req));
+ headers.push(configureMaxAge(options, req));
+ headers.push(configureExposedHeaders(options, req));
+ applyHeaders(headers, res);
+
+ if (options.preflightContinue) {
+ next();
+ } else {
+ // Safari (and potentially other browsers) need content-length 0,
+ // for 204 or they just hang waiting for a body
+ res.statusCode = options.optionsSuccessStatus;
+ res.setHeader('Content-Length', '0');
+ res.end();
+ }
+ } else {
+ // actual response
+ headers.push(configureOrigin(options, req));
+ headers.push(configureCredentials(options, req));
+ headers.push(configureExposedHeaders(options, req));
+ applyHeaders(headers, res);
+ next();
+ }
+ }
+
+ function middlewareWrapper(o) {
+ // if options are static (either via defaults or custom options passed in), wrap in a function
+ var optionsCallback = null;
+ if (typeof o === 'function') {
+ optionsCallback = o;
+ } else {
+ optionsCallback = function (req, cb) {
+ cb(null, o);
+ };
+ }
+
+ return function corsMiddleware(req, res, next) {
+ optionsCallback(req, function (err, options) {
+ if (err) {
+ next(err);
+ } else {
+ var corsOptions = assign({}, defaults, options);
+ var originCallback = null;
+ if (corsOptions.origin && typeof corsOptions.origin === 'function') {
+ originCallback = corsOptions.origin;
+ } else if (corsOptions.origin) {
+ originCallback = function (origin, cb) {
+ cb(null, corsOptions.origin);
+ };
+ }
+
+ if (originCallback) {
+ originCallback(req.headers.origin, function (err2, origin) {
+ if (err2 || !origin) {
+ next(err2);
+ } else {
+ corsOptions.origin = origin;
+ cors(corsOptions, req, res, next);
+ }
+ });
+ } else {
+ next();
+ }
+ }
+ });
+ };
+ }
+
+ // can pass either an options hash, an options delegate, or nothing
+ module.exports = middlewareWrapper;
+
+}());
diff --git a/week-3/04-course-app-hard/node_modules/cors/package.json b/week-3/04-course-app-hard/node_modules/cors/package.json
new file mode 100644
index 000000000..ff37d9843
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/cors/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "cors",
+ "description": "Node.js CORS middleware",
+ "version": "2.8.5",
+ "author": "Troy Goode (https://github.com/troygoode/)",
+ "license": "MIT",
+ "keywords": [
+ "cors",
+ "express",
+ "connect",
+ "middleware"
+ ],
+ "repository": "expressjs/cors",
+ "main": "./lib/index.js",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "devDependencies": {
+ "after": "0.8.2",
+ "eslint": "2.13.1",
+ "express": "4.16.3",
+ "mocha": "5.2.0",
+ "nyc": "13.1.0",
+ "supertest": "3.3.0"
+ },
+ "files": [
+ "lib/index.js",
+ "CONTRIBUTING.md",
+ "HISTORY.md",
+ "LICENSE",
+ "README.md"
+ ],
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "scripts": {
+ "test": "npm run lint && nyc --reporter=html --reporter=text mocha --require test/support/env",
+ "lint": "eslint lib test"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/debug/LICENSE b/week-3/04-course-app-hard/node_modules/debug/LICENSE
new file mode 100644
index 000000000..1a9820e26
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/week-3/04-course-app-hard/node_modules/debug/README.md b/week-3/04-course-app-hard/node_modules/debug/README.md
new file mode 100644
index 000000000..e9c3e047c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/README.md
@@ -0,0 +1,481 @@
+# debug
+[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
+
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/index.js b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/index.js
new file mode 100644
index 000000000..c4498bcc2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/license.md b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/license.md
new file mode 100644
index 000000000..69b61253a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/package.json b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/package.json
new file mode 100644
index 000000000..eea666e1f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.1.2",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/readme.md b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/readme.md
new file mode 100644
index 000000000..9a1996b17
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/week-3/04-course-app-hard/node_modules/debug/package.json b/week-3/04-course-app-hard/node_modules/debug/package.json
new file mode 100644
index 000000000..cb6710385
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "debug",
+ "version": "4.3.5",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "Josh Junon (https://github.com/qix-)",
+ "contributors": [
+ "TJ Holowaychuk ",
+ "Nathan Rajlich (http://n8.io)",
+ "Andrew Rhyne "
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js test.node.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "sinon": "^14.0.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/debug/src/browser.js b/week-3/04-course-app-hard/node_modules/debug/src/browser.js
new file mode 100644
index 000000000..cd0fc35d1
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/week-3/04-course-app-hard/node_modules/debug/src/common.js b/week-3/04-course-app-hard/node_modules/debug/src/common.js
new file mode 100644
index 000000000..e3291b20f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/week-3/04-course-app-hard/node_modules/debug/src/index.js b/week-3/04-course-app-hard/node_modules/debug/src/index.js
new file mode 100644
index 000000000..bf4c57f25
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/week-3/04-course-app-hard/node_modules/debug/src/node.js b/week-3/04-course-app-hard/node_modules/debug/src/node.js
new file mode 100644
index 000000000..715560a4c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/CODEOWNERS b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/CODEOWNERS
new file mode 100644
index 000000000..4451d3d83
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/CODEOWNERS
@@ -0,0 +1 @@
+* @omsmith
diff --git a/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/LICENSE b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/LICENSE
new file mode 100644
index 000000000..8754ed630
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2015 D2L Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/README.md b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/README.md
new file mode 100644
index 000000000..daa95d6e4
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/README.md
@@ -0,0 +1,65 @@
+# ecdsa-sig-formatter
+
+[![Build Status](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter.svg?branch=master)](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter) [![Coverage Status](https://coveralls.io/repos/Brightspace/node-ecdsa-sig-formatter/badge.svg)](https://coveralls.io/r/Brightspace/node-ecdsa-sig-formatter)
+
+Translate between JOSE and ASN.1/DER encodings for ECDSA signatures
+
+## Install
+```sh
+npm install ecdsa-sig-formatter --save
+```
+
+## Usage
+```js
+var format = require('ecdsa-sig-formatter');
+
+var derSignature = '..'; // asn.1/DER encoded ecdsa signature
+
+var joseSignature = format.derToJose(derSignature);
+
+```
+
+### API
+
+---
+
+#### `.derToJose(Buffer|String signature, String alg)` -> `String`
+
+Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature.
+Returns a _base64 url_ encoded `String`.
+
+* If _signature_ is a `String`, it should be _base64_ encoded
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
+
+---
+
+#### `.joseToDer(Buffer|String signature, String alg)` -> `Buffer`
+
+Convert the JOSE-style concatenated signature to an ASN.1/DER encoded
+signature. Returns a `Buffer`
+
+* If _signature_ is a `String`, it should be _base64 url_ encoded
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
+
+## Contributing
+
+1. **Fork** the repository. Committing directly against this repository is
+ highly discouraged.
+
+2. Make your modifications in a branch, updating and writing new unit tests
+ as necessary in the `spec` directory.
+
+3. Ensure that all tests pass with `npm test`
+
+4. `rebase` your changes against master. *Do not merge*.
+
+5. Submit a pull request to this repository. Wait for tests to run and someone
+ to chime in.
+
+### Code Style
+
+This repository is configured with [EditorConfig][EditorConfig] and
+[ESLint][ESLint] rules.
+
+[EditorConfig]: http://editorconfig.org/
+[ESLint]: http://eslint.org
diff --git a/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/package.json b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/package.json
new file mode 100644
index 000000000..6fb5ebfe6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "ecdsa-sig-formatter",
+ "version": "1.0.11",
+ "description": "Translate ECDSA signatures between ASN.1/DER and JOSE-style concatenation",
+ "main": "src/ecdsa-sig-formatter.js",
+ "scripts": {
+ "check-style": "eslint .",
+ "pretest": "npm run check-style",
+ "test": "istanbul cover --root src _mocha -- spec",
+ "report-cov": "cat ./coverage/lcov.info | coveralls"
+ },
+ "typings": "./src/ecdsa-sig-formatter.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/Brightspace/node-ecdsa-sig-formatter.git"
+ },
+ "keywords": [
+ "ecdsa",
+ "der",
+ "asn.1",
+ "jwt",
+ "jwa",
+ "jsonwebtoken",
+ "jose"
+ ],
+ "author": "D2L Corporation",
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/Brightspace/node-ecdsa-sig-formatter/issues"
+ },
+ "homepage": "https://github.com/Brightspace/node-ecdsa-sig-formatter#readme",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "devDependencies": {
+ "bench": "^0.3.6",
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.9",
+ "eslint": "^2.12.0",
+ "eslint-config-brightspace": "^0.2.1",
+ "istanbul": "^0.4.3",
+ "jwk-to-pem": "^1.2.5",
+ "mocha": "^2.5.3",
+ "native-crypto": "^1.7.0"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts
new file mode 100644
index 000000000..9693aa030
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts
@@ -0,0 +1,17 @@
+///
+
+declare module "ecdsa-sig-formatter" {
+ /**
+ * Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. Returns a base64 url encoded String.
+ * If signature is a String, it should be base64 encoded
+ * alg must be one of ES256, ES384 or ES512
+ */
+ export function derToJose(signature: Buffer | string, alg: string): string;
+
+ /**
+ * Convert the JOSE-style concatenated signature to an ASN.1/DER encoded signature. Returns a Buffer
+ * If signature is a String, it should be base64 url encoded
+ * alg must be one of ES256, ES384 or ES512
+ */
+ export function joseToDer(signature: Buffer | string, alg: string): Buffer
+}
diff --git a/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
new file mode 100644
index 000000000..38eeb9b97
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
@@ -0,0 +1,187 @@
+'use strict';
+
+var Buffer = require('safe-buffer').Buffer;
+
+var getParamBytesForAlg = require('./param-bytes-for-alg');
+
+var MAX_OCTET = 0x80,
+ CLASS_UNIVERSAL = 0,
+ PRIMITIVE_BIT = 0x20,
+ TAG_SEQ = 0x10,
+ TAG_INT = 0x02,
+ ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6),
+ ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6);
+
+function base64Url(base64) {
+ return base64
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function signatureAsBuffer(signature) {
+ if (Buffer.isBuffer(signature)) {
+ return signature;
+ } else if ('string' === typeof signature) {
+ return Buffer.from(signature, 'base64');
+ }
+
+ throw new TypeError('ECDSA signature must be a Base64 string or a Buffer');
+}
+
+function derToJose(signature, alg) {
+ signature = signatureAsBuffer(signature);
+ var paramBytes = getParamBytesForAlg(alg);
+
+ // the DER encoded param should at most be the param size, plus a padding
+ // zero, since due to being a signed integer
+ var maxEncodedParamLength = paramBytes + 1;
+
+ var inputLength = signature.length;
+
+ var offset = 0;
+ if (signature[offset++] !== ENCODED_TAG_SEQ) {
+ throw new Error('Could not find expected "seq"');
+ }
+
+ var seqLength = signature[offset++];
+ if (seqLength === (MAX_OCTET | 1)) {
+ seqLength = signature[offset++];
+ }
+
+ if (inputLength - offset < seqLength) {
+ throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining');
+ }
+
+ if (signature[offset++] !== ENCODED_TAG_INT) {
+ throw new Error('Could not find expected "int" for "r"');
+ }
+
+ var rLength = signature[offset++];
+
+ if (inputLength - offset - 2 < rLength) {
+ throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available');
+ }
+
+ if (maxEncodedParamLength < rLength) {
+ throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
+ }
+
+ var rOffset = offset;
+ offset += rLength;
+
+ if (signature[offset++] !== ENCODED_TAG_INT) {
+ throw new Error('Could not find expected "int" for "s"');
+ }
+
+ var sLength = signature[offset++];
+
+ if (inputLength - offset !== sLength) {
+ throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"');
+ }
+
+ if (maxEncodedParamLength < sLength) {
+ throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
+ }
+
+ var sOffset = offset;
+ offset += sLength;
+
+ if (offset !== inputLength) {
+ throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain');
+ }
+
+ var rPadding = paramBytes - rLength,
+ sPadding = paramBytes - sLength;
+
+ var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength);
+
+ for (offset = 0; offset < rPadding; ++offset) {
+ dst[offset] = 0;
+ }
+ signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength);
+
+ offset = paramBytes;
+
+ for (var o = offset; offset < o + sPadding; ++offset) {
+ dst[offset] = 0;
+ }
+ signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength);
+
+ dst = dst.toString('base64');
+ dst = base64Url(dst);
+
+ return dst;
+}
+
+function countPadding(buf, start, stop) {
+ var padding = 0;
+ while (start + padding < stop && buf[start + padding] === 0) {
+ ++padding;
+ }
+
+ var needsSign = buf[start + padding] >= MAX_OCTET;
+ if (needsSign) {
+ --padding;
+ }
+
+ return padding;
+}
+
+function joseToDer(signature, alg) {
+ signature = signatureAsBuffer(signature);
+ var paramBytes = getParamBytesForAlg(alg);
+
+ var signatureBytes = signature.length;
+ if (signatureBytes !== paramBytes * 2) {
+ throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"');
+ }
+
+ var rPadding = countPadding(signature, 0, paramBytes);
+ var sPadding = countPadding(signature, paramBytes, signature.length);
+ var rLength = paramBytes - rPadding;
+ var sLength = paramBytes - sPadding;
+
+ var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength;
+
+ var shortLength = rsBytes < MAX_OCTET;
+
+ var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes);
+
+ var offset = 0;
+ dst[offset++] = ENCODED_TAG_SEQ;
+ if (shortLength) {
+ // Bit 8 has value "0"
+ // bits 7-1 give the length.
+ dst[offset++] = rsBytes;
+ } else {
+ // Bit 8 of first octet has value "1"
+ // bits 7-1 give the number of additional length octets.
+ dst[offset++] = MAX_OCTET | 1;
+ // length, base 256
+ dst[offset++] = rsBytes & 0xff;
+ }
+ dst[offset++] = ENCODED_TAG_INT;
+ dst[offset++] = rLength;
+ if (rPadding < 0) {
+ dst[offset++] = 0;
+ offset += signature.copy(dst, offset, 0, paramBytes);
+ } else {
+ offset += signature.copy(dst, offset, rPadding, paramBytes);
+ }
+ dst[offset++] = ENCODED_TAG_INT;
+ dst[offset++] = sLength;
+ if (sPadding < 0) {
+ dst[offset++] = 0;
+ signature.copy(dst, offset, paramBytes);
+ } else {
+ signature.copy(dst, offset, paramBytes + sPadding);
+ }
+
+ return dst;
+}
+
+module.exports = {
+ derToJose: derToJose,
+ joseToDer: joseToDer
+};
diff --git a/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
new file mode 100644
index 000000000..9fe67accd
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
@@ -0,0 +1,23 @@
+'use strict';
+
+function getParamSize(keySize) {
+ var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1);
+ return result;
+}
+
+var paramBytesForAlg = {
+ ES256: getParamSize(256),
+ ES384: getParamSize(384),
+ ES512: getParamSize(521)
+};
+
+function getParamBytesForAlg(alg) {
+ var paramBytes = paramBytesForAlg[alg];
+ if (paramBytes) {
+ return paramBytes;
+ }
+
+ throw new Error('Unknown algorithm "' + alg + '"');
+}
+
+module.exports = getParamBytesForAlg;
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/LICENSE b/week-3/04-course-app-hard/node_modules/jsonwebtoken/LICENSE
new file mode 100644
index 000000000..bcd1854c4
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Auth0, Inc. (http://auth0.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/README.md b/week-3/04-course-app-hard/node_modules/jsonwebtoken/README.md
new file mode 100644
index 000000000..4e20dd9c7
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/README.md
@@ -0,0 +1,396 @@
+# jsonwebtoken
+
+| **Build** | **Dependency** |
+|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
+| [![Build Status](https://secure.travis-ci.org/auth0/node-jsonwebtoken.svg?branch=master)](http://travis-ci.org/auth0/node-jsonwebtoken) | [![Dependency Status](https://david-dm.org/auth0/node-jsonwebtoken.svg)](https://david-dm.org/auth0/node-jsonwebtoken) |
+
+
+An implementation of [JSON Web Tokens](https://tools.ietf.org/html/rfc7519).
+
+This was developed against `draft-ietf-oauth-json-web-token-08`. It makes use of [node-jws](https://github.com/brianloveswords/node-jws)
+
+# Install
+
+```bash
+$ npm install jsonwebtoken
+```
+
+# Migration notes
+
+* [From v8 to v9](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9)
+* [From v7 to v8](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v7-to-v8)
+
+# Usage
+
+### jwt.sign(payload, secretOrPrivateKey, [options, callback])
+
+(Asynchronous) If a callback is supplied, the callback is called with the `err` or the JWT.
+
+(Synchronous) Returns the JsonWebToken as string
+
+`payload` could be an object literal, buffer or string representing valid JSON.
+> **Please _note_ that** `exp` or any other claim is only set if the payload is an object literal. Buffer or string payloads are not checked for JSON validity.
+
+> If `payload` is not a buffer or a string, it will be coerced into a string using `JSON.stringify`.
+
+`secretOrPrivateKey` is a string (utf-8 encoded), buffer, object, or KeyObject containing either the secret for HMAC algorithms or the PEM
+encoded private key for RSA and ECDSA. In case of a private key with passphrase an object `{ key, passphrase }` can be used (based on [crypto documentation](https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format)), in this case be sure you pass the `algorithm` option.
+When signing with RSA algorithms the minimum modulus length is 2048 except when the allowInsecureKeySizes option is set to true. Private keys below this size will be rejected with an error.
+
+`options`:
+
+* `algorithm` (default: `HS256`)
+* `expiresIn`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms).
+ > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`).
+* `notBefore`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms).
+ > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`).
+* `audience`
+* `issuer`
+* `jwtid`
+* `subject`
+* `noTimestamp`
+* `header`
+* `keyid`
+* `mutatePayload`: if true, the sign function will modify the payload object directly. This is useful if you need a raw reference to the payload after claims have been applied to it but before it has been encoded into a token.
+* `allowInsecureKeySizes`: if true allows private keys with a modulus below 2048 to be used for RSA
+* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided.
+
+
+
+> There are no default values for `expiresIn`, `notBefore`, `audience`, `subject`, `issuer`. These claims can also be provided in the payload directly with `exp`, `nbf`, `aud`, `sub` and `iss` respectively, but you **_can't_** include in both places.
+
+Remember that `exp`, `nbf` and `iat` are **NumericDate**, see related [Token Expiration (exp claim)](#token-expiration-exp-claim)
+
+
+The header can be customized via the `options.header` object.
+
+Generated jwts will include an `iat` (issued at) claim by default unless `noTimestamp` is specified. If `iat` is inserted in the payload, it will be used instead of the real timestamp for calculating other things like `exp` given a timespan in `options.expiresIn`.
+
+Synchronous Sign with default (HMAC SHA256)
+
+```js
+var jwt = require('jsonwebtoken');
+var token = jwt.sign({ foo: 'bar' }, 'shhhhh');
+```
+
+Synchronous Sign with RSA SHA256
+```js
+// sign with RSA SHA256
+var privateKey = fs.readFileSync('private.key');
+var token = jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' });
+```
+
+Sign asynchronously
+```js
+jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' }, function(err, token) {
+ console.log(token);
+});
+```
+
+Backdate a jwt 30 seconds
+```js
+var older_token = jwt.sign({ foo: 'bar', iat: Math.floor(Date.now() / 1000) - 30 }, 'shhhhh');
+```
+
+#### Token Expiration (exp claim)
+
+The standard for JWT defines an `exp` claim for expiration. The expiration is represented as a **NumericDate**:
+
+> A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. This is equivalent to the IEEE Std 1003.1, 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in which each day is accounted for by exactly 86400 seconds, other than that non-integer values can be represented. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular.
+
+This means that the `exp` field should contain the number of seconds since the epoch.
+
+Signing a token with 1 hour of expiration:
+
+```javascript
+jwt.sign({
+ exp: Math.floor(Date.now() / 1000) + (60 * 60),
+ data: 'foobar'
+}, 'secret');
+```
+
+Another way to generate a token like this with this library is:
+
+```javascript
+jwt.sign({
+ data: 'foobar'
+}, 'secret', { expiresIn: 60 * 60 });
+
+//or even better:
+
+jwt.sign({
+ data: 'foobar'
+}, 'secret', { expiresIn: '1h' });
+```
+
+### jwt.verify(token, secretOrPublicKey, [options, callback])
+
+(Asynchronous) If a callback is supplied, function acts asynchronously. The callback is called with the decoded payload if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will be called with the error.
+
+(Synchronous) If a callback is not supplied, function acts synchronously. Returns the payload decoded if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will throw the error.
+
+> __Warning:__ When the token comes from an untrusted source (e.g. user input or external requests), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected
+
+`token` is the JsonWebToken string
+
+`secretOrPublicKey` is a string (utf-8 encoded), buffer, or KeyObject containing either the secret for HMAC algorithms, or the PEM
+encoded public key for RSA and ECDSA.
+If `jwt.verify` is called asynchronous, `secretOrPublicKey` can be a function that should fetch the secret or public key. See below for a detailed example
+
+As mentioned in [this comment](https://github.com/auth0/node-jsonwebtoken/issues/208#issuecomment-231861138), there are other libraries that expect base64 encoded secrets (random bytes encoded using base64), if that is your case you can pass `Buffer.from(secret, 'base64')`, by doing this the secret will be decoded using base64 and the token verification will use the original random bytes.
+
+`options`
+
+* `algorithms`: List of strings with the names of the allowed algorithms. For instance, `["HS256", "HS384"]`.
+ > If not specified a defaults will be used based on the type of key provided
+ > * secret - ['HS256', 'HS384', 'HS512']
+ > * rsa - ['RS256', 'RS384', 'RS512']
+ > * ec - ['ES256', 'ES384', 'ES512']
+ > * default - ['RS256', 'RS384', 'RS512']
+* `audience`: if you want to check audience (`aud`), provide a value here. The audience can be checked against a string, a regular expression or a list of strings and/or regular expressions.
+ > Eg: `"urn:foo"`, `/urn:f[o]{2}/`, `[/urn:f[o]{2}/, "urn:bar"]`
+* `complete`: return an object with the decoded `{ payload, header, signature }` instead of only the usual content of the payload.
+* `issuer` (optional): string or array of strings of valid values for the `iss` field.
+* `jwtid` (optional): if you want to check JWT ID (`jti`), provide a string value here.
+* `ignoreExpiration`: if `true` do not validate the expiration of the token.
+* `ignoreNotBefore`...
+* `subject`: if you want to check subject (`sub`), provide a value here
+* `clockTolerance`: number of seconds to tolerate when checking the `nbf` and `exp` claims, to deal with small clock differences among different servers
+* `maxAge`: the maximum allowed age for tokens to still be valid. It is expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms).
+ > Eg: `1000`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`).
+* `clockTimestamp`: the time in seconds that should be used as the current time for all necessary comparisons.
+* `nonce`: if you want to check `nonce` claim, provide a string value here. It is used on Open ID for the ID Tokens. ([Open ID implementation notes](https://openid.net/specs/openid-connect-core-1_0.html#NonceNotes))
+* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided.
+
+```js
+// verify a token symmetric - synchronous
+var decoded = jwt.verify(token, 'shhhhh');
+console.log(decoded.foo) // bar
+
+// verify a token symmetric
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ console.log(decoded.foo) // bar
+});
+
+// invalid token - synchronous
+try {
+ var decoded = jwt.verify(token, 'wrong-secret');
+} catch(err) {
+ // err
+}
+
+// invalid token
+jwt.verify(token, 'wrong-secret', function(err, decoded) {
+ // err
+ // decoded undefined
+});
+
+// verify a token asymmetric
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, function(err, decoded) {
+ console.log(decoded.foo) // bar
+});
+
+// verify audience
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo' }, function(err, decoded) {
+ // if audience mismatch, err == invalid audience
+});
+
+// verify issuer
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(err, decoded) {
+ // if issuer mismatch, err == invalid issuer
+});
+
+// verify jwt id
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid' }, function(err, decoded) {
+ // if jwt id mismatch, err == invalid jwt id
+});
+
+// verify subject
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid', subject: 'subject' }, function(err, decoded) {
+ // if subject mismatch, err == invalid subject
+});
+
+// alg mismatch
+var cert = fs.readFileSync('public.pem'); // get public key
+jwt.verify(token, cert, { algorithms: ['RS256'] }, function (err, payload) {
+ // if token alg != RS256, err == invalid signature
+});
+
+// Verify using getKey callback
+// Example uses https://github.com/auth0/node-jwks-rsa as a way to fetch the keys.
+var jwksClient = require('jwks-rsa');
+var client = jwksClient({
+ jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json'
+});
+function getKey(header, callback){
+ client.getSigningKey(header.kid, function(err, key) {
+ var signingKey = key.publicKey || key.rsaPublicKey;
+ callback(null, signingKey);
+ });
+}
+
+jwt.verify(token, getKey, options, function(err, decoded) {
+ console.log(decoded.foo) // bar
+});
+
+```
+
+
+Need to peek into a JWT without verifying it? (Click to expand)
+
+### jwt.decode(token [, options])
+
+(Synchronous) Returns the decoded payload without verifying if the signature is valid.
+
+> __Warning:__ This will __not__ verify whether the signature is valid. You should __not__ use this for untrusted messages. You most likely want to use `jwt.verify` instead.
+
+> __Warning:__ When the token comes from an untrusted source (e.g. user input or external request), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected
+
+
+`token` is the JsonWebToken string
+
+`options`:
+
+* `json`: force JSON.parse on the payload even if the header doesn't contain `"typ":"JWT"`.
+* `complete`: return an object with the decoded payload and header.
+
+Example
+
+```js
+// get the decoded payload ignoring signature, no secretOrPrivateKey needed
+var decoded = jwt.decode(token);
+
+// get the decoded payload and header
+var decoded = jwt.decode(token, {complete: true});
+console.log(decoded.header);
+console.log(decoded.payload)
+```
+
+
+
+## Errors & Codes
+Possible thrown errors during verification.
+Error is the first argument of the verification callback.
+
+### TokenExpiredError
+
+Thrown error if the token is expired.
+
+Error object:
+
+* name: 'TokenExpiredError'
+* message: 'jwt expired'
+* expiredAt: [ExpDate]
+
+```js
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ if (err) {
+ /*
+ err = {
+ name: 'TokenExpiredError',
+ message: 'jwt expired',
+ expiredAt: 1408621000
+ }
+ */
+ }
+});
+```
+
+### JsonWebTokenError
+Error object:
+
+* name: 'JsonWebTokenError'
+* message:
+ * 'invalid token' - the header or payload could not be parsed
+ * 'jwt malformed' - the token does not have three components (delimited by a `.`)
+ * 'jwt signature is required'
+ * 'invalid signature'
+ * 'jwt audience invalid. expected: [OPTIONS AUDIENCE]'
+ * 'jwt issuer invalid. expected: [OPTIONS ISSUER]'
+ * 'jwt id invalid. expected: [OPTIONS JWT ID]'
+ * 'jwt subject invalid. expected: [OPTIONS SUBJECT]'
+
+```js
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ if (err) {
+ /*
+ err = {
+ name: 'JsonWebTokenError',
+ message: 'jwt malformed'
+ }
+ */
+ }
+});
+```
+
+### NotBeforeError
+Thrown if current time is before the nbf claim.
+
+Error object:
+
+* name: 'NotBeforeError'
+* message: 'jwt not active'
+* date: 2018-10-04T16:10:44.000Z
+
+```js
+jwt.verify(token, 'shhhhh', function(err, decoded) {
+ if (err) {
+ /*
+ err = {
+ name: 'NotBeforeError',
+ message: 'jwt not active',
+ date: 2018-10-04T16:10:44.000Z
+ }
+ */
+ }
+});
+```
+
+
+## Algorithms supported
+
+Array of supported algorithms. The following algorithms are currently supported.
+
+| alg Parameter Value | Digital Signature or MAC Algorithm |
+|---------------------|------------------------------------------------------------------------|
+| HS256 | HMAC using SHA-256 hash algorithm |
+| HS384 | HMAC using SHA-384 hash algorithm |
+| HS512 | HMAC using SHA-512 hash algorithm |
+| RS256 | RSASSA-PKCS1-v1_5 using SHA-256 hash algorithm |
+| RS384 | RSASSA-PKCS1-v1_5 using SHA-384 hash algorithm |
+| RS512 | RSASSA-PKCS1-v1_5 using SHA-512 hash algorithm |
+| PS256 | RSASSA-PSS using SHA-256 hash algorithm (only node ^6.12.0 OR >=8.0.0) |
+| PS384 | RSASSA-PSS using SHA-384 hash algorithm (only node ^6.12.0 OR >=8.0.0) |
+| PS512 | RSASSA-PSS using SHA-512 hash algorithm (only node ^6.12.0 OR >=8.0.0) |
+| ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm |
+| ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm |
+| ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm |
+| none | No digital signature or MAC value included |
+
+## Refreshing JWTs
+
+First of all, we recommend you to think carefully if auto-refreshing a JWT will not introduce any vulnerability in your system.
+
+We are not comfortable including this as part of the library, however, you can take a look at [this example](https://gist.github.com/ziluvatar/a3feb505c4c0ec37059054537b38fc48) to show how this could be accomplished.
+Apart from that example there are [an issue](https://github.com/auth0/node-jsonwebtoken/issues/122) and [a pull request](https://github.com/auth0/node-jsonwebtoken/pull/172) to get more knowledge about this topic.
+
+# TODO
+
+* X.509 certificate chain is not checked
+
+## Issue Reporting
+
+If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
+
+## Author
+
+[Auth0](https://auth0.com)
+
+## License
+
+This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/decode.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/decode.js
new file mode 100644
index 000000000..8fe1adcd3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/decode.js
@@ -0,0 +1,30 @@
+var jws = require('jws');
+
+module.exports = function (jwt, options) {
+ options = options || {};
+ var decoded = jws.decode(jwt, options);
+ if (!decoded) { return null; }
+ var payload = decoded.payload;
+
+ //try parse the payload
+ if(typeof payload === 'string') {
+ try {
+ var obj = JSON.parse(payload);
+ if(obj !== null && typeof obj === 'object') {
+ payload = obj;
+ }
+ } catch (e) { }
+ }
+
+ //return header if `complete` option is enabled. header includes claims
+ //such as `kid` and `alg` used to select the key within a JWKS needed to
+ //verify the signature
+ if (options.complete === true) {
+ return {
+ header: decoded.header,
+ payload: payload,
+ signature: decoded.signature
+ };
+ }
+ return payload;
+};
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/index.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/index.js
new file mode 100644
index 000000000..161eb2dd1
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/index.js
@@ -0,0 +1,8 @@
+module.exports = {
+ decode: require('./decode'),
+ verify: require('./verify'),
+ sign: require('./sign'),
+ JsonWebTokenError: require('./lib/JsonWebTokenError'),
+ NotBeforeError: require('./lib/NotBeforeError'),
+ TokenExpiredError: require('./lib/TokenExpiredError'),
+};
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/JsonWebTokenError.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/JsonWebTokenError.js
new file mode 100644
index 000000000..e068222a0
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/JsonWebTokenError.js
@@ -0,0 +1,14 @@
+var JsonWebTokenError = function (message, error) {
+ Error.call(this, message);
+ if(Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+ this.name = 'JsonWebTokenError';
+ this.message = message;
+ if (error) this.inner = error;
+};
+
+JsonWebTokenError.prototype = Object.create(Error.prototype);
+JsonWebTokenError.prototype.constructor = JsonWebTokenError;
+
+module.exports = JsonWebTokenError;
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/NotBeforeError.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/NotBeforeError.js
new file mode 100644
index 000000000..7b30084fb
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/NotBeforeError.js
@@ -0,0 +1,13 @@
+var JsonWebTokenError = require('./JsonWebTokenError');
+
+var NotBeforeError = function (message, date) {
+ JsonWebTokenError.call(this, message);
+ this.name = 'NotBeforeError';
+ this.date = date;
+};
+
+NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype);
+
+NotBeforeError.prototype.constructor = NotBeforeError;
+
+module.exports = NotBeforeError;
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/TokenExpiredError.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/TokenExpiredError.js
new file mode 100644
index 000000000..abb704f23
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/TokenExpiredError.js
@@ -0,0 +1,13 @@
+var JsonWebTokenError = require('./JsonWebTokenError');
+
+var TokenExpiredError = function (message, expiredAt) {
+ JsonWebTokenError.call(this, message);
+ this.name = 'TokenExpiredError';
+ this.expiredAt = expiredAt;
+};
+
+TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype);
+
+TokenExpiredError.prototype.constructor = TokenExpiredError;
+
+module.exports = TokenExpiredError;
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
new file mode 100644
index 000000000..a6ede56e3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
@@ -0,0 +1,3 @@
+const semver = require('semver');
+
+module.exports = semver.satisfies(process.version, '>=15.7.0');
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/psSupported.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/psSupported.js
new file mode 100644
index 000000000..8c04144a1
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/psSupported.js
@@ -0,0 +1,3 @@
+var semver = require('semver');
+
+module.exports = semver.satisfies(process.version, '^6.12.0 || >=8.0.0');
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
new file mode 100644
index 000000000..7fcf36846
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
@@ -0,0 +1,3 @@
+const semver = require('semver');
+
+module.exports = semver.satisfies(process.version, '>=16.9.0');
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/timespan.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/timespan.js
new file mode 100644
index 000000000..e50986908
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/timespan.js
@@ -0,0 +1,18 @@
+var ms = require('ms');
+
+module.exports = function (time, iat) {
+ var timestamp = iat || Math.floor(Date.now() / 1000);
+
+ if (typeof time === 'string') {
+ var milliseconds = ms(time);
+ if (typeof milliseconds === 'undefined') {
+ return;
+ }
+ return Math.floor(timestamp + milliseconds / 1000);
+ } else if (typeof time === 'number') {
+ return timestamp + time;
+ } else {
+ return;
+ }
+
+};
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js
new file mode 100644
index 000000000..c10340b03
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js
@@ -0,0 +1,66 @@
+const ASYMMETRIC_KEY_DETAILS_SUPPORTED = require('./asymmetricKeyDetailsSupported');
+const RSA_PSS_KEY_DETAILS_SUPPORTED = require('./rsaPssKeyDetailsSupported');
+
+const allowedAlgorithmsForKeys = {
+ 'ec': ['ES256', 'ES384', 'ES512'],
+ 'rsa': ['RS256', 'PS256', 'RS384', 'PS384', 'RS512', 'PS512'],
+ 'rsa-pss': ['PS256', 'PS384', 'PS512']
+};
+
+const allowedCurves = {
+ ES256: 'prime256v1',
+ ES384: 'secp384r1',
+ ES512: 'secp521r1',
+};
+
+module.exports = function(algorithm, key) {
+ if (!algorithm || !key) return;
+
+ const keyType = key.asymmetricKeyType;
+ if (!keyType) return;
+
+ const allowedAlgorithms = allowedAlgorithmsForKeys[keyType];
+
+ if (!allowedAlgorithms) {
+ throw new Error(`Unknown key type "${keyType}".`);
+ }
+
+ if (!allowedAlgorithms.includes(algorithm)) {
+ throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(', ')}.`)
+ }
+
+ /*
+ * Ignore the next block from test coverage because it gets executed
+ * conditionally depending on the Node version. Not ignoring it would
+ * prevent us from reaching the target % of coverage for versions of
+ * Node under 15.7.0.
+ */
+ /* istanbul ignore next */
+ if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) {
+ switch (keyType) {
+ case 'ec':
+ const keyCurve = key.asymmetricKeyDetails.namedCurve;
+ const allowedCurve = allowedCurves[algorithm];
+
+ if (keyCurve !== allowedCurve) {
+ throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`);
+ }
+ break;
+
+ case 'rsa-pss':
+ if (RSA_PSS_KEY_DETAILS_SUPPORTED) {
+ const length = parseInt(algorithm.slice(-3), 10);
+ const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails;
+
+ if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) {
+ throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`);
+ }
+
+ if (saltLength !== undefined && saltLength > length >> 3) {
+ throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`)
+ }
+ }
+ break;
+ }
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/package.json b/week-3/04-course-app-hard/node_modules/jsonwebtoken/package.json
new file mode 100644
index 000000000..81f78da07
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "jsonwebtoken",
+ "version": "9.0.2",
+ "description": "JSON Web Token implementation (symmetric and asymmetric)",
+ "main": "index.js",
+ "nyc": {
+ "check-coverage": true,
+ "lines": 95,
+ "statements": 95,
+ "functions": 100,
+ "branches": 95,
+ "exclude": [
+ "./test/**"
+ ],
+ "reporter": [
+ "json",
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "coverage": "nyc mocha --use_strict",
+ "test": "npm run lint && npm run coverage && cost-of-modules"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/auth0/node-jsonwebtoken"
+ },
+ "keywords": [
+ "jwt"
+ ],
+ "author": "auth0",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/auth0/node-jsonwebtoken/issues"
+ },
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "devDependencies": {
+ "atob": "^2.1.2",
+ "chai": "^4.1.2",
+ "conventional-changelog": "~1.1.0",
+ "cost-of-modules": "^1.0.1",
+ "eslint": "^4.19.1",
+ "mocha": "^5.2.0",
+ "nsp": "^2.6.2",
+ "nyc": "^11.9.0",
+ "sinon": "^6.0.0"
+ },
+ "engines": {
+ "npm": ">=6",
+ "node": ">=12"
+ },
+ "files": [
+ "lib",
+ "decode.js",
+ "sign.js",
+ "verify.js"
+ ]
+}
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/sign.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/sign.js
new file mode 100644
index 000000000..82bf526e2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/sign.js
@@ -0,0 +1,253 @@
+const timespan = require('./lib/timespan');
+const PS_SUPPORTED = require('./lib/psSupported');
+const validateAsymmetricKey = require('./lib/validateAsymmetricKey');
+const jws = require('jws');
+const includes = require('lodash.includes');
+const isBoolean = require('lodash.isboolean');
+const isInteger = require('lodash.isinteger');
+const isNumber = require('lodash.isnumber');
+const isPlainObject = require('lodash.isplainobject');
+const isString = require('lodash.isstring');
+const once = require('lodash.once');
+const { KeyObject, createSecretKey, createPrivateKey } = require('crypto')
+
+const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none'];
+if (PS_SUPPORTED) {
+ SUPPORTED_ALGS.splice(3, 0, 'PS256', 'PS384', 'PS512');
+}
+
+const sign_options_schema = {
+ expiresIn: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"expiresIn" should be a number of seconds or string representing a timespan' },
+ notBefore: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"notBefore" should be a number of seconds or string representing a timespan' },
+ audience: { isValid: function(value) { return isString(value) || Array.isArray(value); }, message: '"audience" must be a string or array' },
+ algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' },
+ header: { isValid: isPlainObject, message: '"header" must be an object' },
+ encoding: { isValid: isString, message: '"encoding" must be a string' },
+ issuer: { isValid: isString, message: '"issuer" must be a string' },
+ subject: { isValid: isString, message: '"subject" must be a string' },
+ jwtid: { isValid: isString, message: '"jwtid" must be a string' },
+ noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' },
+ keyid: { isValid: isString, message: '"keyid" must be a string' },
+ mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' },
+ allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean'},
+ allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean'}
+};
+
+const registered_claims_schema = {
+ iat: { isValid: isNumber, message: '"iat" should be a number of seconds' },
+ exp: { isValid: isNumber, message: '"exp" should be a number of seconds' },
+ nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' }
+};
+
+function validate(schema, allowUnknown, object, parameterName) {
+ if (!isPlainObject(object)) {
+ throw new Error('Expected "' + parameterName + '" to be a plain object.');
+ }
+ Object.keys(object)
+ .forEach(function(key) {
+ const validator = schema[key];
+ if (!validator) {
+ if (!allowUnknown) {
+ throw new Error('"' + key + '" is not allowed in "' + parameterName + '"');
+ }
+ return;
+ }
+ if (!validator.isValid(object[key])) {
+ throw new Error(validator.message);
+ }
+ });
+}
+
+function validateOptions(options) {
+ return validate(sign_options_schema, false, options, 'options');
+}
+
+function validatePayload(payload) {
+ return validate(registered_claims_schema, true, payload, 'payload');
+}
+
+const options_to_payload = {
+ 'audience': 'aud',
+ 'issuer': 'iss',
+ 'subject': 'sub',
+ 'jwtid': 'jti'
+};
+
+const options_for_objects = [
+ 'expiresIn',
+ 'notBefore',
+ 'noTimestamp',
+ 'audience',
+ 'issuer',
+ 'subject',
+ 'jwtid',
+];
+
+module.exports = function (payload, secretOrPrivateKey, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ } else {
+ options = options || {};
+ }
+
+ const isObjectPayload = typeof payload === 'object' &&
+ !Buffer.isBuffer(payload);
+
+ const header = Object.assign({
+ alg: options.algorithm || 'HS256',
+ typ: isObjectPayload ? 'JWT' : undefined,
+ kid: options.keyid
+ }, options.header);
+
+ function failure(err) {
+ if (callback) {
+ return callback(err);
+ }
+ throw err;
+ }
+
+ if (!secretOrPrivateKey && options.algorithm !== 'none') {
+ return failure(new Error('secretOrPrivateKey must have a value'));
+ }
+
+ if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) {
+ try {
+ secretOrPrivateKey = createPrivateKey(secretOrPrivateKey)
+ } catch (_) {
+ try {
+ secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === 'string' ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey)
+ } catch (_) {
+ return failure(new Error('secretOrPrivateKey is not valid key material'));
+ }
+ }
+ }
+
+ if (header.alg.startsWith('HS') && secretOrPrivateKey.type !== 'secret') {
+ return failure(new Error((`secretOrPrivateKey must be a symmetric key when using ${header.alg}`)))
+ } else if (/^(?:RS|PS|ES)/.test(header.alg)) {
+ if (secretOrPrivateKey.type !== 'private') {
+ return failure(new Error((`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`)))
+ }
+ if (!options.allowInsecureKeySizes &&
+ !header.alg.startsWith('ES') &&
+ secretOrPrivateKey.asymmetricKeyDetails !== undefined && //KeyObject.asymmetricKeyDetails is supported in Node 15+
+ secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) {
+ return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`));
+ }
+ }
+
+ if (typeof payload === 'undefined') {
+ return failure(new Error('payload is required'));
+ } else if (isObjectPayload) {
+ try {
+ validatePayload(payload);
+ }
+ catch (error) {
+ return failure(error);
+ }
+ if (!options.mutatePayload) {
+ payload = Object.assign({},payload);
+ }
+ } else {
+ const invalid_options = options_for_objects.filter(function (opt) {
+ return typeof options[opt] !== 'undefined';
+ });
+
+ if (invalid_options.length > 0) {
+ return failure(new Error('invalid ' + invalid_options.join(',') + ' option for ' + (typeof payload ) + ' payload'));
+ }
+ }
+
+ if (typeof payload.exp !== 'undefined' && typeof options.expiresIn !== 'undefined') {
+ return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));
+ }
+
+ if (typeof payload.nbf !== 'undefined' && typeof options.notBefore !== 'undefined') {
+ return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));
+ }
+
+ try {
+ validateOptions(options);
+ }
+ catch (error) {
+ return failure(error);
+ }
+
+ if (!options.allowInvalidAsymmetricKeyTypes) {
+ try {
+ validateAsymmetricKey(header.alg, secretOrPrivateKey);
+ } catch (error) {
+ return failure(error);
+ }
+ }
+
+ const timestamp = payload.iat || Math.floor(Date.now() / 1000);
+
+ if (options.noTimestamp) {
+ delete payload.iat;
+ } else if (isObjectPayload) {
+ payload.iat = timestamp;
+ }
+
+ if (typeof options.notBefore !== 'undefined') {
+ try {
+ payload.nbf = timespan(options.notBefore, timestamp);
+ }
+ catch (err) {
+ return failure(err);
+ }
+ if (typeof payload.nbf === 'undefined') {
+ return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
+ }
+ }
+
+ if (typeof options.expiresIn !== 'undefined' && typeof payload === 'object') {
+ try {
+ payload.exp = timespan(options.expiresIn, timestamp);
+ }
+ catch (err) {
+ return failure(err);
+ }
+ if (typeof payload.exp === 'undefined') {
+ return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
+ }
+ }
+
+ Object.keys(options_to_payload).forEach(function (key) {
+ const claim = options_to_payload[key];
+ if (typeof options[key] !== 'undefined') {
+ if (typeof payload[claim] !== 'undefined') {
+ return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.'));
+ }
+ payload[claim] = options[key];
+ }
+ });
+
+ const encoding = options.encoding || 'utf8';
+
+ if (typeof callback === 'function') {
+ callback = callback && once(callback);
+
+ jws.createSign({
+ header: header,
+ privateKey: secretOrPrivateKey,
+ payload: payload,
+ encoding: encoding
+ }).once('error', callback)
+ .once('done', function (signature) {
+ // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version
+ if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) {
+ return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`))
+ }
+ callback(null, signature);
+ });
+ } else {
+ let signature = jws.sign({header: header, payload: payload, secret: secretOrPrivateKey, encoding: encoding});
+ // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version
+ if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) {
+ throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)
+ }
+ return signature
+ }
+};
diff --git a/week-3/04-course-app-hard/node_modules/jsonwebtoken/verify.js b/week-3/04-course-app-hard/node_modules/jsonwebtoken/verify.js
new file mode 100644
index 000000000..cdbfdc45f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jsonwebtoken/verify.js
@@ -0,0 +1,263 @@
+const JsonWebTokenError = require('./lib/JsonWebTokenError');
+const NotBeforeError = require('./lib/NotBeforeError');
+const TokenExpiredError = require('./lib/TokenExpiredError');
+const decode = require('./decode');
+const timespan = require('./lib/timespan');
+const validateAsymmetricKey = require('./lib/validateAsymmetricKey');
+const PS_SUPPORTED = require('./lib/psSupported');
+const jws = require('jws');
+const {KeyObject, createSecretKey, createPublicKey} = require("crypto");
+
+const PUB_KEY_ALGS = ['RS256', 'RS384', 'RS512'];
+const EC_KEY_ALGS = ['ES256', 'ES384', 'ES512'];
+const RSA_KEY_ALGS = ['RS256', 'RS384', 'RS512'];
+const HS_ALGS = ['HS256', 'HS384', 'HS512'];
+
+if (PS_SUPPORTED) {
+ PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512');
+ RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512');
+}
+
+module.exports = function (jwtString, secretOrPublicKey, options, callback) {
+ if ((typeof options === 'function') && !callback) {
+ callback = options;
+ options = {};
+ }
+
+ if (!options) {
+ options = {};
+ }
+
+ //clone this object since we are going to mutate it.
+ options = Object.assign({}, options);
+
+ let done;
+
+ if (callback) {
+ done = callback;
+ } else {
+ done = function(err, data) {
+ if (err) throw err;
+ return data;
+ };
+ }
+
+ if (options.clockTimestamp && typeof options.clockTimestamp !== 'number') {
+ return done(new JsonWebTokenError('clockTimestamp must be a number'));
+ }
+
+ if (options.nonce !== undefined && (typeof options.nonce !== 'string' || options.nonce.trim() === '')) {
+ return done(new JsonWebTokenError('nonce must be a non-empty string'));
+ }
+
+ if (options.allowInvalidAsymmetricKeyTypes !== undefined && typeof options.allowInvalidAsymmetricKeyTypes !== 'boolean') {
+ return done(new JsonWebTokenError('allowInvalidAsymmetricKeyTypes must be a boolean'));
+ }
+
+ const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1000);
+
+ if (!jwtString){
+ return done(new JsonWebTokenError('jwt must be provided'));
+ }
+
+ if (typeof jwtString !== 'string') {
+ return done(new JsonWebTokenError('jwt must be a string'));
+ }
+
+ const parts = jwtString.split('.');
+
+ if (parts.length !== 3){
+ return done(new JsonWebTokenError('jwt malformed'));
+ }
+
+ let decodedToken;
+
+ try {
+ decodedToken = decode(jwtString, { complete: true });
+ } catch(err) {
+ return done(err);
+ }
+
+ if (!decodedToken) {
+ return done(new JsonWebTokenError('invalid token'));
+ }
+
+ const header = decodedToken.header;
+ let getSecret;
+
+ if(typeof secretOrPublicKey === 'function') {
+ if(!callback) {
+ return done(new JsonWebTokenError('verify must be called asynchronous if secret or public key is provided as a callback'));
+ }
+
+ getSecret = secretOrPublicKey;
+ }
+ else {
+ getSecret = function(header, secretCallback) {
+ return secretCallback(null, secretOrPublicKey);
+ };
+ }
+
+ return getSecret(header, function(err, secretOrPublicKey) {
+ if(err) {
+ return done(new JsonWebTokenError('error in secret or public key callback: ' + err.message));
+ }
+
+ const hasSignature = parts[2].trim() !== '';
+
+ if (!hasSignature && secretOrPublicKey){
+ return done(new JsonWebTokenError('jwt signature is required'));
+ }
+
+ if (hasSignature && !secretOrPublicKey) {
+ return done(new JsonWebTokenError('secret or public key must be provided'));
+ }
+
+ if (!hasSignature && !options.algorithms) {
+ return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens'));
+ }
+
+ if (secretOrPublicKey != null && !(secretOrPublicKey instanceof KeyObject)) {
+ try {
+ secretOrPublicKey = createPublicKey(secretOrPublicKey);
+ } catch (_) {
+ try {
+ secretOrPublicKey = createSecretKey(typeof secretOrPublicKey === 'string' ? Buffer.from(secretOrPublicKey) : secretOrPublicKey);
+ } catch (_) {
+ return done(new JsonWebTokenError('secretOrPublicKey is not valid key material'))
+ }
+ }
+ }
+
+ if (!options.algorithms) {
+ if (secretOrPublicKey.type === 'secret') {
+ options.algorithms = HS_ALGS;
+ } else if (['rsa', 'rsa-pss'].includes(secretOrPublicKey.asymmetricKeyType)) {
+ options.algorithms = RSA_KEY_ALGS
+ } else if (secretOrPublicKey.asymmetricKeyType === 'ec') {
+ options.algorithms = EC_KEY_ALGS
+ } else {
+ options.algorithms = PUB_KEY_ALGS
+ }
+ }
+
+ if (options.algorithms.indexOf(decodedToken.header.alg) === -1) {
+ return done(new JsonWebTokenError('invalid algorithm'));
+ }
+
+ if (header.alg.startsWith('HS') && secretOrPublicKey.type !== 'secret') {
+ return done(new JsonWebTokenError((`secretOrPublicKey must be a symmetric key when using ${header.alg}`)))
+ } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey.type !== 'public') {
+ return done(new JsonWebTokenError((`secretOrPublicKey must be an asymmetric key when using ${header.alg}`)))
+ }
+
+ if (!options.allowInvalidAsymmetricKeyTypes) {
+ try {
+ validateAsymmetricKey(header.alg, secretOrPublicKey);
+ } catch (e) {
+ return done(e);
+ }
+ }
+
+ let valid;
+
+ try {
+ valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey);
+ } catch (e) {
+ return done(e);
+ }
+
+ if (!valid) {
+ return done(new JsonWebTokenError('invalid signature'));
+ }
+
+ const payload = decodedToken.payload;
+
+ if (typeof payload.nbf !== 'undefined' && !options.ignoreNotBefore) {
+ if (typeof payload.nbf !== 'number') {
+ return done(new JsonWebTokenError('invalid nbf value'));
+ }
+ if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) {
+ return done(new NotBeforeError('jwt not active', new Date(payload.nbf * 1000)));
+ }
+ }
+
+ if (typeof payload.exp !== 'undefined' && !options.ignoreExpiration) {
+ if (typeof payload.exp !== 'number') {
+ return done(new JsonWebTokenError('invalid exp value'));
+ }
+ if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) {
+ return done(new TokenExpiredError('jwt expired', new Date(payload.exp * 1000)));
+ }
+ }
+
+ if (options.audience) {
+ const audiences = Array.isArray(options.audience) ? options.audience : [options.audience];
+ const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud];
+
+ const match = target.some(function (targetAudience) {
+ return audiences.some(function (audience) {
+ return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience;
+ });
+ });
+
+ if (!match) {
+ return done(new JsonWebTokenError('jwt audience invalid. expected: ' + audiences.join(' or ')));
+ }
+ }
+
+ if (options.issuer) {
+ const invalid_issuer =
+ (typeof options.issuer === 'string' && payload.iss !== options.issuer) ||
+ (Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1);
+
+ if (invalid_issuer) {
+ return done(new JsonWebTokenError('jwt issuer invalid. expected: ' + options.issuer));
+ }
+ }
+
+ if (options.subject) {
+ if (payload.sub !== options.subject) {
+ return done(new JsonWebTokenError('jwt subject invalid. expected: ' + options.subject));
+ }
+ }
+
+ if (options.jwtid) {
+ if (payload.jti !== options.jwtid) {
+ return done(new JsonWebTokenError('jwt jwtid invalid. expected: ' + options.jwtid));
+ }
+ }
+
+ if (options.nonce) {
+ if (payload.nonce !== options.nonce) {
+ return done(new JsonWebTokenError('jwt nonce invalid. expected: ' + options.nonce));
+ }
+ }
+
+ if (options.maxAge) {
+ if (typeof payload.iat !== 'number') {
+ return done(new JsonWebTokenError('iat required when maxAge is specified'));
+ }
+
+ const maxAgeTimestamp = timespan(options.maxAge, payload.iat);
+ if (typeof maxAgeTimestamp === 'undefined') {
+ return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
+ }
+ if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) {
+ return done(new TokenExpiredError('maxAge exceeded', new Date(maxAgeTimestamp * 1000)));
+ }
+ }
+
+ if (options.complete === true) {
+ const signature = decodedToken.signature;
+
+ return done(null, {
+ header: header,
+ payload: payload,
+ signature: signature
+ });
+ }
+
+ return done(null, payload);
+ });
+};
diff --git a/week-3/04-course-app-hard/node_modules/jwa/LICENSE b/week-3/04-course-app-hard/node_modules/jwa/LICENSE
new file mode 100644
index 000000000..caeb8495c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jwa/LICENSE
@@ -0,0 +1,17 @@
+Copyright (c) 2013 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/jwa/README.md b/week-3/04-course-app-hard/node_modules/jwa/README.md
new file mode 100644
index 000000000..fb433e238
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jwa/README.md
@@ -0,0 +1,150 @@
+# node-jwa [![Build Status](https://travis-ci.org/brianloveswords/node-jwa.svg?branch=master)](https://travis-ci.org/brianloveswords/node-jwa)
+
+A
+[JSON Web Algorithms](http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html)
+implementation focusing (exclusively, at this point) on the algorithms necessary for
+[JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html).
+
+This library supports all of the required, recommended and optional cryptographic algorithms for JWS:
+
+alg Parameter Value | Digital Signature or MAC Algorithm
+----------------|----------------------------
+HS256 | HMAC using SHA-256 hash algorithm
+HS384 | HMAC using SHA-384 hash algorithm
+HS512 | HMAC using SHA-512 hash algorithm
+RS256 | RSASSA using SHA-256 hash algorithm
+RS384 | RSASSA using SHA-384 hash algorithm
+RS512 | RSASSA using SHA-512 hash algorithm
+PS256 | RSASSA-PSS using SHA-256 hash algorithm
+PS384 | RSASSA-PSS using SHA-384 hash algorithm
+PS512 | RSASSA-PSS using SHA-512 hash algorithm
+ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm
+ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm
+ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm
+none | No digital signature or MAC value included
+
+Please note that PS* only works on Node 6.12+ (excluding 7.x).
+
+# Requirements
+
+In order to run the tests, a recent version of OpenSSL is
+required. **The version that comes with OS X (OpenSSL 0.9.8r 8 Feb
+2011) is not recent enough**, as it does not fully support ECDSA
+keys. You'll need to use a version > 1.0.0; I tested with OpenSSL 1.0.1c 10 May 2012.
+
+# Testing
+
+To run the tests, do
+
+```bash
+$ npm test
+```
+
+This will generate a bunch of keypairs to use in testing. If you want to
+generate new keypairs, do `make clean` before running `npm test` again.
+
+## Methodology
+
+I spawn `openssl dgst -sign` to test OpenSSL sign → JS verify and
+`openssl dgst -verify` to test JS sign → OpenSSL verify for each of the
+RSA and ECDSA algorithms.
+
+# Usage
+
+## jwa(algorithm)
+
+Creates a new `jwa` object with `sign` and `verify` methods for the
+algorithm. Valid values for algorithm can be found in the table above
+(`'HS256'`, `'HS384'`, etc) and are case-insensitive. Passing an invalid
+algorithm value will throw a `TypeError`.
+
+
+## jwa#sign(input, secretOrPrivateKey)
+
+Sign some input with either a secret for HMAC algorithms, or a private
+key for RSA and ECDSA algorithms.
+
+If input is not already a string or buffer, `JSON.stringify` will be
+called on it to attempt to coerce it.
+
+For the HMAC algorithm, `secretOrPrivateKey` should be a string or a
+buffer. For ECDSA and RSA, the value should be a string representing a
+PEM encoded **private** key.
+
+Output [base64url](http://en.wikipedia.org/wiki/Base64#URL_applications)
+formatted. This is for convenience as JWS expects the signature in this
+format. If your application needs the output in a different format,
+[please open an issue](https://github.com/brianloveswords/node-jwa/issues). In
+the meantime, you can use
+[brianloveswords/base64url](https://github.com/brianloveswords/base64url)
+to decode the signature.
+
+As of nodejs *v0.11.8*, SPKAC support was introduce. If your nodeJs
+version satisfies, then you can pass an object `{ key: '..', passphrase: '...' }`
+
+
+## jwa#verify(input, signature, secretOrPublicKey)
+
+Verify a signature. Returns `true` or `false`.
+
+`signature` should be a base64url encoded string.
+
+For the HMAC algorithm, `secretOrPublicKey` should be a string or a
+buffer. For ECDSA and RSA, the value should be a string represented a
+PEM encoded **public** key.
+
+
+# Example
+
+HMAC
+```js
+const jwa = require('jwa');
+
+const hmac = jwa('HS256');
+const input = 'super important stuff';
+const secret = 'shhhhhh';
+
+const signature = hmac.sign(input, secret);
+hmac.verify(input, signature, secret) // === true
+hmac.verify(input, signature, 'trickery!') // === false
+```
+
+With keys
+```js
+const fs = require('fs');
+const jwa = require('jwa');
+const privateKey = fs.readFileSync(__dirname + '/ecdsa-p521-private.pem');
+const publicKey = fs.readFileSync(__dirname + '/ecdsa-p521-public.pem');
+
+const ecdsa = jwa('ES512');
+const input = 'very important stuff';
+
+const signature = ecdsa.sign(input, privateKey);
+ecdsa.verify(input, signature, publicKey) // === true
+```
+## License
+
+MIT
+
+```
+Copyright (c) 2013 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+```
diff --git a/week-3/04-course-app-hard/node_modules/jwa/index.js b/week-3/04-course-app-hard/node_modules/jwa/index.js
new file mode 100644
index 000000000..e71e6d19e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jwa/index.js
@@ -0,0 +1,252 @@
+var bufferEqual = require('buffer-equal-constant-time');
+var Buffer = require('safe-buffer').Buffer;
+var crypto = require('crypto');
+var formatEcdsa = require('ecdsa-sig-formatter');
+var util = require('util');
+
+var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".'
+var MSG_INVALID_SECRET = 'secret must be a string or buffer';
+var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer';
+var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object';
+
+var supportsKeyObjects = typeof crypto.createPublicKey === 'function';
+if (supportsKeyObjects) {
+ MSG_INVALID_VERIFIER_KEY += ' or a KeyObject';
+ MSG_INVALID_SECRET += 'or a KeyObject';
+}
+
+function checkIsPublicKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return;
+ }
+
+ if (!supportsKeyObjects) {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key !== 'object') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.type !== 'string') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.asymmetricKeyType !== 'string') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+
+ if (typeof key.export !== 'function') {
+ throw typeError(MSG_INVALID_VERIFIER_KEY);
+ }
+};
+
+function checkIsPrivateKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return;
+ }
+
+ if (typeof key === 'object') {
+ return;
+ }
+
+ throw typeError(MSG_INVALID_SIGNER_KEY);
+};
+
+function checkIsSecretKey(key) {
+ if (Buffer.isBuffer(key)) {
+ return;
+ }
+
+ if (typeof key === 'string') {
+ return key;
+ }
+
+ if (!supportsKeyObjects) {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (typeof key !== 'object') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (key.type !== 'secret') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+
+ if (typeof key.export !== 'function') {
+ throw typeError(MSG_INVALID_SECRET);
+ }
+}
+
+function fromBase64(base64) {
+ return base64
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function toBase64(base64url) {
+ base64url = base64url.toString();
+
+ var padding = 4 - base64url.length % 4;
+ if (padding !== 4) {
+ for (var i = 0; i < padding; ++i) {
+ base64url += '=';
+ }
+ }
+
+ return base64url
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+}
+
+function typeError(template) {
+ var args = [].slice.call(arguments, 1);
+ var errMsg = util.format.bind(util, template).apply(null, args);
+ return new TypeError(errMsg);
+}
+
+function bufferOrString(obj) {
+ return Buffer.isBuffer(obj) || typeof obj === 'string';
+}
+
+function normalizeInput(thing) {
+ if (!bufferOrString(thing))
+ thing = JSON.stringify(thing);
+ return thing;
+}
+
+function createHmacSigner(bits) {
+ return function sign(thing, secret) {
+ checkIsSecretKey(secret);
+ thing = normalizeInput(thing);
+ var hmac = crypto.createHmac('sha' + bits, secret);
+ var sig = (hmac.update(thing), hmac.digest('base64'))
+ return fromBase64(sig);
+ }
+}
+
+function createHmacVerifier(bits) {
+ return function verify(thing, signature, secret) {
+ var computedSig = createHmacSigner(bits)(thing, secret);
+ return bufferEqual(Buffer.from(signature), Buffer.from(computedSig));
+ }
+}
+
+function createKeySigner(bits) {
+ return function sign(thing, privateKey) {
+ checkIsPrivateKey(privateKey);
+ thing = normalizeInput(thing);
+ // Even though we are specifying "RSA" here, this works with ECDSA
+ // keys as well.
+ var signer = crypto.createSign('RSA-SHA' + bits);
+ var sig = (signer.update(thing), signer.sign(privateKey, 'base64'));
+ return fromBase64(sig);
+ }
+}
+
+function createKeyVerifier(bits) {
+ return function verify(thing, signature, publicKey) {
+ checkIsPublicKey(publicKey);
+ thing = normalizeInput(thing);
+ signature = toBase64(signature);
+ var verifier = crypto.createVerify('RSA-SHA' + bits);
+ verifier.update(thing);
+ return verifier.verify(publicKey, signature, 'base64');
+ }
+}
+
+function createPSSKeySigner(bits) {
+ return function sign(thing, privateKey) {
+ checkIsPrivateKey(privateKey);
+ thing = normalizeInput(thing);
+ var signer = crypto.createSign('RSA-SHA' + bits);
+ var sig = (signer.update(thing), signer.sign({
+ key: privateKey,
+ padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
+ saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
+ }, 'base64'));
+ return fromBase64(sig);
+ }
+}
+
+function createPSSKeyVerifier(bits) {
+ return function verify(thing, signature, publicKey) {
+ checkIsPublicKey(publicKey);
+ thing = normalizeInput(thing);
+ signature = toBase64(signature);
+ var verifier = crypto.createVerify('RSA-SHA' + bits);
+ verifier.update(thing);
+ return verifier.verify({
+ key: publicKey,
+ padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
+ saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
+ }, signature, 'base64');
+ }
+}
+
+function createECDSASigner(bits) {
+ var inner = createKeySigner(bits);
+ return function sign() {
+ var signature = inner.apply(null, arguments);
+ signature = formatEcdsa.derToJose(signature, 'ES' + bits);
+ return signature;
+ };
+}
+
+function createECDSAVerifer(bits) {
+ var inner = createKeyVerifier(bits);
+ return function verify(thing, signature, publicKey) {
+ signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64');
+ var result = inner(thing, signature, publicKey);
+ return result;
+ };
+}
+
+function createNoneSigner() {
+ return function sign() {
+ return '';
+ }
+}
+
+function createNoneVerifier() {
+ return function verify(thing, signature) {
+ return signature === '';
+ }
+}
+
+module.exports = function jwa(algorithm) {
+ var signerFactories = {
+ hs: createHmacSigner,
+ rs: createKeySigner,
+ ps: createPSSKeySigner,
+ es: createECDSASigner,
+ none: createNoneSigner,
+ }
+ var verifierFactories = {
+ hs: createHmacVerifier,
+ rs: createKeyVerifier,
+ ps: createPSSKeyVerifier,
+ es: createECDSAVerifer,
+ none: createNoneVerifier,
+ }
+ var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);
+ if (!match)
+ throw typeError(MSG_INVALID_ALGORITHM, algorithm);
+ var algo = (match[1] || match[3]).toLowerCase();
+ var bits = match[2];
+
+ return {
+ sign: signerFactories[algo](bits),
+ verify: verifierFactories[algo](bits),
+ }
+};
diff --git a/week-3/04-course-app-hard/node_modules/jwa/package.json b/week-3/04-course-app-hard/node_modules/jwa/package.json
new file mode 100644
index 000000000..0777d5339
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jwa/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "jwa",
+ "version": "1.4.1",
+ "description": "JWA implementation (supports all JWS algorithms)",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ },
+ "devDependencies": {
+ "base64url": "^2.0.0",
+ "jwk-to-pem": "^2.0.1",
+ "semver": "4.3.6",
+ "tap": "6.2.0"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/brianloveswords/node-jwa.git"
+ },
+ "keywords": [
+ "jwa",
+ "jws",
+ "jwt",
+ "rsa",
+ "ecdsa",
+ "hmac"
+ ],
+ "author": "Brian J. Brennan ",
+ "license": "MIT"
+}
diff --git a/week-3/04-course-app-hard/node_modules/jws/CHANGELOG.md b/week-3/04-course-app-hard/node_modules/jws/CHANGELOG.md
new file mode 100644
index 000000000..af8fc2876
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/CHANGELOG.md
@@ -0,0 +1,34 @@
+# Change Log
+All notable changes to this project will be documented in this file.
+
+## [3.0.0]
+### Changed
+- **BREAKING**: `jwt.verify` now requires an `algorithm` parameter, and
+ `jws.createVerify` requires an `algorithm` option. The `"alg"` field
+ signature headers is ignored. This mitigates a critical security flaw
+ in the library which would allow an attacker to generate signatures with
+ arbitrary contents that would be accepted by `jwt.verify`. See
+ https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
+ for details.
+
+## [2.0.0] - 2015-01-30
+### Changed
+- **BREAKING**: Default payload encoding changed from `binary` to
+ `utf8`. `utf8` is a is a more sensible default than `binary` because
+ many payloads, as far as I can tell, will contain user-facing
+ strings that could be in any language. ([6b6de48]
)
+
+- Code reorganization, thanks [@fearphage]! ([7880050]
)
+
+### Added
+- Option in all relevant methods for `encoding`. For those few users
+ that might be depending on a `binary` encoding of the messages, this
+ is for them. ([6b6de48]
)
+
+[unreleased]: https://github.com/brianloveswords/node-jws/compare/v2.0.0...HEAD
+[2.0.0]: https://github.com/brianloveswords/node-jws/compare/v1.0.1...v2.0.0
+
+[7880050]: https://github.com/brianloveswords/node-jws/commit/7880050
+[6b6de48]: https://github.com/brianloveswords/node-jws/commit/6b6de48
+
+[@fearphage]: https://github.com/fearphage
diff --git a/week-3/04-course-app-hard/node_modules/jws/LICENSE b/week-3/04-course-app-hard/node_modules/jws/LICENSE
new file mode 100644
index 000000000..caeb8495c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/LICENSE
@@ -0,0 +1,17 @@
+Copyright (c) 2013 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/jws/index.js b/week-3/04-course-app-hard/node_modules/jws/index.js
new file mode 100644
index 000000000..8c8da9304
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/index.js
@@ -0,0 +1,22 @@
+/*global exports*/
+var SignStream = require('./lib/sign-stream');
+var VerifyStream = require('./lib/verify-stream');
+
+var ALGORITHMS = [
+ 'HS256', 'HS384', 'HS512',
+ 'RS256', 'RS384', 'RS512',
+ 'PS256', 'PS384', 'PS512',
+ 'ES256', 'ES384', 'ES512'
+];
+
+exports.ALGORITHMS = ALGORITHMS;
+exports.sign = SignStream.sign;
+exports.verify = VerifyStream.verify;
+exports.decode = VerifyStream.decode;
+exports.isValid = VerifyStream.isValid;
+exports.createSign = function createSign(opts) {
+ return new SignStream(opts);
+};
+exports.createVerify = function createVerify(opts) {
+ return new VerifyStream(opts);
+};
diff --git a/week-3/04-course-app-hard/node_modules/jws/lib/data-stream.js b/week-3/04-course-app-hard/node_modules/jws/lib/data-stream.js
new file mode 100644
index 000000000..3535d31d9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/lib/data-stream.js
@@ -0,0 +1,55 @@
+/*global module, process*/
+var Buffer = require('safe-buffer').Buffer;
+var Stream = require('stream');
+var util = require('util');
+
+function DataStream(data) {
+ this.buffer = null;
+ this.writable = true;
+ this.readable = true;
+
+ // No input
+ if (!data) {
+ this.buffer = Buffer.alloc(0);
+ return this;
+ }
+
+ // Stream
+ if (typeof data.pipe === 'function') {
+ this.buffer = Buffer.alloc(0);
+ data.pipe(this);
+ return this;
+ }
+
+ // Buffer or String
+ // or Object (assumedly a passworded key)
+ if (data.length || typeof data === 'object') {
+ this.buffer = data;
+ this.writable = false;
+ process.nextTick(function () {
+ this.emit('end', data);
+ this.readable = false;
+ this.emit('close');
+ }.bind(this));
+ return this;
+ }
+
+ throw new TypeError('Unexpected data type ('+ typeof data + ')');
+}
+util.inherits(DataStream, Stream);
+
+DataStream.prototype.write = function write(data) {
+ this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]);
+ this.emit('data', data);
+};
+
+DataStream.prototype.end = function end(data) {
+ if (data)
+ this.write(data);
+ this.emit('end', data);
+ this.emit('close');
+ this.writable = false;
+ this.readable = false;
+};
+
+module.exports = DataStream;
diff --git a/week-3/04-course-app-hard/node_modules/jws/lib/sign-stream.js b/week-3/04-course-app-hard/node_modules/jws/lib/sign-stream.js
new file mode 100644
index 000000000..6a7ee42f2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/lib/sign-stream.js
@@ -0,0 +1,78 @@
+/*global module*/
+var Buffer = require('safe-buffer').Buffer;
+var DataStream = require('./data-stream');
+var jwa = require('jwa');
+var Stream = require('stream');
+var toString = require('./tostring');
+var util = require('util');
+
+function base64url(string, encoding) {
+ return Buffer
+ .from(string, encoding)
+ .toString('base64')
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function jwsSecuredInput(header, payload, encoding) {
+ encoding = encoding || 'utf8';
+ var encodedHeader = base64url(toString(header), 'binary');
+ var encodedPayload = base64url(toString(payload), encoding);
+ return util.format('%s.%s', encodedHeader, encodedPayload);
+}
+
+function jwsSign(opts) {
+ var header = opts.header;
+ var payload = opts.payload;
+ var secretOrKey = opts.secret || opts.privateKey;
+ var encoding = opts.encoding;
+ var algo = jwa(header.alg);
+ var securedInput = jwsSecuredInput(header, payload, encoding);
+ var signature = algo.sign(securedInput, secretOrKey);
+ return util.format('%s.%s', securedInput, signature);
+}
+
+function SignStream(opts) {
+ var secret = opts.secret||opts.privateKey||opts.key;
+ var secretStream = new DataStream(secret);
+ this.readable = true;
+ this.header = opts.header;
+ this.encoding = opts.encoding;
+ this.secret = this.privateKey = this.key = secretStream;
+ this.payload = new DataStream(opts.payload);
+ this.secret.once('close', function () {
+ if (!this.payload.writable && this.readable)
+ this.sign();
+ }.bind(this));
+
+ this.payload.once('close', function () {
+ if (!this.secret.writable && this.readable)
+ this.sign();
+ }.bind(this));
+}
+util.inherits(SignStream, Stream);
+
+SignStream.prototype.sign = function sign() {
+ try {
+ var signature = jwsSign({
+ header: this.header,
+ payload: this.payload.buffer,
+ secret: this.secret.buffer,
+ encoding: this.encoding
+ });
+ this.emit('done', signature);
+ this.emit('data', signature);
+ this.emit('end');
+ this.readable = false;
+ return signature;
+ } catch (e) {
+ this.readable = false;
+ this.emit('error', e);
+ this.emit('close');
+ }
+};
+
+SignStream.sign = jwsSign;
+
+module.exports = SignStream;
diff --git a/week-3/04-course-app-hard/node_modules/jws/lib/tostring.js b/week-3/04-course-app-hard/node_modules/jws/lib/tostring.js
new file mode 100644
index 000000000..f5a49a365
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/lib/tostring.js
@@ -0,0 +1,10 @@
+/*global module*/
+var Buffer = require('buffer').Buffer;
+
+module.exports = function toString(obj) {
+ if (typeof obj === 'string')
+ return obj;
+ if (typeof obj === 'number' || Buffer.isBuffer(obj))
+ return obj.toString();
+ return JSON.stringify(obj);
+};
diff --git a/week-3/04-course-app-hard/node_modules/jws/lib/verify-stream.js b/week-3/04-course-app-hard/node_modules/jws/lib/verify-stream.js
new file mode 100644
index 000000000..39f7c73e2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/lib/verify-stream.js
@@ -0,0 +1,120 @@
+/*global module*/
+var Buffer = require('safe-buffer').Buffer;
+var DataStream = require('./data-stream');
+var jwa = require('jwa');
+var Stream = require('stream');
+var toString = require('./tostring');
+var util = require('util');
+var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
+
+function isObject(thing) {
+ return Object.prototype.toString.call(thing) === '[object Object]';
+}
+
+function safeJsonParse(thing) {
+ if (isObject(thing))
+ return thing;
+ try { return JSON.parse(thing); }
+ catch (e) { return undefined; }
+}
+
+function headerFromJWS(jwsSig) {
+ var encodedHeader = jwsSig.split('.', 1)[0];
+ return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary'));
+}
+
+function securedInputFromJWS(jwsSig) {
+ return jwsSig.split('.', 2).join('.');
+}
+
+function signatureFromJWS(jwsSig) {
+ return jwsSig.split('.')[2];
+}
+
+function payloadFromJWS(jwsSig, encoding) {
+ encoding = encoding || 'utf8';
+ var payload = jwsSig.split('.')[1];
+ return Buffer.from(payload, 'base64').toString(encoding);
+}
+
+function isValidJws(string) {
+ return JWS_REGEX.test(string) && !!headerFromJWS(string);
+}
+
+function jwsVerify(jwsSig, algorithm, secretOrKey) {
+ if (!algorithm) {
+ var err = new Error("Missing algorithm parameter for jws.verify");
+ err.code = "MISSING_ALGORITHM";
+ throw err;
+ }
+ jwsSig = toString(jwsSig);
+ var signature = signatureFromJWS(jwsSig);
+ var securedInput = securedInputFromJWS(jwsSig);
+ var algo = jwa(algorithm);
+ return algo.verify(securedInput, signature, secretOrKey);
+}
+
+function jwsDecode(jwsSig, opts) {
+ opts = opts || {};
+ jwsSig = toString(jwsSig);
+
+ if (!isValidJws(jwsSig))
+ return null;
+
+ var header = headerFromJWS(jwsSig);
+
+ if (!header)
+ return null;
+
+ var payload = payloadFromJWS(jwsSig);
+ if (header.typ === 'JWT' || opts.json)
+ payload = JSON.parse(payload, opts.encoding);
+
+ return {
+ header: header,
+ payload: payload,
+ signature: signatureFromJWS(jwsSig)
+ };
+}
+
+function VerifyStream(opts) {
+ opts = opts || {};
+ var secretOrKey = opts.secret||opts.publicKey||opts.key;
+ var secretStream = new DataStream(secretOrKey);
+ this.readable = true;
+ this.algorithm = opts.algorithm;
+ this.encoding = opts.encoding;
+ this.secret = this.publicKey = this.key = secretStream;
+ this.signature = new DataStream(opts.signature);
+ this.secret.once('close', function () {
+ if (!this.signature.writable && this.readable)
+ this.verify();
+ }.bind(this));
+
+ this.signature.once('close', function () {
+ if (!this.secret.writable && this.readable)
+ this.verify();
+ }.bind(this));
+}
+util.inherits(VerifyStream, Stream);
+VerifyStream.prototype.verify = function verify() {
+ try {
+ var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
+ var obj = jwsDecode(this.signature.buffer, this.encoding);
+ this.emit('done', valid, obj);
+ this.emit('data', valid);
+ this.emit('end');
+ this.readable = false;
+ return valid;
+ } catch (e) {
+ this.readable = false;
+ this.emit('error', e);
+ this.emit('close');
+ }
+};
+
+VerifyStream.decode = jwsDecode;
+VerifyStream.isValid = isValidJws;
+VerifyStream.verify = jwsVerify;
+
+module.exports = VerifyStream;
diff --git a/week-3/04-course-app-hard/node_modules/jws/package.json b/week-3/04-course-app-hard/node_modules/jws/package.json
new file mode 100644
index 000000000..3fb283757
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "jws",
+ "version": "3.2.2",
+ "description": "Implementation of JSON Web Signatures",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/brianloveswords/node-jws.git"
+ },
+ "keywords": [
+ "jws",
+ "json",
+ "web",
+ "signatures"
+ ],
+ "author": "Brian J Brennan",
+ "license": "MIT",
+ "readmeFilename": "readme.md",
+ "gitHead": "c0f6b27bcea5a2ad2e304d91c2e842e4076a6b03",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ },
+ "devDependencies": {
+ "semver": "^5.1.0",
+ "tape": "~2.14.0"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/jws/readme.md b/week-3/04-course-app-hard/node_modules/jws/readme.md
new file mode 100644
index 000000000..1910c9a84
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/jws/readme.md
@@ -0,0 +1,255 @@
+# node-jws [![Build Status](https://secure.travis-ci.org/brianloveswords/node-jws.png)](http://travis-ci.org/brianloveswords/node-jws)
+
+An implementation of [JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html).
+
+This was developed against `draft-ietf-jose-json-web-signature-08` and
+implements the entire spec **except** X.509 Certificate Chain
+signing/verifying (patches welcome).
+
+There are both synchronous (`jws.sign`, `jws.verify`) and streaming
+(`jws.createSign`, `jws.createVerify`) APIs.
+
+# Install
+
+```bash
+$ npm install jws
+```
+
+# Usage
+
+## jws.ALGORITHMS
+
+Array of supported algorithms. The following algorithms are currently supported.
+
+alg Parameter Value | Digital Signature or MAC Algorithm
+----------------|----------------------------
+HS256 | HMAC using SHA-256 hash algorithm
+HS384 | HMAC using SHA-384 hash algorithm
+HS512 | HMAC using SHA-512 hash algorithm
+RS256 | RSASSA using SHA-256 hash algorithm
+RS384 | RSASSA using SHA-384 hash algorithm
+RS512 | RSASSA using SHA-512 hash algorithm
+PS256 | RSASSA-PSS using SHA-256 hash algorithm
+PS384 | RSASSA-PSS using SHA-384 hash algorithm
+PS512 | RSASSA-PSS using SHA-512 hash algorithm
+ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm
+ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm
+ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm
+none | No digital signature or MAC value included
+
+## jws.sign(options)
+
+(Synchronous) Return a JSON Web Signature for a header and a payload.
+
+Options:
+
+* `header`
+* `payload`
+* `secret` or `privateKey`
+* `encoding` (Optional, defaults to 'utf8')
+
+`header` must be an object with an `alg` property. `header.alg` must be
+one a value found in `jws.ALGORITHMS`. See above for a table of
+supported algorithms.
+
+If `payload` is not a buffer or a string, it will be coerced into a string
+using `JSON.stringify`.
+
+Example
+
+```js
+const signature = jws.sign({
+ header: { alg: 'HS256' },
+ payload: 'h. jon benjamin',
+ secret: 'has a van',
+});
+```
+
+## jws.verify(signature, algorithm, secretOrKey)
+
+(Synchronous) Returns `true` or `false` for whether a signature matches a
+secret or key.
+
+`signature` is a JWS Signature. `header.alg` must be a value found in `jws.ALGORITHMS`.
+See above for a table of supported algorithms. `secretOrKey` is a string or
+buffer containing either the secret for HMAC algorithms, or the PEM
+encoded public key for RSA and ECDSA.
+
+Note that the `"alg"` value from the signature header is ignored.
+
+
+## jws.decode(signature)
+
+(Synchronous) Returns the decoded header, decoded payload, and signature
+parts of the JWS Signature.
+
+Returns an object with three properties, e.g.
+```js
+{ header: { alg: 'HS256' },
+ payload: 'h. jon benjamin',
+ signature: 'YOWPewyGHKu4Y_0M_vtlEnNlqmFOclqp4Hy6hVHfFT4'
+}
+```
+
+## jws.createSign(options)
+
+Returns a new SignStream object.
+
+Options:
+
+* `header` (required)
+* `payload`
+* `key` || `privateKey` || `secret`
+* `encoding` (Optional, defaults to 'utf8')
+
+Other than `header`, all options expect a string or a buffer when the
+value is known ahead of time, or a stream for convenience.
+`key`/`privateKey`/`secret` may also be an object when using an encrypted
+private key, see the [crypto documentation][encrypted-key-docs].
+
+Example:
+
+```js
+
+// This...
+jws.createSign({
+ header: { alg: 'RS256' },
+ privateKey: privateKeyStream,
+ payload: payloadStream,
+}).on('done', function(signature) {
+ // ...
+});
+
+// is equivalent to this:
+const signer = jws.createSign({
+ header: { alg: 'RS256' },
+});
+privateKeyStream.pipe(signer.privateKey);
+payloadStream.pipe(signer.payload);
+signer.on('done', function(signature) {
+ // ...
+});
+```
+
+## jws.createVerify(options)
+
+Returns a new VerifyStream object.
+
+Options:
+
+* `signature`
+* `algorithm`
+* `key` || `publicKey` || `secret`
+* `encoding` (Optional, defaults to 'utf8')
+
+All options expect a string or a buffer when the value is known ahead of
+time, or a stream for convenience.
+
+Example:
+
+```js
+
+// This...
+jws.createVerify({
+ publicKey: pubKeyStream,
+ signature: sigStream,
+}).on('done', function(verified, obj) {
+ // ...
+});
+
+// is equivilant to this:
+const verifier = jws.createVerify();
+pubKeyStream.pipe(verifier.publicKey);
+sigStream.pipe(verifier.signature);
+verifier.on('done', function(verified, obj) {
+ // ...
+});
+```
+
+## Class: SignStream
+
+A `Readable Stream` that emits a single data event (the calculated
+signature) when done.
+
+### Event: 'done'
+`function (signature) { }`
+
+### signer.payload
+
+A `Writable Stream` that expects the JWS payload. Do *not* use if you
+passed a `payload` option to the constructor.
+
+Example:
+
+```js
+payloadStream.pipe(signer.payload);
+```
+
+### signer.secret
signer.key
signer.privateKey
+
+A `Writable Stream`. Expects the JWS secret for HMAC, or the privateKey
+for ECDSA and RSA. Do *not* use if you passed a `secret` or `key` option
+to the constructor.
+
+Example:
+
+```js
+privateKeyStream.pipe(signer.privateKey);
+```
+
+## Class: VerifyStream
+
+This is a `Readable Stream` that emits a single data event, the result
+of whether or not that signature was valid.
+
+### Event: 'done'
+`function (valid, obj) { }`
+
+`valid` is a boolean for whether or not the signature is valid.
+
+### verifier.signature
+
+A `Writable Stream` that expects a JWS Signature. Do *not* use if you
+passed a `signature` option to the constructor.
+
+### verifier.secret
verifier.key
verifier.publicKey
+
+A `Writable Stream` that expects a public key or secret. Do *not* use if you
+passed a `key` or `secret` option to the constructor.
+
+# TODO
+
+* It feels like there should be some convenience options/APIs for
+ defining the algorithm rather than having to define a header object
+ with `{ alg: 'ES512' }` or whatever every time.
+
+* X.509 support, ugh
+
+# License
+
+MIT
+
+```
+Copyright (c) 2013-2015 Brian J. Brennan
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+```
+
+[encrypted-key-docs]: https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format
diff --git a/week-3/04-course-app-hard/node_modules/kareem/CHANGELOG.md b/week-3/04-course-app-hard/node_modules/kareem/CHANGELOG.md
new file mode 100644
index 000000000..8c0cd4b05
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/kareem/CHANGELOG.md
@@ -0,0 +1,823 @@
+# Changelog
+
+
+## 2.6.0 (2024-03-04)
+
+* feat: add TypeScript types
+
+
+## 2.5.1 (2023-01-06)
+
+* fix: avoid passing final callback to pre hook, because calling the callback can mess up hook execution #36 Automattic/mongoose#12836
+
+
+## 2.5.0 (2022-12-01)
+
+* feat: add errorHandler option to `post()` #34
+
+
+## 2.4.0 (2022-06-13)
+
+* feat: add `overwriteResult()` and `skipWrappedFunction()` for more advanced control flow
+
+
+## 2.3.4 (2022-02-10)
+
+* perf: various performance improvements #27 #24 #23 #22 #21 #20
+
+
+## 2.3.3 (2021-12-26)
+
+* fix: handle sync errors in `wrap()`
+
+
+## 2.3.2 (2020-12-08)
+
+* fix: handle sync errors in pre hooks if there are multiple hooks
+
+
+## 2.3.0 (2018-09-24)
+
+* chore(release): 2.2.3 ([c8f2695](https://github.com/vkarpov15/kareem/commit/c8f2695))
+* chore(release): 2.2.4 ([a377a4f](https://github.com/vkarpov15/kareem/commit/a377a4f))
+* chore(release): 2.2.5 ([5a495e3](https://github.com/vkarpov15/kareem/commit/5a495e3))
+* fix(filter): copy async pres correctly with `filter()` ([1b1ed8a](https://github.com/vkarpov15/kareem/commit/1b1ed8a)), closes [Automattic/mongoose#3054](https://github.com/Automattic/mongoose/issues/3054)
+* feat: add filter() function ([1f641f4](https://github.com/vkarpov15/kareem/commit/1f641f4))
+* feat: support storing options on pre and post hooks ([59220b9](https://github.com/vkarpov15/kareem/commit/59220b9))
+
+
+
+
+## 2.2.3 (2018-09-10)
+
+* chore: release 2.2.3 ([af653a3](https://github.com/vkarpov15/kareem/commit/af653a3))
+
+
+
+
+## 2.2.2 (2018-09-10)
+
+* chore: release 2.2.2 ([3f0144d](https://github.com/vkarpov15/kareem/commit/3f0144d))
+* fix: allow merge() to not clone ([e628d65](https://github.com/vkarpov15/kareem/commit/e628d65))
+
+
+
+
+## 2.2.1 (2018-06-05)
+
+* chore: release 2.2.1 ([4625a64](https://github.com/vkarpov15/kareem/commit/4625a64))
+* chore: remove lockfile from git ([7f3e4e6](https://github.com/vkarpov15/kareem/commit/7f3e4e6))
+* fix: handle numAsync correctly when merging ([fef8e7e](https://github.com/vkarpov15/kareem/commit/fef8e7e))
+* test: repro issue with not copying numAsync ([952d9db](https://github.com/vkarpov15/kareem/commit/952d9db))
+
+
+
+
+## 2.2.0 (2018-06-05)
+
+* chore: release 2.2.0 ([ff9ad03](https://github.com/vkarpov15/kareem/commit/ff9ad03))
+* fix: use maps instead of objects for _pres and _posts so `toString()` doesn't get reported as having ([55df303](https://github.com/vkarpov15/kareem/commit/55df303)), closes [Automattic/mongoose#6538](https://github.com/Automattic/mongoose/issues/6538)
+
+
+
+
+## 2.1.0 (2018-05-16)
+
+* chore: release 2.1.0 ([ba5f1bc](https://github.com/vkarpov15/kareem/commit/ba5f1bc))
+* feat: add option to check wrapped function return value for promises ([c9d7dd1](https://github.com/vkarpov15/kareem/commit/c9d7dd1))
+* refactor: use const in wrap() ([0fc21f9](https://github.com/vkarpov15/kareem/commit/0fc21f9))
+
+
+
+
+## 2.0.7 (2018-04-28)
+
+* chore: release 2.0.7 ([0bf91e6](https://github.com/vkarpov15/kareem/commit/0bf91e6))
+* feat: add `hasHooks()` ([225f18d](https://github.com/vkarpov15/kareem/commit/225f18d)), closes [Automattic/mongoose#6385](https://github.com/Automattic/mongoose/issues/6385)
+
+
+
+
+## 2.0.6 (2018-03-22)
+
+* chore: release 2.0.6 ([f3d406b](https://github.com/vkarpov15/kareem/commit/f3d406b))
+* fix(wrap): ensure fast path still wraps function in `nextTick()` for chaining ([7000494](https://github.com/vkarpov15/kareem/commit/7000494)), closes [Automattic/mongoose#6250](https://github.com/Automattic/mongoose/issues/6250) [dsanel/mongoose-delete#36](https://github.com/dsanel/mongoose-delete/issues/36)
+
+
+
+
+## 2.0.5 (2018-02-22)
+
+* chore: release 2.0.5 ([3286612](https://github.com/vkarpov15/kareem/commit/3286612))
+* perf(createWrapper): don't create wrapper if there are no hooks ([5afc5b9](https://github.com/vkarpov15/kareem/commit/5afc5b9)), closes [Automattic/mongoose#6126](https://github.com/Automattic/mongoose/issues/6126)
+
+
+
+
+## 2.0.4 (2018-02-08)
+
+* chore: release 2.0.4 ([2ab0293](https://github.com/vkarpov15/kareem/commit/2ab0293))
+
+
+
+
+## 2.0.3 (2018-02-01)
+
+* chore: release 2.0.3 ([3c1abe5](https://github.com/vkarpov15/kareem/commit/3c1abe5))
+* fix: use process.nextTick() re: Automattic/mongoose#6074 ([e5bfe33](https://github.com/vkarpov15/kareem/commit/e5bfe33)), closes [Automattic/mongoose#6074](https://github.com/Automattic/mongoose/issues/6074)
+
+
+
+
+## 2.0.2 (2018-01-24)
+
+* chore: fix license ([a9d755c](https://github.com/vkarpov15/kareem/commit/a9d755c)), closes [#10](https://github.com/vkarpov15/kareem/issues/10)
+* chore: release 2.0.2 ([fe87ab6](https://github.com/vkarpov15/kareem/commit/fe87ab6))
+
+
+
+
+## 2.0.1 (2018-01-09)
+
+* chore: release 2.0.1 with lockfile bump ([09c44fb](https://github.com/vkarpov15/kareem/commit/09c44fb))
+
+
+
+
+## 2.0.0 (2018-01-09)
+
+* chore: bump marked re: security ([cc564a9](https://github.com/vkarpov15/kareem/commit/cc564a9))
+* chore: release 2.0.0 ([f511d1c](https://github.com/vkarpov15/kareem/commit/f511d1c))
+
+
+
+
+## 2.0.0-rc5 (2017-12-23)
+
+* chore: fix build on node 4+5 ([6dac5a4](https://github.com/vkarpov15/kareem/commit/6dac5a4))
+* chore: fix built on node 4 + 5 again ([434ef0a](https://github.com/vkarpov15/kareem/commit/434ef0a))
+* chore: release 2.0.0-rc5 ([25a32ee](https://github.com/vkarpov15/kareem/commit/25a32ee))
+
+
+
+
+## 2.0.0-rc4 (2017-12-22)
+
+* chore: release 2.0.0-rc4 ([49fc083](https://github.com/vkarpov15/kareem/commit/49fc083))
+* BREAKING CHANGE: deduplicate when merging hooks re: Automattic/mongoose#2945 ([d458573](https://github.com/vkarpov15/kareem/commit/d458573)), closes [Automattic/mongoose#2945](https://github.com/Automattic/mongoose/issues/2945)
+
+
+
+
+## 2.0.0-rc3 (2017-12-22)
+
+* chore: release 2.0.0-rc3 ([adaaa00](https://github.com/vkarpov15/kareem/commit/adaaa00))
+* feat: support returning promises from middleware functions ([05b4480](https://github.com/vkarpov15/kareem/commit/05b4480)), closes [Automattic/mongoose#3779](https://github.com/Automattic/mongoose/issues/3779)
+
+
+
+
+## 2.0.0-rc2 (2017-12-21)
+
+* chore: release 2.0.0-rc2 ([76325fa](https://github.com/vkarpov15/kareem/commit/76325fa))
+* fix: ensure next() and done() run in next tick ([6c20684](https://github.com/vkarpov15/kareem/commit/6c20684))
+
+
+
+
+## 2.0.0-rc1 (2017-12-21)
+
+* chore: improve test coverage re: Automattic/mongoose#3232 ([7b45cf0](https://github.com/vkarpov15/kareem/commit/7b45cf0)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+* chore: release 2.0.0-rc1 ([9b83f52](https://github.com/vkarpov15/kareem/commit/9b83f52))
+* BREAKING CHANGE: report sync exceptions as errors, only allow calling next() and done() once ([674adcc](https://github.com/vkarpov15/kareem/commit/674adcc)), closes [Automattic/mongoose#3483](https://github.com/Automattic/mongoose/issues/3483)
+
+
+
+
+## 2.0.0-rc0 (2017-12-17)
+
+* chore: release 2.0.0-rc0 ([16b44b5](https://github.com/vkarpov15/kareem/commit/16b44b5))
+* BREAKING CHANGE: drop support for node < 4 ([9cbb8c7](https://github.com/vkarpov15/kareem/commit/9cbb8c7))
+* BREAKING CHANGE: remove useLegacyPost and add several new features ([6dd8531](https://github.com/vkarpov15/kareem/commit/6dd8531)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+
+
+
+
+## 1.5.0 (2017-07-20)
+
+* chore: release 1.5.0 ([9c491a0](https://github.com/vkarpov15/kareem/commit/9c491a0))
+* fix: improve post error handlers results ([9928dd5](https://github.com/vkarpov15/kareem/commit/9928dd5)), closes [Automattic/mongoose#5466](https://github.com/Automattic/mongoose/issues/5466)
+
+
+
+
+## 1.4.2 (2017-07-06)
+
+* chore: release 1.4.2 ([8d14ac5](https://github.com/vkarpov15/kareem/commit/8d14ac5))
+* fix: correct args re: Automattic/mongoose#5405 ([3f28ae6](https://github.com/vkarpov15/kareem/commit/3f28ae6)), closes [Automattic/mongoose#5405](https://github.com/Automattic/mongoose/issues/5405)
+
+
+
+
+## 1.4.1 (2017-04-25)
+
+* chore: release 1.4.1 ([5ecf0c2](https://github.com/vkarpov15/kareem/commit/5ecf0c2))
+* fix: handle numAsyncPres with clone() ([c72e857](https://github.com/vkarpov15/kareem/commit/c72e857)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+* test: repro #8 ([9b4d6b2](https://github.com/vkarpov15/kareem/commit/9b4d6b2)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+
+
+
+
+## 1.4.0 (2017-04-19)
+
+* chore: release 1.4.0 ([101c5f5](https://github.com/vkarpov15/kareem/commit/101c5f5))
+* feat: add merge() function ([285325e](https://github.com/vkarpov15/kareem/commit/285325e))
+
+
+
+
+## 1.3.0 (2017-03-26)
+
+* chore: release 1.3.0 ([f3a9e50](https://github.com/vkarpov15/kareem/commit/f3a9e50))
+* feat: pass function args to execPre ([4dd466d](https://github.com/vkarpov15/kareem/commit/4dd466d))
+
+
+
+
+## 1.2.1 (2017-02-03)
+
+* chore: release 1.2.1 ([d97081f](https://github.com/vkarpov15/kareem/commit/d97081f))
+* fix: filter out _kareemIgnored args for error handlers re: Automattic/mongoose#4925 ([ddc7aeb](https://github.com/vkarpov15/kareem/commit/ddc7aeb)), closes [Automattic/mongoose#4925](https://github.com/Automattic/mongoose/issues/4925)
+* fix: make error handlers handle errors in pre hooks ([af38033](https://github.com/vkarpov15/kareem/commit/af38033)), closes [Automattic/mongoose#4927](https://github.com/Automattic/mongoose/issues/4927)
+
+
+
+
+## 1.2.0 (2017-01-02)
+
+* chore: release 1.2.0 ([033225c](https://github.com/vkarpov15/kareem/commit/033225c))
+* chore: upgrade deps ([f9e9a09](https://github.com/vkarpov15/kareem/commit/f9e9a09))
+* feat: add _kareemIgnore re: Automattic/mongoose#4836 ([7957771](https://github.com/vkarpov15/kareem/commit/7957771)), closes [Automattic/mongoose#4836](https://github.com/Automattic/mongoose/issues/4836)
+
+
+
+
+## 1.1.5 (2016-12-13)
+
+* chore: release 1.1.5 ([1a9f684](https://github.com/vkarpov15/kareem/commit/1a9f684))
+* fix: correct field name ([04a0e9d](https://github.com/vkarpov15/kareem/commit/04a0e9d))
+
+
+
+
+## 1.1.4 (2016-12-09)
+
+* chore: release 1.1.4 ([ece401c](https://github.com/vkarpov15/kareem/commit/ece401c))
+* chore: run tests on node 6 ([e0cb1cb](https://github.com/vkarpov15/kareem/commit/e0cb1cb))
+* fix: only copy own properties in clone() ([dfe28ce](https://github.com/vkarpov15/kareem/commit/dfe28ce)), closes [#7](https://github.com/vkarpov15/kareem/issues/7)
+
+
+
+
+## 1.1.3 (2016-06-27)
+
+* chore: release 1.1.3 ([87171c8](https://github.com/vkarpov15/kareem/commit/87171c8))
+* fix: couple more issues with arg processing ([c65f523](https://github.com/vkarpov15/kareem/commit/c65f523))
+
+
+
+
+## 1.1.2 (2016-06-27)
+
+* chore: release 1.1.2 ([8e102b6](https://github.com/vkarpov15/kareem/commit/8e102b6))
+* fix: add early return ([4feda4e](https://github.com/vkarpov15/kareem/commit/4feda4e))
+
+
+
+
+## 1.1.1 (2016-06-27)
+
+* chore: release 1.1.1 ([8bb3050](https://github.com/vkarpov15/kareem/commit/8bb3050))
+* fix: skip error handlers if no error ([0eb3a44](https://github.com/vkarpov15/kareem/commit/0eb3a44))
+
+
+
+
+## 1.1.0 (2016-05-11)
+
+* chore: release 1.1.0 ([85332d9](https://github.com/vkarpov15/kareem/commit/85332d9))
+* chore: test on node 4 and node 5 ([1faefa1](https://github.com/vkarpov15/kareem/commit/1faefa1))
+* 100% coverage again ([c9aee4e](https://github.com/vkarpov15/kareem/commit/c9aee4e))
+* add support for error post hooks ([d378113](https://github.com/vkarpov15/kareem/commit/d378113))
+* basic setup for sync hooks #4 ([55aa081](https://github.com/vkarpov15/kareem/commit/55aa081)), closes [#4](https://github.com/vkarpov15/kareem/issues/4)
+* proof of concept for error handlers ([e4a07d9](https://github.com/vkarpov15/kareem/commit/e4a07d9))
+* refactor out handleWrapError helper ([b19af38](https://github.com/vkarpov15/kareem/commit/b19af38))
+
+
+
+
+## 1.0.1 (2015-05-10)
+
+* Fix #1 ([de60dc6](https://github.com/vkarpov15/kareem/commit/de60dc6)), closes [#1](https://github.com/vkarpov15/kareem/issues/1)
+* release 1.0.1 ([6971088](https://github.com/vkarpov15/kareem/commit/6971088))
+* Run tests on iojs in travis ([adcd201](https://github.com/vkarpov15/kareem/commit/adcd201))
+* support legacy post hook behavior in wrap() ([23fa74c](https://github.com/vkarpov15/kareem/commit/23fa74c))
+* Use node 0.12 in travis ([834689d](https://github.com/vkarpov15/kareem/commit/834689d))
+
+
+
+
+## 1.0.0 (2015-01-28)
+
+* Tag 1.0.0 ([4c5a35a](https://github.com/vkarpov15/kareem/commit/4c5a35a))
+
+
+
+
+## 0.0.8 (2015-01-27)
+
+* Add clone function ([688bba7](https://github.com/vkarpov15/kareem/commit/688bba7))
+* Add jscs for style checking ([5c93149](https://github.com/vkarpov15/kareem/commit/5c93149))
+* Bump 0.0.8 ([03c0d2f](https://github.com/vkarpov15/kareem/commit/03c0d2f))
+* Fix jscs config, add gulp rules ([9989abf](https://github.com/vkarpov15/kareem/commit/9989abf))
+* fix Makefile typo ([1f7e61a](https://github.com/vkarpov15/kareem/commit/1f7e61a))
+
+
+
+
+## 0.0.7 (2015-01-04)
+
+* Bump 0.0.7 ([98ef173](https://github.com/vkarpov15/kareem/commit/98ef173))
+* fix LearnBoost/mongoose#2553 - use null instead of undefined for err ([9157b48](https://github.com/vkarpov15/kareem/commit/9157b48)), closes [LearnBoost/mongoose#2553](https://github.com/LearnBoost/mongoose/issues/2553)
+* Regenerate docs ([2331cdf](https://github.com/vkarpov15/kareem/commit/2331cdf))
+
+
+
+
+## 0.0.6 (2015-01-01)
+
+* Update docs and bump 0.0.6 ([92c12a7](https://github.com/vkarpov15/kareem/commit/92c12a7))
+
+
+
+
+## 0.0.5 (2015-01-01)
+
+* Add coverage rule to Makefile ([825a91c](https://github.com/vkarpov15/kareem/commit/825a91c))
+* Add coveralls to README ([fb52369](https://github.com/vkarpov15/kareem/commit/fb52369))
+* Add coveralls to travis ([93f6f15](https://github.com/vkarpov15/kareem/commit/93f6f15))
+* Add createWrapper() function ([ea77741](https://github.com/vkarpov15/kareem/commit/ea77741))
+* Add istanbul code coverage ([6eceeef](https://github.com/vkarpov15/kareem/commit/6eceeef))
+* Add some more comments for examples ([c5b0c6f](https://github.com/vkarpov15/kareem/commit/c5b0c6f))
+* Add travis ([e6dcb06](https://github.com/vkarpov15/kareem/commit/e6dcb06))
+* Add travis badge to docs ([ad8c9b3](https://github.com/vkarpov15/kareem/commit/ad8c9b3))
+* Add wrap() tests, 100% coverage ([6945be4](https://github.com/vkarpov15/kareem/commit/6945be4))
+* Better test coverage for execPost ([d9ad539](https://github.com/vkarpov15/kareem/commit/d9ad539))
+* Bump 0.0.5 ([69875b1](https://github.com/vkarpov15/kareem/commit/69875b1))
+* Docs fix ([15b7098](https://github.com/vkarpov15/kareem/commit/15b7098))
+* Fix silly mistake in docs generation ([50373eb](https://github.com/vkarpov15/kareem/commit/50373eb))
+* Fix typo in readme ([fec4925](https://github.com/vkarpov15/kareem/commit/fec4925))
+* Linkify travis badge ([92b25fe](https://github.com/vkarpov15/kareem/commit/92b25fe))
+* Make travis run coverage ([747157b](https://github.com/vkarpov15/kareem/commit/747157b))
+* Move travis status badge ([d52e89b](https://github.com/vkarpov15/kareem/commit/d52e89b))
+* Quick fix for coverage ([50bbddb](https://github.com/vkarpov15/kareem/commit/50bbddb))
+* Typo fix ([adea794](https://github.com/vkarpov15/kareem/commit/adea794))
+
+
+
+
+## 0.0.4 (2014-12-13)
+
+* Bump 0.0.4, run docs generation ([51a15fe](https://github.com/vkarpov15/kareem/commit/51a15fe))
+* Use correct post parameters in wrap() ([9bb5da3](https://github.com/vkarpov15/kareem/commit/9bb5da3))
+
+
+
+
+## 0.0.3 (2014-12-12)
+
+* Add npm test script, fix small bug with args not getting passed through post ([49e3e68](https://github.com/vkarpov15/kareem/commit/49e3e68))
+* Bump 0.0.3 ([65621d8](https://github.com/vkarpov15/kareem/commit/65621d8))
+* Update readme ([901388b](https://github.com/vkarpov15/kareem/commit/901388b))
+
+
+
+
+## 0.0.2 (2014-12-12)
+
+* Add github repo and bump 0.0.2 ([59db8be](https://github.com/vkarpov15/kareem/commit/59db8be))
+
+
+
+
+## 0.0.1 (2014-12-12)
+
+* Add basic docs ([ad29ea4](https://github.com/vkarpov15/kareem/commit/ad29ea4))
+* Add pre hooks ([2ffc356](https://github.com/vkarpov15/kareem/commit/2ffc356))
+* Add wrap function ([68c540c](https://github.com/vkarpov15/kareem/commit/68c540c))
+* Bump to version 0.0.1 ([a4bfd68](https://github.com/vkarpov15/kareem/commit/a4bfd68))
+* Initial commit ([4002458](https://github.com/vkarpov15/kareem/commit/4002458))
+* Initial deposit ([98fc489](https://github.com/vkarpov15/kareem/commit/98fc489))
+* Post hooks ([395b67c](https://github.com/vkarpov15/kareem/commit/395b67c))
+* Some basic setup work ([82df75e](https://github.com/vkarpov15/kareem/commit/82df75e))
+* Support sync pre hooks ([1cc1b9f](https://github.com/vkarpov15/kareem/commit/1cc1b9f))
+* Update package.json description ([978da18](https://github.com/vkarpov15/kareem/commit/978da18))
+
+
+
+
+## 2.2.5 (2018-09-24)
+
+
+
+
+
+## 2.2.4 (2018-09-24)
+
+
+
+
+
+## 2.2.3 (2018-09-24)
+
+* fix(filter): copy async pres correctly with `filter()` ([1b1ed8a](https://github.com/vkarpov15/kareem/commit/1b1ed8a)), closes [Automattic/mongoose#3054](https://github.com/Automattic/mongoose/issues/3054)
+* feat: add filter() function ([1f641f4](https://github.com/vkarpov15/kareem/commit/1f641f4))
+* feat: support storing options on pre and post hooks ([59220b9](https://github.com/vkarpov15/kareem/commit/59220b9))
+
+
+
+
+## 2.2.3 (2018-09-10)
+
+* chore: release 2.2.3 ([af653a3](https://github.com/vkarpov15/kareem/commit/af653a3))
+
+
+
+
+## 2.2.2 (2018-09-10)
+
+* chore: release 2.2.2 ([3f0144d](https://github.com/vkarpov15/kareem/commit/3f0144d))
+* fix: allow merge() to not clone ([e628d65](https://github.com/vkarpov15/kareem/commit/e628d65))
+
+
+
+
+## 2.2.1 (2018-06-05)
+
+* chore: release 2.2.1 ([4625a64](https://github.com/vkarpov15/kareem/commit/4625a64))
+* chore: remove lockfile from git ([7f3e4e6](https://github.com/vkarpov15/kareem/commit/7f3e4e6))
+* fix: handle numAsync correctly when merging ([fef8e7e](https://github.com/vkarpov15/kareem/commit/fef8e7e))
+* test: repro issue with not copying numAsync ([952d9db](https://github.com/vkarpov15/kareem/commit/952d9db))
+
+
+
+
+## 2.2.0 (2018-06-05)
+
+* chore: release 2.2.0 ([ff9ad03](https://github.com/vkarpov15/kareem/commit/ff9ad03))
+* fix: use maps instead of objects for _pres and _posts so `toString()` doesn't get reported as having ([55df303](https://github.com/vkarpov15/kareem/commit/55df303)), closes [Automattic/mongoose#6538](https://github.com/Automattic/mongoose/issues/6538)
+
+
+
+
+## 2.1.0 (2018-05-16)
+
+* chore: release 2.1.0 ([ba5f1bc](https://github.com/vkarpov15/kareem/commit/ba5f1bc))
+* feat: add option to check wrapped function return value for promises ([c9d7dd1](https://github.com/vkarpov15/kareem/commit/c9d7dd1))
+* refactor: use const in wrap() ([0fc21f9](https://github.com/vkarpov15/kareem/commit/0fc21f9))
+
+
+
+
+## 2.0.7 (2018-04-28)
+
+* chore: release 2.0.7 ([0bf91e6](https://github.com/vkarpov15/kareem/commit/0bf91e6))
+* feat: add `hasHooks()` ([225f18d](https://github.com/vkarpov15/kareem/commit/225f18d)), closes [Automattic/mongoose#6385](https://github.com/Automattic/mongoose/issues/6385)
+
+
+
+
+## 2.0.6 (2018-03-22)
+
+* chore: release 2.0.6 ([f3d406b](https://github.com/vkarpov15/kareem/commit/f3d406b))
+* fix(wrap): ensure fast path still wraps function in `nextTick()` for chaining ([7000494](https://github.com/vkarpov15/kareem/commit/7000494)), closes [Automattic/mongoose#6250](https://github.com/Automattic/mongoose/issues/6250) [dsanel/mongoose-delete#36](https://github.com/dsanel/mongoose-delete/issues/36)
+
+
+
+
+## 2.0.5 (2018-02-22)
+
+* chore: release 2.0.5 ([3286612](https://github.com/vkarpov15/kareem/commit/3286612))
+* perf(createWrapper): don't create wrapper if there are no hooks ([5afc5b9](https://github.com/vkarpov15/kareem/commit/5afc5b9)), closes [Automattic/mongoose#6126](https://github.com/Automattic/mongoose/issues/6126)
+
+
+
+
+## 2.0.4 (2018-02-08)
+
+* chore: release 2.0.4 ([2ab0293](https://github.com/vkarpov15/kareem/commit/2ab0293))
+
+
+
+
+## 2.0.3 (2018-02-01)
+
+* chore: release 2.0.3 ([3c1abe5](https://github.com/vkarpov15/kareem/commit/3c1abe5))
+* fix: use process.nextTick() re: Automattic/mongoose#6074 ([e5bfe33](https://github.com/vkarpov15/kareem/commit/e5bfe33)), closes [Automattic/mongoose#6074](https://github.com/Automattic/mongoose/issues/6074)
+
+
+
+
+## 2.0.2 (2018-01-24)
+
+* chore: fix license ([a9d755c](https://github.com/vkarpov15/kareem/commit/a9d755c)), closes [#10](https://github.com/vkarpov15/kareem/issues/10)
+* chore: release 2.0.2 ([fe87ab6](https://github.com/vkarpov15/kareem/commit/fe87ab6))
+
+
+
+
+## 2.0.1 (2018-01-09)
+
+* chore: release 2.0.1 with lockfile bump ([09c44fb](https://github.com/vkarpov15/kareem/commit/09c44fb))
+
+
+
+
+## 2.0.0 (2018-01-09)
+
+* chore: bump marked re: security ([cc564a9](https://github.com/vkarpov15/kareem/commit/cc564a9))
+* chore: release 2.0.0 ([f511d1c](https://github.com/vkarpov15/kareem/commit/f511d1c))
+
+
+
+
+## 2.0.0-rc5 (2017-12-23)
+
+* chore: fix build on node 4+5 ([6dac5a4](https://github.com/vkarpov15/kareem/commit/6dac5a4))
+* chore: fix built on node 4 + 5 again ([434ef0a](https://github.com/vkarpov15/kareem/commit/434ef0a))
+* chore: release 2.0.0-rc5 ([25a32ee](https://github.com/vkarpov15/kareem/commit/25a32ee))
+
+
+
+
+## 2.0.0-rc4 (2017-12-22)
+
+* chore: release 2.0.0-rc4 ([49fc083](https://github.com/vkarpov15/kareem/commit/49fc083))
+* BREAKING CHANGE: deduplicate when merging hooks re: Automattic/mongoose#2945 ([d458573](https://github.com/vkarpov15/kareem/commit/d458573)), closes [Automattic/mongoose#2945](https://github.com/Automattic/mongoose/issues/2945)
+
+
+
+
+## 2.0.0-rc3 (2017-12-22)
+
+* chore: release 2.0.0-rc3 ([adaaa00](https://github.com/vkarpov15/kareem/commit/adaaa00))
+* feat: support returning promises from middleware functions ([05b4480](https://github.com/vkarpov15/kareem/commit/05b4480)), closes [Automattic/mongoose#3779](https://github.com/Automattic/mongoose/issues/3779)
+
+
+
+
+## 2.0.0-rc2 (2017-12-21)
+
+* chore: release 2.0.0-rc2 ([76325fa](https://github.com/vkarpov15/kareem/commit/76325fa))
+* fix: ensure next() and done() run in next tick ([6c20684](https://github.com/vkarpov15/kareem/commit/6c20684))
+
+
+
+
+## 2.0.0-rc1 (2017-12-21)
+
+* chore: improve test coverage re: Automattic/mongoose#3232 ([7b45cf0](https://github.com/vkarpov15/kareem/commit/7b45cf0)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+* chore: release 2.0.0-rc1 ([9b83f52](https://github.com/vkarpov15/kareem/commit/9b83f52))
+* BREAKING CHANGE: report sync exceptions as errors, only allow calling next() and done() once ([674adcc](https://github.com/vkarpov15/kareem/commit/674adcc)), closes [Automattic/mongoose#3483](https://github.com/Automattic/mongoose/issues/3483)
+
+
+
+
+## 2.0.0-rc0 (2017-12-17)
+
+* chore: release 2.0.0-rc0 ([16b44b5](https://github.com/vkarpov15/kareem/commit/16b44b5))
+* BREAKING CHANGE: drop support for node < 4 ([9cbb8c7](https://github.com/vkarpov15/kareem/commit/9cbb8c7))
+* BREAKING CHANGE: remove useLegacyPost and add several new features ([6dd8531](https://github.com/vkarpov15/kareem/commit/6dd8531)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
+
+
+
+
+## 1.5.0 (2017-07-20)
+
+* chore: release 1.5.0 ([9c491a0](https://github.com/vkarpov15/kareem/commit/9c491a0))
+* fix: improve post error handlers results ([9928dd5](https://github.com/vkarpov15/kareem/commit/9928dd5)), closes [Automattic/mongoose#5466](https://github.com/Automattic/mongoose/issues/5466)
+
+
+
+
+## 1.4.2 (2017-07-06)
+
+* chore: release 1.4.2 ([8d14ac5](https://github.com/vkarpov15/kareem/commit/8d14ac5))
+* fix: correct args re: Automattic/mongoose#5405 ([3f28ae6](https://github.com/vkarpov15/kareem/commit/3f28ae6)), closes [Automattic/mongoose#5405](https://github.com/Automattic/mongoose/issues/5405)
+
+
+
+
+## 1.4.1 (2017-04-25)
+
+* chore: release 1.4.1 ([5ecf0c2](https://github.com/vkarpov15/kareem/commit/5ecf0c2))
+* fix: handle numAsyncPres with clone() ([c72e857](https://github.com/vkarpov15/kareem/commit/c72e857)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+* test: repro #8 ([9b4d6b2](https://github.com/vkarpov15/kareem/commit/9b4d6b2)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
+
+
+
+
+## 1.4.0 (2017-04-19)
+
+* chore: release 1.4.0 ([101c5f5](https://github.com/vkarpov15/kareem/commit/101c5f5))
+* feat: add merge() function ([285325e](https://github.com/vkarpov15/kareem/commit/285325e))
+
+
+
+
+## 1.3.0 (2017-03-26)
+
+* chore: release 1.3.0 ([f3a9e50](https://github.com/vkarpov15/kareem/commit/f3a9e50))
+* feat: pass function args to execPre ([4dd466d](https://github.com/vkarpov15/kareem/commit/4dd466d))
+
+
+
+
+## 1.2.1 (2017-02-03)
+
+* chore: release 1.2.1 ([d97081f](https://github.com/vkarpov15/kareem/commit/d97081f))
+* fix: filter out _kareemIgnored args for error handlers re: Automattic/mongoose#4925 ([ddc7aeb](https://github.com/vkarpov15/kareem/commit/ddc7aeb)), closes [Automattic/mongoose#4925](https://github.com/Automattic/mongoose/issues/4925)
+* fix: make error handlers handle errors in pre hooks ([af38033](https://github.com/vkarpov15/kareem/commit/af38033)), closes [Automattic/mongoose#4927](https://github.com/Automattic/mongoose/issues/4927)
+
+
+
+
+## 1.2.0 (2017-01-02)
+
+* chore: release 1.2.0 ([033225c](https://github.com/vkarpov15/kareem/commit/033225c))
+* chore: upgrade deps ([f9e9a09](https://github.com/vkarpov15/kareem/commit/f9e9a09))
+* feat: add _kareemIgnore re: Automattic/mongoose#4836 ([7957771](https://github.com/vkarpov15/kareem/commit/7957771)), closes [Automattic/mongoose#4836](https://github.com/Automattic/mongoose/issues/4836)
+
+
+
+
+## 1.1.5 (2016-12-13)
+
+* chore: release 1.1.5 ([1a9f684](https://github.com/vkarpov15/kareem/commit/1a9f684))
+* fix: correct field name ([04a0e9d](https://github.com/vkarpov15/kareem/commit/04a0e9d))
+
+
+
+
+## 1.1.4 (2016-12-09)
+
+* chore: release 1.1.4 ([ece401c](https://github.com/vkarpov15/kareem/commit/ece401c))
+* chore: run tests on node 6 ([e0cb1cb](https://github.com/vkarpov15/kareem/commit/e0cb1cb))
+* fix: only copy own properties in clone() ([dfe28ce](https://github.com/vkarpov15/kareem/commit/dfe28ce)), closes [#7](https://github.com/vkarpov15/kareem/issues/7)
+
+
+
+
+## 1.1.3 (2016-06-27)
+
+* chore: release 1.1.3 ([87171c8](https://github.com/vkarpov15/kareem/commit/87171c8))
+* fix: couple more issues with arg processing ([c65f523](https://github.com/vkarpov15/kareem/commit/c65f523))
+
+
+
+
+## 1.1.2 (2016-06-27)
+
+* chore: release 1.1.2 ([8e102b6](https://github.com/vkarpov15/kareem/commit/8e102b6))
+* fix: add early return ([4feda4e](https://github.com/vkarpov15/kareem/commit/4feda4e))
+
+
+
+
+## 1.1.1 (2016-06-27)
+
+* chore: release 1.1.1 ([8bb3050](https://github.com/vkarpov15/kareem/commit/8bb3050))
+* fix: skip error handlers if no error ([0eb3a44](https://github.com/vkarpov15/kareem/commit/0eb3a44))
+
+
+
+
+## 1.1.0 (2016-05-11)
+
+* chore: release 1.1.0 ([85332d9](https://github.com/vkarpov15/kareem/commit/85332d9))
+* chore: test on node 4 and node 5 ([1faefa1](https://github.com/vkarpov15/kareem/commit/1faefa1))
+* 100% coverage again ([c9aee4e](https://github.com/vkarpov15/kareem/commit/c9aee4e))
+* add support for error post hooks ([d378113](https://github.com/vkarpov15/kareem/commit/d378113))
+* basic setup for sync hooks #4 ([55aa081](https://github.com/vkarpov15/kareem/commit/55aa081)), closes [#4](https://github.com/vkarpov15/kareem/issues/4)
+* proof of concept for error handlers ([e4a07d9](https://github.com/vkarpov15/kareem/commit/e4a07d9))
+* refactor out handleWrapError helper ([b19af38](https://github.com/vkarpov15/kareem/commit/b19af38))
+
+
+
+
+## 1.0.1 (2015-05-10)
+
+* Fix #1 ([de60dc6](https://github.com/vkarpov15/kareem/commit/de60dc6)), closes [#1](https://github.com/vkarpov15/kareem/issues/1)
+* release 1.0.1 ([6971088](https://github.com/vkarpov15/kareem/commit/6971088))
+* Run tests on iojs in travis ([adcd201](https://github.com/vkarpov15/kareem/commit/adcd201))
+* support legacy post hook behavior in wrap() ([23fa74c](https://github.com/vkarpov15/kareem/commit/23fa74c))
+* Use node 0.12 in travis ([834689d](https://github.com/vkarpov15/kareem/commit/834689d))
+
+
+
+
+## 1.0.0 (2015-01-28)
+
+* Tag 1.0.0 ([4c5a35a](https://github.com/vkarpov15/kareem/commit/4c5a35a))
+
+
+
+
+## 0.0.8 (2015-01-27)
+
+* Add clone function ([688bba7](https://github.com/vkarpov15/kareem/commit/688bba7))
+* Add jscs for style checking ([5c93149](https://github.com/vkarpov15/kareem/commit/5c93149))
+* Bump 0.0.8 ([03c0d2f](https://github.com/vkarpov15/kareem/commit/03c0d2f))
+* Fix jscs config, add gulp rules ([9989abf](https://github.com/vkarpov15/kareem/commit/9989abf))
+* fix Makefile typo ([1f7e61a](https://github.com/vkarpov15/kareem/commit/1f7e61a))
+
+
+
+
+## 0.0.7 (2015-01-04)
+
+* Bump 0.0.7 ([98ef173](https://github.com/vkarpov15/kareem/commit/98ef173))
+* fix LearnBoost/mongoose#2553 - use null instead of undefined for err ([9157b48](https://github.com/vkarpov15/kareem/commit/9157b48)), closes [LearnBoost/mongoose#2553](https://github.com/LearnBoost/mongoose/issues/2553)
+* Regenerate docs ([2331cdf](https://github.com/vkarpov15/kareem/commit/2331cdf))
+
+
+
+
+## 0.0.6 (2015-01-01)
+
+* Update docs and bump 0.0.6 ([92c12a7](https://github.com/vkarpov15/kareem/commit/92c12a7))
+
+
+
+
+## 0.0.5 (2015-01-01)
+
+* Add coverage rule to Makefile ([825a91c](https://github.com/vkarpov15/kareem/commit/825a91c))
+* Add coveralls to README ([fb52369](https://github.com/vkarpov15/kareem/commit/fb52369))
+* Add coveralls to travis ([93f6f15](https://github.com/vkarpov15/kareem/commit/93f6f15))
+* Add createWrapper() function ([ea77741](https://github.com/vkarpov15/kareem/commit/ea77741))
+* Add istanbul code coverage ([6eceeef](https://github.com/vkarpov15/kareem/commit/6eceeef))
+* Add some more comments for examples ([c5b0c6f](https://github.com/vkarpov15/kareem/commit/c5b0c6f))
+* Add travis ([e6dcb06](https://github.com/vkarpov15/kareem/commit/e6dcb06))
+* Add travis badge to docs ([ad8c9b3](https://github.com/vkarpov15/kareem/commit/ad8c9b3))
+* Add wrap() tests, 100% coverage ([6945be4](https://github.com/vkarpov15/kareem/commit/6945be4))
+* Better test coverage for execPost ([d9ad539](https://github.com/vkarpov15/kareem/commit/d9ad539))
+* Bump 0.0.5 ([69875b1](https://github.com/vkarpov15/kareem/commit/69875b1))
+* Docs fix ([15b7098](https://github.com/vkarpov15/kareem/commit/15b7098))
+* Fix silly mistake in docs generation ([50373eb](https://github.com/vkarpov15/kareem/commit/50373eb))
+* Fix typo in readme ([fec4925](https://github.com/vkarpov15/kareem/commit/fec4925))
+* Linkify travis badge ([92b25fe](https://github.com/vkarpov15/kareem/commit/92b25fe))
+* Make travis run coverage ([747157b](https://github.com/vkarpov15/kareem/commit/747157b))
+* Move travis status badge ([d52e89b](https://github.com/vkarpov15/kareem/commit/d52e89b))
+* Quick fix for coverage ([50bbddb](https://github.com/vkarpov15/kareem/commit/50bbddb))
+* Typo fix ([adea794](https://github.com/vkarpov15/kareem/commit/adea794))
+
+
+
+
+## 0.0.4 (2014-12-13)
+
+* Bump 0.0.4, run docs generation ([51a15fe](https://github.com/vkarpov15/kareem/commit/51a15fe))
+* Use correct post parameters in wrap() ([9bb5da3](https://github.com/vkarpov15/kareem/commit/9bb5da3))
+
+
+
+
+## 0.0.3 (2014-12-12)
+
+* Add npm test script, fix small bug with args not getting passed through post ([49e3e68](https://github.com/vkarpov15/kareem/commit/49e3e68))
+* Bump 0.0.3 ([65621d8](https://github.com/vkarpov15/kareem/commit/65621d8))
+* Update readme ([901388b](https://github.com/vkarpov15/kareem/commit/901388b))
+
+
+
+
+## 0.0.2 (2014-12-12)
+
+* Add github repo and bump 0.0.2 ([59db8be](https://github.com/vkarpov15/kareem/commit/59db8be))
+
+
+
+
+## 0.0.1 (2014-12-12)
+
+* Add basic docs ([ad29ea4](https://github.com/vkarpov15/kareem/commit/ad29ea4))
+* Add pre hooks ([2ffc356](https://github.com/vkarpov15/kareem/commit/2ffc356))
+* Add wrap function ([68c540c](https://github.com/vkarpov15/kareem/commit/68c540c))
+* Bump to version 0.0.1 ([a4bfd68](https://github.com/vkarpov15/kareem/commit/a4bfd68))
+* Initial commit ([4002458](https://github.com/vkarpov15/kareem/commit/4002458))
+* Initial deposit ([98fc489](https://github.com/vkarpov15/kareem/commit/98fc489))
+* Post hooks ([395b67c](https://github.com/vkarpov15/kareem/commit/395b67c))
+* Some basic setup work ([82df75e](https://github.com/vkarpov15/kareem/commit/82df75e))
+* Support sync pre hooks ([1cc1b9f](https://github.com/vkarpov15/kareem/commit/1cc1b9f))
+* Update package.json description ([978da18](https://github.com/vkarpov15/kareem/commit/978da18))
diff --git a/week-3/04-course-app-hard/node_modules/kareem/LICENSE b/week-3/04-course-app-hard/node_modules/kareem/LICENSE
new file mode 100644
index 000000000..b0d46d3c2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/kareem/LICENSE
@@ -0,0 +1,202 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2014-2022 mongoosejs
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/week-3/04-course-app-hard/node_modules/kareem/README.md b/week-3/04-course-app-hard/node_modules/kareem/README.md
new file mode 100644
index 000000000..b1e0fdbce
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/kareem/README.md
@@ -0,0 +1,419 @@
+# kareem
+
+ [![Build Status](https://github.com/mongoosejs/kareem/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/mongoosejs/kareem/actions/workflows/test.yml)
+
+
+Re-imagined take on the [hooks](http://npmjs.org/package/hooks) module, meant to offer additional flexibility in allowing you to execute hooks whenever necessary, as opposed to simply wrapping a single function.
+
+Named for the NBA's all-time leading scorer Kareem Abdul-Jabbar, known for his mastery of the [hook shot](http://en.wikipedia.org/wiki/Kareem_Abdul-Jabbar#Skyhook)
+
+
+
+# API
+
+## pre hooks
+
+Much like [hooks](https://npmjs.org/package/hooks), kareem lets you define
+pre and post hooks: pre hooks are called before a given function executes.
+Unlike hooks, kareem stores hooks and other internal state in a separate
+object, rather than relying on inheritance. Furthermore, kareem exposes
+an `execPre()` function that allows you to execute your pre hooks when
+appropriate, giving you more fine-grained control over your function hooks.
+
+
+#### It runs without any hooks specified
+
+```javascript
+hooks.execPre('cook', null, function() {
+ // ...
+});
+```
+
+#### It runs basic serial pre hooks
+
+pre hook functions take one parameter, a "done" function that you execute
+when your pre hook is finished.
+
+
+```javascript
+var count = 0;
+
+hooks.pre('cook', function(done) {
+ ++count;
+ done();
+});
+
+hooks.execPre('cook', null, function() {
+ assert.equal(1, count);
+});
+```
+
+#### It can run multipe pre hooks
+
+```javascript
+var count1 = 0;
+var count2 = 0;
+
+hooks.pre('cook', function(done) {
+ ++count1;
+ done();
+});
+
+hooks.pre('cook', function(done) {
+ ++count2;
+ done();
+});
+
+hooks.execPre('cook', null, function() {
+ assert.equal(1, count1);
+ assert.equal(1, count2);
+});
+```
+
+#### It can run fully synchronous pre hooks
+
+If your pre hook function takes no parameters, its assumed to be
+fully synchronous.
+
+
+```javascript
+var count1 = 0;
+var count2 = 0;
+
+hooks.pre('cook', function() {
+ ++count1;
+});
+
+hooks.pre('cook', function() {
+ ++count2;
+});
+
+hooks.execPre('cook', null, function(error) {
+ assert.equal(null, error);
+ assert.equal(1, count1);
+ assert.equal(1, count2);
+});
+```
+
+#### It properly attaches context to pre hooks
+
+Pre save hook functions are bound to the second parameter to `execPre()`
+
+
+```javascript
+hooks.pre('cook', function(done) {
+ this.bacon = 3;
+ done();
+});
+
+hooks.pre('cook', function(done) {
+ this.eggs = 4;
+ done();
+});
+
+var obj = { bacon: 0, eggs: 0 };
+
+// In the pre hooks, `this` will refer to `obj`
+hooks.execPre('cook', obj, function(error) {
+ assert.equal(null, error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+});
+```
+
+#### It can execute parallel (async) pre hooks
+
+Like the hooks module, you can declare "async" pre hooks - these take two
+parameters, the functions `next()` and `done()`. `next()` passes control to
+the next pre hook, but the underlying function won't be called until all
+async pre hooks have called `done()`.
+
+
+```javascript
+hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+});
+
+hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+});
+
+hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+});
+
+var obj = { bacon: 0, eggs: 0 };
+
+hooks.execPre('cook', obj, function() {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+});
+```
+
+#### It supports returning a promise
+
+You can also return a promise from your pre hooks instead of calling
+`next()`. When the returned promise resolves, kareem will kick off the
+next middleware.
+
+
+```javascript
+hooks.pre('cook', function() {
+ return new Promise(resolve => {
+ setTimeout(() => {
+ this.bacon = 3;
+ resolve();
+ }, 100);
+ });
+});
+
+var obj = { bacon: 0 };
+
+hooks.execPre('cook', obj, function() {
+ assert.equal(3, obj.bacon);
+});
+```
+
+## post hooks
+
+acquit:ignore:end
+
+#### It runs without any hooks specified
+
+```javascript
+hooks.execPost('cook', null, [1], function(error, eggs) {
+ assert.ifError(error);
+ assert.equal(1, eggs);
+ done();
+});
+```
+
+#### It executes with parameters passed in
+
+```javascript
+hooks.post('cook', function(eggs, bacon, callback) {
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ callback();
+});
+
+hooks.execPost('cook', null, [1, 2], function(error, eggs, bacon) {
+ assert.ifError(error);
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+});
+```
+
+#### It can use synchronous post hooks
+
+```javascript
+var execed = {};
+
+hooks.post('cook', function(eggs, bacon) {
+ execed.first = true;
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+});
+
+hooks.post('cook', function(eggs, bacon, callback) {
+ execed.second = true;
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ callback();
+});
+
+hooks.execPost('cook', null, [1, 2], function(error, eggs, bacon) {
+ assert.ifError(error);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+});
+```
+
+#### It supports returning a promise
+
+You can also return a promise from your post hooks instead of calling
+`next()`. When the returned promise resolves, kareem will kick off the
+next middleware.
+
+
+```javascript
+hooks.post('cook', function(bacon) {
+ return new Promise(resolve => {
+ setTimeout(() => {
+ this.bacon = 3;
+ resolve();
+ }, 100);
+ });
+});
+
+var obj = { bacon: 0 };
+
+hooks.execPost('cook', obj, obj, function() {
+ assert.equal(obj.bacon, 3);
+});
+```
+
+## wrap()
+
+acquit:ignore:end
+
+#### It wraps pre and post calls into one call
+
+```javascript
+hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+});
+
+hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+});
+
+hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+});
+
+hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+});
+
+var obj = { bacon: 0, eggs: 0 };
+
+var args = [obj];
+args.push(function(error, result) {
+ assert.ifError(error);
+ assert.equal(null, error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal('no', obj.tofu);
+
+ assert.equal(obj, result);
+});
+
+hooks.wrap(
+ 'cook',
+ function(o, callback) {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ callback(null, o);
+ },
+ obj,
+ args);
+```
+
+## createWrapper()
+
+#### It wraps wrap() into a callable function
+
+```javascript
+hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+});
+
+hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+});
+
+hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+});
+
+hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+});
+
+var obj = { bacon: 0, eggs: 0 };
+
+var cook = hooks.createWrapper(
+ 'cook',
+ function(o, callback) {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ callback(null, o);
+ },
+ obj);
+
+cook(obj, function(error, result) {
+ assert.ifError(error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal('no', obj.tofu);
+
+ assert.equal(obj, result);
+});
+```
+
+## clone()
+
+acquit:ignore:end
+
+#### It clones a Kareem object
+
+```javascript
+var k1 = new Kareem();
+k1.pre('cook', function() {});
+k1.post('cook', function() {});
+
+var k2 = k1.clone();
+assert.deepEqual(Array.from(k2._pres.keys()), ['cook']);
+assert.deepEqual(Array.from(k2._posts.keys()), ['cook']);
+```
+
+## merge()
+
+#### It pulls hooks from another Kareem object
+
+```javascript
+var k1 = new Kareem();
+var test1 = function() {};
+k1.pre('cook', test1);
+k1.post('cook', function() {});
+
+var k2 = new Kareem();
+var test2 = function() {};
+k2.pre('cook', test2);
+var k3 = k2.merge(k1);
+assert.equal(k3._pres.get('cook').length, 2);
+assert.equal(k3._pres.get('cook')[0].fn, test2);
+assert.equal(k3._pres.get('cook')[1].fn, test1);
+assert.equal(k3._posts.get('cook').length, 1);
+```
diff --git a/week-3/04-course-app-hard/node_modules/kareem/SECURITY.md b/week-3/04-course-app-hard/node_modules/kareem/SECURITY.md
new file mode 100644
index 000000000..da9c516dd
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/kareem/SECURITY.md
@@ -0,0 +1,5 @@
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
diff --git a/week-3/04-course-app-hard/node_modules/kareem/index.d.ts b/week-3/04-course-app-hard/node_modules/kareem/index.d.ts
new file mode 100644
index 000000000..cc9247d25
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/kareem/index.d.ts
@@ -0,0 +1,29 @@
+declare module "kareem" {
+ export default class Kareem {
+ static skipWrappedFunction(): SkipWrappedFunction;
+ static overwriteMiddlewareResult(): OverwriteMiddlewareResult;
+
+ pre(name: string | RegExp, fn: Function): this;
+ pre(name: string | RegExp, options: Record, fn: Function, error?: any, unshift?: boolean): this;
+ post(name: string | RegExp, fn: Function): this;
+ post(name: string | RegExp, options: Record, fn: Function, unshift?: boolean): this;
+
+ clone(): Kareem;
+ merge(other: Kareem, clone?: boolean): this;
+
+ createWrapper(name: string, fn: Function, context?: any, options?: Record): Function;
+ createWrapperSync(name: string, fn: Function): Function;
+ hasHooks(name: string): boolean;
+ filter(fn: Function): Kareem;
+
+ wrap(name: string, fn: Function, context: any, args: any[], options?: Record): Function;
+
+ execPostSync(name: string, context: any, args: any[]): any;
+ execPost(name: string, context: any, args: any[], options?: Record, callback?: Function): void;
+ execPreSync(name: string, context: any, args: any[]): any;
+ execPre(name: string, context: any, args: any[], callback?: Function): void;
+ }
+
+ class SkipWrappedFunction {}
+ class OverwriteMiddlewareResult {}
+}
diff --git a/week-3/04-course-app-hard/node_modules/kareem/index.js b/week-3/04-course-app-hard/node_modules/kareem/index.js
new file mode 100644
index 000000000..9c5aa16ed
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/kareem/index.js
@@ -0,0 +1,668 @@
+'use strict';
+
+/**
+ * Create a new instance
+ */
+function Kareem() {
+ this._pres = new Map();
+ this._posts = new Map();
+}
+
+Kareem.skipWrappedFunction = function skipWrappedFunction() {
+ if (!(this instanceof Kareem.skipWrappedFunction)) {
+ return new Kareem.skipWrappedFunction(...arguments);
+ }
+
+ this.args = [...arguments];
+};
+
+Kareem.overwriteResult = function overwriteResult() {
+ if (!(this instanceof Kareem.overwriteResult)) {
+ return new Kareem.overwriteResult(...arguments);
+ }
+
+ this.args = [...arguments];
+};
+
+/**
+ * Execute all "pre" hooks for "name"
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array|Function} args Optional arguments or directly the callback
+ * @param {Function} [callback] The callback to call when executing all hooks are finished
+ * @returns {void}
+ */
+Kareem.prototype.execPre = function(name, context, args, callback) {
+ if (arguments.length === 3) {
+ callback = args;
+ args = [];
+ }
+ const pres = this._pres.get(name) || [];
+ const numPres = pres.length;
+ const numAsyncPres = pres.numAsync || 0;
+ let currentPre = 0;
+ let asyncPresLeft = numAsyncPres;
+ let done = false;
+ const $args = args;
+ let shouldSkipWrappedFunction = null;
+
+ if (!numPres) {
+ return nextTick(function() {
+ callback(null);
+ });
+ }
+
+ function next() {
+ if (currentPre >= numPres) {
+ return;
+ }
+ const pre = pres[currentPre];
+
+ if (pre.isAsync) {
+ const args = [
+ decorateNextFn(_next),
+ decorateNextFn(function(error) {
+ if (error) {
+ if (done) {
+ return;
+ }
+ if (error instanceof Kareem.skipWrappedFunction) {
+ shouldSkipWrappedFunction = error;
+ } else {
+ done = true;
+ return callback(error);
+ }
+ }
+ if (--asyncPresLeft === 0 && currentPre >= numPres) {
+ return callback(shouldSkipWrappedFunction);
+ }
+ })
+ ];
+
+ callMiddlewareFunction(pre.fn, context, args, args[0]);
+ } else if (pre.fn.length > 0) {
+ const args = [decorateNextFn(_next)];
+ const _args = arguments.length >= 2 ? arguments : [null].concat($args);
+ for (let i = 1; i < _args.length; ++i) {
+ if (i === _args.length - 1 && typeof _args[i] === 'function') {
+ continue; // skip callbacks to avoid accidentally calling the callback from a hook
+ }
+ args.push(_args[i]);
+ }
+
+ callMiddlewareFunction(pre.fn, context, args, args[0]);
+ } else {
+ let maybePromiseLike = null;
+ try {
+ maybePromiseLike = pre.fn.call(context);
+ } catch (err) {
+ if (err != null) {
+ return callback(err);
+ }
+ }
+
+ if (isPromiseLike(maybePromiseLike)) {
+ maybePromiseLike.then(() => _next(), err => _next(err));
+ } else {
+ if (++currentPre >= numPres) {
+ if (asyncPresLeft > 0) {
+ // Leave parallel hooks to run
+ return;
+ } else {
+ return nextTick(function() {
+ callback(shouldSkipWrappedFunction);
+ });
+ }
+ }
+ next();
+ }
+ }
+ }
+
+ next.apply(null, [null].concat(args));
+
+ function _next(error) {
+ if (error) {
+ if (done) {
+ return;
+ }
+ if (error instanceof Kareem.skipWrappedFunction) {
+ shouldSkipWrappedFunction = error;
+ } else {
+ done = true;
+ return callback(error);
+ }
+ }
+
+ if (++currentPre >= numPres) {
+ if (asyncPresLeft > 0) {
+ // Leave parallel hooks to run
+ return;
+ } else {
+ return callback(shouldSkipWrappedFunction);
+ }
+ }
+
+ next.apply(context, arguments);
+ }
+};
+
+/**
+ * Execute all "pre" hooks for "name" synchronously
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array} [args] Apply custom arguments to the hook
+ * @returns {void}
+ */
+Kareem.prototype.execPreSync = function(name, context, args) {
+ const pres = this._pres.get(name) || [];
+ const numPres = pres.length;
+
+ for (let i = 0; i < numPres; ++i) {
+ pres[i].fn.apply(context, args || []);
+ }
+};
+
+/**
+ * Execute all "post" hooks for "name"
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array|Function} args Apply custom arguments to the hook
+ * @param {*} options Optional options or directly the callback
+ * @param {Function} [callback] The callback to call when executing all hooks are finished
+ * @returns {void}
+ */
+Kareem.prototype.execPost = function(name, context, args, options, callback) {
+ if (arguments.length < 5) {
+ callback = options;
+ options = null;
+ }
+ const posts = this._posts.get(name) || [];
+ const numPosts = posts.length;
+ let currentPost = 0;
+
+ let firstError = null;
+ if (options && options.error) {
+ firstError = options.error;
+ }
+
+ if (!numPosts) {
+ return nextTick(function() {
+ callback.apply(null, [firstError].concat(args));
+ });
+ }
+
+ function next() {
+ const post = posts[currentPost].fn;
+ let numArgs = 0;
+ const argLength = args.length;
+ const newArgs = [];
+ for (let i = 0; i < argLength; ++i) {
+ numArgs += args[i] && args[i]._kareemIgnore ? 0 : 1;
+ if (!args[i] || !args[i]._kareemIgnore) {
+ newArgs.push(args[i]);
+ }
+ }
+
+ if (firstError) {
+ if (isErrorHandlingMiddleware(posts[currentPost], numArgs)) {
+ const _cb = decorateNextFn(function(error) {
+ if (error) {
+ if (error instanceof Kareem.overwriteResult) {
+ args = error.args;
+ if (++currentPost >= numPosts) {
+ return callback.call(null, firstError);
+ }
+ return next();
+ }
+ firstError = error;
+ }
+ if (++currentPost >= numPosts) {
+ return callback.call(null, firstError);
+ }
+ next();
+ });
+
+ callMiddlewareFunction(post, context,
+ [firstError].concat(newArgs).concat([_cb]), _cb);
+ } else {
+ if (++currentPost >= numPosts) {
+ return callback.call(null, firstError);
+ }
+ next();
+ }
+ } else {
+ const _cb = decorateNextFn(function(error) {
+ if (error) {
+ if (error instanceof Kareem.overwriteResult) {
+ args = error.args;
+ if (++currentPost >= numPosts) {
+ return callback.apply(null, [null].concat(args));
+ }
+ return next();
+ }
+ firstError = error;
+ return next();
+ }
+
+ if (++currentPost >= numPosts) {
+ return callback.apply(null, [null].concat(args));
+ }
+
+ next();
+ });
+
+ if (isErrorHandlingMiddleware(posts[currentPost], numArgs)) {
+ // Skip error handlers if no error
+ if (++currentPost >= numPosts) {
+ return callback.apply(null, [null].concat(args));
+ }
+ return next();
+ }
+ if (post.length === numArgs + 1) {
+ callMiddlewareFunction(post, context, newArgs.concat([_cb]), _cb);
+ } else {
+ let error;
+ let maybePromiseLike;
+ try {
+ maybePromiseLike = post.apply(context, newArgs);
+ } catch (err) {
+ error = err;
+ firstError = err;
+ }
+
+ if (isPromiseLike(maybePromiseLike)) {
+ return maybePromiseLike.then(
+ (res) => {
+ _cb(res instanceof Kareem.overwriteResult ? res : null);
+ },
+ err => _cb(err)
+ );
+ }
+
+ if (maybePromiseLike instanceof Kareem.overwriteResult) {
+ args = maybePromiseLike.args;
+ }
+
+ if (++currentPost >= numPosts) {
+ return callback.apply(null, [error].concat(args));
+ }
+
+ next();
+ }
+ }
+ }
+
+ next();
+};
+
+/**
+ * Execute all "post" hooks for "name" synchronously
+ * @param {String} name The hook name to execute
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array|Function} args Apply custom arguments to the hook
+ * @returns {Array} The used arguments
+ */
+Kareem.prototype.execPostSync = function(name, context, args) {
+ const posts = this._posts.get(name) || [];
+ const numPosts = posts.length;
+
+ for (let i = 0; i < numPosts; ++i) {
+ const res = posts[i].fn.apply(context, args || []);
+ if (res instanceof Kareem.overwriteResult) {
+ args = res.args;
+ }
+ }
+
+ return args;
+};
+
+/**
+ * Create a synchronous wrapper for "fn"
+ * @param {String} name The name of the hook
+ * @param {Function} fn The function to wrap
+ * @returns {Function} The wrapped function
+ */
+Kareem.prototype.createWrapperSync = function(name, fn) {
+ const _this = this;
+ return function syncWrapper() {
+ _this.execPreSync(name, this, arguments);
+
+ const toReturn = fn.apply(this, arguments);
+
+ const result = _this.execPostSync(name, this, [toReturn]);
+
+ return result[0];
+ };
+};
+
+function _handleWrapError(instance, error, name, context, args, options, callback) {
+ if (options.useErrorHandlers) {
+ return instance.execPost(name, context, args, { error: error }, function(error) {
+ return typeof callback === 'function' && callback(error);
+ });
+ } else {
+ return typeof callback === 'function' && callback(error);
+ }
+}
+
+/**
+ * Executes pre hooks, followed by the wrapped function, followed by post hooks.
+ * @param {String} name The name of the hook
+ * @param {Function} fn The function for the hook
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Array} args Apply custom arguments to the hook
+ * @param {Object} [options]
+ * @param {Boolean} [options.checkForPromise]
+ * @returns {void}
+ */
+Kareem.prototype.wrap = function(name, fn, context, args, options) {
+ const lastArg = (args.length > 0 ? args[args.length - 1] : null);
+ const argsWithoutCb = Array.from(args);
+ typeof lastArg === 'function' && argsWithoutCb.pop();
+ const _this = this;
+
+ options = options || {};
+ const checkForPromise = options.checkForPromise;
+
+ this.execPre(name, context, args, function(error) {
+ if (error && !(error instanceof Kareem.skipWrappedFunction)) {
+ const numCallbackParams = options.numCallbackParams || 0;
+ const errorArgs = options.contextParameter ? [context] : [];
+ for (let i = errorArgs.length; i < numCallbackParams; ++i) {
+ errorArgs.push(null);
+ }
+ return _handleWrapError(_this, error, name, context, errorArgs,
+ options, lastArg);
+ }
+
+ const numParameters = fn.length;
+ let ret;
+
+ if (error instanceof Kareem.skipWrappedFunction) {
+ ret = error.args[0];
+ return _cb(null, ...error.args);
+ } else {
+ try {
+ ret = fn.apply(context, argsWithoutCb.concat(_cb));
+ } catch (err) {
+ return _cb(err);
+ }
+ }
+
+ if (checkForPromise) {
+ if (isPromiseLike(ret)) {
+ // Thenable, use it
+ return ret.then(
+ res => _cb(null, res),
+ err => _cb(err)
+ );
+ }
+
+ // If `fn()` doesn't have a callback argument and doesn't return a
+ // promise, assume it is sync
+ if (numParameters < argsWithoutCb.length + 1) {
+ return _cb(null, ret);
+ }
+ }
+
+ function _cb() {
+ const argsWithoutError = Array.from(arguments);
+ argsWithoutError.shift();
+ if (options.nullResultByDefault && argsWithoutError.length === 0) {
+ argsWithoutError.push(null);
+ }
+ if (arguments[0]) {
+ // Assume error
+ return _handleWrapError(_this, arguments[0], name, context,
+ argsWithoutError, options, lastArg);
+ } else {
+ _this.execPost(name, context, argsWithoutError, function() {
+ if (lastArg === null) {
+ return;
+ }
+ arguments[0]
+ ? lastArg(arguments[0])
+ : lastArg.apply(context, arguments);
+ });
+ }
+ }
+ });
+};
+
+/**
+ * Filter current instance for something specific and return the filtered clone
+ * @param {Function} fn The filter function
+ * @returns {Kareem} The cloned and filtered instance
+ */
+Kareem.prototype.filter = function(fn) {
+ const clone = this.clone();
+
+ const pres = Array.from(clone._pres.keys());
+ for (const name of pres) {
+ const hooks = this._pres.get(name).
+ map(h => Object.assign({}, h, { name: name })).
+ filter(fn);
+
+ if (hooks.length === 0) {
+ clone._pres.delete(name);
+ continue;
+ }
+
+ hooks.numAsync = hooks.filter(h => h.isAsync).length;
+
+ clone._pres.set(name, hooks);
+ }
+
+ const posts = Array.from(clone._posts.keys());
+ for (const name of posts) {
+ const hooks = this._posts.get(name).
+ map(h => Object.assign({}, h, { name: name })).
+ filter(fn);
+
+ if (hooks.length === 0) {
+ clone._posts.delete(name);
+ continue;
+ }
+
+ clone._posts.set(name, hooks);
+ }
+
+ return clone;
+};
+
+/**
+ * Check for a "name" to exist either in pre or post hooks
+ * @param {String} name The name of the hook
+ * @returns {Boolean} "true" if found, "false" otherwise
+ */
+Kareem.prototype.hasHooks = function(name) {
+ return this._pres.has(name) || this._posts.has(name);
+};
+
+/**
+ * Create a Wrapper for "fn" on "name" and return the wrapped function
+ * @param {String} name The name of the hook
+ * @param {Function} fn The function to wrap
+ * @param {*} context Overwrite the "this" for the hook
+ * @param {Object} [options]
+ * @returns {Function} The wrapped function
+ */
+Kareem.prototype.createWrapper = function(name, fn, context, options) {
+ const _this = this;
+ if (!this.hasHooks(name)) {
+ // Fast path: if there's no hooks for this function, just return the
+ // function wrapped in a nextTick()
+ return function() {
+ nextTick(() => fn.apply(this, arguments));
+ };
+ }
+ return function() {
+ const _context = context || this;
+ _this.wrap(name, fn, _context, Array.from(arguments), options);
+ };
+};
+
+/**
+ * Register a new hook for "pre"
+ * @param {String} name The name of the hook
+ * @param {Boolean} [isAsync]
+ * @param {Function} fn The function to register for "name"
+ * @param {never} error Unused
+ * @param {Boolean} [unshift] Wheter to "push" or to "unshift" the new hook
+ * @returns {Kareem}
+ */
+Kareem.prototype.pre = function(name, isAsync, fn, error, unshift) {
+ let options = {};
+ if (typeof isAsync === 'object' && isAsync !== null) {
+ options = isAsync;
+ isAsync = options.isAsync;
+ } else if (typeof arguments[1] !== 'boolean') {
+ fn = isAsync;
+ isAsync = false;
+ }
+
+ const pres = this._pres.get(name) || [];
+ this._pres.set(name, pres);
+
+ if (isAsync) {
+ pres.numAsync = pres.numAsync || 0;
+ ++pres.numAsync;
+ }
+
+ if (typeof fn !== 'function') {
+ throw new Error('pre() requires a function, got "' + typeof fn + '"');
+ }
+
+ if (unshift) {
+ pres.unshift(Object.assign({}, options, { fn: fn, isAsync: isAsync }));
+ } else {
+ pres.push(Object.assign({}, options, { fn: fn, isAsync: isAsync }));
+ }
+
+ return this;
+};
+
+/**
+ * Register a new hook for "post"
+ * @param {String} name The name of the hook
+ * @param {Object} [options]
+ * @param {Function} fn The function to register for "name"
+ * @param {Boolean} [unshift] Wheter to "push" or to "unshift" the new hook
+ * @returns {Kareem}
+ */
+Kareem.prototype.post = function(name, options, fn, unshift) {
+ const posts = this._posts.get(name) || [];
+
+ if (typeof options === 'function') {
+ unshift = !!fn;
+ fn = options;
+ options = {};
+ }
+
+ if (typeof fn !== 'function') {
+ throw new Error('post() requires a function, got "' + typeof fn + '"');
+ }
+
+ if (unshift) {
+ posts.unshift(Object.assign({}, options, { fn: fn }));
+ } else {
+ posts.push(Object.assign({}, options, { fn: fn }));
+ }
+ this._posts.set(name, posts);
+ return this;
+};
+
+/**
+ * Clone the current instance
+ * @returns {Kareem} The cloned instance
+ */
+Kareem.prototype.clone = function() {
+ const n = new Kareem();
+
+ for (const key of this._pres.keys()) {
+ const clone = this._pres.get(key).slice();
+ clone.numAsync = this._pres.get(key).numAsync;
+ n._pres.set(key, clone);
+ }
+ for (const key of this._posts.keys()) {
+ n._posts.set(key, this._posts.get(key).slice());
+ }
+
+ return n;
+};
+
+/**
+ * Merge "other" into self or "clone"
+ * @param {Kareem} other The instance to merge with
+ * @param {Kareem} [clone] The instance to merge onto (if not defined, using "this")
+ * @returns {Kareem} The merged instance
+ */
+Kareem.prototype.merge = function(other, clone) {
+ clone = arguments.length === 1 ? true : clone;
+ const ret = clone ? this.clone() : this;
+
+ for (const key of other._pres.keys()) {
+ const sourcePres = ret._pres.get(key) || [];
+ const deduplicated = other._pres.get(key).
+ // Deduplicate based on `fn`
+ filter(p => sourcePres.map(_p => _p.fn).indexOf(p.fn) === -1);
+ const combined = sourcePres.concat(deduplicated);
+ combined.numAsync = sourcePres.numAsync || 0;
+ combined.numAsync += deduplicated.filter(p => p.isAsync).length;
+ ret._pres.set(key, combined);
+ }
+ for (const key of other._posts.keys()) {
+ const sourcePosts = ret._posts.get(key) || [];
+ const deduplicated = other._posts.get(key).
+ filter(p => sourcePosts.indexOf(p) === -1);
+ ret._posts.set(key, sourcePosts.concat(deduplicated));
+ }
+
+ return ret;
+};
+
+function callMiddlewareFunction(fn, context, args, next) {
+ let maybePromiseLike;
+ try {
+ maybePromiseLike = fn.apply(context, args);
+ } catch (error) {
+ return next(error);
+ }
+
+ if (isPromiseLike(maybePromiseLike)) {
+ maybePromiseLike.then(() => next(), err => next(err));
+ }
+}
+
+function isPromiseLike(v) {
+ return (typeof v === 'object' && v !== null && typeof v.then === 'function');
+}
+
+function decorateNextFn(fn) {
+ let called = false;
+ const _this = this;
+ return function() {
+ // Ensure this function can only be called once
+ if (called) {
+ return;
+ }
+ called = true;
+ // Make sure to clear the stack so try/catch doesn't catch errors
+ // in subsequent middleware
+ return nextTick(() => fn.apply(_this, arguments));
+ };
+}
+
+const nextTick = typeof process === 'object' && process !== null && process.nextTick || function nextTick(cb) {
+ setTimeout(cb, 0);
+};
+
+function isErrorHandlingMiddleware(post, numArgs) {
+ if (post.errorHandler) {
+ return true;
+ }
+ return post.fn.length === numArgs + 2;
+}
+
+module.exports = Kareem;
diff --git a/week-3/04-course-app-hard/node_modules/kareem/package.json b/week-3/04-course-app-hard/node_modules/kareem/package.json
new file mode 100644
index 000000000..6c8af399d
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/kareem/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "kareem",
+ "version": "2.6.3",
+ "description": "Next-generation take on pre/post function hooks",
+ "main": "index.js",
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha ./test/*",
+ "test-coverage": "nyc --reporter lcov mocha ./test/*",
+ "docs": "node ./docs.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mongoosejs/kareem.git"
+ },
+ "devDependencies": {
+ "acquit": "1.x",
+ "acquit-ignore": "0.2.x",
+ "eslint": "8.20.0",
+ "mocha": "9.2.0",
+ "nyc": "15.1.0"
+ },
+ "author": "Valeri Karpov ",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/lodash.includes/LICENSE b/week-3/04-course-app-hard/node_modules/lodash.includes/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.includes/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.includes/README.md b/week-3/04-course-app-hard/node_modules/lodash.includes/README.md
new file mode 100644
index 000000000..26e93775f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.includes/README.md
@@ -0,0 +1,18 @@
+# lodash.includes v4.3.0
+
+The [lodash](https://lodash.com/) method `_.includes` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.includes
+```
+
+In Node.js:
+```js
+var includes = require('lodash.includes');
+```
+
+See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.includes) for more details.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.includes/index.js b/week-3/04-course-app-hard/node_modules/lodash.includes/index.js
new file mode 100644
index 000000000..e88d53380
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.includes/index.js
@@ -0,0 +1,745 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array ? array.length : 0,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
+
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+
+/**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+}
+
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
+ var result = (isArray(value) || isArguments(value))
+ ? baseTimes(value.length, String)
+ : [];
+
+ var length = result.length,
+ skipIndexes = !!length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
+/**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+}
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+function isArguments(value) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+}
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
+
+/**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+function values(object) {
+ return object ? baseValues(object, keys(object)) : [];
+}
+
+module.exports = includes;
diff --git a/week-3/04-course-app-hard/node_modules/lodash.includes/package.json b/week-3/04-course-app-hard/node_modules/lodash.includes/package.json
new file mode 100644
index 000000000..a02e645d6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.includes/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.includes",
+ "version": "4.3.0",
+ "description": "The lodash method `_.includes` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, includes",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isboolean/LICENSE b/week-3/04-course-app-hard/node_modules/lodash.isboolean/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isboolean/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isboolean/README.md b/week-3/04-course-app-hard/node_modules/lodash.isboolean/README.md
new file mode 100644
index 000000000..b3c476b02
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isboolean/README.md
@@ -0,0 +1,18 @@
+# lodash.isboolean v3.0.3
+
+The [lodash](https://lodash.com/) method `_.isBoolean` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isboolean
+```
+
+In Node.js:
+```js
+var isBoolean = require('lodash.isboolean');
+```
+
+See the [documentation](https://lodash.com/docs#isBoolean) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isboolean) for more details.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isboolean/index.js b/week-3/04-course-app-hard/node_modules/lodash.isboolean/index.js
new file mode 100644
index 000000000..23bbabdc3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isboolean/index.js
@@ -0,0 +1,70 @@
+/**
+ * lodash 3.0.3 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && objectToString.call(value) == boolTag);
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+module.exports = isBoolean;
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isboolean/package.json b/week-3/04-course-app-hard/node_modules/lodash.isboolean/package.json
new file mode 100644
index 000000000..01d6e8b91
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isboolean/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isboolean",
+ "version": "3.0.3",
+ "description": "The lodash method `_.isBoolean` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isboolean",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isinteger/LICENSE b/week-3/04-course-app-hard/node_modules/lodash.isinteger/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isinteger/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isinteger/README.md b/week-3/04-course-app-hard/node_modules/lodash.isinteger/README.md
new file mode 100644
index 000000000..3a78567b6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isinteger/README.md
@@ -0,0 +1,18 @@
+# lodash.isinteger v4.0.4
+
+The [lodash](https://lodash.com/) method `_.isInteger` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isinteger
+```
+
+In Node.js:
+```js
+var isInteger = require('lodash.isinteger');
+```
+
+See the [documentation](https://lodash.com/docs#isInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash.isinteger) for more details.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isinteger/index.js b/week-3/04-course-app-hard/node_modules/lodash.isinteger/index.js
new file mode 100644
index 000000000..3bf06f007
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isinteger/index.js
@@ -0,0 +1,265 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = isInteger;
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isinteger/package.json b/week-3/04-course-app-hard/node_modules/lodash.isinteger/package.json
new file mode 100644
index 000000000..92db256f1
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isinteger/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isinteger",
+ "version": "4.0.4",
+ "description": "The lodash method `_.isInteger` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isinteger",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isnumber/LICENSE b/week-3/04-course-app-hard/node_modules/lodash.isnumber/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isnumber/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isnumber/README.md b/week-3/04-course-app-hard/node_modules/lodash.isnumber/README.md
new file mode 100644
index 000000000..a1d434dd6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isnumber/README.md
@@ -0,0 +1,18 @@
+# lodash.isnumber v3.0.3
+
+The [lodash](https://lodash.com/) method `_.isNumber` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isnumber
+```
+
+In Node.js:
+```js
+var isNumber = require('lodash.isnumber');
+```
+
+See the [documentation](https://lodash.com/docs#isNumber) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isnumber) for more details.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isnumber/index.js b/week-3/04-course-app-hard/node_modules/lodash.isnumber/index.js
new file mode 100644
index 000000000..35a85732b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isnumber/index.js
@@ -0,0 +1,79 @@
+/**
+ * lodash 3.0.3 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var numberTag = '[object Number]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
+ * as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && objectToString.call(value) == numberTag);
+}
+
+module.exports = isNumber;
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isnumber/package.json b/week-3/04-course-app-hard/node_modules/lodash.isnumber/package.json
new file mode 100644
index 000000000..4c33c2a31
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isnumber/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isnumber",
+ "version": "3.0.3",
+ "description": "The lodash method `_.isNumber` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isnumber",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isplainobject/LICENSE b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isplainobject/README.md b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/README.md
new file mode 100644
index 000000000..aeefd74da
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/README.md
@@ -0,0 +1,18 @@
+# lodash.isplainobject v4.0.6
+
+The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isplainobject
+```
+
+In Node.js:
+```js
+var isPlainObject = require('lodash.isplainobject');
+```
+
+See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isplainobject/index.js b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/index.js
new file mode 100644
index 000000000..0f820ee7a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/index.js
@@ -0,0 +1,139 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** `Object#toString` result references. */
+var objectTag = '[object Object]';
+
+/**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+}
+
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+}
+
+module.exports = isPlainObject;
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isplainobject/package.json b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/package.json
new file mode 100644
index 000000000..86f6a07e7
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isplainobject/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isplainobject",
+ "version": "4.0.6",
+ "description": "The lodash method `_.isPlainObject` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isplainobject",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isstring/LICENSE b/week-3/04-course-app-hard/node_modules/lodash.isstring/LICENSE
new file mode 100644
index 000000000..b054ca5a3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isstring/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2016 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isstring/README.md b/week-3/04-course-app-hard/node_modules/lodash.isstring/README.md
new file mode 100644
index 000000000..f184029aa
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isstring/README.md
@@ -0,0 +1,18 @@
+# lodash.isstring v4.0.1
+
+The [lodash](https://lodash.com/) method `_.isString` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isstring
+```
+
+In Node.js:
+```js
+var isString = require('lodash.isstring');
+```
+
+See the [documentation](https://lodash.com/docs#isString) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.isstring) for more details.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isstring/index.js b/week-3/04-course-app-hard/node_modules/lodash.isstring/index.js
new file mode 100644
index 000000000..408225c52
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isstring/index.js
@@ -0,0 +1,95 @@
+/**
+ * lodash 4.0.1 (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @type Function
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+}
+
+module.exports = isString;
diff --git a/week-3/04-course-app-hard/node_modules/lodash.isstring/package.json b/week-3/04-course-app-hard/node_modules/lodash.isstring/package.json
new file mode 100644
index 000000000..1331535d6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.isstring/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.isstring",
+ "version": "4.0.1",
+ "description": "The lodash method `_.isString` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, isstring",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/04-course-app-hard/node_modules/lodash.once/LICENSE b/week-3/04-course-app-hard/node_modules/lodash.once/LICENSE
new file mode 100644
index 000000000..e0c69d560
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.once/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.once/README.md b/week-3/04-course-app-hard/node_modules/lodash.once/README.md
new file mode 100644
index 000000000..c4a2f1698
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.once/README.md
@@ -0,0 +1,18 @@
+# lodash.once v4.1.1
+
+The [lodash](https://lodash.com/) method `_.once` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.once
+```
+
+In Node.js:
+```js
+var once = require('lodash.once');
+```
+
+See the [documentation](https://lodash.com/docs#once) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.once) for more details.
diff --git a/week-3/04-course-app-hard/node_modules/lodash.once/index.js b/week-3/04-course-app-hard/node_modules/lodash.once/index.js
new file mode 100644
index 000000000..414ceb331
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.once/index.js
@@ -0,0 +1,294 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+}
+
+/**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+function once(func) {
+ return before(2, func);
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = once;
diff --git a/week-3/04-course-app-hard/node_modules/lodash.once/package.json b/week-3/04-course-app-hard/node_modules/lodash.once/package.json
new file mode 100644
index 000000000..fae782c22
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/lodash.once/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.once",
+ "version": "4.1.1",
+ "description": "The lodash method `_.once` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, once",
+ "author": "John-David Dalton (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton (http://allyoucanleet.com/)",
+ "Blaine Bublitz (https://github.com/phated)",
+ "Mathias Bynens (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/week-3/04-course-app-hard/node_modules/memory-pager/.travis.yml b/week-3/04-course-app-hard/node_modules/memory-pager/.travis.yml
new file mode 100644
index 000000000..1c4ab31e9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/memory-pager/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - '4'
+ - '6'
diff --git a/week-3/04-course-app-hard/node_modules/memory-pager/LICENSE b/week-3/04-course-app-hard/node_modules/memory-pager/LICENSE
new file mode 100644
index 000000000..56fce0895
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/memory-pager/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/week-3/04-course-app-hard/node_modules/memory-pager/README.md b/week-3/04-course-app-hard/node_modules/memory-pager/README.md
new file mode 100644
index 000000000..aed176140
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/memory-pager/README.md
@@ -0,0 +1,65 @@
+# memory-pager
+
+Access memory using small fixed sized buffers instead of allocating a huge buffer.
+Useful if you are implementing sparse data structures (such as large bitfield).
+
+![travis](https://travis-ci.org/mafintosh/memory-pager.svg?branch=master)
+
+```
+npm install memory-pager
+```
+
+## Usage
+
+``` js
+var pager = require('paged-memory')
+
+var pages = pager(1024) // use 1kb per page
+
+var page = pages.get(10) // get page #10
+
+console.log(page.offset) // 10240
+console.log(page.buffer) // a blank 1kb buffer
+```
+
+## API
+
+#### `var pages = pager(pageSize)`
+
+Create a new pager. `pageSize` defaults to `1024`.
+
+#### `var page = pages.get(pageNumber, [noAllocate])`
+
+Get a page. The page will be allocated at first access.
+
+Optionally you can set the `noAllocate` flag which will make the
+method return undefined if no page has been allocated already
+
+A page looks like this
+
+``` js
+{
+ offset: byteOffset,
+ buffer: bufferWithPageSize
+}
+```
+
+#### `pages.set(pageNumber, buffer)`
+
+Explicitly set the buffer for a page.
+
+#### `pages.updated(page)`
+
+Mark a page as updated.
+
+#### `pages.lastUpdate()`
+
+Get the last page that was updated.
+
+#### `var buf = pages.toBuffer()`
+
+Concat all pages allocated pages into a single buffer
+
+## License
+
+MIT
diff --git a/week-3/04-course-app-hard/node_modules/memory-pager/index.js b/week-3/04-course-app-hard/node_modules/memory-pager/index.js
new file mode 100644
index 000000000..687f346f3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/memory-pager/index.js
@@ -0,0 +1,160 @@
+module.exports = Pager
+
+function Pager (pageSize, opts) {
+ if (!(this instanceof Pager)) return new Pager(pageSize, opts)
+
+ this.length = 0
+ this.updates = []
+ this.path = new Uint16Array(4)
+ this.pages = new Array(32768)
+ this.maxPages = this.pages.length
+ this.level = 0
+ this.pageSize = pageSize || 1024
+ this.deduplicate = opts ? opts.deduplicate : null
+ this.zeros = this.deduplicate ? alloc(this.deduplicate.length) : null
+}
+
+Pager.prototype.updated = function (page) {
+ while (this.deduplicate && page.buffer[page.deduplicate] === this.deduplicate[page.deduplicate]) {
+ page.deduplicate++
+ if (page.deduplicate === this.deduplicate.length) {
+ page.deduplicate = 0
+ if (page.buffer.equals && page.buffer.equals(this.deduplicate)) page.buffer = this.deduplicate
+ break
+ }
+ }
+ if (page.updated || !this.updates) return
+ page.updated = true
+ this.updates.push(page)
+}
+
+Pager.prototype.lastUpdate = function () {
+ if (!this.updates || !this.updates.length) return null
+ var page = this.updates.pop()
+ page.updated = false
+ return page
+}
+
+Pager.prototype._array = function (i, noAllocate) {
+ if (i >= this.maxPages) {
+ if (noAllocate) return
+ grow(this, i)
+ }
+
+ factor(i, this.path)
+
+ var arr = this.pages
+
+ for (var j = this.level; j > 0; j--) {
+ var p = this.path[j]
+ var next = arr[p]
+
+ if (!next) {
+ if (noAllocate) return
+ next = arr[p] = new Array(32768)
+ }
+
+ arr = next
+ }
+
+ return arr
+}
+
+Pager.prototype.get = function (i, noAllocate) {
+ var arr = this._array(i, noAllocate)
+ var first = this.path[0]
+ var page = arr && arr[first]
+
+ if (!page && !noAllocate) {
+ page = arr[first] = new Page(i, alloc(this.pageSize))
+ if (i >= this.length) this.length = i + 1
+ }
+
+ if (page && page.buffer === this.deduplicate && this.deduplicate && !noAllocate) {
+ page.buffer = copy(page.buffer)
+ page.deduplicate = 0
+ }
+
+ return page
+}
+
+Pager.prototype.set = function (i, buf) {
+ var arr = this._array(i, false)
+ var first = this.path[0]
+
+ if (i >= this.length) this.length = i + 1
+
+ if (!buf || (this.zeros && buf.equals && buf.equals(this.zeros))) {
+ arr[first] = undefined
+ return
+ }
+
+ if (this.deduplicate && buf.equals && buf.equals(this.deduplicate)) {
+ buf = this.deduplicate
+ }
+
+ var page = arr[first]
+ var b = truncate(buf, this.pageSize)
+
+ if (page) page.buffer = b
+ else arr[first] = new Page(i, b)
+}
+
+Pager.prototype.toBuffer = function () {
+ var list = new Array(this.length)
+ var empty = alloc(this.pageSize)
+ var ptr = 0
+
+ while (ptr < list.length) {
+ var arr = this._array(ptr, true)
+ for (var i = 0; i < 32768 && ptr < list.length; i++) {
+ list[ptr++] = (arr && arr[i]) ? arr[i].buffer : empty
+ }
+ }
+
+ return Buffer.concat(list)
+}
+
+function grow (pager, index) {
+ while (pager.maxPages < index) {
+ var old = pager.pages
+ pager.pages = new Array(32768)
+ pager.pages[0] = old
+ pager.level++
+ pager.maxPages *= 32768
+ }
+}
+
+function truncate (buf, len) {
+ if (buf.length === len) return buf
+ if (buf.length > len) return buf.slice(0, len)
+ var cpy = alloc(len)
+ buf.copy(cpy)
+ return cpy
+}
+
+function alloc (size) {
+ if (Buffer.alloc) return Buffer.alloc(size)
+ var buf = new Buffer(size)
+ buf.fill(0)
+ return buf
+}
+
+function copy (buf) {
+ var cpy = Buffer.allocUnsafe ? Buffer.allocUnsafe(buf.length) : new Buffer(buf.length)
+ buf.copy(cpy)
+ return cpy
+}
+
+function Page (i, buf) {
+ this.offset = i * buf.length
+ this.buffer = buf
+ this.updated = false
+ this.deduplicate = 0
+}
+
+function factor (n, out) {
+ n = (n - (out[0] = (n & 32767))) / 32768
+ n = (n - (out[1] = (n & 32767))) / 32768
+ out[3] = ((n - (out[2] = (n & 32767))) / 32768) & 32767
+}
diff --git a/week-3/04-course-app-hard/node_modules/memory-pager/package.json b/week-3/04-course-app-hard/node_modules/memory-pager/package.json
new file mode 100644
index 000000000..f4847e8cd
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/memory-pager/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "memory-pager",
+ "version": "1.5.0",
+ "description": "Access memory using small fixed sized buffers",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "standard": "^9.0.0",
+ "tape": "^4.6.3"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mafintosh/memory-pager.git"
+ },
+ "author": "Mathias Buus (@mafintosh)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/mafintosh/memory-pager/issues"
+ },
+ "homepage": "https://github.com/mafintosh/memory-pager"
+}
diff --git a/week-3/04-course-app-hard/node_modules/memory-pager/test.js b/week-3/04-course-app-hard/node_modules/memory-pager/test.js
new file mode 100644
index 000000000..163821003
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/memory-pager/test.js
@@ -0,0 +1,80 @@
+var tape = require('tape')
+var pager = require('./')
+
+tape('get page', function (t) {
+ var pages = pager(1024)
+
+ var page = pages.get(0)
+
+ t.same(page.offset, 0)
+ t.same(page.buffer, Buffer.alloc(1024))
+ t.end()
+})
+
+tape('get page twice', function (t) {
+ var pages = pager(1024)
+ t.same(pages.length, 0)
+
+ var page = pages.get(0)
+
+ t.same(page.offset, 0)
+ t.same(page.buffer, Buffer.alloc(1024))
+ t.same(pages.length, 1)
+
+ var other = pages.get(0)
+
+ t.same(other, page)
+ t.end()
+})
+
+tape('get no mutable page', function (t) {
+ var pages = pager(1024)
+
+ t.ok(!pages.get(141, true))
+ t.ok(pages.get(141))
+ t.ok(pages.get(141, true))
+
+ t.end()
+})
+
+tape('get far out page', function (t) {
+ var pages = pager(1024)
+
+ var page = pages.get(1000000)
+
+ t.same(page.offset, 1000000 * 1024)
+ t.same(page.buffer, Buffer.alloc(1024))
+ t.same(pages.length, 1000000 + 1)
+
+ var other = pages.get(1)
+
+ t.same(other.offset, 1024)
+ t.same(other.buffer, Buffer.alloc(1024))
+ t.same(pages.length, 1000000 + 1)
+ t.ok(other !== page)
+
+ t.end()
+})
+
+tape('updates', function (t) {
+ var pages = pager(1024)
+
+ t.same(pages.lastUpdate(), null)
+
+ var page = pages.get(10)
+
+ page.buffer[42] = 1
+ pages.updated(page)
+
+ t.same(pages.lastUpdate(), page)
+ t.same(pages.lastUpdate(), null)
+
+ page.buffer[42] = 2
+ pages.updated(page)
+ pages.updated(page)
+
+ t.same(pages.lastUpdate(), page)
+ t.same(pages.lastUpdate(), null)
+
+ t.end()
+})
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/.esm-wrapper.mjs b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/.esm-wrapper.mjs
new file mode 100644
index 000000000..a0f5be52e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/.esm-wrapper.mjs
@@ -0,0 +1,6 @@
+import mod from "./lib/index.js";
+
+export default mod["default"];
+export const CommaAndColonSeparatedRecord = mod.CommaAndColonSeparatedRecord;
+export const ConnectionString = mod.ConnectionString;
+export const redactConnectionString = mod.redactConnectionString;
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/LICENSE b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/LICENSE
new file mode 100644
index 000000000..d57f55f4e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/LICENSE
@@ -0,0 +1,192 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2020 MongoDB Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/README.md b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/README.md
new file mode 100644
index 000000000..0eb65d00f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/README.md
@@ -0,0 +1,25 @@
+# mongodb-connection-string-url
+
+MongoDB connection strings, based on the WhatWG URL API
+
+```js
+import ConnectionString from 'mongodb-connection-string-url';
+
+const cs = new ConnectionString('mongodb://localhost');
+cs.searchParams.set('readPreference', 'secondary');
+console.log(cs.href); // 'mongodb://localhost/?readPreference=secondary'
+```
+
+## Deviations from the WhatWG URL package
+
+- URL parameters are case-insensitive
+- The `.host`, `.hostname` and `.port` properties cannot be set, and reading
+ them does not return meaningful results (and are typed as `never`in TypeScript)
+- The `.hosts` property contains a list of all hosts in the connection string
+- The `.href` property cannot be set, only read
+- There is an additional `.isSRV` property, set to `true` for `mongodb+srv://`
+- There is an additional `.clone()` utility method on the prototype
+
+## LICENSE
+
+Apache-2.0
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.d.ts b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.d.ts
new file mode 100644
index 000000000..49c18ea29
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.d.ts
@@ -0,0 +1,62 @@
+import { URL } from 'whatwg-url';
+import { redactConnectionString, ConnectionStringRedactionOptions } from './redact';
+export { redactConnectionString, ConnectionStringRedactionOptions };
+declare class CaseInsensitiveMap extends Map {
+ delete(name: K): boolean;
+ get(name: K): string | undefined;
+ has(name: K): boolean;
+ set(name: K, value: any): this;
+ _normalizeKey(name: any): K;
+}
+declare abstract class URLWithoutHost extends URL {
+ abstract get host(): never;
+ abstract set host(value: never);
+ abstract get hostname(): never;
+ abstract set hostname(value: never);
+ abstract get port(): never;
+ abstract set port(value: never);
+ abstract get href(): string;
+ abstract set href(value: string);
+}
+export interface ConnectionStringParsingOptions {
+ looseValidation?: boolean;
+}
+export declare class ConnectionString extends URLWithoutHost {
+ _hosts: string[];
+ constructor(uri: string, options?: ConnectionStringParsingOptions);
+ get host(): never;
+ set host(_ignored: never);
+ get hostname(): never;
+ set hostname(_ignored: never);
+ get port(): never;
+ set port(_ignored: never);
+ get href(): string;
+ set href(_ignored: string);
+ get isSRV(): boolean;
+ get hosts(): string[];
+ set hosts(list: string[]);
+ toString(): string;
+ clone(): ConnectionString;
+ redact(options?: ConnectionStringRedactionOptions): ConnectionString;
+ typedSearchParams(): {
+ append(name: keyof T & string, value: any): void;
+ delete(name: keyof T & string): void;
+ get(name: keyof T & string): string | null;
+ getAll(name: keyof T & string): string[];
+ has(name: keyof T & string): boolean;
+ set(name: keyof T & string, value: any): void;
+ keys(): IterableIterator;
+ values(): IterableIterator;
+ entries(): IterableIterator<[keyof T & string, string]>;
+ _normalizeKey(name: keyof T & string): string;
+ [Symbol.iterator](): IterableIterator<[keyof T & string, string]>;
+ sort(): void;
+ forEach(callback: (this: THIS_ARG, value: string, name: string, searchParams: any) => void, thisArg?: THIS_ARG | undefined): void;
+ readonly [Symbol.toStringTag]: "URLSearchParams";
+ };
+}
+export declare class CommaAndColonSeparatedRecord> extends CaseInsensitiveMap {
+ constructor(from?: string | null);
+ toString(): string;
+}
+export default ConnectionString;
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.js b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.js
new file mode 100644
index 000000000..8e4864d20
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.js
@@ -0,0 +1,213 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CommaAndColonSeparatedRecord = exports.ConnectionString = exports.redactConnectionString = void 0;
+const whatwg_url_1 = require("whatwg-url");
+const redact_1 = require("./redact");
+Object.defineProperty(exports, "redactConnectionString", { enumerable: true, get: function () { return redact_1.redactConnectionString; } });
+const DUMMY_HOSTNAME = '__this_is_a_placeholder__';
+function connectionStringHasValidScheme(connectionString) {
+ return (connectionString.startsWith('mongodb://') ||
+ connectionString.startsWith('mongodb+srv://'));
+}
+const HOSTS_REGEX = /^(?[^/]+):\/\/(?:(?[^:@]*)(?::(?[^@]*))?@)?(?(?!:)[^/?@]*)(?.*)/;
+class CaseInsensitiveMap extends Map {
+ delete(name) {
+ return super.delete(this._normalizeKey(name));
+ }
+ get(name) {
+ return super.get(this._normalizeKey(name));
+ }
+ has(name) {
+ return super.has(this._normalizeKey(name));
+ }
+ set(name, value) {
+ return super.set(this._normalizeKey(name), value);
+ }
+ _normalizeKey(name) {
+ name = `${name}`;
+ for (const key of this.keys()) {
+ if (key.toLowerCase() === name.toLowerCase()) {
+ name = key;
+ break;
+ }
+ }
+ return name;
+ }
+}
+function caseInsenstiveURLSearchParams(Ctor) {
+ return class CaseInsenstiveURLSearchParams extends Ctor {
+ append(name, value) {
+ return super.append(this._normalizeKey(name), value);
+ }
+ delete(name) {
+ return super.delete(this._normalizeKey(name));
+ }
+ get(name) {
+ return super.get(this._normalizeKey(name));
+ }
+ getAll(name) {
+ return super.getAll(this._normalizeKey(name));
+ }
+ has(name) {
+ return super.has(this._normalizeKey(name));
+ }
+ set(name, value) {
+ return super.set(this._normalizeKey(name), value);
+ }
+ keys() {
+ return super.keys();
+ }
+ values() {
+ return super.values();
+ }
+ entries() {
+ return super.entries();
+ }
+ [Symbol.iterator]() {
+ return super[Symbol.iterator]();
+ }
+ _normalizeKey(name) {
+ return CaseInsensitiveMap.prototype._normalizeKey.call(this, name);
+ }
+ };
+}
+class URLWithoutHost extends whatwg_url_1.URL {
+}
+class MongoParseError extends Error {
+ get name() {
+ return 'MongoParseError';
+ }
+}
+class ConnectionString extends URLWithoutHost {
+ constructor(uri, options = {}) {
+ var _a;
+ const { looseValidation } = options;
+ if (!looseValidation && !connectionStringHasValidScheme(uri)) {
+ throw new MongoParseError('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');
+ }
+ const match = uri.match(HOSTS_REGEX);
+ if (!match) {
+ throw new MongoParseError(`Invalid connection string "${uri}"`);
+ }
+ const { protocol, username, password, hosts, rest } = (_a = match.groups) !== null && _a !== void 0 ? _a : {};
+ if (!looseValidation) {
+ if (!protocol || !hosts) {
+ throw new MongoParseError(`Protocol and host list are required in "${uri}"`);
+ }
+ try {
+ decodeURIComponent(username !== null && username !== void 0 ? username : '');
+ decodeURIComponent(password !== null && password !== void 0 ? password : '');
+ }
+ catch (err) {
+ throw new MongoParseError(err.message);
+ }
+ const illegalCharacters = /[:/?#[\]@]/gi;
+ if (username === null || username === void 0 ? void 0 : username.match(illegalCharacters)) {
+ throw new MongoParseError(`Username contains unescaped characters ${username}`);
+ }
+ if (!username || !password) {
+ const uriWithoutProtocol = uri.replace(`${protocol}://`, '');
+ if (uriWithoutProtocol.startsWith('@') || uriWithoutProtocol.startsWith(':')) {
+ throw new MongoParseError('URI contained empty userinfo section');
+ }
+ }
+ if (password === null || password === void 0 ? void 0 : password.match(illegalCharacters)) {
+ throw new MongoParseError('Password contains unescaped characters');
+ }
+ }
+ let authString = '';
+ if (typeof username === 'string')
+ authString += username;
+ if (typeof password === 'string')
+ authString += `:${password}`;
+ if (authString)
+ authString += '@';
+ try {
+ super(`${protocol.toLowerCase()}://${authString}${DUMMY_HOSTNAME}${rest}`);
+ }
+ catch (err) {
+ if (looseValidation) {
+ new ConnectionString(uri, {
+ ...options,
+ looseValidation: false
+ });
+ }
+ if (typeof err.message === 'string') {
+ err.message = err.message.replace(DUMMY_HOSTNAME, hosts);
+ }
+ throw err;
+ }
+ this._hosts = hosts.split(',');
+ if (!looseValidation) {
+ if (this.isSRV && this.hosts.length !== 1) {
+ throw new MongoParseError('mongodb+srv URI cannot have multiple service names');
+ }
+ if (this.isSRV && this.hosts.some(host => host.includes(':'))) {
+ throw new MongoParseError('mongodb+srv URI cannot have port number');
+ }
+ }
+ if (!this.pathname) {
+ this.pathname = '/';
+ }
+ Object.setPrototypeOf(this.searchParams, caseInsenstiveURLSearchParams(this.searchParams.constructor).prototype);
+ }
+ get host() { return DUMMY_HOSTNAME; }
+ set host(_ignored) { throw new Error('No single host for connection string'); }
+ get hostname() { return DUMMY_HOSTNAME; }
+ set hostname(_ignored) { throw new Error('No single host for connection string'); }
+ get port() { return ''; }
+ set port(_ignored) { throw new Error('No single host for connection string'); }
+ get href() { return this.toString(); }
+ set href(_ignored) { throw new Error('Cannot set href for connection strings'); }
+ get isSRV() {
+ return this.protocol.includes('srv');
+ }
+ get hosts() {
+ return this._hosts;
+ }
+ set hosts(list) {
+ this._hosts = list;
+ }
+ toString() {
+ return super.toString().replace(DUMMY_HOSTNAME, this.hosts.join(','));
+ }
+ clone() {
+ return new ConnectionString(this.toString(), {
+ looseValidation: true
+ });
+ }
+ redact(options) {
+ return (0, redact_1.redactValidConnectionString)(this, options);
+ }
+ typedSearchParams() {
+ const sametype = false && new (caseInsenstiveURLSearchParams(whatwg_url_1.URLSearchParams))();
+ return this.searchParams;
+ }
+ [Symbol.for('nodejs.util.inspect.custom')]() {
+ const { href, origin, protocol, username, password, hosts, pathname, search, searchParams, hash } = this;
+ return { href, origin, protocol, username, password, hosts, pathname, search, searchParams, hash };
+ }
+}
+exports.ConnectionString = ConnectionString;
+class CommaAndColonSeparatedRecord extends CaseInsensitiveMap {
+ constructor(from) {
+ super();
+ for (const entry of (from !== null && from !== void 0 ? from : '').split(',')) {
+ if (!entry)
+ continue;
+ const colonIndex = entry.indexOf(':');
+ if (colonIndex === -1) {
+ this.set(entry, '');
+ }
+ else {
+ this.set(entry.slice(0, colonIndex), entry.slice(colonIndex + 1));
+ }
+ }
+ }
+ toString() {
+ return [...this].map(entry => entry.join(':')).join(',');
+ }
+}
+exports.CommaAndColonSeparatedRecord = CommaAndColonSeparatedRecord;
+exports.default = ConnectionString;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.js.map b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.js.map
new file mode 100644
index 000000000..d325062aa
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAkD;AAClD,qCAIkB;AACT,uGAHP,+BAAsB,OAGO;AAE/B,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAEnD,SAAS,8BAA8B,CAAC,gBAAwB;IAC9D,OAAO,CACL,gBAAgB,CAAC,UAAU,CAAC,YAAY,CAAC;QACzC,gBAAgB,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAC9C,CAAC;AACJ,CAAC;AAID,MAAM,WAAW,GACf,4GAA4G,CAAC;AAE/G,MAAM,kBAA8C,SAAQ,GAAc;IACxE,MAAM,CAAC,IAAO;QACZ,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,GAAG,CAAC,IAAO;QACT,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,GAAG,CAAC,IAAO;QACT,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC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AAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3D,CAAC;CACF;AAlBD,oEAkBC;AAED,kBAAe,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.d.ts b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.d.ts
new file mode 100644
index 000000000..94a64defc
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.d.ts
@@ -0,0 +1,7 @@
+import ConnectionString from './index';
+export interface ConnectionStringRedactionOptions {
+ redactUsernames?: boolean;
+ replacementString?: string;
+}
+export declare function redactValidConnectionString(inputUrl: Readonly, options?: ConnectionStringRedactionOptions): ConnectionString;
+export declare function redactConnectionString(uri: string, options?: ConnectionStringRedactionOptions): string;
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.js b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.js
new file mode 100644
index 000000000..62c7ba71c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.js
@@ -0,0 +1,86 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.redactConnectionString = exports.redactValidConnectionString = void 0;
+const index_1 = __importStar(require("./index"));
+function redactValidConnectionString(inputUrl, options) {
+ var _a, _b;
+ const url = inputUrl.clone();
+ const replacementString = (_a = options === null || options === void 0 ? void 0 : options.replacementString) !== null && _a !== void 0 ? _a : '_credentials_';
+ const redactUsernames = (_b = options === null || options === void 0 ? void 0 : options.redactUsernames) !== null && _b !== void 0 ? _b : true;
+ if ((url.username || url.password) && redactUsernames) {
+ url.username = replacementString;
+ url.password = '';
+ }
+ else if (url.password) {
+ url.password = replacementString;
+ }
+ if (url.searchParams.has('authMechanismProperties')) {
+ const props = new index_1.CommaAndColonSeparatedRecord(url.searchParams.get('authMechanismProperties'));
+ if (props.get('AWS_SESSION_TOKEN')) {
+ props.set('AWS_SESSION_TOKEN', replacementString);
+ url.searchParams.set('authMechanismProperties', props.toString());
+ }
+ }
+ if (url.searchParams.has('tlsCertificateKeyFilePassword')) {
+ url.searchParams.set('tlsCertificateKeyFilePassword', replacementString);
+ }
+ if (url.searchParams.has('proxyUsername') && redactUsernames) {
+ url.searchParams.set('proxyUsername', replacementString);
+ }
+ if (url.searchParams.has('proxyPassword')) {
+ url.searchParams.set('proxyPassword', replacementString);
+ }
+ return url;
+}
+exports.redactValidConnectionString = redactValidConnectionString;
+function redactConnectionString(uri, options) {
+ var _a, _b;
+ const replacementString = (_a = options === null || options === void 0 ? void 0 : options.replacementString) !== null && _a !== void 0 ? _a : '';
+ const redactUsernames = (_b = options === null || options === void 0 ? void 0 : options.redactUsernames) !== null && _b !== void 0 ? _b : true;
+ let parsed;
+ try {
+ parsed = new index_1.default(uri);
+ }
+ catch (_c) { }
+ if (parsed) {
+ options = { ...options, replacementString: '___credentials___' };
+ return parsed.redact(options).toString().replace(/___credentials___/g, replacementString);
+ }
+ const R = replacementString;
+ const replacements = [
+ uri => uri.replace(redactUsernames ? /(\/\/)(.*)(@)/g : /(\/\/[^@]*:)(.*)(@)/g, `$1${R}$3`),
+ uri => uri.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi, `$1${R}`),
+ uri => uri.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi, `$1${R}`),
+ uri => redactUsernames ? uri.replace(/(proxyUsername=)([^&]+)/gi, `$1${R}`) : uri,
+ uri => uri.replace(/(proxyPassword=)([^&]+)/gi, `$1${R}`)
+ ];
+ for (const replacer of replacements) {
+ uri = replacer(uri);
+ }
+ return uri;
+}
+exports.redactConnectionString = redactConnectionString;
+//# sourceMappingURL=redact.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.js.map b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.js.map
new file mode 100644
index 000000000..24a282b9c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/lib/redact.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"redact.js","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyE;AAOzE,SAAgB,2BAA2B,CACzC,QAAoC,EACpC,OAA0C;;IAC1C,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAC7B,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,mCAAI,eAAe,CAAC;IACxE,MAAM,eAAe,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,IAAI,CAAC;IAEzD,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,eAAe,EAAE;QACrD,GAAG,CAAC,QAAQ,GAAG,iBAAiB,CAAC;QACjC,GAAG,CAAC,QAAQ,GAAG,EAAE,CA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IAAI,CAAC;IAEzD,IAAI,MAAoC,CAAC;IACzC,IAAI;QACF,MAAM,GAAG,IAAI,eAAgB,CAAC,GAAG,CAAC,CAAC;KACpC;IAAC,WAAM,GAAE;IACV,IAAI,MAAM,EAAE;QAGV,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;QACjE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;KAC3F;IAID,MAAM,CAAC,GAAG,iBAAiB,CAAC;IAC5B,MAAM,YAAY,GAAgC;QAEhD,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,sBAAsB,EAAE,KAAK,CAAC,IAAI,CAAC;QAE3F,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,sCAAsC,EAAE,KAAK,CAAC,EAAE,CAAC;QAEpE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,2CAA2C,EAAE,KAAK,CAAC,EAAE,CAAC;QAEzE,GAAG,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG;QAEjF,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC;KAC1D,CAAC;IACF,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;QACnC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;KACrB;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AApCD,wDAoCC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/package.json b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/package.json
new file mode 100644
index 000000000..92ab0bf03
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb-connection-string-url/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "mongodb-connection-string-url",
+ "version": "3.0.1",
+ "description": "MongoDB connection strings, based on the WhatWG URL API",
+ "keywords": [
+ "password",
+ "prompt",
+ "tty"
+ ],
+ "homepage": "https://github.com/mongodb-js/mongodb-connection-string-url",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mongodb-js/mongodb-connection-string-url.git"
+ },
+ "bugs": {
+ "url": "https://github.com/mongodb-js/mongodb-connection-string-url/issues"
+ },
+ "main": "lib/index.js",
+ "exports": {
+ "require": "./lib/index.js",
+ "import": "./.esm-wrapper.mjs"
+ },
+ "files": [
+ "LICENSE",
+ "lib",
+ "package.json",
+ "README.md",
+ ".esm-wrapper.mjs"
+ ],
+ "scripts": {
+ "lint": "eslint \"{src,test}/**/*.ts\"",
+ "test": "npm run lint && npm run build && nyc mocha --colors -r ts-node/register test/*.ts",
+ "build": "npm run compile-ts && gen-esm-wrapper . ./.esm-wrapper.mjs",
+ "prepack": "npm run build",
+ "compile-ts": "tsc -p tsconfig.json"
+ },
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "@types/chai": "^4.2.5",
+ "@types/mocha": "^8.0.3",
+ "@types/node": "^14.11.1",
+ "@typescript-eslint/eslint-plugin": "^4.2.0",
+ "@typescript-eslint/parser": "^4.2.0",
+ "chai": "^4.2.0",
+ "eslint": "^7.9.0",
+ "eslint-config-semistandard": "^15.0.1",
+ "eslint-config-standard": "^14.1.1",
+ "eslint-plugin-import": "^2.22.0",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^4.2.1",
+ "eslint-plugin-standard": "^4.0.1",
+ "gen-esm-wrapper": "^1.1.3",
+ "mocha": "^8.1.3",
+ "nyc": "^15.1.0",
+ "ts-node": "^10.9.1",
+ "typescript": "^4.7.4"
+ },
+ "dependencies": {
+ "@types/whatwg-url": "^11.0.2",
+ "whatwg-url": "^13.0.0"
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/LICENSE.md b/week-3/04-course-app-hard/node_modules/mongodb/LICENSE.md
new file mode 100644
index 000000000..ad410e113
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/LICENSE.md
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/README.md b/week-3/04-course-app-hard/node_modules/mongodb/README.md
new file mode 100644
index 000000000..1a62b08d9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/README.md
@@ -0,0 +1,323 @@
+# MongoDB Node.js Driver
+
+The official [MongoDB](https://www.mongodb.com/) driver for Node.js.
+
+**Upgrading to version 6? Take a look at our [upgrade guide here](https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES_6.0.0.md)!**
+
+## Quick Links
+
+| Site | Link |
+| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
+| Documentation | [www.mongodb.com/docs/drivers/node](https://www.mongodb.com/docs/drivers/node) |
+| API Docs | [mongodb.github.io/node-mongodb-native](https://mongodb.github.io/node-mongodb-native) |
+| `npm` package | [www.npmjs.com/package/mongodb](https://www.npmjs.com/package/mongodb) |
+| MongoDB | [www.mongodb.com](https://www.mongodb.com) |
+| MongoDB University | [learn.mongodb.com](https://learn.mongodb.com/catalog?labels=%5B%22Language%22%5D&values=%5B%22Node.js%22%5D) |
+| MongoDB Developer Center | [www.mongodb.com/developer](https://www.mongodb.com/developer/languages/javascript/) |
+| Stack Overflow | [stackoverflow.com](https://stackoverflow.com/search?q=%28%5Btypescript%5D+or+%5Bjavascript%5D+or+%5Bnode.js%5D%29+and+%5Bmongodb%5D) |
+| Source Code | [github.com/mongodb/node-mongodb-native](https://github.com/mongodb/node-mongodb-native) |
+| Upgrade to v6 | [etc/notes/CHANGES_6.0.0.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES_6.0.0.md) |
+| Contributing | [CONTRIBUTING.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/CONTRIBUTING.md) |
+| Changelog | [HISTORY.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md) |
+
+### Bugs / Feature Requests
+
+Think you’ve found a bug? Want to see a new feature in `node-mongodb-native`? Please open a
+case in our issue management tool, JIRA:
+
+- Create an account and login [jira.mongodb.org](https://jira.mongodb.org).
+- Navigate to the NODE project [jira.mongodb.org/browse/NODE](https://jira.mongodb.org/browse/NODE).
+- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.
+
+Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the
+Core Server (i.e. SERVER) project are **public**.
+
+### Support / Feedback
+
+For issues with, questions about, or feedback for the Node.js driver, please look into our [support channels](https://www.mongodb.com/docs/manual/support). Please do not email any of the driver developers directly with issues or questions - you're more likely to get an answer on the [MongoDB Community Forums](https://community.mongodb.com/tags/c/drivers-odms-connectors/7/node-js-driver).
+
+### Change Log
+
+Change history can be found in [`HISTORY.md`](https://github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md).
+
+### Compatibility
+
+For server and runtime version compatibility matrices, please refer to the following links:
+
+- [MongoDB](https://www.mongodb.com/docs/drivers/node/current/compatibility/#mongodb-compatibility)
+- [NodeJS](https://www.mongodb.com/docs/drivers/node/current/compatibility/#language-compatibility)
+
+#### Component Support Matrix
+
+The following table describes add-on component version compatibility for the Node.js driver. Only packages with versions in these supported ranges are stable when used in combination.
+
+| Component | `mongodb@3.x` | `mongodb@4.x` | `mongodb@5.x` | `mongodb@6.x` |
+| ------------------------------------------------------------------------------------ | ------------------ | ------------------ | ------------------ | ------------- |
+| [bson](https://www.npmjs.com/package/bson) | ^1.0.0 | ^4.0.0 | ^5.0.0 | ^6.0.0 |
+| [bson-ext](https://www.npmjs.com/package/bson-ext) | ^1.0.0 \|\| ^2.0.0 | ^4.0.0 | N/A | N/A |
+| [kerberos](https://www.npmjs.com/package/kerberos) | ^1.0.0 | ^1.0.0 \|\| ^2.0.0 | ^1.0.0 \|\| ^2.0.0 | ^2.0.1 |
+| [mongodb-client-encryption](https://www.npmjs.com/package/mongodb-client-encryption) | ^1.0.0 | ^1.0.0 \|\| ^2.0.0 | ^2.3.0 | ^6.0.0 |
+| [mongodb-legacy](https://www.npmjs.com/package/mongodb-legacy) | N/A | ^4.0.0 | ^5.0.0 | ^6.0.0 |
+| [@mongodb-js/zstd](https://www.npmjs.com/package/@mongodb-js/zstd) | N/A | ^1.0.0 | ^1.0.0 | ^1.1.0 |
+
+#### Typescript Version
+
+We recommend using the latest version of typescript, however we currently ensure the driver's public types compile against `typescript@4.1.6`.
+This is the lowest typescript version guaranteed to work with our driver: older versions may or may not work - use at your own risk.
+Since typescript [does not restrict breaking changes to major versions](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes), we consider this support best effort.
+If you run into any unexpected compiler failures against our supported TypeScript versions, please let us know by filing an issue on our [JIRA](https://jira.mongodb.org/browse/NODE).
+
+## Installation
+
+The recommended way to get started using the Node.js 5.x driver is by using the `npm` (Node Package Manager) to install the dependency in your project.
+
+After you've created your own project using `npm init`, you can run:
+
+```bash
+npm install mongodb
+# or ...
+yarn add mongodb
+```
+
+This will download the MongoDB driver and add a dependency entry in your `package.json` file.
+
+If you are a Typescript user, you will need the Node.js type definitions to use the driver's definitions:
+
+```sh
+npm install -D @types/node
+```
+
+## Driver Extensions
+
+The MongoDB driver can optionally be enhanced by the following feature packages:
+
+Maintained by MongoDB:
+
+- Zstd network compression - [@mongodb-js/zstd](https://github.com/mongodb-js/zstd)
+- MongoDB field level and queryable encryption - [mongodb-client-encryption](https://github.com/mongodb/libmongocrypt#readme)
+- GSSAPI / SSPI / Kerberos authentication - [kerberos](https://github.com/mongodb-js/kerberos)
+
+Some of these packages include native C++ extensions.
+Consult the [trouble shooting guide here](https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/native-extensions.md) if you run into compilation issues.
+
+Third party:
+
+- Snappy network compression - [snappy](https://github.com/Brooooooklyn/snappy)
+- AWS authentication - [@aws-sdk/credential-providers](https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-providers)
+
+## Quick Start
+
+This guide will show you how to set up a simple application using Node.js and MongoDB. Its scope is only how to set up the driver and perform the simple CRUD operations. For more in-depth coverage, see the [official documentation](https://www.mongodb.com/docs/drivers/node/).
+
+### Create the `package.json` file
+
+First, create a directory where your application will live.
+
+```bash
+mkdir myProject
+cd myProject
+```
+
+Enter the following command and answer the questions to create the initial structure for your new project:
+
+```bash
+npm init -y
+```
+
+Next, install the driver as a dependency.
+
+```bash
+npm install mongodb
+```
+
+### Start a MongoDB Server
+
+For complete MongoDB installation instructions, see [the manual](https://www.mongodb.com/docs/manual/installation/).
+
+1. Download the right MongoDB version from [MongoDB](https://www.mongodb.org/downloads)
+2. Create a database directory (in this case under **/data**).
+3. Install and start a `mongod` process.
+
+```bash
+mongod --dbpath=/data
+```
+
+You should see the **mongod** process start up and print some status information.
+
+### Connect to MongoDB
+
+Create a new **app.js** file and add the following code to try out some basic CRUD
+operations using the MongoDB driver.
+
+Add code to connect to the server and the database **myProject**:
+
+> **NOTE:** Resolving DNS Connection issues
+>
+> Node.js 18 changed the default DNS resolution ordering from always prioritizing IPv4 to the ordering
+> returned by the DNS provider. In some environments, this can result in `localhost` resolving to
+> an IPv6 address instead of IPv4 and a consequent failure to connect to the server.
+>
+> This can be resolved by:
+>
+> - specifying the IP address family using the MongoClient `family` option (`MongoClient(, { family: 4 } )`)
+> - launching mongod or mongos with the ipv6 flag enabled ([--ipv6 mongod option documentation](https://www.mongodb.com/docs/manual/reference/program/mongod/#std-option-mongod.--ipv6))
+> - using a host of `127.0.0.1` in place of localhost
+> - specifying the DNS resolution ordering with the `--dns-resolution-order` Node.js command line argument (e.g. `node --dns-resolution-order=ipv4first`)
+
+```js
+const { MongoClient } = require('mongodb');
+// or as an es module:
+// import { MongoClient } from 'mongodb'
+
+// Connection URL
+const url = 'mongodb://localhost:27017';
+const client = new MongoClient(url);
+
+// Database Name
+const dbName = 'myProject';
+
+async function main() {
+ // Use connect method to connect to the server
+ await client.connect();
+ console.log('Connected successfully to server');
+ const db = client.db(dbName);
+ const collection = db.collection('documents');
+
+ // the following code examples can be pasted here...
+
+ return 'done.';
+}
+
+main()
+ .then(console.log)
+ .catch(console.error)
+ .finally(() => client.close());
+```
+
+Run your app from the command line with:
+
+```bash
+node app.js
+```
+
+The application should print **Connected successfully to server** to the console.
+
+### Insert a Document
+
+Add to **app.js** the following function which uses the **insertMany**
+method to add three documents to the **documents** collection.
+
+```js
+const insertResult = await collection.insertMany([{ a: 1 }, { a: 2 }, { a: 3 }]);
+console.log('Inserted documents =>', insertResult);
+```
+
+The **insertMany** command returns an object with information about the insert operations.
+
+### Find All Documents
+
+Add a query that returns all the documents.
+
+```js
+const findResult = await collection.find({}).toArray();
+console.log('Found documents =>', findResult);
+```
+
+This query returns all the documents in the **documents** collection.
+If you add this below the insertMany example, you'll see the documents you've inserted.
+
+### Find Documents with a Query Filter
+
+Add a query filter to find only documents which meet the query criteria.
+
+```js
+const filteredDocs = await collection.find({ a: 3 }).toArray();
+console.log('Found documents filtered by { a: 3 } =>', filteredDocs);
+```
+
+Only the documents which match `'a' : 3` should be returned.
+
+### Update a document
+
+The following operation updates a document in the **documents** collection.
+
+```js
+const updateResult = await collection.updateOne({ a: 3 }, { $set: { b: 1 } });
+console.log('Updated documents =>', updateResult);
+```
+
+The method updates the first document where the field **a** is equal to **3** by adding a new field **b** to the document set to **1**. `updateResult` contains information about whether there was a matching document to update or not.
+
+### Remove a document
+
+Remove the document where the field **a** is equal to **3**.
+
+```js
+const deleteResult = await collection.deleteMany({ a: 3 });
+console.log('Deleted documents =>', deleteResult);
+```
+
+### Index a Collection
+
+[Indexes](https://www.mongodb.com/docs/manual/indexes/) can improve your application's
+performance. The following function creates an index on the **a** field in the
+**documents** collection.
+
+```js
+const indexName = await collection.createIndex({ a: 1 });
+console.log('index name =', indexName);
+```
+
+For more detailed information, see the [indexing strategies page](https://www.mongodb.com/docs/manual/applications/indexes/).
+
+## Error Handling
+
+If you need to filter certain errors from our driver, we have a helpful tree of errors described in [etc/notes/errors.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/errors.md).
+
+It is our recommendation to use `instanceof` checks on errors and to avoid relying on parsing `error.message` and `error.name` strings in your code.
+We guarantee `instanceof` checks will pass according to semver guidelines, but errors may be sub-classed or their messages may change at any time, even patch releases, as we see fit to increase the helpfulness of the errors.
+
+Any new errors we add to the driver will directly extend an existing error class and no existing error will be moved to a different parent class outside of a major release.
+This means `instanceof` will always be able to accurately capture the errors that our driver throws.
+
+```typescript
+const client = new MongoClient(url);
+await client.connect();
+const collection = client.db().collection('collection');
+
+try {
+ await collection.insertOne({ _id: 1 });
+ await collection.insertOne({ _id: 1 }); // duplicate key error
+} catch (error) {
+ if (error instanceof MongoServerError) {
+ console.log(`Error worth logging: ${error}`); // special case for some reason
+ }
+ throw error; // still want to crash
+}
+```
+
+## Nightly releases
+
+If you need to test with a change from the latest `main` branch, our `mongodb` npm package has nightly versions released under the `nightly` tag.
+
+```sh
+npm install mongodb@nightly
+```
+
+Nightly versions are published regardless of testing outcome.
+This means there could be semantic breakages or partially implemented features.
+The nightly build is not suitable for production use.
+
+## Next Steps
+
+- [MongoDB Documentation](https://www.mongodb.com/docs/manual/)
+- [MongoDB Node Driver Documentation](https://www.mongodb.com/docs/drivers/node/)
+- [Read about Schemas](https://www.mongodb.com/docs/manual/core/data-modeling-introduction/)
+- [Star us on GitHub](https://github.com/mongodb/node-mongodb-native)
+
+## License
+
+[Apache 2.0](LICENSE.md)
+
+© 2012-present MongoDB [Contributors](https://github.com/mongodb/node-mongodb-native/blob/HEAD/CONTRIBUTORS.md) \
+© 2009-2012 Christian Amor Kvalheim
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/etc/prepare.js b/week-3/04-course-app-hard/node_modules/mongodb/etc/prepare.js
new file mode 100644
index 000000000..2039d0b33
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/etc/prepare.js
@@ -0,0 +1,12 @@
+#! /usr/bin/env node
+var cp = require('child_process');
+var fs = require('fs');
+var os = require('os');
+
+if (fs.existsSync('src')) {
+ cp.spawn('npm', ['run', 'build:dts'], { stdio: 'inherit', shell: os.platform() === 'win32' });
+} else {
+ if (!fs.existsSync('lib')) {
+ console.warn('MongoDB: No compiled javascript present, the driver is not installed correctly.');
+ }
+}
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/admin.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/admin.js
new file mode 100644
index 000000000..cb5981009
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/admin.js
@@ -0,0 +1,134 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Admin = void 0;
+const bson_1 = require("./bson");
+const execute_operation_1 = require("./operations/execute_operation");
+const list_databases_1 = require("./operations/list_databases");
+const remove_user_1 = require("./operations/remove_user");
+const run_command_1 = require("./operations/run_command");
+const validate_collection_1 = require("./operations/validate_collection");
+/**
+ * The **Admin** class is an internal class that allows convenient access to
+ * the admin functionality and commands for MongoDB.
+ *
+ * **ADMIN Cannot directly be instantiated**
+ * @public
+ *
+ * @example
+ * ```ts
+ * import { MongoClient } from 'mongodb';
+ *
+ * const client = new MongoClient('mongodb://localhost:27017');
+ * const admin = client.db().admin();
+ * const dbInfo = await admin.listDatabases();
+ * for (const db of dbInfo.databases) {
+ * console.log(db.name);
+ * }
+ * ```
+ */
+class Admin {
+ /**
+ * Create a new Admin instance
+ * @internal
+ */
+ constructor(db) {
+ this.s = { db };
+ }
+ /**
+ * Execute a command
+ *
+ * The driver will ensure the following fields are attached to the command sent to the server:
+ * - `lsid` - sourced from an implicit session or options.session
+ * - `$readPreference` - defaults to primary or can be configured by options.readPreference
+ * - `$db` - sourced from the name of this database
+ *
+ * If the client has a serverApi setting:
+ * - `apiVersion`
+ * - `apiStrict`
+ * - `apiDeprecationErrors`
+ *
+ * When in a transaction:
+ * - `readConcern` - sourced from readConcern set on the TransactionOptions
+ * - `writeConcern` - sourced from writeConcern set on the TransactionOptions
+ *
+ * Attaching any of the above fields to the command will have no effect as the driver will overwrite the value.
+ *
+ * @param command - The command to execute
+ * @param options - Optional settings for the command
+ */
+ async command(command, options) {
+ return await (0, execute_operation_1.executeOperation)(this.s.db.client, new run_command_1.RunAdminCommandOperation(command, {
+ ...(0, bson_1.resolveBSONOptions)(options),
+ session: options?.session,
+ readPreference: options?.readPreference
+ }));
+ }
+ /**
+ * Retrieve the server build information
+ *
+ * @param options - Optional settings for the command
+ */
+ async buildInfo(options) {
+ return await this.command({ buildinfo: 1 }, options);
+ }
+ /**
+ * Retrieve the server build information
+ *
+ * @param options - Optional settings for the command
+ */
+ async serverInfo(options) {
+ return await this.command({ buildinfo: 1 }, options);
+ }
+ /**
+ * Retrieve this db's server status.
+ *
+ * @param options - Optional settings for the command
+ */
+ async serverStatus(options) {
+ return await this.command({ serverStatus: 1 }, options);
+ }
+ /**
+ * Ping the MongoDB server and retrieve results
+ *
+ * @param options - Optional settings for the command
+ */
+ async ping(options) {
+ return await this.command({ ping: 1 }, options);
+ }
+ /**
+ * Remove a user from a database
+ *
+ * @param username - The username to remove
+ * @param options - Optional settings for the command
+ */
+ async removeUser(username, options) {
+ return await (0, execute_operation_1.executeOperation)(this.s.db.client, new remove_user_1.RemoveUserOperation(this.s.db, username, { dbName: 'admin', ...options }));
+ }
+ /**
+ * Validate an existing collection
+ *
+ * @param collectionName - The name of the collection to validate.
+ * @param options - Optional settings for the command
+ */
+ async validateCollection(collectionName, options = {}) {
+ return await (0, execute_operation_1.executeOperation)(this.s.db.client, new validate_collection_1.ValidateCollectionOperation(this, collectionName, options));
+ }
+ /**
+ * List the available databases
+ *
+ * @param options - Optional settings for the command
+ */
+ async listDatabases(options) {
+ return await (0, execute_operation_1.executeOperation)(this.s.db.client, new list_databases_1.ListDatabasesOperation(this.s.db, options));
+ }
+ /**
+ * Get ReplicaSet status
+ *
+ * @param options - Optional settings for the command
+ */
+ async replSetGetStatus(options) {
+ return await this.command({ replSetGetStatus: 1 }, options);
+ }
+}
+exports.Admin = Admin;
+//# sourceMappingURL=admin.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/admin.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/admin.js.map
new file mode 100644
index 000000000..965caf9ab
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/admin.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"admin.js","sourceRoot":"","sources":["../src/admin.ts"],"names":[],"mappings":";;;AAAA,iCAA2D;AAG3D,sEAAkE;AAClE,gEAIqC;AACrC,0DAAuF;AACvF,0DAA4F;AAC5F,0EAG0C;AAO1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,KAAK;IAIhB;;;OAGG;IACH,YAAY,EAAM;QAChB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,CAAC,OAAO,CAAC,OAAiB,EAAE,OAA2B;QAC1D,OAAO,MAAM,IAAA,oCAAgB,EAC3B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,EAChB,IAAI,sCAAwB,CAAC,OAAO,EAAE;YACpC,GAAG,IAAA,yBAAkB,EAAC,OAAO,CAAC;YAC9B,OAAO,EAAE,OAAO,EAAE,OAAO;YACzB,cAAc,EAAE,OAAO,EAAE,cAAc;SACxC,CAAC,CACH,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAC,OAAiC;QAC/C,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CAAC,OAAiC;QAChD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,YAAY,CAAC,OAAiC;QAClD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI,CAAC,OAAiC;QAC1C,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CAAC,QAAgB,EAAE,OAA2B;QAC5D,OAAO,MAAM,IAAA,oCAAgB,EAC3B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,EAChB,IAAI,iCAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAC9E,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,cAAsB,EACtB,UAAqC,EAAE;QAEvC,OAAO,MAAM,IAAA,oCAAgB,EAC3B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,EAChB,IAAI,iDAA2B,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,CAC/D,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,OAA8B;QAChD,OAAO,MAAM,IAAA,oCAAgB,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,uCAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAClG,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,gBAAgB,CAAC,OAAiC;QACtD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF;AA/HD,sBA+HC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bson.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/bson.js
new file mode 100644
index 000000000..6d5e781f7
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bson.js
@@ -0,0 +1,74 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.resolveBSONOptions = exports.pluckBSONSerializeOptions = exports.toUTF8 = exports.getBigInt64LE = exports.getFloat64LE = exports.getInt32LE = exports.parseToElementsToArray = exports.UUID = exports.Timestamp = exports.serialize = exports.ObjectId = exports.MinKey = exports.MaxKey = exports.Long = exports.Int32 = exports.EJSON = exports.Double = exports.deserialize = exports.Decimal128 = exports.DBRef = exports.Code = exports.calculateObjectSize = exports.BSONType = exports.BSONSymbol = exports.BSONRegExp = exports.BSONError = exports.BSON = exports.Binary = void 0;
+const bson_1 = require("bson");
+var bson_2 = require("bson");
+Object.defineProperty(exports, "Binary", { enumerable: true, get: function () { return bson_2.Binary; } });
+Object.defineProperty(exports, "BSON", { enumerable: true, get: function () { return bson_2.BSON; } });
+Object.defineProperty(exports, "BSONError", { enumerable: true, get: function () { return bson_2.BSONError; } });
+Object.defineProperty(exports, "BSONRegExp", { enumerable: true, get: function () { return bson_2.BSONRegExp; } });
+Object.defineProperty(exports, "BSONSymbol", { enumerable: true, get: function () { return bson_2.BSONSymbol; } });
+Object.defineProperty(exports, "BSONType", { enumerable: true, get: function () { return bson_2.BSONType; } });
+Object.defineProperty(exports, "calculateObjectSize", { enumerable: true, get: function () { return bson_2.calculateObjectSize; } });
+Object.defineProperty(exports, "Code", { enumerable: true, get: function () { return bson_2.Code; } });
+Object.defineProperty(exports, "DBRef", { enumerable: true, get: function () { return bson_2.DBRef; } });
+Object.defineProperty(exports, "Decimal128", { enumerable: true, get: function () { return bson_2.Decimal128; } });
+Object.defineProperty(exports, "deserialize", { enumerable: true, get: function () { return bson_2.deserialize; } });
+Object.defineProperty(exports, "Double", { enumerable: true, get: function () { return bson_2.Double; } });
+Object.defineProperty(exports, "EJSON", { enumerable: true, get: function () { return bson_2.EJSON; } });
+Object.defineProperty(exports, "Int32", { enumerable: true, get: function () { return bson_2.Int32; } });
+Object.defineProperty(exports, "Long", { enumerable: true, get: function () { return bson_2.Long; } });
+Object.defineProperty(exports, "MaxKey", { enumerable: true, get: function () { return bson_2.MaxKey; } });
+Object.defineProperty(exports, "MinKey", { enumerable: true, get: function () { return bson_2.MinKey; } });
+Object.defineProperty(exports, "ObjectId", { enumerable: true, get: function () { return bson_2.ObjectId; } });
+Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return bson_2.serialize; } });
+Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return bson_2.Timestamp; } });
+Object.defineProperty(exports, "UUID", { enumerable: true, get: function () { return bson_2.UUID; } });
+function parseToElementsToArray(bytes, offset) {
+ const res = bson_1.BSON.onDemand.parseToElements(bytes, offset);
+ return Array.isArray(res) ? res : [...res];
+}
+exports.parseToElementsToArray = parseToElementsToArray;
+exports.getInt32LE = bson_1.BSON.onDemand.NumberUtils.getInt32LE;
+exports.getFloat64LE = bson_1.BSON.onDemand.NumberUtils.getFloat64LE;
+exports.getBigInt64LE = bson_1.BSON.onDemand.NumberUtils.getBigInt64LE;
+exports.toUTF8 = bson_1.BSON.onDemand.ByteUtils.toUTF8;
+function pluckBSONSerializeOptions(options) {
+ const { fieldsAsRaw, useBigInt64, promoteValues, promoteBuffers, promoteLongs, serializeFunctions, ignoreUndefined, bsonRegExp, raw, enableUtf8Validation } = options;
+ return {
+ fieldsAsRaw,
+ useBigInt64,
+ promoteValues,
+ promoteBuffers,
+ promoteLongs,
+ serializeFunctions,
+ ignoreUndefined,
+ bsonRegExp,
+ raw,
+ enableUtf8Validation
+ };
+}
+exports.pluckBSONSerializeOptions = pluckBSONSerializeOptions;
+/**
+ * Merge the given BSONSerializeOptions, preferring options over the parent's options, and
+ * substituting defaults for values not set.
+ *
+ * @internal
+ */
+function resolveBSONOptions(options, parent) {
+ const parentOptions = parent?.bsonOptions;
+ return {
+ raw: options?.raw ?? parentOptions?.raw ?? false,
+ useBigInt64: options?.useBigInt64 ?? parentOptions?.useBigInt64 ?? false,
+ promoteLongs: options?.promoteLongs ?? parentOptions?.promoteLongs ?? true,
+ promoteValues: options?.promoteValues ?? parentOptions?.promoteValues ?? true,
+ promoteBuffers: options?.promoteBuffers ?? parentOptions?.promoteBuffers ?? false,
+ ignoreUndefined: options?.ignoreUndefined ?? parentOptions?.ignoreUndefined ?? false,
+ bsonRegExp: options?.bsonRegExp ?? parentOptions?.bsonRegExp ?? false,
+ serializeFunctions: options?.serializeFunctions ?? parentOptions?.serializeFunctions ?? false,
+ fieldsAsRaw: options?.fieldsAsRaw ?? parentOptions?.fieldsAsRaw ?? {},
+ enableUtf8Validation: options?.enableUtf8Validation ?? parentOptions?.enableUtf8Validation ?? true
+ };
+}
+exports.resolveBSONOptions = resolveBSONOptions;
+//# sourceMappingURL=bson.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bson.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/bson.js.map
new file mode 100644
index 000000000..c83d03423
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bson.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"bson.js","sourceRoot":"","sources":["../src/bson.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAE5B,6BAwBc;AAvBZ,8FAAA,MAAM,OAAA;AACN,4FAAA,IAAI,OAAA;AACJ,iGAAA,SAAS,OAAA;AACT,kGAAA,UAAU,OAAA;AACV,kGAAA,UAAU,OAAA;AACV,gGAAA,QAAQ,OAAA;AACR,2GAAA,mBAAmB,OAAA;AACnB,4FAAA,IAAI,OAAA;AACJ,6FAAA,KAAK,OAAA;AACL,kGAAA,UAAU,OAAA;AACV,mGAAA,WAAW,OAAA;AAEX,8FAAA,MAAM,OAAA;AACN,6FAAA,KAAK,OAAA;AAEL,6FAAA,KAAK,OAAA;AACL,4FAAA,IAAI,OAAA;AACJ,8FAAA,MAAM,OAAA;AACN,8FAAA,MAAM,OAAA;AACN,gGAAA,QAAQ,OAAA;AACR,i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AW,IAAI,aAAa,EAAE,WAAW,IAAI,KAAK;QACxE,YAAY,EAAE,OAAO,EAAE,YAAY,IAAI,aAAa,EAAE,YAAY,IAAI,IAAI;QAC1E,aAAa,EAAE,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,aAAa,IAAI,IAAI;QAC7E,cAAc,EAAE,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,cAAc,IAAI,KAAK;QACjF,eAAe,EAAE,OAAO,EAAE,eAAe,IAAI,aAAa,EAAE,eAAe,IAAI,KAAK;QACpF,UAAU,EAAE,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,UAAU,IAAI,KAAK;QACrE,kBAAkB,EAAE,OAAO,EAAE,kBAAkB,IAAI,aAAa,EAAE,kBAAkB,IAAI,KAAK;QAC7F,WAAW,EAAE,OAAO,EAAE,WAAW,IAAI,aAAa,EAAE,WAAW,IAAI,EAAE;QACrE,oBAAoB,EAClB,OAAO,EAAE,oBAAoB,IAAI,aAAa,EAAE,oBAAoB,IAAI,IAAI;KAC/E,CAAC;AACJ,CAAC;AAlBD,gDAkBC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/common.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/common.js
new file mode 100644
index 000000000..082a6ab13
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/common.js
@@ -0,0 +1,868 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BulkOperationBase = exports.BulkWriteShimOperation = exports.FindOperators = exports.MongoBulkWriteError = exports.mergeBatchResults = exports.WriteError = exports.WriteConcernError = exports.BulkWriteResult = exports.Batch = exports.BatchType = void 0;
+const util_1 = require("util");
+const bson_1 = require("../bson");
+const error_1 = require("../error");
+const delete_1 = require("../operations/delete");
+const execute_operation_1 = require("../operations/execute_operation");
+const insert_1 = require("../operations/insert");
+const operation_1 = require("../operations/operation");
+const update_1 = require("../operations/update");
+const utils_1 = require("../utils");
+const utils_2 = require("../utils");
+const write_concern_1 = require("../write_concern");
+/** @internal */
+const kServerError = Symbol('serverError');
+/** @public */
+exports.BatchType = Object.freeze({
+ INSERT: 1,
+ UPDATE: 2,
+ DELETE: 3
+});
+/**
+ * Keeps the state of a unordered batch so we can rewrite the results
+ * correctly after command execution
+ *
+ * @public
+ */
+class Batch {
+ constructor(batchType, originalZeroIndex) {
+ this.originalZeroIndex = originalZeroIndex;
+ this.currentIndex = 0;
+ this.originalIndexes = [];
+ this.batchType = batchType;
+ this.operations = [];
+ this.size = 0;
+ this.sizeBytes = 0;
+ }
+}
+exports.Batch = Batch;
+/**
+ * @public
+ * The result of a bulk write.
+ */
+class BulkWriteResult {
+ static generateIdMap(ids) {
+ const idMap = {};
+ for (const doc of ids) {
+ idMap[doc.index] = doc._id;
+ }
+ return idMap;
+ }
+ /**
+ * Create a new BulkWriteResult instance
+ * @internal
+ */
+ constructor(bulkResult, isOrdered) {
+ this.result = bulkResult;
+ this.insertedCount = this.result.nInserted ?? 0;
+ this.matchedCount = this.result.nMatched ?? 0;
+ this.modifiedCount = this.result.nModified ?? 0;
+ this.deletedCount = this.result.nRemoved ?? 0;
+ this.upsertedCount = this.result.upserted.length ?? 0;
+ this.upsertedIds = BulkWriteResult.generateIdMap(this.result.upserted);
+ this.insertedIds = BulkWriteResult.generateIdMap(this.getSuccessfullyInsertedIds(bulkResult, isOrdered));
+ Object.defineProperty(this, 'result', { value: this.result, enumerable: false });
+ }
+ /** Evaluates to true if the bulk operation correctly executes */
+ get ok() {
+ return this.result.ok;
+ }
+ /**
+ * Returns document_ids that were actually inserted
+ * @internal
+ */
+ getSuccessfullyInsertedIds(bulkResult, isOrdered) {
+ if (bulkResult.writeErrors.length === 0)
+ return bulkResult.insertedIds;
+ if (isOrdered) {
+ return bulkResult.insertedIds.slice(0, bulkResult.writeErrors[0].index);
+ }
+ return bulkResult.insertedIds.filter(({ index }) => !bulkResult.writeErrors.some(writeError => index === writeError.index));
+ }
+ /** Returns the upserted id at the given index */
+ getUpsertedIdAt(index) {
+ return this.result.upserted[index];
+ }
+ /** Returns raw internal result */
+ getRawResponse() {
+ return this.result;
+ }
+ /** Returns true if the bulk operation contains a write error */
+ hasWriteErrors() {
+ return this.result.writeErrors.length > 0;
+ }
+ /** Returns the number of write errors off the bulk operation */
+ getWriteErrorCount() {
+ return this.result.writeErrors.length;
+ }
+ /** Returns a specific write error object */
+ getWriteErrorAt(index) {
+ return index < this.result.writeErrors.length ? this.result.writeErrors[index] : undefined;
+ }
+ /** Retrieve all write errors */
+ getWriteErrors() {
+ return this.result.writeErrors;
+ }
+ /** Retrieve the write concern error if one exists */
+ getWriteConcernError() {
+ if (this.result.writeConcernErrors.length === 0) {
+ return;
+ }
+ else if (this.result.writeConcernErrors.length === 1) {
+ // Return the error
+ return this.result.writeConcernErrors[0];
+ }
+ else {
+ // Combine the errors
+ let errmsg = '';
+ for (let i = 0; i < this.result.writeConcernErrors.length; i++) {
+ const err = this.result.writeConcernErrors[i];
+ errmsg = errmsg + err.errmsg;
+ // TODO: Something better
+ if (i === 0)
+ errmsg = errmsg + ' and ';
+ }
+ return new WriteConcernError({ errmsg, code: error_1.MONGODB_ERROR_CODES.WriteConcernFailed });
+ }
+ }
+ toString() {
+ return `BulkWriteResult(${this.result})`;
+ }
+ isOk() {
+ return this.result.ok === 1;
+ }
+}
+exports.BulkWriteResult = BulkWriteResult;
+/**
+ * An error representing a failure by the server to apply the requested write concern to the bulk operation.
+ * @public
+ * @category Error
+ */
+class WriteConcernError {
+ constructor(error) {
+ this[kServerError] = error;
+ }
+ /** Write concern error code. */
+ get code() {
+ return this[kServerError].code;
+ }
+ /** Write concern error message. */
+ get errmsg() {
+ return this[kServerError].errmsg;
+ }
+ /** Write concern error info. */
+ get errInfo() {
+ return this[kServerError].errInfo;
+ }
+ toJSON() {
+ return this[kServerError];
+ }
+ toString() {
+ return `WriteConcernError(${this.errmsg})`;
+ }
+}
+exports.WriteConcernError = WriteConcernError;
+/**
+ * An error that occurred during a BulkWrite on the server.
+ * @public
+ * @category Error
+ */
+class WriteError {
+ constructor(err) {
+ this.err = err;
+ }
+ /** WriteError code. */
+ get code() {
+ return this.err.code;
+ }
+ /** WriteError original bulk operation index. */
+ get index() {
+ return this.err.index;
+ }
+ /** WriteError message. */
+ get errmsg() {
+ return this.err.errmsg;
+ }
+ /** WriteError details. */
+ get errInfo() {
+ return this.err.errInfo;
+ }
+ /** Returns the underlying operation that caused the error */
+ getOperation() {
+ return this.err.op;
+ }
+ toJSON() {
+ return { code: this.err.code, index: this.err.index, errmsg: this.err.errmsg, op: this.err.op };
+ }
+ toString() {
+ return `WriteError(${JSON.stringify(this.toJSON())})`;
+ }
+}
+exports.WriteError = WriteError;
+/** Merges results into shared data structure */
+function mergeBatchResults(batch, bulkResult, err, result) {
+ // If we have an error set the result to be the err object
+ if (err) {
+ result = err;
+ }
+ else if (result && result.result) {
+ result = result.result;
+ }
+ if (result == null) {
+ return;
+ }
+ // Do we have a top level error stop processing and return
+ if (result.ok === 0 && bulkResult.ok === 1) {
+ bulkResult.ok = 0;
+ const writeError = {
+ index: 0,
+ code: result.code || 0,
+ errmsg: result.message,
+ errInfo: result.errInfo,
+ op: batch.operations[0]
+ };
+ bulkResult.writeErrors.push(new WriteError(writeError));
+ return;
+ }
+ else if (result.ok === 0 && bulkResult.ok === 0) {
+ return;
+ }
+ // If we have an insert Batch type
+ if (isInsertBatch(batch) && result.n) {
+ bulkResult.nInserted = bulkResult.nInserted + result.n;
+ }
+ // If we have an insert Batch type
+ if (isDeleteBatch(batch) && result.n) {
+ bulkResult.nRemoved = bulkResult.nRemoved + result.n;
+ }
+ let nUpserted = 0;
+ // We have an array of upserted values, we need to rewrite the indexes
+ if (Array.isArray(result.upserted)) {
+ nUpserted = result.upserted.length;
+ for (let i = 0; i < result.upserted.length; i++) {
+ bulkResult.upserted.push({
+ index: result.upserted[i].index + batch.originalZeroIndex,
+ _id: result.upserted[i]._id
+ });
+ }
+ }
+ else if (result.upserted) {
+ nUpserted = 1;
+ bulkResult.upserted.push({
+ index: batch.originalZeroIndex,
+ _id: result.upserted
+ });
+ }
+ // If we have an update Batch type
+ if (isUpdateBatch(batch) && result.n) {
+ const nModified = result.nModified;
+ bulkResult.nUpserted = bulkResult.nUpserted + nUpserted;
+ bulkResult.nMatched = bulkResult.nMatched + (result.n - nUpserted);
+ if (typeof nModified === 'number') {
+ bulkResult.nModified = bulkResult.nModified + nModified;
+ }
+ else {
+ bulkResult.nModified = 0;
+ }
+ }
+ if (Array.isArray(result.writeErrors)) {
+ for (let i = 0; i < result.writeErrors.length; i++) {
+ const writeError = {
+ index: batch.originalIndexes[result.writeErrors[i].index],
+ code: result.writeErrors[i].code,
+ errmsg: result.writeErrors[i].errmsg,
+ errInfo: result.writeErrors[i].errInfo,
+ op: batch.operations[result.writeErrors[i].index]
+ };
+ bulkResult.writeErrors.push(new WriteError(writeError));
+ }
+ }
+ if (result.writeConcernError) {
+ bulkResult.writeConcernErrors.push(new WriteConcernError(result.writeConcernError));
+ }
+}
+exports.mergeBatchResults = mergeBatchResults;
+function executeCommands(bulkOperation, options, callback) {
+ if (bulkOperation.s.batches.length === 0) {
+ return callback(undefined, new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered));
+ }
+ const batch = bulkOperation.s.batches.shift();
+ function resultHandler(err, result) {
+ // Error is a driver related error not a bulk op error, return early
+ if (err && 'message' in err && !(err instanceof error_1.MongoWriteConcernError)) {
+ return callback(new MongoBulkWriteError(err, new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered)));
+ }
+ if (err instanceof error_1.MongoWriteConcernError) {
+ return handleMongoWriteConcernError(batch, bulkOperation.s.bulkResult, bulkOperation.isOrdered, err, callback);
+ }
+ // Merge the results together
+ mergeBatchResults(batch, bulkOperation.s.bulkResult, err, result);
+ const writeResult = new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered);
+ if (bulkOperation.handleWriteError(callback, writeResult))
+ return;
+ // Execute the next command in line
+ executeCommands(bulkOperation, options, callback);
+ }
+ const finalOptions = (0, utils_2.resolveOptions)(bulkOperation, {
+ ...options,
+ ordered: bulkOperation.isOrdered
+ });
+ if (finalOptions.bypassDocumentValidation !== true) {
+ delete finalOptions.bypassDocumentValidation;
+ }
+ // Set an operationIf if provided
+ if (bulkOperation.operationId) {
+ resultHandler.operationId = bulkOperation.operationId;
+ }
+ // Is the bypassDocumentValidation options specific
+ if (bulkOperation.s.bypassDocumentValidation === true) {
+ finalOptions.bypassDocumentValidation = true;
+ }
+ // Is the checkKeys option disabled
+ if (bulkOperation.s.checkKeys === false) {
+ finalOptions.checkKeys = false;
+ }
+ if (finalOptions.retryWrites) {
+ if (isUpdateBatch(batch)) {
+ finalOptions.retryWrites = finalOptions.retryWrites && !batch.operations.some(op => op.multi);
+ }
+ if (isDeleteBatch(batch)) {
+ finalOptions.retryWrites =
+ finalOptions.retryWrites && !batch.operations.some(op => op.limit === 0);
+ }
+ }
+ try {
+ const operation = isInsertBatch(batch)
+ ? new insert_1.InsertOperation(bulkOperation.s.namespace, batch.operations, finalOptions)
+ : isUpdateBatch(batch)
+ ? new update_1.UpdateOperation(bulkOperation.s.namespace, batch.operations, finalOptions)
+ : isDeleteBatch(batch)
+ ? new delete_1.DeleteOperation(bulkOperation.s.namespace, batch.operations, finalOptions)
+ : null;
+ if (operation != null) {
+ // eslint-disable-next-line github/no-then
+ (0, execute_operation_1.executeOperation)(bulkOperation.s.collection.client, operation).then(result => resultHandler(undefined, result), error => resultHandler(error));
+ }
+ }
+ catch (err) {
+ // Force top level error
+ err.ok = 0;
+ // Merge top level error and return
+ mergeBatchResults(batch, bulkOperation.s.bulkResult, err, undefined);
+ callback();
+ }
+}
+function handleMongoWriteConcernError(batch, bulkResult, isOrdered, err, callback) {
+ mergeBatchResults(batch, bulkResult, undefined, err.result);
+ callback(new MongoBulkWriteError({
+ message: err.result?.writeConcernError.errmsg,
+ code: err.result?.writeConcernError.result
+ }, new BulkWriteResult(bulkResult, isOrdered)));
+}
+/**
+ * An error indicating an unsuccessful Bulk Write
+ * @public
+ * @category Error
+ */
+class MongoBulkWriteError extends error_1.MongoServerError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(error, result) {
+ super(error);
+ this.writeErrors = [];
+ if (error instanceof WriteConcernError)
+ this.err = error;
+ else if (!(error instanceof Error)) {
+ this.message = error.message;
+ this.code = error.code;
+ this.writeErrors = error.writeErrors ?? [];
+ }
+ this.result = result;
+ Object.assign(this, error);
+ }
+ get name() {
+ return 'MongoBulkWriteError';
+ }
+ /** Number of documents inserted. */
+ get insertedCount() {
+ return this.result.insertedCount;
+ }
+ /** Number of documents matched for update. */
+ get matchedCount() {
+ return this.result.matchedCount;
+ }
+ /** Number of documents modified. */
+ get modifiedCount() {
+ return this.result.modifiedCount;
+ }
+ /** Number of documents deleted. */
+ get deletedCount() {
+ return this.result.deletedCount;
+ }
+ /** Number of documents upserted. */
+ get upsertedCount() {
+ return this.result.upsertedCount;
+ }
+ /** Inserted document generated Id's, hash key is the index of the originating operation */
+ get insertedIds() {
+ return this.result.insertedIds;
+ }
+ /** Upserted document generated Id's, hash key is the index of the originating operation */
+ get upsertedIds() {
+ return this.result.upsertedIds;
+ }
+}
+exports.MongoBulkWriteError = MongoBulkWriteError;
+/**
+ * A builder object that is returned from {@link BulkOperationBase#find}.
+ * Is used to build a write operation that involves a query filter.
+ *
+ * @public
+ */
+class FindOperators {
+ /**
+ * Creates a new FindOperators object.
+ * @internal
+ */
+ constructor(bulkOperation) {
+ this.bulkOperation = bulkOperation;
+ }
+ /** Add a multiple update operation to the bulk operation */
+ update(updateDocument) {
+ const currentOp = buildCurrentOp(this.bulkOperation);
+ return this.bulkOperation.addToOperationsList(exports.BatchType.UPDATE, (0, update_1.makeUpdateStatement)(currentOp.selector, updateDocument, {
+ ...currentOp,
+ multi: true
+ }));
+ }
+ /** Add a single update operation to the bulk operation */
+ updateOne(updateDocument) {
+ if (!(0, utils_2.hasAtomicOperators)(updateDocument)) {
+ throw new error_1.MongoInvalidArgumentError('Update document requires atomic operators');
+ }
+ const currentOp = buildCurrentOp(this.bulkOperation);
+ return this.bulkOperation.addToOperationsList(exports.BatchType.UPDATE, (0, update_1.makeUpdateStatement)(currentOp.selector, updateDocument, { ...currentOp, multi: false }));
+ }
+ /** Add a replace one operation to the bulk operation */
+ replaceOne(replacement) {
+ if ((0, utils_2.hasAtomicOperators)(replacement)) {
+ throw new error_1.MongoInvalidArgumentError('Replacement document must not use atomic operators');
+ }
+ const currentOp = buildCurrentOp(this.bulkOperation);
+ return this.bulkOperation.addToOperationsList(exports.BatchType.UPDATE, (0, update_1.makeUpdateStatement)(currentOp.selector, replacement, { ...currentOp, multi: false }));
+ }
+ /** Add a delete one operation to the bulk operation */
+ deleteOne() {
+ const currentOp = buildCurrentOp(this.bulkOperation);
+ return this.bulkOperation.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(currentOp.selector, { ...currentOp, limit: 1 }));
+ }
+ /** Add a delete many operation to the bulk operation */
+ delete() {
+ const currentOp = buildCurrentOp(this.bulkOperation);
+ return this.bulkOperation.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(currentOp.selector, { ...currentOp, limit: 0 }));
+ }
+ /** Upsert modifier for update bulk operation, noting that this operation is an upsert. */
+ upsert() {
+ if (!this.bulkOperation.s.currentOp) {
+ this.bulkOperation.s.currentOp = {};
+ }
+ this.bulkOperation.s.currentOp.upsert = true;
+ return this;
+ }
+ /** Specifies the collation for the query condition. */
+ collation(collation) {
+ if (!this.bulkOperation.s.currentOp) {
+ this.bulkOperation.s.currentOp = {};
+ }
+ this.bulkOperation.s.currentOp.collation = collation;
+ return this;
+ }
+ /** Specifies arrayFilters for UpdateOne or UpdateMany bulk operations. */
+ arrayFilters(arrayFilters) {
+ if (!this.bulkOperation.s.currentOp) {
+ this.bulkOperation.s.currentOp = {};
+ }
+ this.bulkOperation.s.currentOp.arrayFilters = arrayFilters;
+ return this;
+ }
+ /** Specifies hint for the bulk operation. */
+ hint(hint) {
+ if (!this.bulkOperation.s.currentOp) {
+ this.bulkOperation.s.currentOp = {};
+ }
+ this.bulkOperation.s.currentOp.hint = hint;
+ return this;
+ }
+}
+exports.FindOperators = FindOperators;
+const executeCommandsAsync = (0, util_1.promisify)(executeCommands);
+/**
+ * TODO(NODE-4063)
+ * BulkWrites merge complexity is implemented in executeCommands
+ * This provides a vehicle to treat bulkOperations like any other operation (hence "shim")
+ * We would like this logic to simply live inside the BulkWriteOperation class
+ * @internal
+ */
+class BulkWriteShimOperation extends operation_1.AbstractOperation {
+ constructor(bulkOperation, options) {
+ super(options);
+ this.bulkOperation = bulkOperation;
+ }
+ get commandName() {
+ return 'bulkWrite';
+ }
+ execute(_server, session) {
+ if (this.options.session == null) {
+ // An implicit session could have been created by 'executeOperation'
+ // So if we stick it on finalOptions here, each bulk operation
+ // will use this same session, it'll be passed in the same way
+ // an explicit session would be
+ this.options.session = session;
+ }
+ return executeCommandsAsync(this.bulkOperation, this.options);
+ }
+}
+exports.BulkWriteShimOperation = BulkWriteShimOperation;
+/** @public */
+class BulkOperationBase {
+ /**
+ * Create a new OrderedBulkOperation or UnorderedBulkOperation instance
+ * @internal
+ */
+ constructor(collection, options, isOrdered) {
+ this.collection = collection;
+ // determine whether bulkOperation is ordered or unordered
+ this.isOrdered = isOrdered;
+ const topology = (0, utils_2.getTopology)(collection);
+ options = options == null ? {} : options;
+ // TODO Bring from driver information in hello
+ // Get the namespace for the write operations
+ const namespace = collection.s.namespace;
+ // Used to mark operation as executed
+ const executed = false;
+ // Current item
+ const currentOp = undefined;
+ // Set max byte size
+ const hello = topology.lastHello();
+ // If we have autoEncryption on, batch-splitting must be done on 2mb chunks, but single documents
+ // over 2mb are still allowed
+ const usingAutoEncryption = !!(topology.s.options && topology.s.options.autoEncrypter);
+ const maxBsonObjectSize = hello && hello.maxBsonObjectSize ? hello.maxBsonObjectSize : 1024 * 1024 * 16;
+ const maxBatchSizeBytes = usingAutoEncryption ? 1024 * 1024 * 2 : maxBsonObjectSize;
+ const maxWriteBatchSize = hello && hello.maxWriteBatchSize ? hello.maxWriteBatchSize : 1000;
+ // Calculates the largest possible size of an Array key, represented as a BSON string
+ // element. This calculation:
+ // 1 byte for BSON type
+ // # of bytes = length of (string representation of (maxWriteBatchSize - 1))
+ // + 1 bytes for null terminator
+ const maxKeySize = (maxWriteBatchSize - 1).toString(10).length + 2;
+ // Final options for retryable writes
+ let finalOptions = Object.assign({}, options);
+ finalOptions = (0, utils_2.applyRetryableWrites)(finalOptions, collection.s.db);
+ // Final results
+ const bulkResult = {
+ ok: 1,
+ writeErrors: [],
+ writeConcernErrors: [],
+ insertedIds: [],
+ nInserted: 0,
+ nUpserted: 0,
+ nMatched: 0,
+ nModified: 0,
+ nRemoved: 0,
+ upserted: []
+ };
+ // Internal state
+ this.s = {
+ // Final result
+ bulkResult,
+ // Current batch state
+ currentBatch: undefined,
+ currentIndex: 0,
+ // ordered specific
+ currentBatchSize: 0,
+ currentBatchSizeBytes: 0,
+ // unordered specific
+ currentInsertBatch: undefined,
+ currentUpdateBatch: undefined,
+ currentRemoveBatch: undefined,
+ batches: [],
+ // Write concern
+ writeConcern: write_concern_1.WriteConcern.fromOptions(options),
+ // Max batch size options
+ maxBsonObjectSize,
+ maxBatchSizeBytes,
+ maxWriteBatchSize,
+ maxKeySize,
+ // Namespace
+ namespace,
+ // Topology
+ topology,
+ // Options
+ options: finalOptions,
+ // BSON options
+ bsonOptions: (0, bson_1.resolveBSONOptions)(options),
+ // Current operation
+ currentOp,
+ // Executed
+ executed,
+ // Collection
+ collection,
+ // Fundamental error
+ err: undefined,
+ // check keys
+ checkKeys: typeof options.checkKeys === 'boolean' ? options.checkKeys : false
+ };
+ // bypass Validation
+ if (options.bypassDocumentValidation === true) {
+ this.s.bypassDocumentValidation = true;
+ }
+ }
+ /**
+ * Add a single insert document to the bulk operation
+ *
+ * @example
+ * ```ts
+ * const bulkOp = collection.initializeOrderedBulkOp();
+ *
+ * // Adds three inserts to the bulkOp.
+ * bulkOp
+ * .insert({ a: 1 })
+ * .insert({ b: 2 })
+ * .insert({ c: 3 });
+ * await bulkOp.execute();
+ * ```
+ */
+ insert(document) {
+ (0, utils_1.maybeAddIdToDocuments)(this.collection, document, {
+ forceServerObjectId: this.shouldForceServerObjectId()
+ });
+ return this.addToOperationsList(exports.BatchType.INSERT, document);
+ }
+ /**
+ * Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne.
+ * Returns a builder object used to complete the definition of the operation.
+ *
+ * @example
+ * ```ts
+ * const bulkOp = collection.initializeOrderedBulkOp();
+ *
+ * // Add an updateOne to the bulkOp
+ * bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } });
+ *
+ * // Add an updateMany to the bulkOp
+ * bulkOp.find({ c: 3 }).update({ $set: { d: 4 } });
+ *
+ * // Add an upsert
+ * bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } });
+ *
+ * // Add a deletion
+ * bulkOp.find({ g: 7 }).deleteOne();
+ *
+ * // Add a multi deletion
+ * bulkOp.find({ h: 8 }).delete();
+ *
+ * // Add a replaceOne
+ * bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});
+ *
+ * // Update using a pipeline (requires Mongodb 4.2 or higher)
+ * bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([
+ * { $set: { total: { $sum: [ '$y', '$z' ] } } }
+ * ]);
+ *
+ * // All of the ops will now be executed
+ * await bulkOp.execute();
+ * ```
+ */
+ find(selector) {
+ if (!selector) {
+ throw new error_1.MongoInvalidArgumentError('Bulk find operation must specify a selector');
+ }
+ // Save a current selector
+ this.s.currentOp = {
+ selector: selector
+ };
+ return new FindOperators(this);
+ }
+ /** Specifies a raw operation to perform in the bulk write. */
+ raw(op) {
+ if (op == null || typeof op !== 'object') {
+ throw new error_1.MongoInvalidArgumentError('Operation must be an object with an operation key');
+ }
+ if ('insertOne' in op) {
+ const forceServerObjectId = this.shouldForceServerObjectId();
+ const document = op.insertOne && op.insertOne.document == null
+ ? // TODO(NODE-6003): remove support for omitting the `documents` subdocument in bulk inserts
+ op.insertOne
+ : op.insertOne.document;
+ (0, utils_1.maybeAddIdToDocuments)(this.collection, document, { forceServerObjectId });
+ return this.addToOperationsList(exports.BatchType.INSERT, document);
+ }
+ if ('replaceOne' in op || 'updateOne' in op || 'updateMany' in op) {
+ if ('replaceOne' in op) {
+ if ('q' in op.replaceOne) {
+ throw new error_1.MongoInvalidArgumentError('Raw operations are not allowed');
+ }
+ const updateStatement = (0, update_1.makeUpdateStatement)(op.replaceOne.filter, op.replaceOne.replacement, { ...op.replaceOne, multi: false });
+ if ((0, utils_2.hasAtomicOperators)(updateStatement.u)) {
+ throw new error_1.MongoInvalidArgumentError('Replacement document must not use atomic operators');
+ }
+ return this.addToOperationsList(exports.BatchType.UPDATE, updateStatement);
+ }
+ if ('updateOne' in op) {
+ if ('q' in op.updateOne) {
+ throw new error_1.MongoInvalidArgumentError('Raw operations are not allowed');
+ }
+ const updateStatement = (0, update_1.makeUpdateStatement)(op.updateOne.filter, op.updateOne.update, {
+ ...op.updateOne,
+ multi: false
+ });
+ if (!(0, utils_2.hasAtomicOperators)(updateStatement.u)) {
+ throw new error_1.MongoInvalidArgumentError('Update document requires atomic operators');
+ }
+ return this.addToOperationsList(exports.BatchType.UPDATE, updateStatement);
+ }
+ if ('updateMany' in op) {
+ if ('q' in op.updateMany) {
+ throw new error_1.MongoInvalidArgumentError('Raw operations are not allowed');
+ }
+ const updateStatement = (0, update_1.makeUpdateStatement)(op.updateMany.filter, op.updateMany.update, {
+ ...op.updateMany,
+ multi: true
+ });
+ if (!(0, utils_2.hasAtomicOperators)(updateStatement.u)) {
+ throw new error_1.MongoInvalidArgumentError('Update document requires atomic operators');
+ }
+ return this.addToOperationsList(exports.BatchType.UPDATE, updateStatement);
+ }
+ }
+ if ('deleteOne' in op) {
+ if ('q' in op.deleteOne) {
+ throw new error_1.MongoInvalidArgumentError('Raw operations are not allowed');
+ }
+ return this.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(op.deleteOne.filter, { ...op.deleteOne, limit: 1 }));
+ }
+ if ('deleteMany' in op) {
+ if ('q' in op.deleteMany) {
+ throw new error_1.MongoInvalidArgumentError('Raw operations are not allowed');
+ }
+ return this.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(op.deleteMany.filter, { ...op.deleteMany, limit: 0 }));
+ }
+ // otherwise an unknown operation was provided
+ throw new error_1.MongoInvalidArgumentError('bulkWrite only supports insertOne, updateOne, updateMany, deleteOne, deleteMany');
+ }
+ get bsonOptions() {
+ return this.s.bsonOptions;
+ }
+ get writeConcern() {
+ return this.s.writeConcern;
+ }
+ get batches() {
+ const batches = [...this.s.batches];
+ if (this.isOrdered) {
+ if (this.s.currentBatch)
+ batches.push(this.s.currentBatch);
+ }
+ else {
+ if (this.s.currentInsertBatch)
+ batches.push(this.s.currentInsertBatch);
+ if (this.s.currentUpdateBatch)
+ batches.push(this.s.currentUpdateBatch);
+ if (this.s.currentRemoveBatch)
+ batches.push(this.s.currentRemoveBatch);
+ }
+ return batches;
+ }
+ async execute(options = {}) {
+ if (this.s.executed) {
+ throw new error_1.MongoBatchReExecutionError();
+ }
+ const writeConcern = write_concern_1.WriteConcern.fromOptions(options);
+ if (writeConcern) {
+ this.s.writeConcern = writeConcern;
+ }
+ // If we have current batch
+ if (this.isOrdered) {
+ if (this.s.currentBatch)
+ this.s.batches.push(this.s.currentBatch);
+ }
+ else {
+ if (this.s.currentInsertBatch)
+ this.s.batches.push(this.s.currentInsertBatch);
+ if (this.s.currentUpdateBatch)
+ this.s.batches.push(this.s.currentUpdateBatch);
+ if (this.s.currentRemoveBatch)
+ this.s.batches.push(this.s.currentRemoveBatch);
+ }
+ // If we have no operations in the bulk raise an error
+ if (this.s.batches.length === 0) {
+ throw new error_1.MongoInvalidArgumentError('Invalid BulkOperation, Batch cannot be empty');
+ }
+ this.s.executed = true;
+ const finalOptions = { ...this.s.options, ...options };
+ const operation = new BulkWriteShimOperation(this, finalOptions);
+ return await (0, execute_operation_1.executeOperation)(this.s.collection.client, operation);
+ }
+ /**
+ * Handles the write error before executing commands
+ * @internal
+ */
+ handleWriteError(callback, writeResult) {
+ if (this.s.bulkResult.writeErrors.length > 0) {
+ const msg = this.s.bulkResult.writeErrors[0].errmsg
+ ? this.s.bulkResult.writeErrors[0].errmsg
+ : 'write operation failed';
+ callback(new MongoBulkWriteError({
+ message: msg,
+ code: this.s.bulkResult.writeErrors[0].code,
+ writeErrors: this.s.bulkResult.writeErrors
+ }, writeResult));
+ return true;
+ }
+ const writeConcernError = writeResult.getWriteConcernError();
+ if (writeConcernError) {
+ callback(new MongoBulkWriteError(writeConcernError, writeResult));
+ return true;
+ }
+ return false;
+ }
+ shouldForceServerObjectId() {
+ return (this.s.options.forceServerObjectId === true ||
+ this.s.collection.s.db.options?.forceServerObjectId === true);
+ }
+}
+exports.BulkOperationBase = BulkOperationBase;
+Object.defineProperty(BulkOperationBase.prototype, 'length', {
+ enumerable: true,
+ get() {
+ return this.s.currentIndex;
+ }
+});
+function isInsertBatch(batch) {
+ return batch.batchType === exports.BatchType.INSERT;
+}
+function isUpdateBatch(batch) {
+ return batch.batchType === exports.BatchType.UPDATE;
+}
+function isDeleteBatch(batch) {
+ return batch.batchType === exports.BatchType.DELETE;
+}
+function buildCurrentOp(bulkOp) {
+ let { currentOp } = bulkOp.s;
+ bulkOp.s.currentOp = undefined;
+ if (!currentOp)
+ currentOp = {};
+ return currentOp;
+}
+//# sourceMappingURL=common.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/common.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/common.js.map
new file mode 100644
index 000000000..5daf42f97
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/common.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/bulk/common.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AAEjC,kCAAuF;AAEvF,oCAOkB;AAGlB,iDAAkG;AAClG,uEAAmE;AACnE,iDAAuD;AACvD,uDAAuE;AACvE,iDAAkG;AAIlG,oCAAiD;AACjD,oCAOkB;AAClB,oDAAgD;AAEhD,gBAAgB;AAChB,MAAM,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAE3C,cAAc;AACD,QAAA,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;IACrC,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACD,CAAC,CAAC;AA4GZ;;;;;GAKG;AACH,MAAa,KAAK;IAShB,YAAY,SAAoB,EAAE,iBAAyB;QACzD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACd,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACrB,CAAC;CACF;AAlBD,sBAkBC;AAED;;;GAGG;AACH,MAAa,eAAe;IAiBlB,MAAM,CAAC,aAAa,CAAC,GAAe;QAC1C,MAAM,KAAK,GAA6B,EAAE,CAAC;QAC3C,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;YACrB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC;SAC5B;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;OAGG;IACH,YAAY,UAAsB,EAAE,SAAk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CAAC,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,SAAS;QAAE,SAAS,GAAG,EAAE,CAAC;IAC/B,OAAO,SAAS,CAAC;AACnB,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/ordered.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/ordered.js
new file mode 100644
index 000000000..667f724f1
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/ordered.js
@@ -0,0 +1,67 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OrderedBulkOperation = void 0;
+const BSON = require("../bson");
+const error_1 = require("../error");
+const common_1 = require("./common");
+/** @public */
+class OrderedBulkOperation extends common_1.BulkOperationBase {
+ /** @internal */
+ constructor(collection, options) {
+ super(collection, options, true);
+ }
+ addToOperationsList(batchType, document) {
+ // Get the bsonSize
+ const bsonSize = BSON.calculateObjectSize(document, {
+ checkKeys: false,
+ // Since we don't know what the user selected for BSON options here,
+ // err on the safe side, and check the size with ignoreUndefined: false.
+ ignoreUndefined: false
+ });
+ // Throw error if the doc is bigger than the max BSON size
+ if (bsonSize >= this.s.maxBsonObjectSize)
+ // TODO(NODE-3483): Change this to MongoBSONError
+ throw new error_1.MongoInvalidArgumentError(`Document is larger than the maximum size ${this.s.maxBsonObjectSize}`);
+ // Create a new batch object if we don't have a current one
+ if (this.s.currentBatch == null) {
+ this.s.currentBatch = new common_1.Batch(batchType, this.s.currentIndex);
+ }
+ const maxKeySize = this.s.maxKeySize;
+ // Check if we need to create a new batch
+ if (
+ // New batch if we exceed the max batch op size
+ this.s.currentBatchSize + 1 >= this.s.maxWriteBatchSize ||
+ // New batch if we exceed the maxBatchSizeBytes. Only matters if batch already has a doc,
+ // since we can't sent an empty batch
+ (this.s.currentBatchSize > 0 &&
+ this.s.currentBatchSizeBytes + maxKeySize + bsonSize >= this.s.maxBatchSizeBytes) ||
+ // New batch if the new op does not have the same op type as the current batch
+ this.s.currentBatch.batchType !== batchType) {
+ // Save the batch to the execution stack
+ this.s.batches.push(this.s.currentBatch);
+ // Create a new batch
+ this.s.currentBatch = new common_1.Batch(batchType, this.s.currentIndex);
+ // Reset the current size trackers
+ this.s.currentBatchSize = 0;
+ this.s.currentBatchSizeBytes = 0;
+ }
+ if (batchType === common_1.BatchType.INSERT) {
+ this.s.bulkResult.insertedIds.push({
+ index: this.s.currentIndex,
+ _id: document._id
+ });
+ }
+ // We have an array of documents
+ if (Array.isArray(document)) {
+ throw new error_1.MongoInvalidArgumentError('Operation passed in cannot be an Array');
+ }
+ this.s.currentBatch.originalIndexes.push(this.s.currentIndex);
+ this.s.currentBatch.operations.push(document);
+ this.s.currentBatchSize += 1;
+ this.s.currentBatchSizeBytes += maxKeySize + bsonSize;
+ this.s.currentIndex += 1;
+ return this;
+ }
+}
+exports.OrderedBulkOperation = OrderedBulkOperation;
+//# sourceMappingURL=ordered.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/ordered.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/ordered.js.map
new file mode 100644
index 000000000..7f8fde0d7
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/ordered.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ordered.js","sourceRoot":"","sources":["../../src/bulk/ordered.ts"],"names":[],"mappings":";;;AACA,gCAAgC;AAEhC,oCAAqD;AAGrD,qCAAsF;AAEtF,cAAc;AACd,MAAa,oBAAqB,SAAQ,0BAAiB;IACzD,gBAAgB;IAChB,YAAY,UAAsB,EAAE,OAAyB;QAC3D,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,mBAAmB,CACjB,SAAoB,EACpB,QAAsD;QAEtD,mBAAmB;QACnB,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE;YAClD,SAAS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AC;YAC5B,IAAI,CAAC,CAAC,CAAC,qBAAqB,GAAG,CAAC,CAAC;SAClC;QAED,IAAI,SAAS,KAAK,kBAAS,CAAC,MAAM,EAAE;YAClC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC;gBACjC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY;gBAC1B,GAAG,EAAG,QAAqB,CAAC,GAAG;aAChC,CAAC,CAAC;SACJ;QAED,gCAAgC;QAChC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC3B,MAAM,IAAI,iCAAyB,CAAC,wCAAwC,CAAC,CAAC;SAC/E;QAED,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;QAC9D,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAI,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC,CAAC,qBAAqB,IAAI,UAAU,GAAG,QAAQ,CAAC;QACtD,IAAI,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAzED,oDAyEC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/unordered.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/unordered.js
new file mode 100644
index 000000000..14b8f038f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/unordered.js
@@ -0,0 +1,92 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.UnorderedBulkOperation = void 0;
+const BSON = require("../bson");
+const error_1 = require("../error");
+const common_1 = require("./common");
+/** @public */
+class UnorderedBulkOperation extends common_1.BulkOperationBase {
+ /** @internal */
+ constructor(collection, options) {
+ super(collection, options, false);
+ }
+ handleWriteError(callback, writeResult) {
+ if (this.s.batches.length) {
+ return false;
+ }
+ return super.handleWriteError(callback, writeResult);
+ }
+ addToOperationsList(batchType, document) {
+ // Get the bsonSize
+ const bsonSize = BSON.calculateObjectSize(document, {
+ checkKeys: false,
+ // Since we don't know what the user selected for BSON options here,
+ // err on the safe side, and check the size with ignoreUndefined: false.
+ ignoreUndefined: false
+ });
+ // Throw error if the doc is bigger than the max BSON size
+ if (bsonSize >= this.s.maxBsonObjectSize) {
+ // TODO(NODE-3483): Change this to MongoBSONError
+ throw new error_1.MongoInvalidArgumentError(`Document is larger than the maximum size ${this.s.maxBsonObjectSize}`);
+ }
+ // Holds the current batch
+ this.s.currentBatch = undefined;
+ // Get the right type of batch
+ if (batchType === common_1.BatchType.INSERT) {
+ this.s.currentBatch = this.s.currentInsertBatch;
+ }
+ else if (batchType === common_1.BatchType.UPDATE) {
+ this.s.currentBatch = this.s.currentUpdateBatch;
+ }
+ else if (batchType === common_1.BatchType.DELETE) {
+ this.s.currentBatch = this.s.currentRemoveBatch;
+ }
+ const maxKeySize = this.s.maxKeySize;
+ // Create a new batch object if we don't have a current one
+ if (this.s.currentBatch == null) {
+ this.s.currentBatch = new common_1.Batch(batchType, this.s.currentIndex);
+ }
+ // Check if we need to create a new batch
+ if (
+ // New batch if we exceed the max batch op size
+ this.s.currentBatch.size + 1 >= this.s.maxWriteBatchSize ||
+ // New batch if we exceed the maxBatchSizeBytes. Only matters if batch already has a doc,
+ // since we can't sent an empty batch
+ (this.s.currentBatch.size > 0 &&
+ this.s.currentBatch.sizeBytes + maxKeySize + bsonSize >= this.s.maxBatchSizeBytes) ||
+ // New batch if the new op does not have the same op type as the current batch
+ this.s.currentBatch.batchType !== batchType) {
+ // Save the batch to the execution stack
+ this.s.batches.push(this.s.currentBatch);
+ // Create a new batch
+ this.s.currentBatch = new common_1.Batch(batchType, this.s.currentIndex);
+ }
+ // We have an array of documents
+ if (Array.isArray(document)) {
+ throw new error_1.MongoInvalidArgumentError('Operation passed in cannot be an Array');
+ }
+ this.s.currentBatch.operations.push(document);
+ this.s.currentBatch.originalIndexes.push(this.s.currentIndex);
+ this.s.currentIndex = this.s.currentIndex + 1;
+ // Save back the current Batch to the right type
+ if (batchType === common_1.BatchType.INSERT) {
+ this.s.currentInsertBatch = this.s.currentBatch;
+ this.s.bulkResult.insertedIds.push({
+ index: this.s.bulkResult.insertedIds.length,
+ _id: document._id
+ });
+ }
+ else if (batchType === common_1.BatchType.UPDATE) {
+ this.s.currentUpdateBatch = this.s.currentBatch;
+ }
+ else if (batchType === common_1.BatchType.DELETE) {
+ this.s.currentRemoveBatch = this.s.currentBatch;
+ }
+ // Update current batch size
+ this.s.currentBatch.size += 1;
+ this.s.currentBatch.sizeBytes += maxKeySize + bsonSize;
+ return this;
+ }
+}
+exports.UnorderedBulkOperation = UnorderedBulkOperation;
+//# sourceMappingURL=unordered.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/unordered.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/unordered.js.map
new file mode 100644
index 000000000..a510ddd80
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/bulk/unordered.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"unordered.js","sourceRoot":"","sources":["../../src/bulk/unordered.ts"],"names":[],"mappings":";;;AACA,gCAAgC;AAEhC,oCAAqD;AAIrD,qCAMkB;AAElB,cAAc;AACd,MAAa,sBAAuB,SAAQ,0BAAiB;IAC3D,gBAAgB;IAChB,YAAY,UAAsB,EAAE,OAAyB;QAC3D,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAEQ,gBAAgB,CAAC,QAAkB,EAAE,WAA4B;QACxE,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;YACzB,OAAO,KAAK,CAAC;SACd;QAED,OAAO,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ChD,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC;gBACjC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM;gBAC3C,GAAG,EAAG,QAAqB,CAAC,GAAG;aAChC,CAAC,CAAC;SACJ;aAAM,IAAI,SAAS,KAAK,kBAAS,CAAC,MAAM,EAAE;YACzC,IAAI,CAAC,CAAC,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC;SACjD;aAAM,IAAI,SAAS,KAAK,kBAAS,CAAC,MAAM,EAAE;YACzC,IAAI,CAAC,CAAC,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC;SACjD;QAED,4BAA4B;QAC5B,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,IAAI,UAAU,GAAG,QAAQ,CAAC;QAEvD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAnGD,wDAmGC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/change_stream.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/change_stream.js
new file mode 100644
index 000000000..75c9e06c4
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/change_stream.js
@@ -0,0 +1,409 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ChangeStream = void 0;
+const collection_1 = require("./collection");
+const constants_1 = require("./constants");
+const change_stream_cursor_1 = require("./cursor/change_stream_cursor");
+const db_1 = require("./db");
+const error_1 = require("./error");
+const mongo_client_1 = require("./mongo_client");
+const mongo_types_1 = require("./mongo_types");
+const utils_1 = require("./utils");
+/** @internal */
+const kCursorStream = Symbol('cursorStream');
+/** @internal */
+const kClosed = Symbol('closed');
+/** @internal */
+const kMode = Symbol('mode');
+const CHANGE_STREAM_OPTIONS = [
+ 'resumeAfter',
+ 'startAfter',
+ 'startAtOperationTime',
+ 'fullDocument',
+ 'fullDocumentBeforeChange',
+ 'showExpandedEvents'
+];
+const CHANGE_DOMAIN_TYPES = {
+ COLLECTION: Symbol('Collection'),
+ DATABASE: Symbol('Database'),
+ CLUSTER: Symbol('Cluster')
+};
+const CHANGE_STREAM_EVENTS = [constants_1.RESUME_TOKEN_CHANGED, constants_1.END, constants_1.CLOSE];
+const NO_RESUME_TOKEN_ERROR = 'A change stream document has been received that lacks a resume token (_id).';
+const CHANGESTREAM_CLOSED_ERROR = 'ChangeStream is closed';
+/**
+ * Creates a new Change Stream instance. Normally created using {@link Collection#watch|Collection.watch()}.
+ * @public
+ */
+class ChangeStream extends mongo_types_1.TypedEventEmitter {
+ /**
+ * @internal
+ *
+ * @param parent - The parent object that created this change stream
+ * @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents
+ */
+ constructor(parent, pipeline = [], options = {}) {
+ super();
+ this.pipeline = pipeline;
+ this.options = { ...options };
+ delete this.options.writeConcern;
+ if (parent instanceof collection_1.Collection) {
+ this.type = CHANGE_DOMAIN_TYPES.COLLECTION;
+ }
+ else if (parent instanceof db_1.Db) {
+ this.type = CHANGE_DOMAIN_TYPES.DATABASE;
+ }
+ else if (parent instanceof mongo_client_1.MongoClient) {
+ this.type = CHANGE_DOMAIN_TYPES.CLUSTER;
+ }
+ else {
+ throw new error_1.MongoChangeStreamError('Parent provided to ChangeStream constructor must be an instance of Collection, Db, or MongoClient');
+ }
+ this.parent = parent;
+ this.namespace = parent.s.namespace;
+ if (!this.options.readPreference && parent.readPreference) {
+ this.options.readPreference = parent.readPreference;
+ }
+ // Create contained Change Stream cursor
+ this.cursor = this._createChangeStreamCursor(options);
+ this[kClosed] = false;
+ this[kMode] = false;
+ // Listen for any `change` listeners being added to ChangeStream
+ this.on('newListener', eventName => {
+ if (eventName === 'change' && this.cursor && this.listenerCount('change') === 0) {
+ this._streamEvents(this.cursor);
+ }
+ });
+ this.on('removeListener', eventName => {
+ if (eventName === 'change' && this.listenerCount('change') === 0 && this.cursor) {
+ this[kCursorStream]?.removeAllListeners('data');
+ }
+ });
+ }
+ /** @internal */
+ get cursorStream() {
+ return this[kCursorStream];
+ }
+ /** The cached resume token that is used to resume after the most recently returned change. */
+ get resumeToken() {
+ return this.cursor?.resumeToken;
+ }
+ /** Check if there is any document still available in the Change Stream */
+ async hasNext() {
+ this._setIsIterator();
+ // Change streams must resume indefinitely while each resume event succeeds.
+ // This loop continues until either a change event is received or until a resume attempt
+ // fails.
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ try {
+ const hasNext = await this.cursor.hasNext();
+ return hasNext;
+ }
+ catch (error) {
+ try {
+ await this._processErrorIteratorMode(error);
+ }
+ catch (error) {
+ try {
+ await this.close();
+ }
+ catch (error) {
+ (0, utils_1.squashError)(error);
+ }
+ throw error;
+ }
+ }
+ }
+ }
+ /** Get the next available document from the Change Stream. */
+ async next() {
+ this._setIsIterator();
+ // Change streams must resume indefinitely while each resume event succeeds.
+ // This loop continues until either a change event is received or until a resume attempt
+ // fails.
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ try {
+ const change = await this.cursor.next();
+ const processedChange = this._processChange(change ?? null);
+ return processedChange;
+ }
+ catch (error) {
+ try {
+ await this._processErrorIteratorMode(error);
+ }
+ catch (error) {
+ try {
+ await this.close();
+ }
+ catch (error) {
+ (0, utils_1.squashError)(error);
+ }
+ throw error;
+ }
+ }
+ }
+ }
+ /**
+ * Try to get the next available document from the Change Stream's cursor or `null` if an empty batch is returned
+ */
+ async tryNext() {
+ this._setIsIterator();
+ // Change streams must resume indefinitely while each resume event succeeds.
+ // This loop continues until either a change event is received or until a resume attempt
+ // fails.
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ try {
+ const change = await this.cursor.tryNext();
+ return change ?? null;
+ }
+ catch (error) {
+ try {
+ await this._processErrorIteratorMode(error);
+ }
+ catch (error) {
+ try {
+ await this.close();
+ }
+ catch (error) {
+ (0, utils_1.squashError)(error);
+ }
+ throw error;
+ }
+ }
+ }
+ }
+ async *[Symbol.asyncIterator]() {
+ if (this.closed) {
+ return;
+ }
+ try {
+ // Change streams run indefinitely as long as errors are resumable
+ // So the only loop breaking condition is if `next()` throws
+ while (true) {
+ yield await this.next();
+ }
+ }
+ finally {
+ try {
+ await this.close();
+ }
+ catch (error) {
+ (0, utils_1.squashError)(error);
+ }
+ }
+ }
+ /** Is the cursor closed */
+ get closed() {
+ return this[kClosed] || this.cursor.closed;
+ }
+ /** Close the Change Stream */
+ async close() {
+ this[kClosed] = true;
+ const cursor = this.cursor;
+ try {
+ await cursor.close();
+ }
+ finally {
+ this._endStream();
+ }
+ }
+ /**
+ * Return a modified Readable stream including a possible transform method.
+ *
+ * NOTE: When using a Stream to process change stream events, the stream will
+ * NOT automatically resume in the case a resumable error is encountered.
+ *
+ * @throws MongoChangeStreamError if the underlying cursor or the change stream is closed
+ */
+ stream(options) {
+ if (this.closed) {
+ throw new error_1.MongoChangeStreamError(CHANGESTREAM_CLOSED_ERROR);
+ }
+ this.streamOptions = options;
+ return this.cursor.stream(options);
+ }
+ /** @internal */
+ _setIsEmitter() {
+ if (this[kMode] === 'iterator') {
+ // TODO(NODE-3485): Replace with MongoChangeStreamModeError
+ throw new error_1.MongoAPIError('ChangeStream cannot be used as an EventEmitter after being used as an iterator');
+ }
+ this[kMode] = 'emitter';
+ }
+ /** @internal */
+ _setIsIterator() {
+ if (this[kMode] === 'emitter') {
+ // TODO(NODE-3485): Replace with MongoChangeStreamModeError
+ throw new error_1.MongoAPIError('ChangeStream cannot be used as an iterator after being used as an EventEmitter');
+ }
+ this[kMode] = 'iterator';
+ }
+ /**
+ * Create a new change stream cursor based on self's configuration
+ * @internal
+ */
+ _createChangeStreamCursor(options) {
+ const changeStreamStageOptions = (0, utils_1.filterOptions)(options, CHANGE_STREAM_OPTIONS);
+ if (this.type === CHANGE_DOMAIN_TYPES.CLUSTER) {
+ changeStreamStageOptions.allChangesForCluster = true;
+ }
+ const pipeline = [{ $changeStream: changeStreamStageOptions }, ...this.pipeline];
+ const client = this.type === CHANGE_DOMAIN_TYPES.CLUSTER
+ ? this.parent
+ : this.type === CHANGE_DOMAIN_TYPES.DATABASE
+ ? this.parent.client
+ : this.type === CHANGE_DOMAIN_TYPES.COLLECTION
+ ? this.parent.client
+ : null;
+ if (client == null) {
+ // This should never happen because of the assertion in the constructor
+ throw new error_1.MongoRuntimeError(`Changestream type should only be one of cluster, database, collection. Found ${this.type.toString()}`);
+ }
+ const changeStreamCursor = new change_stream_cursor_1.ChangeStreamCursor(client, this.namespace, pipeline, options);
+ for (const event of CHANGE_STREAM_EVENTS) {
+ changeStreamCursor.on(event, e => this.emit(event, e));
+ }
+ if (this.listenerCount(ChangeStream.CHANGE) > 0) {
+ this._streamEvents(changeStreamCursor);
+ }
+ return changeStreamCursor;
+ }
+ /** @internal */
+ _closeEmitterModeWithError(error) {
+ this.emit(ChangeStream.ERROR, error);
+ // eslint-disable-next-line github/no-then
+ this.close().then(undefined, utils_1.squashError);
+ }
+ /** @internal */
+ _streamEvents(cursor) {
+ this._setIsEmitter();
+ const stream = this[kCursorStream] ?? cursor.stream();
+ this[kCursorStream] = stream;
+ stream.on('data', change => {
+ try {
+ const processedChange = this._processChange(change);
+ this.emit(ChangeStream.CHANGE, processedChange);
+ }
+ catch (error) {
+ this.emit(ChangeStream.ERROR, error);
+ }
+ });
+ stream.on('error', error => this._processErrorStreamMode(error));
+ }
+ /** @internal */
+ _endStream() {
+ const cursorStream = this[kCursorStream];
+ if (cursorStream) {
+ ['data', 'close', 'end', 'error'].forEach(event => cursorStream.removeAllListeners(event));
+ cursorStream.destroy();
+ }
+ this[kCursorStream] = undefined;
+ }
+ /** @internal */
+ _processChange(change) {
+ if (this[kClosed]) {
+ // TODO(NODE-3485): Replace with MongoChangeStreamClosedError
+ throw new error_1.MongoAPIError(CHANGESTREAM_CLOSED_ERROR);
+ }
+ // a null change means the cursor has been notified, implicitly closing the change stream
+ if (change == null) {
+ // TODO(NODE-3485): Replace with MongoChangeStreamClosedError
+ throw new error_1.MongoRuntimeError(CHANGESTREAM_CLOSED_ERROR);
+ }
+ if (change && !change._id) {
+ throw new error_1.MongoChangeStreamError(NO_RESUME_TOKEN_ERROR);
+ }
+ // cache the resume token
+ this.cursor.cacheResumeToken(change._id);
+ // wipe the startAtOperationTime if there was one so that there won't be a conflict
+ // between resumeToken and startAtOperationTime if we need to reconnect the cursor
+ this.options.startAtOperationTime = undefined;
+ return change;
+ }
+ /** @internal */
+ _processErrorStreamMode(changeStreamError) {
+ // If the change stream has been closed explicitly, do not process error.
+ if (this[kClosed])
+ return;
+ if ((0, error_1.isResumableError)(changeStreamError, this.cursor.maxWireVersion)) {
+ this._endStream();
+ // eslint-disable-next-line github/no-then
+ this.cursor.close().then(undefined, utils_1.squashError);
+ const topology = (0, utils_1.getTopology)(this.parent);
+ topology
+ .selectServer(this.cursor.readPreference, {
+ operationName: 'reconnect topology in change stream'
+ })
+ // eslint-disable-next-line github/no-then
+ .then(() => {
+ this.cursor = this._createChangeStreamCursor(this.cursor.resumeOptions);
+ }, () => this._closeEmitterModeWithError(changeStreamError));
+ }
+ else {
+ this._closeEmitterModeWithError(changeStreamError);
+ }
+ }
+ /** @internal */
+ async _processErrorIteratorMode(changeStreamError) {
+ if (this[kClosed]) {
+ // TODO(NODE-3485): Replace with MongoChangeStreamClosedError
+ throw new error_1.MongoAPIError(CHANGESTREAM_CLOSED_ERROR);
+ }
+ if (!(0, error_1.isResumableError)(changeStreamError, this.cursor.maxWireVersion)) {
+ try {
+ await this.close();
+ }
+ catch (error) {
+ (0, utils_1.squashError)(error);
+ }
+ throw changeStreamError;
+ }
+ try {
+ await this.cursor.close();
+ }
+ catch (error) {
+ (0, utils_1.squashError)(error);
+ }
+ const topology = (0, utils_1.getTopology)(this.parent);
+ try {
+ await topology.selectServer(this.cursor.readPreference, {
+ operationName: 'reconnect topology in change stream'
+ });
+ this.cursor = this._createChangeStreamCursor(this.cursor.resumeOptions);
+ }
+ catch {
+ // if the topology can't reconnect, close the stream
+ await this.close();
+ throw changeStreamError;
+ }
+ }
+}
+/** @event */
+ChangeStream.RESPONSE = constants_1.RESPONSE;
+/** @event */
+ChangeStream.MORE = constants_1.MORE;
+/** @event */
+ChangeStream.INIT = constants_1.INIT;
+/** @event */
+ChangeStream.CLOSE = constants_1.CLOSE;
+/**
+ * Fired for each new matching change in the specified namespace. Attaching a `change`
+ * event listener to a Change Stream will switch the stream into flowing mode. Data will
+ * then be passed as soon as it is available.
+ * @event
+ */
+ChangeStream.CHANGE = constants_1.CHANGE;
+/** @event */
+ChangeStream.END = constants_1.END;
+/** @event */
+ChangeStream.ERROR = constants_1.ERROR;
+/**
+ * Emitted each time the change stream stores a new resume token.
+ * @event
+ */
+ChangeStream.RESUME_TOKEN_CHANGED = constants_1.RESUME_TOKEN_CHANGED;
+exports.ChangeStream = ChangeStream;
+//# sourceMappingURL=change_stream.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/change_stream.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/change_stream.js.map
new file mode 100644
index 000000000..aefb6d3cb
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/change_stream.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"change_stream.js","sourceRoot":"","sources":["../src/change_stream.ts"],"names":[],"mappings":";;;AAGA,6CAA0C;AAC1C,2CAAoG;AAEpG,wEAAmG;AACnG,6BAA0B;AAC1B,mCAMiB;AACjB,iDAA6C;AAC7C,+CAAoE;AAKpE,mCAAyF;AAEzF,gBAAgB;AAChB,MAAM,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7C,gBAAgB;AAChB,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AACjC,gBAAgB;AAChB,MAAM,KAAK,GAAG,MAAM,CAAC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AM,CAAC,cAAc,CAAC,EAAE;YACpE,IAAI;gBACF,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;aACpB;YAAC,OAAO,KAAK,EAAE;gBACd,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC;aACpB;YACD,MAAM,iBAAiB,CAAC;SACzB;QAED,IAAI;YACF,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;SAC3B;QAAC,OAAO,KAAK,EAAE;YACd,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC;SACpB;QACD,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI;YACF,MAAM,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;gBACtD,aAAa,EAAE,qCAAqC;aACrD,CAAC,CAAC;YACH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;SACzE;QAAC,MAAM;YACN,oDAAoD;YACpD,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;YACnB,MAAM,iBAAiB,CAAC;SACzB;IACH,CAAC;;AA/ZD,aAAa;AACG,qBAAQ,GAAG,oBAAQ,CAAC;AACpC,aAAa;AACG,iBAAI,GAAG,gBAAI,CAAC;AAC5B,aAAa;AACG,iBAAI,GAAG,gBAAI,CAAC;AAC5B,aAAa;AACG,kBAAK,GAAG,iBAAK,CAAC;AAC9B;;;;;GAKG;AACa,mBAAM,GAAG,kBAAM,CAAC;AAChC,aAAa;AACG,gBAAG,GAAG,eAAG,CAAC;AAC1B,aAAa;AACG,kBAAK,GAAG,iBAAK,CAAC;AAC9B;;;GAGG;AACa,iCAAoB,GAAG,gCAAoB,CAAC;AAjDjD,oCAAY"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js
new file mode 100644
index 000000000..148b572ae
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js
@@ -0,0 +1,307 @@
+"use strict";
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AutoEncrypter = exports.AutoEncryptionLoggerLevel = void 0;
+const bson_1 = require("../bson");
+const deps_1 = require("../deps");
+const error_1 = require("../error");
+const mongo_client_1 = require("../mongo_client");
+const utils_1 = require("../utils");
+const cryptoCallbacks = require("./crypto_callbacks");
+const errors_1 = require("./errors");
+const mongocryptd_manager_1 = require("./mongocryptd_manager");
+const providers_1 = require("./providers");
+const state_machine_1 = require("./state_machine");
+/** @public */
+exports.AutoEncryptionLoggerLevel = Object.freeze({
+ FatalError: 0,
+ Error: 1,
+ Warning: 2,
+ Info: 3,
+ Trace: 4
+});
+// Typescript errors if we index objects with `Symbol.for(...)`, so
+// to avoid TS errors we pull them out into variables. Then we can type
+// the objects (and class) that we expect to see them on and prevent TS
+// errors.
+/** @internal */
+const kDecorateResult = Symbol.for('@@mdb.decorateDecryptionResult');
+/** @internal */
+const kDecoratedKeys = Symbol.for('@@mdb.decryptedKeys');
+/**
+ * @internal An internal class to be used by the driver for auto encryption
+ * **NOTE**: Not meant to be instantiated directly, this is for internal use only.
+ */
+class AutoEncrypter {
+ /** @internal */
+ static getMongoCrypt() {
+ const encryption = (0, deps_1.getMongoDBClientEncryption)();
+ if ('kModuleError' in encryption) {
+ throw encryption.kModuleError;
+ }
+ return encryption.MongoCrypt;
+ }
+ /**
+ * Create an AutoEncrypter
+ *
+ * **Note**: Do not instantiate this class directly. Rather, supply the relevant options to a MongoClient
+ *
+ * **Note**: Supplying `options.schemaMap` provides more security than relying on JSON Schemas obtained from the server.
+ * It protects against a malicious server advertising a false JSON Schema, which could trick the client into sending unencrypted data that should be encrypted.
+ * Schemas supplied in the schemaMap only apply to configuring automatic encryption for Client-Side Field Level Encryption.
+ * Other validation rules in the JSON schema will not be enforced by the driver and will result in an error.
+ *
+ * @example Create an AutoEncrypter that makes use of mongocryptd
+ * ```ts
+ * // Enabling autoEncryption via a MongoClient using mongocryptd
+ * const { MongoClient } = require('mongodb');
+ * const client = new MongoClient(URL, {
+ * autoEncryption: {
+ * kmsProviders: {
+ * aws: {
+ * accessKeyId: AWS_ACCESS_KEY,
+ * secretAccessKey: AWS_SECRET_KEY
+ * }
+ * }
+ * }
+ * });
+ * ```
+ *
+ * await client.connect();
+ * // From here on, the client will be encrypting / decrypting automatically
+ * @example Create an AutoEncrypter that makes use of libmongocrypt's CSFLE shared library
+ * ```ts
+ * // Enabling autoEncryption via a MongoClient using CSFLE shared library
+ * const { MongoClient } = require('mongodb');
+ * const client = new MongoClient(URL, {
+ * autoEncryption: {
+ * kmsProviders: {
+ * aws: {}
+ * },
+ * extraOptions: {
+ * cryptSharedLibPath: '/path/to/local/crypt/shared/lib',
+ * cryptSharedLibRequired: true
+ * }
+ * }
+ * });
+ * ```
+ *
+ * await client.connect();
+ * // From here on, the client will be encrypting / decrypting automatically
+ */
+ constructor(client, options) {
+ /**
+ * Used by devtools to enable decorating decryption results.
+ *
+ * When set and enabled, `decrypt` will automatically recursively
+ * traverse a decrypted document and if a field has been decrypted,
+ * it will mark it as decrypted. Compass uses this to determine which
+ * fields were decrypted.
+ */
+ this[_a] = false;
+ this._client = client;
+ this._bypassEncryption = options.bypassAutoEncryption === true;
+ this._keyVaultNamespace = options.keyVaultNamespace || 'admin.datakeys';
+ this._keyVaultClient = options.keyVaultClient || client;
+ this._metaDataClient = options.metadataClient || client;
+ this._proxyOptions = options.proxyOptions || {};
+ this._tlsOptions = options.tlsOptions || {};
+ this._kmsProviders = options.kmsProviders || {};
+ const mongoCryptOptions = {
+ cryptoCallbacks
+ };
+ if (options.schemaMap) {
+ mongoCryptOptions.schemaMap = Buffer.isBuffer(options.schemaMap)
+ ? options.schemaMap
+ : (0, bson_1.serialize)(options.schemaMap);
+ }
+ if (options.encryptedFieldsMap) {
+ mongoCryptOptions.encryptedFieldsMap = Buffer.isBuffer(options.encryptedFieldsMap)
+ ? options.encryptedFieldsMap
+ : (0, bson_1.serialize)(options.encryptedFieldsMap);
+ }
+ mongoCryptOptions.kmsProviders = !Buffer.isBuffer(this._kmsProviders)
+ ? (0, bson_1.serialize)(this._kmsProviders)
+ : this._kmsProviders;
+ if (options.options?.logger) {
+ mongoCryptOptions.logger = options.options.logger;
+ }
+ if (options.extraOptions && options.extraOptions.cryptSharedLibPath) {
+ mongoCryptOptions.cryptSharedLibPath = options.extraOptions.cryptSharedLibPath;
+ }
+ if (options.bypassQueryAnalysis) {
+ mongoCryptOptions.bypassQueryAnalysis = options.bypassQueryAnalysis;
+ }
+ this._bypassMongocryptdAndCryptShared = this._bypassEncryption || !!options.bypassQueryAnalysis;
+ if (options.extraOptions && options.extraOptions.cryptSharedLibSearchPaths) {
+ // Only for driver testing
+ mongoCryptOptions.cryptSharedLibSearchPaths = options.extraOptions.cryptSharedLibSearchPaths;
+ }
+ else if (!this._bypassMongocryptdAndCryptShared) {
+ mongoCryptOptions.cryptSharedLibSearchPaths = ['$SYSTEM'];
+ }
+ const MongoCrypt = AutoEncrypter.getMongoCrypt();
+ this._mongocrypt = new MongoCrypt(mongoCryptOptions);
+ this._contextCounter = 0;
+ if (options.extraOptions &&
+ options.extraOptions.cryptSharedLibRequired &&
+ !this.cryptSharedLibVersionInfo) {
+ throw new errors_1.MongoCryptInvalidArgumentError('`cryptSharedLibRequired` set but no crypt_shared library loaded');
+ }
+ // Only instantiate mongocryptd manager/client once we know for sure
+ // that we are not using the CSFLE shared library.
+ if (!this._bypassMongocryptdAndCryptShared && !this.cryptSharedLibVersionInfo) {
+ this._mongocryptdManager = new mongocryptd_manager_1.MongocryptdManager(options.extraOptions);
+ const clientOptions = {
+ serverSelectionTimeoutMS: 10000
+ };
+ if (options.extraOptions == null || typeof options.extraOptions.mongocryptdURI !== 'string') {
+ clientOptions.family = 4;
+ }
+ this._mongocryptdClient = new mongo_client_1.MongoClient(this._mongocryptdManager.uri, clientOptions);
+ }
+ }
+ /**
+ * Initializes the auto encrypter by spawning a mongocryptd and connecting to it.
+ *
+ * This function is a no-op when bypassSpawn is set or the crypt shared library is used.
+ */
+ async init() {
+ if (this._bypassMongocryptdAndCryptShared || this.cryptSharedLibVersionInfo) {
+ return;
+ }
+ if (!this._mongocryptdManager) {
+ throw new error_1.MongoRuntimeError('Reached impossible state: mongocryptdManager is undefined when neither bypassSpawn nor the shared lib are specified.');
+ }
+ if (!this._mongocryptdClient) {
+ throw new error_1.MongoRuntimeError('Reached impossible state: mongocryptdClient is undefined when neither bypassSpawn nor the shared lib are specified.');
+ }
+ if (!this._mongocryptdManager.bypassSpawn) {
+ await this._mongocryptdManager.spawn();
+ }
+ try {
+ const client = await this._mongocryptdClient.connect();
+ return client;
+ }
+ catch (error) {
+ const { message } = error;
+ if (message && (message.match(/timed out after/) || message.match(/ENOTFOUND/))) {
+ throw new error_1.MongoRuntimeError('Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn', { cause: error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Cleans up the `_mongocryptdClient`, if present.
+ */
+ async teardown(force) {
+ await this._mongocryptdClient?.close(force);
+ }
+ /**
+ * Encrypt a command for a given namespace.
+ */
+ async encrypt(ns, cmd, options = {}) {
+ if (this._bypassEncryption) {
+ // If `bypassAutoEncryption` has been specified, don't encrypt
+ return cmd;
+ }
+ const commandBuffer = Buffer.isBuffer(cmd) ? cmd : (0, bson_1.serialize)(cmd, options);
+ const context = this._mongocrypt.makeEncryptionContext(utils_1.MongoDBCollectionNamespace.fromString(ns).db, commandBuffer);
+ context.id = this._contextCounter++;
+ context.ns = ns;
+ context.document = cmd;
+ const stateMachine = new state_machine_1.StateMachine({
+ promoteValues: false,
+ promoteLongs: false,
+ proxyOptions: this._proxyOptions,
+ tlsOptions: this._tlsOptions
+ });
+ return await stateMachine.execute(this, context);
+ }
+ /**
+ * Decrypt a command response
+ */
+ async decrypt(response, options = {}) {
+ const buffer = Buffer.isBuffer(response) ? response : (0, bson_1.serialize)(response, options);
+ const context = this._mongocrypt.makeDecryptionContext(buffer);
+ context.id = this._contextCounter++;
+ const stateMachine = new state_machine_1.StateMachine({
+ ...options,
+ proxyOptions: this._proxyOptions,
+ tlsOptions: this._tlsOptions
+ });
+ const decorateResult = this[kDecorateResult];
+ const result = await stateMachine.execute(this, context);
+ if (decorateResult) {
+ decorateDecryptionResult(result, response);
+ }
+ return result;
+ }
+ /**
+ * Ask the user for KMS credentials.
+ *
+ * This returns anything that looks like the kmsProviders original input
+ * option. It can be empty, and any provider specified here will override
+ * the original ones.
+ */
+ async askForKMSCredentials() {
+ return await (0, providers_1.refreshKMSCredentials)(this._kmsProviders);
+ }
+ /**
+ * Return the current libmongocrypt's CSFLE shared library version
+ * as `{ version: bigint, versionStr: string }`, or `null` if no CSFLE
+ * shared library was loaded.
+ */
+ get cryptSharedLibVersionInfo() {
+ return this._mongocrypt.cryptSharedLibVersionInfo;
+ }
+ static get libmongocryptVersion() {
+ return AutoEncrypter.getMongoCrypt().libmongocryptVersion;
+ }
+}
+exports.AutoEncrypter = AutoEncrypter;
+_a = kDecorateResult;
+/**
+ * Recurse through the (identically-shaped) `decrypted` and `original`
+ * objects and attach a `decryptedKeys` property on each sub-object that
+ * contained encrypted fields. Because we only call this on BSON responses,
+ * we do not need to worry about circular references.
+ *
+ * @internal
+ */
+function decorateDecryptionResult(decrypted, original, isTopLevelDecorateCall = true) {
+ if (isTopLevelDecorateCall) {
+ // The original value could have been either a JS object or a BSON buffer
+ if (Buffer.isBuffer(original)) {
+ original = (0, bson_1.deserialize)(original);
+ }
+ if (Buffer.isBuffer(decrypted)) {
+ throw new error_1.MongoRuntimeError('Expected result of decryption to be deserialized BSON object');
+ }
+ }
+ if (!decrypted || typeof decrypted !== 'object')
+ return;
+ for (const k of Object.keys(decrypted)) {
+ const originalValue = original[k];
+ // An object was decrypted by libmongocrypt if and only if it was
+ // a BSON Binary object with subtype 6.
+ if (originalValue && originalValue._bsontype === 'Binary' && originalValue.sub_type === 6) {
+ if (!decrypted[kDecoratedKeys]) {
+ Object.defineProperty(decrypted, kDecoratedKeys, {
+ value: [],
+ configurable: true,
+ enumerable: false,
+ writable: false
+ });
+ }
+ // this is defined in the preceding if-statement
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ decrypted[kDecoratedKeys].push(k);
+ // Do not recurse into this decrypted value. It could be a sub-document/array,
+ // in which case there is no original value associated with its subfields.
+ continue;
+ }
+ decorateDecryptionResult(decrypted[k], originalValue, false);
+ }
+}
+//# sourceMappingURL=auto_encrypter.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js.map
new file mode 100644
index 000000000..c8a24d8ce
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auto_encrypter.js","sourceRoot":"","sources":["../../src/client-side-encryption/auto_encrypter.ts"],"names":[],"mappings":";;;;AAMA,kCAAgE;AAEhE,kCAAqD;AACrD,oCAA6C;AAC7C,kDAAuE;AACvE,oCAAsD;AACtD,sDAAsD;AACtD,qCAA0D;AAC1D,+DAA2D;AAC3D,2CAAuE;AACvE,mDAAwE;AA8KxE,cAAc;AACD,QAAA,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,CAAC;IACb,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;CACA,CAAC,CAAC;AAiBZ,mEAAmE;AACnE,wEAAwE;AACxE,uEAAuE;AACvE,UAAU;AACV,gBAAgB;AAChB,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;A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,8EAA8E;YAC9E,0EAA0E;YAC1E,SAAS;SACV;QAED,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;KAC9D;AACH,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/client_encryption.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/client_encryption.js
new file mode 100644
index 000000000..c5e316040
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/client_encryption.js
@@ -0,0 +1,555 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ClientEncryption = void 0;
+const bson_1 = require("../bson");
+const deps_1 = require("../deps");
+const utils_1 = require("../utils");
+const cryptoCallbacks = require("./crypto_callbacks");
+const errors_1 = require("./errors");
+const index_1 = require("./providers/index");
+const state_machine_1 = require("./state_machine");
+/**
+ * @public
+ * The public interface for explicit in-use encryption
+ */
+class ClientEncryption {
+ /** @internal */
+ static getMongoCrypt() {
+ const encryption = (0, deps_1.getMongoDBClientEncryption)();
+ if ('kModuleError' in encryption) {
+ throw encryption.kModuleError;
+ }
+ return encryption.MongoCrypt;
+ }
+ /**
+ * Create a new encryption instance
+ *
+ * @example
+ * ```ts
+ * new ClientEncryption(mongoClient, {
+ * keyVaultNamespace: 'client.encryption',
+ * kmsProviders: {
+ * local: {
+ * key: masterKey // The master key used for encryption/decryption. A 96-byte long Buffer
+ * }
+ * }
+ * });
+ * ```
+ *
+ * @example
+ * ```ts
+ * new ClientEncryption(mongoClient, {
+ * keyVaultNamespace: 'client.encryption',
+ * kmsProviders: {
+ * aws: {
+ * accessKeyId: AWS_ACCESS_KEY,
+ * secretAccessKey: AWS_SECRET_KEY
+ * }
+ * }
+ * });
+ * ```
+ */
+ constructor(client, options) {
+ this._client = client;
+ this._proxyOptions = options.proxyOptions ?? {};
+ this._tlsOptions = options.tlsOptions ?? {};
+ this._kmsProviders = options.kmsProviders || {};
+ if (options.keyVaultNamespace == null) {
+ throw new errors_1.MongoCryptInvalidArgumentError('Missing required option `keyVaultNamespace`');
+ }
+ const mongoCryptOptions = {
+ ...options,
+ cryptoCallbacks,
+ kmsProviders: !Buffer.isBuffer(this._kmsProviders)
+ ? (0, bson_1.serialize)(this._kmsProviders)
+ : this._kmsProviders
+ };
+ this._keyVaultNamespace = options.keyVaultNamespace;
+ this._keyVaultClient = options.keyVaultClient || client;
+ const MongoCrypt = ClientEncryption.getMongoCrypt();
+ this._mongoCrypt = new MongoCrypt(mongoCryptOptions);
+ }
+ /**
+ * Creates a data key used for explicit encryption and inserts it into the key vault namespace
+ *
+ * @example
+ * ```ts
+ * // Using async/await to create a local key
+ * const dataKeyId = await clientEncryption.createDataKey('local');
+ * ```
+ *
+ * @example
+ * ```ts
+ * // Using async/await to create an aws key
+ * const dataKeyId = await clientEncryption.createDataKey('aws', {
+ * masterKey: {
+ * region: 'us-east-1',
+ * key: 'xxxxxxxxxxxxxx' // CMK ARN here
+ * }
+ * });
+ * ```
+ *
+ * @example
+ * ```ts
+ * // Using async/await to create an aws key with a keyAltName
+ * const dataKeyId = await clientEncryption.createDataKey('aws', {
+ * masterKey: {
+ * region: 'us-east-1',
+ * key: 'xxxxxxxxxxxxxx' // CMK ARN here
+ * },
+ * keyAltNames: [ 'mySpecialKey' ]
+ * });
+ * ```
+ */
+ async createDataKey(provider, options = {}) {
+ if (options.keyAltNames && !Array.isArray(options.keyAltNames)) {
+ throw new errors_1.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but was of type ${typeof options.keyAltNames}.`);
+ }
+ let keyAltNames = undefined;
+ if (options.keyAltNames && options.keyAltNames.length > 0) {
+ keyAltNames = options.keyAltNames.map((keyAltName, i) => {
+ if (typeof keyAltName !== 'string') {
+ throw new errors_1.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but item at index ${i} was of type ${typeof keyAltName}`);
+ }
+ return (0, bson_1.serialize)({ keyAltName });
+ });
+ }
+ let keyMaterial = undefined;
+ if (options.keyMaterial) {
+ keyMaterial = (0, bson_1.serialize)({ keyMaterial: options.keyMaterial });
+ }
+ const dataKeyBson = (0, bson_1.serialize)({
+ provider,
+ ...options.masterKey
+ });
+ const context = this._mongoCrypt.makeDataKeyContext(dataKeyBson, {
+ keyAltNames,
+ keyMaterial
+ });
+ const stateMachine = new state_machine_1.StateMachine({
+ proxyOptions: this._proxyOptions,
+ tlsOptions: this._tlsOptions
+ });
+ const dataKey = await stateMachine.execute(this, context);
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ const { insertedId } = await this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .insertOne(dataKey, { writeConcern: { w: 'majority' } });
+ return insertedId;
+ }
+ /**
+ * Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.
+ *
+ * If no matches are found, then no bulk write is performed.
+ *
+ * @example
+ * ```ts
+ * // rewrapping all data data keys (using a filter that matches all documents)
+ * const filter = {};
+ *
+ * const result = await clientEncryption.rewrapManyDataKey(filter);
+ * if (result.bulkWriteResult != null) {
+ * // keys were re-wrapped, results will be available in the bulkWrite object.
+ * }
+ * ```
+ *
+ * @example
+ * ```ts
+ * // attempting to rewrap all data keys with no matches
+ * const filter = { _id: new Binary() } // assume _id matches no documents in the database
+ * const result = await clientEncryption.rewrapManyDataKey(filter);
+ *
+ * if (result.bulkWriteResult == null) {
+ * // no keys matched, `bulkWriteResult` does not exist on the result object
+ * }
+ * ```
+ */
+ async rewrapManyDataKey(filter, options) {
+ let keyEncryptionKeyBson = undefined;
+ if (options) {
+ const keyEncryptionKey = Object.assign({ provider: options.provider }, options.masterKey);
+ keyEncryptionKeyBson = (0, bson_1.serialize)(keyEncryptionKey);
+ }
+ const filterBson = (0, bson_1.serialize)(filter);
+ const context = this._mongoCrypt.makeRewrapManyDataKeyContext(filterBson, keyEncryptionKeyBson);
+ const stateMachine = new state_machine_1.StateMachine({
+ proxyOptions: this._proxyOptions,
+ tlsOptions: this._tlsOptions
+ });
+ const { v: dataKeys } = await stateMachine.execute(this, context);
+ if (dataKeys.length === 0) {
+ return {};
+ }
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ const replacements = dataKeys.map((key) => ({
+ updateOne: {
+ filter: { _id: key._id },
+ update: {
+ $set: {
+ masterKey: key.masterKey,
+ keyMaterial: key.keyMaterial
+ },
+ $currentDate: {
+ updateDate: true
+ }
+ }
+ }
+ }));
+ const result = await this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .bulkWrite(replacements, {
+ writeConcern: { w: 'majority' }
+ });
+ return { bulkWriteResult: result };
+ }
+ /**
+ * Deletes the key with the provided id from the keyvault, if it exists.
+ *
+ * @example
+ * ```ts
+ * // delete a key by _id
+ * const id = new Binary(); // id is a bson binary subtype 4 object
+ * const { deletedCount } = await clientEncryption.deleteKey(id);
+ *
+ * if (deletedCount != null && deletedCount > 0) {
+ * // successful deletion
+ * }
+ * ```
+ *
+ */
+ async deleteKey(_id) {
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ return await this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .deleteOne({ _id }, { writeConcern: { w: 'majority' } });
+ }
+ /**
+ * Finds all the keys currently stored in the keyvault.
+ *
+ * This method will not throw.
+ *
+ * @returns a FindCursor over all keys in the keyvault.
+ * @example
+ * ```ts
+ * // fetching all keys
+ * const keys = await clientEncryption.getKeys().toArray();
+ * ```
+ */
+ getKeys() {
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ return this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .find({}, { readConcern: { level: 'majority' } });
+ }
+ /**
+ * Finds a key in the keyvault with the specified _id.
+ *
+ * Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
+ * match the id. The promise rejects with an error if an error is thrown.
+ * @example
+ * ```ts
+ * // getting a key by id
+ * const id = new Binary(); // id is a bson binary subtype 4 object
+ * const key = await clientEncryption.getKey(id);
+ * if (!key) {
+ * // key is null if there was no matching key
+ * }
+ * ```
+ */
+ async getKey(_id) {
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ return await this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .findOne({ _id }, { readConcern: { level: 'majority' } });
+ }
+ /**
+ * Finds a key in the keyvault which has the specified keyAltName.
+ *
+ * @param keyAltName - a keyAltName to search for a key
+ * @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
+ * match the keyAltName. The promise rejects with an error if an error is thrown.
+ * @example
+ * ```ts
+ * // get a key by alt name
+ * const keyAltName = 'keyAltName';
+ * const key = await clientEncryption.getKeyByAltName(keyAltName);
+ * if (!key) {
+ * // key is null if there is no matching key
+ * }
+ * ```
+ */
+ async getKeyByAltName(keyAltName) {
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ return await this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .findOne({ keyAltNames: keyAltName }, { readConcern: { level: 'majority' } });
+ }
+ /**
+ * Adds a keyAltName to a key identified by the provided _id.
+ *
+ * This method resolves to/returns the *old* key value (prior to adding the new altKeyName).
+ *
+ * @param _id - The id of the document to update.
+ * @param keyAltName - a keyAltName to search for a key
+ * @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
+ * match the id. The promise rejects with an error if an error is thrown.
+ * @example
+ * ```ts
+ * // adding an keyAltName to a data key
+ * const id = new Binary(); // id is a bson binary subtype 4 object
+ * const keyAltName = 'keyAltName';
+ * const oldKey = await clientEncryption.addKeyAltName(id, keyAltName);
+ * if (!oldKey) {
+ * // null is returned if there is no matching document with an id matching the supplied id
+ * }
+ * ```
+ */
+ async addKeyAltName(_id, keyAltName) {
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ const value = await this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .findOneAndUpdate({ _id }, { $addToSet: { keyAltNames: keyAltName } }, { writeConcern: { w: 'majority' }, returnDocument: 'before' });
+ return value;
+ }
+ /**
+ * Adds a keyAltName to a key identified by the provided _id.
+ *
+ * This method resolves to/returns the *old* key value (prior to removing the new altKeyName).
+ *
+ * If the removed keyAltName is the last keyAltName for that key, the `altKeyNames` property is unset from the document.
+ *
+ * @param _id - The id of the document to update.
+ * @param keyAltName - a keyAltName to search for a key
+ * @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
+ * match the id. The promise rejects with an error if an error is thrown.
+ * @example
+ * ```ts
+ * // removing a key alt name from a data key
+ * const id = new Binary(); // id is a bson binary subtype 4 object
+ * const keyAltName = 'keyAltName';
+ * const oldKey = await clientEncryption.removeKeyAltName(id, keyAltName);
+ *
+ * if (!oldKey) {
+ * // null is returned if there is no matching document with an id matching the supplied id
+ * }
+ * ```
+ */
+ async removeKeyAltName(_id, keyAltName) {
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
+ const pipeline = [
+ {
+ $set: {
+ keyAltNames: {
+ $cond: [
+ {
+ $eq: ['$keyAltNames', [keyAltName]]
+ },
+ '$$REMOVE',
+ {
+ $filter: {
+ input: '$keyAltNames',
+ cond: {
+ $ne: ['$$this', keyAltName]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ];
+ const value = await this._keyVaultClient
+ .db(dbName)
+ .collection(collectionName)
+ .findOneAndUpdate({ _id }, pipeline, {
+ writeConcern: { w: 'majority' },
+ returnDocument: 'before'
+ });
+ return value;
+ }
+ /**
+ * A convenience method for creating an encrypted collection.
+ * This method will create data keys for any encryptedFields that do not have a `keyId` defined
+ * and then create a new collection with the full set of encryptedFields.
+ *
+ * @param db - A Node.js driver Db object with which to create the collection
+ * @param name - The name of the collection to be created
+ * @param options - Options for createDataKey and for createCollection
+ * @returns created collection and generated encryptedFields
+ * @throws MongoCryptCreateDataKeyError - If part way through the process a createDataKey invocation fails, an error will be rejected that has the partial `encryptedFields` that were created.
+ * @throws MongoCryptCreateEncryptedCollectionError - If creating the collection fails, an error will be rejected that has the entire `encryptedFields` that were created.
+ */
+ async createEncryptedCollection(db, name, options) {
+ const { provider, masterKey, createCollectionOptions: { encryptedFields: { ...encryptedFields }, ...createCollectionOptions } } = options;
+ if (Array.isArray(encryptedFields.fields)) {
+ const createDataKeyPromises = encryptedFields.fields.map(async (field) => field == null || typeof field !== 'object' || field.keyId != null
+ ? field
+ : {
+ ...field,
+ keyId: await this.createDataKey(provider, { masterKey })
+ });
+ const createDataKeyResolutions = await Promise.allSettled(createDataKeyPromises);
+ encryptedFields.fields = createDataKeyResolutions.map((resolution, index) => resolution.status === 'fulfilled' ? resolution.value : encryptedFields.fields[index]);
+ const rejection = createDataKeyResolutions.find((result) => result.status === 'rejected');
+ if (rejection != null) {
+ throw new errors_1.MongoCryptCreateDataKeyError(encryptedFields, { cause: rejection.reason });
+ }
+ }
+ try {
+ const collection = await db.createCollection(name, {
+ ...createCollectionOptions,
+ encryptedFields
+ });
+ return { collection, encryptedFields };
+ }
+ catch (cause) {
+ throw new errors_1.MongoCryptCreateEncryptedCollectionError(encryptedFields, { cause });
+ }
+ }
+ /**
+ * Explicitly encrypt a provided value. Note that either `options.keyId` or `options.keyAltName` must
+ * be specified. Specifying both `options.keyId` and `options.keyAltName` is considered an error.
+ *
+ * @param value - The value that you wish to serialize. Must be of a type that can be serialized into BSON
+ * @param options -
+ * @returns a Promise that either resolves with the encrypted value, or rejects with an error.
+ *
+ * @example
+ * ```ts
+ * // Encryption with async/await api
+ * async function encryptMyData(value) {
+ * const keyId = await clientEncryption.createDataKey('local');
+ * return clientEncryption.encrypt(value, { keyId, algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
+ * }
+ * ```
+ *
+ * @example
+ * ```ts
+ * // Encryption using a keyAltName
+ * async function encryptMyData(value) {
+ * await clientEncryption.createDataKey('local', { keyAltNames: 'mySpecialKey' });
+ * return clientEncryption.encrypt(value, { keyAltName: 'mySpecialKey', algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
+ * }
+ * ```
+ */
+ async encrypt(value, options) {
+ return await this._encrypt(value, false, options);
+ }
+ /**
+ * Encrypts a Match Expression or Aggregate Expression to query a range index.
+ *
+ * Only supported when queryType is "rangePreview" and algorithm is "RangePreview".
+ *
+ * @experimental The Range algorithm is experimental only. It is not intended for production use. It is subject to breaking changes.
+ *
+ * @param expression - a BSON document of one of the following forms:
+ * 1. A Match Expression of this form:
+ * `{$and: [{: {$gt: }}, {: {$lt: }}]}`
+ * 2. An Aggregate Expression of this form:
+ * `{$and: [{$gt: [, ]}, {$lt: [, ]}]}`
+ *
+ * `$gt` may also be `$gte`. `$lt` may also be `$lte`.
+ *
+ * @param options -
+ * @returns Returns a Promise that either resolves with the encrypted value or rejects with an error.
+ */
+ async encryptExpression(expression, options) {
+ return await this._encrypt(expression, true, options);
+ }
+ /**
+ * Explicitly decrypt a provided encrypted value
+ *
+ * @param value - An encrypted value
+ * @returns a Promise that either resolves with the decrypted value, or rejects with an error
+ *
+ * @example
+ * ```ts
+ * // Decrypting value with async/await API
+ * async function decryptMyValue(value) {
+ * return clientEncryption.decrypt(value);
+ * }
+ * ```
+ */
+ async decrypt(value) {
+ const valueBuffer = (0, bson_1.serialize)({ v: value });
+ const context = this._mongoCrypt.makeExplicitDecryptionContext(valueBuffer);
+ const stateMachine = new state_machine_1.StateMachine({
+ proxyOptions: this._proxyOptions,
+ tlsOptions: this._tlsOptions
+ });
+ const { v } = await stateMachine.execute(this, context);
+ return v;
+ }
+ /**
+ * @internal
+ * Ask the user for KMS credentials.
+ *
+ * This returns anything that looks like the kmsProviders original input
+ * option. It can be empty, and any provider specified here will override
+ * the original ones.
+ */
+ async askForKMSCredentials() {
+ return await (0, index_1.refreshKMSCredentials)(this._kmsProviders);
+ }
+ static get libmongocryptVersion() {
+ return ClientEncryption.getMongoCrypt().libmongocryptVersion;
+ }
+ /**
+ * @internal
+ * A helper that perform explicit encryption of values and expressions.
+ * Explicitly encrypt a provided value. Note that either `options.keyId` or `options.keyAltName` must
+ * be specified. Specifying both `options.keyId` and `options.keyAltName` is considered an error.
+ *
+ * @param value - The value that you wish to encrypt. Must be of a type that can be serialized into BSON
+ * @param expressionMode - a boolean that indicates whether or not to encrypt the value as an expression
+ * @param options - options to pass to encrypt
+ * @returns the raw result of the call to stateMachine.execute(). When expressionMode is set to true, the return
+ * value will be a bson document. When false, the value will be a BSON Binary.
+ *
+ */
+ async _encrypt(value, expressionMode, options) {
+ const { algorithm, keyId, keyAltName, contentionFactor, queryType, rangeOptions } = options;
+ const contextOptions = {
+ expressionMode,
+ algorithm
+ };
+ if (keyId) {
+ contextOptions.keyId = keyId.buffer;
+ }
+ if (keyAltName) {
+ if (keyId) {
+ throw new errors_1.MongoCryptInvalidArgumentError(`"options" cannot contain both "keyId" and "keyAltName"`);
+ }
+ if (typeof keyAltName !== 'string') {
+ throw new errors_1.MongoCryptInvalidArgumentError(`"options.keyAltName" must be of type string, but was of type ${typeof keyAltName}`);
+ }
+ contextOptions.keyAltName = (0, bson_1.serialize)({ keyAltName });
+ }
+ if (typeof contentionFactor === 'number' || typeof contentionFactor === 'bigint') {
+ contextOptions.contentionFactor = contentionFactor;
+ }
+ if (typeof queryType === 'string') {
+ contextOptions.queryType = queryType;
+ }
+ if (typeof rangeOptions === 'object') {
+ contextOptions.rangeOptions = (0, bson_1.serialize)(rangeOptions);
+ }
+ const valueBuffer = (0, bson_1.serialize)({ v: value });
+ const stateMachine = new state_machine_1.StateMachine({
+ proxyOptions: this._proxyOptions,
+ tlsOptions: this._tlsOptions
+ });
+ const context = this._mongoCrypt.makeExplicitEncryptionContext(valueBuffer, contextOptions);
+ const result = await stateMachine.execute(this, context);
+ return result.v;
+ }
+}
+exports.ClientEncryption = ClientEncryption;
+//# sourceMappingURL=client_encryption.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/client_encryption.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/client_encryption.js.map
new file mode 100644
index 000000000..269664e3f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/client_encryption.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"client_encryption.js","sourceRoot":"","sources":["../../src/client-side-encryption/client_encryption.ts"],"names":[],"mappings":";;;AAOA,kCAAsF;AAMtF,kCAAqD;AAKrD,oCAAsD;AACtD,sDAAsD;AACtD,qCAIkB;AAClB,6CAI2B;AAC3B,mDAAwE;AAiBxE;;;GAGG;AACH,MAAa,gBAAgB;IAiB3B,gBAAgB;IAChB,MAAM,CAAC,aAAa;QAClB,MAAM,UAAU,GAAG,IAAA,iCAA0B,GAAE,CAAC;QAChD,IAAI,cAAc,IAAI,UAAU,EAAE;YAChC,MAAM,UAAU,CAAC,YAAY,CAAC;SAC/B;QACD,OAAO,UAAU,CAAC,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAY,MAAmB,EAAE,OAAgC;QAC/D,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;QAEhD,IAAI,OAAO,CAAC,iBAAiB,IAAI,IAAI,EAAE;YACrC,MAAM,IAAI,uCAA8B,CAAC,6CAA6C,CAAC,CAAC;SACzF;QAED,MAAM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CACtC,wDAAwD,CACzD,CAAC;aACH;YACD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;gBAClC,MAAM,IAAI,uCAA8B,CACtC,gEAAgE,OAAO,UAAU,EAAE,CACpF,CAAC;aACH;YAED,cAAc,CAAC,UAAU,GAAG,IAAA,gBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,CAAC;SACvD;QACD,IAAI,OAAO,gBAAgB,KAAK,QAAQ,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE;YAChF,cAAc,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;SACpD;QACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;YACjC,cAAc,CAAC,SAAS,GAAG,SAAS,CAAC;SACtC;QAED,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE;YACpC,cAAc,CAAC,YAAY,GAAG,IAAA,gBAAS,EAAC,YAAY,CAAC,CAAC;SACvD;QAED,MAAM,WAAW,GAAG,IAAA,gBAAS,EAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5C,MAAM,YAAY,GAAG,IAAI,4BAAY,CAAC;YACpC,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAE5F,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,OAAO,CAAgB,IAAI,EAAE,OAAO,CAAC,CAAC;QACxE,OAAO,MAAM,CAAC,CAAC,CAAC;IAClB,CAAC;CACF;AAjqBD,4CAiqBC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js
new file mode 100644
index 000000000..acdb2c736
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js
@@ -0,0 +1,81 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.hmacSha256Hook = exports.hmacSha512Hook = exports.aes256CtrDecryptHook = exports.aes256CtrEncryptHook = exports.aes256CbcDecryptHook = exports.aes256CbcEncryptHook = exports.signRsaSha256Hook = exports.makeHmacHook = exports.sha256Hook = exports.randomHook = exports.makeAES256Hook = void 0;
+const crypto = require("crypto");
+function makeAES256Hook(method, mode) {
+ return function (key, iv, input, output) {
+ let result;
+ try {
+ const cipher = crypto[method](mode, key, iv);
+ cipher.setAutoPadding(false);
+ result = cipher.update(input);
+ const final = cipher.final();
+ if (final.length > 0) {
+ result = Buffer.concat([result, final]);
+ }
+ }
+ catch (e) {
+ return e;
+ }
+ result.copy(output);
+ return result.length;
+ };
+}
+exports.makeAES256Hook = makeAES256Hook;
+function randomHook(buffer, count) {
+ try {
+ crypto.randomFillSync(buffer, 0, count);
+ }
+ catch (e) {
+ return e;
+ }
+ return count;
+}
+exports.randomHook = randomHook;
+function sha256Hook(input, output) {
+ let result;
+ try {
+ result = crypto.createHash('sha256').update(input).digest();
+ }
+ catch (e) {
+ return e;
+ }
+ result.copy(output);
+ return result.length;
+}
+exports.sha256Hook = sha256Hook;
+function makeHmacHook(algorithm) {
+ return (key, input, output) => {
+ let result;
+ try {
+ result = crypto.createHmac(algorithm, key).update(input).digest();
+ }
+ catch (e) {
+ return e;
+ }
+ result.copy(output);
+ return result.length;
+ };
+}
+exports.makeHmacHook = makeHmacHook;
+function signRsaSha256Hook(key, input, output) {
+ let result;
+ try {
+ const signer = crypto.createSign('sha256WithRSAEncryption');
+ const privateKey = Buffer.from(`-----BEGIN PRIVATE KEY-----\n${key.toString('base64')}\n-----END PRIVATE KEY-----\n`);
+ result = signer.update(input).end().sign(privateKey);
+ }
+ catch (e) {
+ return e;
+ }
+ result.copy(output);
+ return result.length;
+}
+exports.signRsaSha256Hook = signRsaSha256Hook;
+exports.aes256CbcEncryptHook = makeAES256Hook('createCipheriv', 'aes-256-cbc');
+exports.aes256CbcDecryptHook = makeAES256Hook('createDecipheriv', 'aes-256-cbc');
+exports.aes256CtrEncryptHook = makeAES256Hook('createCipheriv', 'aes-256-ctr');
+exports.aes256CtrDecryptHook = makeAES256Hook('createDecipheriv', 'aes-256-ctr');
+exports.hmacSha512Hook = makeHmacHook('sha512');
+exports.hmacSha256Hook = makeHmacHook('sha256');
+//# sourceMappingURL=crypto_callbacks.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js.map
new file mode 100644
index 000000000..50a31385a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"crypto_callbacks.js","sourceRoot":"","sources":["../../src/client-side-encryption/crypto_callbacks.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAIjC,SAAgB,cAAc,CAC5B,MAA6C,EAC7C,IAAmC;IAEnC,OAAO,UAAU,GAAW,EAAE,EAAU,EAAE,KAAa,EAAE,MAAc;QACrE,IAAI,MAAM,CAAC;QAEX,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;YAC7C,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YAC7B,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC9B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;YAC7B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBACpB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;aACzC;SACF;QAAC,OAAO,CAAC,EAAE;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E,IAAI,MAAM,CAAC;IACX,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAC5B,gCAAgC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,+BAA+B,CACtF,CAAC;QAEF,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACtD;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,CAAC;KACV;IAED,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,CAAC;AAfD,8CAeC;AAEY,QAAA,oBAAoB,GAAG,cAAc,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AACvE,QAAA,oBAAoB,GAAG,cAAc,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AACzE,QAAA,oBAAoB,GAAG,cAAc,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AACvE,QAAA,oBAAoB,GAAG,cAAc,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AACzE,QAAA,cAAc,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AACxC,QAAA,cAAc,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/errors.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/errors.js
new file mode 100644
index 000000000..5d91e11e2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/errors.js
@@ -0,0 +1,136 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MongoCryptKMSRequestNetworkTimeoutError = exports.MongoCryptAzureKMSRequestError = exports.MongoCryptCreateEncryptedCollectionError = exports.MongoCryptCreateDataKeyError = exports.MongoCryptInvalidArgumentError = exports.MongoCryptError = void 0;
+const error_1 = require("../error");
+/**
+ * @public
+ * An error indicating that something went wrong specifically with MongoDB Client Encryption
+ */
+class MongoCryptError extends error_1.MongoError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(message, options = {}) {
+ super(message, options);
+ }
+ get name() {
+ return 'MongoCryptError';
+ }
+}
+exports.MongoCryptError = MongoCryptError;
+/**
+ * @public
+ *
+ * An error indicating an invalid argument was provided to an encryption API.
+ */
+class MongoCryptInvalidArgumentError extends MongoCryptError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(message) {
+ super(message);
+ }
+ get name() {
+ return 'MongoCryptInvalidArgumentError';
+ }
+}
+exports.MongoCryptInvalidArgumentError = MongoCryptInvalidArgumentError;
+/**
+ * @public
+ * An error indicating that `ClientEncryption.createEncryptedCollection()` failed to create data keys
+ */
+class MongoCryptCreateDataKeyError extends MongoCryptError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(encryptedFields, { cause }) {
+ super(`Unable to complete creating data keys: ${cause.message}`, { cause });
+ this.encryptedFields = encryptedFields;
+ }
+ get name() {
+ return 'MongoCryptCreateDataKeyError';
+ }
+}
+exports.MongoCryptCreateDataKeyError = MongoCryptCreateDataKeyError;
+/**
+ * @public
+ * An error indicating that `ClientEncryption.createEncryptedCollection()` failed to create a collection
+ */
+class MongoCryptCreateEncryptedCollectionError extends MongoCryptError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(encryptedFields, { cause }) {
+ super(`Unable to create collection: ${cause.message}`, { cause });
+ this.encryptedFields = encryptedFields;
+ }
+ get name() {
+ return 'MongoCryptCreateEncryptedCollectionError';
+ }
+}
+exports.MongoCryptCreateEncryptedCollectionError = MongoCryptCreateEncryptedCollectionError;
+/**
+ * @public
+ * An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials.
+ */
+class MongoCryptAzureKMSRequestError extends MongoCryptError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(message, body) {
+ super(message);
+ this.body = body;
+ }
+ get name() {
+ return 'MongoCryptAzureKMSRequestError';
+ }
+}
+exports.MongoCryptAzureKMSRequestError = MongoCryptAzureKMSRequestError;
+/** @public */
+class MongoCryptKMSRequestNetworkTimeoutError extends MongoCryptError {
+ get name() {
+ return 'MongoCryptKMSRequestNetworkTimeoutError';
+ }
+}
+exports.MongoCryptKMSRequestNetworkTimeoutError = MongoCryptKMSRequestNetworkTimeoutError;
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/errors.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/errors.js.map
new file mode 100644
index 000000000..4576ba255
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/errors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/client-side-encryption/errors.ts"],"names":[],"mappings":";;;AACA,oCAAsC;AAEtC;;;GAGG;AAC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AAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,IAAa,IAAI;QACf,OAAO,gCAAgC,CAAC;IAC1C,CAAC;CACF;AAtBD,wEAsBC;AAED,cAAc;AACd,MAAa,uCAAwC,SAAQ,eAAe;IAC1E,IAAa,IAAI;QACf,OAAO,yCAAyC,CAAC;IACnD,CAAC;CACF;AAJD,0FAIC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js
new file mode 100644
index 000000000..a4d361ef6
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js
@@ -0,0 +1,81 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MongocryptdManager = void 0;
+const error_1 = require("../error");
+/**
+ * @internal
+ * An internal class that handles spawning a mongocryptd.
+ */
+class MongocryptdManager {
+ constructor(extraOptions = {}) {
+ this.uri =
+ typeof extraOptions.mongocryptdURI === 'string' && extraOptions.mongocryptdURI.length > 0
+ ? extraOptions.mongocryptdURI
+ : MongocryptdManager.DEFAULT_MONGOCRYPTD_URI;
+ this.bypassSpawn = !!extraOptions.mongocryptdBypassSpawn;
+ this.spawnPath = extraOptions.mongocryptdSpawnPath || '';
+ this.spawnArgs = [];
+ if (Array.isArray(extraOptions.mongocryptdSpawnArgs)) {
+ this.spawnArgs = this.spawnArgs.concat(extraOptions.mongocryptdSpawnArgs);
+ }
+ if (this.spawnArgs
+ .filter(arg => typeof arg === 'string')
+ .every(arg => arg.indexOf('--idleShutdownTimeoutSecs') < 0)) {
+ this.spawnArgs.push('--idleShutdownTimeoutSecs', '60');
+ }
+ }
+ /**
+ * Will check to see if a mongocryptd is up. If it is not up, it will attempt
+ * to spawn a mongocryptd in a detached process, and then wait for it to be up.
+ */
+ async spawn() {
+ const cmdName = this.spawnPath || 'mongocryptd';
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
+ const { spawn } = require('child_process');
+ // Spawned with stdio: ignore and detached: true
+ // to ensure child can outlive parent.
+ this._child = spawn(cmdName, this.spawnArgs, {
+ stdio: 'ignore',
+ detached: true
+ });
+ this._child.on('error', () => {
+ // From the FLE spec:
+ // "The stdout and stderr of the spawned process MUST not be exposed in the driver
+ // (e.g. redirect to /dev/null). Users can pass the argument --logpath to
+ // extraOptions.mongocryptdSpawnArgs if they need to inspect mongocryptd logs.
+ // If spawning is necessary, the driver MUST spawn mongocryptd whenever server
+ // selection on the MongoClient to mongocryptd fails. If the MongoClient fails to
+ // connect after spawning, the server selection error is propagated to the user."
+ // The AutoEncrypter and MongoCryptdManager should work together to spawn
+ // mongocryptd whenever necessary. Additionally, the `mongocryptd` intentionally
+ // shuts down after 60s and gets respawned when necessary. We rely on server
+ // selection timeouts when connecting to the `mongocryptd` to inform users that something
+ // has been configured incorrectly. For those reasons, we suppress stderr from
+ // the `mongocryptd` process and immediately unref the process.
+ });
+ // unref child to remove handle from event loop
+ this._child.unref();
+ }
+ /**
+ * @returns the result of `fn` or rejects with an error.
+ */
+ async withRespawn(fn) {
+ try {
+ const result = await fn();
+ return result;
+ }
+ catch (err) {
+ // If we are not bypassing spawning, then we should retry once on a MongoTimeoutError (server selection error)
+ const shouldSpawn = err instanceof error_1.MongoNetworkTimeoutError && !this.bypassSpawn;
+ if (!shouldSpawn) {
+ throw err;
+ }
+ }
+ await this.spawn();
+ const result = await fn();
+ return result;
+ }
+}
+MongocryptdManager.DEFAULT_MONGOCRYPTD_URI = 'mongodb://localhost:27020';
+exports.MongocryptdManager = MongocryptdManager;
+//# sourceMappingURL=mongocryptd_manager.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js.map
new file mode 100644
index 000000000..cebcb9091
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mongocryptd_manager.js","sourceRoot":"","sources":["../../src/client-side-encryption/mongocryptd_manager.ts"],"names":[],"mappings":";;;AAEA,oCAAoD;AAGpD;;;GAGG;AACH,MAAa,kBAAkB;IAS7B,YAAY,eAA2C,EAAE;QACvD,IAAI,CAAC,GAAG;YACN,OAAO,YAAY,CAAC,cAAc,KAAK,QAAQ,IAAI,YAAY,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;gBACvF,CAAC,CAAC,YAAY,CAAC,cAAc;gBAC7B,CAAC,CAAC,kBAAkB,CAAC,uBAAuB,CAAC;QAEjD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC,sBAAsB,CAAC;QAEzD,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,oBAAoB,IAAI,EAAE,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,EAAE;YACpD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;SAC3E;QACD,IACE,IAAI,CAAC,SAAS;aACX,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC;aACtC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,2BAA2B,CAAC,GAAG,CAAC,CAAC,EAC7D;YACA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAC;SACxD;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK;QACT,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,IAAI,aAAa,CAAC;QAEhD,8DAA8D;QAC9D,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,eAAe,CAAmC,CAAC;QAE7E,gDAAgD;QAChD,sCAAsC;QACtC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YAC3C,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC3B,qBAAqB;YACrB,kFAAkF;YAClF,yEAAyE;YACzE,8EAA8E;YAC9E,8EAA8E;YAC9E,iFAAiF;YACjF,iFAAiF;YACjF,yEAAyE;YACzE,iFAAiF;YACjF,6EAA6E;YAC7E,yFAAyF;YACzF,+EAA+E;YAC/E,+DAA+D;QACjE,CAAC,CAAC,CAAC;QAEH,+CAA+C;QAC/C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CAAI,EAAoB;QACvC,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;YAC1B,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,8GAA8G;YAC9G,MAAM,WAAW,GAAG,GAAG,YAAY,gCAAwB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YACjF,IAAI,CAAC,WAAW,EAAE;gBAChB,MAAM,GAAG,CAAC;aACX;SACF;QACD,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC;IAChB,CAAC;;AApFM,0CAAuB,GAAG,2BAA2B,CAAC;AADlD,gDAAkB"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/aws.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/aws.js
new file mode 100644
index 000000000..35c988b19
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/aws.js
@@ -0,0 +1,24 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.loadAWSCredentials = void 0;
+const aws_temporary_credentials_1 = require("../../cmap/auth/aws_temporary_credentials");
+/**
+ * @internal
+ */
+async function loadAWSCredentials(kmsProviders) {
+ const credentialProvider = new aws_temporary_credentials_1.AWSSDKCredentialProvider();
+ // We shouldn't ever receive a response from the AWS SDK that doesn't have a `SecretAccessKey`
+ // or `AccessKeyId`. However, TS says these fields are optional. We provide empty strings
+ // and let libmongocrypt error if we're unable to fetch the required keys.
+ const { SecretAccessKey = '', AccessKeyId = '', Token } = await credentialProvider.getCredentials();
+ const aws = {
+ secretAccessKey: SecretAccessKey,
+ accessKeyId: AccessKeyId
+ };
+ // the AWS session token is only required for temporary credentials so only attach it to the
+ // result if it's present in the response from the aws sdk
+ Token != null && (aws.sessionToken = Token);
+ return { ...kmsProviders, aws };
+}
+exports.loadAWSCredentials = loadAWSCredentials;
+//# sourceMappingURL=aws.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/aws.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/aws.js.map
new file mode 100644
index 000000000..3fbb2ab5c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/aws.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"aws.js","sourceRoot":"","sources":["../../../src/client-side-encryption/providers/aws.ts"],"names":[],"mappings":";;;AAAA,yFAAqF;AAGrF;;GAEG;AACI,KAAK,UAAU,kBAAkB,CAAC,YAA0B;IACjE,MAAM,kBAAkB,GAAG,IAAI,oDAAwB,EAAE,CAAC;IAE1D,8FAA8F;IAC9F,2FAA2F;IAC3F,0EAA0E;IAC1E,MAAM,EACJ,eAAe,GAAG,EAAE,EACpB,WAAW,GAAG,EAAE,EAChB,KAAK,EACN,GAAG,MAAM,kBAAkB,CAAC,cAAc,EAAE,CAAC;IAC9C,MAAM,GAAG,GAAqC;QAC5C,eAAe,EAAE,eAAe;QAChC,WAAW,EAAE,WAAW;KACzB,CAAC;IACF,4FAA4F;IAC5F,0DAA0D;IAC1D,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;IAE5C,OAAO,EAAE,GAAG,YAAY,EAAE,GAAG,EAAE,CAAC;AAClC,CAAC;AApBD,gDAoBC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/azure.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/azure.js
new file mode 100644
index 000000000..cf0b69137
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/azure.js
@@ -0,0 +1,117 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.loadAzureCredentials = exports.fetchAzureKMSToken = exports.prepareRequest = exports.tokenCache = exports.AzureCredentialCache = void 0;
+const errors_1 = require("../errors");
+const utils_1 = require("./utils");
+const MINIMUM_TOKEN_REFRESH_IN_MILLISECONDS = 6000;
+/**
+ * @internal
+ */
+class AzureCredentialCache {
+ constructor() {
+ this.cachedToken = null;
+ }
+ async getToken() {
+ if (this.cachedToken == null || this.needsRefresh(this.cachedToken)) {
+ this.cachedToken = await this._getToken();
+ }
+ return { accessToken: this.cachedToken.accessToken };
+ }
+ needsRefresh(token) {
+ const timeUntilExpirationMS = token.expiresOnTimestamp - Date.now();
+ return timeUntilExpirationMS <= MINIMUM_TOKEN_REFRESH_IN_MILLISECONDS;
+ }
+ /**
+ * exposed for testing
+ */
+ resetCache() {
+ this.cachedToken = null;
+ }
+ /**
+ * exposed for testing
+ */
+ _getToken() {
+ return fetchAzureKMSToken();
+ }
+}
+exports.AzureCredentialCache = AzureCredentialCache;
+/** @internal */
+exports.tokenCache = new AzureCredentialCache();
+/** @internal */
+async function parseResponse(response) {
+ const { status, body: rawBody } = response;
+ const body = (() => {
+ try {
+ return JSON.parse(rawBody);
+ }
+ catch {
+ throw new errors_1.MongoCryptAzureKMSRequestError('Malformed JSON body in GET request.');
+ }
+ })();
+ if (status !== 200) {
+ throw new errors_1.MongoCryptAzureKMSRequestError('Unable to complete request.', body);
+ }
+ if (!body.access_token) {
+ throw new errors_1.MongoCryptAzureKMSRequestError('Malformed response body - missing field `access_token`.');
+ }
+ if (!body.expires_in) {
+ throw new errors_1.MongoCryptAzureKMSRequestError('Malformed response body - missing field `expires_in`.');
+ }
+ const expiresInMS = Number(body.expires_in) * 1000;
+ if (Number.isNaN(expiresInMS)) {
+ throw new errors_1.MongoCryptAzureKMSRequestError('Malformed response body - unable to parse int from `expires_in` field.');
+ }
+ return {
+ accessToken: body.access_token,
+ expiresOnTimestamp: Date.now() + expiresInMS
+ };
+}
+/**
+ * @internal
+ *
+ * parses any options provided by prose tests to `fetchAzureKMSToken` and merges them with
+ * the default values for headers and the request url.
+ */
+function prepareRequest(options) {
+ const url = new URL(options.url?.toString() ?? 'http://169.254.169.254/metadata/identity/oauth2/token');
+ url.searchParams.append('api-version', '2018-02-01');
+ url.searchParams.append('resource', 'https://vault.azure.net');
+ const headers = { ...options.headers, 'Content-Type': 'application/json', Metadata: true };
+ return { headers, url };
+}
+exports.prepareRequest = prepareRequest;
+/**
+ * @internal
+ *
+ * `AzureKMSRequestOptions` allows prose tests to modify the http request sent to the idms
+ * servers. This is required to simulate different server conditions. No options are expected to
+ * be set outside of tests.
+ *
+ * exposed for CSFLE
+ * [prose test 18](https://github.com/mongodb/specifications/tree/master/source/client-side-encryption/tests#azure-imds-credentials)
+ */
+async function fetchAzureKMSToken(options = {}) {
+ const { headers, url } = prepareRequest(options);
+ try {
+ const response = await (0, utils_1.get)(url, { headers });
+ return await parseResponse(response);
+ }
+ catch (error) {
+ if (error instanceof errors_1.MongoCryptKMSRequestNetworkTimeoutError) {
+ throw new errors_1.MongoCryptAzureKMSRequestError(`[Azure KMS] ${error.message}`);
+ }
+ throw error;
+ }
+}
+exports.fetchAzureKMSToken = fetchAzureKMSToken;
+/**
+ * @internal
+ *
+ * @throws Will reject with a `MongoCryptError` if the http request fails or the http response is malformed.
+ */
+async function loadAzureCredentials(kmsProviders) {
+ const azure = await exports.tokenCache.getToken();
+ return { ...kmsProviders, azure };
+}
+exports.loadAzureCredentials = loadAzureCredentials;
+//# sourceMappingURL=azure.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/azure.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/azure.js.map
new file mode 100644
index 000000000..9aed80a8c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/azure.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"azure.js","sourceRoot":"","sources":["../../../src/client-side-encryption/providers/azure.ts"],"names":[],"mappings":";;;AACA,sCAAoG;AAEpG,mCAA8B;AAE9B,MAAM,qCAAqC,GAAG,IAAI,CAAC;AAkBnD;;GAEG;AACH,MAAa,oBAAoB;IAAjC;QACE,gBAAW,GAAgC,IAAI,CAAC;IA4BlD,CAAC;IA1BC,KAAK,CAAC,QAAQ;QACZ,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACnE,IAAI,CAAC,WAAW,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;SAC3C;QAED,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IACvD,CAAC;IAED,YAAY,CAAC,KAA2B;QACtC,MAAM,qBAAqB,GAAG,KAAK,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACpE,OAAO,qBAAqB,IAAI,qCAAqC,CAAC;IACxE,CAAC;IAED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app-hard/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js
new file mode 100644
index 000000000..12c819d2b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js
@@ -0,0 +1,17 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.loadGCPCredentials = void 0;
+const deps_1 = require("../../deps");
+/** @internal */
+async function loadGCPCredentials(kmsProviders) {
+ const gcpMetadata = (0, deps_1.getGcpMetadata)();
+ if ('kModuleError' in gcpMetadata) {
+ return kmsProviders;
+ }
+ const { access_token: accessToken } = await gcpMetadata.instance({
+ property: 'service-accounts/default/token'
+ });
+ return { ...kmsProviders, gcp: { accessToken } };
+}
+exports.loadGCPCredentials = loadGCPCredentials;
+//# sourceMappingURL=gcp.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js.map
new file mode 100644
index 000000000..23b4106b5
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gcp.js","sourceRoot":"","sources":["../../../src/client-side-encryption/providers/gcp.ts"],"names":[],"mappings":";;;AAAA,qCAA4C;AAG5C,gBAAgB;AACT,KAAK,UAAU,kBAAkB,CAAC,YAA0B;IACjE,MAAM,WAAW,GAAG,IAAA,qBAAc,GAAE,CAAC;IAErC,IAAI,cAAc,IAAI,WAAW,EAAE;QACjC,OAAO,YAAY,CAAC;KACrB;IAED,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,WAAW,CAAC,QAAQ,CAA2B;QACzF,QAAQ,EAAE,gCAAgC;KAC3C,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,YAAY,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,EAAE,CAAC;AACnD,CAAC;AAXD,gDAWC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/index.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/index.js
new file mode 100644
index 000000000..f6bebbae3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/index.js
@@ -0,0 +1,44 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.refreshKMSCredentials = exports.isEmptyCredentials = void 0;
+const aws_1 = require("./aws");
+const azure_1 = require("./azure");
+const gcp_1 = require("./gcp");
+/**
+ * Auto credential fetching should only occur when the provider is defined on the kmsProviders map
+ * and the settings are an empty object.
+ *
+ * This is distinct from a nullish provider key.
+ *
+ * @internal - exposed for testing purposes only
+ */
+function isEmptyCredentials(providerName, kmsProviders) {
+ const provider = kmsProviders[providerName];
+ if (provider == null) {
+ return false;
+ }
+ return typeof provider === 'object' && Object.keys(provider).length === 0;
+}
+exports.isEmptyCredentials = isEmptyCredentials;
+/**
+ * Load cloud provider credentials for the user provided KMS providers.
+ * Credentials will only attempt to get loaded if they do not exist
+ * and no existing credentials will get overwritten.
+ *
+ * @internal
+ */
+async function refreshKMSCredentials(kmsProviders) {
+ let finalKMSProviders = kmsProviders;
+ if (isEmptyCredentials('aws', kmsProviders)) {
+ finalKMSProviders = await (0, aws_1.loadAWSCredentials)(finalKMSProviders);
+ }
+ if (isEmptyCredentials('gcp', kmsProviders)) {
+ finalKMSProviders = await (0, gcp_1.loadGCPCredentials)(finalKMSProviders);
+ }
+ if (isEmptyCredentials('azure', kmsProviders)) {
+ finalKMSProviders = await (0, azure_1.loadAzureCredentials)(finalKMSProviders);
+ }
+ return finalKMSProviders;
+}
+exports.refreshKMSCredentials = refreshKMSCredentials;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/index.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/index.js.map
new file mode 100644
index 000000000..f5aad1f58
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client-side-encryption/providers/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,mCAA+C;AAC/C,+BAA2C;AA4H3C;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAChC,YAA6C,EAC7C,YAA0B;IAE1B,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,QAAQ,IAAI,IAAI,EAAE;QACpB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,OAAO,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AAC5E,CAAC;AATD,gDASC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,qBAAqB,CAAC,YAA0B;IACpE,IAAI,iBAAiB,GAAG,YAAY,CAAC;IAErC,IAAI,kBAAkB,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE;QAC3C,iBAAiB,GAAG,MAAM,IAAA,wBAAkB,EAAC,iBAAiB,CAAC,CAAC;KACjE;IAED,IAAI,kBAAkB,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE;QAC3C,iBAAiB,GAAG,MAAM,IAAA,wBAAkB,EAAC,iBAAiB,CAAC,CAAC;KACjE;IAED,IAAI,kBAAkB,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE;QAC7C,iBAAiB,GAAG,MAAM,IAAA,4BAAoB,EAAC,iBAAiB,CAAC,CAAC;KACnE;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAfD,sDAeC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/utils.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/utils.js
new file mode 100644
index 000000000..c75b9692f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/utils.js
@@ -0,0 +1,35 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.get = void 0;
+const http = require("http");
+const timers_1 = require("timers");
+const errors_1 = require("../errors");
+/**
+ * @internal
+ */
+function get(url, options = {}) {
+ return new Promise((resolve, reject) => {
+ /* eslint-disable prefer-const */
+ let timeoutId;
+ const request = http
+ .get(url, options, response => {
+ response.setEncoding('utf8');
+ let body = '';
+ response.on('data', chunk => (body += chunk));
+ response.on('end', () => {
+ (0, timers_1.clearTimeout)(timeoutId);
+ resolve({ status: response.statusCode, body });
+ });
+ })
+ .on('error', error => {
+ (0, timers_1.clearTimeout)(timeoutId);
+ reject(error);
+ })
+ .end();
+ timeoutId = (0, timers_1.setTimeout)(() => {
+ request.destroy(new errors_1.MongoCryptKMSRequestNetworkTimeoutError(`request timed out after 10 seconds`));
+ }, 10000);
+ });
+}
+exports.get = get;
+//# sourceMappingURL=utils.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/utils.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/utils.js.map
new file mode 100644
index 000000000..e3aea6fd4
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/providers/utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/client-side-encryption/providers/utils.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,mCAAkD;AAElD,sCAAoE;AAEpE;;GAEG;AACH,SAAgB,GAAG,CACjB,GAAiB,EACjB,UAA+B,EAAE;IAEjC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,iCAAiC;QACjC,IAAI,SAAyB,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAI;aACjB,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE;YAC5B,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAC7B,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC;YAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACtB,IAAA,qBAAY,EAAC,SAAS,CAAC,CAAC;gBACxB,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YACnB,IAAA,qBAAY,EAAC,SAAS,CAAC,CAAC;YACxB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC;aACD,GAAG,EAAE,CAAC;QACT,SAAS,GAAG,IAAA,mBAAU,EAAC,GAAG,EAAE;YAC1B,OAAO,CAAC,OAAO,CACb,IAAI,gDAAuC,CAAC,oCAAoC,CAAC,CAClF,CAAC;QACJ,CAAC,EAAE,KAAK,CAAC,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC;AA5BD,kBA4BC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/state_machine.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/state_machine.js
new file mode 100644
index 000000000..74a3a8760
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/state_machine.js
@@ -0,0 +1,369 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StateMachine = void 0;
+const fs = require("fs/promises");
+const net = require("net");
+const tls = require("tls");
+const bson_1 = require("../bson");
+const deps_1 = require("../deps");
+const utils_1 = require("../utils");
+const errors_1 = require("./errors");
+let socks = null;
+function loadSocks() {
+ if (socks == null) {
+ const socksImport = (0, deps_1.getSocks)();
+ if ('kModuleError' in socksImport) {
+ throw socksImport.kModuleError;
+ }
+ socks = socksImport;
+ }
+ return socks;
+}
+// libmongocrypt states
+const MONGOCRYPT_CTX_ERROR = 0;
+const MONGOCRYPT_CTX_NEED_MONGO_COLLINFO = 1;
+const MONGOCRYPT_CTX_NEED_MONGO_MARKINGS = 2;
+const MONGOCRYPT_CTX_NEED_MONGO_KEYS = 3;
+const MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS = 7;
+const MONGOCRYPT_CTX_NEED_KMS = 4;
+const MONGOCRYPT_CTX_READY = 5;
+const MONGOCRYPT_CTX_DONE = 6;
+const HTTPS_PORT = 443;
+const stateToString = new Map([
+ [MONGOCRYPT_CTX_ERROR, 'MONGOCRYPT_CTX_ERROR'],
+ [MONGOCRYPT_CTX_NEED_MONGO_COLLINFO, 'MONGOCRYPT_CTX_NEED_MONGO_COLLINFO'],
+ [MONGOCRYPT_CTX_NEED_MONGO_MARKINGS, 'MONGOCRYPT_CTX_NEED_MONGO_MARKINGS'],
+ [MONGOCRYPT_CTX_NEED_MONGO_KEYS, 'MONGOCRYPT_CTX_NEED_MONGO_KEYS'],
+ [MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS, 'MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS'],
+ [MONGOCRYPT_CTX_NEED_KMS, 'MONGOCRYPT_CTX_NEED_KMS'],
+ [MONGOCRYPT_CTX_READY, 'MONGOCRYPT_CTX_READY'],
+ [MONGOCRYPT_CTX_DONE, 'MONGOCRYPT_CTX_DONE']
+]);
+const INSECURE_TLS_OPTIONS = [
+ 'tlsInsecure',
+ 'tlsAllowInvalidCertificates',
+ 'tlsAllowInvalidHostnames',
+ // These options are disallowed by the spec, so we explicitly filter them out if provided, even
+ // though the StateMachine does not declare support for these options.
+ 'tlsDisableOCSPEndpointCheck',
+ 'tlsDisableCertificateRevocationCheck'
+];
+/**
+ * Helper function for logging. Enabled by setting the environment flag MONGODB_CRYPT_DEBUG.
+ * @param msg - Anything you want to be logged.
+ */
+function debug(msg) {
+ if (process.env.MONGODB_CRYPT_DEBUG) {
+ // eslint-disable-next-line no-console
+ console.error(msg);
+ }
+}
+/**
+ * @internal
+ * An internal class that executes across a MongoCryptContext until either
+ * a finishing state or an error is reached. Do not instantiate directly.
+ */
+class StateMachine {
+ constructor(options, bsonOptions = (0, bson_1.pluckBSONSerializeOptions)(options)) {
+ this.options = options;
+ this.bsonOptions = bsonOptions;
+ }
+ /**
+ * Executes the state machine according to the specification
+ */
+ async execute(executor, context) {
+ const keyVaultNamespace = executor._keyVaultNamespace;
+ const keyVaultClient = executor._keyVaultClient;
+ const metaDataClient = executor._metaDataClient;
+ const mongocryptdClient = executor._mongocryptdClient;
+ const mongocryptdManager = executor._mongocryptdManager;
+ let result = null;
+ while (context.state !== MONGOCRYPT_CTX_DONE && context.state !== MONGOCRYPT_CTX_ERROR) {
+ debug(`[context#${context.id}] ${stateToString.get(context.state) || context.state}`);
+ switch (context.state) {
+ case MONGOCRYPT_CTX_NEED_MONGO_COLLINFO: {
+ const filter = (0, bson_1.deserialize)(context.nextMongoOperation());
+ if (!metaDataClient) {
+ throw new errors_1.MongoCryptError('unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_COLLINFO but metadata client is undefined');
+ }
+ const collInfo = await this.fetchCollectionInfo(metaDataClient, context.ns, filter);
+ if (collInfo) {
+ context.addMongoOperationResponse(collInfo);
+ }
+ context.finishMongoOperation();
+ break;
+ }
+ case MONGOCRYPT_CTX_NEED_MONGO_MARKINGS: {
+ const command = context.nextMongoOperation();
+ if (!mongocryptdClient) {
+ throw new errors_1.MongoCryptError('unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_MARKINGS but mongocryptdClient is undefined');
+ }
+ // When we are using the shared library, we don't have a mongocryptd manager.
+ const markedCommand = mongocryptdManager
+ ? await mongocryptdManager.withRespawn(this.markCommand.bind(this, mongocryptdClient, context.ns, command))
+ : await this.markCommand(mongocryptdClient, context.ns, command);
+ context.addMongoOperationResponse(markedCommand);
+ context.finishMongoOperation();
+ break;
+ }
+ case MONGOCRYPT_CTX_NEED_MONGO_KEYS: {
+ const filter = context.nextMongoOperation();
+ const keys = await this.fetchKeys(keyVaultClient, keyVaultNamespace, filter);
+ if (keys.length === 0) {
+ // This is kind of a hack. For `rewrapManyDataKey`, we have tests that
+ // guarantee that when there are no matching keys, `rewrapManyDataKey` returns
+ // nothing. We also have tests for auto encryption that guarantee for `encrypt`
+ // we return an error when there are no matching keys. This error is generated in
+ // subsequent iterations of the state machine.
+ // Some apis (`encrypt`) throw if there are no filter matches and others (`rewrapManyDataKey`)
+ // do not. We set the result manually here, and let the state machine continue. `libmongocrypt`
+ // will inform us if we need to error by setting the state to `MONGOCRYPT_CTX_ERROR` but
+ // otherwise we'll return `{ v: [] }`.
+ result = { v: [] };
+ }
+ for await (const key of keys) {
+ context.addMongoOperationResponse((0, bson_1.serialize)(key));
+ }
+ context.finishMongoOperation();
+ break;
+ }
+ case MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS: {
+ const kmsProviders = await executor.askForKMSCredentials();
+ context.provideKMSProviders((0, bson_1.serialize)(kmsProviders));
+ break;
+ }
+ case MONGOCRYPT_CTX_NEED_KMS: {
+ const requests = Array.from(this.requests(context));
+ await Promise.all(requests);
+ context.finishKMSRequests();
+ break;
+ }
+ case MONGOCRYPT_CTX_READY: {
+ const finalizedContext = context.finalize();
+ // @ts-expect-error finalize can change the state, check for error
+ if (context.state === MONGOCRYPT_CTX_ERROR) {
+ const message = context.status.message || 'Finalization error';
+ throw new errors_1.MongoCryptError(message);
+ }
+ result = (0, bson_1.deserialize)(finalizedContext, this.options);
+ break;
+ }
+ default:
+ throw new errors_1.MongoCryptError(`Unknown state: ${context.state}`);
+ }
+ }
+ if (context.state === MONGOCRYPT_CTX_ERROR || result == null) {
+ const message = context.status.message;
+ if (!message) {
+ debug(`unidentifiable error in MongoCrypt - received an error status from \`libmongocrypt\` but received no error message.`);
+ }
+ throw new errors_1.MongoCryptError(message ??
+ 'unidentifiable error in MongoCrypt - received an error status from `libmongocrypt` but received no error message.');
+ }
+ return result;
+ }
+ /**
+ * Handles the request to the KMS service. Exposed for testing purposes. Do not directly invoke.
+ * @param kmsContext - A C++ KMS context returned from the bindings
+ * @returns A promise that resolves when the KMS reply has be fully parsed
+ */
+ async kmsRequest(request) {
+ const parsedUrl = request.endpoint.split(':');
+ const port = parsedUrl[1] != null ? Number.parseInt(parsedUrl[1], 10) : HTTPS_PORT;
+ const options = {
+ host: parsedUrl[0],
+ servername: parsedUrl[0],
+ port
+ };
+ const message = request.message;
+ const buffer = new utils_1.BufferPool();
+ const netSocket = new net.Socket();
+ let socket;
+ function destroySockets() {
+ for (const sock of [socket, netSocket]) {
+ if (sock) {
+ sock.removeAllListeners();
+ sock.destroy();
+ }
+ }
+ }
+ function ontimeout() {
+ return new errors_1.MongoCryptError('KMS request timed out');
+ }
+ function onerror(cause) {
+ return new errors_1.MongoCryptError('KMS request failed', { cause });
+ }
+ function onclose() {
+ return new errors_1.MongoCryptError('KMS request closed');
+ }
+ const tlsOptions = this.options.tlsOptions;
+ if (tlsOptions) {
+ const kmsProvider = request.kmsProvider;
+ const providerTlsOptions = tlsOptions[kmsProvider];
+ if (providerTlsOptions) {
+ const error = this.validateTlsOptions(kmsProvider, providerTlsOptions);
+ if (error) {
+ throw error;
+ }
+ try {
+ await this.setTlsOptions(providerTlsOptions, options);
+ }
+ catch (err) {
+ throw onerror(err);
+ }
+ }
+ }
+ const { promise: willConnect, reject: rejectOnNetSocketError, resolve: resolveOnNetSocketConnect } = (0, utils_1.promiseWithResolvers)();
+ netSocket
+ .once('timeout', () => rejectOnNetSocketError(ontimeout()))
+ .once('error', err => rejectOnNetSocketError(onerror(err)))
+ .once('close', () => rejectOnNetSocketError(onclose()))
+ .once('connect', () => resolveOnNetSocketConnect());
+ try {
+ if (this.options.proxyOptions && this.options.proxyOptions.proxyHost) {
+ netSocket.connect({
+ host: this.options.proxyOptions.proxyHost,
+ port: this.options.proxyOptions.proxyPort || 1080
+ });
+ await willConnect;
+ try {
+ socks ??= loadSocks();
+ options.socket = (await socks.SocksClient.createConnection({
+ existing_socket: netSocket,
+ command: 'connect',
+ destination: { host: options.host, port: options.port },
+ proxy: {
+ // host and port are ignored because we pass existing_socket
+ host: 'iLoveJavaScript',
+ port: 0,
+ type: 5,
+ userId: this.options.proxyOptions.proxyUsername,
+ password: this.options.proxyOptions.proxyPassword
+ }
+ })).socket;
+ }
+ catch (err) {
+ throw onerror(err);
+ }
+ }
+ socket = tls.connect(options, () => {
+ socket.write(message);
+ });
+ const { promise: willResolveKmsRequest, reject: rejectOnTlsSocketError, resolve } = (0, utils_1.promiseWithResolvers)();
+ socket
+ .once('timeout', () => rejectOnTlsSocketError(ontimeout()))
+ .once('error', err => rejectOnTlsSocketError(onerror(err)))
+ .once('close', () => rejectOnTlsSocketError(onclose()))
+ .on('data', data => {
+ buffer.append(data);
+ while (request.bytesNeeded > 0 && buffer.length) {
+ const bytesNeeded = Math.min(request.bytesNeeded, buffer.length);
+ request.addResponse(buffer.read(bytesNeeded));
+ }
+ if (request.bytesNeeded <= 0) {
+ resolve();
+ }
+ });
+ await willResolveKmsRequest;
+ }
+ finally {
+ // There's no need for any more activity on this socket at this point.
+ destroySockets();
+ }
+ }
+ *requests(context) {
+ for (let request = context.nextKMSRequest(); request != null; request = context.nextKMSRequest()) {
+ yield this.kmsRequest(request);
+ }
+ }
+ /**
+ * Validates the provided TLS options are secure.
+ *
+ * @param kmsProvider - The KMS provider name.
+ * @param tlsOptions - The client TLS options for the provider.
+ *
+ * @returns An error if any option is invalid.
+ */
+ validateTlsOptions(kmsProvider, tlsOptions) {
+ const tlsOptionNames = Object.keys(tlsOptions);
+ for (const option of INSECURE_TLS_OPTIONS) {
+ if (tlsOptionNames.includes(option)) {
+ return new errors_1.MongoCryptError(`Insecure TLS options prohibited for ${kmsProvider}: ${option}`);
+ }
+ }
+ }
+ /**
+ * Sets only the valid secure TLS options.
+ *
+ * @param tlsOptions - The client TLS options for the provider.
+ * @param options - The existing connection options.
+ */
+ async setTlsOptions(tlsOptions, options) {
+ if (tlsOptions.tlsCertificateKeyFile) {
+ const cert = await fs.readFile(tlsOptions.tlsCertificateKeyFile);
+ options.cert = options.key = cert;
+ }
+ if (tlsOptions.tlsCAFile) {
+ options.ca = await fs.readFile(tlsOptions.tlsCAFile);
+ }
+ if (tlsOptions.tlsCertificateKeyFilePassword) {
+ options.passphrase = tlsOptions.tlsCertificateKeyFilePassword;
+ }
+ }
+ /**
+ * Fetches collection info for a provided namespace, when libmongocrypt
+ * enters the `MONGOCRYPT_CTX_NEED_MONGO_COLLINFO` state. The result is
+ * used to inform libmongocrypt of the schema associated with this
+ * namespace. Exposed for testing purposes. Do not directly invoke.
+ *
+ * @param client - A MongoClient connected to the topology
+ * @param ns - The namespace to list collections from
+ * @param filter - A filter for the listCollections command
+ * @param callback - Invoked with the info of the requested collection, or with an error
+ */
+ async fetchCollectionInfo(client, ns, filter) {
+ const { db } = utils_1.MongoDBCollectionNamespace.fromString(ns);
+ const collections = await client
+ .db(db)
+ .listCollections(filter, {
+ promoteLongs: false,
+ promoteValues: false
+ })
+ .toArray();
+ const info = collections.length > 0 ? (0, bson_1.serialize)(collections[0]) : null;
+ return info;
+ }
+ /**
+ * Calls to the mongocryptd to provide markings for a command.
+ * Exposed for testing purposes. Do not directly invoke.
+ * @param client - A MongoClient connected to a mongocryptd
+ * @param ns - The namespace (database.collection) the command is being executed on
+ * @param command - The command to execute.
+ * @param callback - Invoked with the serialized and marked bson command, or with an error
+ */
+ async markCommand(client, ns, command) {
+ const options = { promoteLongs: false, promoteValues: false };
+ const { db } = utils_1.MongoDBCollectionNamespace.fromString(ns);
+ const rawCommand = (0, bson_1.deserialize)(command, options);
+ const response = await client.db(db).command(rawCommand, options);
+ return (0, bson_1.serialize)(response, this.bsonOptions);
+ }
+ /**
+ * Requests keys from the keyVault collection on the topology.
+ * Exposed for testing purposes. Do not directly invoke.
+ * @param client - A MongoClient connected to the topology
+ * @param keyVaultNamespace - The namespace (database.collection) of the keyVault Collection
+ * @param filter - The filter for the find query against the keyVault Collection
+ * @param callback - Invoked with the found keys, or with an error
+ */
+ fetchKeys(client, keyVaultNamespace, filter) {
+ const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(keyVaultNamespace);
+ return client
+ .db(dbName)
+ .collection(collectionName, { readConcern: { level: 'majority' } })
+ .find((0, bson_1.deserialize)(filter))
+ .toArray();
+ }
+}
+exports.StateMachine = StateMachine;
+//# sourceMappingURL=state_machine.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/state_machine.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/state_machine.js.map
new file mode 100644
index 000000000..1aef49f98
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/client-side-encryption/state_machine.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"state_machine.js","sourceRoot":"","sources":["../../src/client-side-encryption/state_machine.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAElC,2BAA2B;AAC3B,2BAA2B;AAE3B,kCAMiB;AAEjB,kCAAkD;AAElD,oCAAwF;AAExF,qCAA2C;AAI3C,IAAI,KAAK,GAAoB,IAAI,CAAC;AAClC,SAAS,SAAS;IAChB,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,MAAM,WAAW,GAAG,IAAA,eAAQ,GAAE,CAAC;QAC/B,IAAI,cAAc,IAAI,WAAW,EAAE;YACjC,MAAM,WAAW,CAAC,YAAY,CAAC;SAChC;QACD,KAAK,GAAG,WAAW,CAAC;KACrB;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,uBAAuB;AACvB,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,kCAAkC,GAAG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AC/C,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CACP,MAAmB,EACnB,iBAAyB,EACzB,MAAkB;QAElB,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAC9C,kCAA0B,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;QAE3D,OAAO,MAAM;aACV,EAAE,CAAC,MAAM,CAAC;aACV,UAAU,CAAU,cAAc,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC;aAC3E,IAAI,CAAC,IAAA,kBAAW,EAAC,MAAM,CAAC,CAAC;aACzB,OAAO,EAAE,CAAC;IACf,CAAC;CACF;AA/XD,oCA+XC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/auth_provider.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/auth_provider.js
new file mode 100644
index 000000000..99cbf72aa
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/auth_provider.js
@@ -0,0 +1,51 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AuthProvider = exports.AuthContext = void 0;
+const error_1 = require("../../error");
+/**
+ * Context used during authentication
+ * @internal
+ */
+class AuthContext {
+ constructor(connection, credentials, options) {
+ /** If the context is for reauthentication. */
+ this.reauthenticating = false;
+ this.connection = connection;
+ this.credentials = credentials;
+ this.options = options;
+ }
+}
+exports.AuthContext = AuthContext;
+/**
+ * Provider used during authentication.
+ * @internal
+ */
+class AuthProvider {
+ /**
+ * Prepare the handshake document before the initial handshake.
+ *
+ * @param handshakeDoc - The document used for the initial handshake on a connection
+ * @param authContext - Context for authentication flow
+ */
+ async prepare(handshakeDoc, _authContext) {
+ return handshakeDoc;
+ }
+ /**
+ * Reauthenticate.
+ * @param context - The shared auth context.
+ */
+ async reauth(context) {
+ if (context.reauthenticating) {
+ throw new error_1.MongoRuntimeError('Reauthentication already in progress.');
+ }
+ try {
+ context.reauthenticating = true;
+ await this.auth(context);
+ }
+ finally {
+ context.reauthenticating = false;
+ }
+ }
+}
+exports.AuthProvider = AuthProvider;
+//# sourceMappingURL=auth_provider.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/auth_provider.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/auth_provider.js.map
new file mode 100644
index 000000000..caa3981ae
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/auth_provider.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auth_provider.js","sourceRoot":"","sources":["../../../src/cmap/auth/auth_provider.ts"],"names":[],"mappings":";;;AACA,uCAAgD;AAKhD;;;GAGG;AACH,MAAa,WAAW;IAetB,YACE,UAAsB,EACtB,WAAyC,EACzC,OAA0B;QAb5B,8CAA8C;QAC9C,qBAAgB,GAAG,KAAK,CAAC;QAcvB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAxBD,kCAwBC;AAED;;;GAGG;AACH,MAAsB,YAAY;IAChC;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,YAA+B,EAC/B,YAAyB;QAEzB,OAAO,YAAY,CAAC;IACtB,CAAC;IASD;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,OAAoB;QAC/B,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAC5B,MAAM,IAAI,yBAAiB,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,IAAI;YACF,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAChC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC1B;gBAAS;YACR,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC;SAClC;IACH,CAAC;CACF;AApCD,oCAoCC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js
new file mode 100644
index 000000000..bc839b57f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js
@@ -0,0 +1,140 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.LegacyAWSTemporaryCredentialProvider = exports.AWSSDKCredentialProvider = exports.AWSTemporaryCredentialProvider = void 0;
+const deps_1 = require("../../deps");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const AWS_RELATIVE_URI = 'http://169.254.170.2';
+const AWS_EC2_URI = 'http://169.254.169.254';
+const AWS_EC2_PATH = '/latest/meta-data/iam/security-credentials';
+/**
+ * @internal
+ *
+ * Fetches temporary AWS credentials.
+ */
+class AWSTemporaryCredentialProvider {
+ static get awsSDK() {
+ AWSTemporaryCredentialProvider._awsSDK ??= (0, deps_1.getAwsCredentialProvider)();
+ return AWSTemporaryCredentialProvider._awsSDK;
+ }
+ static get isAWSSDKInstalled() {
+ return !('kModuleError' in AWSTemporaryCredentialProvider.awsSDK);
+ }
+}
+exports.AWSTemporaryCredentialProvider = AWSTemporaryCredentialProvider;
+/** @internal */
+class AWSSDKCredentialProvider extends AWSTemporaryCredentialProvider {
+ /**
+ * The AWS SDK caches credentials automatically and handles refresh when the credentials have expired.
+ * To ensure this occurs, we need to cache the `provider` returned by the AWS sdk and re-use it when fetching credentials.
+ */
+ get provider() {
+ if ('kModuleError' in AWSTemporaryCredentialProvider.awsSDK) {
+ throw AWSTemporaryCredentialProvider.awsSDK.kModuleError;
+ }
+ if (this._provider) {
+ return this._provider;
+ }
+ let { AWS_STS_REGIONAL_ENDPOINTS = '', AWS_REGION = '' } = process.env;
+ AWS_STS_REGIONAL_ENDPOINTS = AWS_STS_REGIONAL_ENDPOINTS.toLowerCase();
+ AWS_REGION = AWS_REGION.toLowerCase();
+ /** The option setting should work only for users who have explicit settings in their environment, the driver should not encode "defaults" */
+ const awsRegionSettingsExist = AWS_REGION.length !== 0 && AWS_STS_REGIONAL_ENDPOINTS.length !== 0;
+ /**
+ * The following regions use the global AWS STS endpoint, sts.amazonaws.com, by default
+ * https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html
+ */
+ const LEGACY_REGIONS = new Set([
+ 'ap-northeast-1',
+ 'ap-south-1',
+ 'ap-southeast-1',
+ 'ap-southeast-2',
+ 'aws-global',
+ 'ca-central-1',
+ 'eu-central-1',
+ 'eu-north-1',
+ 'eu-west-1',
+ 'eu-west-2',
+ 'eu-west-3',
+ 'sa-east-1',
+ 'us-east-1',
+ 'us-east-2',
+ 'us-west-1',
+ 'us-west-2'
+ ]);
+ /**
+ * If AWS_STS_REGIONAL_ENDPOINTS is set to regional, users are opting into the new behavior of respecting the region settings
+ *
+ * If AWS_STS_REGIONAL_ENDPOINTS is set to legacy, then "old" regions need to keep using the global setting.
+ * Technically the SDK gets this wrong, it reaches out to 'sts.us-east-1.amazonaws.com' when it should be 'sts.amazonaws.com'.
+ * That is not our bug to fix here. We leave that up to the SDK.
+ */
+ const useRegionalSts = AWS_STS_REGIONAL_ENDPOINTS === 'regional' ||
+ (AWS_STS_REGIONAL_ENDPOINTS === 'legacy' && !LEGACY_REGIONS.has(AWS_REGION));
+ this._provider =
+ awsRegionSettingsExist && useRegionalSts
+ ? AWSTemporaryCredentialProvider.awsSDK.fromNodeProviderChain({
+ clientConfig: { region: AWS_REGION }
+ })
+ : AWSTemporaryCredentialProvider.awsSDK.fromNodeProviderChain();
+ return this._provider;
+ }
+ async getCredentials() {
+ /*
+ * Creates a credential provider that will attempt to find credentials from the
+ * following sources (listed in order of precedence):
+ *
+ * - Environment variables exposed via process.env
+ * - SSO credentials from token cache
+ * - Web identity token credentials
+ * - Shared credentials and config ini files
+ * - The EC2/ECS Instance Metadata Service
+ */
+ try {
+ const creds = await this.provider();
+ return {
+ AccessKeyId: creds.accessKeyId,
+ SecretAccessKey: creds.secretAccessKey,
+ Token: creds.sessionToken,
+ Expiration: creds.expiration
+ };
+ }
+ catch (error) {
+ throw new error_1.MongoAWSError(error.message, { cause: error });
+ }
+ }
+}
+exports.AWSSDKCredentialProvider = AWSSDKCredentialProvider;
+/**
+ * @internal
+ * Fetches credentials manually (without the AWS SDK), as outlined in the [Obtaining Credentials](https://github.com/mongodb/specifications/blob/master/source/auth/auth.md#obtaining-credentials)
+ * section of the Auth spec.
+ */
+class LegacyAWSTemporaryCredentialProvider extends AWSTemporaryCredentialProvider {
+ async getCredentials() {
+ // If the environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
+ // is set then drivers MUST assume that it was set by an AWS ECS agent
+ if (process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI) {
+ return await (0, utils_1.request)(`${AWS_RELATIVE_URI}${process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI}`);
+ }
+ // Otherwise assume we are on an EC2 instance
+ // get a token
+ const token = await (0, utils_1.request)(`${AWS_EC2_URI}/latest/api/token`, {
+ method: 'PUT',
+ json: false,
+ headers: { 'X-aws-ec2-metadata-token-ttl-seconds': 30 }
+ });
+ // get role name
+ const roleName = await (0, utils_1.request)(`${AWS_EC2_URI}/${AWS_EC2_PATH}`, {
+ json: false,
+ headers: { 'X-aws-ec2-metadata-token': token }
+ });
+ // get temp credentials
+ const creds = await (0, utils_1.request)(`${AWS_EC2_URI}/${AWS_EC2_PATH}/${roleName}`, {
+ headers: { 'X-aws-ec2-metadata-token': token }
+ });
+ return creds;
+ }
+}
+exports.LegacyAWSTemporaryCredentialProvider = LegacyAWSTemporaryCredentialProvider;
+//# sourceMappingURL=aws_temporary_credentials.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js.map
new file mode 100644
index 000000000..32ce3d5b3
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"aws_temporary_credentials.js","sourceRoot":"","sources":["../../../src/cmap/auth/aws_temporary_credentials.ts"],"names":[],"mappings":";;;AAAA,qCAA2E;AAC3E,uCAA4C;AAC5C,uCAAsC;AAEtC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAChD,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAC7C,MAAM,YAAY,GAAG,4CAA4C,CAAC;AAiBlE;;;;GAIG;AACH,MAAsB,8BAA8B;IAGxC,MAAM,KAAK,MAAM;QACzB,8BAA8B,CAAC,OAAO,KAAK,IAAA,+BAAwB,GAAE,CAAC;QACtE,OAAO,8BAA8B,CAAC,OAAO,CAAC;IAChD,CAAC;IAED,MAAM,KAAK,iBAAiB;QAC1B,OAAO,CAAC,CAAC,cAAc,IAAI,8BAA8B,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;CACF;AAXD,wEAWC;AAED,gBAAgB;AAChB,MAAa,wBAAyB,SAAQ,8BAA8B;IAE1E;;;OAGG;IACH,IAAY,QAAQ;QAClB,IAAI,cAAc,IAAI,8BAA8B,CAAC,MAAM,EAAE;YAC3D,MAAM,8BAA8B,CAAC,MAAM,CAAC,YAAY,CAAC;SAC1D;QACD,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,IAAI,CAAC,SAAS,CAAC;SACvB;QACD,IAAI,EAAE,0BAA0B,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;QACvE,0BAA0B,GAAG,0BAA0B,CAAC,WAAW,EAAE,CAAC;QACtE,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QAEtC,6IAA6I;QAC7I,MAAM,sBAAsB,GAC1B,UAAU,CAAC,MAAM,KAAK,CA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MAAa,oCAAqC,SAAQ,8BAA8B;IAC7E,KAAK,CAAC,cAAc;QAC3B,qEAAqE;QACrE,sEAAsE;QACtE,IAAI,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE;YACtD,OAAO,MAAM,IAAA,eAAO,EAClB,GAAG,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,CAC3E,CAAC;SACH;QAED,6CAA6C;QAE7C,cAAc;QACd,MAAM,KAAK,GAAG,MAAM,IAAA,eAAO,EAAC,GAAG,WAAW,mBAAmB,EAAE;YAC7D,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,EAAE,sCAAsC,EAAE,EAAE,EAAE;SACxD,CAAC,CAAC;QAEH,gBAAgB;QAChB,MAAM,QAAQ,GAAG,MAAM,IAAA,eAAO,EAAC,GAAG,WAAW,IAAI,YAAY,EAAE,EAAE;YAC/D,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,EAAE,0BAA0B,EAAE,KAAK,EAAE;SAC/C,CAAC,CAAC;QAEH,uBAAuB;QACvB,MAAM,KAAK,GAAG,MAAM,IAAA,eAAO,EAAC,GAAG,WAAW,IAAI,YAAY,IAAI,QAAQ,EAAE,EAAE;YACxE,OAAO,EAAE,EAAE,0BAA0B,EAAE,KAAK,EAAE;SAC/C,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAhCD,oFAgCC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/gssapi.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/gssapi.js
new file mode 100644
index 000000000..0776987cf
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/gssapi.js
@@ -0,0 +1,154 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.resolveCname = exports.performGSSAPICanonicalizeHostName = exports.GSSAPI = exports.GSSAPICanonicalizationValue = void 0;
+const dns = require("dns");
+const deps_1 = require("../../deps");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const auth_provider_1 = require("./auth_provider");
+/** @public */
+exports.GSSAPICanonicalizationValue = Object.freeze({
+ on: true,
+ off: false,
+ none: 'none',
+ forward: 'forward',
+ forwardAndReverse: 'forwardAndReverse'
+});
+async function externalCommand(connection, command) {
+ const response = await connection.command((0, utils_1.ns)('$external.$cmd'), command);
+ return response;
+}
+let krb;
+class GSSAPI extends auth_provider_1.AuthProvider {
+ async auth(authContext) {
+ const { connection, credentials } = authContext;
+ if (credentials == null) {
+ throw new error_1.MongoMissingCredentialsError('Credentials required for GSSAPI authentication');
+ }
+ const { username } = credentials;
+ const client = await makeKerberosClient(authContext);
+ const payload = await client.step('');
+ const saslStartResponse = await externalCommand(connection, saslStart(payload));
+ const negotiatedPayload = await negotiate(client, 10, saslStartResponse.payload);
+ const saslContinueResponse = await externalCommand(connection, saslContinue(negotiatedPayload, saslStartResponse.conversationId));
+ const finalizePayload = await finalize(client, username, saslContinueResponse.payload);
+ await externalCommand(connection, {
+ saslContinue: 1,
+ conversationId: saslContinueResponse.conversationId,
+ payload: finalizePayload
+ });
+ }
+}
+exports.GSSAPI = GSSAPI;
+async function makeKerberosClient(authContext) {
+ const { hostAddress } = authContext.options;
+ const { credentials } = authContext;
+ if (!hostAddress || typeof hostAddress.host !== 'string' || !credentials) {
+ throw new error_1.MongoInvalidArgumentError('Connection must have host and port and credentials defined.');
+ }
+ loadKrb();
+ if ('kModuleError' in krb) {
+ throw krb['kModuleError'];
+ }
+ const { initializeClient } = krb;
+ const { username, password } = credentials;
+ const mechanismProperties = credentials.mechanismProperties;
+ const serviceName = mechanismProperties.SERVICE_NAME ?? 'mongodb';
+ const host = await performGSSAPICanonicalizeHostName(hostAddress.host, mechanismProperties);
+ const initOptions = {};
+ if (password != null) {
+ // TODO(NODE-5139): These do not match the typescript options in initializeClient
+ Object.assign(initOptions, { user: username, password: password });
+ }
+ const spnHost = mechanismProperties.SERVICE_HOST ?? host;
+ let spn = `${serviceName}${process.platform === 'win32' ? '/' : '@'}${spnHost}`;
+ if ('SERVICE_REALM' in mechanismProperties) {
+ spn = `${spn}@${mechanismProperties.SERVICE_REALM}`;
+ }
+ return await initializeClient(spn, initOptions);
+}
+function saslStart(payload) {
+ return {
+ saslStart: 1,
+ mechanism: 'GSSAPI',
+ payload,
+ autoAuthorize: 1
+ };
+}
+function saslContinue(payload, conversationId) {
+ return {
+ saslContinue: 1,
+ conversationId,
+ payload
+ };
+}
+async function negotiate(client, retries, payload) {
+ try {
+ const response = await client.step(payload);
+ return response || '';
+ }
+ catch (error) {
+ if (retries === 0) {
+ // Retries exhausted, raise error
+ throw error;
+ }
+ // Adjust number of retries and call step again
+ return await negotiate(client, retries - 1, payload);
+ }
+}
+async function finalize(client, user, payload) {
+ // GSS Client Unwrap
+ const response = await client.unwrap(payload);
+ return await client.wrap(response || '', { user });
+}
+async function performGSSAPICanonicalizeHostName(host, mechanismProperties) {
+ const mode = mechanismProperties.CANONICALIZE_HOST_NAME;
+ if (!mode || mode === exports.GSSAPICanonicalizationValue.none) {
+ return host;
+ }
+ // If forward and reverse or true
+ if (mode === exports.GSSAPICanonicalizationValue.on ||
+ mode === exports.GSSAPICanonicalizationValue.forwardAndReverse) {
+ // Perform the lookup of the ip address.
+ const { address } = await dns.promises.lookup(host);
+ try {
+ // Perform a reverse ptr lookup on the ip address.
+ const results = await dns.promises.resolvePtr(address);
+ // If the ptr did not error but had no results, return the host.
+ return results.length > 0 ? results[0] : host;
+ }
+ catch (error) {
+ // This can error as ptr records may not exist for all ips. In this case
+ // fallback to a cname lookup as dns.lookup() does not return the
+ // cname.
+ return await resolveCname(host);
+ }
+ }
+ else {
+ // The case for forward is just to resolve the cname as dns.lookup()
+ // will not return it.
+ return await resolveCname(host);
+ }
+}
+exports.performGSSAPICanonicalizeHostName = performGSSAPICanonicalizeHostName;
+async function resolveCname(host) {
+ // Attempt to resolve the host name
+ try {
+ const results = await dns.promises.resolveCname(host);
+ // Get the first resolved host id
+ return results.length > 0 ? results[0] : host;
+ }
+ catch {
+ return host;
+ }
+}
+exports.resolveCname = resolveCname;
+/**
+ * Load the Kerberos library.
+ */
+function loadKrb() {
+ if (!krb) {
+ krb = (0, deps_1.getKerberos)();
+ }
+}
+//# sourceMappingURL=gssapi.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/gssapi.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/gssapi.js.map
new file mode 100644
index 000000000..90d13bbe5
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/gssapi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gssapi.js","sourceRoot":"","sources":["../../../src/cmap/auth/gssapi.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AAE3B,qCAA6E;AAC7E,uCAAsF;AACtF,uCAAiC;AAEjC,mDAAiE;AAEjE,cAAc;AACD,QAAA,2BAA2B,GAAG,MAAM,CAAC,MAAM,CAAC;IACvD,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC,CAAC;AAaZ,KAAK,UAAU,eAAe,CAC5B,UAAsB,EACtB,OAAuE;IAEvE,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,IAAA,UAAE,EAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAC;IACzE,OAAO,QAAuD,CAAC;AACjE,CAAC;AAED,IAAI,GAAa,CAAC;AAElB,MAAa,MAAO,SAAQ,4BAAY;IAC7B,KAAK,CAAC,IAAI,CAAC,WAAwB;QAC1C,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;QAChD,IAAI,WAAW,IAAI,IAAI,EAAE;YACvB,MAAM,IAAI,oCAA4B,CAAC,g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CAAC,CAAC,IAAI,CAAC;SAC/C;QAAC,OAAO,KAAK,EAAE;YACd,wEAAwE;YACxE,iEAAiE;YACjE,SAAS;YACT,OAAO,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;SACjC;KACF;SAAM;QACL,oEAAoE;QACpE,sBAAsB;QACtB,OAAO,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;KACjC;AACH,CAAC;AAjCD,8EAiCC;AAEM,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,mCAAmC;IACnC,IAAI;QACF,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACtD,iCAAiC;QACjC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;KAC/C;IAAC,MAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AATD,oCASC;AAED;;GAEG;AACH,SAAS,OAAO;IACd,IAAI,CAAC,GAAG,EAAE;QACR,GAAG,GAAG,IAAA,kBAAW,GAAE,CAAC;KACrB;AACH,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js
new file mode 100644
index 000000000..e7c3304b2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js
@@ -0,0 +1,177 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MongoCredentials = exports.DEFAULT_ALLOWED_HOSTS = void 0;
+const error_1 = require("../../error");
+const gssapi_1 = require("./gssapi");
+const providers_1 = require("./providers");
+// https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst
+function getDefaultAuthMechanism(hello) {
+ if (hello) {
+ // If hello contains saslSupportedMechs, use scram-sha-256
+ // if it is available, else scram-sha-1
+ if (Array.isArray(hello.saslSupportedMechs)) {
+ return hello.saslSupportedMechs.includes(providers_1.AuthMechanism.MONGODB_SCRAM_SHA256)
+ ? providers_1.AuthMechanism.MONGODB_SCRAM_SHA256
+ : providers_1.AuthMechanism.MONGODB_SCRAM_SHA1;
+ }
+ // Fallback to legacy selection method. If wire version >= 3, use scram-sha-1
+ if (hello.maxWireVersion >= 3) {
+ return providers_1.AuthMechanism.MONGODB_SCRAM_SHA1;
+ }
+ }
+ // Default for wireprotocol < 3
+ return providers_1.AuthMechanism.MONGODB_CR;
+}
+const ALLOWED_PROVIDER_NAMES = ['aws', 'azure'];
+const ALLOWED_HOSTS_ERROR = 'Auth mechanism property ALLOWED_HOSTS must be an array of strings.';
+/** @internal */
+exports.DEFAULT_ALLOWED_HOSTS = [
+ '*.mongodb.net',
+ '*.mongodb-dev.net',
+ '*.mongodbgov.net',
+ 'localhost',
+ '127.0.0.1',
+ '::1'
+];
+/** Error for when the token audience is missing in the environment. */
+const TOKEN_AUDIENCE_MISSING_ERROR = 'TOKEN_AUDIENCE must be set in the auth mechanism properties when PROVIDER_NAME is azure.';
+/**
+ * A representation of the credentials used by MongoDB
+ * @public
+ */
+class MongoCredentials {
+ constructor(options) {
+ this.username = options.username ?? '';
+ this.password = options.password;
+ this.source = options.source;
+ if (!this.source && options.db) {
+ this.source = options.db;
+ }
+ this.mechanism = options.mechanism || providers_1.AuthMechanism.MONGODB_DEFAULT;
+ this.mechanismProperties = options.mechanismProperties || {};
+ if (this.mechanism.match(/MONGODB-AWS/i)) {
+ if (!this.username && process.env.AWS_ACCESS_KEY_ID) {
+ this.username = process.env.AWS_ACCESS_KEY_ID;
+ }
+ if (!this.password && process.env.AWS_SECRET_ACCESS_KEY) {
+ this.password = process.env.AWS_SECRET_ACCESS_KEY;
+ }
+ if (this.mechanismProperties.AWS_SESSION_TOKEN == null &&
+ process.env.AWS_SESSION_TOKEN != null) {
+ this.mechanismProperties = {
+ ...this.mechanismProperties,
+ AWS_SESSION_TOKEN: process.env.AWS_SESSION_TOKEN
+ };
+ }
+ }
+ if (this.mechanism === providers_1.AuthMechanism.MONGODB_OIDC && !this.mechanismProperties.ALLOWED_HOSTS) {
+ this.mechanismProperties = {
+ ...this.mechanismProperties,
+ ALLOWED_HOSTS: exports.DEFAULT_ALLOWED_HOSTS
+ };
+ }
+ Object.freeze(this.mechanismProperties);
+ Object.freeze(this);
+ }
+ /** Determines if two MongoCredentials objects are equivalent */
+ equals(other) {
+ return (this.mechanism === other.mechanism &&
+ this.username === other.username &&
+ this.password === other.password &&
+ this.source === other.source);
+ }
+ /**
+ * If the authentication mechanism is set to "default", resolves the authMechanism
+ * based on the server version and server supported sasl mechanisms.
+ *
+ * @param hello - A hello response from the server
+ */
+ resolveAuthMechanism(hello) {
+ // If the mechanism is not "default", then it does not need to be resolved
+ if (this.mechanism.match(/DEFAULT/i)) {
+ return new MongoCredentials({
+ username: this.username,
+ password: this.password,
+ source: this.source,
+ mechanism: getDefaultAuthMechanism(hello),
+ mechanismProperties: this.mechanismProperties
+ });
+ }
+ return this;
+ }
+ validate() {
+ if ((this.mechanism === providers_1.AuthMechanism.MONGODB_GSSAPI ||
+ this.mechanism === providers_1.AuthMechanism.MONGODB_CR ||
+ this.mechanism === providers_1.AuthMechanism.MONGODB_PLAIN ||
+ this.mechanism === providers_1.AuthMechanism.MONGODB_SCRAM_SHA1 ||
+ this.mechanism === providers_1.AuthMechanism.MONGODB_SCRAM_SHA256) &&
+ !this.username) {
+ throw new error_1.MongoMissingCredentialsError(`Username required for mechanism '${this.mechanism}'`);
+ }
+ if (this.mechanism === providers_1.AuthMechanism.MONGODB_OIDC) {
+ if (this.username && this.mechanismProperties.PROVIDER_NAME) {
+ throw new error_1.MongoInvalidArgumentError(`username and PROVIDER_NAME may not be used together for mechanism '${this.mechanism}'.`);
+ }
+ if (this.mechanismProperties.PROVIDER_NAME === 'azure' &&
+ !this.mechanismProperties.TOKEN_AUDIENCE) {
+ throw new error_1.MongoAzureError(TOKEN_AUDIENCE_MISSING_ERROR);
+ }
+ if (this.mechanismProperties.PROVIDER_NAME &&
+ !ALLOWED_PROVIDER_NAMES.includes(this.mechanismProperties.PROVIDER_NAME)) {
+ throw new error_1.MongoInvalidArgumentError(`Currently only a PROVIDER_NAME in ${ALLOWED_PROVIDER_NAMES.join(',')} is supported for mechanism '${this.mechanism}'.`);
+ }
+ if (this.mechanismProperties.REFRESH_TOKEN_CALLBACK &&
+ !this.mechanismProperties.REQUEST_TOKEN_CALLBACK) {
+ throw new error_1.MongoInvalidArgumentError(`A REQUEST_TOKEN_CALLBACK must be provided when using a REFRESH_TOKEN_CALLBACK for mechanism '${this.mechanism}'`);
+ }
+ if (!this.mechanismProperties.PROVIDER_NAME &&
+ !this.mechanismProperties.REQUEST_TOKEN_CALLBACK) {
+ throw new error_1.MongoInvalidArgumentError(`Either a PROVIDER_NAME or a REQUEST_TOKEN_CALLBACK must be specified for mechanism '${this.mechanism}'.`);
+ }
+ if (this.mechanismProperties.ALLOWED_HOSTS) {
+ const hosts = this.mechanismProperties.ALLOWED_HOSTS;
+ if (!Array.isArray(hosts)) {
+ throw new error_1.MongoInvalidArgumentError(ALLOWED_HOSTS_ERROR);
+ }
+ for (const host of hosts) {
+ if (typeof host !== 'string') {
+ throw new error_1.MongoInvalidArgumentError(ALLOWED_HOSTS_ERROR);
+ }
+ }
+ }
+ }
+ if (providers_1.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(this.mechanism)) {
+ if (this.source != null && this.source !== '$external') {
+ // TODO(NODE-3485): Replace this with a MongoAuthValidationError
+ throw new error_1.MongoAPIError(`Invalid source '${this.source}' for mechanism '${this.mechanism}' specified.`);
+ }
+ }
+ if (this.mechanism === providers_1.AuthMechanism.MONGODB_PLAIN && this.source == null) {
+ // TODO(NODE-3485): Replace this with a MongoAuthValidationError
+ throw new error_1.MongoAPIError('PLAIN Authentication Mechanism needs an auth source');
+ }
+ if (this.mechanism === providers_1.AuthMechanism.MONGODB_X509 && this.password != null) {
+ if (this.password === '') {
+ Reflect.set(this, 'password', undefined);
+ return;
+ }
+ // TODO(NODE-3485): Replace this with a MongoAuthValidationError
+ throw new error_1.MongoAPIError(`Password not allowed for mechanism MONGODB-X509`);
+ }
+ const canonicalization = this.mechanismProperties.CANONICALIZE_HOST_NAME ?? false;
+ if (!Object.values(gssapi_1.GSSAPICanonicalizationValue).includes(canonicalization)) {
+ throw new error_1.MongoAPIError(`Invalid CANONICALIZE_HOST_NAME value: ${canonicalization}`);
+ }
+ }
+ static merge(creds, options) {
+ return new MongoCredentials({
+ username: options.username ?? creds?.username ?? '',
+ password: options.password ?? creds?.password ?? '',
+ mechanism: options.mechanism ?? creds?.mechanism ?? providers_1.AuthMechanism.MONGODB_DEFAULT,
+ mechanismProperties: options.mechanismProperties ?? creds?.mechanismProperties ?? {},
+ source: options.source ?? options.db ?? creds?.source ?? 'admin'
+ });
+ }
+}
+exports.MongoCredentials = MongoCredentials;
+//# sourceMappingURL=mongo_credentials.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js.map
new file mode 100644
index 000000000..a6556d67e
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mongo_credentials.js","sourceRoot":"","sources":["../../../src/cmap/auth/mongo_credentials.ts"],"names":[],"mappings":";;;AAGA,uCAKqB;AACrB,qCAAuD;AAEvD,2CAA0E;AAE1E,6EAA6E;AAC7E,SAAS,uBAAuB,CAAC,KAAsB;IACrD,IAAI,KAAK,EAAE;QACT,0DAA0D;QAC1D,uCAAuC;QACvC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE;YAC3C,OAAO,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,yBAAa,CAAC,oBAAo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/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongocr.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongocr.js
new file mode 100644
index 000000000..b6d346374
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongocr.js
@@ -0,0 +1,35 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MongoCR = void 0;
+const crypto = require("crypto");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const auth_provider_1 = require("./auth_provider");
+class MongoCR extends auth_provider_1.AuthProvider {
+ async auth(authContext) {
+ const { connection, credentials } = authContext;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ const { username, password, source } = credentials;
+ const { nonce } = await connection.command((0, utils_1.ns)(`${source}.$cmd`), { getnonce: 1 }, undefined);
+ const hashPassword = crypto
+ .createHash('md5')
+ .update(`${username}:mongo:${password}`, 'utf8')
+ .digest('hex');
+ // Final key
+ const key = crypto
+ .createHash('md5')
+ .update(`${nonce}${username}${hashPassword}`, 'utf8')
+ .digest('hex');
+ const authenticateCommand = {
+ authenticate: 1,
+ user: username,
+ nonce,
+ key
+ };
+ await connection.command((0, utils_1.ns)(`${source}.$cmd`), authenticateCommand, undefined);
+ }
+}
+exports.MongoCR = MongoCR;
+//# sourceMappingURL=mongocr.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongocr.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongocr.js.map
new file mode 100644
index 000000000..596cdf850
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongocr.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mongocr.js","sourceRoot":"","sources":["../../../src/cmap/auth/mongocr.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,uCAA2D;AAC3D,uCAAiC;AACjC,mDAAiE;AAEjE,MAAa,OAAQ,SAAQ,4BAAY;IAC9B,KAAK,CAAC,IAAI,CAAC,WAAwB;QAC1C,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;QAChD,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,oCAA4B,CAAC,uCAAuC,CAAC,CAAC;SACjF;QAED,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;QAEnD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,IAAA,UAAE,EAAC,GAAG,MAAM,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAE7F,MAAM,YAAY,GAAG,MAAM;aACxB,UAAU,CAAC,KAAK,CAAC;aACjB,MAAM,CAAC,GAAG,QAAQ,UAAU,QAAQ,EAAE,EAAE,MAAM,CAAC;aAC/C,MAAM,CAAC,KAAK,CAAC,CAAC;QAEjB,YAAY;QACZ,MAAM,GAAG,GAAG,MAAM;aACf,UAAU,CAAC,KAAK,CAAC;aACjB,MAAM,CAAC,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,EAAE,EAAE,MAAM,CAAC;aACpD,MAAM,CAAC,KAAK,CAAC,CAAC;QAEjB,MAAM,mBAAmB,GAAG;YAC1B,YAAY,EAAE,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,KAAK;YACL,GAAG;SACJ,CAAC;QAEF,MAAM,UAAU,CAAC,OAAO,CAAC,IAAA,UAAE,EAAC,GAAG,MAAM,OAAO,CAAC,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC;IACjF,CAAC;CACF;AA/BD,0BA+BC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js
new file mode 100644
index 000000000..10c6852de
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js
@@ -0,0 +1,137 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MongoDBAWS = void 0;
+const BSON = require("../../bson");
+const deps_1 = require("../../deps");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const auth_provider_1 = require("./auth_provider");
+const aws_temporary_credentials_1 = require("./aws_temporary_credentials");
+const mongo_credentials_1 = require("./mongo_credentials");
+const providers_1 = require("./providers");
+const ASCII_N = 110;
+const bsonOptions = {
+ useBigInt64: false,
+ promoteLongs: true,
+ promoteValues: true,
+ promoteBuffers: false,
+ bsonRegExp: false
+};
+class MongoDBAWS extends auth_provider_1.AuthProvider {
+ constructor() {
+ super();
+ this.credentialFetcher = aws_temporary_credentials_1.AWSTemporaryCredentialProvider.isAWSSDKInstalled
+ ? new aws_temporary_credentials_1.AWSSDKCredentialProvider()
+ : new aws_temporary_credentials_1.LegacyAWSTemporaryCredentialProvider();
+ }
+ async auth(authContext) {
+ const { connection } = authContext;
+ if (!authContext.credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ if ('kModuleError' in deps_1.aws4) {
+ throw deps_1.aws4['kModuleError'];
+ }
+ const { sign } = deps_1.aws4;
+ if ((0, utils_1.maxWireVersion)(connection) < 9) {
+ throw new error_1.MongoCompatibilityError('MONGODB-AWS authentication requires MongoDB version 4.4 or later');
+ }
+ if (!authContext.credentials.username) {
+ authContext.credentials = await makeTempCredentials(authContext.credentials, this.credentialFetcher);
+ }
+ const { credentials } = authContext;
+ const accessKeyId = credentials.username;
+ const secretAccessKey = credentials.password;
+ // Allow the user to specify an AWS session token for authentication with temporary credentials.
+ const sessionToken = credentials.mechanismProperties.AWS_SESSION_TOKEN;
+ // If all three defined, include sessionToken, else include username and pass, else no credentials
+ const awsCredentials = accessKeyId && secretAccessKey && sessionToken
+ ? { accessKeyId, secretAccessKey, sessionToken }
+ : accessKeyId && secretAccessKey
+ ? { accessKeyId, secretAccessKey }
+ : undefined;
+ const db = credentials.source;
+ const nonce = await (0, utils_1.randomBytes)(32);
+ // All messages between MongoDB clients and servers are sent as BSON objects
+ // in the payload field of saslStart and saslContinue.
+ const saslStart = {
+ saslStart: 1,
+ mechanism: 'MONGODB-AWS',
+ payload: BSON.serialize({ r: nonce, p: ASCII_N }, bsonOptions)
+ };
+ const saslStartResponse = await connection.command((0, utils_1.ns)(`${db}.$cmd`), saslStart, undefined);
+ const serverResponse = BSON.deserialize(saslStartResponse.payload.buffer, bsonOptions);
+ const host = serverResponse.h;
+ const serverNonce = serverResponse.s.buffer;
+ if (serverNonce.length !== 64) {
+ // TODO(NODE-3483)
+ throw new error_1.MongoRuntimeError(`Invalid server nonce length ${serverNonce.length}, expected 64`);
+ }
+ if (!utils_1.ByteUtils.equals(serverNonce.subarray(0, nonce.byteLength), nonce)) {
+ // throw because the serverNonce's leading 32 bytes must equal the client nonce's 32 bytes
+ // https://github.com/mongodb/specifications/blob/875446db44aade414011731840831f38a6c668df/source/auth/auth.rst#id11
+ // TODO(NODE-3483)
+ throw new error_1.MongoRuntimeError('Server nonce does not begin with client nonce');
+ }
+ if (host.length < 1 || host.length > 255 || host.indexOf('..') !== -1) {
+ // TODO(NODE-3483)
+ throw new error_1.MongoRuntimeError(`Server returned an invalid host: "${host}"`);
+ }
+ const body = 'Action=GetCallerIdentity&Version=2011-06-15';
+ const options = sign({
+ method: 'POST',
+ host,
+ region: deriveRegion(serverResponse.h),
+ service: 'sts',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'Content-Length': body.length,
+ 'X-MongoDB-Server-Nonce': utils_1.ByteUtils.toBase64(serverNonce),
+ 'X-MongoDB-GS2-CB-Flag': 'n'
+ },
+ path: '/',
+ body
+ }, awsCredentials);
+ const payload = {
+ a: options.headers.Authorization,
+ d: options.headers['X-Amz-Date']
+ };
+ if (sessionToken) {
+ payload.t = sessionToken;
+ }
+ const saslContinue = {
+ saslContinue: 1,
+ conversationId: 1,
+ payload: BSON.serialize(payload, bsonOptions)
+ };
+ await connection.command((0, utils_1.ns)(`${db}.$cmd`), saslContinue, undefined);
+ }
+}
+exports.MongoDBAWS = MongoDBAWS;
+async function makeTempCredentials(credentials, awsCredentialFetcher) {
+ function makeMongoCredentialsFromAWSTemp(creds) {
+ // The AWS session token (creds.Token) may or may not be set.
+ if (!creds.AccessKeyId || !creds.SecretAccessKey) {
+ throw new error_1.MongoMissingCredentialsError('Could not obtain temporary MONGODB-AWS credentials');
+ }
+ return new mongo_credentials_1.MongoCredentials({
+ username: creds.AccessKeyId,
+ password: creds.SecretAccessKey,
+ source: credentials.source,
+ mechanism: providers_1.AuthMechanism.MONGODB_AWS,
+ mechanismProperties: {
+ AWS_SESSION_TOKEN: creds.Token
+ }
+ });
+ }
+ const temporaryCredentials = await awsCredentialFetcher.getCredentials();
+ return makeMongoCredentialsFromAWSTemp(temporaryCredentials);
+}
+function deriveRegion(host) {
+ const parts = host.split('.');
+ if (parts.length === 1 || parts[1] === 'amazonaws') {
+ return 'us-east-1';
+ }
+ return parts[1];
+}
+//# sourceMappingURL=mongodb_aws.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js.map
new file mode 100644
index 000000000..738485d96
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mongodb_aws.js","sourceRoot":"","sources":["../../../src/cmap/auth/mongodb_aws.ts"],"names":[],"mappings":";;;AACA,mCAAmC;AACnC,qCAAkC;AAClC,uCAIqB;AACrB,uCAAyE;AACzE,mDAAiE;AACjE,2EAKqC;AACrC,2DAAuD;AACvD,2CAA4C;AAE5C,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,MAAM,WAAW,GAAyB;IAC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B,CAChC,WAA6B,EAC7B,oBAAoD;IAEpD,SAAS,+BAA+B,CAAC,KAAyB;QAChE,6DAA6D;QAC7D,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;YAChD,MAAM,IAAI,oCAA4B,CAAC,oDAAoD,CAAC,CAAC;SAC9F;QAED,OAAO,IAAI,oCAAgB,CAAC;YAC1B,QAAQ,EAAE,KAAK,CAAC,WAAW;YAC3B,QAAQ,EAAE,KAAK,CAAC,eAAe;YAC/B,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,SAAS,EAAE,yBAAa,CAAC,WAAW;YACpC,mBAAmB,EAAE;gBACnB,iBAAiB,EAAE,KAAK,CAAC,KAAK;aAC/B;SACF,CAAC,CAAC;IACL,CAAC;IACD,MAAM,oBAAoB,GAAG,MAAM,oBAAoB,CAAC,cAAc,EAAE,CAAC;IAEzE,OAAO,+BAA+B,CAAC,oBAAoB,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,WAAW,EAAE;QAClD,OAAO,WAAW,CAAC;KACpB;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js
new file mode 100644
index 000000000..050cf8aa1
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js
@@ -0,0 +1,68 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MongoDBOIDC = exports.OIDC_WORKFLOWS = void 0;
+const error_1 = require("../../error");
+const auth_provider_1 = require("./auth_provider");
+const aws_service_workflow_1 = require("./mongodb_oidc/aws_service_workflow");
+const azure_service_workflow_1 = require("./mongodb_oidc/azure_service_workflow");
+const callback_workflow_1 = require("./mongodb_oidc/callback_workflow");
+/** Error when credentials are missing. */
+const MISSING_CREDENTIALS_ERROR = 'AuthContext must provide credentials.';
+/** @internal */
+exports.OIDC_WORKFLOWS = new Map();
+exports.OIDC_WORKFLOWS.set('callback', new callback_workflow_1.CallbackWorkflow());
+exports.OIDC_WORKFLOWS.set('aws', new aws_service_workflow_1.AwsServiceWorkflow());
+exports.OIDC_WORKFLOWS.set('azure', new azure_service_workflow_1.AzureServiceWorkflow());
+/**
+ * OIDC auth provider.
+ * @experimental
+ */
+class MongoDBOIDC extends auth_provider_1.AuthProvider {
+ /**
+ * Instantiate the auth provider.
+ */
+ constructor() {
+ super();
+ }
+ /**
+ * Authenticate using OIDC
+ */
+ async auth(authContext) {
+ const { connection, reauthenticating, response } = authContext;
+ const credentials = getCredentials(authContext);
+ const workflow = getWorkflow(credentials);
+ await workflow.execute(connection, credentials, reauthenticating, response);
+ }
+ /**
+ * Add the speculative auth for the initial handshake.
+ */
+ async prepare(handshakeDoc, authContext) {
+ const credentials = getCredentials(authContext);
+ const workflow = getWorkflow(credentials);
+ const result = await workflow.speculativeAuth(credentials);
+ return { ...handshakeDoc, ...result };
+ }
+}
+exports.MongoDBOIDC = MongoDBOIDC;
+/**
+ * Get credentials from the auth context, throwing if they do not exist.
+ */
+function getCredentials(authContext) {
+ const { credentials } = authContext;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError(MISSING_CREDENTIALS_ERROR);
+ }
+ return credentials;
+}
+/**
+ * Gets either a device workflow or callback workflow.
+ */
+function getWorkflow(credentials) {
+ const providerName = credentials.mechanismProperties.PROVIDER_NAME;
+ const workflow = exports.OIDC_WORKFLOWS.get(providerName || 'callback');
+ if (!workflow) {
+ throw new error_1.MongoInvalidArgumentError(`Could not load workflow for provider ${credentials.mechanismProperties.PROVIDER_NAME}`);
+ }
+ return workflow;
+}
+//# sourceMappingURL=mongodb_oidc.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js.map
new file mode 100644
index 000000000..60dcbabd7
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mongodb_oidc.js","sourceRoot":"","sources":["../../../src/cmap/auth/mongodb_oidc.ts"],"names":[],"mappings":";;;AAEA,uCAAsF;AAGtF,mDAAiE;AAEjE,8EAAyE;AACzE,kFAA6E;AAC7E,wEAAoE;AAEpE,0CAA0C;AAC1C,MAAM,yBAAyB,GAAG,uCAAuC,CAAC;AAuE1E,gBAAgB;AACH,QAAA,cAAc,GAAgC,IAAI,GAAG,EAAE,CAAC;AACrE,sBAAc,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,oCAAgB,EAAE,CAAC,CAAC;AACvD,sBAAc,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,yCAAkB,EAAE,CAAC,CAAC;AACpD,sBAAc,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,6CAAoB,EAAE,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAa,WAAY,SAAQ,4BAAY;IAC3C;;OAEG;IACH;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED;;OAEG;IACM,KAAK,CAAC,IAAI,CAAC,WAAwB;QAC1C,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QAC/D,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;QAC1C,MAAM,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACM,KAAK,CAAC,OAAO,CACpB,YAA+B,EAC/B,WAAwB;QAExB,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,EAAE,GAAG,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC;IACxC,CAAC;CACF;AA9BD,kCA8BC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,WAAwB;IAC9C,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;IACpC,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,oCAA4B,CAAC,yBAAyB,CAAC,CAAC;KACnE;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,WAA6B;IAChD,MAAM,YAAY,GAAG,WAAW,CAAC,mBAAmB,CAAC,aAAa,CAAC;IACnE,MAAM,QAAQ,GAAG,sBAAc,CAAC,GAAG,CAAC,YAAY,IAAI,UAAU,CAAC,CAAC;IAChE,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,iCAAyB,CACjC,wCAAwC,WAAW,CAAC,mBAAmB,CAAC,aAAa,EAAE,CACxF,CAAC;KACH;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js
new file mode 100644
index 000000000..fe063c838
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AwsServiceWorkflow = void 0;
+const fs = require("fs");
+const error_1 = require("../../../error");
+const service_workflow_1 = require("./service_workflow");
+/** Error for when the token is missing in the environment. */
+const TOKEN_MISSING_ERROR = 'AWS_WEB_IDENTITY_TOKEN_FILE must be set in the environment.';
+/**
+ * Device workflow implementation for AWS.
+ *
+ * @internal
+ */
+class AwsServiceWorkflow extends service_workflow_1.ServiceWorkflow {
+ constructor() {
+ super();
+ }
+ /**
+ * Get the token from the environment.
+ */
+ async getToken() {
+ const tokenFile = process.env.AWS_WEB_IDENTITY_TOKEN_FILE;
+ if (!tokenFile) {
+ throw new error_1.MongoAWSError(TOKEN_MISSING_ERROR);
+ }
+ return await fs.promises.readFile(tokenFile, 'utf8');
+ }
+}
+exports.AwsServiceWorkflow = AwsServiceWorkflow;
+//# sourceMappingURL=aws_service_workflow.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js.map
new file mode 100644
index 000000000..fdadfed1a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"aws_service_workflow.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/aws_service_workflow.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AAEzB,0CAA+C;AAC/C,yDAAqD;AAErD,8DAA8D;AAC9D,MAAM,mBAAmB,GAAG,6DAA6D,CAAC;AAE1F;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,kCAAe;IACrD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ;QACZ,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;QAC1D,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,qBAAa,CAAC,mBAAmB,CAAC,CAAC;SAC9C;QACD,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;CACF;AAfD,gDAeC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_service_workflow.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_service_workflow.js
new file mode 100644
index 000000000..e5984e42d
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_service_workflow.js
@@ -0,0 +1,73 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AzureServiceWorkflow = void 0;
+const error_1 = require("../../../error");
+const utils_1 = require("../../../utils");
+const azure_token_cache_1 = require("./azure_token_cache");
+const service_workflow_1 = require("./service_workflow");
+/** Base URL for getting Azure tokens. */
+const AZURE_BASE_URL = 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01';
+/** Azure request headers. */
+const AZURE_HEADERS = Object.freeze({ Metadata: 'true', Accept: 'application/json' });
+/** Invalid endpoint result error. */
+const ENDPOINT_RESULT_ERROR = 'Azure endpoint did not return a value with only access_token and expires_in properties';
+/** Error for when the token audience is missing in the environment. */
+const TOKEN_AUDIENCE_MISSING_ERROR = 'TOKEN_AUDIENCE must be set in the auth mechanism properties when PROVIDER_NAME is azure.';
+/**
+ * Device workflow implementation for Azure.
+ *
+ * @internal
+ */
+class AzureServiceWorkflow extends service_workflow_1.ServiceWorkflow {
+ constructor() {
+ super(...arguments);
+ this.cache = new azure_token_cache_1.AzureTokenCache();
+ }
+ /**
+ * Get the token from the environment.
+ */
+ async getToken(credentials) {
+ const tokenAudience = credentials?.mechanismProperties.TOKEN_AUDIENCE;
+ if (!tokenAudience) {
+ throw new error_1.MongoAzureError(TOKEN_AUDIENCE_MISSING_ERROR);
+ }
+ let token;
+ const entry = this.cache.getEntry(tokenAudience);
+ if (entry?.isValid()) {
+ token = entry.token;
+ }
+ else {
+ this.cache.deleteEntry(tokenAudience);
+ const response = await getAzureTokenData(tokenAudience);
+ if (!isEndpointResultValid(response)) {
+ throw new error_1.MongoAzureError(ENDPOINT_RESULT_ERROR);
+ }
+ this.cache.addEntry(tokenAudience, response);
+ token = response.access_token;
+ }
+ return token;
+ }
+}
+exports.AzureServiceWorkflow = AzureServiceWorkflow;
+/**
+ * Hit the Azure endpoint to get the token data.
+ */
+async function getAzureTokenData(tokenAudience) {
+ const url = `${AZURE_BASE_URL}&resource=${tokenAudience}`;
+ const data = await (0, utils_1.request)(url, {
+ json: true,
+ headers: AZURE_HEADERS
+ });
+ return data;
+}
+/**
+ * Determines if a result returned from the endpoint is valid.
+ * This means the result is not nullish, contains the access_token required field
+ * and the expires_in required field.
+ */
+function isEndpointResultValid(token) {
+ if (token == null || typeof token !== 'object')
+ return false;
+ return 'access_token' in token && 'expires_in' in token;
+}
+//# sourceMappingURL=azure_service_workflow.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_service_workflow.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_service_workflow.js.map
new file mode 100644
index 000000000..cbc885d9a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_service_workflow.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"azure_service_workflow.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/azure_service_workflow.ts"],"names":[],"mappings":";;;AAAA,0CAAiD;AACjD,0CAAyC;AAEzC,2DAAsD;AACtD,yDAAqD;AAErD,yCAAyC;AACzC,MAAM,cAAc,GAClB,8EAA8E,CAAC;AAEjF,6BAA6B;AAC7B,MAAM,aAAa,GAAG,MAAM,CAAC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AC;IAC1D,MAAM,IAAI,GAAG,MAAM,IAAA,eAAO,EAAC,GAAG,EAAE;QAC9B,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,aAAa;KACvB,CAAC,CAAC;IACH,OAAO,IAAwB,CAAC;AAClC,CAAC;AAED;;;;GAIG;AACH,SAAS,qBAAqB,CAC5B,KAAc;IAEd,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC7D,OAAO,cAAc,IAAI,KAAK,IAAI,YAAY,IAAI,KAAK,CAAC;AAC1D,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_token_cache.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_token_cache.js
new file mode 100644
index 000000000..845750bd5
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_token_cache.js
@@ -0,0 +1,49 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AzureTokenCache = exports.AzureTokenEntry = void 0;
+const cache_1 = require("./cache");
+/** @internal */
+class AzureTokenEntry extends cache_1.ExpiringCacheEntry {
+ /**
+ * Instantiate the entry.
+ */
+ constructor(token, expiration) {
+ super(expiration);
+ this.token = token;
+ }
+}
+exports.AzureTokenEntry = AzureTokenEntry;
+/**
+ * A cache of access tokens from Azure.
+ * @internal
+ */
+class AzureTokenCache extends cache_1.Cache {
+ /**
+ * Add an entry to the cache.
+ */
+ addEntry(tokenAudience, token) {
+ const entry = new AzureTokenEntry(token.access_token, token.expires_in);
+ this.entries.set(tokenAudience, entry);
+ return entry;
+ }
+ /**
+ * Create a cache key.
+ */
+ cacheKey(tokenAudience) {
+ return tokenAudience;
+ }
+ /**
+ * Delete an entry from the cache.
+ */
+ deleteEntry(tokenAudience) {
+ this.entries.delete(tokenAudience);
+ }
+ /**
+ * Get an Azure token entry from the cache.
+ */
+ getEntry(tokenAudience) {
+ return this.entries.get(tokenAudience);
+ }
+}
+exports.AzureTokenCache = AzureTokenCache;
+//# sourceMappingURL=azure_token_cache.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_token_cache.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_token_cache.js.map
new file mode 100644
index 000000000..86b816373
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_token_cache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"azure_token_cache.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/azure_token_cache.ts"],"names":[],"mappings":";;;AACA,mCAAoD;AAEpD,gBAAgB;AAChB,MAAa,eAAgB,SAAQ,0BAAkB;IAGrD;;OAEG;IACH,YAAY,KAAa,EAAE,UAAkB;QAC3C,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAVD,0CAUC;AAED;;;GAGG;AACH,MAAa,eAAgB,SAAQ,aAAsB;IACzD;;OAEG;IACH,QAAQ,CAAC,aAAqB,EAAE,KAAuB;QACrD,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QACxE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACvC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,aAAqB;QAC5B,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,aAAqB;QAC/B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,aAAqB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACzC,CAAC;CACF;AA9BD,0CA8BC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/cache.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/cache.js
new file mode 100644
index 000000000..2f08551e2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/cache.js
@@ -0,0 +1,55 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Cache = exports.ExpiringCacheEntry = void 0;
+/* 5 minutes in milliseconds */
+const EXPIRATION_BUFFER_MS = 300000;
+/**
+ * An entry in a cache that can expire in a certain amount of time.
+ */
+class ExpiringCacheEntry {
+ /**
+ * Create a new expiring token entry.
+ */
+ constructor(expiration) {
+ this.expiration = this.expirationTime(expiration);
+ }
+ /**
+ * The entry is still valid if the expiration is more than
+ * 5 minutes from the expiration time.
+ */
+ isValid() {
+ return this.expiration - Date.now() > EXPIRATION_BUFFER_MS;
+ }
+ /**
+ * Get an expiration time in milliseconds past epoch.
+ */
+ expirationTime(expiresInSeconds) {
+ return Date.now() + expiresInSeconds * 1000;
+ }
+}
+exports.ExpiringCacheEntry = ExpiringCacheEntry;
+/**
+ * Base class for OIDC caches.
+ */
+class Cache {
+ /**
+ * Create a new cache.
+ */
+ constructor() {
+ this.entries = new Map();
+ }
+ /**
+ * Clear the cache.
+ */
+ clear() {
+ this.entries.clear();
+ }
+ /**
+ * Create a cache key from the address and username.
+ */
+ hashedCacheKey(address, username, callbackHash) {
+ return JSON.stringify([address, username, callbackHash]);
+ }
+}
+exports.Cache = Cache;
+//# sourceMappingURL=cache.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/cache.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/cache.js.map
new file mode 100644
index 000000000..34ad50c10
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/cache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/cache.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAEpC;;GAEG;AACH,MAAsB,kBAAkB;IAGtC;;OAEG;IACH,YAAY,UAAkB;QAC5B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC;IACD;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,oBAAoB,CAAC;IAC7D,CAAC;IAED;;OAEG;IACK,cAAc,CAAC,gBAAwB;QAC7C,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAC9C,CAAC;CACF;AAvBD,gDAuBC;AAED;;GAEG;AACH,MAAsB,KAAK;IAGzB;;OAEG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAa,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAOD;;OAEG;IACH,cAAc,CAAC,OAAe,EAAE,QAAgB,EAAE,YAAoB;QACpE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF;AA5BD,sBA4BC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_lock_cache.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_lock_cache.js
new file mode 100644
index 000000000..8f8aa98c9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_lock_cache.js
@@ -0,0 +1,90 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CallbackLockCache = void 0;
+const error_1 = require("../../../error");
+const cache_1 = require("./cache");
+/** Error message for when request callback is missing. */
+const REQUEST_CALLBACK_REQUIRED_ERROR = 'Auth mechanism property REQUEST_TOKEN_CALLBACK is required.';
+/* Counter for function "hashes".*/
+let FN_HASH_COUNTER = 0;
+/* No function present function */
+const NO_FUNCTION = async () => ({ accessToken: 'test' });
+/* The map of function hashes */
+const FN_HASHES = new WeakMap();
+/* Put the no function hash in the map. */
+FN_HASHES.set(NO_FUNCTION, FN_HASH_COUNTER);
+/**
+ * A cache of request and refresh callbacks per server/user.
+ */
+class CallbackLockCache extends cache_1.Cache {
+ /**
+ * Get the callbacks for the connection and credentials. If an entry does not
+ * exist a new one will get set.
+ */
+ getEntry(connection, credentials) {
+ const requestCallback = credentials.mechanismProperties.REQUEST_TOKEN_CALLBACK;
+ const refreshCallback = credentials.mechanismProperties.REFRESH_TOKEN_CALLBACK;
+ if (!requestCallback) {
+ throw new error_1.MongoInvalidArgumentError(REQUEST_CALLBACK_REQUIRED_ERROR);
+ }
+ const callbackHash = hashFunctions(requestCallback, refreshCallback);
+ const key = this.cacheKey(connection.address, credentials.username, callbackHash);
+ const entry = this.entries.get(key);
+ if (entry) {
+ return entry;
+ }
+ return this.addEntry(key, callbackHash, requestCallback, refreshCallback);
+ }
+ /**
+ * Set locked callbacks on for connection and credentials.
+ */
+ addEntry(key, callbackHash, requestCallback, refreshCallback) {
+ const entry = {
+ requestCallback: withLock(requestCallback),
+ refreshCallback: refreshCallback ? withLock(refreshCallback) : undefined,
+ callbackHash: callbackHash
+ };
+ this.entries.set(key, entry);
+ return entry;
+ }
+ /**
+ * Create a cache key from the address and username.
+ */
+ cacheKey(address, username, callbackHash) {
+ return this.hashedCacheKey(address, username, callbackHash);
+ }
+}
+exports.CallbackLockCache = CallbackLockCache;
+/**
+ * Ensure the callback is only executed one at a time.
+ */
+function withLock(callback) {
+ let lock = Promise.resolve();
+ return async (info, context) => {
+ await lock;
+ // eslint-disable-next-line github/no-then
+ lock = lock.then(() => callback(info, context));
+ return await lock;
+ };
+}
+/**
+ * Get the hash string for the request and refresh functions.
+ */
+function hashFunctions(requestFn, refreshFn) {
+ let requestHash = FN_HASHES.get(requestFn);
+ let refreshHash = FN_HASHES.get(refreshFn ?? NO_FUNCTION);
+ if (requestHash == null) {
+ // Create a new one for the function and put it in the map.
+ FN_HASH_COUNTER++;
+ requestHash = FN_HASH_COUNTER;
+ FN_HASHES.set(requestFn, FN_HASH_COUNTER);
+ }
+ if (refreshHash == null && refreshFn) {
+ // Create a new one for the function and put it in the map.
+ FN_HASH_COUNTER++;
+ refreshHash = FN_HASH_COUNTER;
+ FN_HASHES.set(refreshFn, FN_HASH_COUNTER);
+ }
+ return `${requestHash}-${refreshHash}`;
+}
+//# sourceMappingURL=callback_lock_cache.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_lock_cache.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_lock_cache.js.map
new file mode 100644
index 000000000..86aa0d619
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_lock_cache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"callback_lock_cache.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/callback_lock_cache.ts"],"names":[],"mappings":";;;AAAA,0CAA2D;AAU3D,mCAAgC;AAEhC,0DAA0D;AAC1D,MAAM,+BAA+B,GACnC,6DAA6D,CAAC;AAChE,mCAAmC;AACnC,IAAI,eAAe,GAAG,CAAC,CAAC;AACxB,kCAAkC;AAClC,MAAM,WAAW,GAAwB,KAAK,IAAI,E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CAAC;AACzC,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js
new file mode 100644
index 000000000..34ad9a94c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js
@@ -0,0 +1,204 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CallbackWorkflow = void 0;
+const bson_1 = require("bson");
+const error_1 = require("../../../error");
+const utils_1 = require("../../../utils");
+const providers_1 = require("../providers");
+const callback_lock_cache_1 = require("./callback_lock_cache");
+const token_entry_cache_1 = require("./token_entry_cache");
+/** The current version of OIDC implementation. */
+const OIDC_VERSION = 0;
+/** 5 minutes in seconds */
+const TIMEOUT_S = 300;
+/** Properties allowed on results of callbacks. */
+const RESULT_PROPERTIES = ['accessToken', 'expiresInSeconds', 'refreshToken'];
+/** Error message when the callback result is invalid. */
+const CALLBACK_RESULT_ERROR = 'User provided OIDC callbacks must return a valid object with an accessToken.';
+/**
+ * OIDC implementation of a callback based workflow.
+ * @internal
+ */
+class CallbackWorkflow {
+ /**
+ * Instantiate the workflow
+ */
+ constructor() {
+ this.cache = new token_entry_cache_1.TokenEntryCache();
+ this.callbackCache = new callback_lock_cache_1.CallbackLockCache();
+ }
+ /**
+ * Get the document to add for speculative authentication. This also needs
+ * to add a db field from the credentials source.
+ */
+ async speculativeAuth(credentials) {
+ const document = startCommandDocument(credentials);
+ document.db = credentials.source;
+ return { speculativeAuthenticate: document };
+ }
+ /**
+ * Execute the OIDC callback workflow.
+ */
+ async execute(connection, credentials, reauthenticating, response) {
+ // Get the callbacks with locks from the callback lock cache.
+ const { requestCallback, refreshCallback, callbackHash } = this.callbackCache.getEntry(connection, credentials);
+ // Look for an existing entry in the cache.
+ const entry = this.cache.getEntry(connection.address, credentials.username, callbackHash);
+ let result;
+ if (entry) {
+ // Reauthentication cannot use a token from the cache since the server has
+ // stated it is invalid by the request for reauthentication.
+ if (entry.isValid() && !reauthenticating) {
+ // Presence of a valid cache entry means we can skip to the finishing step.
+ result = await this.finishAuthentication(connection, credentials, entry.tokenResult, response?.speculativeAuthenticate?.conversationId);
+ }
+ else {
+ // Presence of an expired cache entry means we must fetch a new one and
+ // then execute the final step.
+ const tokenResult = await this.fetchAccessToken(connection, credentials, entry.serverInfo, reauthenticating, callbackHash, requestCallback, refreshCallback);
+ try {
+ result = await this.finishAuthentication(connection, credentials, tokenResult, reauthenticating ? undefined : response?.speculativeAuthenticate?.conversationId);
+ }
+ catch (error) {
+ // If we are reauthenticating and this errors with reauthentication
+ // required, we need to do the entire process over again and clear
+ // the cache entry.
+ if (reauthenticating &&
+ error instanceof error_1.MongoError &&
+ error.code === error_1.MONGODB_ERROR_CODES.Reauthenticate) {
+ this.cache.deleteEntry(connection.address, credentials.username, callbackHash);
+ result = await this.execute(connection, credentials, reauthenticating);
+ }
+ else {
+ throw error;
+ }
+ }
+ }
+ }
+ else {
+ // No entry in the cache requires us to do all authentication steps
+ // from start to finish, including getting a fresh token for the cache.
+ const startDocument = await this.startAuthentication(connection, credentials, reauthenticating, response);
+ const conversationId = startDocument.conversationId;
+ const serverResult = bson_1.BSON.deserialize(startDocument.payload.buffer);
+ const tokenResult = await this.fetchAccessToken(connection, credentials, serverResult, reauthenticating, callbackHash, requestCallback, refreshCallback);
+ result = await this.finishAuthentication(connection, credentials, tokenResult, conversationId);
+ }
+ return result;
+ }
+ /**
+ * Starts the callback authentication process. If there is a speculative
+ * authentication document from the initial handshake, then we will use that
+ * value to get the issuer, otherwise we will send the saslStart command.
+ */
+ async startAuthentication(connection, credentials, reauthenticating, response) {
+ let result;
+ if (!reauthenticating && response?.speculativeAuthenticate) {
+ result = response.speculativeAuthenticate;
+ }
+ else {
+ result = await connection.command((0, utils_1.ns)(credentials.source), startCommandDocument(credentials), undefined);
+ }
+ return result;
+ }
+ /**
+ * Finishes the callback authentication process.
+ */
+ async finishAuthentication(connection, credentials, tokenResult, conversationId) {
+ const result = await connection.command((0, utils_1.ns)(credentials.source), finishCommandDocument(tokenResult.accessToken, conversationId), undefined);
+ return result;
+ }
+ /**
+ * Fetches an access token using either the request or refresh callbacks and
+ * puts it in the cache.
+ */
+ async fetchAccessToken(connection, credentials, serverInfo, reauthenticating, callbackHash, requestCallback, refreshCallback) {
+ // Get the token from the cache.
+ const entry = this.cache.getEntry(connection.address, credentials.username, callbackHash);
+ let result;
+ const context = { timeoutSeconds: TIMEOUT_S, version: OIDC_VERSION };
+ // Check if there's a token in the cache.
+ if (entry) {
+ // If the cache entry is valid, return the token result.
+ if (entry.isValid() && !reauthenticating) {
+ return entry.tokenResult;
+ }
+ // If the cache entry is not valid, remove it from the cache and first attempt
+ // to use the refresh callback to get a new token. If no refresh callback
+ // exists, then fallback to the request callback.
+ if (refreshCallback) {
+ context.refreshToken = entry.tokenResult.refreshToken;
+ result = await refreshCallback(serverInfo, context);
+ }
+ else {
+ result = await requestCallback(serverInfo, context);
+ }
+ }
+ else {
+ // With no token in the cache we use the request callback.
+ result = await requestCallback(serverInfo, context);
+ }
+ // Validate that the result returned by the callback is acceptable. If it is not
+ // we must clear the token result from the cache.
+ if (isCallbackResultInvalid(result)) {
+ this.cache.deleteEntry(connection.address, credentials.username, callbackHash);
+ throw new error_1.MongoMissingCredentialsError(CALLBACK_RESULT_ERROR);
+ }
+ // Cleanup the cache.
+ this.cache.deleteExpiredEntries();
+ // Put the new entry into the cache.
+ this.cache.addEntry(connection.address, credentials.username || '', callbackHash, result, serverInfo);
+ return result;
+ }
+}
+exports.CallbackWorkflow = CallbackWorkflow;
+/**
+ * Generate the finishing command document for authentication. Will be a
+ * saslStart or saslContinue depending on the presence of a conversation id.
+ */
+function finishCommandDocument(token, conversationId) {
+ if (conversationId != null && typeof conversationId === 'number') {
+ return {
+ saslContinue: 1,
+ conversationId: conversationId,
+ payload: new bson_1.Binary(bson_1.BSON.serialize({ jwt: token }))
+ };
+ }
+ // saslContinue requires a conversationId in the command to be valid so in this
+ // case the server allows "step two" to actually be a saslStart with the token
+ // as the jwt since the use of the cached value has no correlating conversating
+ // on the particular connection.
+ return {
+ saslStart: 1,
+ mechanism: providers_1.AuthMechanism.MONGODB_OIDC,
+ payload: new bson_1.Binary(bson_1.BSON.serialize({ jwt: token }))
+ };
+}
+/**
+ * Determines if a result returned from a request or refresh callback
+ * function is invalid. This means the result is nullish, doesn't contain
+ * the accessToken required field, and does not contain extra fields.
+ */
+function isCallbackResultInvalid(tokenResult) {
+ if (tokenResult == null || typeof tokenResult !== 'object')
+ return true;
+ if (!('accessToken' in tokenResult))
+ return true;
+ return !Object.getOwnPropertyNames(tokenResult).every(prop => RESULT_PROPERTIES.includes(prop));
+}
+/**
+ * Generate the saslStart command document.
+ */
+function startCommandDocument(credentials) {
+ const payload = {};
+ if (credentials.username) {
+ payload.n = credentials.username;
+ }
+ return {
+ saslStart: 1,
+ autoAuthorize: 1,
+ mechanism: providers_1.AuthMechanism.MONGODB_OIDC,
+ payload: new bson_1.Binary(bson_1.BSON.serialize(payload))
+ };
+}
+//# sourceMappingURL=callback_workflow.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js.map
new file mode 100644
index 000000000..ac85e9b5f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"callback_workflow.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/callback_workflow.ts"],"names":[],"mappings":";;;AAAA,+BAAmD;AAEnD,0CAA+F;AAC/F,0CAAoC;AAWpC,4CAA6C;AAC7C,+DAA0D;AAC1D,2DAAsD;AAEtD,kDAAkD;AAClD,MAAM,YA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AAC,OAAO,CAAC,CAAC;KAC7C,CAAC;AACJ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/service_workflow.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/service_workflow.js
new file mode 100644
index 000000000..9f25dbfb9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/service_workflow.js
@@ -0,0 +1,43 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.commandDocument = exports.ServiceWorkflow = void 0;
+const bson_1 = require("bson");
+const utils_1 = require("../../../utils");
+const providers_1 = require("../providers");
+/**
+ * Common behaviour for OIDC device workflows.
+ * @internal
+ */
+class ServiceWorkflow {
+ /**
+ * Execute the workflow. Looks for AWS_WEB_IDENTITY_TOKEN_FILE in the environment
+ * and then attempts to read the token from that path.
+ */
+ async execute(connection, credentials) {
+ const token = await this.getToken(credentials);
+ const command = commandDocument(token);
+ return await connection.command((0, utils_1.ns)(credentials.source), command, undefined);
+ }
+ /**
+ * Get the document to add for speculative authentication.
+ */
+ async speculativeAuth(credentials) {
+ const token = await this.getToken(credentials);
+ const document = commandDocument(token);
+ document.db = credentials.source;
+ return { speculativeAuthenticate: document };
+ }
+}
+exports.ServiceWorkflow = ServiceWorkflow;
+/**
+ * Create the saslStart command document.
+ */
+function commandDocument(token) {
+ return {
+ saslStart: 1,
+ mechanism: providers_1.AuthMechanism.MONGODB_OIDC,
+ payload: bson_1.BSON.serialize({ jwt: token })
+ };
+}
+exports.commandDocument = commandDocument;
+//# sourceMappingURL=service_workflow.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/service_workflow.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/service_workflow.js.map
new file mode 100644
index 000000000..08093f7a4
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/service_workflow.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"service_workflow.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/service_workflow.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAE3C,0CAAoC;AAIpC,4CAA6C;AAE7C;;;GAGG;AACH,MAAsB,eAAe;IACnC;;;OAGG;IACH,KAAK,CAAC,OAAO,CAAC,UAAsB,EAAE,WAA6B;QACjE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC,IAAA,UAAE,EAAC,WAAW,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CAAC,WAA6B;QACjD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QACxC,QAAQ,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC;QACjC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,CAAC;IAC/C,CAAC;CAMF;AAzBD,0CAyBC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,KAAa;IAC3C,OAAO;QACL,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,yBAAa,CAAC,YAAY;QACrC,OAAO,EAAE,WAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;KACxC,CAAC;AACJ,CAAC;AAND,0CAMC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_entry_cache.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_entry_cache.js
new file mode 100644
index 000000000..35cdbbe49
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_entry_cache.js
@@ -0,0 +1,62 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TokenEntryCache = exports.TokenEntry = void 0;
+const cache_1 = require("./cache");
+/* Default expiration is now for when no expiration provided */
+const DEFAULT_EXPIRATION_SECS = 0;
+/** @internal */
+class TokenEntry extends cache_1.ExpiringCacheEntry {
+ /**
+ * Instantiate the entry.
+ */
+ constructor(tokenResult, serverInfo, expiration) {
+ super(expiration);
+ this.tokenResult = tokenResult;
+ this.serverInfo = serverInfo;
+ }
+}
+exports.TokenEntry = TokenEntry;
+/**
+ * Cache of OIDC token entries.
+ * @internal
+ */
+class TokenEntryCache extends cache_1.Cache {
+ /**
+ * Set an entry in the token cache.
+ */
+ addEntry(address, username, callbackHash, tokenResult, serverInfo) {
+ const entry = new TokenEntry(tokenResult, serverInfo, tokenResult.expiresInSeconds ?? DEFAULT_EXPIRATION_SECS);
+ this.entries.set(this.cacheKey(address, username, callbackHash), entry);
+ return entry;
+ }
+ /**
+ * Delete an entry from the cache.
+ */
+ deleteEntry(address, username, callbackHash) {
+ this.entries.delete(this.cacheKey(address, username, callbackHash));
+ }
+ /**
+ * Get an entry from the cache.
+ */
+ getEntry(address, username, callbackHash) {
+ return this.entries.get(this.cacheKey(address, username, callbackHash));
+ }
+ /**
+ * Delete all expired entries from the cache.
+ */
+ deleteExpiredEntries() {
+ for (const [key, entry] of this.entries) {
+ if (!entry.isValid()) {
+ this.entries.delete(key);
+ }
+ }
+ }
+ /**
+ * Create a cache key from the address and username.
+ */
+ cacheKey(address, username, callbackHash) {
+ return this.hashedCacheKey(address, username, callbackHash);
+ }
+}
+exports.TokenEntryCache = TokenEntryCache;
+//# sourceMappingURL=token_entry_cache.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_entry_cache.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_entry_cache.js.map
new file mode 100644
index 000000000..039953724
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_entry_cache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"token_entry_cache.js","sourceRoot":"","sources":["../../../../src/cmap/auth/mongodb_oidc/token_entry_cache.ts"],"names":[],"mappings":";;;AACA,mCAAoD;AAEpD,+DAA+D;AAC/D,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,gBAAgB;AAChB,MAAa,UAAW,SAAQ,0BAAkB;IAIhD;;OAEG;IACH,YAAY,WAA8B,EAAE,UAAyB,EAAE,UAAkB;QACvF,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAZD,gCAYC;AAED;;;GAGG;AACH,MAAa,eAAgB,SAAQ,aAAiB;IACpD;;OAEG;IACH,QAAQ,CACN,OAAe,EACf,QAAgB,EAChB,YAAoB,EACpB,WAA8B,EAC9B,UAAyB;QAEzB,MAAM,KAAK,GAAG,IAAI,UAAU,CAC1B,WAAW,EACX,UAAU,EACV,WAAW,CAAC,gBAAgB,IAAI,uBAAuB,CACxD,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,OAAe,EAAE,QAAgB,EAAE,YAAoB;QACjE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,QAAgB,EAAE,YAAoB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,oBAAoB;QAClB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE;YACvC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE;gBACpB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aAC1B;SACF;IACH,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,QAAgB,EAAE,YAAoB;QAC9D,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC;CACF;AAnDD,0CAmDC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/plain.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/plain.js
new file mode 100644
index 000000000..7d197ab2a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/plain.js
@@ -0,0 +1,26 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Plain = void 0;
+const bson_1 = require("../../bson");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const auth_provider_1 = require("./auth_provider");
+class Plain extends auth_provider_1.AuthProvider {
+ async auth(authContext) {
+ const { connection, credentials } = authContext;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ const { username, password } = credentials;
+ const payload = new bson_1.Binary(Buffer.from(`\x00${username}\x00${password}`));
+ const command = {
+ saslStart: 1,
+ mechanism: 'PLAIN',
+ payload: payload,
+ autoAuthorize: 1
+ };
+ await connection.command((0, utils_1.ns)('$external.$cmd'), command, undefined);
+ }
+}
+exports.Plain = Plain;
+//# sourceMappingURL=plain.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/plain.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/plain.js.map
new file mode 100644
index 000000000..70accddec
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/plain.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"plain.js","sourceRoot":"","sources":["../../../src/cmap/auth/plain.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AACpC,uCAA2D;AAC3D,uCAAiC;AACjC,mDAAiE;AAEjE,MAAa,KAAM,SAAQ,4BAAY;IAC5B,KAAK,CAAC,IAAI,CAAC,WAAwB;QAC1C,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;QAChD,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,oCAA4B,CAAC,uCAAuC,CAAC,CAAC;SACjF;QAED,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QAE3C,MAAM,OAAO,GAAG,IAAI,aAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,OAAO,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC1E,MAAM,OAAO,GAAG;YACd,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE,OAAO;YAChB,aAAa,EAAE,CAAC;SACjB,CAAC;QAEF,MAAM,UAAU,CAAC,OAAO,CAAC,IAAA,UAAE,EAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;CACF;AAnBD,sBAmBC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/providers.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/providers.js
new file mode 100644
index 000000000..a546512ee
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/providers.js
@@ -0,0 +1,24 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AUTH_MECHS_AUTH_SRC_EXTERNAL = exports.AuthMechanism = void 0;
+/** @public */
+exports.AuthMechanism = Object.freeze({
+ MONGODB_AWS: 'MONGODB-AWS',
+ MONGODB_CR: 'MONGODB-CR',
+ MONGODB_DEFAULT: 'DEFAULT',
+ MONGODB_GSSAPI: 'GSSAPI',
+ MONGODB_PLAIN: 'PLAIN',
+ MONGODB_SCRAM_SHA1: 'SCRAM-SHA-1',
+ MONGODB_SCRAM_SHA256: 'SCRAM-SHA-256',
+ MONGODB_X509: 'MONGODB-X509',
+ /** @experimental */
+ MONGODB_OIDC: 'MONGODB-OIDC'
+});
+/** @internal */
+exports.AUTH_MECHS_AUTH_SRC_EXTERNAL = new Set([
+ exports.AuthMechanism.MONGODB_GSSAPI,
+ exports.AuthMechanism.MONGODB_AWS,
+ exports.AuthMechanism.MONGODB_OIDC,
+ exports.AuthMechanism.MONGODB_X509
+]);
+//# sourceMappingURL=providers.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/providers.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/providers.js.map
new file mode 100644
index 000000000..8f1776575
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/providers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/cmap/auth/providers.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACD,QAAA,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,eAAe,EAAE,SAAS;IAC1B,cAAc,EAAE,QAAQ;IACxB,aAAa,EAAE,OAAO;IACtB,kBAAkB,EAAE,aAAa;IACjC,oBAAoB,EAAE,eAAe;IACrC,YAAY,EAAE,cAAc;IAC5B,oBAAoB;IACpB,YAAY,EAAE,cAAc;CACpB,CAAC,CAAC;AAKZ,gBAAgB;AACH,QAAA,4BAA4B,GAAG,IAAI,GAAG,CAAgB;IACjE,qBAAa,CAAC,cAAc;IAC5B,qBAAa,CAAC,WAAW;IACzB,qBAAa,CAAC,YAAY;IAC1B,qBAAa,CAAC,YAAY;CAC3B,CAAC,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/scram.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/scram.js
new file mode 100644
index 000000000..eb7fe59f2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/scram.js
@@ -0,0 +1,254 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ScramSHA256 = exports.ScramSHA1 = void 0;
+const saslprep_1 = require("@mongodb-js/saslprep");
+const crypto = require("crypto");
+const bson_1 = require("../../bson");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const auth_provider_1 = require("./auth_provider");
+const providers_1 = require("./providers");
+class ScramSHA extends auth_provider_1.AuthProvider {
+ constructor(cryptoMethod) {
+ super();
+ this.cryptoMethod = cryptoMethod || 'sha1';
+ }
+ async prepare(handshakeDoc, authContext) {
+ const cryptoMethod = this.cryptoMethod;
+ const credentials = authContext.credentials;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ const nonce = await (0, utils_1.randomBytes)(24);
+ // store the nonce for later use
+ authContext.nonce = nonce;
+ const request = {
+ ...handshakeDoc,
+ speculativeAuthenticate: {
+ ...makeFirstMessage(cryptoMethod, credentials, nonce),
+ db: credentials.source
+ }
+ };
+ return request;
+ }
+ async auth(authContext) {
+ const { reauthenticating, response } = authContext;
+ if (response?.speculativeAuthenticate && !reauthenticating) {
+ return await continueScramConversation(this.cryptoMethod, response.speculativeAuthenticate, authContext);
+ }
+ return await executeScram(this.cryptoMethod, authContext);
+ }
+}
+function cleanUsername(username) {
+ return username.replace('=', '=3D').replace(',', '=2C');
+}
+function clientFirstMessageBare(username, nonce) {
+ // NOTE: This is done b/c Javascript uses UTF-16, but the server is hashing in UTF-8.
+ // Since the username is not sasl-prep-d, we need to do this here.
+ return Buffer.concat([
+ Buffer.from('n=', 'utf8'),
+ Buffer.from(username, 'utf8'),
+ Buffer.from(',r=', 'utf8'),
+ Buffer.from(nonce.toString('base64'), 'utf8')
+ ]);
+}
+function makeFirstMessage(cryptoMethod, credentials, nonce) {
+ const username = cleanUsername(credentials.username);
+ const mechanism = cryptoMethod === 'sha1' ? providers_1.AuthMechanism.MONGODB_SCRAM_SHA1 : providers_1.AuthMechanism.MONGODB_SCRAM_SHA256;
+ // NOTE: This is done b/c Javascript uses UTF-16, but the server is hashing in UTF-8.
+ // Since the username is not sasl-prep-d, we need to do this here.
+ return {
+ saslStart: 1,
+ mechanism,
+ payload: new bson_1.Binary(Buffer.concat([Buffer.from('n,,', 'utf8'), clientFirstMessageBare(username, nonce)])),
+ autoAuthorize: 1,
+ options: { skipEmptyExchange: true }
+ };
+}
+async function executeScram(cryptoMethod, authContext) {
+ const { connection, credentials } = authContext;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ if (!authContext.nonce) {
+ throw new error_1.MongoInvalidArgumentError('AuthContext must contain a valid nonce property');
+ }
+ const nonce = authContext.nonce;
+ const db = credentials.source;
+ const saslStartCmd = makeFirstMessage(cryptoMethod, credentials, nonce);
+ const response = await connection.command((0, utils_1.ns)(`${db}.$cmd`), saslStartCmd, undefined);
+ await continueScramConversation(cryptoMethod, response, authContext);
+}
+async function continueScramConversation(cryptoMethod, response, authContext) {
+ const connection = authContext.connection;
+ const credentials = authContext.credentials;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ if (!authContext.nonce) {
+ throw new error_1.MongoInvalidArgumentError('Unable to continue SCRAM without valid nonce');
+ }
+ const nonce = authContext.nonce;
+ const db = credentials.source;
+ const username = cleanUsername(credentials.username);
+ const password = credentials.password;
+ const processedPassword = cryptoMethod === 'sha256' ? (0, saslprep_1.saslprep)(password) : passwordDigest(username, password);
+ const payload = Buffer.isBuffer(response.payload)
+ ? new bson_1.Binary(response.payload)
+ : response.payload;
+ const dict = parsePayload(payload);
+ const iterations = parseInt(dict.i, 10);
+ if (iterations && iterations < 4096) {
+ // TODO(NODE-3483)
+ throw new error_1.MongoRuntimeError(`Server returned an invalid iteration count ${iterations}`);
+ }
+ const salt = dict.s;
+ const rnonce = dict.r;
+ if (rnonce.startsWith('nonce')) {
+ // TODO(NODE-3483)
+ throw new error_1.MongoRuntimeError(`Server returned an invalid nonce: ${rnonce}`);
+ }
+ // Set up start of proof
+ const withoutProof = `c=biws,r=${rnonce}`;
+ const saltedPassword = HI(processedPassword, Buffer.from(salt, 'base64'), iterations, cryptoMethod);
+ const clientKey = HMAC(cryptoMethod, saltedPassword, 'Client Key');
+ const serverKey = HMAC(cryptoMethod, saltedPassword, 'Server Key');
+ const storedKey = H(cryptoMethod, clientKey);
+ const authMessage = [
+ clientFirstMessageBare(username, nonce),
+ payload.toString('utf8'),
+ withoutProof
+ ].join(',');
+ const clientSignature = HMAC(cryptoMethod, storedKey, authMessage);
+ const clientProof = `p=${xor(clientKey, clientSignature)}`;
+ const clientFinal = [withoutProof, clientProof].join(',');
+ const serverSignature = HMAC(cryptoMethod, serverKey, authMessage);
+ const saslContinueCmd = {
+ saslContinue: 1,
+ conversationId: response.conversationId,
+ payload: new bson_1.Binary(Buffer.from(clientFinal))
+ };
+ const r = await connection.command((0, utils_1.ns)(`${db}.$cmd`), saslContinueCmd, undefined);
+ const parsedResponse = parsePayload(r.payload);
+ if (!compareDigest(Buffer.from(parsedResponse.v, 'base64'), serverSignature)) {
+ throw new error_1.MongoRuntimeError('Server returned an invalid signature');
+ }
+ if (r.done !== false) {
+ // If the server sends r.done === true we can save one RTT
+ return;
+ }
+ const retrySaslContinueCmd = {
+ saslContinue: 1,
+ conversationId: r.conversationId,
+ payload: Buffer.alloc(0)
+ };
+ await connection.command((0, utils_1.ns)(`${db}.$cmd`), retrySaslContinueCmd, undefined);
+}
+function parsePayload(payload) {
+ const payloadStr = payload.toString('utf8');
+ const dict = {};
+ const parts = payloadStr.split(',');
+ for (let i = 0; i < parts.length; i++) {
+ const valueParts = (parts[i].match(/^([^=]*)=(.*)$/) ?? []).slice(1);
+ dict[valueParts[0]] = valueParts[1];
+ }
+ return dict;
+}
+function passwordDigest(username, password) {
+ if (typeof username !== 'string') {
+ throw new error_1.MongoInvalidArgumentError('Username must be a string');
+ }
+ if (typeof password !== 'string') {
+ throw new error_1.MongoInvalidArgumentError('Password must be a string');
+ }
+ if (password.length === 0) {
+ throw new error_1.MongoInvalidArgumentError('Password cannot be empty');
+ }
+ let md5;
+ try {
+ md5 = crypto.createHash('md5');
+ }
+ catch (err) {
+ if (crypto.getFips()) {
+ // This error is (slightly) more helpful than what comes from OpenSSL directly, e.g.
+ // 'Error: error:060800C8:digital envelope routines:EVP_DigestInit_ex:disabled for FIPS'
+ throw new Error('Auth mechanism SCRAM-SHA-1 is not supported in FIPS mode');
+ }
+ throw err;
+ }
+ md5.update(`${username}:mongo:${password}`, 'utf8');
+ return md5.digest('hex');
+}
+// XOR two buffers
+function xor(a, b) {
+ if (!Buffer.isBuffer(a)) {
+ a = Buffer.from(a);
+ }
+ if (!Buffer.isBuffer(b)) {
+ b = Buffer.from(b);
+ }
+ const length = Math.max(a.length, b.length);
+ const res = [];
+ for (let i = 0; i < length; i += 1) {
+ res.push(a[i] ^ b[i]);
+ }
+ return Buffer.from(res).toString('base64');
+}
+function H(method, text) {
+ return crypto.createHash(method).update(text).digest();
+}
+function HMAC(method, key, text) {
+ return crypto.createHmac(method, key).update(text).digest();
+}
+let _hiCache = {};
+let _hiCacheCount = 0;
+function _hiCachePurge() {
+ _hiCache = {};
+ _hiCacheCount = 0;
+}
+const hiLengthMap = {
+ sha256: 32,
+ sha1: 20
+};
+function HI(data, salt, iterations, cryptoMethod) {
+ // omit the work if already generated
+ const key = [data, salt.toString('base64'), iterations].join('_');
+ if (_hiCache[key] != null) {
+ return _hiCache[key];
+ }
+ // generate the salt
+ const saltedData = crypto.pbkdf2Sync(data, salt, iterations, hiLengthMap[cryptoMethod], cryptoMethod);
+ // cache a copy to speed up the next lookup, but prevent unbounded cache growth
+ if (_hiCacheCount >= 200) {
+ _hiCachePurge();
+ }
+ _hiCache[key] = saltedData;
+ _hiCacheCount += 1;
+ return saltedData;
+}
+function compareDigest(lhs, rhs) {
+ if (lhs.length !== rhs.length) {
+ return false;
+ }
+ if (typeof crypto.timingSafeEqual === 'function') {
+ return crypto.timingSafeEqual(lhs, rhs);
+ }
+ let result = 0;
+ for (let i = 0; i < lhs.length; i++) {
+ result |= lhs[i] ^ rhs[i];
+ }
+ return result === 0;
+}
+class ScramSHA1 extends ScramSHA {
+ constructor() {
+ super('sha1');
+ }
+}
+exports.ScramSHA1 = ScramSHA1;
+class ScramSHA256 extends ScramSHA {
+ constructor() {
+ super('sha256');
+ }
+}
+exports.ScramSHA256 = ScramSHA256;
+//# sourceMappingURL=scram.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/scram.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/scram.js.map
new file mode 100644
index 000000000..7bd9f399a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/scram.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"scram.js","sourceRoot":"","sources":["../../../src/cmap/auth/scram.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,iCAAiC;AAEjC,qCAAmD;AACnD,uCAIqB;AACrB,uCAA8C;AAE9C,mDAAiE;AAEjE,2CAA4C;AAI5C,MAAM,QAAS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,EAAE,CAAC,EAAE,EAAE;QACnC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;KAC3B;IAED,OAAO,MAAM,KAAK,CAAC,CAAC;AACtB,CAAC;AAED,MAAa,SAAU,SAAQ,QAAQ;IACrC;QACE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;CACF;AAJD,8BAIC;AAED,MAAa,WAAY,SAAQ,QAAQ;IACvC;QACE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClB,CAAC;CACF;AAJD,kCAIC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/x509.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/x509.js
new file mode 100644
index 000000000..6f431c49f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/x509.js
@@ -0,0 +1,36 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.X509 = void 0;
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const auth_provider_1 = require("./auth_provider");
+class X509 extends auth_provider_1.AuthProvider {
+ async prepare(handshakeDoc, authContext) {
+ const { credentials } = authContext;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ return { ...handshakeDoc, speculativeAuthenticate: x509AuthenticateCommand(credentials) };
+ }
+ async auth(authContext) {
+ const connection = authContext.connection;
+ const credentials = authContext.credentials;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('AuthContext must provide credentials.');
+ }
+ const response = authContext.response;
+ if (response?.speculativeAuthenticate) {
+ return;
+ }
+ await connection.command((0, utils_1.ns)('$external.$cmd'), x509AuthenticateCommand(credentials), undefined);
+ }
+}
+exports.X509 = X509;
+function x509AuthenticateCommand(credentials) {
+ const command = { authenticate: 1, mechanism: 'MONGODB-X509' };
+ if (credentials.username) {
+ command.user = credentials.username;
+ }
+ return command;
+}
+//# sourceMappingURL=x509.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/x509.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/x509.js.map
new file mode 100644
index 000000000..2429b5877
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/auth/x509.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"x509.js","sourceRoot":"","sources":["../../../src/cmap/auth/x509.ts"],"names":[],"mappings":";;;AACA,uCAA2D;AAC3D,uCAAiC;AAEjC,mDAAiE;AAGjE,MAAa,IAAK,SAAQ,4BAAY;IAC3B,KAAK,CAAC,OAAO,CACpB,YAA+B,EAC/B,WAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;QACpC,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,oCAA4B,CAAC,uCAAuC,CAAC,CAAC;SACjF;QACD,OAAO,EAAE,GAAG,YAAY,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,WAAW,CAAC,EAAE,CAAC;IAC5F,CAAC;IAEQ,KAAK,CAAC,IAAI,CAAC,WAAwB;QAC1C,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QAC1C,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;QAC5C,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,oCAA4B,CAAC,uCAAuC,CAAC,CAAC;SACjF;QACD,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;QAEtC,IAAI,QAAQ,EAAE,uBAAuB,EAAE;YACrC,OAAO;SACR;QAED,MAAM,UAAU,CAAC,OAAO,CAAC,IAAA,UAAE,EAAC,gBAAgB,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAC;IAClG,CAAC;CACF;AA1BD,oBA0BC;AAED,SAAS,uBAAuB,CAAC,WAA6B;IAC5D,MAAM,OAAO,GAAa,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;IACzE,IAAI,WAAW,CAAC,QAAQ,EAAE;QACxB,OAAO,CAAC,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC;KACrC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/command_monitoring_events.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/command_monitoring_events.js
new file mode 100644
index 000000000..0969033ee
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/command_monitoring_events.js
@@ -0,0 +1,253 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SENSITIVE_COMMANDS = exports.CommandFailedEvent = exports.CommandSucceededEvent = exports.CommandStartedEvent = void 0;
+const constants_1 = require("../constants");
+const utils_1 = require("../utils");
+const commands_1 = require("./commands");
+/**
+ * An event indicating the start of a given command
+ * @public
+ * @category Event
+ */
+class CommandStartedEvent {
+ /**
+ * Create a started event
+ *
+ * @internal
+ * @param pool - the pool that originated the command
+ * @param command - the command
+ */
+ constructor(connection, command, serverConnectionId) {
+ /** @internal */
+ this.name = constants_1.COMMAND_STARTED;
+ const cmd = extractCommand(command);
+ const commandName = extractCommandName(cmd);
+ const { address, connectionId, serviceId } = extractConnectionDetails(connection);
+ // TODO: remove in major revision, this is not spec behavior
+ if (exports.SENSITIVE_COMMANDS.has(commandName)) {
+ this.commandObj = {};
+ this.commandObj[commandName] = true;
+ }
+ this.address = address;
+ this.connectionId = connectionId;
+ this.serviceId = serviceId;
+ this.requestId = command.requestId;
+ this.databaseName = command.databaseName;
+ this.commandName = commandName;
+ this.command = maybeRedact(commandName, cmd, cmd);
+ this.serverConnectionId = serverConnectionId;
+ }
+ /* @internal */
+ get hasServiceId() {
+ return !!this.serviceId;
+ }
+}
+exports.CommandStartedEvent = CommandStartedEvent;
+/**
+ * An event indicating the success of a given command
+ * @public
+ * @category Event
+ */
+class CommandSucceededEvent {
+ /**
+ * Create a succeeded event
+ *
+ * @internal
+ * @param pool - the pool that originated the command
+ * @param command - the command
+ * @param reply - the reply for this command from the server
+ * @param started - a high resolution tuple timestamp of when the command was first sent, to calculate duration
+ */
+ constructor(connection, command, reply, started, serverConnectionId) {
+ /** @internal */
+ this.name = constants_1.COMMAND_SUCCEEDED;
+ const cmd = extractCommand(command);
+ const commandName = extractCommandName(cmd);
+ const { address, connectionId, serviceId } = extractConnectionDetails(connection);
+ this.address = address;
+ this.connectionId = connectionId;
+ this.serviceId = serviceId;
+ this.requestId = command.requestId;
+ this.commandName = commandName;
+ this.duration = (0, utils_1.calculateDurationInMs)(started);
+ this.reply = maybeRedact(commandName, cmd, extractReply(command, reply));
+ this.serverConnectionId = serverConnectionId;
+ }
+ /* @internal */
+ get hasServiceId() {
+ return !!this.serviceId;
+ }
+}
+exports.CommandSucceededEvent = CommandSucceededEvent;
+/**
+ * An event indicating the failure of a given command
+ * @public
+ * @category Event
+ */
+class CommandFailedEvent {
+ /**
+ * Create a failure event
+ *
+ * @internal
+ * @param pool - the pool that originated the command
+ * @param command - the command
+ * @param error - the generated error or a server error response
+ * @param started - a high resolution tuple timestamp of when the command was first sent, to calculate duration
+ */
+ constructor(connection, command, error, started, serverConnectionId) {
+ /** @internal */
+ this.name = constants_1.COMMAND_FAILED;
+ const cmd = extractCommand(command);
+ const commandName = extractCommandName(cmd);
+ const { address, connectionId, serviceId } = extractConnectionDetails(connection);
+ this.address = address;
+ this.connectionId = connectionId;
+ this.serviceId = serviceId;
+ this.requestId = command.requestId;
+ this.commandName = commandName;
+ this.duration = (0, utils_1.calculateDurationInMs)(started);
+ this.failure = maybeRedact(commandName, cmd, error);
+ this.serverConnectionId = serverConnectionId;
+ }
+ /* @internal */
+ get hasServiceId() {
+ return !!this.serviceId;
+ }
+}
+exports.CommandFailedEvent = CommandFailedEvent;
+/**
+ * Commands that we want to redact because of the sensitive nature of their contents
+ * @internal
+ */
+exports.SENSITIVE_COMMANDS = new Set([
+ 'authenticate',
+ 'saslStart',
+ 'saslContinue',
+ 'getnonce',
+ 'createUser',
+ 'updateUser',
+ 'copydbgetnonce',
+ 'copydbsaslstart',
+ 'copydb'
+]);
+const HELLO_COMMANDS = new Set(['hello', constants_1.LEGACY_HELLO_COMMAND, constants_1.LEGACY_HELLO_COMMAND_CAMEL_CASE]);
+// helper methods
+const extractCommandName = (commandDoc) => Object.keys(commandDoc)[0];
+const namespace = (command) => command.ns;
+const collectionName = (command) => command.ns.split('.')[1];
+const maybeRedact = (commandName, commandDoc, result) => exports.SENSITIVE_COMMANDS.has(commandName) ||
+ (HELLO_COMMANDS.has(commandName) && commandDoc.speculativeAuthenticate)
+ ? {}
+ : result;
+const LEGACY_FIND_QUERY_MAP = {
+ $query: 'filter',
+ $orderby: 'sort',
+ $hint: 'hint',
+ $comment: 'comment',
+ $maxScan: 'maxScan',
+ $max: 'max',
+ $min: 'min',
+ $returnKey: 'returnKey',
+ $showDiskLoc: 'showRecordId',
+ $maxTimeMS: 'maxTimeMS',
+ $snapshot: 'snapshot'
+};
+const LEGACY_FIND_OPTIONS_MAP = {
+ numberToSkip: 'skip',
+ numberToReturn: 'batchSize',
+ returnFieldSelector: 'projection'
+};
+const OP_QUERY_KEYS = [
+ 'tailable',
+ 'oplogReplay',
+ 'noCursorTimeout',
+ 'awaitData',
+ 'partial',
+ 'exhaust'
+];
+/** Extract the actual command from the query, possibly up-converting if it's a legacy format */
+function extractCommand(command) {
+ if (command instanceof commands_1.OpMsgRequest) {
+ return (0, utils_1.deepCopy)(command.command);
+ }
+ if (command.query?.$query) {
+ let result;
+ if (command.ns === 'admin.$cmd') {
+ // up-convert legacy command
+ result = Object.assign({}, command.query.$query);
+ }
+ else {
+ // up-convert legacy find command
+ result = { find: collectionName(command) };
+ Object.keys(LEGACY_FIND_QUERY_MAP).forEach(key => {
+ if (command.query[key] != null) {
+ result[LEGACY_FIND_QUERY_MAP[key]] = (0, utils_1.deepCopy)(command.query[key]);
+ }
+ });
+ }
+ Object.keys(LEGACY_FIND_OPTIONS_MAP).forEach(key => {
+ const legacyKey = key;
+ if (command[legacyKey] != null) {
+ result[LEGACY_FIND_OPTIONS_MAP[legacyKey]] = (0, utils_1.deepCopy)(command[legacyKey]);
+ }
+ });
+ OP_QUERY_KEYS.forEach(key => {
+ if (command[key]) {
+ result[key] = command[key];
+ }
+ });
+ if (command.pre32Limit != null) {
+ result.limit = command.pre32Limit;
+ }
+ if (command.query.$explain) {
+ return { explain: result };
+ }
+ return result;
+ }
+ const clonedQuery = {};
+ const clonedCommand = {};
+ if (command.query) {
+ for (const k in command.query) {
+ clonedQuery[k] = (0, utils_1.deepCopy)(command.query[k]);
+ }
+ clonedCommand.query = clonedQuery;
+ }
+ for (const k in command) {
+ if (k === 'query')
+ continue;
+ clonedCommand[k] = (0, utils_1.deepCopy)(command[k]);
+ }
+ return command.query ? clonedQuery : clonedCommand;
+}
+function extractReply(command, reply) {
+ if (!reply) {
+ return reply;
+ }
+ if (command instanceof commands_1.OpMsgRequest) {
+ return (0, utils_1.deepCopy)(reply.result ? reply.result : reply);
+ }
+ // is this a legacy find command?
+ if (command.query && command.query.$query != null) {
+ return {
+ ok: 1,
+ cursor: {
+ id: (0, utils_1.deepCopy)(reply.cursorId),
+ ns: namespace(command),
+ firstBatch: (0, utils_1.deepCopy)(reply.documents)
+ }
+ };
+ }
+ return (0, utils_1.deepCopy)(reply.result ? reply.result : reply);
+}
+function extractConnectionDetails(connection) {
+ let connectionId;
+ if ('id' in connection) {
+ connectionId = connection.id;
+ }
+ return {
+ address: connection.address,
+ serviceId: connection.serviceId,
+ connectionId
+ };
+}
+//# sourceMappingURL=command_monitoring_events.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/command_monitoring_events.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/command_monitoring_events.js.map
new file mode 100644
index 000000000..0b26ecb84
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/command_monitoring_events.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"command_monitoring_events.js","sourceRoot":"","sources":["../../src/cmap/command_monitoring_events.ts"],"names":[],"mappings":";;;AACA,4CAMsB;AACtB,oCAA2D;AAC3D,yCAA8F;AAG9F;;;;GAIG;AACH,MAAa,mBAAmB;IAmB9B;;;;;;OAMG;IACH,YACE,UAAsB,EACtB,OAAiC,EACjC,kBAAiC;QAbnC,gBAAgB;QAChB,SAAI,GAAG,2BAAe,CAAC;QAcrB,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,WAAW,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,wBAAwB,CAAC,UAAU,CAAC,CAAC;QAElF,4DAA4D;QAC5D,IAAI,0BAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACvC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;YACrB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;SACrC;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAClD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAC/C,CAAC;IAED,eAAe;IACf,IAAI,YAAY;QACd,OAAO,CAAC,CAAC,IAAI,CAAC,SAA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CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,wBAAwB,CAAC,UAAsB;IACtD,IAAI,YAAY,CAAC;IACjB,IAAI,IAAI,IAAI,UAAU,EAAE;QACtB,YAAY,GAAG,UAAU,CAAC,EAAE,CAAC;KAC9B;IACD,OAAO;QACL,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,YAAY;KACb,CAAC;AACJ,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/commands.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/commands.js
new file mode 100644
index 000000000..1c6388374
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/commands.js
@@ -0,0 +1,444 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OpCompressedRequest = exports.OpMsgResponse = exports.OpMsgRequest = exports.OpReply = exports.OpQueryRequest = void 0;
+const BSON = require("../bson");
+const error_1 = require("../error");
+const compression_1 = require("./wire_protocol/compression");
+const constants_1 = require("./wire_protocol/constants");
+// Incrementing request id
+let _requestId = 0;
+// Query flags
+const OPTS_TAILABLE_CURSOR = 2;
+const OPTS_SECONDARY = 4;
+const OPTS_OPLOG_REPLAY = 8;
+const OPTS_NO_CURSOR_TIMEOUT = 16;
+const OPTS_AWAIT_DATA = 32;
+const OPTS_EXHAUST = 64;
+const OPTS_PARTIAL = 128;
+// Response flags
+const CURSOR_NOT_FOUND = 1;
+const QUERY_FAILURE = 2;
+const SHARD_CONFIG_STALE = 4;
+const AWAIT_CAPABLE = 8;
+/** @internal */
+class OpQueryRequest {
+ constructor(databaseName, query, options) {
+ this.databaseName = databaseName;
+ this.query = query;
+ // Basic options needed to be passed in
+ // TODO(NODE-3483): Replace with MongoCommandError
+ const ns = `${databaseName}.$cmd`;
+ if (typeof databaseName !== 'string') {
+ throw new error_1.MongoRuntimeError('Database name must be a string for a query');
+ }
+ // TODO(NODE-3483): Replace with MongoCommandError
+ if (query == null)
+ throw new error_1.MongoRuntimeError('A query document must be specified for query');
+ // Validate that we are not passing 0x00 in the collection name
+ if (ns.indexOf('\x00') !== -1) {
+ // TODO(NODE-3483): Use MongoNamespace static method
+ throw new error_1.MongoRuntimeError('Namespace cannot contain a null character');
+ }
+ // Basic options
+ this.ns = ns;
+ // Additional options
+ this.numberToSkip = options.numberToSkip || 0;
+ this.numberToReturn = options.numberToReturn || 0;
+ this.returnFieldSelector = options.returnFieldSelector || undefined;
+ this.requestId = options.requestId ?? OpQueryRequest.getRequestId();
+ // special case for pre-3.2 find commands, delete ASAP
+ this.pre32Limit = options.pre32Limit;
+ // Serialization option
+ this.serializeFunctions =
+ typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined =
+ typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : false;
+ this.maxBsonSize = options.maxBsonSize || 1024 * 1024 * 16;
+ this.checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ this.batchSize = this.numberToReturn;
+ // Flags
+ this.tailable = false;
+ this.secondaryOk = typeof options.secondaryOk === 'boolean' ? options.secondaryOk : false;
+ this.oplogReplay = false;
+ this.noCursorTimeout = false;
+ this.awaitData = false;
+ this.exhaust = false;
+ this.partial = false;
+ }
+ /** Assign next request Id. */
+ incRequestId() {
+ this.requestId = _requestId++;
+ }
+ /** Peek next request Id. */
+ nextRequestId() {
+ return _requestId + 1;
+ }
+ /** Increment then return next request Id. */
+ static getRequestId() {
+ return ++_requestId;
+ }
+ // Uses a single allocated buffer for the process, avoiding multiple memory allocations
+ toBin() {
+ const buffers = [];
+ let projection = null;
+ // Set up the flags
+ let flags = 0;
+ if (this.tailable) {
+ flags |= OPTS_TAILABLE_CURSOR;
+ }
+ if (this.secondaryOk) {
+ flags |= OPTS_SECONDARY;
+ }
+ if (this.oplogReplay) {
+ flags |= OPTS_OPLOG_REPLAY;
+ }
+ if (this.noCursorTimeout) {
+ flags |= OPTS_NO_CURSOR_TIMEOUT;
+ }
+ if (this.awaitData) {
+ flags |= OPTS_AWAIT_DATA;
+ }
+ if (this.exhaust) {
+ flags |= OPTS_EXHAUST;
+ }
+ if (this.partial) {
+ flags |= OPTS_PARTIAL;
+ }
+ // If batchSize is different to this.numberToReturn
+ if (this.batchSize !== this.numberToReturn)
+ this.numberToReturn = this.batchSize;
+ // Allocate write protocol header buffer
+ const header = Buffer.alloc(4 * 4 + // Header
+ 4 + // Flags
+ Buffer.byteLength(this.ns) +
+ 1 + // namespace
+ 4 + // numberToSkip
+ 4 // numberToReturn
+ );
+ // Add header to buffers
+ buffers.push(header);
+ // Serialize the query
+ const query = BSON.serialize(this.query, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined
+ });
+ // Add query document
+ buffers.push(query);
+ if (this.returnFieldSelector && Object.keys(this.returnFieldSelector).length > 0) {
+ // Serialize the projection document
+ projection = BSON.serialize(this.returnFieldSelector, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined
+ });
+ // Add projection document
+ buffers.push(projection);
+ }
+ // Total message size
+ const totalLength = header.length + query.length + (projection ? projection.length : 0);
+ // Set up the index
+ let index = 4;
+ // Write total document length
+ header[3] = (totalLength >> 24) & 0xff;
+ header[2] = (totalLength >> 16) & 0xff;
+ header[1] = (totalLength >> 8) & 0xff;
+ header[0] = totalLength & 0xff;
+ // Write header information requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = this.requestId & 0xff;
+ index = index + 4;
+ // Write header information responseTo
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = 0 & 0xff;
+ index = index + 4;
+ // Write header information OP_QUERY
+ header[index + 3] = (constants_1.OP_QUERY >> 24) & 0xff;
+ header[index + 2] = (constants_1.OP_QUERY >> 16) & 0xff;
+ header[index + 1] = (constants_1.OP_QUERY >> 8) & 0xff;
+ header[index] = constants_1.OP_QUERY & 0xff;
+ index = index + 4;
+ // Write header information flags
+ header[index + 3] = (flags >> 24) & 0xff;
+ header[index + 2] = (flags >> 16) & 0xff;
+ header[index + 1] = (flags >> 8) & 0xff;
+ header[index] = flags & 0xff;
+ index = index + 4;
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+ // Write header information flags numberToSkip
+ header[index + 3] = (this.numberToSkip >> 24) & 0xff;
+ header[index + 2] = (this.numberToSkip >> 16) & 0xff;
+ header[index + 1] = (this.numberToSkip >> 8) & 0xff;
+ header[index] = this.numberToSkip & 0xff;
+ index = index + 4;
+ // Write header information flags numberToReturn
+ header[index + 3] = (this.numberToReturn >> 24) & 0xff;
+ header[index + 2] = (this.numberToReturn >> 16) & 0xff;
+ header[index + 1] = (this.numberToReturn >> 8) & 0xff;
+ header[index] = this.numberToReturn & 0xff;
+ index = index + 4;
+ // Return the buffers
+ return buffers;
+ }
+}
+exports.OpQueryRequest = OpQueryRequest;
+/** @internal */
+class OpReply {
+ constructor(message, msgHeader, msgBody, opts) {
+ this.index = 0;
+ this.sections = [];
+ /** moreToCome is an OP_MSG only concept */
+ this.moreToCome = false;
+ this.parsed = false;
+ this.raw = message;
+ this.data = msgBody;
+ this.opts = opts ?? {
+ useBigInt64: false,
+ promoteLongs: true,
+ promoteValues: true,
+ promoteBuffers: false,
+ bsonRegExp: false
+ };
+ // Read the message header
+ this.length = msgHeader.length;
+ this.requestId = msgHeader.requestId;
+ this.responseTo = msgHeader.responseTo;
+ this.opCode = msgHeader.opCode;
+ this.fromCompressed = msgHeader.fromCompressed;
+ // Flag values
+ this.useBigInt64 = typeof this.opts.useBigInt64 === 'boolean' ? this.opts.useBigInt64 : false;
+ this.promoteLongs = typeof this.opts.promoteLongs === 'boolean' ? this.opts.promoteLongs : true;
+ this.promoteValues =
+ typeof this.opts.promoteValues === 'boolean' ? this.opts.promoteValues : true;
+ this.promoteBuffers =
+ typeof this.opts.promoteBuffers === 'boolean' ? this.opts.promoteBuffers : false;
+ this.bsonRegExp = typeof this.opts.bsonRegExp === 'boolean' ? this.opts.bsonRegExp : false;
+ }
+ isParsed() {
+ return this.parsed;
+ }
+ parse() {
+ // Don't parse again if not needed
+ if (this.parsed)
+ return this.sections[0];
+ // Position within OP_REPLY at which documents start
+ // (See https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol/#wire-op-reply)
+ this.index = 20;
+ // Read the message body
+ this.responseFlags = this.data.readInt32LE(0);
+ this.cursorId = new BSON.Long(this.data.readInt32LE(4), this.data.readInt32LE(8));
+ this.startingFrom = this.data.readInt32LE(12);
+ this.numberReturned = this.data.readInt32LE(16);
+ if (this.numberReturned < 0 || this.numberReturned > 2 ** 32 - 1) {
+ throw new RangeError(`OP_REPLY numberReturned is an invalid array length ${this.numberReturned}`);
+ }
+ this.cursorNotFound = (this.responseFlags & CURSOR_NOT_FOUND) !== 0;
+ this.queryFailure = (this.responseFlags & QUERY_FAILURE) !== 0;
+ this.shardConfigStale = (this.responseFlags & SHARD_CONFIG_STALE) !== 0;
+ this.awaitCapable = (this.responseFlags & AWAIT_CAPABLE) !== 0;
+ // Parse Body
+ for (let i = 0; i < this.numberReturned; i++) {
+ const bsonSize = this.data[this.index] |
+ (this.data[this.index + 1] << 8) |
+ (this.data[this.index + 2] << 16) |
+ (this.data[this.index + 3] << 24);
+ const section = this.data.subarray(this.index, this.index + bsonSize);
+ this.sections.push(section);
+ // Adjust the index
+ this.index = this.index + bsonSize;
+ }
+ // Set parsed
+ this.parsed = true;
+ return this.sections[0];
+ }
+}
+exports.OpReply = OpReply;
+// Msg Flags
+const OPTS_CHECKSUM_PRESENT = 1;
+const OPTS_MORE_TO_COME = 2;
+const OPTS_EXHAUST_ALLOWED = 1 << 16;
+/** @internal */
+class OpMsgRequest {
+ constructor(databaseName, command, options) {
+ this.databaseName = databaseName;
+ this.command = command;
+ this.options = options;
+ // Basic options needed to be passed in
+ if (command == null)
+ throw new error_1.MongoInvalidArgumentError('Query document must be specified for query');
+ // Basic options
+ this.command.$db = databaseName;
+ // Ensure empty options
+ this.options = options ?? {};
+ // Additional options
+ this.requestId = options.requestId ? options.requestId : OpMsgRequest.getRequestId();
+ // Serialization option
+ this.serializeFunctions =
+ typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined =
+ typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : false;
+ this.checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
+ this.maxBsonSize = options.maxBsonSize || 1024 * 1024 * 16;
+ // flags
+ this.checksumPresent = false;
+ this.moreToCome = options.moreToCome || false;
+ this.exhaustAllowed =
+ typeof options.exhaustAllowed === 'boolean' ? options.exhaustAllowed : false;
+ }
+ toBin() {
+ const buffers = [];
+ let flags = 0;
+ if (this.checksumPresent) {
+ flags |= OPTS_CHECKSUM_PRESENT;
+ }
+ if (this.moreToCome) {
+ flags |= OPTS_MORE_TO_COME;
+ }
+ if (this.exhaustAllowed) {
+ flags |= OPTS_EXHAUST_ALLOWED;
+ }
+ const header = Buffer.alloc(4 * 4 + // Header
+ 4 // Flags
+ );
+ buffers.push(header);
+ let totalLength = header.length;
+ const command = this.command;
+ totalLength += this.makeDocumentSegment(buffers, command);
+ header.writeInt32LE(totalLength, 0); // messageLength
+ header.writeInt32LE(this.requestId, 4); // requestID
+ header.writeInt32LE(0, 8); // responseTo
+ header.writeInt32LE(constants_1.OP_MSG, 12); // opCode
+ header.writeUInt32LE(flags, 16); // flags
+ return buffers;
+ }
+ makeDocumentSegment(buffers, document) {
+ const payloadTypeBuffer = Buffer.alloc(1);
+ payloadTypeBuffer[0] = 0;
+ const documentBuffer = this.serializeBson(document);
+ buffers.push(payloadTypeBuffer);
+ buffers.push(documentBuffer);
+ return payloadTypeBuffer.length + documentBuffer.length;
+ }
+ serializeBson(document) {
+ return BSON.serialize(document, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined
+ });
+ }
+ static getRequestId() {
+ _requestId = (_requestId + 1) & 0x7fffffff;
+ return _requestId;
+ }
+}
+exports.OpMsgRequest = OpMsgRequest;
+/** @internal */
+class OpMsgResponse {
+ constructor(message, msgHeader, msgBody, opts) {
+ this.index = 0;
+ this.sections = [];
+ this.parsed = false;
+ this.raw = message;
+ this.data = msgBody;
+ this.opts = opts ?? {
+ useBigInt64: false,
+ promoteLongs: true,
+ promoteValues: true,
+ promoteBuffers: false,
+ bsonRegExp: false
+ };
+ // Read the message header
+ this.length = msgHeader.length;
+ this.requestId = msgHeader.requestId;
+ this.responseTo = msgHeader.responseTo;
+ this.opCode = msgHeader.opCode;
+ this.fromCompressed = msgHeader.fromCompressed;
+ // Read response flags
+ this.responseFlags = msgBody.readInt32LE(0);
+ this.checksumPresent = (this.responseFlags & OPTS_CHECKSUM_PRESENT) !== 0;
+ this.moreToCome = (this.responseFlags & OPTS_MORE_TO_COME) !== 0;
+ this.exhaustAllowed = (this.responseFlags & OPTS_EXHAUST_ALLOWED) !== 0;
+ this.useBigInt64 = typeof this.opts.useBigInt64 === 'boolean' ? this.opts.useBigInt64 : false;
+ this.promoteLongs = typeof this.opts.promoteLongs === 'boolean' ? this.opts.promoteLongs : true;
+ this.promoteValues =
+ typeof this.opts.promoteValues === 'boolean' ? this.opts.promoteValues : true;
+ this.promoteBuffers =
+ typeof this.opts.promoteBuffers === 'boolean' ? this.opts.promoteBuffers : false;
+ this.bsonRegExp = typeof this.opts.bsonRegExp === 'boolean' ? this.opts.bsonRegExp : false;
+ }
+ isParsed() {
+ return this.parsed;
+ }
+ parse() {
+ // Don't parse again if not needed
+ if (this.parsed)
+ return this.sections[0];
+ this.index = 4;
+ while (this.index < this.data.length) {
+ const payloadType = this.data.readUInt8(this.index++);
+ if (payloadType === 0) {
+ const bsonSize = this.data.readUInt32LE(this.index);
+ const bin = this.data.subarray(this.index, this.index + bsonSize);
+ this.sections.push(bin);
+ this.index += bsonSize;
+ }
+ else if (payloadType === 1) {
+ // It was decided that no driver makes use of payload type 1
+ // TODO(NODE-3483): Replace with MongoDeprecationError
+ throw new error_1.MongoRuntimeError('OP_MSG Payload Type 1 detected unsupported protocol');
+ }
+ }
+ this.parsed = true;
+ return this.sections[0];
+ }
+}
+exports.OpMsgResponse = OpMsgResponse;
+const MESSAGE_HEADER_SIZE = 16;
+const COMPRESSION_DETAILS_SIZE = 9; // originalOpcode + uncompressedSize, compressorID
+/**
+ * @internal
+ *
+ * An OP_COMPRESSED request wraps either an OP_QUERY or OP_MSG message.
+ */
+class OpCompressedRequest {
+ constructor(command, options) {
+ this.command = command;
+ this.options = options;
+ }
+ // Return whether a command contains an uncompressible command term
+ // Will return true if command contains no uncompressible command terms
+ static canCompress(command) {
+ const commandDoc = command instanceof OpMsgRequest ? command.command : command.query;
+ const commandName = Object.keys(commandDoc)[0];
+ return !compression_1.uncompressibleCommands.has(commandName);
+ }
+ async toBin() {
+ const concatenatedOriginalCommandBuffer = Buffer.concat(this.command.toBin());
+ // otherwise, compress the message
+ const messageToBeCompressed = concatenatedOriginalCommandBuffer.slice(MESSAGE_HEADER_SIZE);
+ // Extract information needed for OP_COMPRESSED from the uncompressed message
+ const originalCommandOpCode = concatenatedOriginalCommandBuffer.readInt32LE(12);
+ // Compress the message body
+ const compressedMessage = await (0, compression_1.compress)(this.options, messageToBeCompressed);
+ // Create the msgHeader of OP_COMPRESSED
+ const msgHeader = Buffer.alloc(MESSAGE_HEADER_SIZE);
+ msgHeader.writeInt32LE(MESSAGE_HEADER_SIZE + COMPRESSION_DETAILS_SIZE + compressedMessage.length, 0); // messageLength
+ msgHeader.writeInt32LE(this.command.requestId, 4); // requestID
+ msgHeader.writeInt32LE(0, 8); // responseTo (zero)
+ msgHeader.writeInt32LE(constants_1.OP_COMPRESSED, 12); // opCode
+ // Create the compression details of OP_COMPRESSED
+ const compressionDetails = Buffer.alloc(COMPRESSION_DETAILS_SIZE);
+ compressionDetails.writeInt32LE(originalCommandOpCode, 0); // originalOpcode
+ compressionDetails.writeInt32LE(messageToBeCompressed.length, 4); // Size of the uncompressed compressedMessage, excluding the MsgHeader
+ compressionDetails.writeUInt8(compression_1.Compressor[this.options.agreedCompressor], 8); // compressorID
+ return [msgHeader, compressionDetails, compressedMessage];
+ }
+}
+exports.OpCompressedRequest = OpCompressedRequest;
+//# sourceMappingURL=commands.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/commands.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/commands.js.map
new file mode 100644
index 000000000..9b4414208
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/commands.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/cmap/commands.ts"],"names":[],"mappings":";;;AACA,gCAAgC;AAChC,oCAAwE;AAIxE,6DAKqC;AACrC,yDAA4E;AAE5E,0BAA0B;AAC1B,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,cAAc;AACd,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB,iBAAiB;AACjB,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,aAAa,GAAG,CAAC,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pD,SAAS,CAAC,YAAY,CACpB,mBAAmB,GAAG,wBAAwB,GAAG,iBAAiB,CAAC,MAAM,EACzE,CAAC,CACF,CAAC,CAAC,gBAAgB;QACnB,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY;QAC/D,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,oBAAoB;QAClD,SAAS,CAAC,YAAY,CAAC,yBAAa,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS;QAEpD,kDAAkD;QAClD,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAClE,kBAAkB,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,iBAAiB;QAC5E,kBAAkB,CAAC,YAAY,CAAC,qBAAqB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,sEAAsE;QACxI,kBAAkB,CAAC,UAAU,CAAC,wBAAU,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe;QAC5F,OAAO,CAAC,SAAS,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;IAC5D,CAAC;CACF;AAzCD,kDAyCC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connect.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connect.js
new file mode 100644
index 000000000..a2f94f425
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connect.js
@@ -0,0 +1,364 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.makeSocket = exports.LEGAL_TCP_SOCKET_OPTIONS = exports.LEGAL_TLS_SOCKET_OPTIONS = exports.prepareHandshakeDocument = exports.performInitialHandshake = exports.makeConnection = exports.connect = void 0;
+const net = require("net");
+const tls = require("tls");
+const constants_1 = require("../constants");
+const deps_1 = require("../deps");
+const error_1 = require("../error");
+const utils_1 = require("../utils");
+const auth_provider_1 = require("./auth/auth_provider");
+const providers_1 = require("./auth/providers");
+const connection_1 = require("./connection");
+const constants_2 = require("./wire_protocol/constants");
+async function connect(options) {
+ let connection = null;
+ try {
+ const socket = await makeSocket(options);
+ connection = makeConnection(options, socket);
+ await performInitialHandshake(connection, options);
+ return connection;
+ }
+ catch (error) {
+ connection?.destroy();
+ throw error;
+ }
+}
+exports.connect = connect;
+function makeConnection(options, socket) {
+ let ConnectionType = options.connectionType ?? connection_1.Connection;
+ if (options.autoEncrypter) {
+ ConnectionType = connection_1.CryptoConnection;
+ }
+ return new ConnectionType(socket, options);
+}
+exports.makeConnection = makeConnection;
+function checkSupportedServer(hello, options) {
+ const maxWireVersion = Number(hello.maxWireVersion);
+ const minWireVersion = Number(hello.minWireVersion);
+ const serverVersionHighEnough = !Number.isNaN(maxWireVersion) && maxWireVersion >= constants_2.MIN_SUPPORTED_WIRE_VERSION;
+ const serverVersionLowEnough = !Number.isNaN(minWireVersion) && minWireVersion <= constants_2.MAX_SUPPORTED_WIRE_VERSION;
+ if (serverVersionHighEnough) {
+ if (serverVersionLowEnough) {
+ return null;
+ }
+ const message = `Server at ${options.hostAddress} reports minimum wire version ${JSON.stringify(hello.minWireVersion)}, but this version of the Node.js Driver requires at most ${constants_2.MAX_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MAX_SUPPORTED_SERVER_VERSION})`;
+ return new error_1.MongoCompatibilityError(message);
+ }
+ const message = `Server at ${options.hostAddress} reports maximum wire version ${JSON.stringify(hello.maxWireVersion) ?? 0}, but this version of the Node.js Driver requires at least ${constants_2.MIN_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MIN_SUPPORTED_SERVER_VERSION})`;
+ return new error_1.MongoCompatibilityError(message);
+}
+async function performInitialHandshake(conn, options) {
+ const credentials = options.credentials;
+ if (credentials) {
+ if (!(credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT) &&
+ !options.authProviders.getOrCreateProvider(credentials.mechanism)) {
+ throw new error_1.MongoInvalidArgumentError(`AuthMechanism '${credentials.mechanism}' not supported`);
+ }
+ }
+ const authContext = new auth_provider_1.AuthContext(conn, credentials, options);
+ conn.authContext = authContext;
+ const handshakeDoc = await prepareHandshakeDocument(authContext);
+ // @ts-expect-error: TODO(NODE-5141): The options need to be filtered properly, Connection options differ from Command options
+ const handshakeOptions = { ...options, raw: false };
+ if (typeof options.connectTimeoutMS === 'number') {
+ // The handshake technically is a monitoring check, so its socket timeout should be connectTimeoutMS
+ handshakeOptions.socketTimeoutMS = options.connectTimeoutMS;
+ }
+ const start = new Date().getTime();
+ const response = await conn.command((0, utils_1.ns)('admin.$cmd'), handshakeDoc, handshakeOptions);
+ if (!('isWritablePrimary' in response)) {
+ // Provide hello-style response document.
+ response.isWritablePrimary = response[constants_1.LEGACY_HELLO_COMMAND];
+ }
+ if (response.helloOk) {
+ conn.helloOk = true;
+ }
+ const supportedServerErr = checkSupportedServer(response, options);
+ if (supportedServerErr) {
+ throw supportedServerErr;
+ }
+ if (options.loadBalanced) {
+ if (!response.serviceId) {
+ throw new error_1.MongoCompatibilityError('Driver attempted to initialize in load balancing mode, ' +
+ 'but the server does not support this mode.');
+ }
+ }
+ // NOTE: This is metadata attached to the connection while porting away from
+ // handshake being done in the `Server` class. Likely, it should be
+ // relocated, or at very least restructured.
+ conn.hello = response;
+ conn.lastHelloMS = new Date().getTime() - start;
+ if (!response.arbiterOnly && credentials) {
+ // store the response on auth context
+ authContext.response = response;
+ const resolvedCredentials = credentials.resolveAuthMechanism(response);
+ const provider = options.authProviders.getOrCreateProvider(resolvedCredentials.mechanism);
+ if (!provider) {
+ throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${resolvedCredentials.mechanism} defined.`);
+ }
+ try {
+ await provider.auth(authContext);
+ }
+ catch (error) {
+ if (error instanceof error_1.MongoError) {
+ error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);
+ if ((0, error_1.needsRetryableWriteLabel)(error, response.maxWireVersion)) {
+ error.addErrorLabel(error_1.MongoErrorLabel.RetryableWriteError);
+ }
+ }
+ throw error;
+ }
+ }
+ // Connection establishment is socket creation (tcp handshake, tls handshake, MongoDB handshake (saslStart, saslContinue))
+ // Once connection is established, command logging can log events (if enabled)
+ conn.established = true;
+}
+exports.performInitialHandshake = performInitialHandshake;
+/**
+ * @internal
+ *
+ * This function is only exposed for testing purposes.
+ */
+async function prepareHandshakeDocument(authContext) {
+ const options = authContext.options;
+ const compressors = options.compressors ? options.compressors : [];
+ const { serverApi } = authContext.connection;
+ const clientMetadata = await options.extendedMetadata;
+ const handshakeDoc = {
+ [serverApi?.version || options.loadBalanced === true ? 'hello' : constants_1.LEGACY_HELLO_COMMAND]: 1,
+ helloOk: true,
+ client: clientMetadata,
+ compression: compressors
+ };
+ if (options.loadBalanced === true) {
+ handshakeDoc.loadBalanced = true;
+ }
+ const credentials = authContext.credentials;
+ if (credentials) {
+ if (credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT && credentials.username) {
+ handshakeDoc.saslSupportedMechs = `${credentials.source}.${credentials.username}`;
+ const provider = authContext.options.authProviders.getOrCreateProvider(providers_1.AuthMechanism.MONGODB_SCRAM_SHA256);
+ if (!provider) {
+ // This auth mechanism is always present.
+ throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${providers_1.AuthMechanism.MONGODB_SCRAM_SHA256} defined.`);
+ }
+ return await provider.prepare(handshakeDoc, authContext);
+ }
+ const provider = authContext.options.authProviders.getOrCreateProvider(credentials.mechanism);
+ if (!provider) {
+ throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${credentials.mechanism} defined.`);
+ }
+ return await provider.prepare(handshakeDoc, authContext);
+ }
+ return handshakeDoc;
+}
+exports.prepareHandshakeDocument = prepareHandshakeDocument;
+/** @public */
+exports.LEGAL_TLS_SOCKET_OPTIONS = [
+ 'ALPNProtocols',
+ 'ca',
+ 'cert',
+ 'checkServerIdentity',
+ 'ciphers',
+ 'crl',
+ 'ecdhCurve',
+ 'key',
+ 'minDHSize',
+ 'passphrase',
+ 'pfx',
+ 'rejectUnauthorized',
+ 'secureContext',
+ 'secureProtocol',
+ 'servername',
+ 'session'
+];
+/** @public */
+exports.LEGAL_TCP_SOCKET_OPTIONS = [
+ 'family',
+ 'hints',
+ 'localAddress',
+ 'localPort',
+ 'lookup'
+];
+function parseConnectOptions(options) {
+ const hostAddress = options.hostAddress;
+ if (!hostAddress)
+ throw new error_1.MongoInvalidArgumentError('Option "hostAddress" is required');
+ const result = {};
+ for (const name of exports.LEGAL_TCP_SOCKET_OPTIONS) {
+ if (options[name] != null) {
+ result[name] = options[name];
+ }
+ }
+ if (typeof hostAddress.socketPath === 'string') {
+ result.path = hostAddress.socketPath;
+ return result;
+ }
+ else if (typeof hostAddress.host === 'string') {
+ result.host = hostAddress.host;
+ result.port = hostAddress.port;
+ return result;
+ }
+ else {
+ // This should never happen since we set up HostAddresses
+ // But if we don't throw here the socket could hang until timeout
+ // TODO(NODE-3483)
+ throw new error_1.MongoRuntimeError(`Unexpected HostAddress ${JSON.stringify(hostAddress)}`);
+ }
+}
+function parseSslOptions(options) {
+ const result = parseConnectOptions(options);
+ // Merge in valid SSL options
+ for (const name of exports.LEGAL_TLS_SOCKET_OPTIONS) {
+ if (options[name] != null) {
+ result[name] = options[name];
+ }
+ }
+ if (options.existingSocket) {
+ result.socket = options.existingSocket;
+ }
+ // Set default sni servername to be the same as host
+ if (result.servername == null && result.host && !net.isIP(result.host)) {
+ result.servername = result.host;
+ }
+ return result;
+}
+async function makeSocket(options) {
+ const useTLS = options.tls ?? false;
+ const noDelay = options.noDelay ?? true;
+ const connectTimeoutMS = options.connectTimeoutMS ?? 30000;
+ const existingSocket = options.existingSocket;
+ let socket;
+ if (options.proxyHost != null) {
+ // Currently, only Socks5 is supported.
+ return await makeSocks5Connection({
+ ...options,
+ connectTimeoutMS // Should always be present for Socks5
+ });
+ }
+ if (useTLS) {
+ const tlsSocket = tls.connect(parseSslOptions(options));
+ if (typeof tlsSocket.disableRenegotiation === 'function') {
+ tlsSocket.disableRenegotiation();
+ }
+ socket = tlsSocket;
+ }
+ else if (existingSocket) {
+ // In the TLS case, parseSslOptions() sets options.socket to existingSocket,
+ // so we only need to handle the non-TLS case here (where existingSocket
+ // gives us all we need out of the box).
+ socket = existingSocket;
+ }
+ else {
+ socket = net.createConnection(parseConnectOptions(options));
+ }
+ socket.setKeepAlive(true, 300000);
+ socket.setTimeout(connectTimeoutMS);
+ socket.setNoDelay(noDelay);
+ let cancellationHandler = null;
+ const { promise: connectedSocket, resolve, reject } = (0, utils_1.promiseWithResolvers)();
+ if (existingSocket) {
+ resolve(socket);
+ }
+ else {
+ const connectEvent = useTLS ? 'secureConnect' : 'connect';
+ socket
+ .once(connectEvent, () => resolve(socket))
+ .once('error', error => reject(connectionFailureError('error', error)))
+ .once('timeout', () => reject(connectionFailureError('timeout')))
+ .once('close', () => reject(connectionFailureError('close')));
+ if (options.cancellationToken != null) {
+ cancellationHandler = () => reject(connectionFailureError('cancel'));
+ options.cancellationToken.once('cancel', cancellationHandler);
+ }
+ }
+ try {
+ socket = await connectedSocket;
+ return socket;
+ }
+ catch (error) {
+ socket.destroy();
+ throw error;
+ }
+ finally {
+ socket.setTimeout(0);
+ socket.removeAllListeners();
+ if (cancellationHandler != null) {
+ options.cancellationToken?.removeListener('cancel', cancellationHandler);
+ }
+ }
+}
+exports.makeSocket = makeSocket;
+let socks = null;
+function loadSocks() {
+ if (socks == null) {
+ const socksImport = (0, deps_1.getSocks)();
+ if ('kModuleError' in socksImport) {
+ throw socksImport.kModuleError;
+ }
+ socks = socksImport;
+ }
+ return socks;
+}
+async function makeSocks5Connection(options) {
+ const hostAddress = utils_1.HostAddress.fromHostPort(options.proxyHost ?? '', // proxyHost is guaranteed to set here
+ options.proxyPort ?? 1080);
+ // First, connect to the proxy server itself:
+ const rawSocket = await makeSocket({
+ ...options,
+ hostAddress,
+ tls: false,
+ proxyHost: undefined
+ });
+ const destination = parseConnectOptions(options);
+ if (typeof destination.host !== 'string' || typeof destination.port !== 'number') {
+ throw new error_1.MongoInvalidArgumentError('Can only make Socks5 connections to TCP hosts');
+ }
+ socks ??= loadSocks();
+ try {
+ // Then, establish the Socks5 proxy connection:
+ const { socket } = await socks.SocksClient.createConnection({
+ existing_socket: rawSocket,
+ timeout: options.connectTimeoutMS,
+ command: 'connect',
+ destination: {
+ host: destination.host,
+ port: destination.port
+ },
+ proxy: {
+ // host and port are ignored because we pass existing_socket
+ host: 'iLoveJavaScript',
+ port: 0,
+ type: 5,
+ userId: options.proxyUsername || undefined,
+ password: options.proxyPassword || undefined
+ }
+ });
+ // Finally, now treat the resulting duplex stream as the
+ // socket over which we send and receive wire protocol messages:
+ return await makeSocket({
+ ...options,
+ existingSocket: socket,
+ proxyHost: undefined
+ });
+ }
+ catch (error) {
+ throw connectionFailureError('error', error);
+ }
+}
+function connectionFailureError(type, cause) {
+ switch (type) {
+ case 'error':
+ return new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause });
+ case 'timeout':
+ return new error_1.MongoNetworkTimeoutError('connection timed out');
+ case 'close':
+ return new error_1.MongoNetworkError('connection closed');
+ case 'cancel':
+ return new error_1.MongoNetworkError('connection establishment was cancelled');
+ default:
+ return new error_1.MongoNetworkError('unknown network error');
+ }
+}
+//# sourceMappingURL=connect.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connect.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connect.js.map
new file mode 100644
index 000000000..e5d6b6204
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connect.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/cmap/connect.ts"],"names":[],"mappings":";;;AACA,2BAA2B;AAE3B,2BAA2B;AAG3B,4CAAoD;AACpD,kCAA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O,EAAE,OAAO,CAAC,gBAAgB;YACjC,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE;gBACX,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,IAAI,EAAE,WAAW,CAAC,IAAI;aACvB;YACD,KAAK,EAAE;gBACL,4DAA4D;gBAC5D,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,CAAC;gBACP,MAAM,EAAE,OAAO,CAAC,aAAa,IAAI,SAAS;gBAC1C,QAAQ,EAAE,OAAO,CAAC,aAAa,IAAI,SAAS;aAC7C;SACF,CAAC,CAAC;QAEH,wDAAwD;QACxD,gEAAgE;QAChE,OAAO,MAAM,UAAU,CAAC;YACtB,GAAG,OAAO;YACV,cAAc,EAAE,MAAM;YACtB,SAAS,EAAE,SAAS;SACrB,CAAC,CAAC;KACJ;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;KAC9C;AACH,CAAC;AAID,SAAS,sBAAsB,CAC7B,IAA8C,EAC9C,KAAa;IAEb,QAAQ,IAAI,EAAE;QACZ,KAAK,OAAO;YACV,OAAO,IAAI,yBAAiB,CAAC,kBAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/E,KAAK,SAAS;YACZ,OAAO,IAAI,gCAAwB,CAAC,sBAAsB,CAAC,CAAC;QAC9D,KAAK,OAAO;YACV,OAAO,IAAI,yBAAiB,CAAC,mBAAmB,CAAC,CAAC;QACpD,KAAK,QAAQ;YACX,OAAO,IAAI,yBAAiB,CAAC,wCAAwC,CAAC,CAAC;QACzE;YACE,OAAO,IAAI,yBAAiB,CAAC,uBAAuB,CAAC,CAAC;KACzD;AACH,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection.js
new file mode 100644
index 000000000..9859e2882
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection.js
@@ -0,0 +1,482 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CryptoConnection = exports.SizedMessageTransform = exports.Connection = exports.hasSessionSupport = void 0;
+const stream_1 = require("stream");
+const timers_1 = require("timers");
+const constants_1 = require("../constants");
+const error_1 = require("../error");
+const mongo_logger_1 = require("../mongo_logger");
+const mongo_types_1 = require("../mongo_types");
+const read_preference_1 = require("../read_preference");
+const common_1 = require("../sdam/common");
+const sessions_1 = require("../sessions");
+const utils_1 = require("../utils");
+const command_monitoring_events_1 = require("./command_monitoring_events");
+const commands_1 = require("./commands");
+const stream_description_1 = require("./stream_description");
+const compression_1 = require("./wire_protocol/compression");
+const on_data_1 = require("./wire_protocol/on_data");
+const responses_1 = require("./wire_protocol/responses");
+const shared_1 = require("./wire_protocol/shared");
+/** @internal */
+function hasSessionSupport(conn) {
+ const description = conn.description;
+ return description.logicalSessionTimeoutMinutes != null;
+}
+exports.hasSessionSupport = hasSessionSupport;
+function streamIdentifier(stream, options) {
+ if (options.proxyHost) {
+ // If proxy options are specified, the properties of `stream` itself
+ // will not accurately reflect what endpoint this is connected to.
+ return options.hostAddress.toString();
+ }
+ const { remoteAddress, remotePort } = stream;
+ if (typeof remoteAddress === 'string' && typeof remotePort === 'number') {
+ return utils_1.HostAddress.fromHostPort(remoteAddress, remotePort).toString();
+ }
+ return (0, utils_1.uuidV4)().toString('hex');
+}
+/** @internal */
+class Connection extends mongo_types_1.TypedEventEmitter {
+ constructor(stream, options) {
+ super();
+ this.lastHelloMS = -1;
+ this.helloOk = false;
+ this.delayedTimeoutId = null;
+ /** Indicates that the connection (including underlying TCP socket) has been closed. */
+ this.closed = false;
+ this.clusterTime = null;
+ this.error = null;
+ this.dataEvents = null;
+ this.socket = stream;
+ this.id = options.id;
+ this.address = streamIdentifier(stream, options);
+ this.socketTimeoutMS = options.socketTimeoutMS ?? 0;
+ this.monitorCommands = options.monitorCommands;
+ this.serverApi = options.serverApi;
+ this.mongoLogger = options.mongoLogger;
+ this.established = false;
+ this.description = new stream_description_1.StreamDescription(this.address, options);
+ this.generation = options.generation;
+ this.lastUseTime = (0, utils_1.now)();
+ this.messageStream = this.socket
+ .on('error', this.onError.bind(this))
+ .pipe(new SizedMessageTransform({ connection: this }))
+ .on('error', this.onError.bind(this));
+ this.socket.on('close', this.onClose.bind(this));
+ this.socket.on('timeout', this.onTimeout.bind(this));
+ }
+ get hello() {
+ return this.description.hello;
+ }
+ // the `connect` method stores the result of the handshake hello on the connection
+ set hello(response) {
+ this.description.receiveResponse(response);
+ Object.freeze(this.description);
+ }
+ get serviceId() {
+ return this.hello?.serviceId;
+ }
+ get loadBalanced() {
+ return this.description.loadBalanced;
+ }
+ get idleTime() {
+ return (0, utils_1.calculateDurationInMs)(this.lastUseTime);
+ }
+ get hasSessionSupport() {
+ return this.description.logicalSessionTimeoutMinutes != null;
+ }
+ get supportsOpMsg() {
+ return (this.description != null &&
+ (0, utils_1.maxWireVersion)(this) >= 6 &&
+ !this.description.__nodejs_mock_server__);
+ }
+ get shouldEmitAndLogCommand() {
+ return ((this.monitorCommands ||
+ (this.established &&
+ !this.authContext?.reauthenticating &&
+ this.mongoLogger?.willLog(mongo_logger_1.MongoLoggableComponent.COMMAND, mongo_logger_1.SeverityLevel.DEBUG))) ??
+ false);
+ }
+ markAvailable() {
+ this.lastUseTime = (0, utils_1.now)();
+ }
+ onError(error) {
+ this.cleanup(error);
+ }
+ onClose() {
+ const message = `connection ${this.id} to ${this.address} closed`;
+ this.cleanup(new error_1.MongoNetworkError(message));
+ }
+ onTimeout() {
+ this.delayedTimeoutId = (0, timers_1.setTimeout)(() => {
+ const message = `connection ${this.id} to ${this.address} timed out`;
+ const beforeHandshake = this.hello == null;
+ this.cleanup(new error_1.MongoNetworkTimeoutError(message, { beforeHandshake }));
+ }, 1).unref(); // No need for this timer to hold the event loop open
+ }
+ destroy() {
+ if (this.closed) {
+ return;
+ }
+ // load balanced mode requires that these listeners remain on the connection
+ // after cleanup on timeouts, errors or close so we remove them before calling
+ // cleanup.
+ this.removeAllListeners(Connection.PINNED);
+ this.removeAllListeners(Connection.UNPINNED);
+ const message = `connection ${this.id} to ${this.address} closed`;
+ this.cleanup(new error_1.MongoNetworkError(message));
+ }
+ /**
+ * A method that cleans up the connection. When `force` is true, this method
+ * forcibly destroys the socket.
+ *
+ * If an error is provided, any in-flight operations will be closed with the error.
+ *
+ * This method does nothing if the connection is already closed.
+ */
+ cleanup(error) {
+ if (this.closed) {
+ return;
+ }
+ this.socket.destroy();
+ this.error = error;
+ // eslint-disable-next-line github/no-then
+ this.dataEvents?.throw(error).then(undefined, utils_1.squashError);
+ this.closed = true;
+ this.emit(Connection.CLOSE);
+ }
+ prepareCommand(db, command, options) {
+ let cmd = { ...command };
+ const readPreference = (0, shared_1.getReadPreference)(options);
+ const session = options?.session;
+ let clusterTime = this.clusterTime;
+ if (this.serverApi) {
+ const { version, strict, deprecationErrors } = this.serverApi;
+ cmd.apiVersion = version;
+ if (strict != null)
+ cmd.apiStrict = strict;
+ if (deprecationErrors != null)
+ cmd.apiDeprecationErrors = deprecationErrors;
+ }
+ if (this.hasSessionSupport && session) {
+ if (session.clusterTime &&
+ clusterTime &&
+ session.clusterTime.clusterTime.greaterThan(clusterTime.clusterTime)) {
+ clusterTime = session.clusterTime;
+ }
+ const sessionError = (0, sessions_1.applySession)(session, cmd, options);
+ if (sessionError)
+ throw sessionError;
+ }
+ else if (session?.explicit) {
+ throw new error_1.MongoCompatibilityError('Current topology does not support sessions');
+ }
+ // if we have a known cluster time, gossip it
+ if (clusterTime) {
+ cmd.$clusterTime = clusterTime;
+ }
+ // For standalone, drivers MUST NOT set $readPreference.
+ if (this.description.type !== common_1.ServerType.Standalone) {
+ if (!(0, shared_1.isSharded)(this) &&
+ !this.description.loadBalanced &&
+ this.supportsOpMsg &&
+ options.directConnection === true &&
+ readPreference?.mode === 'primary') {
+ // For mongos and load balancers with 'primary' mode, drivers MUST NOT set $readPreference.
+ // For all other types with a direct connection, if the read preference is 'primary'
+ // (driver sets 'primary' as default if no read preference is configured),
+ // the $readPreference MUST be set to 'primaryPreferred'
+ // to ensure that any server type can handle the request.
+ cmd.$readPreference = read_preference_1.ReadPreference.primaryPreferred.toJSON();
+ }
+ else if ((0, shared_1.isSharded)(this) && !this.supportsOpMsg && readPreference?.mode !== 'primary') {
+ // When sending a read operation via OP_QUERY and the $readPreference modifier,
+ // the query MUST be provided using the $query modifier.
+ cmd = {
+ $query: cmd,
+ $readPreference: readPreference.toJSON()
+ };
+ }
+ else if (readPreference?.mode !== 'primary') {
+ // For mode 'primary', drivers MUST NOT set $readPreference.
+ // For all other read preference modes (i.e. 'secondary', 'primaryPreferred', ...),
+ // drivers MUST set $readPreference
+ cmd.$readPreference = readPreference.toJSON();
+ }
+ }
+ const commandOptions = {
+ numberToSkip: 0,
+ numberToReturn: -1,
+ checkKeys: false,
+ // This value is not overridable
+ secondaryOk: readPreference.secondaryOk(),
+ ...options
+ };
+ const message = this.supportsOpMsg
+ ? new commands_1.OpMsgRequest(db, cmd, commandOptions)
+ : new commands_1.OpQueryRequest(db, cmd, commandOptions);
+ return message;
+ }
+ async *sendWire(message, options, responseType) {
+ this.throwIfAborted();
+ if (typeof options.socketTimeoutMS === 'number') {
+ this.socket.setTimeout(options.socketTimeoutMS);
+ }
+ else if (this.socketTimeoutMS !== 0) {
+ this.socket.setTimeout(this.socketTimeoutMS);
+ }
+ try {
+ await this.writeCommand(message, {
+ agreedCompressor: this.description.compressor ?? 'none',
+ zlibCompressionLevel: this.description.zlibCompressionLevel
+ });
+ if (options.noResponse) {
+ yield responses_1.MongoDBResponse.empty;
+ return;
+ }
+ this.throwIfAborted();
+ for await (const response of this.readMany()) {
+ this.socket.setTimeout(0);
+ const bson = response.parse();
+ const document = responseType == null
+ ? new responses_1.MongoDBResponse(bson)
+ : (0, responses_1.isErrorResponse)(bson)
+ ? new responses_1.MongoDBResponse(bson)
+ : new responseType(bson);
+ yield document;
+ this.throwIfAborted();
+ if (typeof options.socketTimeoutMS === 'number') {
+ this.socket.setTimeout(options.socketTimeoutMS);
+ }
+ else if (this.socketTimeoutMS !== 0) {
+ this.socket.setTimeout(this.socketTimeoutMS);
+ }
+ }
+ }
+ finally {
+ this.socket.setTimeout(0);
+ }
+ }
+ async *sendCommand(ns, command, options, responseType) {
+ const message = this.prepareCommand(ns.db, command, options);
+ let started = 0;
+ if (this.shouldEmitAndLogCommand) {
+ started = (0, utils_1.now)();
+ this.emitAndLogCommand(this.monitorCommands, Connection.COMMAND_STARTED, message.databaseName, this.established, new command_monitoring_events_1.CommandStartedEvent(this, message, this.description.serverConnectionId));
+ }
+ // If `documentsReturnedIn` not set or raw is not enabled, use input bson options
+ // Otherwise, support raw flag. Raw only works for cursors that hardcode firstBatch/nextBatch fields
+ const bsonOptions = options.documentsReturnedIn == null || !options.raw
+ ? options
+ : {
+ ...options,
+ raw: false,
+ fieldsAsRaw: { [options.documentsReturnedIn]: true }
+ };
+ /** MongoDBResponse instance or subclass */
+ let document = undefined;
+ /** Cached result of a toObject call */
+ let object = undefined;
+ try {
+ this.throwIfAborted();
+ for await (document of this.sendWire(message, options, responseType)) {
+ object = undefined;
+ if (options.session != null) {
+ (0, sessions_1.updateSessionFromResponse)(options.session, document);
+ }
+ if (document.$clusterTime) {
+ this.clusterTime = document.$clusterTime;
+ this.emit(Connection.CLUSTER_TIME_RECEIVED, document.$clusterTime);
+ }
+ if (document.has('writeConcernError')) {
+ object ??= document.toObject(bsonOptions);
+ throw new error_1.MongoWriteConcernError(object.writeConcernError, object);
+ }
+ if (document.isError) {
+ throw new error_1.MongoServerError((object ??= document.toObject(bsonOptions)));
+ }
+ if (this.shouldEmitAndLogCommand) {
+ this.emitAndLogCommand(this.monitorCommands, Connection.COMMAND_SUCCEEDED, message.databaseName, this.established, new command_monitoring_events_1.CommandSucceededEvent(this, message, options.noResponse ? undefined : (object ??= document.toObject(bsonOptions)), started, this.description.serverConnectionId));
+ }
+ if (responseType == null) {
+ yield (object ??= document.toObject(bsonOptions));
+ }
+ else {
+ yield document;
+ }
+ this.throwIfAborted();
+ }
+ }
+ catch (error) {
+ if (this.shouldEmitAndLogCommand) {
+ if (error.name === 'MongoWriteConcernError') {
+ this.emitAndLogCommand(this.monitorCommands, Connection.COMMAND_SUCCEEDED, message.databaseName, this.established, new command_monitoring_events_1.CommandSucceededEvent(this, message, options.noResponse ? undefined : (object ??= document?.toObject(bsonOptions)), started, this.description.serverConnectionId));
+ }
+ else {
+ this.emitAndLogCommand(this.monitorCommands, Connection.COMMAND_FAILED, message.databaseName, this.established, new command_monitoring_events_1.CommandFailedEvent(this, message, error, started, this.description.serverConnectionId));
+ }
+ }
+ throw error;
+ }
+ }
+ async command(ns, command, options = {}, responseType) {
+ this.throwIfAborted();
+ for await (const document of this.sendCommand(ns, command, options, responseType)) {
+ return document;
+ }
+ throw new error_1.MongoUnexpectedServerResponseError('Unable to get response from server');
+ }
+ exhaustCommand(ns, command, options, replyListener) {
+ const exhaustLoop = async () => {
+ this.throwIfAborted();
+ for await (const reply of this.sendCommand(ns, command, options)) {
+ replyListener(undefined, reply);
+ this.throwIfAborted();
+ }
+ throw new error_1.MongoUnexpectedServerResponseError('Server ended moreToCome unexpectedly');
+ };
+ // eslint-disable-next-line github/no-then
+ exhaustLoop().then(undefined, replyListener);
+ }
+ throwIfAborted() {
+ if (this.error)
+ throw this.error;
+ }
+ /**
+ * @internal
+ *
+ * Writes an OP_MSG or OP_QUERY request to the socket, optionally compressing the command. This method
+ * waits until the socket's buffer has emptied (the Nodejs socket `drain` event has fired).
+ */
+ async writeCommand(command, options) {
+ const finalCommand = options.agreedCompressor === 'none' || !commands_1.OpCompressedRequest.canCompress(command)
+ ? command
+ : new commands_1.OpCompressedRequest(command, {
+ agreedCompressor: options.agreedCompressor ?? 'none',
+ zlibCompressionLevel: options.zlibCompressionLevel ?? 0
+ });
+ const buffer = Buffer.concat(await finalCommand.toBin());
+ if (this.socket.write(buffer))
+ return;
+ return await (0, utils_1.once)(this.socket, 'drain');
+ }
+ /**
+ * @internal
+ *
+ * Returns an async generator that yields full wire protocol messages from the underlying socket. This function
+ * yields messages until `moreToCome` is false or not present in a response, or the caller cancels the request
+ * by calling `return` on the generator.
+ *
+ * Note that `for-await` loops call `return` automatically when the loop is exited.
+ */
+ async *readMany() {
+ try {
+ this.dataEvents = (0, on_data_1.onData)(this.messageStream);
+ for await (const message of this.dataEvents) {
+ const response = await (0, compression_1.decompressResponse)(message);
+ yield response;
+ if (!response.moreToCome) {
+ return;
+ }
+ }
+ }
+ finally {
+ this.dataEvents = null;
+ this.throwIfAborted();
+ }
+ }
+}
+/** @event */
+Connection.COMMAND_STARTED = constants_1.COMMAND_STARTED;
+/** @event */
+Connection.COMMAND_SUCCEEDED = constants_1.COMMAND_SUCCEEDED;
+/** @event */
+Connection.COMMAND_FAILED = constants_1.COMMAND_FAILED;
+/** @event */
+Connection.CLUSTER_TIME_RECEIVED = constants_1.CLUSTER_TIME_RECEIVED;
+/** @event */
+Connection.CLOSE = constants_1.CLOSE;
+/** @event */
+Connection.PINNED = constants_1.PINNED;
+/** @event */
+Connection.UNPINNED = constants_1.UNPINNED;
+exports.Connection = Connection;
+/** @internal */
+class SizedMessageTransform extends stream_1.Transform {
+ constructor({ connection }) {
+ super({ objectMode: false });
+ this.bufferPool = new utils_1.BufferPool();
+ this.connection = connection;
+ }
+ _transform(chunk, encoding, callback) {
+ if (this.connection.delayedTimeoutId != null) {
+ (0, timers_1.clearTimeout)(this.connection.delayedTimeoutId);
+ this.connection.delayedTimeoutId = null;
+ }
+ this.bufferPool.append(chunk);
+ const sizeOfMessage = this.bufferPool.getInt32();
+ if (sizeOfMessage == null) {
+ return callback();
+ }
+ if (sizeOfMessage < 0) {
+ return callback(new error_1.MongoParseError(`Invalid message size: ${sizeOfMessage}, too small`));
+ }
+ if (sizeOfMessage > this.bufferPool.length) {
+ return callback();
+ }
+ const message = this.bufferPool.read(sizeOfMessage);
+ return callback(null, message);
+ }
+}
+exports.SizedMessageTransform = SizedMessageTransform;
+/** @internal */
+class CryptoConnection extends Connection {
+ constructor(stream, options) {
+ super(stream, options);
+ this.autoEncrypter = options.autoEncrypter;
+ }
+ async command(ns, cmd, options, _responseType) {
+ const { autoEncrypter } = this;
+ if (!autoEncrypter) {
+ // TODO(NODE-6065): throw a MongoRuntimeError in Node V7
+ // @ts-expect-error No cause provided because there is no underlying error.
+ throw new error_1.MongoMissingDependencyError('No AutoEncrypter available for encryption', {
+ dependencyName: 'n/a'
+ });
+ }
+ const serverWireVersion = (0, utils_1.maxWireVersion)(this);
+ if (serverWireVersion === 0) {
+ // This means the initial handshake hasn't happened yet
+ return await super.command(ns, cmd, options, undefined);
+ }
+ if (serverWireVersion < 8) {
+ throw new error_1.MongoCompatibilityError('Auto-encryption requires a minimum MongoDB version of 4.2');
+ }
+ // Save sort or indexKeys based on the command being run
+ // the encrypt API serializes our JS objects to BSON to pass to the native code layer
+ // and then deserializes the encrypted result, the protocol level components
+ // of the command (ex. sort) are then converted to JS objects potentially losing
+ // import key order information. These fields are never encrypted so we can save the values
+ // from before the encryption and replace them after encryption has been performed
+ const sort = cmd.find || cmd.findAndModify ? cmd.sort : null;
+ const indexKeys = cmd.createIndexes
+ ? cmd.indexes.map((index) => index.key)
+ : null;
+ const encrypted = await autoEncrypter.encrypt(ns.toString(), cmd, options);
+ // Replace the saved values
+ if (sort != null && (cmd.find || cmd.findAndModify)) {
+ encrypted.sort = sort;
+ }
+ if (indexKeys != null && cmd.createIndexes) {
+ for (const [offset, index] of indexKeys.entries()) {
+ // @ts-expect-error `encrypted` is a generic "command", but we've narrowed for only `createIndexes` commands here
+ encrypted.indexes[offset].key = index;
+ }
+ }
+ const response = await super.command(ns, encrypted, options, undefined);
+ return await autoEncrypter.decrypt(response, options);
+ }
+}
+exports.CryptoConnection = CryptoConnection;
+//# sourceMappingURL=connection.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection.js.map
new file mode 100644
index 000000000..8a94ed39f
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../src/cmap/connection.ts"],"names":[],"mappings":";;;AAAA,mCAA0E;AAC1E,mCAAkD;AAIlD,4CAQsB;AACtB,oCASkB;AAGlB,kDAA0F;AAC1F,gDAA2E;AAC3E,wDAA6E;AAC7E,2CAA4C;AAC5C,0CAA0F;AAC1F,oCAWkB;AAIlB,2EAIqC;AACrC,yCAOoB;AAGpB,6DAAwF;AACxF,6DAAsF;AACtF,qDAAiD;AACjD,yDAImC;AACnC,mDAAsE;AA4EtE,gBAAgB;AAChB,SAAgB,iBAAiB,CAAC,IAAgB;IAChD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IACrC,OAAO,WAAW,CAAC,4BAA4B,IAAI,IAAI,CAAC;AAC1D,CAAC;AAHD,8CAGC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,OAA0B;IAClE,IAAI,OAAO,CAAC,SAAS,EAAE;QACrB,oEAAoE;QACpE,kEAAkE;QAClE,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;KACvC;IAED,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAC7C,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QACvE,OAAO,mBAAW,CAAC,YAAY,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;KACvE;IAED,OAAO,IAAA,cAAM,GAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,gBAAgB;AAChB,MAAa,UAAW,SAAQ,+BAAmC;IA+CjE,YAAY,MAAc,EA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CAAC,IAAI,CAAC;QAET,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QAE3E,2BAA2B;QAC3B,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,aAAa,CAAC,EAAE;YACnD,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC;SACvB;QAED,IAAI,SAAS,IAAI,IAAI,IAAI,GAAG,CAAC,aAAa,EAAE;YAC1C,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,EAAE,EAAE;gBACjD,iHAAiH;gBACjH,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC;aACvC;SACF;QAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAI,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAE3E,OAAO,MAAM,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AA9ED,4CA8EC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool.js
new file mode 100644
index 000000000..0f382ea97
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool.js
@@ -0,0 +1,573 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ConnectionPool = exports.PoolState = void 0;
+const timers_1 = require("timers");
+const constants_1 = require("../constants");
+const error_1 = require("../error");
+const mongo_types_1 = require("../mongo_types");
+const timeout_1 = require("../timeout");
+const utils_1 = require("../utils");
+const connect_1 = require("./connect");
+const connection_1 = require("./connection");
+const connection_pool_events_1 = require("./connection_pool_events");
+const errors_1 = require("./errors");
+const metrics_1 = require("./metrics");
+/** @internal */
+const kServer = Symbol('server');
+/** @internal */
+const kConnections = Symbol('connections');
+/** @internal */
+const kPending = Symbol('pending');
+/** @internal */
+const kCheckedOut = Symbol('checkedOut');
+/** @internal */
+const kMinPoolSizeTimer = Symbol('minPoolSizeTimer');
+/** @internal */
+const kGeneration = Symbol('generation');
+/** @internal */
+const kServiceGenerations = Symbol('serviceGenerations');
+/** @internal */
+const kConnectionCounter = Symbol('connectionCounter');
+/** @internal */
+const kCancellationToken = Symbol('cancellationToken');
+/** @internal */
+const kWaitQueue = Symbol('waitQueue');
+/** @internal */
+const kCancelled = Symbol('cancelled');
+/** @internal */
+const kMetrics = Symbol('metrics');
+/** @internal */
+const kProcessingWaitQueue = Symbol('processingWaitQueue');
+/** @internal */
+const kPoolState = Symbol('poolState');
+/** @internal */
+exports.PoolState = Object.freeze({
+ paused: 'paused',
+ ready: 'ready',
+ closed: 'closed'
+});
+/**
+ * A pool of connections which dynamically resizes, and emit events related to pool activity
+ * @internal
+ */
+class ConnectionPool extends mongo_types_1.TypedEventEmitter {
+ constructor(server, options) {
+ super();
+ this.options = Object.freeze({
+ connectionType: connection_1.Connection,
+ ...options,
+ maxPoolSize: options.maxPoolSize ?? 100,
+ minPoolSize: options.minPoolSize ?? 0,
+ maxConnecting: options.maxConnecting ?? 2,
+ maxIdleTimeMS: options.maxIdleTimeMS ?? 0,
+ waitQueueTimeoutMS: options.waitQueueTimeoutMS ?? 0,
+ minPoolSizeCheckFrequencyMS: options.minPoolSizeCheckFrequencyMS ?? 100,
+ autoEncrypter: options.autoEncrypter
+ });
+ if (this.options.minPoolSize > this.options.maxPoolSize) {
+ throw new error_1.MongoInvalidArgumentError('Connection pool minimum size must not be greater than maximum pool size');
+ }
+ this[kPoolState] = exports.PoolState.paused;
+ this[kServer] = server;
+ this[kConnections] = new utils_1.List();
+ this[kPending] = 0;
+ this[kCheckedOut] = new Set();
+ this[kMinPoolSizeTimer] = undefined;
+ this[kGeneration] = 0;
+ this[kServiceGenerations] = new Map();
+ this[kConnectionCounter] = (0, utils_1.makeCounter)(1);
+ this[kCancellationToken] = new mongo_types_1.CancellationToken();
+ this[kCancellationToken].setMaxListeners(Infinity);
+ this[kWaitQueue] = new utils_1.List();
+ this[kMetrics] = new metrics_1.ConnectionPoolMetrics();
+ this[kProcessingWaitQueue] = false;
+ this.mongoLogger = this[kServer].topology.client?.mongoLogger;
+ this.component = 'connection';
+ process.nextTick(() => {
+ this.emitAndLog(ConnectionPool.CONNECTION_POOL_CREATED, new connection_pool_events_1.ConnectionPoolCreatedEvent(this));
+ });
+ }
+ /** The address of the endpoint the pool is connected to */
+ get address() {
+ return this.options.hostAddress.toString();
+ }
+ /**
+ * Check if the pool has been closed
+ *
+ * TODO(NODE-3263): We can remove this property once shell no longer needs it
+ */
+ get closed() {
+ return this[kPoolState] === exports.PoolState.closed;
+ }
+ /** An integer representing the SDAM generation of the pool */
+ get generation() {
+ return this[kGeneration];
+ }
+ /** An integer expressing how many total connections (available + pending + in use) the pool currently has */
+ get totalConnectionCount() {
+ return (this.availableConnectionCount + this.pendingConnectionCount + this.currentCheckedOutCount);
+ }
+ /** An integer expressing how many connections are currently available in the pool. */
+ get availableConnectionCount() {
+ return this[kConnections].length;
+ }
+ get pendingConnectionCount() {
+ return this[kPending];
+ }
+ get currentCheckedOutCount() {
+ return this[kCheckedOut].size;
+ }
+ get waitQueueSize() {
+ return this[kWaitQueue].length;
+ }
+ get loadBalanced() {
+ return this.options.loadBalanced;
+ }
+ get serviceGenerations() {
+ return this[kServiceGenerations];
+ }
+ get serverError() {
+ return this[kServer].description.error;
+ }
+ /**
+ * This is exposed ONLY for use in mongosh, to enable
+ * killing all connections if a user quits the shell with
+ * operations in progress.
+ *
+ * This property may be removed as a part of NODE-3263.
+ */
+ get checkedOutConnections() {
+ return this[kCheckedOut];
+ }
+ /**
+ * Get the metrics information for the pool when a wait queue timeout occurs.
+ */
+ waitQueueErrorMetrics() {
+ return this[kMetrics].info(this.options.maxPoolSize);
+ }
+ /**
+ * Set the pool state to "ready"
+ */
+ ready() {
+ if (this[kPoolState] !== exports.PoolState.paused) {
+ return;
+ }
+ this[kPoolState] = exports.PoolState.ready;
+ this.emitAndLog(ConnectionPool.CONNECTION_POOL_READY, new connection_pool_events_1.ConnectionPoolReadyEvent(this));
+ (0, timers_1.clearTimeout)(this[kMinPoolSizeTimer]);
+ this.ensureMinPoolSize();
+ }
+ /**
+ * Check a connection out of this pool. The connection will continue to be tracked, but no reference to it
+ * will be held by the pool. This means that if a connection is checked out it MUST be checked back in or
+ * explicitly destroyed by the new owner.
+ */
+ async checkOut() {
+ this.emitAndLog(ConnectionPool.CONNECTION_CHECK_OUT_STARTED, new connection_pool_events_1.ConnectionCheckOutStartedEvent(this));
+ const waitQueueTimeoutMS = this.options.waitQueueTimeoutMS;
+ const { promise, resolve, reject } = (0, utils_1.promiseWithResolvers)();
+ const timeout = timeout_1.Timeout.expires(waitQueueTimeoutMS);
+ const waitQueueMember = {
+ resolve,
+ reject,
+ timeout
+ };
+ this[kWaitQueue].push(waitQueueMember);
+ process.nextTick(() => this.processWaitQueue());
+ try {
+ return await Promise.race([promise, waitQueueMember.timeout]);
+ }
+ catch (error) {
+ if (timeout_1.TimeoutError.is(error)) {
+ waitQueueMember[kCancelled] = true;
+ waitQueueMember.timeout.clear();
+ this.emitAndLog(ConnectionPool.CONNECTION_CHECK_OUT_FAILED, new connection_pool_events_1.ConnectionCheckOutFailedEvent(this, 'timeout'));
+ const timeoutError = new errors_1.WaitQueueTimeoutError(this.loadBalanced
+ ? this.waitQueueErrorMetrics()
+ : 'Timed out while checking out a connection from connection pool', this.address);
+ throw timeoutError;
+ }
+ throw error;
+ }
+ }
+ /**
+ * Check a connection into the pool.
+ *
+ * @param connection - The connection to check in
+ */
+ checkIn(connection) {
+ if (!this[kCheckedOut].has(connection)) {
+ return;
+ }
+ const poolClosed = this.closed;
+ const stale = this.connectionIsStale(connection);
+ const willDestroy = !!(poolClosed || stale || connection.closed);
+ if (!willDestroy) {
+ connection.markAvailable();
+ this[kConnections].unshift(connection);
+ }
+ this[kCheckedOut].delete(connection);
+ this.emitAndLog(ConnectionPool.CONNECTION_CHECKED_IN, new connection_pool_events_1.ConnectionCheckedInEvent(this, connection));
+ if (willDestroy) {
+ const reason = connection.closed ? 'error' : poolClosed ? 'poolClosed' : 'stale';
+ this.destroyConnection(connection, reason);
+ }
+ process.nextTick(() => this.processWaitQueue());
+ }
+ /**
+ * Clear the pool
+ *
+ * Pool reset is handled by incrementing the pool's generation count. Any existing connection of a
+ * previous generation will eventually be pruned during subsequent checkouts.
+ */
+ clear(options = {}) {
+ if (this.closed) {
+ return;
+ }
+ // handle load balanced case
+ if (this.loadBalanced) {
+ const { serviceId } = options;
+ if (!serviceId) {
+ throw new error_1.MongoRuntimeError('ConnectionPool.clear() called in load balanced mode with no serviceId.');
+ }
+ const sid = serviceId.toHexString();
+ const generation = this.serviceGenerations.get(sid);
+ // Only need to worry if the generation exists, since it should
+ // always be there but typescript needs the check.
+ if (generation == null) {
+ throw new error_1.MongoRuntimeError('Service generations are required in load balancer mode.');
+ }
+ else {
+ // Increment the generation for the service id.
+ this.serviceGenerations.set(sid, generation + 1);
+ }
+ this.emitAndLog(ConnectionPool.CONNECTION_POOL_CLEARED, new connection_pool_events_1.ConnectionPoolClearedEvent(this, { serviceId }));
+ return;
+ }
+ // handle non load-balanced case
+ const interruptInUseConnections = options.interruptInUseConnections ?? false;
+ const oldGeneration = this[kGeneration];
+ this[kGeneration] += 1;
+ const alreadyPaused = this[kPoolState] === exports.PoolState.paused;
+ this[kPoolState] = exports.PoolState.paused;
+ this.clearMinPoolSizeTimer();
+ if (!alreadyPaused) {
+ this.emitAndLog(ConnectionPool.CONNECTION_POOL_CLEARED, new connection_pool_events_1.ConnectionPoolClearedEvent(this, {
+ interruptInUseConnections
+ }));
+ }
+ if (interruptInUseConnections) {
+ process.nextTick(() => this.interruptInUseConnections(oldGeneration));
+ }
+ this.processWaitQueue();
+ }
+ /**
+ * Closes all stale in-use connections in the pool with a resumable PoolClearedOnNetworkError.
+ *
+ * Only connections where `connection.generation <= minGeneration` are killed.
+ */
+ interruptInUseConnections(minGeneration) {
+ for (const connection of this[kCheckedOut]) {
+ if (connection.generation <= minGeneration) {
+ connection.onError(new errors_1.PoolClearedOnNetworkError(this));
+ this.checkIn(connection);
+ }
+ }
+ }
+ /** Close the pool */
+ close() {
+ if (this.closed) {
+ return;
+ }
+ // immediately cancel any in-flight connections
+ this[kCancellationToken].emit('cancel');
+ // end the connection counter
+ if (typeof this[kConnectionCounter].return === 'function') {
+ this[kConnectionCounter].return(undefined);
+ }
+ this[kPoolState] = exports.PoolState.closed;
+ this.clearMinPoolSizeTimer();
+ this.processWaitQueue();
+ for (const conn of this[kConnections]) {
+ this.emitAndLog(ConnectionPool.CONNECTION_CLOSED, new connection_pool_events_1.ConnectionClosedEvent(this, conn, 'poolClosed'));
+ conn.destroy();
+ }
+ this[kConnections].clear();
+ this.emitAndLog(ConnectionPool.CONNECTION_POOL_CLOSED, new connection_pool_events_1.ConnectionPoolClosedEvent(this));
+ }
+ /**
+ * @internal
+ * Reauthenticate a connection
+ */
+ async reauthenticate(connection) {
+ const authContext = connection.authContext;
+ if (!authContext) {
+ throw new error_1.MongoRuntimeError('No auth context found on connection.');
+ }
+ const credentials = authContext.credentials;
+ if (!credentials) {
+ throw new error_1.MongoMissingCredentialsError('Connection is missing credentials when asked to reauthenticate');
+ }
+ const resolvedCredentials = credentials.resolveAuthMechanism(connection.hello);
+ const provider = this[kServer].topology.client.s.authProviders.getOrCreateProvider(resolvedCredentials.mechanism);
+ if (!provider) {
+ throw new error_1.MongoMissingCredentialsError(`Reauthenticate failed due to no auth provider for ${credentials.mechanism}`);
+ }
+ await provider.reauth(authContext);
+ return;
+ }
+ /** Clear the min pool size timer */
+ clearMinPoolSizeTimer() {
+ const minPoolSizeTimer = this[kMinPoolSizeTimer];
+ if (minPoolSizeTimer) {
+ (0, timers_1.clearTimeout)(minPoolSizeTimer);
+ }
+ }
+ destroyConnection(connection, reason) {
+ this.emitAndLog(ConnectionPool.CONNECTION_CLOSED, new connection_pool_events_1.ConnectionClosedEvent(this, connection, reason));
+ // destroy the connection
+ connection.destroy();
+ }
+ connectionIsStale(connection) {
+ const serviceId = connection.serviceId;
+ if (this.loadBalanced && serviceId) {
+ const sid = serviceId.toHexString();
+ const generation = this.serviceGenerations.get(sid);
+ return connection.generation !== generation;
+ }
+ return connection.generation !== this[kGeneration];
+ }
+ connectionIsIdle(connection) {
+ return !!(this.options.maxIdleTimeMS && connection.idleTime > this.options.maxIdleTimeMS);
+ }
+ /**
+ * Destroys a connection if the connection is perished.
+ *
+ * @returns `true` if the connection was destroyed, `false` otherwise.
+ */
+ destroyConnectionIfPerished(connection) {
+ const isStale = this.connectionIsStale(connection);
+ const isIdle = this.connectionIsIdle(connection);
+ if (!isStale && !isIdle && !connection.closed) {
+ return false;
+ }
+ const reason = connection.closed ? 'error' : isStale ? 'stale' : 'idle';
+ this.destroyConnection(connection, reason);
+ return true;
+ }
+ createConnection(callback) {
+ const connectOptions = {
+ ...this.options,
+ id: this[kConnectionCounter].next().value,
+ generation: this[kGeneration],
+ cancellationToken: this[kCancellationToken],
+ mongoLogger: this.mongoLogger,
+ authProviders: this[kServer].topology.client.s.authProviders
+ };
+ this[kPending]++;
+ // This is our version of a "virtual" no-I/O connection as the spec requires
+ this.emitAndLog(ConnectionPool.CONNECTION_CREATED, new connection_pool_events_1.ConnectionCreatedEvent(this, { id: connectOptions.id }));
+ // eslint-disable-next-line github/no-then
+ (0, connect_1.connect)(connectOptions).then(connection => {
+ // The pool might have closed since we started trying to create a connection
+ if (this[kPoolState] !== exports.PoolState.ready) {
+ this[kPending]--;
+ connection.destroy();
+ callback(this.closed ? new errors_1.PoolClosedError(this) : new errors_1.PoolClearedError(this));
+ return;
+ }
+ // forward all events from the connection to the pool
+ for (const event of [...constants_1.APM_EVENTS, connection_1.Connection.CLUSTER_TIME_RECEIVED]) {
+ connection.on(event, (e) => this.emit(event, e));
+ }
+ if (this.loadBalanced) {
+ connection.on(connection_1.Connection.PINNED, pinType => this[kMetrics].markPinned(pinType));
+ connection.on(connection_1.Connection.UNPINNED, pinType => this[kMetrics].markUnpinned(pinType));
+ const serviceId = connection.serviceId;
+ if (serviceId) {
+ let generation;
+ const sid = serviceId.toHexString();
+ if ((generation = this.serviceGenerations.get(sid))) {
+ connection.generation = generation;
+ }
+ else {
+ this.serviceGenerations.set(sid, 0);
+ connection.generation = 0;
+ }
+ }
+ }
+ connection.markAvailable();
+ this.emitAndLog(ConnectionPool.CONNECTION_READY, new connection_pool_events_1.ConnectionReadyEvent(this, connection));
+ this[kPending]--;
+ callback(undefined, connection);
+ }, error => {
+ this[kPending]--;
+ this.emitAndLog(ConnectionPool.CONNECTION_CLOSED, new connection_pool_events_1.ConnectionClosedEvent(this, { id: connectOptions.id, serviceId: undefined }, 'error',
+ // TODO(NODE-5192): Remove this cast
+ error));
+ if (error instanceof error_1.MongoNetworkError || error instanceof error_1.MongoServerError) {
+ error.connectionGeneration = connectOptions.generation;
+ }
+ callback(error ?? new error_1.MongoRuntimeError('Connection creation failed without error'));
+ });
+ }
+ ensureMinPoolSize() {
+ const minPoolSize = this.options.minPoolSize;
+ if (this[kPoolState] !== exports.PoolState.ready || minPoolSize === 0) {
+ return;
+ }
+ this[kConnections].prune(connection => this.destroyConnectionIfPerished(connection));
+ if (this.totalConnectionCount < minPoolSize &&
+ this.pendingConnectionCount < this.options.maxConnecting) {
+ // NOTE: ensureMinPoolSize should not try to get all the pending
+ // connection permits because that potentially delays the availability of
+ // the connection to a checkout request
+ this.createConnection((err, connection) => {
+ if (err) {
+ this[kServer].handleError(err);
+ }
+ if (!err && connection) {
+ this[kConnections].push(connection);
+ process.nextTick(() => this.processWaitQueue());
+ }
+ if (this[kPoolState] === exports.PoolState.ready) {
+ (0, timers_1.clearTimeout)(this[kMinPoolSizeTimer]);
+ this[kMinPoolSizeTimer] = (0, timers_1.setTimeout)(() => this.ensureMinPoolSize(), this.options.minPoolSizeCheckFrequencyMS);
+ }
+ });
+ }
+ else {
+ (0, timers_1.clearTimeout)(this[kMinPoolSizeTimer]);
+ this[kMinPoolSizeTimer] = (0, timers_1.setTimeout)(() => this.ensureMinPoolSize(), this.options.minPoolSizeCheckFrequencyMS);
+ }
+ }
+ processWaitQueue() {
+ if (this[kProcessingWaitQueue]) {
+ return;
+ }
+ this[kProcessingWaitQueue] = true;
+ while (this.waitQueueSize) {
+ const waitQueueMember = this[kWaitQueue].first();
+ if (!waitQueueMember) {
+ this[kWaitQueue].shift();
+ continue;
+ }
+ if (waitQueueMember[kCancelled]) {
+ this[kWaitQueue].shift();
+ continue;
+ }
+ if (this[kPoolState] !== exports.PoolState.ready) {
+ const reason = this.closed ? 'poolClosed' : 'connectionError';
+ const error = this.closed ? new errors_1.PoolClosedError(this) : new errors_1.PoolClearedError(this);
+ this.emitAndLog(ConnectionPool.CONNECTION_CHECK_OUT_FAILED, new connection_pool_events_1.ConnectionCheckOutFailedEvent(this, reason, error));
+ waitQueueMember.timeout.clear();
+ this[kWaitQueue].shift();
+ waitQueueMember.reject(error);
+ continue;
+ }
+ if (!this.availableConnectionCount) {
+ break;
+ }
+ const connection = this[kConnections].shift();
+ if (!connection) {
+ break;
+ }
+ if (!this.destroyConnectionIfPerished(connection)) {
+ this[kCheckedOut].add(connection);
+ this.emitAndLog(ConnectionPool.CONNECTION_CHECKED_OUT, new connection_pool_events_1.ConnectionCheckedOutEvent(this, connection));
+ waitQueueMember.timeout.clear();
+ this[kWaitQueue].shift();
+ waitQueueMember.resolve(connection);
+ }
+ }
+ const { maxPoolSize, maxConnecting } = this.options;
+ while (this.waitQueueSize > 0 &&
+ this.pendingConnectionCount < maxConnecting &&
+ (maxPoolSize === 0 || this.totalConnectionCount < maxPoolSize)) {
+ const waitQueueMember = this[kWaitQueue].shift();
+ if (!waitQueueMember || waitQueueMember[kCancelled]) {
+ continue;
+ }
+ this.createConnection((err, connection) => {
+ if (waitQueueMember[kCancelled]) {
+ if (!err && connection) {
+ this[kConnections].push(connection);
+ }
+ }
+ else {
+ if (err) {
+ this.emitAndLog(ConnectionPool.CONNECTION_CHECK_OUT_FAILED,
+ // TODO(NODE-5192): Remove this cast
+ new connection_pool_events_1.ConnectionCheckOutFailedEvent(this, 'connectionError', err));
+ waitQueueMember.reject(err);
+ }
+ else if (connection) {
+ this[kCheckedOut].add(connection);
+ this.emitAndLog(ConnectionPool.CONNECTION_CHECKED_OUT, new connection_pool_events_1.ConnectionCheckedOutEvent(this, connection));
+ waitQueueMember.resolve(connection);
+ }
+ waitQueueMember.timeout.clear();
+ }
+ process.nextTick(() => this.processWaitQueue());
+ });
+ }
+ this[kProcessingWaitQueue] = false;
+ }
+}
+/**
+ * Emitted when the connection pool is created.
+ * @event
+ */
+ConnectionPool.CONNECTION_POOL_CREATED = constants_1.CONNECTION_POOL_CREATED;
+/**
+ * Emitted once when the connection pool is closed
+ * @event
+ */
+ConnectionPool.CONNECTION_POOL_CLOSED = constants_1.CONNECTION_POOL_CLOSED;
+/**
+ * Emitted each time the connection pool is cleared and it's generation incremented
+ * @event
+ */
+ConnectionPool.CONNECTION_POOL_CLEARED = constants_1.CONNECTION_POOL_CLEARED;
+/**
+ * Emitted each time the connection pool is marked ready
+ * @event
+ */
+ConnectionPool.CONNECTION_POOL_READY = constants_1.CONNECTION_POOL_READY;
+/**
+ * Emitted when a connection is created.
+ * @event
+ */
+ConnectionPool.CONNECTION_CREATED = constants_1.CONNECTION_CREATED;
+/**
+ * Emitted when a connection becomes established, and is ready to use
+ * @event
+ */
+ConnectionPool.CONNECTION_READY = constants_1.CONNECTION_READY;
+/**
+ * Emitted when a connection is closed
+ * @event
+ */
+ConnectionPool.CONNECTION_CLOSED = constants_1.CONNECTION_CLOSED;
+/**
+ * Emitted when an attempt to check out a connection begins
+ * @event
+ */
+ConnectionPool.CONNECTION_CHECK_OUT_STARTED = constants_1.CONNECTION_CHECK_OUT_STARTED;
+/**
+ * Emitted when an attempt to check out a connection fails
+ * @event
+ */
+ConnectionPool.CONNECTION_CHECK_OUT_FAILED = constants_1.CONNECTION_CHECK_OUT_FAILED;
+/**
+ * Emitted each time a connection is successfully checked out of the connection pool
+ * @event
+ */
+ConnectionPool.CONNECTION_CHECKED_OUT = constants_1.CONNECTION_CHECKED_OUT;
+/**
+ * Emitted each time a connection is successfully checked into the connection pool
+ * @event
+ */
+ConnectionPool.CONNECTION_CHECKED_IN = constants_1.CONNECTION_CHECKED_IN;
+exports.ConnectionPool = ConnectionPool;
+//# sourceMappingURL=connection_pool.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool.js.map
new file mode 100644
index 000000000..3d9faef43
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"connection_pool.js","sourceRoot":"","sources":["../../src/cmap/connection_pool.ts"],"names":[],"mappings":";;;AAAA,mCAAkD;AAGlD,4CAasB;AACtB,oCAQkB;AAClB,gDAAsE;AAEtE,wCAAmD;AACnD,oCAAkF;AAClF,uCAAoC;AACpC,6CAAyF;AACzF,qEAYkC;AAClC,qCAKkB;AAClB,uCAAkD;AAElD,gBAAgB;AAChB,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AACjC,gBAAgB;AAChB,MAAM,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAC3C,gBAAgB;AAChB,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AACnC,gBAAgB;AAChB,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACzC,gBAAgB;AAChB,MAAM,iBAAiB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACrD,gBAAgB;AAChB,MAAM,WAAW,GAAG,MAAM,CAAC,YA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AAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;YAClD,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC;IACrC,CAAC;;AAvpBD;;;GAGG;AACa,sCAAuB,GAAG,mCAAuB,CAAC;AAClE;;;GAGG;AACa,qCAAsB,GAAG,kCAAsB,CAAC;AAChE;;;GAGG;AACa,sCAAuB,GAAG,mCAAuB,CAAC;AAClE;;;GAGG;AACa,oCAAqB,GAAG,iCAAqB,CAAC;AAC9D;;;GAGG;AACa,iCAAkB,GAAG,8BAAkB,CAAC;AACxD;;;GAGG;AACa,+BAAgB,GAAG,4BAAgB,CAAC;AACpD;;;GAGG;AACa,gCAAiB,GAAG,6BAAiB,CAAC;AACtD;;;GAGG;AACa,2CAA4B,GAAG,wCAA4B,CAAC;AAC5E;;;GAGG;AACa,0CAA2B,GAAG,uCAA2B,CAAC;AAC1E;;;GAGG;AACa,qCAAsB,GAAG,kCAAsB,CAAC;AAChE;;;GAGG;AACa,oCAAqB,GAAG,iCAAqB,CAAC;AA5EnD,wCAAc"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool_events.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool_events.js
new file mode 100644
index 000000000..a08d5ac1d
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool_events.js
@@ -0,0 +1,186 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ConnectionPoolClearedEvent = exports.ConnectionCheckedInEvent = exports.ConnectionCheckedOutEvent = exports.ConnectionCheckOutFailedEvent = exports.ConnectionCheckOutStartedEvent = exports.ConnectionClosedEvent = exports.ConnectionReadyEvent = exports.ConnectionCreatedEvent = exports.ConnectionPoolClosedEvent = exports.ConnectionPoolReadyEvent = exports.ConnectionPoolCreatedEvent = exports.ConnectionPoolMonitoringEvent = void 0;
+const constants_1 = require("../constants");
+/**
+ * The base export class for all monitoring events published from the connection pool
+ * @public
+ * @category Event
+ */
+class ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool) {
+ this.time = new Date();
+ this.address = pool.address;
+ }
+}
+exports.ConnectionPoolMonitoringEvent = ConnectionPoolMonitoringEvent;
+/**
+ * An event published when a connection pool is created
+ * @public
+ * @category Event
+ */
+class ConnectionPoolCreatedEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_POOL_CREATED;
+ const { maxConnecting, maxPoolSize, minPoolSize, maxIdleTimeMS, waitQueueTimeoutMS } = pool.options;
+ this.options = { maxConnecting, maxPoolSize, minPoolSize, maxIdleTimeMS, waitQueueTimeoutMS };
+ }
+}
+exports.ConnectionPoolCreatedEvent = ConnectionPoolCreatedEvent;
+/**
+ * An event published when a connection pool is ready
+ * @public
+ * @category Event
+ */
+class ConnectionPoolReadyEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_POOL_READY;
+ }
+}
+exports.ConnectionPoolReadyEvent = ConnectionPoolReadyEvent;
+/**
+ * An event published when a connection pool is closed
+ * @public
+ * @category Event
+ */
+class ConnectionPoolClosedEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_POOL_CLOSED;
+ }
+}
+exports.ConnectionPoolClosedEvent = ConnectionPoolClosedEvent;
+/**
+ * An event published when a connection pool creates a new connection
+ * @public
+ * @category Event
+ */
+class ConnectionCreatedEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool, connection) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_CREATED;
+ this.connectionId = connection.id;
+ }
+}
+exports.ConnectionCreatedEvent = ConnectionCreatedEvent;
+/**
+ * An event published when a connection is ready for use
+ * @public
+ * @category Event
+ */
+class ConnectionReadyEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool, connection) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_READY;
+ this.connectionId = connection.id;
+ }
+}
+exports.ConnectionReadyEvent = ConnectionReadyEvent;
+/**
+ * An event published when a connection is closed
+ * @public
+ * @category Event
+ */
+class ConnectionClosedEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool, connection, reason, error) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_CLOSED;
+ this.connectionId = connection.id;
+ this.reason = reason;
+ this.serviceId = connection.serviceId;
+ this.error = error ?? null;
+ }
+}
+exports.ConnectionClosedEvent = ConnectionClosedEvent;
+/**
+ * An event published when a request to check a connection out begins
+ * @public
+ * @category Event
+ */
+class ConnectionCheckOutStartedEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_CHECK_OUT_STARTED;
+ }
+}
+exports.ConnectionCheckOutStartedEvent = ConnectionCheckOutStartedEvent;
+/**
+ * An event published when a request to check a connection out fails
+ * @public
+ * @category Event
+ */
+class ConnectionCheckOutFailedEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool, reason, error) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_CHECK_OUT_FAILED;
+ this.reason = reason;
+ this.error = error;
+ }
+}
+exports.ConnectionCheckOutFailedEvent = ConnectionCheckOutFailedEvent;
+/**
+ * An event published when a connection is checked out of the connection pool
+ * @public
+ * @category Event
+ */
+class ConnectionCheckedOutEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool, connection) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_CHECKED_OUT;
+ this.connectionId = connection.id;
+ }
+}
+exports.ConnectionCheckedOutEvent = ConnectionCheckedOutEvent;
+/**
+ * An event published when a connection is checked into the connection pool
+ * @public
+ * @category Event
+ */
+class ConnectionCheckedInEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool, connection) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_CHECKED_IN;
+ this.connectionId = connection.id;
+ }
+}
+exports.ConnectionCheckedInEvent = ConnectionCheckedInEvent;
+/**
+ * An event published when a connection pool is cleared
+ * @public
+ * @category Event
+ */
+class ConnectionPoolClearedEvent extends ConnectionPoolMonitoringEvent {
+ /** @internal */
+ constructor(pool, options = {}) {
+ super(pool);
+ /** @internal */
+ this.name = constants_1.CONNECTION_POOL_CLEARED;
+ this.serviceId = options.serviceId;
+ this.interruptInUseConnections = options.interruptInUseConnections;
+ }
+}
+exports.ConnectionPoolClearedEvent = ConnectionPoolClearedEvent;
+//# sourceMappingURL=connection_pool_events.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool_events.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool_events.js.map
new file mode 100644
index 000000000..35418c72d
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/connection_pool_events.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"connection_pool_events.js","sourceRoot":"","sources":["../../src/cmap/connection_pool_events.ts"],"names":[],"mappings":";;;AACA,4CAYsB;AAKtB;;;;GAIG;AACH,MAAsB,6BAA6B;IAmBjD,gBAAgB;IAChB,YAAY,IAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC9B,CAAC;CACF;AAxBD,sEAwBC;AAED;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,6BAA6B;IAS3E,gBAAgB;IAChB,YAAY,IAAoB;QAC9B,KAAK,CAAC,IAAI,CAAC,CAAC;QALd,gBAAgB;QAChB,SAAI,GA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BAAgB;IAChB,YAAY,IAAoB,EAAE,UAAsB;QACtD,KAAK,CAAC,IAAI,CAAC,CAAC;QALd,gBAAgB;QAChB,SAAI,GAAG,iCAAqB,CAAC;QAK3B,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,EAAE,CAAC;IACpC,CAAC;CACF;AAXD,4DAWC;AAED;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,6BAA6B;IAQ3E,gBAAgB;IAChB,YACE,IAAoB,EACpB,UAAyE,EAAE;QAE3E,KAAK,CAAC,IAAI,CAAC,CAAC;QARd,gBAAgB;QAChB,SAAI,GAAG,mCAAuB,CAAC;QAQ7B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IACrE,CAAC;CACF;AAjBD,gEAiBC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/errors.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/errors.js
new file mode 100644
index 000000000..b215a296a
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/errors.js
@@ -0,0 +1,108 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WaitQueueTimeoutError = exports.PoolClearedOnNetworkError = exports.PoolClearedError = exports.PoolClosedError = void 0;
+const error_1 = require("../error");
+/**
+ * An error indicating a connection pool is closed
+ * @category Error
+ */
+class PoolClosedError extends error_1.MongoDriverError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(pool) {
+ super('Attempted to check out a connection from closed connection pool');
+ this.address = pool.address;
+ }
+ get name() {
+ return 'MongoPoolClosedError';
+ }
+}
+exports.PoolClosedError = PoolClosedError;
+/**
+ * An error indicating a connection pool is currently paused
+ * @category Error
+ */
+class PoolClearedError extends error_1.MongoNetworkError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(pool, message) {
+ const errorMessage = message
+ ? message
+ : `Connection pool for ${pool.address} was cleared because another operation failed with: "${pool.serverError?.message}"`;
+ super(errorMessage, pool.serverError ? { cause: pool.serverError } : undefined);
+ this.address = pool.address;
+ this.addErrorLabel(error_1.MongoErrorLabel.PoolRequstedRetry);
+ }
+ get name() {
+ return 'MongoPoolClearedError';
+ }
+}
+exports.PoolClearedError = PoolClearedError;
+/**
+ * An error indicating that a connection pool has been cleared after the monitor for that server timed out.
+ * @category Error
+ */
+class PoolClearedOnNetworkError extends PoolClearedError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(pool) {
+ super(pool, `Connection to ${pool.address} interrupted due to server monitor timeout`);
+ }
+ get name() {
+ return 'PoolClearedOnNetworkError';
+ }
+}
+exports.PoolClearedOnNetworkError = PoolClearedOnNetworkError;
+/**
+ * An error thrown when a request to check out a connection times out
+ * @category Error
+ */
+class WaitQueueTimeoutError extends error_1.MongoDriverError {
+ /**
+ * **Do not use this constructor!**
+ *
+ * Meant for internal use only.
+ *
+ * @remarks
+ * This class is only meant to be constructed within the driver. This constructor is
+ * not subject to semantic versioning compatibility guarantees and may change at any time.
+ *
+ * @public
+ **/
+ constructor(message, address) {
+ super(message);
+ this.address = address;
+ }
+ get name() {
+ return 'MongoWaitQueueTimeoutError';
+ }
+}
+exports.WaitQueueTimeoutError = WaitQueueTimeoutError;
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/errors.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/errors.js.map
new file mode 100644
index 000000000..fcdf5c69d
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/errors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/cmap/errors.ts"],"names":[],"mappings":";;;AAAA,oCAAgF;AAGhF;;;GAGG;AACH,MAAa,eAAgB,SAAQ,wBAAgB;IAInD;;;;;;;;;;QAUI;IACJ,YAAY,IAAoB;QAC9B,KAAK,CAAC,iEAAiE,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC9B,CAAC;IAED,IAAa,IAAI;QACf,OAAO,sBAAsB,CAAC;IAChC,CAAC;CACF;AAvBD,0CAuBC;AAED;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,yBAAiB;IAIrD;;;;;;;;;;QAUI;IACJ,YAAY,IAAoB,EAAE,OAAgB;QAChD,MAAM,YAAY,GAAG,OAAO;YAC1B,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,uBAAuB,IAAI,CAAC,OAAO,wDAAwD,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,CAAC;QAC5H,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAChF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE5B,IAAI,CAAC,aAAa,CAAC,uBAAe,CAAC,iBAAiB,CAAC,CAAC;IACxD,CAAC;IAED,IAAa,IAAI;QACf,OAAO,uBAAuB,CAAC;IACjC,CAAC;CACF;AA5BD,4CA4BC;AAED;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,gBAAgB;IAC7D;;;;;;;;;;QAUI;IACJ,YAAY,IAAoB;QAC9B,KAAK,CAAC,IAAI,EAAE,iBAAiB,IAAI,CAAC,OAAO,4CAA4C,CAAC,CAAC;IACzF,CAAC;IAED,IAAa,IAAI;QACf,OAAO,2BAA2B,CAAC;IACrC,CAAC;CACF;AAnBD,8DAmBC;AAED;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,wBAAgB;IAIzD;;;;;;;;;;QAUI;IACJ,YAAY,OAAe,EAAE,OAAe;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAa,IAAI;QACf,OAAO,4BAA4B,CAAC;IACtC,CAAC;CACF;AAvBD,sDAuBC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/handshake/client_metadata.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/handshake/client_metadata.js
new file mode 100644
index 000000000..cc563547b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/handshake/client_metadata.js
@@ -0,0 +1,216 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getFAASEnv = exports.addContainerMetadata = exports.makeClientMetadata = exports.LimitedSizeDocument = void 0;
+const os = require("os");
+const process = require("process");
+const bson_1 = require("../../bson");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const NODE_DRIVER_VERSION = require('../../../package.json').version;
+/** @internal */
+class LimitedSizeDocument {
+ constructor(maxSize) {
+ this.maxSize = maxSize;
+ this.document = new Map();
+ /** BSON overhead: Int32 + Null byte */
+ this.documentSize = 5;
+ }
+ /** Only adds key/value if the bsonByteLength is less than MAX_SIZE */
+ ifItFitsItSits(key, value) {
+ // The BSON byteLength of the new element is the same as serializing it to its own document
+ // subtracting the document size int32 and the null terminator.
+ const newElementSize = bson_1.BSON.serialize(new Map().set(key, value)).byteLength - 5;
+ if (newElementSize + this.documentSize > this.maxSize) {
+ return false;
+ }
+ this.documentSize += newElementSize;
+ this.document.set(key, value);
+ return true;
+ }
+ toObject() {
+ return bson_1.BSON.deserialize(bson_1.BSON.serialize(this.document), {
+ promoteLongs: false,
+ promoteBuffers: false,
+ promoteValues: false,
+ useBigInt64: false
+ });
+ }
+}
+exports.LimitedSizeDocument = LimitedSizeDocument;
+/**
+ * From the specs:
+ * Implementors SHOULD cumulatively update fields in the following order until the document is under the size limit:
+ * 1. Omit fields from `env` except `env.name`.
+ * 2. Omit fields from `os` except `os.type`.
+ * 3. Omit the `env` document entirely.
+ * 4. Truncate `platform`. -- special we do not truncate this field
+ */
+function makeClientMetadata(options) {
+ const metadataDocument = new LimitedSizeDocument(512);
+ const { appName = '' } = options;
+ // Add app name first, it must be sent
+ if (appName.length > 0) {
+ const name = Buffer.byteLength(appName, 'utf8') <= 128
+ ? options.appName
+ : Buffer.from(appName, 'utf8').subarray(0, 128).toString('utf8');
+ metadataDocument.ifItFitsItSits('application', { name });
+ }
+ const { name = '', version = '', platform = '' } = options.driverInfo;
+ const driverInfo = {
+ name: name.length > 0 ? `nodejs|${name}` : 'nodejs',
+ version: version.length > 0 ? `${NODE_DRIVER_VERSION}|${version}` : NODE_DRIVER_VERSION
+ };
+ if (!metadataDocument.ifItFitsItSits('driver', driverInfo)) {
+ throw new error_1.MongoInvalidArgumentError('Unable to include driverInfo name and version, metadata cannot exceed 512 bytes');
+ }
+ let runtimeInfo = getRuntimeInfo();
+ if (platform.length > 0) {
+ runtimeInfo = `${runtimeInfo}|${platform}`;
+ }
+ if (!metadataDocument.ifItFitsItSits('platform', runtimeInfo)) {
+ throw new error_1.MongoInvalidArgumentError('Unable to include driverInfo platform, metadata cannot exceed 512 bytes');
+ }
+ // Note: order matters, os.type is last so it will be removed last if we're at maxSize
+ const osInfo = new Map()
+ .set('name', process.platform)
+ .set('architecture', process.arch)
+ .set('version', os.release())
+ .set('type', os.type());
+ if (!metadataDocument.ifItFitsItSits('os', osInfo)) {
+ for (const key of osInfo.keys()) {
+ osInfo.delete(key);
+ if (osInfo.size === 0)
+ break;
+ if (metadataDocument.ifItFitsItSits('os', osInfo))
+ break;
+ }
+ }
+ const faasEnv = getFAASEnv();
+ if (faasEnv != null) {
+ if (!metadataDocument.ifItFitsItSits('env', faasEnv)) {
+ for (const key of faasEnv.keys()) {
+ faasEnv.delete(key);
+ if (faasEnv.size === 0)
+ break;
+ if (metadataDocument.ifItFitsItSits('env', faasEnv))
+ break;
+ }
+ }
+ }
+ return metadataDocument.toObject();
+}
+exports.makeClientMetadata = makeClientMetadata;
+let dockerPromise;
+/** @internal */
+async function getContainerMetadata() {
+ const containerMetadata = {};
+ dockerPromise ??= (0, utils_1.fileIsAccessible)('/.dockerenv');
+ const isDocker = await dockerPromise;
+ const { KUBERNETES_SERVICE_HOST = '' } = process.env;
+ const isKubernetes = KUBERNETES_SERVICE_HOST.length > 0 ? true : false;
+ if (isDocker)
+ containerMetadata.runtime = 'docker';
+ if (isKubernetes)
+ containerMetadata.orchestrator = 'kubernetes';
+ return containerMetadata;
+}
+/**
+ * @internal
+ * Re-add each metadata value.
+ * Attempt to add new env container metadata, but keep old data if it does not fit.
+ */
+async function addContainerMetadata(originalMetadata) {
+ const containerMetadata = await getContainerMetadata();
+ if (Object.keys(containerMetadata).length === 0)
+ return originalMetadata;
+ const extendedMetadata = new LimitedSizeDocument(512);
+ const extendedEnvMetadata = { ...originalMetadata?.env, container: containerMetadata };
+ for (const [key, val] of Object.entries(originalMetadata)) {
+ if (key !== 'env') {
+ extendedMetadata.ifItFitsItSits(key, val);
+ }
+ else {
+ if (!extendedMetadata.ifItFitsItSits('env', extendedEnvMetadata)) {
+ // add in old data if newer / extended metadata does not fit
+ extendedMetadata.ifItFitsItSits('env', val);
+ }
+ }
+ }
+ if (!('env' in originalMetadata)) {
+ extendedMetadata.ifItFitsItSits('env', extendedEnvMetadata);
+ }
+ return extendedMetadata.toObject();
+}
+exports.addContainerMetadata = addContainerMetadata;
+/**
+ * Collects FaaS metadata.
+ * - `name` MUST be the last key in the Map returned.
+ */
+function getFAASEnv() {
+ const { AWS_EXECUTION_ENV = '', AWS_LAMBDA_RUNTIME_API = '', FUNCTIONS_WORKER_RUNTIME = '', K_SERVICE = '', FUNCTION_NAME = '', VERCEL = '', AWS_LAMBDA_FUNCTION_MEMORY_SIZE = '', AWS_REGION = '', FUNCTION_MEMORY_MB = '', FUNCTION_REGION = '', FUNCTION_TIMEOUT_SEC = '', VERCEL_REGION = '' } = process.env;
+ const isAWSFaaS = AWS_EXECUTION_ENV.startsWith('AWS_Lambda_') || AWS_LAMBDA_RUNTIME_API.length > 0;
+ const isAzureFaaS = FUNCTIONS_WORKER_RUNTIME.length > 0;
+ const isGCPFaaS = K_SERVICE.length > 0 || FUNCTION_NAME.length > 0;
+ const isVercelFaaS = VERCEL.length > 0;
+ // Note: order matters, name must always be the last key
+ const faasEnv = new Map();
+ // When isVercelFaaS is true so is isAWSFaaS; Vercel inherits the AWS env
+ if (isVercelFaaS && !(isAzureFaaS || isGCPFaaS)) {
+ if (VERCEL_REGION.length > 0) {
+ faasEnv.set('region', VERCEL_REGION);
+ }
+ faasEnv.set('name', 'vercel');
+ return faasEnv;
+ }
+ if (isAWSFaaS && !(isAzureFaaS || isGCPFaaS || isVercelFaaS)) {
+ if (AWS_REGION.length > 0) {
+ faasEnv.set('region', AWS_REGION);
+ }
+ if (AWS_LAMBDA_FUNCTION_MEMORY_SIZE.length > 0 &&
+ Number.isInteger(+AWS_LAMBDA_FUNCTION_MEMORY_SIZE)) {
+ faasEnv.set('memory_mb', new bson_1.Int32(AWS_LAMBDA_FUNCTION_MEMORY_SIZE));
+ }
+ faasEnv.set('name', 'aws.lambda');
+ return faasEnv;
+ }
+ if (isAzureFaaS && !(isGCPFaaS || isAWSFaaS || isVercelFaaS)) {
+ faasEnv.set('name', 'azure.func');
+ return faasEnv;
+ }
+ if (isGCPFaaS && !(isAzureFaaS || isAWSFaaS || isVercelFaaS)) {
+ if (FUNCTION_REGION.length > 0) {
+ faasEnv.set('region', FUNCTION_REGION);
+ }
+ if (FUNCTION_MEMORY_MB.length > 0 && Number.isInteger(+FUNCTION_MEMORY_MB)) {
+ faasEnv.set('memory_mb', new bson_1.Int32(FUNCTION_MEMORY_MB));
+ }
+ if (FUNCTION_TIMEOUT_SEC.length > 0 && Number.isInteger(+FUNCTION_TIMEOUT_SEC)) {
+ faasEnv.set('timeout_sec', new bson_1.Int32(FUNCTION_TIMEOUT_SEC));
+ }
+ faasEnv.set('name', 'gcp.func');
+ return faasEnv;
+ }
+ return null;
+}
+exports.getFAASEnv = getFAASEnv;
+/**
+ * @internal
+ * Get current JavaScript runtime platform
+ *
+ * NOTE: The version information fetching is intentionally written defensively
+ * to avoid having a released driver version that becomes incompatible
+ * with a future change to these global objects.
+ */
+function getRuntimeInfo() {
+ if ('Deno' in globalThis) {
+ const version = typeof Deno?.version?.deno === 'string' ? Deno?.version?.deno : '0.0.0-unknown';
+ return `Deno v${version}, ${os.endianness()}`;
+ }
+ if ('Bun' in globalThis) {
+ const version = typeof Bun?.version === 'string' ? Bun?.version : '0.0.0-unknown';
+ return `Bun v${version}, ${os.endianness()}`;
+ }
+ return `Node.js ${process.version}, ${os.endianness()}`;
+}
+//# sourceMappingURL=client_metadata.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/handshake/client_metadata.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/handshake/client_metadata.js.map
new file mode 100644
index 000000000..11e022748
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/handshake/client_metadata.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"client_metadata.js","sourceRoot":"","sources":["../../../src/cmap/handshake/client_metadata.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,mCAAmC;AAEnC,qCAAwD;AACxD,uCAAwD;AAExD,uCAA+C;AAE/C,8DAA8D;AAC9D,MAAM,mBAAmB,GAAG,OAAO,CAAC,uBAAuB,CAAC,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CA0EC;AAcD;;;;;;;GAOG;AACH,SAAS,cAAc;IACrB,IAAI,MAAM,IAAI,UAAU,EAAE;QACxB,MAAM,OAAO,GAAG,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;QAEhG,OAAO,SAAS,OAAO,KAAK,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC;KAC/C;IAED,IAAI,KAAK,IAAI,UAAU,EAAE;QACvB,MAAM,OAAO,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QAElF,OAAO,QAAQ,OAAO,KAAK,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC;KAC9C;IAED,OAAO,WAAW,OAAO,CAAC,OAAO,KAAK,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC;AAC1D,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/metrics.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/metrics.js
new file mode 100644
index 000000000..b510164ba
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/metrics.js
@@ -0,0 +1,62 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ConnectionPoolMetrics = void 0;
+/** @internal */
+class ConnectionPoolMetrics {
+ constructor() {
+ this.txnConnections = 0;
+ this.cursorConnections = 0;
+ this.otherConnections = 0;
+ }
+ /**
+ * Mark a connection as pinned for a specific operation.
+ */
+ markPinned(pinType) {
+ if (pinType === ConnectionPoolMetrics.TXN) {
+ this.txnConnections += 1;
+ }
+ else if (pinType === ConnectionPoolMetrics.CURSOR) {
+ this.cursorConnections += 1;
+ }
+ else {
+ this.otherConnections += 1;
+ }
+ }
+ /**
+ * Unmark a connection as pinned for an operation.
+ */
+ markUnpinned(pinType) {
+ if (pinType === ConnectionPoolMetrics.TXN) {
+ this.txnConnections -= 1;
+ }
+ else if (pinType === ConnectionPoolMetrics.CURSOR) {
+ this.cursorConnections -= 1;
+ }
+ else {
+ this.otherConnections -= 1;
+ }
+ }
+ /**
+ * Return information about the cmap metrics as a string.
+ */
+ info(maxPoolSize) {
+ return ('Timed out while checking out a connection from connection pool: ' +
+ `maxPoolSize: ${maxPoolSize}, ` +
+ `connections in use by cursors: ${this.cursorConnections}, ` +
+ `connections in use by transactions: ${this.txnConnections}, ` +
+ `connections in use by other operations: ${this.otherConnections}`);
+ }
+ /**
+ * Reset the metrics to the initial values.
+ */
+ reset() {
+ this.txnConnections = 0;
+ this.cursorConnections = 0;
+ this.otherConnections = 0;
+ }
+}
+ConnectionPoolMetrics.TXN = 'txn';
+ConnectionPoolMetrics.CURSOR = 'cursor';
+ConnectionPoolMetrics.OTHER = 'other';
+exports.ConnectionPoolMetrics = ConnectionPoolMetrics;
+//# sourceMappingURL=metrics.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/metrics.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/metrics.js.map
new file mode 100644
index 000000000..c3b5fe25c
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/metrics.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../src/cmap/metrics.ts"],"names":[],"mappings":";;;AAAA,gBAAgB;AAChB,MAAa,qBAAqB;IAAlC;QAKE,mBAAc,GAAG,CAAC,CAAC;QACnB,sBAAiB,GAAG,CAAC,CAAC;QACtB,qBAAgB,GAAG,CAAC,CAAC;IAiDvB,CAAC;IA/CC;;OAEG;IACH,UAAU,CAAC,OAAe;QACxB,IAAI,OAAO,KAAK,qBAAqB,CAAC,GAAG,EAAE;YACzC,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;SAC1B;aAAM,IAAI,OAAO,KAAK,qBAAqB,CAAC,MAAM,EAAE;YACnD,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;SAC7B;aAAM;YACL,IAAI,CAAC,gBAAgB,IAAI,CAAC,CAAC;SAC5B;IACH,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,OAAe;QAC1B,IAAI,OAAO,KAAK,qBAAqB,CAAC,GAAG,EAAE;YACzC,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;SAC1B;aAAM,IAAI,OAAO,KAAK,qBAAqB,CAAC,MAAM,EAAE;YACnD,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;SAC7B;aAAM;YACL,IAAI,CAAC,gBAAgB,IAAI,CAAC,CAAC;SAC5B;IACH,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,WAAmB;QACtB,OAAO,CACL,kEAAkE;YAClE,gBAAgB,WAAW,IAAI;YAC/B,kCAAkC,IAAI,CAAC,iBAAiB,IAAI;YAC5D,uCAAuC,IAAI,CAAC,cAAc,IAAI;YAC9D,2CAA2C,IAAI,CAAC,gBAAgB,EAAE,CACnE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;IAC5B,CAAC;;AAtDe,yBAAG,GAAG,KAAc,AAAjB,CAAkB;AACrB,4BAAM,GAAG,QAAiB,AAApB,CAAqB;AAC3B,2BAAK,GAAG,OAAgB,AAAnB,CAAoB;AAH9B,sDAAqB"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/stream_description.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/stream_description.js
new file mode 100644
index 000000000..1665c6ebb
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/stream_description.js
@@ -0,0 +1,70 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StreamDescription = void 0;
+const bson_1 = require("../bson");
+const common_1 = require("../sdam/common");
+const server_description_1 = require("../sdam/server_description");
+const RESPONSE_FIELDS = [
+ 'minWireVersion',
+ 'maxWireVersion',
+ 'maxBsonObjectSize',
+ 'maxMessageSizeBytes',
+ 'maxWriteBatchSize',
+ 'logicalSessionTimeoutMinutes'
+];
+/** @public */
+class StreamDescription {
+ constructor(address, options) {
+ this.hello = null;
+ this.address = address;
+ this.type = common_1.ServerType.Unknown;
+ this.minWireVersion = undefined;
+ this.maxWireVersion = undefined;
+ this.maxBsonObjectSize = 16777216;
+ this.maxMessageSizeBytes = 48000000;
+ this.maxWriteBatchSize = 100000;
+ this.logicalSessionTimeoutMinutes = options?.logicalSessionTimeoutMinutes;
+ this.loadBalanced = !!options?.loadBalanced;
+ this.compressors =
+ options && options.compressors && Array.isArray(options.compressors)
+ ? options.compressors
+ : [];
+ this.serverConnectionId = null;
+ }
+ receiveResponse(response) {
+ if (response == null) {
+ return;
+ }
+ this.hello = response;
+ this.type = (0, server_description_1.parseServerType)(response);
+ if ('connectionId' in response) {
+ this.serverConnectionId = this.parseServerConnectionID(response.connectionId);
+ }
+ else {
+ this.serverConnectionId = null;
+ }
+ for (const field of RESPONSE_FIELDS) {
+ if (response[field] != null) {
+ this[field] = response[field];
+ }
+ // testing case
+ if ('__nodejs_mock_server__' in response) {
+ this.__nodejs_mock_server__ = response['__nodejs_mock_server__'];
+ }
+ }
+ if (response.compression) {
+ this.compressor = this.compressors.filter(c => response.compression?.includes(c))[0];
+ }
+ }
+ /* @internal */
+ parseServerConnectionID(serverConnectionId) {
+ // Connection ids are always integral, so it's safe to coerce doubles as well as
+ // any integral type.
+ return bson_1.Long.isLong(serverConnectionId)
+ ? serverConnectionId.toBigInt()
+ : // @ts-expect-error: Doubles are coercible to number
+ BigInt(serverConnectionId);
+ }
+}
+exports.StreamDescription = StreamDescription;
+//# sourceMappingURL=stream_description.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/stream_description.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/stream_description.js.map
new file mode 100644
index 000000000..f05a5f0b5
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/stream_description.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stream_description.js","sourceRoot":"","sources":["../../src/cmap/stream_description.ts"],"names":[],"mappings":";;;AAAA,kCAA2D;AAC3D,2CAA4C;AAC5C,mEAA6D;AAG7D,MAAM,eAAe,GAAG;IACtB,gBAAgB;IAChB,gBAAgB;IAChB,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,8BAA8B;CACtB,CAAC;AASX,cAAc;AACd,MAAa,iBAAiB;IAoB5B,YAAY,OAAe,EAAE,OAAkC;QAFxD,UAAK,GAAoB,IAAI,CAAC;QAGnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,mBAAU,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC;QAClC,IAAI,CAAC,mBAAmB,GAAG,QAAQ,CAAC;QACpC,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC;QAChC,IAAI,CAAC,4BAA4B,GAAG,OAAO,EAAE,4BAA4B,CAAC;QAC1E,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,CAAC;QAC5C,IAAI,CAAC,WAAW;YACd,OAAO,IAAI,OAAO,CAAC,WAAW,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;gBAClE,CAAC,CAAC,OAAO,CAAC,WAAW;gBACrB,CAAC,CAAC,EAAE,CAAC;QACT,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACjC,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ire_protocol/compression.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/compression.js
new file mode 100644
index 000000000..875d00148
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/compression.js
@@ -0,0 +1,163 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.decompressResponse = exports.compressCommand = exports.decompress = exports.compress = exports.uncompressibleCommands = exports.Compressor = void 0;
+const util_1 = require("util");
+const zlib = require("zlib");
+const constants_1 = require("../../constants");
+const deps_1 = require("../../deps");
+const error_1 = require("../../error");
+const commands_1 = require("../commands");
+const constants_2 = require("./constants");
+/** @public */
+exports.Compressor = Object.freeze({
+ none: 0,
+ snappy: 1,
+ zlib: 2,
+ zstd: 3
+});
+exports.uncompressibleCommands = new Set([
+ constants_1.LEGACY_HELLO_COMMAND,
+ 'saslStart',
+ 'saslContinue',
+ 'getnonce',
+ 'authenticate',
+ 'createUser',
+ 'updateUser',
+ 'copydbSaslStart',
+ 'copydbgetnonce',
+ 'copydb'
+]);
+const ZSTD_COMPRESSION_LEVEL = 3;
+const zlibInflate = (0, util_1.promisify)(zlib.inflate.bind(zlib));
+const zlibDeflate = (0, util_1.promisify)(zlib.deflate.bind(zlib));
+let zstd;
+let Snappy = null;
+function loadSnappy() {
+ if (Snappy == null) {
+ const snappyImport = (0, deps_1.getSnappy)();
+ if ('kModuleError' in snappyImport) {
+ throw snappyImport.kModuleError;
+ }
+ Snappy = snappyImport;
+ }
+ return Snappy;
+}
+// Facilitate compressing a message using an agreed compressor
+async function compress(options, dataToBeCompressed) {
+ const zlibOptions = {};
+ switch (options.agreedCompressor) {
+ case 'snappy': {
+ Snappy ??= loadSnappy();
+ return await Snappy.compress(dataToBeCompressed);
+ }
+ case 'zstd': {
+ loadZstd();
+ if ('kModuleError' in zstd) {
+ throw zstd['kModuleError'];
+ }
+ return await zstd.compress(dataToBeCompressed, ZSTD_COMPRESSION_LEVEL);
+ }
+ case 'zlib': {
+ if (options.zlibCompressionLevel) {
+ zlibOptions.level = options.zlibCompressionLevel;
+ }
+ return await zlibDeflate(dataToBeCompressed, zlibOptions);
+ }
+ default: {
+ throw new error_1.MongoInvalidArgumentError(`Unknown compressor ${options.agreedCompressor} failed to compress`);
+ }
+ }
+}
+exports.compress = compress;
+// Decompress a message using the given compressor
+async function decompress(compressorID, compressedData) {
+ if (compressorID !== exports.Compressor.snappy &&
+ compressorID !== exports.Compressor.zstd &&
+ compressorID !== exports.Compressor.zlib &&
+ compressorID !== exports.Compressor.none) {
+ throw new error_1.MongoDecompressionError(`Server sent message compressed using an unsupported compressor. (Received compressor ID ${compressorID})`);
+ }
+ switch (compressorID) {
+ case exports.Compressor.snappy: {
+ Snappy ??= loadSnappy();
+ return await Snappy.uncompress(compressedData, { asBuffer: true });
+ }
+ case exports.Compressor.zstd: {
+ loadZstd();
+ if ('kModuleError' in zstd) {
+ throw zstd['kModuleError'];
+ }
+ return await zstd.decompress(compressedData);
+ }
+ case exports.Compressor.zlib: {
+ return await zlibInflate(compressedData);
+ }
+ default: {
+ return compressedData;
+ }
+ }
+}
+exports.decompress = decompress;
+/**
+ * Load ZStandard if it is not already set.
+ */
+function loadZstd() {
+ if (!zstd) {
+ zstd = (0, deps_1.getZstdLibrary)();
+ }
+}
+const MESSAGE_HEADER_SIZE = 16;
+/**
+ * @internal
+ *
+ * Compresses an OP_MSG or OP_QUERY message, if compression is configured. This method
+ * also serializes the command to BSON.
+ */
+async function compressCommand(command, description) {
+ const finalCommand = description.agreedCompressor === 'none' || !commands_1.OpCompressedRequest.canCompress(command)
+ ? command
+ : new commands_1.OpCompressedRequest(command, {
+ agreedCompressor: description.agreedCompressor ?? 'none',
+ zlibCompressionLevel: description.zlibCompressionLevel ?? 0
+ });
+ const data = await finalCommand.toBin();
+ return Buffer.concat(data);
+}
+exports.compressCommand = compressCommand;
+/**
+ * @internal
+ *
+ * Decompresses an OP_MSG or OP_QUERY response from the server, if compression is configured.
+ *
+ * This method does not parse the response's BSON.
+ */
+async function decompressResponse(message) {
+ const messageHeader = {
+ length: message.readInt32LE(0),
+ requestId: message.readInt32LE(4),
+ responseTo: message.readInt32LE(8),
+ opCode: message.readInt32LE(12)
+ };
+ if (messageHeader.opCode !== constants_2.OP_COMPRESSED) {
+ const ResponseType = messageHeader.opCode === constants_2.OP_MSG ? commands_1.OpMsgResponse : commands_1.OpReply;
+ const messageBody = message.subarray(MESSAGE_HEADER_SIZE);
+ return new ResponseType(message, messageHeader, messageBody);
+ }
+ const header = {
+ ...messageHeader,
+ fromCompressed: true,
+ opCode: message.readInt32LE(MESSAGE_HEADER_SIZE),
+ length: message.readInt32LE(MESSAGE_HEADER_SIZE + 4)
+ };
+ const compressorID = message[MESSAGE_HEADER_SIZE + 8];
+ const compressedBuffer = message.slice(MESSAGE_HEADER_SIZE + 9);
+ // recalculate based on wrapped opcode
+ const ResponseType = header.opCode === constants_2.OP_MSG ? commands_1.OpMsgResponse : commands_1.OpReply;
+ const messageBody = await decompress(compressorID, compressedBuffer);
+ if (messageBody.length !== header.length) {
+ throw new error_1.MongoDecompressionError('Message body and message header must be the same length');
+ }
+ return new ResponseType(message, header, messageBody);
+}
+exports.decompressResponse = decompressResponse;
+//# sourceMappingURL=compression.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/compression.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/compression.js.map
new file mode 100644
index 000000000..55637a768
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/compression.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"compression.js","sourceRoot":"","sources":["../../../src/cmap/wire_protocol/compression.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AACjC,6BAA6B;AAE7B,+CAAuD;AACvD,qCAAuF;AACvF,uCAAiF;AACjF,0CAMqB;AACrB,2CAAoD;AAEpD,cAAc;AACD,QAAA,UAAU,GAAG,MAAM,CA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AK,kBAAM,CAAC,CAAC,CAAC,wBAAa,CAAC,CAAC,CAAC,kBAAO,CAAC;QAC/E,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC1D,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;KAC9D;IAED,MAAM,MAAM,GAAkB;QAC5B,GAAG,aAAa;QAChB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC;QAChD,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,mBAAmB,GAAG,CAAC,CAAC;KACrD,CAAC;IACF,MAAM,YAAY,GAAG,OAAO,CAAC,mBAAmB,GAAG,CAAC,CAAC,CAAC;IACtD,MAAM,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,GAAG,CAAC,CAAC,CAAC;IAEhE,sCAAsC;IACtC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,KAAK,kBAAM,CAAC,CAAC,CAAC,wBAAa,CAAC,CAAC,CAAC,kBAAO,CAAC;IACxE,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IACrE,IAAI,WAAW,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE;QACxC,MAAM,IAAI,+BAAuB,CAAC,yDAAyD,CAAC,CAAC;KAC9F;IACD,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC;AA9BD,gDA8BC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/constants.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/constants.js
new file mode 100644
index 000000000..b250859a2
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/constants.js
@@ -0,0 +1,17 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OP_MSG = exports.OP_COMPRESSED = exports.OP_DELETE = exports.OP_QUERY = exports.OP_INSERT = exports.OP_UPDATE = exports.OP_REPLY = exports.MIN_SUPPORTED_QE_SERVER_VERSION = exports.MIN_SUPPORTED_QE_WIRE_VERSION = exports.MAX_SUPPORTED_WIRE_VERSION = exports.MIN_SUPPORTED_WIRE_VERSION = exports.MAX_SUPPORTED_SERVER_VERSION = exports.MIN_SUPPORTED_SERVER_VERSION = void 0;
+exports.MIN_SUPPORTED_SERVER_VERSION = '3.6';
+exports.MAX_SUPPORTED_SERVER_VERSION = '7.0';
+exports.MIN_SUPPORTED_WIRE_VERSION = 6;
+exports.MAX_SUPPORTED_WIRE_VERSION = 21;
+exports.MIN_SUPPORTED_QE_WIRE_VERSION = 21;
+exports.MIN_SUPPORTED_QE_SERVER_VERSION = '7.0';
+exports.OP_REPLY = 1;
+exports.OP_UPDATE = 2001;
+exports.OP_INSERT = 2002;
+exports.OP_QUERY = 2004;
+exports.OP_DELETE = 2006;
+exports.OP_COMPRESSED = 2012;
+exports.OP_MSG = 2013;
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/constants.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/constants.js.map
new file mode 100644
index 000000000..6aa9450b9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/constants.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/cmap/wire_protocol/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,4BAA4B,GAAG,KAAK,CAAC;AACrC,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAC/B,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAChC,QAAA,6BAA6B,GAAG,EAAE,CAAC;AACnC,QAAA,+BAA+B,GAAG,KAAK,CAAC;AACxC,QAAA,QAAQ,GAAG,CAAC,CAAC;AACb,QAAA,SAAS,GAAG,IAAI,CAAC;AACjB,QAAA,SAAS,GAAG,IAAI,CAAC;AACjB,QAAA,QAAQ,GAAG,IAAI,CAAC;AAChB,QAAA,SAAS,GAAG,IAAI,CAAC;AACjB,QAAA,aAAa,GAAG,IAAI,CAAC;AACrB,QAAA,MAAM,GAAG,IAAI,CAAC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js
new file mode 100644
index 000000000..74706c507
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js
@@ -0,0 +1,100 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.onData = void 0;
+const utils_1 = require("../../utils");
+/**
+ * onData is adapted from Node.js' events.on helper
+ * https://nodejs.org/api/events.html#eventsonemitter-eventname-options
+ *
+ * Returns an AsyncIterator that iterates each 'data' event emitted from emitter.
+ * It will reject upon an error event.
+ */
+function onData(emitter) {
+ // Setup pending events and pending promise lists
+ /**
+ * When the caller has not yet called .next(), we store the
+ * value from the event in this list. Next time they call .next()
+ * we pull the first value out of this list and resolve a promise with it.
+ */
+ const unconsumedEvents = new utils_1.List();
+ /**
+ * When there has not yet been an event, a new promise will be created
+ * and implicitly stored in this list. When an event occurs we take the first
+ * promise in this list and resolve it.
+ */
+ const unconsumedPromises = new utils_1.List();
+ /**
+ * Stored an error created by an error event.
+ * This error will turn into a rejection for the subsequent .next() call
+ */
+ let error = null;
+ /** Set to true only after event listeners have been removed. */
+ let finished = false;
+ const iterator = {
+ next() {
+ // First, we consume all unread events
+ const value = unconsumedEvents.shift();
+ if (value != null) {
+ return Promise.resolve({ value, done: false });
+ }
+ // Then we error, if an error happened
+ // This happens one time if at all, because after 'error'
+ // we stop listening
+ if (error != null) {
+ const p = Promise.reject(error);
+ // Only the first element errors
+ error = null;
+ return p;
+ }
+ // If the iterator is finished, resolve to done
+ if (finished)
+ return closeHandler();
+ // Wait until an event happens
+ const { promise, resolve, reject } = (0, utils_1.promiseWithResolvers)();
+ unconsumedPromises.push({ resolve, reject });
+ return promise;
+ },
+ return() {
+ return closeHandler();
+ },
+ throw(err) {
+ errorHandler(err);
+ return Promise.resolve({ value: undefined, done: true });
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ }
+ };
+ // Adding event handlers
+ emitter.on('data', eventHandler);
+ emitter.on('error', errorHandler);
+ return iterator;
+ function eventHandler(value) {
+ const promise = unconsumedPromises.shift();
+ if (promise != null)
+ promise.resolve({ value, done: false });
+ else
+ unconsumedEvents.push(value);
+ }
+ function errorHandler(err) {
+ const promise = unconsumedPromises.shift();
+ if (promise != null)
+ promise.reject(err);
+ else
+ error = err;
+ void closeHandler();
+ }
+ function closeHandler() {
+ // Adding event handlers
+ emitter.off('data', eventHandler);
+ emitter.off('error', errorHandler);
+ finished = true;
+ const doneResult = { value: undefined, done: finished };
+ for (const promise of unconsumedPromises) {
+ promise.resolve(doneResult);
+ }
+ return Promise.resolve(doneResult);
+ }
+}
+exports.onData = onData;
+//# sourceMappingURL=on_data.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js.map
new file mode 100644
index 000000000..8fed2f989
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"on_data.js","sourceRoot":"","sources":["../../../src/cmap/wire_protocol/on_data.ts"],"names":[],"mappings":";;;AAEA,uCAAyD;AAWzD;;;;;;GAMG;AACH,SAAgB,MAAM,CAAC,OAAqB;IAC1C,iDAAiD;IACjD;;;;OAIG;IACH,MAA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document.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js
new file mode 100644
index 000000000..54490ebd8
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js
@@ -0,0 +1,218 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OnDemandDocument = void 0;
+const bson_1 = require("../../../bson");
+/** @internal */
+class OnDemandDocument {
+ constructor(
+ /** BSON bytes, this document begins at offset */
+ bson,
+ /** The start of the document */
+ offset = 0,
+ /** If this is an embedded document, indicates if this was a BSON array */
+ isArray = false) {
+ this.bson = bson;
+ this.offset = offset;
+ this.isArray = isArray;
+ /**
+ * Maps JS strings to elements and jsValues for speeding up subsequent lookups.
+ * - If `false` then name does not exist in the BSON document
+ * - If `CachedBSONElement` instance name exists
+ * - If `cache[name].value == null` jsValue has not yet been parsed
+ * - Null/Undefined values do not get cached because they are zero-length values.
+ */
+ this.cache = Object.create(null);
+ /** Caches the index of elements that have been named */
+ this.indexFound = Object.create(null);
+ this.elements = (0, bson_1.parseToElementsToArray)(this.bson, offset);
+ }
+ /** Only supports basic latin strings */
+ isElementName(name, element) {
+ const nameLength = element[2 /* BSONElementOffset.nameLength */];
+ const nameOffset = element[1 /* BSONElementOffset.nameOffset */];
+ if (name.length !== nameLength)
+ return false;
+ for (let i = 0; i < name.length; i++) {
+ if (this.bson[nameOffset + i] !== name.charCodeAt(i))
+ return false;
+ }
+ return true;
+ }
+ /**
+ * Seeks into the elements array for an element matching the given name.
+ *
+ * @remarks
+ * Caching:
+ * - Caches the existence of a property making subsequent look ups for non-existent properties return immediately
+ * - Caches names mapped to elements to avoid reiterating the array and comparing the name again
+ * - Caches the index at which an element has been found to prevent rechecking against elements already determined to belong to another name
+ *
+ * @param name - a basic latin string name of a BSON element
+ * @returns
+ */
+ getElement(name) {
+ const cachedElement = this.cache[name];
+ if (cachedElement === false)
+ return null;
+ if (cachedElement != null) {
+ return cachedElement;
+ }
+ if (typeof name === 'number') {
+ if (this.isArray) {
+ if (name < this.elements.length) {
+ const element = this.elements[name];
+ const cachedElement = { element, value: undefined };
+ this.cache[name] = cachedElement;
+ this.indexFound[name] = true;
+ return cachedElement;
+ }
+ else {
+ return null;
+ }
+ }
+ else {
+ return null;
+ }
+ }
+ for (let index = 0; index < this.elements.length; index++) {
+ const element = this.elements[index];
+ // skip this element if it has already been associated with a name
+ if (!this.indexFound[index] && this.isElementName(name, element)) {
+ const cachedElement = { element, value: undefined };
+ this.cache[name] = cachedElement;
+ this.indexFound[index] = true;
+ return cachedElement;
+ }
+ }
+ this.cache[name] = false;
+ return null;
+ }
+ toJSValue(element, as) {
+ const type = element[0 /* BSONElementOffset.type */];
+ const offset = element[3 /* BSONElementOffset.offset */];
+ const length = element[4 /* BSONElementOffset.length */];
+ if (as !== type) {
+ return null;
+ }
+ switch (as) {
+ case bson_1.BSONType.null:
+ case bson_1.BSONType.undefined:
+ return null;
+ case bson_1.BSONType.double:
+ return (0, bson_1.getFloat64LE)(this.bson, offset);
+ case bson_1.BSONType.int:
+ return (0, bson_1.getInt32LE)(this.bson, offset);
+ case bson_1.BSONType.long:
+ return (0, bson_1.getBigInt64LE)(this.bson, offset);
+ case bson_1.BSONType.bool:
+ return Boolean(this.bson[offset]);
+ case bson_1.BSONType.objectId:
+ return new bson_1.ObjectId(this.bson.subarray(offset, offset + 12));
+ case bson_1.BSONType.timestamp:
+ return new bson_1.Timestamp((0, bson_1.getBigInt64LE)(this.bson, offset));
+ case bson_1.BSONType.string:
+ return (0, bson_1.toUTF8)(this.bson, offset + 4, offset + length - 1, false);
+ case bson_1.BSONType.binData: {
+ const totalBinarySize = (0, bson_1.getInt32LE)(this.bson, offset);
+ const subType = this.bson[offset + 4];
+ if (subType === 2) {
+ const subType2BinarySize = (0, bson_1.getInt32LE)(this.bson, offset + 1 + 4);
+ if (subType2BinarySize < 0)
+ throw new bson_1.BSONError('Negative binary type element size found for subtype 0x02');
+ if (subType2BinarySize > totalBinarySize - 4)
+ throw new bson_1.BSONError('Binary type with subtype 0x02 contains too long binary size');
+ if (subType2BinarySize < totalBinarySize - 4)
+ throw new bson_1.BSONError('Binary type with subtype 0x02 contains too short binary size');
+ return new bson_1.Binary(this.bson.subarray(offset + 1 + 4 + 4, offset + 1 + 4 + 4 + subType2BinarySize), 2);
+ }
+ return new bson_1.Binary(this.bson.subarray(offset + 1 + 4, offset + 1 + 4 + totalBinarySize), subType);
+ }
+ case bson_1.BSONType.date:
+ // Pretend this is correct.
+ return new Date(Number((0, bson_1.getBigInt64LE)(this.bson, offset)));
+ case bson_1.BSONType.object:
+ return new OnDemandDocument(this.bson, offset);
+ case bson_1.BSONType.array:
+ return new OnDemandDocument(this.bson, offset, true);
+ default:
+ throw new bson_1.BSONError(`Unsupported BSON type: ${as}`);
+ }
+ }
+ /**
+ * Returns the number of elements in this BSON document
+ */
+ size() {
+ return this.elements.length;
+ }
+ /**
+ * Checks for the existence of an element by name.
+ *
+ * @remarks
+ * Uses `getElement` with the expectation that will populate caches such that a `has` call
+ * followed by a `getElement` call will not repeat the cost paid by the first look up.
+ *
+ * @param name - element name
+ */
+ has(name) {
+ const cachedElement = this.cache[name];
+ if (cachedElement === false)
+ return false;
+ if (cachedElement != null)
+ return true;
+ return this.getElement(name) != null;
+ }
+ get(name, as, required) {
+ const element = this.getElement(name);
+ if (element == null) {
+ if (required === true) {
+ throw new bson_1.BSONError(`BSON element "${name}" is missing`);
+ }
+ else {
+ return null;
+ }
+ }
+ if (element.value == null) {
+ const value = this.toJSValue(element.element, as);
+ if (value == null) {
+ if (required === true) {
+ throw new bson_1.BSONError(`BSON element "${name}" is missing`);
+ }
+ else {
+ return null;
+ }
+ }
+ // It is important to never store null
+ element.value = value;
+ }
+ return element.value;
+ }
+ getNumber(name, required) {
+ const maybeBool = this.get(name, bson_1.BSONType.bool);
+ const bool = maybeBool == null ? null : maybeBool ? 1 : 0;
+ const maybeLong = this.get(name, bson_1.BSONType.long);
+ const long = maybeLong == null ? null : Number(maybeLong);
+ const result = bool ?? long ?? this.get(name, bson_1.BSONType.int) ?? this.get(name, bson_1.BSONType.double);
+ if (required === true && result == null) {
+ throw new bson_1.BSONError(`BSON element "${name}" is missing`);
+ }
+ return result;
+ }
+ /**
+ * Deserialize this object, DOES NOT cache result so avoid multiple invocations
+ * @param options - BSON deserialization options
+ */
+ toObject(options) {
+ return bson_1.BSON.deserialize(this.bson, {
+ ...options,
+ index: this.offset,
+ allowObjectSmallerThanBufferSize: true
+ });
+ }
+ /** Returns this document's bytes only */
+ toBytes() {
+ const size = (0, bson_1.getInt32LE)(this.bson, this.offset);
+ return this.bson.subarray(this.offset, this.offset + size);
+ }
+}
+exports.OnDemandDocument = OnDemandDocument;
+//# sourceMappingURL=document.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js.map
new file mode 100644
index 000000000..019df95e5
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"document.js","sourceRoot":"","sources":["../../../../src/cmap/wire_protocol/on_demand/document.ts"],"names":[],"mappings":";;;AAAA,wCAcuB;AA+BvB,gBAAgB;AAChB,MAAa,gBAAgB;IAgB3B;IACE,iDAAiD;IAC9B,IAAgB;IACnC,gCAAgC;IACf,SAAS,CAAC;IAC3B,0EAA0E;IAC1D,UAAU,KAAK;QAJZ,SAAI,GAAJ,IAAI,CAAY;QAElB,WAAM,GAAN,MAAM,CAAI;QAEX,YAAO,GAAP,OAAO,CAAQ;QArBjC;;;;;;WAMG;QACc,UAAK,GACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,wDAAwD;QACvC,eAAU,GAA4B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAazE,IAAI,CAAC,Q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CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAE1D,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,eAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,eAAQ,CAAC,MAAM,CAAC,CAAC;QAE/F,IAAI,QAAQ,KAAK,IAAI,IAAI,MAAM,IAAI,IAAI,EAAE;YACvC,MAAM,IAAI,gBAAS,CAAC,iBAAiB,IAAI,cAAc,CAAC,CAAC;SAC1D;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,OAA8B;QAC5C,OAAO,WAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE;YACjC,GAAG,OAAO;YACV,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,gCAAgC,EAAE,IAAI;SACvC,CAAC,CAAC;IACL,CAAC;IAED,yCAAyC;IACzC,OAAO;QACL,MAAM,IAAI,GAAG,IAAA,iBAAU,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7D,CAAC;CACF;AAnSD,4CAmSC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/responses.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/responses.js
new file mode 100644
index 000000000..840e9a823
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/responses.js
@@ -0,0 +1,184 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CursorResponse = exports.MongoDBResponse = exports.isErrorResponse = void 0;
+const bson_1 = require("../../bson");
+const error_1 = require("../../error");
+const utils_1 = require("../../utils");
+const document_1 = require("./on_demand/document");
+/**
+ * Accepts a BSON payload and checks for na "ok: 0" element.
+ * This utility is intended to prevent calling response class constructors
+ * that expect the result to be a success and demand certain properties to exist.
+ *
+ * For example, a cursor response always expects a cursor embedded document.
+ * In order to write the class such that the properties reflect that assertion (non-null)
+ * we cannot invoke the subclass constructor if the BSON represents an error.
+ *
+ * @param bytes - BSON document returned from the server
+ */
+function isErrorResponse(bson) {
+ const elements = (0, bson_1.parseToElementsToArray)(bson, 0);
+ for (let eIdx = 0; eIdx < elements.length; eIdx++) {
+ const element = elements[eIdx];
+ if (element[2 /* BSONElementOffset.nameLength */] === 2) {
+ const nameOffset = element[1 /* BSONElementOffset.nameOffset */];
+ // 111 == "o", 107 == "k"
+ if (bson[nameOffset] === 111 && bson[nameOffset + 1] === 107) {
+ const valueOffset = element[3 /* BSONElementOffset.offset */];
+ const valueLength = element[4 /* BSONElementOffset.length */];
+ // If any byte in the length of the ok number (works for any type) is non zero,
+ // then it is considered "ok: 1"
+ for (let i = valueOffset; i < valueOffset + valueLength; i++) {
+ if (bson[i] !== 0x00)
+ return false;
+ }
+ return true;
+ }
+ }
+ }
+ return true;
+}
+exports.isErrorResponse = isErrorResponse;
+/** @internal */
+class MongoDBResponse extends document_1.OnDemandDocument {
+ static is(value) {
+ return value instanceof MongoDBResponse;
+ }
+ /** Indicates this document is a server error */
+ get isError() {
+ let isError = this.ok === 0;
+ isError ||= this.has('errmsg');
+ isError ||= this.has('code');
+ isError ||= this.has('$err'); // The '$err' field is used in OP_REPLY responses
+ return isError;
+ }
+ /**
+ * Drivers can safely assume that the `recoveryToken` field is always a BSON document but drivers MUST NOT modify the
+ * contents of the document.
+ */
+ get recoveryToken() {
+ return (this.get('recoveryToken', bson_1.BSONType.object)?.toObject({
+ promoteValues: false,
+ promoteLongs: false,
+ promoteBuffers: false
+ }) ?? null);
+ }
+ /**
+ * The server creates a cursor in response to a snapshot find/aggregate command and reports atClusterTime within the cursor field in the response.
+ * For the distinct command the server adds a top-level atClusterTime field to the response.
+ * The atClusterTime field represents the timestamp of the read and is guaranteed to be majority committed.
+ */
+ get atClusterTime() {
+ return (this.get('cursor', bson_1.BSONType.object)?.get('atClusterTime', bson_1.BSONType.timestamp) ??
+ this.get('atClusterTime', bson_1.BSONType.timestamp));
+ }
+ get operationTime() {
+ return this.get('operationTime', bson_1.BSONType.timestamp);
+ }
+ get ok() {
+ return this.getNumber('ok') ? 1 : 0;
+ }
+ get $err() {
+ return this.get('$err', bson_1.BSONType.string);
+ }
+ get errmsg() {
+ return this.get('errmsg', bson_1.BSONType.string);
+ }
+ get code() {
+ return this.getNumber('code');
+ }
+ get $clusterTime() {
+ if (!('clusterTime' in this)) {
+ const clusterTimeDoc = this.get('$clusterTime', bson_1.BSONType.object);
+ if (clusterTimeDoc == null) {
+ this.clusterTime = null;
+ return null;
+ }
+ const clusterTime = clusterTimeDoc.get('clusterTime', bson_1.BSONType.timestamp, true);
+ const signature = clusterTimeDoc.get('signature', bson_1.BSONType.object)?.toObject();
+ // @ts-expect-error: `signature` is incorrectly typed. It is public API.
+ this.clusterTime = { clusterTime, signature };
+ }
+ return this.clusterTime ?? null;
+ }
+ toObject(options) {
+ const exactBSONOptions = {
+ useBigInt64: options?.useBigInt64,
+ promoteLongs: options?.promoteLongs,
+ promoteValues: options?.promoteValues,
+ promoteBuffers: options?.promoteBuffers,
+ bsonRegExp: options?.bsonRegExp,
+ raw: options?.raw ?? false,
+ fieldsAsRaw: options?.fieldsAsRaw ?? {},
+ validation: this.parseBsonSerializationOptions(options)
+ };
+ return super.toObject(exactBSONOptions);
+ }
+ parseBsonSerializationOptions(options) {
+ const enableUtf8Validation = options?.enableUtf8Validation;
+ if (enableUtf8Validation === false) {
+ return { utf8: false };
+ }
+ return { utf8: { writeErrors: false } };
+ }
+}
+// {ok:1}
+MongoDBResponse.empty = new MongoDBResponse(new Uint8Array([13, 0, 0, 0, 16, 111, 107, 0, 1, 0, 0, 0, 0]));
+exports.MongoDBResponse = MongoDBResponse;
+/** @internal */
+class CursorResponse extends MongoDBResponse {
+ static is(value) {
+ return value instanceof CursorResponse || value === CursorResponse.emptyGetMore;
+ }
+ constructor(bytes, offset, isArray) {
+ super(bytes, offset, isArray);
+ this.ns = null;
+ this.batchSize = 0;
+ this.iterated = 0;
+ const cursor = this.get('cursor', bson_1.BSONType.object, true);
+ const id = cursor.get('id', bson_1.BSONType.long, true);
+ this.id = new bson_1.Long(Number(id & 0xffffffffn), Number((id >> 32n) & 0xffffffffn));
+ const namespace = cursor.get('ns', bson_1.BSONType.string);
+ if (namespace != null)
+ this.ns = (0, utils_1.ns)(namespace);
+ if (cursor.has('firstBatch'))
+ this.batch = cursor.get('firstBatch', bson_1.BSONType.array, true);
+ else if (cursor.has('nextBatch'))
+ this.batch = cursor.get('nextBatch', bson_1.BSONType.array, true);
+ else
+ throw new error_1.MongoUnexpectedServerResponseError('Cursor document did not contain a batch');
+ this.batchSize = this.batch.size();
+ }
+ get length() {
+ return Math.max(this.batchSize - this.iterated, 0);
+ }
+ shift(options) {
+ if (this.iterated >= this.batchSize) {
+ return null;
+ }
+ const result = this.batch.get(this.iterated, bson_1.BSONType.object, true) ?? null;
+ this.iterated += 1;
+ if (options?.raw) {
+ return result.toBytes();
+ }
+ else {
+ return result.toObject(options);
+ }
+ }
+ clear() {
+ this.iterated = this.batchSize;
+ }
+ pushMany() {
+ throw new Error('pushMany Unsupported method');
+ }
+ push() {
+ throw new Error('push Unsupported method');
+ }
+}
+/**
+ * This supports a feature of the FindCursor.
+ * It is an optimization to avoid an extra getMore when the limit has been reached
+ */
+CursorResponse.emptyGetMore = { id: new bson_1.Long(0), length: 0, shift: () => null };
+exports.CursorResponse = CursorResponse;
+//# sourceMappingURL=responses.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/responses.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/responses.js.map
new file mode 100644
index 000000000..bf544a0c9
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/responses.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/cmap/wire_protocol/responses.ts"],"names":[],"mappings":";;;AAAA,qCAOoB;AACpB,uCAAiE;AAEjE,uCAAwD;AACxD,mDAAwD;AAUxD;;;;;;;;;;GAUG;AACH,SAAgB,eAAe,CAAC,IAAgB;IAC9C,MAAM,QAAQ,GAAG,IAAA,6BAAsB,EAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjD,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QACjD,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAE/B,IAAI,OAAO,sCAA8B,KAAK,CAAC,EAAE;YAC/C,MAAM,UAAU,GAAG,OAAO,sCAA8B,CAAC;YAEzD,yBAAyB;YACzB,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;gBAC5D,MAAM,WAAW,GAAG,OAAO,kCAA0B,CAAC;gBACtD,MAAM,WAAW,GAAG,OAAO,kCAA0B,CAAC;gBAEtD,+EAA+E;gBAC/E,gCAAgC;gBAChC,KAAK,IAAI,CAAC,GAAG,WAAW,EAAE,CAAC,GAAG,WAAW,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE;oBAC5D,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;wBAAE,OAAO,KAAK,CAAC;iBACpC;gBAED,OAAO,IAAI,CAAC;aACb;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAzBD,0CAyBC;AAOD,gBAAgB;AAChB,MAA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QAEnB,IAAI,OAAO,EAAE,GAAG,EAAE;YAChB,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACjC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;IACjC,CAAC;IAED,QAAQ;QACN,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,IAAI;QACF,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;;AAhED;;;GAGG;AACI,2BAAY,GAAG,EAAE,EAAE,EAAE,IAAI,WAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,AAApD,CAAqD;AAL7D,wCAAc"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/shared.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/shared.js
new file mode 100644
index 000000000..f4d4eeeff
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/shared.js
@@ -0,0 +1,36 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isSharded = exports.getReadPreference = void 0;
+const error_1 = require("../../error");
+const read_preference_1 = require("../../read_preference");
+const common_1 = require("../../sdam/common");
+const topology_description_1 = require("../../sdam/topology_description");
+function getReadPreference(options) {
+ // Default to command version of the readPreference.
+ let readPreference = options?.readPreference ?? read_preference_1.ReadPreference.primary;
+ if (typeof readPreference === 'string') {
+ readPreference = read_preference_1.ReadPreference.fromString(readPreference);
+ }
+ if (!(readPreference instanceof read_preference_1.ReadPreference)) {
+ throw new error_1.MongoInvalidArgumentError('Option "readPreference" must be a ReadPreference instance');
+ }
+ return readPreference;
+}
+exports.getReadPreference = getReadPreference;
+function isSharded(topologyOrServer) {
+ if (topologyOrServer == null) {
+ return false;
+ }
+ if (topologyOrServer.description && topologyOrServer.description.type === common_1.ServerType.Mongos) {
+ return true;
+ }
+ // NOTE: This is incredibly inefficient, and should be removed once command construction
+ // happens based on `Server` not `Topology`.
+ if (topologyOrServer.description && topologyOrServer.description instanceof topology_description_1.TopologyDescription) {
+ const servers = Array.from(topologyOrServer.description.servers.values());
+ return servers.some((server) => server.type === common_1.ServerType.Mongos);
+ }
+ return false;
+}
+exports.isSharded = isSharded;
+//# sourceMappingURL=shared.js.map
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/shared.js.map b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/shared.js.map
new file mode 100644
index 000000000..0861cb85b
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/cmap/wire_protocol/shared.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/cmap/wire_protocol/shared.ts"],"names":[],"mappings":";;;AAAA,uCAAwD;AAExD,2DAAuD;AACvD,8CAA+C;AAI/C,0EAAsE;AAOtE,SAAgB,iBAAiB,CAAC,OAA8B;IAC9D,oDAAoD;IACpD,IAAI,cAAc,GAAG,OAAO,EAAE,cAAc,IAAI,gCAAc,CAAC,OAAO,CAAC;IAEvE,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,cAAc,GAAG,gCAAc,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;KAC5D;IAED,IAAI,CAAC,CAAC,cAAc,YAAY,gCAAc,CAAC,EAAE;QAC/C,MAAM,IAAI,iCAAyB,CACjC,2DAA2D,CAC5D,CAAC;KACH;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAfD,8CAeC;AAED,SAAgB,SAAS,CAAC,gBAAiD;IACzE,IAAI,gBAAgB,IAAI,IAAI,EAAE;QAC5B,OAAO,KAAK,CAAC;KACd;IAED,IAAI,gBAAgB,CAAC,WAAW,IAAI,gBAAgB,CAAC,WAAW,CAAC,IAAI,KAAK,mBAAU,CAAC,MAAM,EAAE;QAC3F,OAAO,IAAI,CAAC;KACb;IAED,wFAAwF;IACxF,4CAA4C;IAC5C,IAAI,gBAAgB,CAAC,WAAW,IAAI,gBAAgB,CAAC,WAAW,YAAY,0CAAmB,EAAE;QAC/F,MAAM,OAAO,GAAwB,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/F,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAyB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,mBAAU,CAAC,MAAM,CAAC,CAAC;KACvF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAjBD,8BAiBC"}
\ No newline at end of file
diff --git a/week-3/04-course-app-hard/node_modules/mongodb/lib/collection.js b/week-3/04-course-app-hard/node_modules/mongodb/lib/collection.js
new file mode 100644
index 000000000..1fcc59540
--- /dev/null
+++ b/week-3/04-course-app-hard/node_modules/mongodb/lib/collection.js
@@ -0,0 +1,634 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Collection = void 0;
+const bson_1 = require("./bson");
+const ordered_1 = require("./bulk/ordered");
+const unordered_1 = require("./bulk/unordered");
+const change_stream_1 = require("./change_stream");
+const aggregation_cursor_1 = require("./cursor/aggregation_cursor");
+const find_cursor_1 = require("./cursor/find_cursor");
+const list_indexes_cursor_1 = require("./cursor/list_indexes_cursor");
+const list_search_indexes_cursor_1 = require("./cursor/list_search_indexes_cursor");
+const error_1 = require("./error");
+const bulk_write_1 = require("./operations/bulk_write");
+const count_1 = require("./operations/count");
+const count_documents_1 = require("./operations/count_documents");
+const delete_1 = require("./operations/delete");
+const distinct_1 = require("./operations/distinct");
+const drop_1 = require("./operations/drop");
+const estimated_document_count_1 = require("./operations/estimated_document_count");
+const execute_operation_1 = require("./operations/execute_operation");
+const find_and_modify_1 = require("./operations/find_and_modify");
+const indexes_1 = require("./operations/indexes");
+const insert_1 = require("./operations/insert");
+const is_capped_1 = require("./operations/is_capped");
+const options_operation_1 = require("./operations/options_operation");
+const rename_1 = require("./operations/rename");
+const create_1 = require("./operations/search_indexes/create");
+const drop_2 = require("./operations/search_indexes/drop");
+const update_1 = require("./operations/search_indexes/update");
+const update_2 = require("./operations/update");
+const read_concern_1 = require("./read_concern");
+const read_preference_1 = require("./read_preference");
+const utils_1 = require("./utils");
+const write_concern_1 = require("./write_concern");
+/**
+ * The **Collection** class is an internal class that embodies a MongoDB collection
+ * allowing for insert/find/update/delete and other command operation on that MongoDB collection.
+ *
+ * **COLLECTION Cannot directly be instantiated**
+ * @public
+ *
+ * @example
+ * ```ts
+ * import { MongoClient } from 'mongodb';
+ *
+ * interface Pet {
+ * name: string;
+ * kind: 'dog' | 'cat' | 'fish';
+ * }
+ *
+ * const client = new MongoClient('mongodb://localhost:27017');
+ * const pets = client.db().collection('pets');
+ *
+ * const petCursor = pets.find();
+ *
+ * for await (const pet of petCursor) {
+ * console.log(`${pet.name} is a ${pet.kind}!`);
+ * }
+ * ```
+ */
+class Collection {
+ /**
+ * Create a new Collection instance
+ * @internal
+ */
+ constructor(db, name, options) {
+ // Internal state
+ this.s = {
+ db,
+ options,
+ namespace: new utils_1.MongoDBCollectionNamespace(db.databaseName, name),
+ pkFactory: db.options?.pkFactory ?? utils_1.DEFAULT_PK_FACTORY,
+ readPreference: read_preference_1.ReadPreference.fromOptions(options),
+ bsonOptions: (0, bson_1.resolveBSONOptions)(options, db),
+ readConcern: read_concern_1.ReadConcern.fromOptions(options),
+ writeConcern: write_concern_1.WriteConcern.fromOptions(options)
+ };
+ this.client = db.client;
+ }
+ /**
+ * The name of the database this collection belongs to
+ */
+ get dbName() {
+ return this.s.namespace.db;
+ }
+ /**
+ * The name of this collection
+ */
+ get collectionName() {
+ return this.s.namespace.collection;
+ }
+ /**
+ * The namespace of this collection, in the format `${this.dbName}.${this.collectionName}`
+ */
+ get namespace() {
+ return this.fullNamespace.toString();
+ }
+ /**
+ * @internal
+ *
+ * The `MongoDBNamespace` for the collection.
+ */
+ get fullNamespace() {
+ return this.s.namespace;
+ }
+ /**
+ * The current readConcern of the collection. If not explicitly defined for
+ * this collection, will be inherited from the parent DB
+ */
+ get readConcern() {
+ if (this.s.readConcern == null) {
+ return this.s.db.readConcern;
+ }
+ return this.s.readConcern;
+ }
+ /**
+ * The current readPreference of the collection. If not explicitly defined for
+ * this collection, will be inherited from the parent DB
+ */
+ get readPreference() {
+ if (this.s.readPreference == null) {
+ return this.s.db.readPreference;
+ }
+ return this.s.readPreference;
+ }
+ get bsonOptions() {
+ return this.s.bsonOptions;
+ }
+ /**
+ * The current writeConcern of the collection. If not explicitly defined for
+ * this collection, will be inherited from the parent DB
+ */
+ get writeConcern() {
+ if (this.s.writeConcern == null) {
+ return this.s.db.writeConcern;
+ }
+ return this.s.writeConcern;
+ }
+ /** The current index hint for the collection */
+ get hint() {
+ return this.s.collectionHint;
+ }
+ set hint(v) {
+ this.s.collectionHint = (0, utils_1.normalizeHintField)(v);
+ }
+ /**
+ * Inserts a single document into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @param doc - The document to insert
+ * @param options - Optional settings for the command
+ */
+ async insertOne(doc, options) {
+ return await (0, execute_operation_1.executeOperation)(this.client, new insert_1.InsertOneOperation(this, doc, (0, utils_1.resolveOptions)(this, options)));
+ }
+ /**
+ * Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @param docs - The documents to insert
+ * @param options - Optional settings for the command
+ */
+ async insertMany(docs, options) {
+ return await (0, execute_operation_1.executeOperation)(this.client, new insert_1.InsertManyOperation(this, docs, (0, utils_1.resolveOptions)(this, options ?? { ordered: true })));
+ }
+ /**
+ * Perform a bulkWrite operation without a fluent API
+ *
+ * Legal operation types are
+ * - `insertOne`
+ * - `replaceOne`
+ * - `updateOne`
+ * - `updateMany`
+ * - `deleteOne`
+ * - `deleteMany`
+ *
+ * If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @param operations - Bulk operations to perform
+ * @param options - Optional settings for the command
+ * @throws MongoDriverError if operations is not an array
+ */
+ async bulkWrite(operations, options) {
+ if (!Array.isArray(operations)) {
+ throw new error_1.MongoInvalidArgumentError('Argument "operations" must be an array of documents');
+ }
+ return await (0, execute_operation_1.executeOperation)(this.client, new bulk_write_1.BulkWriteOperation(this, operations, (0, utils_1.resolveOptions)(this, options ?? { ordered: true })));
+ }
+ /**
+ * Update a single document in a collection
+ *
+ * The value of `update` can be either:
+ * - UpdateFilter - A document that contains update operator expressions,
+ * - Document[] - an aggregation pipeline.
+ *
+ * @param filter - The filter used to select the document to update
+ * @param update - The modifications to apply
+ * @param options - Optional settings for the command
+ */
+ async updateOne(filter, update, options) {
+ return await (0, execute_operation_1.executeOperation)(this.client, new update_2.UpdateOneOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
+ }
+ /**
+ * Replace a document in a collection with another document
+ *
+ * @param filter - The filter used to select the document to replace
+ * @param replacement - The Document that replaces the matching document
+ * @param options - Optional settings for the command
+ */
+ async replaceOne(filter, replacement, options) {
+ return await (0, execute_operation_1.executeOperation)(this.client, new update_2.ReplaceOneOperation(this, filter, replacement, (0, utils_1.resolveOptions)(this, options)));
+ }
+ /**
+ * Update multiple documents in a collection
+ *
+ * The value of `update` can be either:
+ * - UpdateFilter