diff --git a/README.md b/README.md
index c3e02c3f..42467d29 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,22 @@
# Capstone Project For AI-enhanced Web3 Frontend Development Course
-Welcome to the Capstone Project for the AI-Enhanced Web3 Frontend Development Course at dProgramming University. Follow the instructions below to complete your project submission.
+Welcome to the Capstone Project for the AI-Enhanced Web3 Frontend Development Course at dProgramming University.
-Follow the [course lesson project instructions here](https://dprogramminguniversity.com/freecourses/ai-enhanced-web3-frontend-development-course/freelessons/capstone-project-html-build-dapp-website-html-structure-with-ai/) on how to work with this repo to submit your project for approval and certification
+This project was done and submitted for approval by:
+
+Adelowokan Adeyanju
+
+## MY EXPERIENCES:
+
+### SECTION 1
+Taking the HTML course section of the 100 days bootcamp was a smooth, fun and engaging ride. The major challenge I faced was with using chapgpt 4.0 as it is not free unlike chatgpt 3.5 which was I eventually made use of.
+
+### SECTION 2
+I learnt about CSS syntax, selectors, specificity, libraries, etc and how to use AI to generate and modify css codes. The major challenge was how to customize and override the default bootstrap css code but that was solved by targeting the class of the html to be styled instead of the element.
+
+### SECTION 3 - 6
+Learning JavaScript was quite an interesting journey and I had to take my time learning it. I learnt how it interacts with html and css. I also learnt how to incorporate API and graphql into my dapp. No major challenge as it were.
+
+SCREENSHOTS OF SERVER, FRONTEND AND WORKSPACE
+- ![GitHub Remote URL](/media/images/apollo%20server%20screenshot.png)
+- ![GitHub Remote URL](/media/images/webpage%20screenshot.png)
+- ![GitHub Remote URL](/media/images/Screenshot%20from%202024-08-27%2015-39-12.png)
\ No newline at end of file
diff --git a/capstone-project-for-ai-enhanced-web3-frontend-development-course b/capstone-project-for-ai-enhanced-web3-frontend-development-course
new file mode 160000
index 00000000..b07446fb
--- /dev/null
+++ b/capstone-project-for-ai-enhanced-web3-frontend-development-course
@@ -0,0 +1 @@
+Subproject commit b07446fb0cd477f586d69621ed9c03aa9217742a
diff --git a/globalscript.js b/globalscript.js
new file mode 100644
index 00000000..da3ec7aa
--- /dev/null
+++ b/globalscript.js
@@ -0,0 +1,91 @@
+// External JavaScript file for the global script
+
+// Declare variables to track the total minted tokens and set a minting limit
+let totalMintedTokens = 0;
+const mintingLimit = 10000; // Set a limit for total tokens that can be minted
+
+document.addEventListener('DOMContentLoaded', function() {
+ const mintButton = document.querySelector('#mint button');
+ const walletInput = document.querySelector('#walletAddress');
+ const tokenInput = document.querySelector('#tokenAmount');
+ const mintStatus = document.querySelector('#mintStatus'); // Access the mint status element
+
+ mintButton.addEventListener('click', function() {
+ let walletAddress = walletInput.value;
+ let tokenAmount = parseInt(tokenInput.value);
+
+ // Start the animation before processing
+ mintStatus.classList.add('animate-status');
+
+ // Validation for wallet address and token amount
+ if(walletAddress !== '' && !isNaN(tokenAmount) && tokenAmount > 0) {
+ // Call asynchronous function to simulate token minting
+ simulateTokenMinting(tokenAmount)
+ .then(minted => {
+ // Stop the animation and update the status
+ mintStatus.classList.remove('animate-status');
+ mintStatus.textContent = `Successfully minted ${minted} tokens to wallet: ${walletAddress}`;
+ })
+ .catch(error => {
+ // Stop the animation and show the error message
+ mintStatus.classList.remove('animate-status');
+ mintStatus.textContent = error;
+ });
+ } else {
+ // Stop the animation if validation fails
+ mintStatus.classList.remove('animate-status');
+ mintStatus.textContent = 'Invalid wallet address or token amount. Please try again.';
+ }
+ });
+});
+
+// Asynchronous function to simulate token minting using a promise
+function simulateTokenMinting(amount) {
+ return new Promise((resolve, reject) => {
+ setTimeout(() => {
+ let successfullyMinted = 0;
+ for(let i = 0; i < amount; i++) {
+ if (totalMintedTokens < mintingLimit) {
+ totalMintedTokens++;
+ successfullyMinted++;
+ } else {
+ reject('Minting limit reached. No more tokens can be minted.');
+ break;
+ }
+ }
+ document.getElementById('totalMinted').textContent = `Total Minted: ${totalMintedTokens}`;
+ resolve(successfullyMinted);
+ }, 2000); // Simulate a network request delay
+ });
+}
+
+
+// Function to fetch and display crypto prices
+async function fetchCryptoPrices() {
+ try {
+ const url = 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana,celestia&vs_currencies=usd';
+ const response = await fetch(url);
+ const data = await response.json();
+
+ // Extract prices
+ const bitcoinPrice = data.bitcoin.usd;
+ const ethereumPrice = data.ethereum.usd;
+ const solanaPrice = data.solana.usd;
+ const celestiaPrice = data.celestia.usd
+
+ // Update the DOM
+ document.getElementById('cryptoPrices').innerHTML = `
+
Crypto Prices:
+ Bitcoin Price: $${bitcoinPrice}
+ Ethereum Price: $${ethereumPrice}
+ Solana Price: $${solanaPrice}
+ Celestia Price: $${celestiaPrice}
+ `;
+ document.getElementById("cryptoPrices").style.color = "blue"
+ } catch (error) {
+ console.error('Error fetching crypto prices:', error);
+ }
+}
+
+// Call the function to fetch and display crypto prices
+fetchCryptoPrices();
\ No newline at end of file
diff --git a/globalstyles.css b/globalstyles.css
new file mode 100644
index 00000000..02c32c1f
--- /dev/null
+++ b/globalstyles.css
@@ -0,0 +1,189 @@
+/* General Styles */
+body {
+ font-family: Arial, sans-serif;
+ margin: 0;
+ padding: 0;
+ background-color: #f5f5f5;
+}
+
+.container {
+ max-width: 1200px;
+ margin: auto;
+ padding: 0 15px;
+}
+
+/* Header Styles */
+header {
+ background-color: #007bff;
+ color: white;
+ padding: 20px 0;
+ text-align: center;
+}
+
+header h1 {
+ margin: 0;
+ font-size: 3rem;
+}
+
+nav ul {
+ list-style: none;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+ margin: 10px 0 0;
+}
+
+nav ul li {
+ margin: 0 15px;
+}
+
+nav ul li a {
+ color: white !important;
+ text-decoration: none;
+ padding: 5px 10px;
+ font-size: 1.2rem;
+}
+
+nav ul li a:hover {
+ background-color: #0056b3;
+ border-radius: 5px;
+}
+
+/* Main Content Styles */
+main {
+ padding: 40px 0;
+ background-color: #fff;
+ border-radius: 8px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+}
+
+article,
+section,
+aside {
+ margin-bottom: 40px;
+}
+
+article h2,
+section h2,
+aside h3 {
+ border-bottom: 2px solid #007bff;
+ padding-bottom: 10px;
+ font-size: 1.8rem;
+}
+
+article p,
+section p,
+aside p {
+ font-size: 1.1rem;
+ line-height: 1.6;
+}
+
+form {
+ max-width: 600px;
+ margin: auto;
+ padding: 20px;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ background-color: #f9f9f9;
+}
+
+.form-group {
+ margin-bottom: 15px;
+}
+
+.form-group input {
+ width: 100%;
+ padding: 12px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ font-size: 1rem;
+}
+
+button {
+ background-color: #007bff;
+ color: white;
+ border: none;
+ padding: 12px 20px;
+ border-radius: 5px;
+ cursor: pointer;
+ display: block;
+ width: 100%;
+ font-size: 1.2rem;
+}
+
+button:hover {
+ background-color: #0056b3;
+}
+
+/* Minting Status Styles */
+#mintStatus {
+ font-size: 1.2rem;
+ font-weight: bold;
+ color: #257ed1;
+ text-align: center;
+}
+
+ /* Minting Status Animation Styles */
+.animate-status {
+ animation: pulse 2s infinite;
+}
+
+@keyframes pulse {
+ 0% {
+ opacity: 1;
+ transform: scale(1);
+ }
+ 50% {
+ opacity: 0.5;
+ transform: scale(1.05);
+ }
+ 100% {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
+/* Mint Status Section */
+#totalMinted {
+ font-size: 1.2rem;
+ font-weight: bold;
+ color: #257ed1;
+ text-align: center;
+}
+
+/* Crypto Prices Section */
+#cryptoPrices {
+ text-align: center;
+ font-size: 1.2rem;
+ color: #555;
+}
+
+#cryptoPrices h2 {
+ font-size: 1.8rem;
+ color: #007bff;
+ margin-bottom: 20px;
+}
+
+/* Footer Styles */
+footer {
+ background-color: #050d16;
+ color: white;
+ padding: 20px 0;
+ text-align: center;
+}
+
+footer a {
+ color: #007bff;
+ text-decoration: none;
+}
+
+footer a:hover {
+ text-decoration: underline;
+}
+
+.bg {
+ background-color: #007bff;
+ color: white;
+ padding: 20px 0;
+ text-align: center;
+ margin-bottom: 0;
+}
diff --git a/index.js b/index.js
new file mode 100644
index 00000000..b5573e2e
--- /dev/null
+++ b/index.js
@@ -0,0 +1,37 @@
+const { ApolloServer, gql } = require('apollo-server');
+
+//Implement GraphQL Schema
+const typeDefs = gql`
+ type CryptoPrice {
+ id: ID!
+ name: String
+ usdPrice: Float
+ }
+
+ type Query {
+ getCryptoPrices: [CryptoPrice]
+ }
+`;
+
+
+//Implement GraphQL Resolver
+const resolvers = {
+ Query: {
+ getCryptoPrices: async () => {
+ const response = await fetch('https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana,litecoin,jupiter&vs_currencies=usd');
+ const prices = await response.json();
+ return Object.keys(prices).map(key => ({
+ id: key,
+ name: key,
+ usdPrice: prices[key].usd,
+ }));
+ },
+ },
+ };
+
+
+// Start the server
+const server = new ApolloServer({ typeDefs, resolvers });
+server.listen({ port: 4000 }).then(({ url }) => {
+ console.log(`Server ready at ${url}`);
+});
\ No newline at end of file
diff --git a/media/images/Screenshot from 2024-08-27 15-39-12.png b/media/images/Screenshot from 2024-08-27 15-39-12.png
new file mode 100644
index 00000000..5f34172c
Binary files /dev/null and b/media/images/Screenshot from 2024-08-27 15-39-12.png differ
diff --git a/media/images/apollo server screenshot.png b/media/images/apollo server screenshot.png
new file mode 100644
index 00000000..bc474da4
Binary files /dev/null and b/media/images/apollo server screenshot.png differ
diff --git a/media/images/photo_2024-03-11_18-04-00.jpg b/media/images/photo_2024-03-11_18-04-00.jpg
new file mode 100644
index 00000000..98d398ec
Binary files /dev/null and b/media/images/photo_2024-03-11_18-04-00.jpg differ
diff --git a/media/images/webpage screenshot.png b/media/images/webpage screenshot.png
new file mode 100644
index 00000000..cd358f01
Binary files /dev/null and b/media/images/webpage screenshot.png differ
diff --git a/node_modules/.bin/nodemon b/node_modules/.bin/nodemon
new file mode 100755
index 00000000..88b76cfc
--- /dev/null
+++ b/node_modules/.bin/nodemon
@@ -0,0 +1,17 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -z "$NODE_PATH" ]; then
+ export NODE_PATH="/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/nodemon@3.1.4/node_modules/nodemon/bin/node_modules:/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/nodemon@3.1.4/node_modules/nodemon/node_modules:/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/nodemon@3.1.4/node_modules:/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/node_modules"
+else
+ export NODE_PATH="/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/nodemon@3.1.4/node_modules/nodemon/bin/node_modules:/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/nodemon@3.1.4/node_modules/nodemon/node_modules:/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/nodemon@3.1.4/node_modules:/home/adeyanju/Documents/dPU classes/project-section3to6-js-api-graphql/node_modules/.pnpm/node_modules:$NODE_PATH"
+fi
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@"
+else
+ exec node "$basedir/../nodemon/bin/nodemon.js" "$@"
+fi
diff --git a/node_modules/.modules.yaml b/node_modules/.modules.yaml
new file mode 100644
index 00000000..d0607a09
--- /dev/null
+++ b/node_modules/.modules.yaml
@@ -0,0 +1,353 @@
+hoistPattern:
+ - '*'
+hoistedDependencies:
+ '@apollo/protobufjs@1.2.6':
+ '@apollo/protobufjs': private
+ '@apollo/usage-reporting-protobuf@4.1.1':
+ '@apollo/usage-reporting-protobuf': private
+ '@apollo/utils.dropunuseddefinitions@1.1.0(graphql@16.9.0)':
+ '@apollo/utils.dropunuseddefinitions': private
+ '@apollo/utils.keyvaluecache@1.0.2':
+ '@apollo/utils.keyvaluecache': private
+ '@apollo/utils.logger@1.0.1':
+ '@apollo/utils.logger': private
+ '@apollo/utils.printwithreducedwhitespace@1.1.0(graphql@16.9.0)':
+ '@apollo/utils.printwithreducedwhitespace': private
+ '@apollo/utils.removealiases@1.0.0(graphql@16.9.0)':
+ '@apollo/utils.removealiases': private
+ '@apollo/utils.sortast@1.1.0(graphql@16.9.0)':
+ '@apollo/utils.sortast': private
+ '@apollo/utils.stripsensitiveliterals@1.2.0(graphql@16.9.0)':
+ '@apollo/utils.stripsensitiveliterals': private
+ '@apollo/utils.usagereporting@1.0.1(graphql@16.9.0)':
+ '@apollo/utils.usagereporting': private
+ '@apollographql/apollo-tools@0.5.4(graphql@16.9.0)':
+ '@apollographql/apollo-tools': private
+ '@apollographql/graphql-playground-html@1.6.29':
+ '@apollographql/graphql-playground-html': private
+ '@graphql-tools/merge@8.3.1(graphql@16.9.0)':
+ '@graphql-tools/merge': private
+ '@graphql-tools/mock@8.7.20(graphql@16.9.0)':
+ '@graphql-tools/mock': private
+ '@graphql-tools/schema@8.5.1(graphql@16.9.0)':
+ '@graphql-tools/schema': private
+ '@graphql-tools/utils@9.2.1(graphql@16.9.0)':
+ '@graphql-tools/utils': private
+ '@graphql-typed-document-node/core@3.2.0(graphql@16.9.0)':
+ '@graphql-typed-document-node/core': private
+ '@josephg/resolvable@1.0.1':
+ '@josephg/resolvable': private
+ '@protobufjs/aspromise@1.1.2':
+ '@protobufjs/aspromise': private
+ '@protobufjs/base64@1.1.2':
+ '@protobufjs/base64': private
+ '@protobufjs/codegen@2.0.4':
+ '@protobufjs/codegen': private
+ '@protobufjs/eventemitter@1.1.0':
+ '@protobufjs/eventemitter': private
+ '@protobufjs/fetch@1.1.0':
+ '@protobufjs/fetch': private
+ '@protobufjs/float@1.0.2':
+ '@protobufjs/float': private
+ '@protobufjs/inquire@1.1.0':
+ '@protobufjs/inquire': private
+ '@protobufjs/path@1.1.2':
+ '@protobufjs/path': private
+ '@protobufjs/pool@1.1.0':
+ '@protobufjs/pool': private
+ '@protobufjs/utf8@1.1.0':
+ '@protobufjs/utf8': private
+ '@types/accepts@1.3.7':
+ '@types/accepts': private
+ '@types/body-parser@1.19.5':
+ '@types/body-parser': private
+ '@types/connect@3.4.38':
+ '@types/connect': private
+ '@types/cors@2.8.12':
+ '@types/cors': private
+ '@types/express-serve-static-core@4.19.5':
+ '@types/express-serve-static-core': private
+ '@types/express@4.17.14':
+ '@types/express': private
+ '@types/http-errors@2.0.4':
+ '@types/http-errors': private
+ '@types/long@4.0.2':
+ '@types/long': private
+ '@types/mime@1.3.5':
+ '@types/mime': private
+ '@types/node@22.5.0':
+ '@types/node': private
+ '@types/qs@6.9.15':
+ '@types/qs': private
+ '@types/range-parser@1.2.7':
+ '@types/range-parser': private
+ '@types/send@0.17.4':
+ '@types/send': private
+ '@types/serve-static@1.15.7':
+ '@types/serve-static': private
+ accepts@1.3.8:
+ accepts: private
+ anymatch@3.1.3:
+ anymatch: private
+ apollo-datasource@3.3.2:
+ apollo-datasource: private
+ apollo-reporting-protobuf@3.4.0:
+ apollo-reporting-protobuf: private
+ apollo-server-core@3.13.0(graphql@16.9.0):
+ apollo-server-core: private
+ apollo-server-env@4.2.1:
+ apollo-server-env: private
+ apollo-server-errors@3.3.1(graphql@16.9.0):
+ apollo-server-errors: private
+ apollo-server-express@3.13.0(express@4.19.2)(graphql@16.9.0):
+ apollo-server-express: private
+ apollo-server-plugin-base@3.7.2(graphql@16.9.0):
+ apollo-server-plugin-base: private
+ apollo-server-types@3.8.0(graphql@16.9.0):
+ apollo-server-types: private
+ array-flatten@1.1.1:
+ array-flatten: private
+ async-retry@1.3.3:
+ async-retry: private
+ balanced-match@1.0.2:
+ balanced-match: private
+ binary-extensions@2.3.0:
+ binary-extensions: private
+ body-parser@1.20.2:
+ body-parser: private
+ brace-expansion@1.1.11:
+ brace-expansion: private
+ braces@3.0.3:
+ braces: private
+ bytes@3.1.2:
+ bytes: private
+ call-bind@1.0.7:
+ call-bind: private
+ chokidar@3.6.0:
+ chokidar: private
+ commander@2.20.3:
+ commander: private
+ concat-map@0.0.1:
+ concat-map: private
+ content-disposition@0.5.4:
+ content-disposition: private
+ content-type@1.0.5:
+ content-type: private
+ cookie-signature@1.0.6:
+ cookie-signature: private
+ cookie@0.6.0:
+ cookie: private
+ cors@2.8.5:
+ cors: private
+ cssfilter@0.0.10:
+ cssfilter: private
+ debug@4.3.6(supports-color@5.5.0):
+ debug: private
+ define-data-property@1.1.4:
+ define-data-property: private
+ depd@2.0.0:
+ depd: private
+ destroy@1.2.0:
+ destroy: private
+ ee-first@1.1.1:
+ ee-first: private
+ encodeurl@1.0.2:
+ encodeurl: private
+ es-define-property@1.0.0:
+ es-define-property: private
+ es-errors@1.3.0:
+ es-errors: private
+ escape-html@1.0.3:
+ escape-html: private
+ etag@1.8.1:
+ etag: private
+ express@4.19.2:
+ express: private
+ fast-json-stable-stringify@2.1.0:
+ fast-json-stable-stringify: private
+ fill-range@7.1.1:
+ fill-range: private
+ finalhandler@1.2.0:
+ finalhandler: private
+ forwarded@0.2.0:
+ forwarded: private
+ fresh@0.5.2:
+ fresh: private
+ fsevents@2.3.3:
+ fsevents: private
+ function-bind@1.1.2:
+ function-bind: private
+ get-intrinsic@1.2.4:
+ get-intrinsic: private
+ glob-parent@5.1.2:
+ glob-parent: private
+ gopd@1.0.1:
+ gopd: private
+ graphql-tag@2.12.6(graphql@16.9.0):
+ graphql-tag: private
+ has-flag@3.0.0:
+ has-flag: private
+ has-property-descriptors@1.0.2:
+ has-property-descriptors: private
+ has-proto@1.0.3:
+ has-proto: private
+ has-symbols@1.0.3:
+ has-symbols: private
+ hasown@2.0.2:
+ hasown: private
+ http-errors@2.0.0:
+ http-errors: private
+ iconv-lite@0.4.24:
+ iconv-lite: private
+ ignore-by-default@1.0.1:
+ ignore-by-default: private
+ inherits@2.0.4:
+ inherits: private
+ ipaddr.js@1.9.1:
+ ipaddr.js: private
+ is-binary-path@2.1.0:
+ is-binary-path: private
+ is-extglob@2.1.1:
+ is-extglob: private
+ is-glob@4.0.3:
+ is-glob: private
+ is-number@7.0.0:
+ is-number: private
+ lodash.sortby@4.7.0:
+ lodash.sortby: private
+ loglevel@1.9.1:
+ loglevel: private
+ long@4.0.0:
+ long: private
+ lru-cache@6.0.0:
+ lru-cache: private
+ media-typer@0.3.0:
+ media-typer: private
+ merge-descriptors@1.0.1:
+ merge-descriptors: private
+ methods@1.1.2:
+ methods: private
+ mime-db@1.52.0:
+ mime-db: private
+ mime-types@2.1.35:
+ mime-types: private
+ mime@1.6.0:
+ mime: private
+ minimatch@3.1.2:
+ minimatch: private
+ ms@2.1.2:
+ ms: private
+ negotiator@0.6.3:
+ negotiator: private
+ node-abort-controller@3.1.1:
+ node-abort-controller: private
+ node-fetch@2.7.0:
+ node-fetch: private
+ normalize-path@3.0.0:
+ normalize-path: private
+ object-assign@4.1.1:
+ object-assign: private
+ object-inspect@1.13.2:
+ object-inspect: private
+ on-finished@2.4.1:
+ on-finished: private
+ parseurl@1.3.3:
+ parseurl: private
+ path-to-regexp@0.1.7:
+ path-to-regexp: private
+ picomatch@2.3.1:
+ picomatch: private
+ proxy-addr@2.0.7:
+ proxy-addr: private
+ pstree.remy@1.1.8:
+ pstree.remy: private
+ qs@6.11.0:
+ qs: private
+ range-parser@1.2.1:
+ range-parser: private
+ raw-body@2.5.2:
+ raw-body: private
+ readdirp@3.6.0:
+ readdirp: private
+ retry@0.13.1:
+ retry: private
+ safe-buffer@5.2.1:
+ safe-buffer: private
+ safer-buffer@2.1.2:
+ safer-buffer: private
+ semver@7.6.3:
+ semver: private
+ send@0.18.0:
+ send: private
+ serve-static@1.15.0:
+ serve-static: private
+ set-function-length@1.2.2:
+ set-function-length: private
+ setprototypeof@1.2.0:
+ setprototypeof: private
+ sha.js@2.4.11:
+ sha.js: private
+ side-channel@1.0.6:
+ side-channel: private
+ simple-update-notifier@2.0.0:
+ simple-update-notifier: private
+ statuses@2.0.1:
+ statuses: private
+ supports-color@5.5.0:
+ supports-color: private
+ to-regex-range@5.0.1:
+ to-regex-range: private
+ toidentifier@1.0.1:
+ toidentifier: private
+ touch@3.1.1:
+ touch: private
+ tr46@0.0.3:
+ tr46: private
+ tslib@2.7.0:
+ tslib: private
+ type-is@1.6.18:
+ type-is: private
+ undefsafe@2.0.5:
+ undefsafe: private
+ undici-types@6.19.8:
+ undici-types: private
+ unpipe@1.0.0:
+ unpipe: private
+ utils-merge@1.0.1:
+ utils-merge: private
+ uuid@9.0.1:
+ uuid: private
+ value-or-promise@1.0.11:
+ value-or-promise: private
+ vary@1.1.2:
+ vary: private
+ webidl-conversions@3.0.1:
+ webidl-conversions: private
+ whatwg-mimetype@3.0.0:
+ whatwg-mimetype: private
+ whatwg-url@5.0.0:
+ whatwg-url: private
+ xss@1.0.15:
+ xss: private
+ yallist@4.0.0:
+ yallist: private
+included:
+ dependencies: true
+ devDependencies: true
+ optionalDependencies: true
+injectedDeps: {}
+layoutVersion: 5
+nodeLinker: isolated
+packageManager: pnpm@9.7.0
+pendingBuilds: []
+prunedAt: Tue, 27 Aug 2024 11:49:30 GMT
+publicHoistPattern:
+ - '*eslint*'
+ - '*prettier*'
+registries:
+ default: https://registry.npmjs.org/
+skipped:
+ - fsevents@2.3.3
+storeDir: /home/adeyanju/.local/share/pnpm/store/v3
+virtualStoreDir: .pnpm
+virtualStoreDirMaxLength: 120
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/CHANGELOG.md b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/CHANGELOG.md
new file mode 100644
index 00000000..84aeb288
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/CHANGELOG.md
@@ -0,0 +1,1041 @@
+# [1.2.6](https://github.com/apollographql/protobuf.js/releases/tag/1.2.6)
+
+## Other
+[:hash:](https://github.com/apollographql/protobuf.js/commit/e66477bc9abcb1f71aa0440fd23b09361f13bb96) Stop writing version and date to dist files
+[:hash:](https://github.com/apollographql/protobuf.js/commit/bd5c971461c4e4ee32debe73a1d2e09be3e31301) Actually drop package-lock.json files
+[:hash:](https://github.com/apollographql/protobuf.js/commit/1d301192c94352d08b7f4341a5ba7667bc154fdc) Revert "Add .npmignore to drop package-lock files"
+
+# [1.2.5](https://github.com/apollographql/protobuf.js/releases/tag/1.2.5)
+
+## New
+[:hash:](https://github.com/apollographql/protobuf.js/commit/0774f3ab66f902f4cafa55d61c469d7413d92bfb) Add .npmignore to drop package-lock files
+
+# [1.2.4](https://github.com/apollographql/protobuf.js/releases/tag/1.2.4)
+
+## New
+[:hash:](https://github.com/apollographql/protobuf.js/commit/ca7eb37a01b3c74d798fee01e051b677b86c2979) Improve ES6 support
+
+# [1.2.3](https://github.com/apollographql/protobuf.js/releases/tag/1.2.3)
+
+## New
+[:hash:](https://github.com/apollographql/protobuf.js/commit/98a940b62b38411c3dc01ee30b3b7fe5885b9b34) Never initialize util.Long
+
+# [1.2.2](https://github.com/apollographql/protobuf.js/releases/tag/1.2.2)
+
+## Fixed
+[:hash:](https://github.com/apollographql/protobuf.js/commit/9ad39c976f3f430fbaf0621c72e64ed86a2ed879) Drop TS Long import better
+
+# [1.2.1](https://github.com/apollographql/protobuf.js/releases/tag/1.2.1)
+
+## Fixed
+[:hash:](https://github.com/apollographql/protobuf.js/commit/81365e92adca569173362634f20760592ab67809) remove long import ([#7](https://github.com/apollographql/protobuf.js/issues/7))
+
+
+# [1.2.0](https://github.com/apollographql/protobuf.js/releases/tag/1.2.0)
+
+## Other
+[:hash:](https://github.com/apollographql/protobuf.js/commit/1d86294348516ae629fe000f2b6c8b7de6e2c96b) Revert "Map field TypeScript types shouldn't imply all keys exist"
+
+# [1.1.0](https://github.com/apollographql/protobuf.js/releases/tag/1.1.0)
+
+## Other
+[:hash:](https://github.com/apollographql/protobuf.js/commit/fc43eede622839563fdbdd3ff4ce6d92d2e4ee83) Allow turning off generation of fromObject
+[:hash:](https://github.com/apollographql/protobuf.js/commit/378168b3e17aeefeea1eefb04290d47482bc14bc) Allow pre-encoded messages in repeated fields
+
+# [1.0.5](https://github.com/apollographql/protobuf.js/releases/tag/1.0.5)
+
+[:hash:](https://github.com/apollographql/protobuf.js/commit/68a467e01363bd3d8140a495d4ed4edeaca4f180) Map field TypeScript types shouldn't imply all keys exist
+
+# [1.0.4](https://github.com/apollographql/protobuf.js/releases/tag/1.0.4)
+
+## New
+[:hash:](https://github.com/apollographql/protobuf.js/commit/f15bfa2c2ef8e91746821835904e88ffd199e97a) Allow plain JS object repeated fields to use toArray() method
(see https://github.com/protobufjs/protobuf.js/pull/1302)
+
+# [1.0.3](https://github.com/apollographql/protobuf.js/releases/tag/1.0.3)
+
+## Other
+[:hash:](https://github.com/apollographql/protobuf.js/commit/d13506a71f0634ea7a89a57e0102460b9bb438fb) Remove duplicated Long types in index.d.ts
+
+# [1.0.2](https://github.com/apollographql/protobuf.js/releases/tag/1.0.2)
+
+## Other
+[:hash:](https://github.com/apollographql/protobuf.js/commit/ec3577b8cc18f5478ea0b5f5d20145039cd4f8e2) update version to 1.0.2 and npm install
+[:hash:](https://github.com/apollographql/protobuf.js/commit/6392ab621710868588f629f229d8d2743f4d8b03) commit changes after running npm install
+[:hash:](https://github.com/apollographql/protobuf.js/commit/e58bb28d6c8f80c96a48c1b7f27b0b0f9cede058) update peerDependencies in pacakge.standalone.json @apollo/protobufjs version to be the correct 1.0.1
+
+# [1.0.1](https://github.com/apollographql/protobuf.js/releases/tag/1.0.1)
+
+## Fixed
+[:hash:](https://github.com/apollographql/protobuf.js/commit/19bf8d5ae77c0f272a625a2d93140bb65d6e480b) Rename pbjs and pbts to include apollo- prefix and update version.
+
+# [1.0.0](https://github.com/apollographql/protobuf.js/releases/tag/1.0.0)
+
+## Fixed
+[:hash:](https://github.com/apollographql/protobuf.js/commit/fb5d62fdc9bba52036f8ea3a7ec17c3c1292c99f) Fix minify build error in root.js
+[:hash:](https://github.com/apollographql/protobuf.js/commit/7bacfc8f34a1e096bca38a0ea38ecee089e8cdb5) fix typo ([#1241](https://github.com/apollographql/protobuf.js/issues/1241))
+[:hash:](https://github.com/apollographql/protobuf.js/commit/41b91535ce2737649d6b500131abc895f9f99fe8) fix stale links to API documentation ([#1235](https://github.com/apollographql/protobuf.js/issues/1235))
+[:hash:](https://github.com/apollographql/protobuf.js/commit/314b2dbbbc5a98b59cd81191c635dadc2a5e0584) Fix spacing in root.js again
+[:hash:](https://github.com/apollographql/protobuf.js/commit/f01e1d2c118f7d82fcc990ac7efe3b58588fb9ec) Fix spacing of root.js
+[:hash:](https://github.com/apollographql/protobuf.js/commit/b7ce052ff9a6e32a1c1ed94e8bac6cac324ac73c) Properly iterate and return method descriptors
+[:hash:](https://github.com/apollographql/protobuf.js/commit/b5b66321762a24c5ac2753b68331cbe115969da7) run npm audit fix ([#1208](https://github.com/apollographql/protobuf.js/issues/1208))
+[:hash:](https://github.com/apollographql/protobuf.js/commit/0ffa2a3cf943daef946753277d95b43df853122f) Fix indentation to match existing styles.
+[:hash:](https://github.com/apollographql/protobuf.js/commit/4af852395e82ba061b4e81fd19b3b4cd48342488) Fixed descriptor README code problem
+[:hash:](https://github.com/apollographql/protobuf.js/commit/1f32910873dab94c0c475e22dbdfc2d70f640a01) npm audit fixes
+[:hash:](https://github.com/apollographql/protobuf.js/commit/8a858634f3add3a2d8567f72699b907e9f543eca) Import Long types
+[:hash:](https://github.com/apollographql/protobuf.js/commit/15ee83ffa6cfd755ea04208110ddb5003adf98b1) Bundled definitions were loaded correctly
+[:hash:](https://github.com/apollographql/protobuf.js/commit/6fa4c3487c50f9e2647a384bf64cfb009752b6a7) Second part of a reserved range is exclusive ([#1122](https://github.com/apollographql/protobuf.js/issues/1122))
+
+## CLI
+[:hash:](https://github.com/apollographql/protobuf.js/commit/7485d4b20b17adf8888ebf9cdc0e0b7a79f3b2f2) Add missing 'force-number' pbjs option
+
+## Docs
+[:hash:](https://github.com/apollographql/protobuf.js/commit/02482a69f0aaf32731b0155deec3a48cfa4c4151) Remove non-existent method from README ([#1119](https://github.com/apollographql/protobuf.js/issues/1119))
+
+## Other
+[:hash:](https://github.com/apollographql/protobuf.js/commit/d16084c520fe20c4f33fda209c57b29fb0569262) package-lock changes after running npm install
+[:hash:](https://github.com/apollographql/protobuf.js/commit/8f311df44bbad4e31b3f4f1f12d4da78eaa648ca) Change all appropriate references from protobufjs to @apollo/protobufjs
+[:hash:](https://github.com/apollographql/protobuf.js/commit/e91de84fe2dea787f168c5b513643d8f7c96c7ad) Update build artifacts after running `npm run make`
+[:hash:](https://github.com/apollographql/protobuf.js/commit/0e316cf2c875ee71e922d89640e90138e0d012cd) Update jsdoc version to 3.6.3 to make the project build with Node 12
+[:hash:](https://github.com/apollographql/protobuf.js/commit/4d490eb1bf71f5c5c4c9d253a2ffd36edea12386) Use Object.hasOwnProperty instead of prototype ([#1233](https://github.com/apollographql/protobuf.js/issues/1233))
+[:hash:](https://github.com/apollographql/protobuf.js/commit/2e1d1ace02322ac742edd5e0208fa1d512d4a817) Revert generated files, since other pull requests do not appear to
+[:hash:](https://github.com/apollographql/protobuf.js/commit/c72c752352347555406bafd7121acaed240fbf23) be more explicit about tested versions of nodejs ([#1213](https://github.com/apollographql/protobuf.js/issues/1213))
+[:hash:](https://github.com/apollographql/protobuf.js/commit/299f0ceed2087044bbc53dc20a274947a672c481) //github.com/protobufjs/protobuf.js/issues/1200
+[:hash:](https://github.com/apollographql/protobuf.js/commit/ea7b9c6fcfafab92d0b96fb372831afd14561943) Remove useless config import
+[:hash:](https://github.com/apollographql/protobuf.js/commit/9450f4d340519ad84a09e515a2795144d222e058) Add working rpcImpl with grpc node package
+[:hash:](https://github.com/apollographql/protobuf.js/commit/892db94d0036e0e89f0cf9b4af21f6c349aadd00) allow file-level options everywhere in the file
+
+# [6.8.8](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.8)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3001425b0d896d14188307cd0cc84ce195ad9e04) Persist recent index.d.ts changes in JSDoc
+
+# [6.8.7](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.7)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e8449c4bf1269a2cc423708db6f0b47a383d33f0) Fix package browser field descriptor ([#1046](https://github.com/dcodeIO/protobuf.js/issues/1046))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/996b3fa0c598ecc73302bfc39208c44830f07b1a) Fix static codegen issues with uglifyjs3
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a06317139b92fdd8c6b3b188fb7b9704dc8ccbf1) Fix lint issues / pbts on windows
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a927a6646e8fdddebcb3e13bc8b28b041b3ee40a) Fix empty 'bytes' field decoding, now using Buffer where applicable ([#1020](https://github.com/dcodeIO/protobuf.js/issues/1020))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f13a81fb41fbef2ce9dcee13f23b7276c83fbcfd) Fix circular dependency of Namespace and Enum ([#994](https://github.com/dcodeIO/protobuf.js/issues/994))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c05c58fad61c16e5ce20ca19758e4782cdd5d2e3) Ignore optional commas in aggregate options ([#999](https://github.com/dcodeIO/protobuf.js/issues/999))
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/36fc964b8db1e4372c76b1baf9f03857cd875b07) Make Message have a default type param ([#1086](https://github.com/dcodeIO/protobuf.js/issues/1086))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/996b3fa0c598ecc73302bfc39208c44830f07b1a) Explicitly define service method names when generating static code, see [#857](https://github.com/dcodeIO/protobuf.js/issues/857)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/07c5d59e1da8c5533a39007ba332928206281408) Also handle services in ext/descriptor ([#1001](https://github.com/dcodeIO/protobuf.js/issues/1001))
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2c5ef95818a310243f88ffba0331cd47ee603c0a) Extend list of ignored ESLint rules for pbjs, fixes [#1085](https://github.com/dcodeIO/protobuf.js/issues/1085)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8576b49ad3e55b8beae2a8f044c51040484eef12) Fix declared return type of pbjs/pbts callback ([#1025](https://github.com/dcodeIO/protobuf.js/issues/1025))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9fceaa69667895e609a3ed78eb2efa7a0ecfb890) Added an option to pbts to allow custom imports ([#1038](https://github.com/dcodeIO/protobuf.js/issues/1038))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/65d113b0079fa2570837f3cf95268ce24714a248) Get node executable path from process.execPath ([#1018](https://github.com/dcodeIO/protobuf.js/issues/1018))
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b611875cfbc1f98d8973a2e86f1506de84f00049) Slim down CI testing and remove some not ultimately necesssary dependencies with audit issues
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/812b38ddabb35e154f9ff94f32ad8ce2a70310f1) Move global handling to util, see [#995](https://github.com/dcodeIO/protobuf.js/issues/995)
+
+# [6.8.6](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.6)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2ee1028d631a328e152d7e09f2a0e0c5c83dc2aa) Fix typeRefRe being vulnerable to ReDoS
+
+# [6.8.5](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.6)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/462132f222d8febb8211d839635aad5b82dc6315) Preserve comments when serializing/deserializing with toJSON and fromJSON. ([#983](https://github.com/dcodeIO/protobuf.js/issues/983))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d29c0caa715a14214fc755b3cf10ac119cdaf199) Add more details to some frequent error messages ([#962](https://github.com/dcodeIO/protobuf.js/issues/962))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8400f87ad8ed2b47e659bc8bb6c3cf2467802425) Add IParseOptions#alternateCommentMode ([#968](https://github.com/dcodeIO/protobuf.js/issues/968))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d6e3b9e218896ec1910e02448b5ee87e4d96ede6) Added field_mask to built-in common wrappers ([#982](https://github.com/dcodeIO/protobuf.js/issues/982))
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/635fef013fbb3523536d92c690ffd7d84829db35) Remove code climate config in order to use 'in-app' config instead
+
+# [6.8.4](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.4)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/69440c023e6962c644715a0c95363ddf19db648f) Update jsdoc dependency (pinned vulnerable marked)
+
+# [6.8.3](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.3)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cc991a058b0636f3454166c76de7b664cf23a8f4) Use correct safeProp in json-module target, see [#956](https://github.com/dcodeIO/protobuf.js/issues/956)
+
+# [6.8.2](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.2)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6fc6481d790648e9e2169a961ad31a732398c911) Include dist files in npm package, see [#955](https://github.com/dcodeIO/protobuf.js/issues/955)
+
+# [6.8.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.1)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/db2dd49f6aab6ecd606eee334b95cc0969e483c2) Prevent invalid JSDoc names when generating service methods, see [#870](https://github.com/dcodeIO/protobuf.js/issues/870)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/62297998d681357ada70fb370b99bac5573e5054) Prevent parse errors when generating service method names, see [#870](https://github.com/dcodeIO/protobuf.js/issues/870)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/478f332e0fc1d0c318a70b1514b1d59c8c200c37) Support parsing nested option-values with or without ':' ([#951](https://github.com/dcodeIO/protobuf.js/issues/951), fixes [#946](https://github.com/dcodeIO/protobuf.js/issues/946))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/83477ca8e0e1f814ac79a642ea656f047563613a) Add support for reserved keyword in enums ([#950](https://github.com/dcodeIO/protobuf.js/issues/950), fixes [#949](https://github.com/dcodeIO/protobuf.js/issues/949))
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c482a5b76fd57769eae4308793e3ff8725264664) Unified safe property escapes and added a test for [#834](https://github.com/dcodeIO/protobuf.js/issues/834)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1724581c36ecc4fc166ea14a9dd57af5e093a467) Fix codegen if type name starts with "Object"
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/adecd544c5fcbeba28d502645f895024e3552970) Fixed dependency for json-module to use "light".
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2a8dd74fca70d4e6fb41328a7cee81d1d50ad7ad) Basic support for URL prefixes in google.protobuf.Any types.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/be78a3d9bc8d9618950c77f9e261b422670042ce) fixed 'error is not defined linter warning when using static/static-module and es6
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c712447b309ae81134c7afd60f8dfa5ecd3be230) Fixed wrong type_url for any type (no leading '.' allowed).
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/145bda25ee1de2c0678ce7b8a093669ec2526b1d) Fixed fromObject() for google.protobuf.Any types.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7dec43d9d847481ad93fca498fd970b3a4a14b11) Handle case where 'extendee' is undefined in ext/descriptor
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/20a26271423319085d321878edc5166a5449e68a) Sanitize CR-only line endings (coming from jsdoc?)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/19d2af12b5db5a0f668f50b0cae3ee0f8a7affc2) Make sure enum typings become generated ([#884](https://github.com/dcodeIO/protobuf.js/issues/884) didn't solve this)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a2c72c08b0265b112d367fa3d33407ff0de955b9) Remove exclude and include patterns from jsdoc config
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9afb8a2ff27c1e0a999d7331f3f65f568f5cced5) Skip defaults when generating proto3
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/952c7d1b478cc7c6de82475a17a1387992e8651f) Wait for both the 'end' and 'close' event to happen before finishing in pbts, see [#863](https://github.com/dcodeIO/protobuf.js/issues/863)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ed7e2e71f5cde27c4128f4f2e3f4782cc51fbec7) Accept null for optional fields in generated static code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/27cc66a539251216ef10aea04652d58113949df9) Annotate TS classes with @implements
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/05e7e0636727008c72549459b8594fa0442d346f) Annotate virtual oneofs as string literal unions
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/685adb0e7ef0f50e4b93a105013547884957cc98) Also check for reserved ids and names in enums
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/843d0d5b927968025ca11babff28495dd3bb2863) Also support 'reserved' in enum descriptors
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a8376b57fb0a858adff9dc8a1d1b5372eff9d85c) Include just relevant files in npm package, fixes [#781](https://github.com/dcodeIO/protobuf.js/issues/781)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bda1bc6917c681516f6be8be8f0e84ba1262c4ce) Fix travis build
+
+# [6.8.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.8.0)
+
+## Breaking
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ff858003f525db542cbb270777b6fab3a230c9bb) Replaced Buffer and Long types with interfaces and removed stubs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22f907c49adbbdf09b72bde5299271dbe0ee9cbe) Removed Message#toObject in favor of having just the static version (unnecessary static code otherwise)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c97b61811248df002f1fb93557b982bc0aa27309) Everything uses interfaces now instead of typedefs (SomethingProperties is now ISomething)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b9f179064f3ddf683f13e0d4e17840301be64010) ReflectionObject#toJSON properly omits explicit undefined values
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7a6f98b5e74f9e9142f9be3ba0683caeaff916c4) Initial implementation of TypeScript decorators
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7a6f98b5e74f9e9142f9be3ba0683caeaff916c4) Refactored protobuf.Class away
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7a6f98b5e74f9e9142f9be3ba0683caeaff916c4) TypeScript definitions now have (a lot of) generics
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7a6f98b5e74f9e9142f9be3ba0683caeaff916c4) Removed deprecated features
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c306d19d806eb697913ffa2b8613f650127a4c50) Added 'undefined' besides 'null' as a valid value of an optional field, fixes [#826](https://github.com/dcodeIO/protobuf.js/issues/826)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c5518c3bac0da9c2045e6f1baf0dee915afb4221) Fixed an issue with codegen typings, see [#819](https://github.com/dcodeIO/protobuf.js/issues/819)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/66d149e92ff1baddfdfd4b6a88ca9bcea6fc6195) Ported utf8 chunking mechanism to base64 as well, fixes [#800](https://github.com/dcodeIO/protobuf.js/issues/800)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e1f9d9856c98a0f0eb1aa8bdf4ac0df467bee8b9) Also be more verbose when defining properties for ES6, fixes [#820](https://github.com/dcodeIO/protobuf.js/issues/820)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cf36097305ab02047be5014eabeccc3154e18bde) Generate more verbose JSDoc comments for ES6 support, fixes [#820](https://github.com/dcodeIO/protobuf.js/issues/820)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f2959795330966f13cb65bbb6034c88a01fc0bcc) Emit a maximum of one error var when generating verifiers, fixes [#786](https://github.com/dcodeIO/protobuf.js/issues/786)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3b848a10b39c1897ca1ea3b5149ef72ae43fcd11) Fixed missing semicolon after 'extensions' and 'reserved' when generating proto files, fixes [#810](https://github.com/dcodeIO/protobuf.js/issues/810)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/eb1b40497e14a09facbc370676f486bed1376f52) Call npm with '--no-bin-links' when installing CLI deps, fixes [#823](https://github.com/dcodeIO/protobuf.js/issues/823)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/429de19d851477f1df2804d5bc0be30228cd0924) Fix Reader argument conversion in static module
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/03194c203d6ff61ae825e66f8a29ca204fa503b9) Use JSDoc, they said, it documents code, they said. Fixes [#770](https://github.com/dcodeIO/protobuf.js/issues/770)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ec6a133ff541c638517e00f47b772990207c8640) parser should not confuse previous trailing line comments with comments for the next declaration, see [#762](https://github.com/dcodeIO/protobuf.js/issues/762)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0589ace4dc9e5c565ff996cf6e6bf94e63f43c4e) Types should not clear constructor with cache (fixes decorators)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/056ecc3834a3b323aaaa676957efcbe3f52365a0) Namespace#lookup should also check in nested namespaces (wtf)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ed34b093839652db2ff7b84db87857fc57d96038) Reader#bytes should also support plain arrays
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/514afcfa890aa598e93254576c4fd6062e0eff3b) Fix markdown for pipe in code in table
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/17c2797592bc4effd9aaae3ba9777c9550bb75ac) Upgrade to codegen 2
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/57d7d35ddbb9e3a28c396b4ef1ae3b150eeb8035) ext/descriptor enables interoperability between reflection and descriptor.proto (experimental), see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3939667ef1f37b025bd7f9476015890496d50e00) Added 'json' conversion option for proto3 JSON mapping compatibility of NaN and Infinity + additional documentation of util.toJSONOptions, see [#351](https://github.com/dcodeIO/protobuf.js/issues/351)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4eac28c7d3acefb0af7b82c62cf8d19bf3e7d37b) Use protobuf/minimal when pbjs target is static-module
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3a959453fe63706c38ebbacda208e1f25f27dc99) Added closure wrapper
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/13bf9c2635e6a1a2711670fc8e28ae9d7b8d1c8f) Various improvements to statically generated JSDoc, also fixes [#772](https://github.com/dcodeIO/protobuf.js/issues/772)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ffdc93c7cf7c8a716316b00864ea7c510e05b0c8) Check incompatible properties for namespaces only in tsd-jsdoc
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fb3f9c70436d4f81bcd0bf62b71af4d253390e4f) Additional tsd-jsdoc handling of properties inside of namespaces and TS specific API exposure
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2dcae25c99e2ed8afd01e27d21b106633b8c31b9) Several improvements to tsd-jsdoc emitted comments
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ff858003f525db542cbb270777b6fab3a230c9bb) Further TypeScript definition improvements
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22f907c49adbbdf09b72bde5299271dbe0ee9cbe) Relieved tsd files from unnecessary comments
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22f907c49adbbdf09b72bde5299271dbe0ee9cbe) Generate TS namespaces for vars and functions with properties
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b355115e619c6595ac9d91897cfe628ef0e46054) Prefer @tstype over @type when generating typedefs (tsd-jsdoc)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/23f4b990375efcac2c144592cf4ca558722dcf2d) Replaced nullable types with explicit type|null for better tooling compatibility, also fixes [#766](https://github.com/dcodeIO/protobuf.js/issues/766) and fixes 767
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6493f52013c92a34b8305a25068ec7b8c4c29d54) Added more info to ext/descriptor README, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ef92da3768d8746dbfe72e77232f78b879fc811d) Additional notes on ext/descriptor
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b646cf7499791a41b75eef2de1a80fb558d4159e) Updated CHANGELOG so everyone knows what's going on (and soon, breaking)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/35a663757efe188bea552aef017837bc6c6a481a) Additional docs on TS/decorators usage
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9726be0888a9461721447677e9dece16a682b9f6) Updated dist files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9726be0888a9461721447677e9dece16a682b9f6) Added package-lock.json
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/114f7ea9fa3813003afc3ebb453b2dd2262808e1) Minor formatting
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8a6e464954b472fdbb4d46d9270fe3b4b3c7272d) Generate files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/42f8a97630bcb30d197b0f1d6cbdd96879d27f96) Remove the no-constructor arg
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6446247cd7edbb77f03dc42c557f568811286a39) Remove the ctor option.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2059ee0f6f951575d5c5d2dc5eb06b6fa34e27aa) Add support to generate types for JSON object.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7445da0f8cb2e450eff17723f25f366daaf3bbbb) aspromise performance pass
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3f8b74ba6726567eaf68c4d447c120f75eac042f) codegen 2 performance pass, [#653](https://github.com/dcodeIO/protobuf.js/issues/653) might benefit
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d44a7eec2fd393e5cb24196fb5818c8c278a0f34) Fixed minimal library including reflection functionality
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a18e6db9f02696c66032bce7ef4c0eb0568a8048) Minor compression ratio tuning
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b49a4edd38395e209bedac2e0bfb7b9d5c4e980b) Fixed failing test case + coverage
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8f7111cacd236501b7e26791b9747b1974a2d9eb) Improved fromObject wrapper for google.protobuf.Any.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0e471a2516bde3cd3c27b2691afa0dcfbb01f042) Fixed failing tokenize test case
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5867f076d8510fa97e3bd6642bbe61960f7fd196) Removed debug build, made it an extension
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22f907c49adbbdf09b72bde5299271dbe0ee9cbe) Regenerated dist files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5bc3541d2da19e2857dc884f743d37c27e8e21f2) Even more documentation and typings for ext/descriptor
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/773e6347b57e4a5236b1ef0bb8d361e4b233caf7) ext/descriptor docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/773e6347b57e4a5236b1ef0bb8d361e4b233caf7) Decorators coverage
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9a23ded94729ceeea2f87cb7e8460eaaaf1c8269) ext/descriptor support for various standard options, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2d8ce6ec0abd261f9b261a44a0a258fdf57ecec3) ext/descriptor passes descriptor.proto test with no differences, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3a20968c6d676312e4f2a510f7e079e0e0819daf) Properly remove unnecessary (packed) options from JSON descriptors
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2a30df8bd5f20d91143a38c2232dafc3a6f3a7bd) Use typedefs in ext/descriptor (like everywhere else), see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1fc911cef01e081c04fb82ead685f49dde1403bb) Fixed obvious issues with ext/descriptor, does not throw anymore when throwing descriptor.proto itself at it, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6c37dbd14f39dad687f2f89f1558a875f7dcc882) Added still missing root traversal to ext/descriptor, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7ab136daa5eb2769b616b6b7522e45a4e33a59f6) Initial map fields support for ext/descriptor, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/708552bb84508364b6e6fdf73906aa69e83854e1) Added infrastructure for TypeScript support of extensions
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/23f26defa793b371c16b5f920fbacb3fb66bdf22) TypeScript generics improvements
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e49bef863c0fb10257ec1001a3c5561755f2ec6b) More ext/descriptor progress, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6b94336c1e6eec0f2eb1bd5dca73a7a8e71a2153) Just export the relevant namespace in ext/descriptor
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fbb99489ed0c095174feff8f53431d30fb6c34a0) Initial descriptor.proto extension for reflection interoperability, see [#757](https://github.com/dcodeIO/protobuf.js/issues/757)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/48e66d975bf7b4e6bdbb68ec24386c98b16c54c5) Moved custom wrappers to its own module instead, also makes the API easier to use manually, see [#677](https://github.com/dcodeIO/protobuf.js/issues/677)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0c6e639d08fdf9be12677bf678563ea631bafb2c) Added infrastructure for custom wrapping/unwrapping of special types, see [#677](https://github.com/dcodeIO/protobuf.js/issues/677)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0425b584f49841d87a8249fef30c78cc31c1c742) More decorator progress (MapField.d, optional Type.d)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7a6f98b5e74f9e9142f9be3ba0683caeaff916c4) tsd-jsdoc now has limited generics support
+
+# [6.7.3](https://github.com/dcodeIO/protobuf.js/releases/tag/6.7.3)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/57f1da64945f2dc5537c6eaa53e08e8fdd477b67) long, @types/long and @types/node are just dependencies, see [#753](https://github.com/dcodeIO/protobuf.js/issues/753)
+
+# [6.7.2](https://github.com/dcodeIO/protobuf.js/releases/tag/6.7.2)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a7621be0a56585defc72d863f4e891e476905692) Split up NamespaceDescriptor to make nested plain namespaces a thing, see [#749](https://github.com/dcodeIO/protobuf.js/issues/749)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e980e72ae3d4697ef0426c8a51608d31f516a2c4) More README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1f76749d0b9a780c7b6cb56be304f7327d74ebdb) Replaced 'runtime message' with 'message instance' for clarity
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e6b6dedb550edbd0e54e212799e42aae2f1a87f1) Rephrased the Usage section around the concept of valid messages
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0d8100ba87be768ebdec834ca2759693e0bf4325) Added toolset diagram to README
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3405ae8d1ea775c96c30d1ef5cde666c9c7341b3) Touched benchmark output metrics once more
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e36b228f4bb8b1cd835bf31f8605b759a7f1f501) Fixed failing browser test
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7b3bdb562ee7d30c1a557d7b7851d55de3091da4) Output more human friendly metrics from benchmark
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/59e447889057c4575f383630942fd308a35c12e6) Stripped down static bench code to what's necessary
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f88dad098282ece65f5d6e224ca38305a8431829) Revamped benchmark, now also covers Google's JS implementation
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/45356be81ba7796faee0d4d8ad324abdd9f301fb) Updated dependencies and dist files
+
+# [6.7.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.7.1)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3d23eed6f7c79007969672f06c1a9ccd691e2411) Made .verify behave more like .encode, see [#710](https://github.com/dcodeIO/protobuf.js/issues/710)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bed514290c105c3b606f760f2abba80510721c77) With null/undefined eliminated by constructors and .create, document message fields as non-optional where applicable (ideally used with TS & strictNullChecks), see [#743](https://github.com/dcodeIO/protobuf.js/issues/743)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/007b2329842679ddf994df7ec0f9c70e73ee3caf) Renamed --strict-long/message to --force-long/message with backward compatible aliases, see [#741](https://github.com/dcodeIO/protobuf.js/issues/741)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6aae71f75e82ffd899869b0c952daf98991421b8) Keep $Properties with --strict-message but require actual instances within, see [#741](https://github.com/dcodeIO/protobuf.js/issues/741)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c812cef0eff26998f14c9d58d4486464ad7b2bbc) Added --strict-message option to pbjs to strictly reference message instances instead of $Properties, see [#741](https://github.com/dcodeIO/protobuf.js/issues/741)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/412407de9afb7ec3a999c4c9a3a1f388f971fce7) Restructured README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1c4d9d7f024bfa096ddc24aabbdf39211ed8637a) Added more information on typings usage, see [#744](https://github.com/dcodeIO/protobuf.js/issues/744)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/602065e16862751c515c2f3391ee8b880e8140b1) Clarified typescript example in README, see [#744](https://github.com/dcodeIO/protobuf.js/issues/744)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/79d0ba2cc71a156910a9d937683af164df694f08) Clarified that the service API targets clients consuming a service, see [#742](https://github.com/dcodeIO/protobuf.js/issues/742)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a66f76452ba050088efd1aaebf3c503a55e6287c) Omit copying of undefined or null in constructors and .create, see [#743](https://github.com/dcodeIO/protobuf.js/issues/743)
+
+# [6.7.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.7.0)
+
+## Breaking
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9c1bbf10e445c3495b23a354f9cbee951b4b20f0) Namespace#lookupEnum should actually look up the reflected enum and not just its values
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/44a8d3af5da578c2e6bbe0a1b948d469bbe27ca1) Decoder now throws if required fields are missing, see [#695](https://github.com/dcodeIO/protobuf.js/issues/695) / [#696](https://github.com/dcodeIO/protobuf.js/issues/696)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d1e3122e326480fdd44e96afd76ee72e9744b246) Added functionality to filter for multiple types at once in lookup(), used by lookupTypeOrEnum(), fixes [#740](https://github.com/dcodeIO/protobuf.js/issues/740)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8aa21268aa5e0f568cb39e99a83b99ccb4084381) Ensure that fields have been resolved when looking up js types in static target, see [#731](https://github.com/dcodeIO/protobuf.js/issues/731)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f755d36829b9f1effd7960fab3a86a141aeb9fea) Properly copy fields array before sorting in toObject, fixes [#729](https://github.com/dcodeIO/protobuf.js/issues/729)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a06691f5b87f7e90fed0115b78ce6febc4479206) Actually emit TS compatible enums in static target if not aliases, see [#720](https://github.com/dcodeIO/protobuf.js/issues/720)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b01bb58dec92ebf6950846d9b8d8e3df5442b15d) Hardened tokenize/parse, esp. comment parsing, see [#713](https://github.com/dcodeIO/protobuf.js/issues/713)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bc76ad732fc0689cb0a2aeeb91b06ec5331d7972) Exclude any fields part of some oneof when populating defaults in toObject, see [#710](https://github.com/dcodeIO/protobuf.js/issues/710)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/68cdb5f11fdbb950623be089f98e1356cb7b1ea3) Most of the parser is not case insensitive, see [#705](https://github.com/dcodeIO/protobuf.js/issues/705)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3e930b907a834a7da759478b8d3f52fef1da22d8) Retain options argument in Root#load when used with promises, see [#684](https://github.com/dcodeIO/protobuf.js/issues/684)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3c14ef42b3c8f2fef2d96d65d6e288211f86c9ef) Created a micromodule from (currently still bundled) float support
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7ecae9e9f2e1324ef72bf5073463e01deff50cd6) util.isset(obj, prop) can be used to test if a message property is considered to be set, see [#728](https://github.com/dcodeIO/protobuf.js/issues/728)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c04d4a5ab8f91899bd3e1b17fe4407370ef8abb7) Implemented stubs for long.js / node buffers to be used where either one isn't wanted, see [#718](https://github.com/dcodeIO/protobuf.js/issues/718)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b9574ad02521a31ebd509cdaa269e7807da78d7c) Simplified reusing / replacing internal constructors
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1f97b7af05b49ef69bd6e9d54906d1b7583f42c4) Constructors/.create always initialize proper mutable objects/arrays, see [#700](https://github.com/dcodeIO/protobuf.js/issues/700)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/adb4bb001a894dd8d00bcfe03457497eb994f6ba) Verifiers return an error if multiple fields part of the same oneof are set, see [#710](https://github.com/dcodeIO/protobuf.js/issues/710)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fe93d436b430d01b563318bff591e0dd408c06a4) Added `oneofs: true` to ConversionOptions, see [#710](https://github.com/dcodeIO/protobuf.js/issues/710)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/228c882410d47a26576f839b15f1601e8aa7914d) Optional fields handle null just like undefined regardless of type see [#709](https://github.com/dcodeIO/protobuf.js/issues/709)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/da6af8138afa5343a47c12a8beedb99889c0dd51) Encoders no longer examine virtual oneof properties but encode whatever is present, see [#710](https://github.com/dcodeIO/protobuf.js/issues/710)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ac26a7aa60359a37dbddaad139c0134b592b3325) pbjs now generates multiple exports when using ES6 syntax, see [#686](https://github.com/dcodeIO/protobuf.js/issues/686)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c1ca65dc6987384af6f9fac2fbd7700fcf5765b2) Sequentially serialize fields ordered by id, as of the spec.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/26d9fadb21a85ca0b5609156c26453ae875e4933) decode throws specific ProtocolError with a reference to the so far decoded message if required fields are missing + example
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2b5577b238a452ae86aa395fb2ad3a3f45d755dc) Reader.create asserts that `buffer` is a valid buffer, see [#695](https://github.com/dcodeIO/protobuf.js/issues/695)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6f74d30f059e33a4678f28e7a50dc4878c54bed2) Exclude JSDoc on typedefs from generated d.ts files because typescript@next, see [#737](https://github.com/dcodeIO/protobuf.js/issues/737)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2ebb1b781812e77de914cd260e7ab69612ffd99e) Prepare static code with estraverse instead of regular expressions, see [#732](https://github.com/dcodeIO/protobuf.js/issues/732)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/29ce6cae0cacc0f1d87ca47e64be6a81325aaa55) Moved tsd-jsdoc to future cli package, see [#716](https://github.com/dcodeIO/protobuf.js/issues/716)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8de21e1a947ddb50a167147dd63ad29d37b6a891) $Properties are just a type that's satisfied, not implemented, by classes, see [#723](https://github.com/dcodeIO/protobuf.js/issues/723)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4bfe0c239b9c337f8fa64ea64f6a71baf5639b84) More progress on decoupling the CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8a60174932d15198883ac3f07000ab4e7179a695) Fixed computed array indexes not being renamed in static code, see [#726](https://github.com/dcodeIO/protobuf.js/issues/726)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8d9981588d17709791846de63f1f3bfd09433b03) Check upfront if key-var is required in static decoders with maps, see [#726](https://github.com/dcodeIO/protobuf.js/issues/726)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/16adff0c7b67c69a2133b6aac375365c5f2bdbf7) Fixed handling of stdout if callback is specified, see [#724](https://github.com/dcodeIO/protobuf.js/issues/724)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6423a419fe45e648593833bf535ba1736b31ef63) Preparations for moving the CLI to its own package, see [#716](https://github.com/dcodeIO/protobuf.js/issues/716)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/afefa3de09620f50346bdcfa04d52952824c3c8d) Properly implement $Properties interface in JSDoc, see [#723](https://github.com/dcodeIO/protobuf.js/issues/723)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a1f23e09fb5635275bb7646dfafc70caef74c6b8) Recursively use $Properties inside of $Properties in static code, see [#717](https://github.com/dcodeIO/protobuf.js/issues/717)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c3f0a2124c661bb9ba35f92c21a98a4405d30b47) Added --strict-long option to pbjs to always emit 'Long' instead of 'number|Long' (only relevant with long.js), see [#718](https://github.com/dcodeIO/protobuf.js/issues/718)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0bc4a14501f84f93afd6ce2933ad00749c82f4df) Statically emitted long type is 'Long' now instead of '$protobuf.Long', see [#718](https://github.com/dcodeIO/protobuf.js/issues/718)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a75625d176b7478e0e506f05e2cee5e3d7a0d89a) Decoupled message properties as an interface in static code for TS intellisense support, see [#717](https://github.com/dcodeIO/protobuf.js/issues/717)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/23f14a61e8c2f68b06d1bb4ed20b938764c78860) Static code statically resolves types[..], see [#715](https://github.com/dcodeIO/protobuf.js/issues/715)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ef71e77726b6bf5978b948d598c18bf8b237ade4) Added type definitions for all possible JSON descriptors
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4bfe0c239b9c337f8fa64ea64f6a71baf5639b84) Explained the JSON structure in README and moved CLI specific information to the CLI package
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3ba3ad762f7486b4806ad1c45764e92a81ca24dd) Added information on how to use the stubs to README, see [#718](https://github.com/dcodeIO/protobuf.js/issues/718)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a5dbba41341bf44876cd4226f08044f88148f37d) Added 'What is a valid message' section to README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6f8f2c1fdf92e6f81363d77bc059820b2376fe32) Added a hint on using .create to initial example
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3ad28ec920e0fe8d0223db28804a7b3f8a6880c2) Even more usage for README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5a1f861a0f6b582faae7a4cc5c6ca7e4418086da) Additional information on general usage (README)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/320dea5a1d1387c72759e10a17afd77dc48c3de0) Restructured README to Installation, Usage and Examples sections
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1c9055dd69f7696d2582942b307a1ac8ac0f5533) Added a longish section on the correct use of the toolset to README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/99667c8e1ff0fd3dac83ce8c0cff5d0b1e347310) Added a few additional notes on core methods to README, see [#710](https://github.com/dcodeIO/protobuf.js/issues/710)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2130bc97e44567e766ea8efacb365383c909dbd4) Extended traverse-types example, see [#693](https://github.com/dcodeIO/protobuf.js/issues/693)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/13e4aa3ff274ab42f1302e16fd59d074c5587b5b) Better explain how .verify, .encode and .decode are connected
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7502dd2dfdaea111e5c1a902c524ad0a51ff9bd4) Documented that Type#encode respectively Message.encode do not implicitly .verify, see [#696](https://github.com/dcodeIO/protobuf.js/issues/696) [ci-skip]
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e7e123aa0b6c05eb4156a761739e37c008a3cbc1) Documented throwing behavior of Reader.create and Message.decode
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0fcde32306da77f02cb1ea81ed18a32cee01f17b) Added error handling notes to README, see [#696](https://github.com/dcodeIO/protobuf.js/issues/696)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fef924e5f708f14dac5713aedc484535d36bfb47) Use @protobufjs/float
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fef924e5f708f14dac5713aedc484535d36bfb47) Rebuilt dist files for 6.7.0
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ca0dce2d7f34cd45e4c1cc753a97c58e05b3b9d2) Updated deps, ts fixes and regenerated dist files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2c2d4002d6776f3edde608bd813c37d798d87e6b) Manually merged gentests improvements, fixes [#733](https://github.com/dcodeIO/protobuf.js/issues/733)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e4a6b6f81fa492a63b12f0da0c381612deff1973) Make sure that util.Long is overridden by AMD loaders only if present, see [#730](https://github.com/dcodeIO/protobuf.js/issues/730)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fff1eb297a728ed6d334c591e7d796636859aa9a) Coverage for util.isset and service as a namespace
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8401a47d030214a54b5ee30426ebc7a9d9c3773d) Shortened !== undefined && !== null to equivalent != null in static code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e1dd1bc2667de73bb65d876162131be2a4d9fef4) With stubs in place, 'number|Long' return values can be just 'Long' instead, see [#718](https://github.com/dcodeIO/protobuf.js/issues/718)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/404ba8e03a63f708a70a72f0208e0ca9826fe20b) Just alias as the actual ideal type when using stubs, see [#718](https://github.com/dcodeIO/protobuf.js/issues/718)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/270cc94c7c4b8ad84d19498672bfc854b55130c9) General cleanup + regenerated dist/test files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/017161ce97ceef3b2d0ce648651a4636f187d78b) Simplified camel case regex, see [#714](https://github.com/dcodeIO/protobuf.js/issues/714)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d410fd20f35d2a35eb314783b17b6570a40a99e8) Regenerated dist files and changelog for 6.7.0
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/88ca8f0d1eb334646ca2625c78e63fdd57221408) Retain alias order in static code for what it's worth, see [#712](https://github.com/dcodeIO/protobuf.js/issues/712)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2a74fbf551e934b3212273e6a28ad65ac4436faf) Everything can be block- or line-style when parsing, see [#713](https://github.com/dcodeIO/protobuf.js/issues/713)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/47bb95a31784b935b9ced52aa773b9d66236105e) Determine necessary aliases depending on config, see [#712](https://github.com/dcodeIO/protobuf.js/issues/712)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/588ffd9b129869de0abcef1d69bfa18f2f25d8e1) Use more precise types for message-like plain objects
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/37b39c8d1a5307eea09aa24d7fd9233a8df5b7b6) Regenerated dist files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9c94813f9a5f1eb114d7c6112f7e87cb116fe9da) Regenerated relevant files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d7493efe1a86a60f6cdcf7976523e69523d3f7a3) Moved field comparer to util
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fe917652f88df17d4dbaae1cd74f470385342be2) Updated tests to use new simplified encoder logic
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b69173b4e7b514c40bb4a85b54ca5465492a235b) Updated path to tsd-jsdoc template used by pbts, see [#707](https://github.com/dcodeIO/protobuf.js/issues/707)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5041fad9defdb0bc8131560e92f3b454d8e45273) Additional restructuring for moving configuration files out of the root folder
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c0b7c9fa6309d345c4ce8e06fd86f27528f4ea66) Added codegen support for constructor functions, see [#700](https://github.com/dcodeIO/protobuf.js/issues/700)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4573f9aabd7e8f883e530f4d0b055e5ec9b75219) Attempted to fix broken custom error test
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4b49f500fce156b164c757d8f17be2338f767c82) Trying out a more aggressive aproach for custom error subclasses
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/95cd64ee514dc60d10daac5180726ff39594e8e8) Moved a few things out of the root folder
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/db1030ed257f9699a0bcf3bad0bbe8acccf5d766) Coverage for encoder compat. / protocolerror
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/948a4caf5092453fa091ac7a594ccd1cc5b503d2) Updated dist and generated test files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3ead13e83ecdc8715fbab916f7ccaf3fbfdf59ed) Added tslint
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/364e7d457ed4c11328e609f600a57b7bc4888554) Exclude dist/ from codeclimate checks
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6e81fcb05f25386e3997399e6596e9d9414f0286) Also lint cli utilities
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e7e123aa0b6c05eb4156a761739e37c008a3cbc1) Cache any regexp instance (perf)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d89c45f8af0293fb34e6f12b37ceca49083e1faa) Use code climate badges
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e70fbe3492c37f009dbaccf910c1e0f81e8f0f44) Updated travis to pipe to codeclimate, coverage
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a7ab1036906bb7638193a9e991cb62c86108880a) More precise linter configuration
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/58688c178257051ceb2dfea8a63eb6be7dcf1cf1) Added codeclimate
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4b21e00adc6fae42e6a88deaeb0b7c077c6ca50e) Moved cli deps placeholder creation to post install script
+
+# [6.6.5](https://github.com/dcodeIO/protobuf.js/releases/tag/6.6.5)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/478ee51194878f24be8607e42e5259952607bd44) sfixed64 is not zig-zag encoded, see [#692](https://github.com/dcodeIO/protobuf.js/issues/692)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7a944538c89492abbed147915acea611f11c03a2) Added a placeholder to cli deps node_modules folder to make sure node can load from it
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/83142e420eb1167b2162063a092ae8d89c9dd4b2) Restructured a few failing tests
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/367d55523a3ae88f21d47aa96447ec3e943d4620) Traversal example + minimalistic documentation
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8eeffcbcd027c929e2a76accad588c61dfa2e37c) Added a custom getters/setters example for gRPC
+
+# [6.6.4](https://github.com/dcodeIO/protobuf.js/releases/tag/6.6.4)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/88eb7a603a21643d5012a374c7d246f4c27620f3) Made sure that LongBits ctor is always called with unsigned 32 bits + static codegen compat., fixes [#690](https://github.com/dcodeIO/protobuf.js/issues/690)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/50e82fa7759be035a67c7818a1e3ebe0d6f453b6) Properly handle multiple ../.. in path.normalize, see [#688](https://github.com/dcodeIO/protobuf.js/issues/688)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7c3506b3f0c5a08a887e97313828af0c21effc61) Post-merge, also tackles [#683](https://github.com/dcodeIO/protobuf.js/issues/683) (packed option for repeated enum values)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7f3f4600bcae6f2e4dadd5cdb055886193a539b7) Verify accepts non-null objects only, see [#685](https://github.com/dcodeIO/protobuf.js/issues/685)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d65c22936183d04014d6a8eb880ae0ec33aeba6d) allow_alias enum option was not being honored. This case is now handled and a test case was added
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2ddb76b6e93174787a68f68fb28d26b8ece7cc56) Added an experimental --sparse option to limit pbjs output to actually referenced types within main files
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/33d14c97600ed954193301aecbf8492076dd0179) Added explicit hint on Uint8Array to initial example, see [#670](https://github.com/dcodeIO/protobuf.js/issues/670)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cbd4c622912688b47658fea00fd53603049b5104) Ranges and names support for reserved fields, see [#676](https://github.com/dcodeIO/protobuf.js/issues/676)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/487f8922d879955ba22f89b036f897b9753b0355) Updated depdendencies / rebuilt dist files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/37536e5fa7a15fbc851040e09beb465bc22d9cf3) Use ?: instead of |undefined in .d.ts files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f8b415a2fc2d1b1eff19333600a010bcaaebf890) Mark optional fields as possibly being undefined
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2ddb76b6e93174787a68f68fb28d26b8ece7cc56) Added a few more common google types from google/api, see [#433](https://github.com/dcodeIO/protobuf.js/issues/433)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d246024f4c7d13ca970c91a757e2f47432a619df) Minor optimizations to dependencies, build process and tsd
+
+# [6.6.3](https://github.com/dcodeIO/protobuf.js/releases/tag/6.6.3)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0be01a14915e3e510038808fedbc67192a182d9b) Support node 4.2.0 to 4.4.7 buffers + travis case, see [#665](https://github.com/dcodeIO/protobuf.js/issues/665)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6a0920b2c32e7963741693f5a773b89f4b262688) Added ES6 syntax flag to pbjs, see [#667](https://github.com/dcodeIO/protobuf.js/issues/667)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c365242bdc28a47f5c6ab91bae34c277d1044eb3) Reference Buffer for BufferReader/Writer, see [#668](https://github.com/dcodeIO/protobuf.js/issues/668)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/43976072d13bb760a0689b54cc35bdea6817ca0d) Slightly shortened README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e64cf65b09047755899ec2330ca0fc2f4d7932c2) Additional notes on the distinction of different use cases / distributions, see [#666](https://github.com/dcodeIO/protobuf.js/issues/666)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/83758c99275c2bbd30f63ea1661284578f5c9d91) Extended README with additional information on JSON format
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fdc3102689e8a3e8345eee5ead07ba3c9c3fe80c) Added extended usage instructions for TypeScript and custom classes to README, see [#666](https://github.com/dcodeIO/protobuf.js/issues/666)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3701488cca6bc56ce6b7ad93c7b80e16de2571a7) Updated dist files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/579068a45e285c7d2c69b359716dd6870352f46f) Updated test cases to use new buffer util
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0be01a14915e3e510038808fedbc67192a182d9b) Added fetch test cases + some test cleanup
+
+# [6.6.2](https://github.com/dcodeIO/protobuf.js/releases/tag/6.6.2)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3aea1bf3d4920dc01603fda25b86e6436ae45ec2) Properly replace short vars when beautifying static code, see [#663](https://github.com/dcodeIO/protobuf.js/issues/663)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b6cf228a82152f72f21b1b307983126395313470) Use custom prelude in order to exclude any module loader code from source (for webpack), see [#658](https://github.com/dcodeIO/protobuf.js/issues/658)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2b12fb7db9d4eaa3b76b7198539946e97db684c4) Make sure to check optional inner messages for null when encoding, see [#658](https://github.com/dcodeIO/protobuf.js/issues/658)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/276a594771329da8334984771cb536de7322d5b4) Initial attempt on a backwards compatible fetch implementation with binary support, see [#661](https://github.com/dcodeIO/protobuf.js/issues/661)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2d81864fa5c4dac75913456d582e0bea9cf0dd80) Root#resolvePath skips files when returning null, see [#368](https://github.com/dcodeIO/protobuf.js/issues/368)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/aab3ec1a757aff0f11402c3fb943c003f092c1af) Changes callback on failed response decode in rpc service to pass actual error instead of 'error' string
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9044178c052299670108f10621d6e9b3d56e8a40) Travis should exit with the respective error when running sauce tests
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/73721f12072d77263e72a3b27cd5cf9409db9f8b) Moved checks whether a test case is applicable to parent case
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3fcd88c3f9b1a084b06cab2d5881cb5bb895869d) Added eventemitter tests and updated micromodule dependencies (so far)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2db4305ca67d003d57aa14eb23f25eb6c3672034) Added lib/path tests and updated a few dependencies
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2b12fb7db9d4eaa3b76b7198539946e97db684c4) Moved micro modules to lib so they can have their own tests etc.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b6dfa9f0a4c899b5c217d60d1c2bb835e06b2122) Updated travis
+
+# [6.6.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.6.1)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/039ac77b062ee6ebf4ec84a5e6c6ece221e63401) Properly set up reflection when using light build
+
+# [6.6.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.6.0) ([release](https://github.com/dcodeIO/protobuf.js/releases/tag/6.6.0))
+
+## Breaking
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cdfe6bfba27fa1a1d0e61887597ad4bb16d7e5ed) Inlined / refactored away .testJSON, see [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6a483a529ef9345ed217a23394a136db0d9f7771) Refactored util.extend away
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/27b16351f3286468e539c2ab382de4b52667cf5e) Reflected and statically generated services use common utility, now work exactly the same
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/dca26badfb843a597f81e98738e2fda3f66c7341) fromObject now throws for entirely bogus values (repeated, map and inner message fields), fixes [#601](https://github.com/dcodeIO/protobuf.js/issues/601)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4bff9c356ef5c10b4aa34d1921a3b513e03dbb3d) Cleaned up library distributions, now is full / light / minimal with proper browserify support for each
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/301f7762ef724229cd1df51e496eed8cfd2f10eb) Do not randomly remove slashes from comments, fixes [#656](https://github.com/dcodeIO/protobuf.js/issues/656)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ef7be352baaec26bdcdce01a71fbee47bbdeec15) Properly parse nested textformat options, also tackles [#655](https://github.com/dcodeIO/protobuf.js/issues/655)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b4f4f48f1949876ae92808b0a5ca5f2b29cc011c) Relieved the requirement to call .resolveAll() on roots in order to populate static code-compatible properties, see [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/56c8ec4196d461383c3e1f271da02553d877ae81) Added a (highly experimental) debug build as a starting point for [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c5d291f9bab045385c5938ba0f6cdf50a315461f) Full build depends on light build depends on minimal build, shares all relevant code
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/735da4315a98a6960f3b5089115e308548b91c07) Also reuse specified root in pbjs for JSON modules, see [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3a056244d3acf339722d56549469a8df018e682e) Reuse specified root name in pbjs to be able to split definitions over multiple files more easily, see [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/28ddf756ab83cc890761ef2bd84a0788d2ad040d) Improved pbjs/pbts examples, better covers reflection with definitions for static modules
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6f0b44aea6cf72d23042810f05a7cede85239eb3) Fixed centered formatting on npm
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/dd96dcdacb8eae94942f7016b8dc37a2569fe420) Various other minor improvements / assertions refactored away, see [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3317a76fb56b9b31bb07ad672d6bdda94b79b6c3) Fixed some common reflection deopt sites, see [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6a483a529ef9345ed217a23394a136db0d9f7771) Reflection performance pass, see [#653](https://github.com/dcodeIO/protobuf.js/issues/653)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6a483a529ef9345ed217a23394a136db0d9f7771) Added TS definitions to alternative builds' index files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6a483a529ef9345ed217a23394a136db0d9f7771) Removed unnecessary prototype aliases, improves gzip ratio
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/641625fd64aca55b1163845e6787b58054ac36ec) Unified behaviour of and docs on Class constructor / Class.create
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7299929b37267af2100237d4f8b4ed8610b9f7e1) Statically generated services actually inherit from rpc.Service
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f4cf75e4e4192910b52dd5864a32ee138bd4e508) Do not try to run sauce tests for PRs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/33da148e2b750ce06591c1c66ce4c46ccecc3c8f) Added utility to enable/disable debugging extensions to experimental debug build
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fdb1a729ae5f8ab762c51699bc4bb721102ef0c8) Fixed node 0.12 tests
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6bc5bb4a7649d6b91a5944a9ae20178d004c8856) Fixed coverage
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6f0b44aea6cf72d23042810f05a7cede85239eb3) Added a test case for [#652](https://github.com/dcodeIO/protobuf.js/issues/652)
+
+# [6.5.3](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.3)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/799d0303bf289bb720f2b27af59e44c3197f3fb7) In fromObject, check if object is already a runtime message, see [#652](https://github.com/dcodeIO/protobuf.js/issues/652)
+
+# [6.5.2](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.2)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8cff92fe3b7ddb1930371edb4937cd0db9216e52) Added coverage reporting
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cbaaae99b4e39a859664df0e6d20f0491169f489) Added version scheme warning to everything CLI so that we don't need this overly explicit in README
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6877b3399f1a4c33568221bffb4e298b01b14439) Coverage progress, 100%
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/711a9eb55cb796ec1e51af7d56ef2ebbd5903063) Coverage progress
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e7526283ee4dd82231235afefbfad6af54ba8970) Attempted to fix badges once and for all
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5aa296c901c2b460ee3be4530ede394e2a45e0ea) Coverage progress
+
+# [6.5.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.1)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9719fd2fa8fd97899c54712a238091e8fd1c57b2) Reuse module paths when looking up cli dependencies, see [#648](https://github.com/dcodeIO/protobuf.js/issues/648)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6302655d1304cf662f556be5d9fe7a016fcedc3c) Check actual module directories to determine if cli dependencies are present and bootstrap semver, see [#648](https://github.com/dcodeIO/protobuf.js/issues/648)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/dfc7c4323bf98fb26ddcfcfbb6896a6d6e8450a4) Added a note on semver-incompatibility, see [#649](https://github.com/dcodeIO/protobuf.js/issues/649)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/49053ffa0ea8a4ba5ae048706dba1ab6f3bc803b) Coverage progress
+
+# [6.5.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0) ([release](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0))
+
+## Breaking
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3946e0fefea415f52a16ea7a74109ff40eee9643) Initial upgrade of converters to real generated functions, see [#620](https://github.com/dcodeIO/protobuf.js/issues/620)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/08cda241a3e095f3123f8a991bfd80aa3eae9400) An enum's default value present as a string looks up using typeDefault, not defaultValue which is an array if repeated
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c7e14b1d684aaba2080195cc83900288c5019bbc) Use common utility for virtual oneof getters and setters in both reflection and static code, see [#644](https://github.com/dcodeIO/protobuf.js/issues/644)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/508984b7ff9529906be282375d36fdbada66b8e6) Properly use Type.toObject/Message.toObject within converters, see [#641](https://github.com/dcodeIO/protobuf.js/issues/641)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5bca18f2d32e8687986e23edade7c2aeb6b6bac1) Generate null/undefined assertion in fromObject if actually NOT an enum, see [#620](https://github.com/dcodeIO/protobuf.js/issues/620)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/508984b7ff9529906be282375d36fdbada66b8e6) Replace ALL occurencies of types[%d].values in static code, see [#641](https://github.com/dcodeIO/protobuf.js/issues/641)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9b090bb1673aeb9b8f1d7162316fce4d7a3348f0) Switched to own property-aware encoders for compatibility, see [#639](https://github.com/dcodeIO/protobuf.js/issues/639)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/340d6aa82ac17c4a761c681fa71d5a0955032c8b) Now also parses comments, sets them on reflected objects and re-uses them when generating static code, see [#640](https://github.com/dcodeIO/protobuf.js/issues/640)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3cb82628159db4d2aa721b63619b16aadc5f1981) Further improved generated static code style
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cda5c5452fa0797f1e4c375471aef96f844711f1) Removed scoping iifes from generated static code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/def7b45fb9b5e01028cfa3bf2ecd8272575feb4d) Removed even more clutter from generated static code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/dbd19fd9d3a57d033aad1d7173f7f66db8f8db3e) Removed various clutter from generated static code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1cc8a2460c7e161c9bc58fa441ec88e752df409c) Made sure that static target's replacement regexes don't match fields
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d4272dbf5d0b2577af8efb74a94d246e2e0d728e) Also accept (trailing) triple-slash comments for compatibility with protoc-gen-doc, see [#640](https://github.com/dcodeIO/protobuf.js/issues/640)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0a3862b75fa60ef732e0cd36d623f025acc2fb45) Use semver to validate that CLI dependencies actually satisfy the required version, see [#637](https://github.com/dcodeIO/protobuf.js/issues/637)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9e360ea6a74d41307483e51f18769df7f5b047b9) Added a hint on documenting .proto files for static code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d2a97bb818474645cf7ce1832952b2c3c739b234) Documented internally used codegen partials for what it's worth
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/079388ca65dfd581d74188a6ae49cfa01b103809) Updated converter documentation
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/168e448dba723d98be05c55dd24769dfe3f43d35) Bundler provides useful stuff to uglify and a global var without extra bloat
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/32e0529387ef97182ad0b9ae135fd8b883ed66b4) Cleaned and categorized tests, coverage progress
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3325e86930a3cb70358c689cb3016c1be991628f) Properly removed builtins from bundle
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2c94b641fc5700c8781ac0b9fe796debac8d6893) Call hasOwnProperty builtin as late as possible decreasing the probability of having to call it at all (perf)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/818bcacde267be70a75e689f480a3caad6f80cf7) Slightly hardened codegen sprintf
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/818bcacde267be70a75e689f480a3caad6f80cf7) Significantly improved uint32 write performance
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b5daa272407cb31945fd38c34bbef7c9edd1db1c) Cleaned up test case data and removed unused files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c280a4a18c6d81c3468177b2ea58ae3bc4f25e73) Removed now useless trailing comment checks, see [#640](https://github.com/dcodeIO/protobuf.js/issues/640)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/44167db494c49d9e4b561a66ad9ce2d8ed865a21) Ensured that pbjs' beautify does not break regular expressions in generated verify functions
+
+# [6.4.6](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.6)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e11012ce047e8b231ba7d8cc896b8e3a88bcb902) Case-sensitively test for legacy group definitions, fixes [#638](https://github.com/dcodeIO/protobuf.js/issues/638)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7e57f4cdd284f886b936511b213a6468e4ddcdce) Properly parse text format options + simple test case, fixes [#636](https://github.com/dcodeIO/protobuf.js/issues/636)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fe4d97bbc4d33ce94352dde62ddcd44ead02d7ad) Added SVG logo, see [#629](https://github.com/dcodeIO/protobuf.js/issues/629)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/57990f7ed8ad5c512c28ad040908cee23bbf2aa8) Also refactored Service and Type to inherit from NamespaceBase, see [#635](https://github.com/dcodeIO/protobuf.js/issues/635)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fe4d97bbc4d33ce94352dde62ddcd44ead02d7ad) Moved TS-compatible Namespace features to a virtual NamespaceBase class, compiles with strictNullChecks by default now, see [#635](https://github.com/dcodeIO/protobuf.js/issues/635)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fe4d97bbc4d33ce94352dde62ddcd44ead02d7ad) Minor codegen enhancements
+
+# [6.4.5](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.5)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1154ce0867306e810cf62a5b41bdb0b765aa8ff3) Properly handle empty/noop Writer#ldelim, fixes [#625](https://github.com/dcodeIO/protobuf.js/issues/625)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f303049f92c53970619375653be46fbb4e3b7d78) Properly annotate map fields in pbjs, fixes [#624](https://github.com/dcodeIO/protobuf.js/issues/624)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4b786282a906387e071a5a28e4842a46df588c7d) Made sure that Writer#bytes is always able to handle plain arrays
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1e6a8d10f291a16631376dd85d5dd385937e6a55) Slightly restructured utility to better support static code default values
+
+# [6.4.4](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.4)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/26d68e36e438b590589e5beaec418c63b8f939cf) Dynamically resolve jsdoc when running pbts, fixes [#622](https://github.com/dcodeIO/protobuf.js/issues/622)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/69c04d7d374e70337352cec9b445301cd7fe60d6) Explain 6.4.2 vs 6.4.3 in changelog
+
+# [6.4.3](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.4)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c2c39fc7cec5634ecd1fbaebbe199bf097269097) Fixed invalid definition of Field#packed property, also introduced decoder.compat mode (packed fields, on by default)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/11fb1a66ae31af675d0d9ce0240cd8e920ae75e7) Always decode packed/non-packed based on wire format only, see [#602](https://github.com/dcodeIO/protobuf.js/issues/602)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c9a61e574f5a2b06f6b15b14c0c0ff56f8381d1f) Use full library for JSON modules and runtime dependency for static modules, fixes [#621](https://github.com/dcodeIO/protobuf.js/issues/621)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e88d13ca7ee971451b57d056f747215f37dfd3d7) Additional workarounds for on demand CLI dependencies, see [#618](https://github.com/dcodeIO/protobuf.js/issues/618)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/44f6357557ab3d881310024342bcc1e0d336a20c) Revised automatic setup of cli dependencies, see [#618](https://github.com/dcodeIO/protobuf.js/issues/618)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e027a3c7855368837e477ce074ac65f191bf774a) Removed Android 4.0 test (no longer supported by sauce)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8ba3c5efd182bc80fc36f9d5fe5e2b615b358236) Removed some unused utility, slightly more efficient codegen, additional comments
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f22a34a071753bca416732ec4d01892263f543fb) Updated tests for new package.json layout
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f22a34a071753bca416732ec4d01892263f543fb) Added break/continue label support to codegen
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f2ffa0731aea7c431c59e452e0f74247d815a352) Updated dependencies, rebuilt dist files and changed logo to use an absolute url
+
+6.4.2 had been accidentally published as 6.4.3.
+
+# [6.4.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.1)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9035d4872e32d6402c8e4d8c915d4f24d5192ea9) Added more default value checks to converter, fixes [#616](https://github.com/dcodeIO/protobuf.js/issues/616)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/62eef58aa3b002115ebded0fa58acc770cd4e4f4) Respect long defaults in converters
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e3170a160079a3a7a99997a2661cdf654cb69e24) Convert inner messages and undefined/null values more thoroughly, fixes [#615](https://github.com/dcodeIO/protobuf.js/issues/615)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b52089efcb9827537012bebe83d1a15738e214f4) Always use first defined enum value as field default, fixes [#613](https://github.com/dcodeIO/protobuf.js/issues/613)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/64f95f9fa1bbe42717d261aeec5c16d1a7aedcfb) Install correct 'tmp' dependency when running pbts without dev dependencies installed, fixes [#612](https://github.com/dcodeIO/protobuf.js/issues/612)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cba46c389ed56737184e5bc2bcce07243d52e5ce) Generate named constructors for runtime messages, see [#588](https://github.com/dcodeIO/protobuf.js/issues/588)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ee20b81f9451c56dc106177bbf9758840b99d0f8) pbjs/pbts no longer generate any volatile headers, see [#614](https://github.com/dcodeIO/protobuf.js/issues/614)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ec9d517d0b87ebe489f02097c2fc8005fae38904) Attempted to make broken shields less annoying
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5cd4c2f2a94bc3c0f2c580040bce28dd42eaccec) Updated README
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0643f93f5c0d96ed0ece5b47f54993ac3a827f1b) Some cleanup and added a logo
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/169638382de9efe35a1079c5f2045c33b858059a) use $protobuf.Long
+
+# [6.4.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0) ([release](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0))
+
+## Breaking
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a017bf8a2dbdb7f9e7ce4c026bb6845174feb3b1) Dropped IE8 support
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/39bc1031bb502f8b677b3736dd283736ea4d92c1) Removed now unused util.longNeq which was used by early static code
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5915ff972482e7db2a73629244ab8a93685b2e55) Do not swallow errors in loadSync, also accept negative enum values in Enum#add, fixes [#609](https://github.com/dcodeIO/protobuf.js/issues/609)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fde56c0de69b480343931264a01a1ead1e3156ec) Improved bytes field support, also fixes [#606](https://github.com/dcodeIO/protobuf.js/issues/606)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0c03f327115d57c4cd5eea3a9a1fad672ed6bd44) Fall back to browser Reader when passing an Uint8Array under node, fixes [#605](https://github.com/dcodeIO/protobuf.js/issues/605)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7eb3d456370d7d66b0856e32b2d2602abf598516) Respect optional properties when writing interfaces in tsd-jsdoc, fixes [#598](https://github.com/dcodeIO/protobuf.js/issues/598)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bcadffecb3a8b98fbbd34b45bae0e6af58f9c810) Instead of protobuf.parse.keepCase, fall back to protobuf.parse.defaults holding all possible defaults, see [#608](https://github.com/dcodeIO/protobuf.js/issues/608)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a4d6a2af0d57a2e0cccf31e3462c8b2465239f8b) Added global ParseOptions#keepCase fallback as protobuf.parse.keepCase, see [#608](https://github.com/dcodeIO/protobuf.js/issues/608)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a017bf8a2dbdb7f9e7ce4c026bb6845174feb3b1) Converters use code generation and support custom implementations
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/28ce07d9812f5e1743afef95a94532d2c9488a84) Be more verbose when throwing invalid wire type errors, see [#602](https://github.com/dcodeIO/protobuf.js/issues/602)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/40074bb69c3ca4fcefe09d4cfe01f3a86844a7e8) Added an asJSON-option to always populate array fields, even if defaults=false, see [#597](https://github.com/dcodeIO/protobuf.js/issues/597)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a7d23240a278aac0bf01767b6096d692c09ae1ce) Attempt to improve TypeScript support by using explicit exports
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cec253fb9a177ac810ec96f4f87186506091fa37) Copy-pasted typescript definitions to micro modules, see [#599](https://github.com/dcodeIO/protobuf.js/issues/599)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1f18453c7bfcce65c258fa98a3e3d4577d2e550f) Emit an error on resolveAll() if any extension fields cannot be resolved, see [#595](https://github.com/dcodeIO/protobuf.js/issues/595) + test case
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/804739dbb75359b0034db0097fe82081e3870a53) Removed 'not recommend' label for --keep-case, see [#608](https://github.com/dcodeIO/protobuf.js/issues/608)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9681854526f1813a6ef08becf130ef2fbc28b638) Added customizable linter configuration to pbjs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9681854526f1813a6ef08becf130ef2fbc28b638) Added stdin support to pbjs and pbts
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/407223b5ceca3304bc65cb48888abfdc917d5800) Static code no longer uses IE8 support utility
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a017bf8a2dbdb7f9e7ce4c026bb6845174feb3b1) Generated static code now supports asJSON/from
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3c775535517b8385a1d3c1bf056f3da3b4266f8c) Added support for TypeScript enums to pbts
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0cda72a55a1f2567a5d981dc5d924e55b8070513) Added a few helpful comments to static code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/24b293c297feff8bda5ee7a2f8f3f83d77c156d0) Slightly beautify statically generated code
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/65637ffce20099df97ffbcdce50faccc8e97c366) Do not wrap main definition as a module and export directly instead
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/65637ffce20099df97ffbcdce50faccc8e97c366) Generate prettier definitions with --no-comments
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/20d8a2dd93d3bbb6990594286f992e703fc4e334) Added variable arguments support to tsd-jsdoc
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8493dbd9a923693e943f710918937d83ae3c4572) Reference dependency imports as a module to prevent name collisions, see [#596](https://github.com/dcodeIO/protobuf.js/issues/596)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/39a2ea361c50d7f4aaa0408a0d55bb13823b906c) Removed now unnecessary comment lines in generated static code
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a4e41b55471d83a8bf265c6641c3c6e0eee82e31) Added notes on CSP-restricted environments to README, see [#593](https://github.com/dcodeIO/protobuf.js/issues/593)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1a3effdad171ded0608e8da021ba8f9dd017f2ff) Added test case for asJSON with arrays=true, see [#597](https://github.com/dcodeIO/protobuf.js/issues/597)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/751a90f509b68a5f410d1f1844ccff2fc1fc056a) Added a tape adapter to assert message equality accross browsers
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fde56c0de69b480343931264a01a1ead1e3156ec) Refactored some internal utility away
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/805291086f6212d1f108b3d8f36325cf1739c0bd) Reverted previous attempt on [#597](https://github.com/dcodeIO/protobuf.js/issues/597)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c5160217ea95996375460c5403dfe37b913d392e) Minor tsd-jsdoc refactor
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/961dd03061fc2c43ab3bf22b3f9f5165504c1002) Removed unused sandbox files
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f625eb8b0762f8f5d35bcd5fc445e52b92d8e77d) Updated package.json of micro modules to reference types, see [#599](https://github.com/dcodeIO/protobuf.js/issues/599)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/46ec8209b21cf9ff09ae8674e2a5bbc49fd4991b) Reference dependencies as imports in generated typescript definitions, see [#596](https://github.com/dcodeIO/protobuf.js/issues/596)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3bab132b871798c7c50c60a4c14c2effdffa372e) Allow null values on optional long fields, see [#590](https://github.com/dcodeIO/protobuf.js/issues/590)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/31da56c177f1e11ffe0072ad5f58a55e3f8008fd) Various jsdoc improvements and a workaround for d.ts generation, see [#592](https://github.com/dcodeIO/protobuf.js/issues/592)
+
+# [6.3.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.3.1)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/95ed6e9e8268711db24f44f0d7e58dd278ddac4c) Empty inner messages are always present on the wire + test case + removed now unused Writer#ldelim parameter, see [#585](https://github.com/dcodeIO/protobuf.js/issues/585)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e8a4d5373b1a00cc6eafa5b201b91d0e250cc00b) Expose tsd-jsdoc's comments option to pbts as --no-comments, see [#587](https://github.com/dcodeIO/protobuf.js/issues/587)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6fe099259b5985d873ba5bec88c049d7491a11cc) Increase child process max buffer when running jsdoc from pbts, see [#587](https://github.com/dcodeIO/protobuf.js/issues/587)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3d84ecdb4788d71b5d3928e74db78e8e54695f0a) pbjs now generates more convenient dot-notation property accessors
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1e0ebc064e4f2566cebf525d526d0b701447bd6a) And fixed IE8 again (should probably just drop IE8 for good)
+
+# [6.3.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.3.0)
+
+## Breaking
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a97956b1322b6ee62d4fc9af885658cd5855e521) Moved camelCase/underScore away from util to where actually used
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c144e7386529b53235a4a5bdd8383bdb322f2825) Renamed asJSON option keys (enum to enums, long to longs) because enum is a reserved keyword
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5b9ade428dca2df6a13277522f2916e22092a98b) Moved JSON/Message conversion to its own source file and added Message/Type.from + test case, see [#575](https://github.com/dcodeIO/protobuf.js/issues/575)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0b0de2458a1ade1ccd4ceb789697be13290f856b) Relicensed the library and its components to BSD-3-Clause to match the official implementation (again)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22a64c641d4897965035cc80e92667bd243f182f) Dropped support for browser buffer entirely (is an Uint8Array anyway), ensures performance and makes things simpler
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22a64c641d4897965035cc80e92667bd243f182f) Removed dead parts of the Reader API
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/964f65a9dd94ae0a18b8be3d9a9c1b0b1fdf6424) Refactored BufferReader/Writer to their own files and removed unnecessary operations (node always has FloatXXArray and browser buffer uses ieee anyway)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bfac0ea9afa3dbaf5caf79ddf0600c3c7772a538) Stripped out fallback encoder/decoder/verifier completely (even IE8 supports codegen), significantly reduces bundle size, can use static codegen elsewhere
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c3023a2f51fc74547f6c6e53cf75feed60f3a25c) Actually concatenate mixed custom options when parsing
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0d66b839df0acec2aea0566d2c0bbcec46c3cd1d) Fixed a couple of issues with alternative browser builds
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/33706cdc201bc863774c4af6ac2c38ad96a276e6) Properly set long defaults on prototypes
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0ea2740f0774b4c5c349b9c303f3fb2c2743c37b) Fixed reference error in minimal runtime, see [#580](https://github.com/dcodeIO/protobuf.js/issues/580)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/741b6d8fde84d9574676a729a29a428d99f0a0a0) Non-repeated empty messages are always present on the wire, see [#581](https://github.com/dcodeIO/protobuf.js/issues/581)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7fac9d6a39bf42d316c1676082a2d0804bc55934) Properly check Buffer.prototype.set with node v4
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3ad8108eab57e2b061ee6f1fddf964abe3f4cbc7) Prevent NRE and properly annotate verify signature in tsd-jsdoc, fixed [#572](https://github.com/dcodeIO/protobuf.js/issues/572)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6c2415d599847cbdadc17dee3cdf369fc9facade) Fix directly using Buffer instead of util.Buffer
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/19e906c2a15acc6178b3bba6b19c2f021e681176) Added filter type to Namespace#lookup, fixes [#569](https://github.com/dcodeIO/protobuf.js/issues/569)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9c9a66bf393d9d6927f35a9c18abf5d1c31db912) Fixed parsing enum inner options, see [#565](https://github.com/dcodeIO/protobuf.js/issues/565)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ea7ba8b83890084d61012cb5386dc11dadfb3908) Fixed release links in README files
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/442471363f99e67fa97044f234a47b3c9b929dfa) Added a noparse build for completeness
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bfee1cc3624d0fa21f9553c2f6ce2fcf7fcc09b7) Now compresses .gz files using zopfli to make them useful beyond being just a reference
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/aed134aa1cd7edd801de77c736cf5efe6fa61cb0) Updated non-bundled google types folder with missing descriptors and added wrappers to core
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0b0de2458a1ade1ccd4ceb789697be13290f856b) Replaced the ieee754 implementation for old browsers with a faster, use-case specific one + simple test case
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/99ad9cc08721b834a197d4bbb67fa152d7ad79aa) Added .create to statically generated types and uppercase nested elements to reflection namespaces, see [#576](https://github.com/dcodeIO/protobuf.js/issues/576)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/99ad9cc08721b834a197d4bbb67fa152d7ad79aa) Also added Namespace#getEnum for completeness, see [#576](https://github.com/dcodeIO/protobuf.js/issues/576)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ef43acff547c0cd84cfb7a892fe94504a586e491) Added Namespace#getEnum and changed #lookupEnum to the same behavior, see [#576](https://github.com/dcodeIO/protobuf.js/issues/576)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1fcfdfe21c1b321d975a8a96d133a452c9a9c0d8) Added a heap of coverage comments for usually unused code paths to open things up
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c234de7f0573ee30ed1ecb15aa82b74c0f994876) Added codegen test to determine if any ancient browsers don't actually support it
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fed2000e7e461efdb1c3a1a1aeefa8b255a7c20b) Added legacy groups support to pbjs, see [#568](https://github.com/dcodeIO/protobuf.js/issues/568)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/974a1321da3614832aa0a5b2e7c923f66e4ba8ae) Initial support for legacy groups + test case, see [#568](https://github.com/dcodeIO/protobuf.js/issues/568)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9c9a66bf393d9d6927f35a9c18abf5d1c31db912) Added asJSON bytes as Buffer, see [#566](https://github.com/dcodeIO/protobuf.js/issues/566)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c60cd397e902ae6851c017f2c298520b8336cbee) Annotated callback types in pbjs-generated services, see [#582](https://github.com/dcodeIO/protobuf.js/issues/582)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3e7e4fc59e6d2d6c862410b4b427fbedccdb237b) Removed type/ns alias comment in static target to not confuse jsdoc unnecessarily
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/99ad9cc08721b834a197d4bbb67fa152d7ad79aa) Made pbjs use loadSync for deterministic outputs, see [#573](https://github.com/dcodeIO/protobuf.js/issues/573)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4d1f5facfcaaf5f2ab6a70b12443ff1b66e7b94e) Updated documentation on runtime and noparse builds
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c59647a7542cbc4292248787e5f32bb99a9b8d46) Fixed an issue with the changelog generator skipping some commits
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/24f2c03af9f13f5404259866fdc8fed33bfaae25) Added notes on how to use pbjs and pbts programmatically
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3544576116146b209246d71c7f7a9ed687950b26) Manually sorted old changelog entries
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d5812571f335bae68f924aa1098519683a9f3e44) Initial changelog generator, see [#574](https://github.com/dcodeIO/protobuf.js/issues/574)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ab3e236a967a032a98267a648f84d129fdb4d4a6) Added static/JSON module interchangeability to README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7939a4bd8baca5f7e07530fc93f27911a6d91c6f) Updated README and bundler according to dynamic require calls
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/93e04f1db4a9ef3accff8d071c75be3d74c0cd4a) Added basic services test case
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b5a068f5b79b6f00c4b05d9ac458878650ffa09a) Just polyfill Buffer.from / .allocUnsafe for good
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4375a485789e14f7bf24bece819001154a03dca2) Added a test case to find out if all the fallbacks are just for IE8
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/deb2e82ed7eda41d065a09d120e91c0f7ecf1e6a) Commented out float assertions in float test including explanation
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d3ebd5745b024033fbc2410ecad4d4e02abd67db) Expose array implementation used with (older) browsers on util for tests
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b1b6a813c93da4c7459755186aa02ef2f3765c94) Updated test cases
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/99dc5faa7b39fdad8ebc102de4463f8deb7f48ff) Added assumptions to float test case
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/948ca2e3c5c62fedcd918d75539c261abf1a7347) Updated travis config to use C++11
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c59647a7542cbc4292248787e5f32bb99a9b8d46) Updated / added additional LICENSE files where appropriate
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/333f0221814be976874862dc83d0b216e07d4012) Integrated changelog into build process, now also has 'npm run make' for everything, see [#574](https://github.com/dcodeIO/protobuf.js/issues/574)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ab3e236a967a032a98267a648f84d129fdb4d4a6) Minor optimizations through providing type-hints
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ab3e236a967a032a98267a648f84d129fdb4d4a6) Reverted shortened switch statements in verifier
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ab3e236a967a032a98267a648f84d129fdb4d4a6) Enums can't be map key types
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8ef6975b0bd372b79e9b638f43940424824e7176) Use custom require (now a micromodule) for all optional modules, see [#571](https://github.com/dcodeIO/protobuf.js/issues/571)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e226f001e4e4633d64c52be4abc1915d7b7bd515) Support usage when size = 0
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/19e906c2a15acc6178b3bba6b19c2f021e681176) Reverted aliases frequently used in codegen for better gzip ratio
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/47b51ec95a540681cbed0bac1b2f02fc4cf0b73d) Shrinked bundle size - a bit
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f8451f0058fdf7a1fac15ffc529e4e899c6b343c) Can finally run with --trace-deopt again without crashes
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9c9a66bf393d9d6927f35a9c18abf5d1c31db912) Other minor optimizations
+
+# [6.2.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.2.1)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1a6fdc9a11fb08506d09351f8e853384c2b8be25) Added ParseOptions to protobuf.parse and --keep-case for .proto sources to pbjs, see [#564](https://github.com/dcodeIO/protobuf.js/issues/564)
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fc383d0721d83f66b2d941f0d9361621839327e9) Better TypeScript definition support for @property-annotated objects
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4531d75cddee9a99adcac814d52613116ba789f3) Can't just inline longNeq but can be simplified
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8f25377cf99036794ba13b160a5060f312d1a7e7) Array abuse and varint optimization
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/90b201209a03e8022ada0ab9182f338fa0813651) Updated dependencies
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f1110b0993ec86e0a4aee1735bd75b901952cb36) Other minor improvements to short ifs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c079c900e2d61c63d5508eafacbd00163d377482) Reader/Writer example
+
+# [6.2.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.2.0)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9b7b92a4c7f8caa460d687778dc0628a74cdde37) Fixed reserved names re, also ensure valid service method names, see [#559](https://github.com/dcodeIO/protobuf.js/issues/559)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a83425049c9a78c5607bc35e8089e08ce78a741e) Fix d.ts whitespace on empty lines, added tsd-jsdoc LICENSE
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5f9bede280aa998afb7898e8d2718b4a229e8e6f) Fix asJSON defaults option, make it work for repeated fields.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b0aef62191b65cbb305ece84a6652d76f98da259) Inlined any Reader/Writer#tag calls, also fixes [#556](https://github.com/dcodeIO/protobuf.js/issues/556)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4d091d41caad9e63cd64003a08210b78878e01dd) Fix building default dist files with explicit runtime=false
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/096dfb686f88db38ed2d8111ed7aac36f8ba658a) Apply asJSON recursively
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/19c269f1dce1b35fa190f264896d0865a54a4fff) Ensure working reflection class names with minified builds
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9c769504e0ffa6cbe0b6f8cdc14f1231bed7ee34) Lazily resolve (some) cyclic dependencies, see [#560](https://github.com/dcodeIO/protobuf.js/issues/560)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/da07d8bbbede4175cc45ca46d883210c1082e295) Added protobuf.roots to minimal runtime, see [#554](https://github.com/dcodeIO/protobuf.js/issues/554)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8f407a18607334185afcc85ee98dc1478322bd01) Repo now includes a restructured version of tsd-jsdoc with our changes incorporated for issues/prs, see [#550](https://github.com/dcodeIO/protobuf.js/issues/550)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1b5e4250415c6169eadb405561242f847d75044b) Updated pbjs arguments
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4750e3111b9fdb107d0fc811e99904fbcdbb6de1) Pipe tsd-jsdoc output (requires dcodeIO/tsd-jsdoc/master) and respect cwd, see [#550](https://github.com/dcodeIO/protobuf.js/issues/550)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/75f4b6cb6325a3fc7cd8fed3de5dbe0b6b29c748) tsd-jsdoc progress
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/766171e4c8b6650ea9c6bc3e76c9c96973c2f546) README
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c33835cb1fe1872d823e94b0fff024dc624323e8) Added GH issue template
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6f9ffb6307476d48f45dc4f936744b82982d386b) Path micromodule, dependencies
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0b9b1d8505743995c5328daab1f1e124debc63bd) Test case for [#556](https://github.com/dcodeIO/protobuf.js/issues/556)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/74b2c5c5d33a46c3751ebeadc9d934d4ccb8286c) Raw alloc benchmark
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fb74223b7273530d8baa53437ee96c65a387436d) Other minor optimizations
+
+# [6.1.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.1.1)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/baea920fa6bf5746e0a7888cdbb089cd5d94fc90) Properly encode/decode map kv pairs as repeated messages (codegen and fallback), see [#547](https://github.com/dcodeIO/protobuf.js/issues/547)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/28a1d26f28daf855c949614ef485237c6bf316e5) Make genVerifyKey actually generate conditions for 32bit values and bool, fixes [#546](https://github.com/dcodeIO/protobuf.js/issues/546)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3e9d8ea9a5cbb2e029b5c892714edd6926d2e5a7) Fix to generation of verify methods for bytes
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e7893675ccdf18f0fdaea8f9a054a6b5402b060e) Take special care of oneofs when encoding (i.e. when explicitly set to defaults), see [#542](https://github.com/dcodeIO/protobuf.js/issues/542)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/52cd8b5a891ec8e11611127c8cfa6b3a91ff78e3) Added Message#asJSON option for bytes conversion
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/01365ba9116ca1649b682635bb29814657c4133c) Added Namespace#lookupType and Namespace#lookupService (throw instead of returning null), see [#544](https://github.com/dcodeIO/protobuf.js/issues/544)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a54fbc918ef6bd627113f05049ff704e07bf33b4) Provide prebuilt browser versions of the static runtime
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3783af7ca9187a1d9b1bb278ca69e0188c7e4c66) Initial pbts CLI for generating TypeScript definitions, see [#550](https://github.com/dcodeIO/protobuf.js/issues/550)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b8bce03405196b1779727f246229fd9217b4303d) Refactored json/static-module targets to use common wrappers
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/691231fbc453a243f48a97bfb86794ab5718ef49) Refactor cli to support multiple built-in wrappers, added named roots instead of always using global.root and added additionally necessary eslint comments, see [#540](https://github.com/dcodeIO/protobuf.js/issues/540)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e3e77d0c7dc973d3a5948a49d123bdaf8a048030) Annotate namespaces generated by static target, see [#550](https://github.com/dcodeIO/protobuf.js/issues/550)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/aff21a71e6bd949647b1b7721ea4e1fe16bcd933) static target: Basic support for oneof fields, see [#542](https://github.com/dcodeIO/protobuf.js/issues/542)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b6b00aa7b0cd35e0e8f3c16b322788e9942668d4) Fix to reflection documentation
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ed86f3acbeb6145be5f24dcd05efb287b539e61b) README on minimal runtime / available downloads
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d31590b82d8bafe6657bf877d403f01a034ab4ba) Notes on descriptors vs static modules
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ce41d0ef21cee2d918bdc5c3b542d3b7638b6ead) A lot of minor optimizations to performance and gzip ratio
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ecbb4a52fbab445e63bf23b91539e853efaefa47) Minimized base64 tables
+
+# [6.1.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.1.0)
+
+## Breaking
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a46cc4934b7e888ae80e06fd7fdf91e5bc7f54f5) Removed as-function overload for Reader/Writer, profiler stub, optimized version of Reader#int32
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7983ee0ba15dc5c1daad82a067616865051848c9) Refactored Prototype and inherits away, is now Class and Message for more intuitive documentation and type refs
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c3c70fe3a47fd4f7c85dc80e1af7d9403fe349cd) Fixed failing test case on node < 6
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/66be5983321dd06460382d045eb87ed72a186776) Fixed serialization order of sfixed64, fixes [#536](https://github.com/dcodeIO/protobuf.js/issues/536)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7def340833f9f1cc41f4835bd0d62e203b54d9eb) Fixed serialization order of fixed64, fallback to parseInt with no long lib, see [#534](https://github.com/dcodeIO/protobuf.js/issues/534)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/98a58d40ca7ee7afb1f76c5804e82619104644f6) Actually allow undefined as service method type, fixes [#528](https://github.com/dcodeIO/protobuf.js/issues/528)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/38d867fc50a4d7eb1ca07525c9e4c71b8782443e) Do not skip optional delimiter after aggregate options, fixes [#520](https://github.com/dcodeIO/protobuf.js/issues/520)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/67449db7c7416cbc59ad230c168cf6e6b6dba0c5) Verify empty base64 encoded strings for bytes fields, see [#535](https://github.com/dcodeIO/protobuf.js/issues/535)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ef0fcb6d525c5aab13a39b4f393adf03f751c8c9) wrong spell role should be rule
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/55db92e21a26c04f524aeecb2316968c000e744d) decodeDelimited always forks if writer is specified, see [#531](https://github.com/dcodeIO/protobuf.js/issues/531)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ebae1e18152617f11ac07827828f5740d4f2eb7e) Mimic spec-compliant behaviour in oneof getVirtual, see [#523](https://github.com/dcodeIO/protobuf.js/issues/523)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a0398f5880c434ff88fd8d420ba07cc29c5d39d3) Initial base64 string support for bytes fields, see [#535](https://github.com/dcodeIO/protobuf.js/issues/535)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6a6c00c3e1def5d35c7fcaa1bbb6ce4e0fe67544) Initial type-checking verifier, see [#526](https://github.com/dcodeIO/protobuf.js/issues/526), added to bench out of competition
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3aa984e063cd73e4687102b4abd8adc16582dbc4) Initial loadSync (node only), see [#529](https://github.com/dcodeIO/protobuf.js/issues/529)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f1370ff5b0db2ebb73b975a3d7c7bd5b901cbfac) Initial RPC service implementaion, see [#529](https://github.com/dcodeIO/protobuf.js/issues/529)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/090d8eaf10704a811a73e1becd52f2307cbcad48) added 'defaults' option to Prototype#asJSON, see [#521](https://github.com/dcodeIO/protobuf.js/issues/521)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7c28483d65cde148e61fe9993f1716960b39e049) Use Uint8Array pool in browsers, just like node does with buffers
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4157a0ec2e54c4d19794cb16edddcd8d4fbd3e76) Also validate map fields, see [#526](https://github.com/dcodeIO/protobuf.js/issues/526) (this really needs some tests)
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0ce099bf4f4666fd00403a2839e6da628b8328a9) Added json-module target to pbjs, renamed static to static-module, see [#522](https://github.com/dcodeIO/protobuf.js/issues/522)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1d99442fe65fcaa2f9e33cc0186ef1336057e0cf) updated internals and static target to use immutable objects on prototypes
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e6eaa91b9fe021b3356d4d7e42033a877bc45871) Added a couple of alternative signatures, protobuf.load returns promise or undefined, aliased Reader/Writer-as-function signature with Reader/Writer.create for typed dialects, see [#518](https://github.com/dcodeIO/protobuf.js/issues/518)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9df6a3d4a654c3e122f97d9a594574c7bbb412da) Added variations for Root#load, see [#527](https://github.com/dcodeIO/protobuf.js/issues/527)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/193e65c006a8df8e9b72e0f23ace14a94952ee36) Added benchmark and profile related information to README
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/228a2027de35238feb867cb0485c78c755c4d17d) Added service example to README, see [#529](https://github.com/dcodeIO/protobuf.js/issues/529)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1a8c720714bf867f1f0195b4690faefa4f65e66a) README on tests
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/014fb668dcf853874c67e3e0aeb7b488a149d35c) Update README/dist to reflect recent changes
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/11d844c010c5a22eff9d5824714fb67feca77b26) Minimal documentation for micromodules
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/47608dd8595b0df2b30dd18fef4b8207f73ed56a) Document all the callbacks, see [#527](https://github.com/dcodeIO/protobuf.js/issues/527)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3891ab07bbe20cf84701605aa62453a6dbdb6af2) Documented streaming-rpc example a bit
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5606cb1bc41bc90cb069de676650729186b38640) Removed the need for triple-slash references in .d.ts by providing a minimal Long interface, see [#527](https://github.com/dcodeIO/protobuf.js/issues/527), see [#530](https://github.com/dcodeIO/protobuf.js/issues/530)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/adf3cc3d340f8b2a596c892c64457b15e42a771b) Transition to micromodules
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f3a9589b74af6a1bf175f2b1994badf703d7abc4) Refactored argument order of utf8 for plausibility
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/14c207ed6e05a61e756fa4192efb2fa219734dd6) Restructured reusable micromodules
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/b510ba258986271f07007aebc5dcfea7cfd90cf4) Can't use Uint8Array#set on node < 6 buffers
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/78952a50ceee8e196b4f156eb01f7f693b5b8aac) Test case for [#531](https://github.com/dcodeIO/protobuf.js/issues/531)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/954577c6b421f7d7f4905bcc32f57e4ebaf548da) Safer signaling for synchronous load, see [#529](https://github.com/dcodeIO/protobuf.js/issues/529)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9ea3766ff1b8fb7ccad028f44efe27d3b019eeb7) Proper end of stream signaling to rpcImpl, see [#529](https://github.com/dcodeIO/protobuf.js/issues/529)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e4faf7fac9b34d4776f3c15dfef8d2ae54104567) Moved event emitter to util, also accepts listener context, see [#529](https://github.com/dcodeIO/protobuf.js/issues/529)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9bdec62793ce77c954774cc19106bde4132f24fc) Probably the worst form of hiding require programmatically, see [#527](https://github.com/dcodeIO/protobuf.js/issues/527)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4462d8b05d3aba37c865cf53e09b3199cf051a92) Attempt to hide require('fs') from webpack, see [#527](https://github.com/dcodeIO/protobuf.js/issues/527)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7c3bf8d32cbf831b251730b3876c35c901926300) Trying out jsdoc variations, see [#527](https://github.com/dcodeIO/protobuf.js/issues/527)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bb4059467287fefda8f966de575fd0f8f9690bd3) by the way, why not include the json->proto functionality into "util"?
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f1008e6ee53ee50358e19c10df8608e950be4be3) Update proto.js
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fc9014822d9cdeae8c6e454ccb66ee28f579826c) Automatic profile generation and processing
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/2a2f6dcab5beaaa98e55a005b3d02643c45504d6) Generalized buffer pool and moved it to util
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/53a16bf3ada4a60cc09757712e0046f3f2d9d094) Make shields visible on npm, yey
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9004b9d0c5135a7f6df208ea658258bf2f9e6fc9) More shields, I love shields, and maybe a workaround for travis timing out when sauce takes forever
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/060a7916a2715a9e4cd4d05d7c331bec33e60b7e) Trying SauceLabs with higher concurrency
+
+# [6.0.2](https://github.com/dcodeIO/protobuf.js/releases/tag/6.0.2)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/23d664384900eb65e44910def45f04be996fbba1) Fix packable float/double see [#513](https://github.com/dcodeIO/protobuf.js/issues/513)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/54283d39c4c955b6a84f7f53d4940eec39e4df5e) Handle oneofs in prototype ctor, add non-ES5 fallbacks, test case
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0ae66752362899b8407918a759b09938e82436e1) Be nice to AMD, allow reconfiguration of Reader/Writer interface
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/00f3574ef4ee8b237600e41839bf0066719c4469) Initial static codegen target for reference
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/81e36a7c14d89b487dfe7cfb2f8380fcdf0df392) pbjs static target services support
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4885b8239eb74c72e665787ea0ece3336e493d7f) pbjs static target progress, uses customizable wrapper template
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ad5abe7bac7885ba4f68df7eeb800d2e3b81750b) Static pbjs target progress, now generates usable CommonJS code, see [#512](https://github.com/dcodeIO/protobuf.js/issues/512)
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d9634d218849fb49ff5dfb4597bbb2c2d43bbf08) TypeScript example
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fce8276193a5a9fabad5e5fbeb2ccd4f0f3294a9) Adjectives, notes on browserify
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/23d664384900eb65e44910def45f04be996fbba1) Refactor runtime util into separate file, reader/writer uses runtime util
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f91c432a498bebc0adecef1562061b392611f51a) Also optimize reader with what we have learned
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d83f799519fe69808c88e83d9ad66c645d15e963) More (shameless) writer over-optimization
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8a2dbc610a06fe3a1a2695a3ab032d073b77760d) Trading package size for float speed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/95c5538cfaf1daf6b4990f6aa7599779aaacf99f) Skip defining getters and setters on IE8 entirely, automate defining fallbacks
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/09865d069303e795e475c82afe2b2267abaa59ea) Unified proto/reflection/classes/static encoding API to always return a writer
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/98d6ae186a48416e4ff3030987caed285f40a4f7) plain js utf8 is faster for short strings
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/79fbbf48b8e4dc9c41dcbdef2b73c5f2608b0318) improve TypeScript support. add simple test script.
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/96fa07adec8b0ae05e07c2c40383267f25f2fc92) Use long.js dependency in tests, reference types instead of paths in .d.ts see [#503](https://github.com/dcodeIO/protobuf.js/issues/503)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5785dee15d07fbcd14025a96686707173bd649a0) Restructured encoder / decoder to better support static code gen
+
+# [6.0.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.0.1)
+
+## Fixed
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/799c1c1a84b255d1831cc84c3d24e61b36fa2530) Add support for long strings, fixes [#509](https://github.com/dcodeIO/protobuf.js/issues/509)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6e5fdb67cb34f90932e95a51370e1652acc55b4c) expose zero on LongBits, fixes [#508](https://github.com/dcodeIO/protobuf.js/issues/508)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/aa922c07490f185c5f97cf28ebbd65200fc5e377) Fixed issues with Root.fromJSON/#addJSON, search global for Long
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/51fe45656b530efbba6dad92f92db2300aa18761) Properly exclude browserify's annoying _process, again, fixes [#502](https://github.com/dcodeIO/protobuf.js/issues/502)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3c16e462a28c36abbc8a176eab9ac2e10ba68597) Remember loaded files earlier to prevent race conditions, fixes [#501](https://github.com/dcodeIO/protobuf.js/issues/501)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4012a00a0578185d92fb6e7d3babd059fee6d6ab) Allow negative enum ids even if super inefficient (encodes as 10 bytes), fixes [#499](https://github.com/dcodeIO/protobuf.js/issues/499), fixes [#500](https://github.com/dcodeIO/protobuf.js/issues/500)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/96dd8f1729ad72e29dbe08dd01bc0ba08446dbe6) set resolvedResponseType on resolve(), fixes [#497](https://github.com/dcodeIO/protobuf.js/issues/497)
+
+## New
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/d3ae961765e193ec11227d96d699463de346423f) Initial take on runtime services, see [#507](https://github.com/dcodeIO/protobuf.js/issues/507)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/90cd46b3576ddb2d0a6fc6ae55da512db4be3acc) Include dist/ in npm package for frontend use
+
+## CLI
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/4affa1b7c0544229fb5f0d3948df6d832f6feadb) pbjs proto target field options, language-level compliance with jspb test.proto
+
+## Docs
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6a06e95222d741c47a51bcec85cd20317de7c0b0) always use Uint8Array in docs for tsd, see [#503](https://github.com/dcodeIO/protobuf.js/issues/503)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/637698316e095fc35f62a304daaca22654974966) Notes on dist files
+
+## Other
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/29ff3f10e367d6a2ae15fb4254f4073541559c65) Update eslint env
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/943be1749c7d37945c11d1ebffbed9112c528d9f) Browser field in package.json isn't required
\ No newline at end of file
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/LICENSE b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/LICENSE
new file mode 100644
index 00000000..57b7e309
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/LICENSE
@@ -0,0 +1,39 @@
+This license applies to all parts of protobuf.js except those files
+either explicitly including or referencing a different license or
+located in a directory containing a different LICENSE file.
+
+---
+
+Copyright (c) 2016, Daniel Wirtz 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 its author, 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
+OWNER 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.
+
+---
+
+Code generated by the command line utilities is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/README.md b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/README.md
new file mode 100644
index 00000000..9a918dc2
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/README.md
@@ -0,0 +1,909 @@
+
+
+
+**Protocol Buffers** are a language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more, originally designed at Google ([see](https://developers.google.com/protocol-buffers/)).
+
+**protobuf.js** is a pure JavaScript implementation with [TypeScript](https://www.typescriptlang.org) support for [node.js](https://nodejs.org) and the browser. It's easy to use, blazingly fast and works out of the box with [.proto](https://developers.google.com/protocol-buffers/docs/proto) files!
+
+Apollo GraphQL fork
+-------------------
+We have forked the [source repo](https://github.com/dcodeIO/protobuf.js) because we need to make changes to the package
+for use in Apollo Server.
+
+Version 1.0.0 was forked from `master` which contained version 6.8.8 plus a few unreleased commits. [sha](https://github.com/protobufjs/protobuf.js/commit/4d490eb1bf71f5c5c4c9d253a2ffd36edea12386)
+
+
+Contents
+--------
+
+* [Installation](#installation)
+ How to include protobuf.js in your project.
+
+* [Usage](#usage)
+ A brief introduction to using the toolset.
+
+ * [Valid Message](#valid-message)
+ * [Toolset](#toolset)
+
+* [Examples](#examples)
+ A few examples to get you started.
+
+ * [Using .proto files](#using-proto-files)
+ * [Using JSON descriptors](#using-json-descriptors)
+ * [Using reflection only](#using-reflection-only)
+ * [Using custom classes](#using-custom-classes)
+ * [Using services](#using-services)
+ * [Usage with TypeScript](#usage-with-typescript)
+
+* [Command line](#command-line)
+ How to use the command line utility.
+
+ * [pbjs for JavaScript](#pbjs-for-javascript)
+ * [pbts for TypeScript](#pbts-for-typescript)
+ * [Reflection vs. static code](#reflection-vs-static-code)
+ * [Command line API](#command-line-api)
+
+* [Additional documentation](#additional-documentation)
+ A list of available documentation resources.
+
+* [Performance](#performance)
+ A few internals and a benchmark on performance.
+
+* [Compatibility](#compatibility)
+ Notes on compatibility regarding browsers and optional libraries.
+
+* [Building](#building)
+ How to build the library and its components yourself.
+
+Installation
+---------------
+
+### node.js
+
+```
+$> npm install @apollo/protobufjs [--save --save-prefix=~]
+```
+
+```js
+var protobuf = require("@apollo/protobufjs");
+```
+
+**Note** that this library's versioning scheme is not semver-compatible for historical reasons. For guaranteed backward compatibility, always depend on `~6.A.B` instead of `^6.A.B` (hence the `--save-prefix` above).
+
+### Browsers
+
+Development:
+
+```
+
+```
+
+Production:
+
+```
+
+```
+
+**Remember** to replace the version tag with the exact [release](https://github.com/dcodeIO/protobuf.js/tags) your project depends upon.
+
+The library supports CommonJS and AMD loaders and also exports globally as `protobuf`.
+
+### Distributions
+
+Where bundle size is a factor, there are additional stripped-down versions of the [full library][dist-full] (~19kb gzipped) available that exclude certain functionality:
+
+* When working with JSON descriptors (i.e. generated by [pbjs](#pbjs-for-javascript)) and/or reflection only, see the [light library][dist-light] (~16kb gzipped) that excludes the parser. CommonJS entry point is:
+
+ ```js
+ var protobuf = require("@apollo/protobufjs/light");
+ ```
+
+* When working with statically generated code only, see the [minimal library][dist-minimal] (~6.5kb gzipped) that also excludes reflection. CommonJS entry point is:
+
+ ```js
+ var protobuf = require("@apollo/protobufjs/minimal");
+ ```
+
+[dist-full]: https://github.com/dcodeIO/protobuf.js/tree/master/dist
+[dist-light]: https://github.com/dcodeIO/protobuf.js/tree/master/dist/light
+[dist-minimal]: https://github.com/dcodeIO/protobuf.js/tree/master/dist/minimal
+
+Usage
+-----
+
+Because JavaScript is a dynamically typed language, protobuf.js introduces the concept of a **valid message** in order to provide the best possible [performance](#performance) (and, as a side product, proper typings):
+
+### Valid message
+
+> A valid message is an object (1) not missing any required fields and (2) exclusively composed of JS types understood by the wire format writer.
+
+There are two possible types of valid messages and the encoder is able to work with both of these for convenience:
+
+* **Message instances** (explicit instances of message classes with default values on their prototype) always (have to) satisfy the requirements of a valid message by design and
+* **Plain JavaScript objects** that just so happen to be composed in a way satisfying the requirements of a valid message as well.
+
+In a nutshell, the wire format writer understands the following types:
+
+| Field type | Expected JS type (create, encode) | Conversion (fromObject)
+|------------|-----------------------------------|------------------------
+| s-/u-/int32
s-/fixed32 | `number` (32 bit integer) | value | 0
if signed
`value >>> 0` if unsigned
+| s-/u-/int64
s-/fixed64 | `Long`-like (optimal)
`number` (53 bit integer) | `Long.fromValue(value)` with long.js
`parseInt(value, 10)` otherwise
+| float
double | `number` | `Number(value)`
+| bool | `boolean` | `Boolean(value)`
+| string | `string` | `String(value)`
+| bytes | `Uint8Array` (optimal)
`Buffer` (optimal under node)
`Array.` (8 bit integers) | `base64.decode(value)` if a `string`
`Object` with non-zero `.length` is assumed to be buffer-like
+| enum | `number` (32 bit integer) | Looks up the numeric id if a `string`
+| message | Valid message | `Message.fromObject(value)`
+
+* Explicit `undefined` and `null` are considered as not set if the field is optional.
+* Repeated fields are `Array.`.
+* Map fields are `Object.` with the key being the string representation of the respective value or an 8 characters long binary hash string for `Long`-likes.
+* Types marked as *optimal* provide the best performance because no conversion step (i.e. number to low and high bits or base64 string to buffer) is required.
+
+### Toolset
+
+With that in mind and again for performance reasons, each message class provides a distinct set of methods with each method doing just one thing. This avoids unnecessary assertions / redundant operations where performance is a concern but also forces a user to perform verification (of plain JavaScript objects that *might* just so happen to be a valid message) explicitly where necessary - for example when dealing with user input.
+
+**Note** that `Message` below refers to any message class.
+
+* **Message.verify**(message: `Object`): `null|string`
+ verifies that a **plain JavaScript object** satisfies the requirements of a valid message and thus can be encoded without issues. Instead of throwing, it returns the error message as a string, if any.
+
+ ```js
+ var payload = "invalid (not an object)";
+ var err = AwesomeMessage.verify(payload);
+ if (err)
+ throw Error(err);
+ ```
+
+* **Message.encode**(message: `Message|Object` [, writer: `Writer`]): `Writer`
+ encodes a **message instance** or valid **plain JavaScript object**. This method does not implicitly verify the message and it's up to the user to make sure that the payload is a valid message.
+
+ ```js
+ var buffer = AwesomeMessage.encode(message).finish();
+ ```
+
+* **Message.encodeDelimited**(message: `Message|Object` [, writer: `Writer`]): `Writer`
+ works like `Message.encode` but additionally prepends the length of the message as a varint.
+
+* **Message.decode**(reader: `Reader|Uint8Array`): `Message`
+ decodes a buffer to a **message instance**. If required fields are missing, it throws a `util.ProtocolError` with an `instance` property set to the so far decoded message. If the wire format is invalid, it throws an `Error`.
+
+ ```js
+ try {
+ var decodedMessage = AwesomeMessage.decode(buffer);
+ } catch (e) {
+ if (e instanceof protobuf.util.ProtocolError) {
+ // e.instance holds the so far decoded message with missing required fields
+ } else {
+ // wire format is invalid
+ }
+ }
+ ```
+
+* **Message.decodeDelimited**(reader: `Reader|Uint8Array`): `Message`
+ works like `Message.decode` but additionally reads the length of the message prepended as a varint.
+
+* **Message.create**(properties: `Object`): `Message`
+ creates a new **message instance** from a set of properties that satisfy the requirements of a valid message. Where applicable, it is recommended to prefer `Message.create` over `Message.fromObject` because it doesn't perform possibly redundant conversion.
+
+ ```js
+ var message = AwesomeMessage.create({ awesomeField: "AwesomeString" });
+ ```
+
+* **Message.fromObject**(object: `Object`): `Message`
+ converts any non-valid **plain JavaScript object** to a **message instance** using the conversion steps outlined within the table above.
+
+ ```js
+ var message = AwesomeMessage.fromObject({ awesomeField: 42 });
+ // converts awesomeField to a string
+ ```
+
+* **Message.toObject**(message: `Message` [, options: `ConversionOptions`]): `Object`
+ converts a **message instance** to an arbitrary **plain JavaScript object** for interoperability with other libraries or storage. The resulting plain JavaScript object *might* still satisfy the requirements of a valid message depending on the actual conversion options specified, but most of the time it does not.
+
+ ```js
+ var object = AwesomeMessage.toObject(message, {
+ enums: String, // enums as string names
+ longs: String, // longs as strings (requires long.js)
+ bytes: String, // bytes as base64 encoded strings
+ defaults: true, // includes default values
+ arrays: true, // populates empty arrays (repeated fields) even if defaults=false
+ objects: true, // populates empty objects (map fields) even if defaults=false
+ oneofs: true // includes virtual oneof fields set to the present field's name
+ });
+ ```
+
+For reference, the following diagram aims to display relationships between the different methods and the concept of a valid message:
+
+
+
+> In other words: `verify` indicates that calling `create` or `encode` directly on the plain object will [result in a valid message respectively] succeed. `fromObject`, on the other hand, does conversion from a broader range of plain objects to create valid messages. ([ref](https://github.com/dcodeIO/protobuf.js/issues/748#issuecomment-291925749))
+
+Examples
+--------
+
+### Using .proto files
+
+It is possible to load existing .proto files using the full library, which parses and compiles the definitions to ready to use (reflection-based) message classes:
+
+```protobuf
+// awesome.proto
+package awesomepackage;
+syntax = "proto3";
+
+message AwesomeMessage {
+ string awesome_field = 1; // becomes awesomeField
+}
+```
+
+```js
+protobuf.load("awesome.proto", function(err, root) {
+ if (err)
+ throw err;
+
+ // Obtain a message type
+ var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage");
+
+ // Exemplary payload
+ var payload = { awesomeField: "AwesomeString" };
+
+ // Verify the payload if necessary (i.e. when possibly incomplete or invalid)
+ var errMsg = AwesomeMessage.verify(payload);
+ if (errMsg)
+ throw Error(errMsg);
+
+ // Create a new message
+ var message = AwesomeMessage.create(payload); // or use .fromObject if conversion is necessary
+
+ // Encode a message to an Uint8Array (browser) or Buffer (node)
+ var buffer = AwesomeMessage.encode(message).finish();
+ // ... do something with buffer
+
+ // Decode an Uint8Array (browser) or Buffer (node) to a message
+ var message = AwesomeMessage.decode(buffer);
+ // ... do something with message
+
+ // If the application uses length-delimited buffers, there is also encodeDelimited and decodeDelimited.
+
+ // Maybe convert the message back to a plain object
+ var object = AwesomeMessage.toObject(message, {
+ longs: String,
+ enums: String,
+ bytes: String,
+ // see ConversionOptions
+ });
+});
+```
+
+Additionally, promise syntax can be used by omitting the callback, if preferred:
+
+```js
+protobuf.load("awesome.proto")
+ .then(function(root) {
+ ...
+ });
+```
+
+### Using JSON descriptors
+
+The library utilizes JSON descriptors that are equivalent to a .proto definition. For example, the following is identical to the .proto definition seen above:
+
+```json
+// awesome.json
+{
+ "nested": {
+ "AwesomeMessage": {
+ "fields": {
+ "awesomeField": {
+ "type": "string",
+ "id": 1
+ }
+ }
+ }
+ }
+}
+```
+
+JSON descriptors closely resemble the internal reflection structure:
+
+| Type (T) | Extends | Type-specific properties
+|--------------------|--------------------|-------------------------
+| *ReflectionObject* | | options
+| *Namespace* | *ReflectionObject* | nested
+| Root | *Namespace* | **nested**
+| Type | *Namespace* | **fields**
+| Enum | *ReflectionObject* | **values**
+| Field | *ReflectionObject* | rule, **type**, **id**
+| MapField | Field | **keyType**
+| OneOf | *ReflectionObject* | **oneof** (array of field names)
+| Service | *Namespace* | **methods**
+| Method | *ReflectionObject* | type, **requestType**, **responseType**, requestStream, responseStream
+
+* **Bold properties** are required. *Italic types* are abstract.
+* `T.fromJSON(name, json)` creates the respective reflection object from a JSON descriptor
+* `T#toJSON()` creates a JSON descriptor from the respective reflection object (its name is used as the key within the parent)
+
+Exclusively using JSON descriptors instead of .proto files enables the use of just the light library (the parser isn't required in this case).
+
+A JSON descriptor can either be loaded the usual way:
+
+```js
+protobuf.load("awesome.json", function(err, root) {
+ if (err) throw err;
+
+ // Continue at "Obtain a message type" above
+});
+```
+
+Or it can be loaded inline:
+
+```js
+var jsonDescriptor = require("./awesome.json"); // exemplary for node
+
+var root = protobuf.Root.fromJSON(jsonDescriptor);
+
+// Continue at "Obtain a message type" above
+```
+
+### Using reflection only
+
+Both the full and the light library include full reflection support. One could, for example, define the .proto definitions seen in the examples above using just reflection:
+
+```js
+...
+var Root = protobuf.Root,
+ Type = protobuf.Type,
+ Field = protobuf.Field;
+
+var AwesomeMessage = new Type("AwesomeMessage").add(new Field("awesomeField", 1, "string"));
+
+var root = new Root().define("awesomepackage").add(AwesomeMessage);
+
+// Continue at "Create a new message" above
+...
+```
+
+Detailed information on the reflection structure is available within the [API documentation](#additional-documentation).
+
+### Using custom classes
+
+Message classes can also be extended with custom functionality and it is also possible to register a custom constructor with a reflected message type:
+
+```js
+...
+
+// Define a custom constructor
+function AwesomeMessage(properties) {
+ // custom initialization code
+ ...
+}
+
+// Register the custom constructor with its reflected type (*)
+root.lookupType("awesomepackage.AwesomeMessage").ctor = AwesomeMessage;
+
+// Define custom functionality
+AwesomeMessage.customStaticMethod = function() { ... };
+AwesomeMessage.prototype.customInstanceMethod = function() { ... };
+
+// Continue at "Create a new message" above
+```
+
+(*) Besides referencing its reflected type through `AwesomeMessage.$type` and `AwesomeMesage#$type`, the respective custom class is automatically populated with:
+
+* `AwesomeMessage.create`
+* `AwesomeMessage.encode` and `AwesomeMessage.encodeDelimited`
+* `AwesomeMessage.decode` and `AwesomeMessage.decodeDelimited`
+* `AwesomeMessage.verify`
+* `AwesomeMessage.fromObject`, `AwesomeMessage.toObject` and `AwesomeMessage#toJSON`
+
+Afterwards, decoded messages of this type are `instanceof AwesomeMessage`.
+
+Alternatively, it is also possible to reuse and extend the internal constructor if custom initialization code is not required:
+
+```js
+...
+
+// Reuse the internal constructor
+var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage").ctor;
+
+// Define custom functionality
+AwesomeMessage.customStaticMethod = function() { ... };
+AwesomeMessage.prototype.customInstanceMethod = function() { ... };
+
+// Continue at "Create a new message" above
+```
+
+### Using services
+
+The library also supports consuming services but it doesn't make any assumptions about the actual transport channel. Instead, a user must provide a suitable RPC implementation, which is an asynchronous function that takes the reflected service method, the binary request and a node-style callback as its parameters:
+
+```js
+function rpcImpl(method, requestData, callback) {
+ // perform the request using an HTTP request or a WebSocket for example
+ var responseData = ...;
+ // and call the callback with the binary response afterwards:
+ callback(null, responseData);
+}
+```
+
+Below is a working example with a typescript implementation using grpc npm package.
+```ts
+const grpc = require('grpc')
+
+const Client = grpc.makeGenericClientConstructor({})
+const client = new Client(
+ grpcServerUrl,
+ grpc.credentials.createInsecure()
+)
+
+const rpcImpl = function(method, requestData, callback) {
+ client.makeUnaryRequest(
+ method.name,
+ arg => arg,
+ arg => arg,
+ requestData,
+ callback
+ )
+}
+```
+
+Example:
+
+```protobuf
+// greeter.proto
+syntax = "proto3";
+
+service Greeter {
+ rpc SayHello (HelloRequest) returns (HelloReply) {}
+}
+
+message HelloRequest {
+ string name = 1;
+}
+
+message HelloReply {
+ string message = 1;
+}
+```
+
+```js
+...
+var Greeter = root.lookup("Greeter");
+var greeter = Greeter.create(/* see above */ rpcImpl, /* request delimited? */ false, /* response delimited? */ false);
+
+greeter.sayHello({ name: 'you' }, function(err, response) {
+ console.log('Greeting:', response.message);
+});
+```
+
+Services also support promises:
+
+```js
+greeter.sayHello({ name: 'you' })
+ .then(function(response) {
+ console.log('Greeting:', response.message);
+ });
+```
+
+There is also an [example for streaming RPC](https://github.com/dcodeIO/protobuf.js/blob/master/examples/streaming-rpc.js).
+
+Note that the service API is meant for clients. Implementing a server-side endpoint pretty much always requires transport channel (i.e. http, websocket, etc.) specific code with the only common denominator being that it decodes and encodes messages.
+
+### Usage with TypeScript
+
+The library ships with its own [type definitions](https://github.com/dcodeIO/protobuf.js/blob/master/index.d.ts) and modern editors like [Visual Studio Code](https://code.visualstudio.com/) will automatically detect and use them for code completion.
+
+The npm package depends on [@types/node](https://www.npmjs.com/package/@types/node) because of `Buffer` and [@types/long](https://www.npmjs.com/package/@types/long) because of `Long`. If you are not building for node and/or not using long.js, it should be safe to exclude them manually.
+
+#### Using the JS API
+
+The API shown above works pretty much the same with TypeScript. However, because everything is typed, accessing fields on instances of dynamically generated message classes requires either using bracket-notation (i.e. `message["awesomeField"]`) or explicit casts. Alternatively, it is possible to use a [typings file generated for its static counterpart](#pbts-for-typescript).
+
+```ts
+import { load } from "@apollo/protobufjs"; // respectively "./node_modules/protobufjs"
+
+load("awesome.proto", function(err, root) {
+ if (err)
+ throw err;
+
+ // example code
+ const AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage");
+
+ let message = AwesomeMessage.create({ awesomeField: "hello" });
+ console.log(`message = ${JSON.stringify(message)}`);
+
+ let buffer = AwesomeMessage.encode(message).finish();
+ console.log(`buffer = ${Array.prototype.toString.call(buffer)}`);
+
+ let decoded = AwesomeMessage.decode(buffer);
+ console.log(`decoded = ${JSON.stringify(decoded)}`);
+});
+```
+
+#### Using generated static code
+
+If you generated static code to `bundle.js` using the CLI and its type definitions to `bundle.d.ts`, then you can just do:
+
+```ts
+import { AwesomeMessage } from "./bundle.js";
+
+// example code
+let message = AwesomeMessage.create({ awesomeField: "hello" });
+let buffer = AwesomeMessage.encode(message).finish();
+let decoded = AwesomeMessage.decode(buffer);
+```
+
+#### Using decorators
+
+The library also includes an early implementation of [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html).
+
+**Note** that decorators are an experimental feature in TypeScript and that declaration order is important depending on the JS target. For example, `@Field.d(2, AwesomeArrayMessage)` requires that `AwesomeArrayMessage` has been defined earlier when targeting `ES5`.
+
+```ts
+import { Message, Type, Field, OneOf } from "@apollo/protobufjs/light"; // respectively "./node_modules/protobufjs/light.js"
+
+export class AwesomeSubMessage extends Message {
+
+ @Field.d(1, "string")
+ public awesomeString: string;
+
+}
+
+export enum AwesomeEnum {
+ ONE = 1,
+ TWO = 2
+}
+
+@Type.d("SuperAwesomeMessage")
+export class AwesomeMessage extends Message {
+
+ @Field.d(1, "string", "optional", "awesome default string")
+ public awesomeField: string;
+
+ @Field.d(2, AwesomeSubMessage)
+ public awesomeSubMessage: AwesomeSubMessage;
+
+ @Field.d(3, AwesomeEnum, "optional", AwesomeEnum.ONE)
+ public awesomeEnum: AwesomeEnum;
+
+ @OneOf.d("awesomeSubMessage", "awesomeEnum")
+ public which: string;
+
+}
+
+// example code
+let message = new AwesomeMessage({ awesomeField: "hello" });
+let buffer = AwesomeMessage.encode(message).finish();
+let decoded = AwesomeMessage.decode(buffer);
+```
+
+Supported decorators are:
+
+* **Type.d(typeName?: `string`)** *(optional)*
+ annotates a class as a protobuf message type. If `typeName` is not specified, the constructor's runtime function name is used for the reflected type.
+
+* **Field.d<T>(fieldId: `number`, fieldType: `string | Constructor`, fieldRule?: `"optional" | "required" | "repeated"`, defaultValue?: `T`)**
+ annotates a property as a protobuf field with the specified id and protobuf type.
+
+* **MapField.d<T extends { [key: string]: any }>(fieldId: `number`, fieldKeyType: `string`, fieldValueType. `string | Constructor<{}>`)**
+ annotates a property as a protobuf map field with the specified id, protobuf key and value type.
+
+* **OneOf.d<T extends string>(...fieldNames: `string[]`)**
+ annotates a property as a protobuf oneof covering the specified fields.
+
+Other notes:
+
+* Decorated types reside in `protobuf.roots["decorated"]` using a flat structure, so no duplicate names.
+* Enums are copied to a reflected enum with a generic name on decorator evaluation because referenced enum objects have no runtime name the decorator could use.
+* Default values must be specified as arguments to the decorator instead of using a property initializer for proper prototype behavior.
+* Property names on decorated classes must not be renamed on compile time (i.e. by a minifier) because decorators just receive the original field name as a string.
+
+**ProTip!** Not as pretty, but you can [use decorators in plain JavaScript](https://github.com/dcodeIO/protobuf.js/blob/master/examples/js-decorators.js) as well.
+
+Command line
+------------
+
+**Note** that moving the CLI to [its own package](./cli) is a work in progress. At the moment, it's still part of the main package.
+
+The command line interface (CLI) can be used to translate between file formats and to generate static code as well as TypeScript definitions.
+
+### pbjs for JavaScript
+
+```
+Translates between file formats and generates static code.
+
+ -t, --target Specifies the target format. Also accepts a path to require a custom target.
+
+ json JSON representation
+ json-module JSON representation as a module
+ proto2 Protocol Buffers, Version 2
+ proto3 Protocol Buffers, Version 3
+ static Static code without reflection (non-functional on its own)
+ static-module Static code without reflection as a module
+
+ -p, --path Adds a directory to the include path.
+
+ -o, --out Saves to a file instead of writing to stdout.
+
+ --sparse Exports only those types referenced from a main file (experimental).
+
+ Module targets only:
+
+ -w, --wrap Specifies the wrapper to use. Also accepts a path to require a custom wrapper.
+
+ default Default wrapper supporting both CommonJS and AMD
+ commonjs CommonJS wrapper
+ amd AMD wrapper
+ es6 ES6 wrapper (implies --es6)
+ closure A closure adding to protobuf.roots where protobuf is a global
+
+ -r, --root Specifies an alternative protobuf.roots name.
+
+ -l, --lint Linter configuration. Defaults to protobuf.js-compatible rules:
+
+ eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins
+
+ --es6 Enables ES6 syntax (const/let instead of var)
+
+ Proto sources only:
+
+ --keep-case Keeps field casing instead of converting to camel case.
+
+ Static targets only:
+
+ --no-create Does not generate create functions used for reflection compatibility.
+ --no-encode Does not generate encode functions.
+ --no-decode Does not generate decode functions.
+ --no-verify Does not generate verify functions.
+ --no-convert Does not generate convert functions like from/toObject
+ --no-delimited Does not generate delimited encode/decode functions.
+ --no-beautify Does not beautify generated code.
+ --no-comments Does not output any JSDoc comments.
+
+ --force-long Enforces the use of 'Long' for s-/u-/int64 and s-/fixed64 fields.
+ --force-number Enforces the use of 'number' for s-/u-/int64 and s-/fixed64 fields.
+ --force-message Enforces the use of message instances instead of plain objects.
+
+usage: pbjs [options] file1.proto file2.json ... (or pipe) other | pbjs [options] -
+```
+
+For production environments it is recommended to bundle all your .proto files to a single .json file, which minimizes the number of network requests and avoids any parser overhead (hint: works with just the **light** library):
+
+```
+$> pbjs -t json file1.proto file2.proto > bundle.json
+```
+
+Now, either include this file in your final bundle:
+
+```js
+var root = protobuf.Root.fromJSON(require("./bundle.json"));
+```
+
+or load it the usual way:
+
+```js
+protobuf.load("bundle.json", function(err, root) {
+ ...
+});
+```
+
+Generated static code, on the other hand, works with just the **minimal** library. For example
+
+```
+$> pbjs -t static-module -w commonjs -o compiled.js file1.proto file2.proto
+```
+
+will generate static code for definitions within `file1.proto` and `file2.proto` to a CommonJS module `compiled.js`.
+
+**ProTip!** Documenting your .proto files with `/** ... */`-blocks or (trailing) `/// ...` lines translates to generated static code.
+
+
+### pbts for TypeScript
+
+```
+Generates TypeScript definitions from annotated JavaScript files.
+
+ -o, --out Saves to a file instead of writing to stdout.
+
+ -g, --global Name of the global object in browser environments, if any.
+
+ --no-comments Does not output any JSDoc comments.
+
+ Internal flags:
+
+ -n, --name Wraps everything in a module of the specified name.
+
+ -m, --main Whether building the main library without any imports.
+
+usage: pbts [options] file1.js file2.js ... (or) other | pbts [options] -
+```
+
+Picking up on the example above, the following not only generates static code to a CommonJS module `compiled.js` but also its respective TypeScript definitions to `compiled.d.ts`:
+
+```
+$> pbjs -t static-module -w commonjs -o compiled.js file1.proto file2.proto
+$> pbts -o compiled.d.ts compiled.js
+```
+
+Additionally, TypeScript definitions of static modules are compatible with their reflection-based counterparts (i.e. as exported by JSON modules), as long as the following conditions are met:
+
+1. Instead of using `new SomeMessage(...)`, always use `SomeMessage.create(...)` because reflection objects do not provide a constructor.
+2. Types, services and enums must start with an uppercase letter to become available as properties of the reflected types as well (i.e. to be able to use `MyMessage.MyEnum` instead of `root.lookup("MyMessage.MyEnum")`).
+
+For example, the following generates a JSON module `bundle.js` and a `bundle.d.ts`, but no static code:
+
+```
+$> pbjs -t json-module -w commonjs -o bundle.js file1.proto file2.proto
+$> pbjs -t static-module file1.proto file2.proto | pbts -o bundle.d.ts -
+```
+
+### Reflection vs. static code
+
+While using .proto files directly requires the full library respectively pure reflection/JSON the light library, pretty much all code but the relatively short descriptors is shared.
+
+Static code, on the other hand, requires just the minimal library, but generates additional source code without any reflection features. This also implies that there is a break-even point where statically generated code becomes larger than descriptor-based code once the amount of code generated exceeds the size of the full respectively light library.
+
+There is no significant difference performance-wise as the code generated statically is pretty much the same as generated at runtime and both are largely interchangeable as seen in the previous section.
+
+| Source | Library | Advantages | Tradeoffs
+|--------|---------|------------|-----------
+| .proto | full | Easily editable
Interoperability with other libraries
No compile step | Some parsing and possibly network overhead
+| JSON | light | Easily editable
No parsing overhead
Single bundle (no network overhead) | protobuf.js specific
Has a compile step
+| static | minimal | Works where `eval` access is restricted
Fully documented
Small footprint for small protos | Can be hard to edit
No reflection
Has a compile step
+
+### Command line API
+
+Both utilities can be used programmatically by providing command line arguments and a callback to their respective `main` functions:
+
+```js
+var pbjs = require("@apollo/protobufjs/cli/pbjs"); // or require("@apollo/protobufjs/cli").pbjs / .pbts
+
+pbjs.main([ "--target", "json-module", "path/to/myproto.proto" ], function(err, output) {
+ if (err)
+ throw err;
+ // do something with output
+});
+```
+
+Additional documentation
+------------------------
+
+#### Protocol Buffers
+* [Google's Developer Guide](https://developers.google.com/protocol-buffers/docs/overview)
+
+#### protobuf.js
+* [API Documentation](https://protobufjs.github.io/protobuf.js)
+* [CHANGELOG](https://github.com/dcodeIO/protobuf.js/blob/master/CHANGELOG.md)
+* [Frequently asked questions](https://github.com/dcodeIO/protobuf.js/wiki) on our wiki
+
+#### Community
+* [Questions and answers](http://stackoverflow.com/search?tab=newest&q=protobuf.js) on StackOverflow
+
+Performance
+-----------
+The package includes a benchmark that compares protobuf.js performance to native JSON (as far as this is possible) and [Google's JS implementation](https://github.com/google/protobuf/tree/master/js). On an i7-2600K running node 6.9.1 it yields:
+
+```
+benchmarking encoding performance ...
+
+protobuf.js (reflect) x 541,707 ops/sec ±1.13% (87 runs sampled)
+protobuf.js (static) x 548,134 ops/sec ±1.38% (89 runs sampled)
+JSON (string) x 318,076 ops/sec ±0.63% (93 runs sampled)
+JSON (buffer) x 179,165 ops/sec ±2.26% (91 runs sampled)
+google-protobuf x 74,406 ops/sec ±0.85% (86 runs sampled)
+
+ protobuf.js (static) was fastest
+ protobuf.js (reflect) was 0.9% ops/sec slower (factor 1.0)
+ JSON (string) was 41.5% ops/sec slower (factor 1.7)
+ JSON (buffer) was 67.6% ops/sec slower (factor 3.1)
+ google-protobuf was 86.4% ops/sec slower (factor 7.3)
+
+benchmarking decoding performance ...
+
+protobuf.js (reflect) x 1,383,981 ops/sec ±0.88% (93 runs sampled)
+protobuf.js (static) x 1,378,925 ops/sec ±0.81% (93 runs sampled)
+JSON (string) x 302,444 ops/sec ±0.81% (93 runs sampled)
+JSON (buffer) x 264,882 ops/sec ±0.81% (93 runs sampled)
+google-protobuf x 179,180 ops/sec ±0.64% (94 runs sampled)
+
+ protobuf.js (reflect) was fastest
+ protobuf.js (static) was 0.3% ops/sec slower (factor 1.0)
+ JSON (string) was 78.1% ops/sec slower (factor 4.6)
+ JSON (buffer) was 80.8% ops/sec slower (factor 5.2)
+ google-protobuf was 87.0% ops/sec slower (factor 7.7)
+
+benchmarking combined performance ...
+
+protobuf.js (reflect) x 275,900 ops/sec ±0.78% (90 runs sampled)
+protobuf.js (static) x 290,096 ops/sec ±0.96% (90 runs sampled)
+JSON (string) x 129,381 ops/sec ±0.77% (90 runs sampled)
+JSON (buffer) x 91,051 ops/sec ±0.94% (90 runs sampled)
+google-protobuf x 42,050 ops/sec ±0.85% (91 runs sampled)
+
+ protobuf.js (static) was fastest
+ protobuf.js (reflect) was 4.7% ops/sec slower (factor 1.0)
+ JSON (string) was 55.3% ops/sec slower (factor 2.2)
+ JSON (buffer) was 68.6% ops/sec slower (factor 3.2)
+ google-protobuf was 85.5% ops/sec slower (factor 6.9)
+```
+
+These results are achieved by
+
+* generating type-specific encoders, decoders, verifiers and converters at runtime
+* configuring the reader/writer interface according to the environment
+* using node-specific functionality where beneficial and, of course
+* avoiding unnecessary operations through splitting up [the toolset](#toolset).
+
+You can also run [the benchmark](https://github.com/dcodeIO/protobuf.js/blob/master/bench/index.js) ...
+
+```
+$> npm run bench
+```
+
+and [the profiler](https://github.com/dcodeIO/protobuf.js/blob/master/bench/prof.js) yourself (the latter requires a recent version of node):
+
+```
+$> npm run prof [iterations=10000000]
+```
+
+Note that as of this writing, the benchmark suite performs significantly slower on node 7.2.0 compared to 6.9.1 because moths.
+
+Compatibility
+-------------
+
+* Works in all modern and not-so-modern browsers except IE8.
+* Because the internals of this package do not rely on `google/protobuf/descriptor.proto`, options are parsed and presented literally.
+* If typed arrays are not supported by the environment, plain arrays will be used instead.
+* Support for pre-ES5 environments (except IE8) can be achieved by [using a polyfill](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/polyfill.js).
+* Support for [Content Security Policy](https://w3c.github.io/webappsec-csp/)-restricted environments (like Chrome extensions without [unsafe-eval](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval)) can be achieved by generating and using static code instead.
+* If a proper way to work with 64 bit values (uint64, int64 etc.) is required, just install [long.js](https://github.com/dcodeIO/long.js) alongside this library. All 64 bit numbers will then be returned as a `Long` instance instead of a possibly unsafe JavaScript number ([see](https://github.com/dcodeIO/long.js)).
+* For descriptor.proto interoperability, see [ext/descriptor](https://github.com/dcodeIO/protobuf.js/tree/master/ext/descriptor)
+
+Building
+--------
+
+To build the library or its components yourself, clone it from GitHub and install the development dependencies:
+
+```
+$> git clone https://github.com/dcodeIO/protobuf.js.git
+$> cd protobuf.js
+$> npm install
+```
+
+Building the respective development and production versions with their respective source maps to `dist/`:
+
+```
+$> npm run build
+```
+
+Building the documentation to `docs/`:
+
+```
+$> npm run docs
+```
+
+Building the TypeScript definition to `index.d.ts`:
+
+```
+$> npm run types
+```
+
+### Browserify integration
+
+By default, protobuf.js integrates into any browserify build-process without requiring any optional modules. Hence:
+
+* If int64 support is required, explicitly require the `long` module somewhere in your project as it will be excluded otherwise. This assumes that a global `require` function is present that protobuf.js can call to obtain the long module.
+
+ If there is no global `require` function present after bundling, it's also possible to assign the long module programmatically:
+
+ ```js
+ var Long = ...;
+
+ protobuf.util.Long = Long;
+ protobuf.configure();
+ ```
+
+* If you have any special requirements, there is [the bundler](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/bundle.js) for reference.
+
+**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause)
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/bin/pbjs b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/bin/pbjs
new file mode 100755
index 00000000..6a5d49ad
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/bin/pbjs
@@ -0,0 +1,6 @@
+#!/usr/bin/env node
+var path = require("path"),
+ cli = require(path.join(__dirname, "..", "cli", "pbjs.js"));
+var ret = cli.main(process.argv.slice(2));
+if (typeof ret === 'number')
+ process.exit(ret);
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/bin/pbts b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/bin/pbts
new file mode 100755
index 00000000..cb1cdaf5
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/bin/pbts
@@ -0,0 +1,6 @@
+#!/usr/bin/env node
+var path = require("path"),
+ cli = require(path.join(__dirname, "..", "cli", "pbts.js"));
+var ret = cli.main(process.argv.slice(2));
+if (typeof ret === 'number')
+ process.exit(ret);
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/LICENSE b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/LICENSE
new file mode 100644
index 00000000..e5f7a5c9
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/LICENSE
@@ -0,0 +1,33 @@
+Copyright (c) 2016, Daniel Wirtz 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 its author, 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
+OWNER 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.
+
+---
+
+Code generated by the command line utilities is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/README.md b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/README.md
new file mode 100644
index 00000000..1eb4c868
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/README.md
@@ -0,0 +1,11 @@
+protobufjs-cli
+==============
+[![npm](https://img.shields.io/npm/v/protobufjscli.svg)](https://www.npmjs.com/package/protobufjs-cli)
+
+Command line interface (CLI) for [protobuf.js](https://github.com/dcodeIO/protobuf.js). Translates between file formats and generates static code as well as TypeScript definitions.
+
+* [CLI Documentation](https://github.com/dcodeIO/protobuf.js#command-line)
+
+**Note** that moving the CLI to its own package is a work in progress. At the moment, it's still part of the main package.
+
+**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause)
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/bin/pbjs b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/bin/pbjs
new file mode 100644
index 00000000..9bfedb31
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/bin/pbjs
@@ -0,0 +1,6 @@
+#!/usr/bin/env node
+var path = require("path"),
+ cli = require(path.join(__dirname, "..", "pbjs.js"));
+var ret = cli.main(process.argv.slice(2));
+if (typeof ret === 'number')
+ process.exit(ret);
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/bin/pbts b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/bin/pbts
new file mode 100644
index 00000000..48d392c3
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/bin/pbts
@@ -0,0 +1,6 @@
+#!/usr/bin/env node
+var path = require("path"),
+ cli = require(path.join(__dirname, "..", "pbts.js"));
+var ret = cli.main(process.argv.slice(2));
+if (typeof ret === 'number')
+ process.exit(ret);
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/index.d.ts b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/index.d.ts
new file mode 100644
index 00000000..09c20269
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/index.d.ts
@@ -0,0 +1,3 @@
+import * as pbjs from "./pbjs.js";
+import * as pbts from "./pbts.js";
+export { pbjs, pbts };
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/index.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/index.js
new file mode 100644
index 00000000..c565aa6f
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/index.js
@@ -0,0 +1,3 @@
+"use strict";
+exports.pbjs = require("./pbjs");
+exports.pbts = require("./pbts");
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc.json b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc.json
new file mode 100644
index 00000000..b5fe1d90
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc.json
@@ -0,0 +1,18 @@
+{
+ "tags": {
+ "allowUnknownTags": false
+ },
+ "plugins": [
+ "./tsd-jsdoc/plugin"
+ ],
+ "opts": {
+ "encoding" : "utf8",
+ "recurse" : true,
+ "lenient" : true,
+ "template" : "./tsd-jsdoc",
+
+ "private" : false,
+ "comments" : true,
+ "destination" : false
+ }
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/LICENSE b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/LICENSE
new file mode 100644
index 00000000..e5aebc9f
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2016 Chad Engler
+
+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/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/README.md b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/README.md
new file mode 100644
index 00000000..beed748f
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/README.md
@@ -0,0 +1,23 @@
+protobuf.js fork of tsd-jsdoc
+=============================
+
+This is a modified version of [tsd-jsdoc](https://github.com/englercj/tsd-jsdoc) v1.0.1 for use with protobuf.js, parked here so we can process issues and pull requests. The ultimate goal is to switch back to the a recent version of tsd-jsdoc once it meets our needs.
+
+Options
+-------
+
+* **module: `string`**
+ Wraps everything in a module of the specified name.
+
+* **private: `boolean`**
+ Includes private members when set to `true`.
+
+* **comments: `boolean`**
+ Skips comments when explicitly set to `false`.
+
+* **destination: `string|boolean`**
+ Saves to the specified destination file or to console when set to `false`.
+
+Setting options on the command line
+-----------------------------------
+Providing `-q, --query ` on the command line will set respectively override existing options. Example: `-q module=protobufjs`
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/plugin.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/plugin.js
new file mode 100644
index 00000000..1bf4f42f
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/plugin.js
@@ -0,0 +1,21 @@
+"use strict";
+exports.defineTags = function(dictionary) {
+
+ dictionary.defineTag("template", {
+ mustHaveValue: true,
+ canHaveType: false,
+ canHaveName: false,
+ onTagged: function(doclet, tag) {
+ (doclet.templates || (doclet.templates = [])).push(tag.text);
+ }
+ });
+
+ dictionary.defineTag("tstype", {
+ mustHaveValue: true,
+ canHaveType: false,
+ canHaveName: false,
+ onTagged: function(doclet, tag) {
+ doclet.tsType = tag.text;
+ }
+ });
+};
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/publish.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/publish.js
new file mode 100644
index 00000000..47be4e56
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/lib/tsd-jsdoc/publish.js
@@ -0,0 +1,693 @@
+"use strict";
+
+var fs = require("fs");
+
+// output stream
+var out = null;
+
+// documentation data
+var data = null;
+
+// already handled objects, by name
+var seen = {};
+
+// indentation level
+var indent = 0;
+
+// whether indent has been written for the current line yet
+var indentWritten = false;
+
+// provided options
+var options = {};
+
+// queued interfaces
+var queuedInterfaces = [];
+
+// whether writing the first line
+var firstLine = true;
+
+// JSDoc hook
+exports.publish = function publish(taffy, opts) {
+ options = opts || {};
+
+ // query overrides options
+ if (options.query)
+ Object.keys(options.query).forEach(function(key) {
+ if (key !== "query")
+ switch (options[key] = options.query[key]) {
+ case "true":
+ options[key] = true;
+ break;
+ case "false":
+ options[key] = false;
+ break;
+ case "null":
+ options[key] = null;
+ break;
+ }
+ });
+
+ // remove undocumented
+ taffy({ undocumented: true }).remove();
+ taffy({ ignore: true }).remove();
+ taffy({ inherited: true }).remove();
+
+ // remove private
+ if (!options.private)
+ taffy({ access: "private" }).remove();
+
+ // setup output
+ out = options.destination
+ ? fs.createWriteStream(options.destination)
+ : process.stdout;
+
+ try {
+ // setup environment
+ data = taffy().get();
+ indent = 0;
+ indentWritten = false;
+ firstLine = true;
+
+ // wrap everything in a module if configured
+ if (options.module) {
+ writeln("export = ", options.module, ";");
+ writeln();
+ writeln("declare namespace ", options.module, " {");
+ writeln();
+ ++indent;
+ }
+
+ // handle all
+ getChildrenOf(undefined).forEach(function(child) {
+ handleElement(child, null);
+ });
+
+ // process queued
+ while (queuedInterfaces.length) {
+ var element = queuedInterfaces.shift();
+ begin(element);
+ writeInterface(element);
+ writeln(";");
+ }
+
+ // end wrap
+ if (options.module) {
+ --indent;
+ writeln("}");
+ }
+
+ // close file output
+ if (out !== process.stdout)
+ out.end();
+
+ } finally {
+ // gc environment objects
+ out = data = null;
+ seen = options = {};
+ queuedInterfaces = [];
+ }
+};
+
+//
+// Utility
+//
+
+// writes one or multiple strings
+function write() {
+ var s = Array.prototype.slice.call(arguments).join("");
+ if (!indentWritten) {
+ for (var i = 0; i < indent; ++i)
+ s = " " + s;
+ indentWritten = true;
+ }
+ out.write(s);
+ firstLine = false;
+}
+
+// writes zero or multiple strings, followed by a new line
+function writeln() {
+ var s = Array.prototype.slice.call(arguments).join("");
+ if (s.length)
+ write(s, "\n");
+ else if (!firstLine)
+ out.write("\n");
+ indentWritten = false;
+}
+
+var keepTags = [
+ "param",
+ "returns",
+ "throws",
+ "see"
+];
+
+// parses a comment into text and tags
+function parseComment(comment) {
+ var lines = comment.replace(/^ *\/\*\* *|^ *\*\/| *\*\/ *$|^ *\* */mg, "").trim().split(/\r?\n|\r/g); // property.description has just "\r" ?!
+ var desc;
+ var text = [];
+ var tags = null;
+ for (var i = 0; i < lines.length; ++i) {
+ var match = /^@(\w+)\b/.exec(lines[i]);
+ if (match) {
+ if (!tags) {
+ tags = [];
+ desc = text;
+ }
+ text = [];
+ tags.push({ name: match[1], text: text });
+ lines[i] = lines[i].substring(match[1].length + 1).trim();
+ }
+ if (lines[i].length || text.length)
+ text.push(lines[i]);
+ }
+ return {
+ text: desc || text,
+ tags: tags || []
+ };
+}
+
+// writes a comment
+function writeComment(comment, otherwiseNewline) {
+ if (!comment || options.comments === false) {
+ if (otherwiseNewline)
+ writeln();
+ return;
+ }
+ if (typeof comment !== "object")
+ comment = parseComment(comment);
+ comment.tags = comment.tags.filter(function(tag) {
+ return keepTags.indexOf(tag.name) > -1 && (tag.name !== "returns" || tag.text[0] !== "{undefined}");
+ });
+ writeln();
+ if (!comment.tags.length && comment.text.length < 2) {
+ writeln("/** " + comment.text[0] + " */");
+ return;
+ }
+ writeln("/**");
+ comment.text.forEach(function(line) {
+ if (line.length)
+ writeln(" * ", line);
+ else
+ writeln(" *");
+ });
+ comment.tags.forEach(function(tag) {
+ var started = false;
+ if (tag.text.length) {
+ tag.text.forEach(function(line, i) {
+ if (i > 0)
+ write(" * ");
+ else if (tag.name !== "throws")
+ line = line.replace(/^\{[^\s]*} ?/, "");
+ if (!line.length)
+ return;
+ if (!started) {
+ write(" * @", tag.name, " ");
+ started = true;
+ }
+ writeln(line);
+ });
+ }
+ });
+ writeln(" */");
+}
+
+// recursively replaces all occurencies of re's match
+function replaceRecursive(name, re, fn) {
+ var found;
+
+ function replacer() {
+ found = true;
+ return fn.apply(null, arguments);
+ }
+
+ do {
+ found = false;
+ name = name.replace(re, replacer);
+ } while (found);
+ return name;
+}
+
+// tests if an element is considered to be a class or class-like
+function isClassLike(element) {
+ return isClass(element) || isInterface(element);
+}
+
+// tests if an element is considered to be a class
+function isClass(element) {
+ return element && element.kind === "class";
+}
+
+// tests if an element is considered to be an interface
+function isInterface(element) {
+ return element && (element.kind === "interface" || element.kind === "mixin");
+}
+
+// tests if an element is considered to be a namespace
+function isNamespace(element) {
+ return element && (element.kind === "namespace" || element.kind === "module");
+}
+
+// gets all children of the specified parent
+function getChildrenOf(parent) {
+ var memberof = parent ? parent.longname : undefined;
+ return data.filter(function(element) {
+ return element.memberof === memberof;
+ });
+}
+
+// gets the literal type of an element
+function getTypeOf(element) {
+ if (element.tsType)
+ return element.tsType.replace(/\r?\n|\r/g, "\n");
+ var name = "any";
+ var type = element.type;
+ if (type && type.names && type.names.length) {
+ if (type.names.length === 1)
+ name = element.type.names[0].trim();
+ else
+ name = "(" + element.type.names.join("|") + ")";
+ } else
+ return name;
+
+ // Replace catchalls with any
+ name = name.replace(/\*|\bmixed\b/g, "any");
+
+ // Ensure upper case Object for map expressions below
+ name = name.replace(/\bobject\b/g, "Object");
+
+ // Correct Something. to Something
+ name = replaceRecursive(name, /\b(?!Object|Array)([\w$]+)\.<([^>]*)>/gi, function($0, $1, $2) {
+ return $1 + "<" + $2 + ">";
+ });
+
+ // Replace Array. with string[]
+ name = replaceRecursive(name, /\bArray\.?<([^>]*)>/gi, function($0, $1) {
+ return $1 + "[]";
+ });
+
+ // Replace Object. with { [k: string]: number }
+ name = replaceRecursive(name, /\bObject\.?<([^,]*), *([^>]*)>/gi, function($0, $1, $2) {
+ return "{ [k: " + $1 + "]: " + $2 + " }";
+ });
+
+ // Replace functions (there are no signatures) with Function
+ name = name.replace(/\bfunction(?:\(\))?\b/g, "Function");
+
+ // Convert plain Object back to just object
+ name = name.replace(/\b(Object\b(?!\.))/g, function($0, $1) {
+ return $1.toLowerCase();
+ });
+
+ return name;
+}
+
+// begins writing the definition of the specified element
+function begin(element, is_interface) {
+ if (!seen[element.longname]) {
+ if (isClass(element)) {
+ var comment = parseComment(element.comment);
+ var classdesc = comment.tags.find(function(tag) { return tag.name === "classdesc"; });
+ if (classdesc) {
+ comment.text = classdesc.text;
+ comment.tags = [];
+ }
+ writeComment(comment, true);
+ } else
+ writeComment(element.comment, is_interface || isClassLike(element) || isNamespace(element) || element.isEnum || element.scope === "global");
+ seen[element.longname] = element;
+ } else
+ writeln();
+ if (element.scope !== "global" || options.module)
+ return;
+ write("export ");
+}
+
+// writes the function signature describing element
+function writeFunctionSignature(element, isConstructor, isTypeDef) {
+ write("(");
+
+ var params = {};
+
+ // this type
+ if (element.this)
+ params["this"] = {
+ type: element.this.replace(/^{|}$/g, ""),
+ optional: false
+ };
+
+ // parameter types
+ if (element.params)
+ element.params.forEach(function(param) {
+ var path = param.name.split(/\./g);
+ if (path.length === 1)
+ params[param.name] = {
+ type: getTypeOf(param),
+ variable: param.variable === true,
+ optional: param.optional === true,
+ defaultValue: param.defaultvalue // Not used yet (TODO)
+ };
+ else // Property syntax (TODO)
+ params[path[0]].type = "{ [k: string]: any }";
+ });
+
+ var paramNames = Object.keys(params);
+ paramNames.forEach(function(name, i) {
+ var param = params[name];
+ var type = param.type;
+ if (param.variable) {
+ name = "..." + name;
+ type = param.type.charAt(0) === "(" ? "any[]" : param.type + "[]";
+ }
+ write(name, !param.variable && param.optional ? "?: " : ": ", type);
+ if (i < paramNames.length - 1)
+ write(", ");
+ });
+
+ write(")");
+
+ // return type
+ if (!isConstructor) {
+ write(isTypeDef ? " => " : ": ");
+ var typeName;
+ if (element.returns && element.returns.length && (typeName = getTypeOf(element.returns[0])) !== "undefined")
+ write(typeName);
+ else
+ write("void");
+ }
+}
+
+// writes (a typedef as) an interface
+function writeInterface(element) {
+ write("interface ", element.name);
+ writeInterfaceBody(element);
+ writeln();
+}
+
+function writeInterfaceBody(element) {
+ writeln("{");
+ ++indent;
+ if (element.tsType)
+ writeln(element.tsType.replace(/\r?\n|\r/g, "\n"));
+ else if (element.properties && element.properties.length)
+ element.properties.forEach(writeProperty);
+ --indent;
+ write("}");
+}
+
+function writeProperty(property, declare) {
+ writeComment(property.description);
+ if (declare)
+ write("let ");
+ write(property.name);
+ if (property.optional)
+ write("?");
+ writeln(": ", getTypeOf(property), ";");
+}
+
+//
+// Handlers
+//
+
+// handles a single element of any understood type
+function handleElement(element, parent) {
+ if (element.scope === "inner")
+ return false;
+
+ if (element.optional !== true && element.type && element.type.names && element.type.names.length) {
+ for (var i = 0; i < element.type.names.length; i++) {
+ if (element.type.names[i].toLowerCase() === "undefined") {
+ // This element is actually optional. Set optional to true and
+ // remove the 'undefined' type
+ element.optional = true;
+ element.type.names.splice(i, 1);
+ i--;
+ }
+ }
+ }
+
+ if (seen[element.longname])
+ return true;
+ if (isClassLike(element))
+ handleClass(element, parent);
+ else switch (element.kind) {
+ case "module":
+ case "namespace":
+ handleNamespace(element, parent);
+ break;
+ case "constant":
+ case "member":
+ handleMember(element, parent);
+ break;
+ case "function":
+ handleFunction(element, parent);
+ break;
+ case "typedef":
+ handleTypeDef(element, parent);
+ break;
+ case "package":
+ break;
+ }
+ seen[element.longname] = element;
+ return true;
+}
+
+// handles (just) a namespace
+function handleNamespace(element/*, parent*/) {
+ var children = getChildrenOf(element);
+ if (!children.length)
+ return;
+ var first = true;
+ if (element.properties)
+ element.properties.forEach(function(property) {
+ if (!/^[$\w]+$/.test(property.name)) // incompatible in namespace
+ return;
+ if (first) {
+ begin(element);
+ writeln("namespace ", element.name, " {");
+ ++indent;
+ first = false;
+ }
+ writeProperty(property, true);
+ });
+ children.forEach(function(child) {
+ if (child.scope === "inner" || seen[child.longname])
+ return;
+ if (first) {
+ begin(element);
+ writeln("namespace ", element.name, " {");
+ ++indent;
+ first = false;
+ }
+ handleElement(child, element);
+ });
+ if (!first) {
+ --indent;
+ writeln("}");
+ }
+}
+
+// a filter function to remove any module references
+function notAModuleReference(ref) {
+ return ref.indexOf("module:") === -1;
+}
+
+// handles a class or class-like
+function handleClass(element, parent) {
+ var is_interface = isInterface(element);
+ begin(element, is_interface);
+ if (is_interface)
+ write("interface ");
+ else {
+ if (element.virtual)
+ write("abstract ");
+ write("class ");
+ }
+ write(element.name);
+ if (element.templates && element.templates.length)
+ write("<", element.templates.join(", "), ">");
+ write(" ");
+
+ // extended classes
+ if (element.augments) {
+ var augments = element.augments.filter(notAModuleReference);
+ if (augments.length)
+ write("extends ", augments[0], " ");
+ }
+
+ // implemented interfaces
+ var impls = [];
+ if (element.implements)
+ Array.prototype.push.apply(impls, element.implements);
+ if (element.mixes)
+ Array.prototype.push.apply(impls, element.mixes);
+ impls = impls.filter(notAModuleReference);
+ if (impls.length)
+ write("implements ", impls.join(", "), " ");
+
+ writeln("{");
+ ++indent;
+
+ if (element.tsType)
+ writeln(element.tsType.replace(/\r?\n|\r/g, "\n"));
+
+ // constructor
+ if (!is_interface && !element.virtual)
+ handleFunction(element, parent, true);
+
+ // properties
+ if (is_interface && element.properties)
+ element.properties.forEach(function(property) {
+ writeProperty(property);
+ });
+
+ // class-compatible members
+ var incompatible = [];
+ getChildrenOf(element).forEach(function(child) {
+ if (isClassLike(child) || child.kind === "module" || child.kind === "typedef" || child.isEnum) {
+ incompatible.push(child);
+ return;
+ }
+ handleElement(child, element);
+ });
+
+ --indent;
+ writeln("}");
+
+ // class-incompatible members
+ if (incompatible.length) {
+ writeln();
+ if (element.scope === "global" && !options.module)
+ write("export ");
+ writeln("namespace ", element.name, " {");
+ ++indent;
+ incompatible.forEach(function(child) {
+ handleElement(child, element);
+ });
+ --indent;
+ writeln("}");
+ }
+}
+
+// handles a namespace or class member
+function handleMember(element, parent) {
+ begin(element);
+
+ if (element.isEnum) {
+ var stringEnum = false;
+ element.properties.forEach(function(property) {
+ if (isNaN(property.defaultvalue)) {
+ stringEnum = true;
+ }
+ });
+ if (stringEnum) {
+ writeln("type ", element.name, " =");
+ ++indent;
+ element.properties.forEach(function(property, i) {
+ write(i === 0 ? "" : "| ", JSON.stringify(property.defaultvalue));
+ });
+ --indent;
+ writeln(";");
+ } else {
+ writeln("enum ", element.name, " {");
+ ++indent;
+ element.properties.forEach(function(property, i) {
+ write(property.name);
+ if (property.defaultvalue !== undefined)
+ write(" = ", JSON.stringify(property.defaultvalue));
+ if (i < element.properties.length - 1)
+ writeln(",");
+ else
+ writeln();
+ });
+ --indent;
+ writeln("}");
+ }
+
+ } else {
+
+ var inClass = isClassLike(parent);
+ if (inClass) {
+ write(element.access || "public", " ");
+ if (element.scope === "static")
+ write("static ");
+ if (element.readonly)
+ write("readonly ");
+ } else
+ write(element.kind === "constant" ? "const " : "let ");
+
+ write(element.name);
+ if (element.optional)
+ write("?");
+ write(": ");
+
+ if (element.type && element.type.names && /^Object\b/i.test(element.type.names[0]) && element.properties) {
+ writeln("{");
+ ++indent;
+ element.properties.forEach(function(property, i) {
+ writeln(JSON.stringify(property.name), ": ", getTypeOf(property), i < element.properties.length - 1 ? "," : "");
+ });
+ --indent;
+ writeln("};");
+ } else
+ writeln(getTypeOf(element), ";");
+ }
+}
+
+// handles a function or method
+function handleFunction(element, parent, isConstructor) {
+ var insideClass = true;
+ if (isConstructor) {
+ writeComment(element.comment);
+ write("constructor");
+ } else {
+ begin(element);
+ insideClass = isClassLike(parent);
+ if (insideClass) {
+ write(element.access || "public", " ");
+ if (element.scope === "static")
+ write("static ");
+ } else
+ write("function ");
+ write(element.name);
+ if (element.templates && element.templates.length)
+ write("<", element.templates.join(", "), ">");
+ }
+ writeFunctionSignature(element, isConstructor, false);
+ writeln(";");
+ if (!insideClass)
+ handleNamespace(element);
+}
+
+// handles a type definition (not a real type)
+function handleTypeDef(element, parent) {
+ if (isInterface(element)) {
+ if (isClassLike(parent))
+ queuedInterfaces.push(element);
+ else {
+ begin(element);
+ writeInterface(element);
+ }
+ } else {
+ writeComment(element.comment, true);
+ write("type ", element.name);
+ if (element.templates && element.templates.length)
+ write("<", element.templates.join(", "), ">");
+ write(" = ");
+ if (element.tsType)
+ write(element.tsType.replace(/\r?\n|\r/g, "\n"));
+ else {
+ var type = getTypeOf(element);
+ if (element.type && element.type.names.length === 1 && element.type.names[0] === "function")
+ writeFunctionSignature(element, false, true);
+ else if (type === "object") {
+ if (element.properties && element.properties.length)
+ writeInterfaceBody(element);
+ else
+ write("{}");
+ } else
+ write(type);
+ }
+ writeln(";");
+ }
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/package.json b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/package.json
new file mode 100644
index 00000000..8bdebc24
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/package.json
@@ -0,0 +1,7 @@
+{
+ "version": "6.7.0",
+ "dependencies": {
+ "jsdoc": "^3.6.3",
+ "minimist": "^1.2.0"
+ }
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/package.standalone.json b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/package.standalone.json
new file mode 100644
index 00000000..4266b6d5
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/package.standalone.json
@@ -0,0 +1,32 @@
+{
+ "name": "protobufjs-cli",
+ "description": "Translates between file formats and generates static code as well as TypeScript definitions.",
+ "version": "6.7.0",
+ "author": "Daniel Wirtz ",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dcodeIO/protobuf.js.git"
+ },
+ "license": "BSD-3-Clause",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "bin": {
+ "pbjs": "bin/pbjs",
+ "pbts": "bin/pbts"
+ },
+ "peerDependencies": {
+ "@apollo/protobufjs": "~1.0.5"
+ },
+ "dependencies": {
+ "chalk": "^1.1.3",
+ "escodegen": "^1.8.1",
+ "espree": "^3.1.3",
+ "estraverse": "^4.2.0",
+ "glob": "^7.1.1",
+ "jsdoc": "^3.4.2",
+ "minimist": "^1.2.0",
+ "semver": "^5.3.0",
+ "tmp": "0.0.31",
+ "uglify-js": "^2.8.15"
+ }
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbjs.d.ts b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbjs.d.ts
new file mode 100644
index 00000000..ead1f3c5
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbjs.d.ts
@@ -0,0 +1,9 @@
+type pbjsCallback = (err: Error|null, output?: string) => void;
+
+/**
+ * Runs pbjs programmatically.
+ * @param {string[]} args Command line arguments
+ * @param {function(?Error, string=)} [callback] Optional completion callback
+ * @returns {number|undefined} Exit code, if known
+ */
+export function main(args: string[], callback?: pbjsCallback): number|undefined;
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbjs.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbjs.js
new file mode 100644
index 00000000..74b00231
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbjs.js
@@ -0,0 +1,331 @@
+"use strict";
+var path = require("path"),
+ fs = require("fs"),
+ pkg = require("./package.json"),
+ util = require("./util");
+
+util.setup();
+
+var protobuf = require(util.pathToProtobufJs),
+ minimist = require("minimist"),
+ chalk = require("chalk"),
+ glob = require("glob");
+
+var targets = util.requireAll("./targets");
+
+/**
+ * Runs pbjs programmatically.
+ * @param {string[]} args Command line arguments
+ * @param {function(?Error, string=)} [callback] Optional completion callback
+ * @returns {number|undefined} Exit code, if known
+ */
+exports.main = function main(args, callback) {
+ var lintDefault = "eslint-disable " + [
+ "block-scoped-var",
+ "id-length",
+ "no-control-regex",
+ "no-magic-numbers",
+ "no-prototype-builtins",
+ "no-redeclare",
+ "no-shadow",
+ "no-var",
+ "sort-vars"
+ ].join(", ");
+ var argv = minimist(args, {
+ alias: {
+ target: "t",
+ out: "o",
+ path: "p",
+ wrap: "w",
+ root: "r",
+ lint: "l",
+ // backward compatibility:
+ "force-long": "strict-long",
+ "force-message": "strict-message"
+ },
+ string: [ "target", "out", "path", "wrap", "dependency", "root", "lint" ],
+ boolean: [ "create", "encode", "decode", "verify", "convert", "from-object", "delimited", "beautify", "comments", "es6", "sparse", "keep-case", "force-long", "force-number", "force-enum-string", "force-message" ],
+ default: {
+ target: "json",
+ create: true,
+ encode: true,
+ decode: true,
+ verify: true,
+ convert: true,
+ "from-object": true,
+ delimited: true,
+ beautify: true,
+ comments: true,
+ es6: null,
+ lint: lintDefault,
+ "keep-case": false,
+ "force-long": false,
+ "force-number": false,
+ "force-enum-string": false,
+ "force-message": false
+ }
+ });
+
+ var target = targets[argv.target],
+ files = argv._,
+ paths = typeof argv.path === "string" ? [ argv.path ] : argv.path || [];
+
+ // alias hyphen args in camel case
+ Object.keys(argv).forEach(function(key) {
+ var camelKey = key.replace(/-([a-z])/g, function($0, $1) { return $1.toUpperCase(); });
+ if (camelKey !== key)
+ argv[camelKey] = argv[key];
+ });
+
+ // protobuf.js package directory contains additional, otherwise non-bundled google types
+ paths.push(path.relative(process.cwd(), path.join(__dirname, "..")) || ".");
+
+ if (!files.length) {
+ var descs = Object.keys(targets).filter(function(key) { return !targets[key].private; }).map(function(key) {
+ return " " + util.pad(key, 14, true) + targets[key].description;
+ });
+ if (callback)
+ callback(Error("usage")); // eslint-disable-line callback-return
+ else
+ process.stderr.write([
+ "protobuf.js v" + pkg.version + " CLI for JavaScript",
+ "",
+ chalk.bold.white("Translates between file formats and generates static code."),
+ "",
+ " -t, --target Specifies the target format. Also accepts a path to require a custom target.",
+ "",
+ descs.join("\n"),
+ "",
+ " -p, --path Adds a directory to the include path.",
+ "",
+ " -o, --out Saves to a file instead of writing to stdout.",
+ "",
+ " --sparse Exports only those types referenced from a main file (experimental).",
+ "",
+ chalk.bold.gray(" Module targets only:"),
+ "",
+ " -w, --wrap Specifies the wrapper to use. Also accepts a path to require a custom wrapper.",
+ "",
+ " default Default wrapper supporting both CommonJS and AMD",
+ " commonjs CommonJS wrapper",
+ " amd AMD wrapper",
+ " es6 ES6 wrapper (implies --es6)",
+ " closure A closure adding to protobuf.roots where protobuf is a global",
+ "",
+ " --dependency Specifies which version of protobuf to require. Accepts any valid module id",
+ "",
+ " -r, --root Specifies an alternative protobuf.roots name.",
+ "",
+ " -l, --lint Linter configuration. Defaults to protobuf.js-compatible rules:",
+ "",
+ " " + lintDefault,
+ "",
+ " --es6 Enables ES6 syntax (const/let instead of var)",
+ "",
+ chalk.bold.gray(" Proto sources only:"),
+ "",
+ " --keep-case Keeps field casing instead of converting to camel case.",
+ "",
+ chalk.bold.gray(" Static targets only:"),
+ "",
+ " --no-create Does not generate create functions used for reflection compatibility.",
+ " --no-encode Does not generate encode functions.",
+ " --no-decode Does not generate decode functions.",
+ " --no-verify Does not generate verify functions.",
+ " --no-convert Does not generate convert functions like from/toObject",
+ " --no-from-object Does not generate fromObject",
+ " --no-delimited Does not generate delimited encode/decode functions.",
+ " --no-beautify Does not beautify generated code.",
+ " --no-comments Does not output any JSDoc comments.",
+ "",
+ " --force-long Enfores the use of 'Long' for s-/u-/int64 and s-/fixed64 fields.",
+ " --force-number Enfores the use of 'number' for s-/u-/int64 and s-/fixed64 fields.",
+ " --force-message Enfores the use of message instances instead of plain objects.",
+ "",
+ "usage: " + chalk.bold.green("pbjs") + " [options] file1.proto file2.json ..." + chalk.gray(" (or pipe) ") + "other | " + chalk.bold.green("pbjs") + " [options] -",
+ ""
+ ].join("\n"));
+ return 1;
+ }
+
+ if (typeof argv["strict-long"] === "boolean")
+ argv["force-long"] = argv["strict-long"];
+
+ // Resolve glob expressions
+ for (var i = 0; i < files.length;) {
+ if (glob.hasMagic(files[i])) {
+ var matches = glob.sync(files[i]);
+ Array.prototype.splice.apply(files, [i, 1].concat(matches));
+ i += matches.length;
+ } else
+ ++i;
+ }
+
+ // Require custom target
+ if (!target)
+ target = require(path.resolve(process.cwd(), argv.target));
+
+ var root = new protobuf.Root();
+
+ var mainFiles = [];
+
+ // Search include paths when resolving imports
+ root.resolvePath = function pbjsResolvePath(origin, target) {
+ var normOrigin = protobuf.util.path.normalize(origin),
+ normTarget = protobuf.util.path.normalize(target);
+ if (!normOrigin)
+ mainFiles.push(normTarget);
+
+ var resolved = protobuf.util.path.resolve(normOrigin, normTarget, true);
+ var idx = resolved.lastIndexOf("google/protobuf/");
+ if (idx > -1) {
+ var altname = resolved.substring(idx);
+ if (altname in protobuf.common)
+ resolved = altname;
+ }
+
+ if (fs.existsSync(resolved))
+ return resolved;
+
+ for (var i = 0; i < paths.length; ++i) {
+ var iresolved = protobuf.util.path.resolve(paths[i] + "/", target);
+ if (fs.existsSync(iresolved))
+ return iresolved;
+ }
+
+ return resolved;
+ };
+
+ // Use es6 syntax if not explicitly specified on the command line and the es6 wrapper is used
+ if (argv.wrap === "es6" || argv.es6) {
+ argv.wrap = "es6";
+ argv.es6 = true;
+ }
+
+ var parseOptions = {
+ "keepCase": argv["keep-case"] || false
+ };
+
+ // Read from stdin
+ if (files.length === 1 && files[0] === "-") {
+ var data = [];
+ process.stdin.on("data", function(chunk) {
+ data.push(chunk);
+ });
+ process.stdin.on("end", function() {
+ var source = Buffer.concat(data).toString("utf8");
+ try {
+ if (source.charAt(0) !== "{") {
+ protobuf.parse.filename = "-";
+ protobuf.parse(source, root, parseOptions);
+ } else {
+ var json = JSON.parse(source);
+ root.setOptions(json.options).addJSON(json);
+ }
+ callTarget();
+ } catch (err) {
+ if (callback) {
+ callback(err);
+ return;
+ }
+ throw err;
+ }
+ });
+
+ // Load from disk
+ } else {
+ try {
+ root.loadSync(files, parseOptions).resolveAll(); // sync is deterministic while async is not
+ if (argv.sparse)
+ sparsify(root);
+ callTarget();
+ } catch (err) {
+ if (callback) {
+ callback(err);
+ return undefined;
+ }
+ throw err;
+ }
+ }
+
+ function markReferenced(tobj) {
+ tobj.referenced = true;
+ // also mark a type's fields and oneofs
+ if (tobj.fieldsArray)
+ tobj.fieldsArray.forEach(function(fobj) {
+ fobj.referenced = true;
+ });
+ if (tobj.oneofsArray)
+ tobj.oneofsArray.forEach(function(oobj) {
+ oobj.referenced = true;
+ });
+ // also mark an extension field's extended type, but not its (other) fields
+ if (tobj.extensionField)
+ tobj.extensionField.parent.referenced = true;
+ }
+
+ function sparsify(root) {
+
+ // 1. mark directly or indirectly referenced objects
+ util.traverse(root, function(obj) {
+ if (!obj.filename)
+ return;
+ if (mainFiles.indexOf(obj.filename) > -1)
+ util.traverseResolved(obj, markReferenced);
+ });
+
+ // 2. empty unreferenced objects
+ util.traverse(root, function(obj) {
+ var parent = obj.parent;
+ if (!parent || obj.referenced) // root or referenced
+ return;
+ // remove unreferenced namespaces
+ if (obj instanceof protobuf.Namespace) {
+ var hasReferenced = false;
+ util.traverse(obj, function(iobj) {
+ if (iobj.referenced)
+ hasReferenced = true;
+ });
+ if (hasReferenced) { // replace with plain namespace if a namespace subclass
+ if (obj instanceof protobuf.Type || obj instanceof protobuf.Service) {
+ var robj = new protobuf.Namespace(obj.name, obj.options);
+ robj.nested = obj.nested;
+ parent.add(robj);
+ }
+ } else // remove completely if nothing inside is referenced
+ parent.remove(obj);
+
+ // remove everything else unreferenced
+ } else if (!(obj instanceof protobuf.Namespace))
+ parent.remove(obj);
+ });
+
+ // 3. validate that everything is fine
+ root.resolveAll();
+ }
+
+ function callTarget() {
+ target(root, argv, function targetCallback(err, output) {
+ if (err) {
+ if (callback)
+ return callback(err);
+ throw err;
+ }
+ try {
+ if (argv.out)
+ fs.writeFileSync(argv.out, output, { encoding: "utf8" });
+ else if (!callback)
+ process.stdout.write(output, "utf8");
+ return callback
+ ? callback(null, output)
+ : undefined;
+ } catch (err) {
+ if (callback)
+ return callback(err);
+ throw err;
+ }
+ });
+ }
+
+ return undefined;
+};
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbts.d.ts b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbts.d.ts
new file mode 100644
index 00000000..35db28c0
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbts.d.ts
@@ -0,0 +1,9 @@
+type pbtsCallback = (err: Error|null, output?: string) => void;
+
+/**
+ * Runs pbts programmatically.
+ * @param {string[]} args Command line arguments
+ * @param {function(?Error, string=)} [callback] Optional completion callback
+ * @returns {number|undefined} Exit code, if known
+ */
+export function main(args: string[], callback?: pbtsCallback): number|undefined;
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbts.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbts.js
new file mode 100644
index 00000000..8baced48
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/pbts.js
@@ -0,0 +1,198 @@
+"use strict";
+var child_process = require("child_process"),
+ path = require("path"),
+ fs = require("fs"),
+ pkg = require("./package.json"),
+ util = require("./util");
+
+util.setup();
+
+var minimist = require("minimist"),
+ chalk = require("chalk"),
+ glob = require("glob"),
+ tmp = require("tmp");
+
+/**
+ * Runs pbts programmatically.
+ * @param {string[]} args Command line arguments
+ * @param {function(?Error, string=)} [callback] Optional completion callback
+ * @returns {number|undefined} Exit code, if known
+ */
+exports.main = function(args, callback) {
+ var argv = minimist(args, {
+ alias: {
+ name: "n",
+ out : "o",
+ main: "m",
+ global: "g",
+ import: "i"
+ },
+ string: [ "name", "out", "global", "import" ],
+ boolean: [ "comments", "main" ],
+ default: {
+ comments: true,
+ main: false
+ }
+ });
+
+ var files = argv._;
+
+ if (!files.length) {
+ if (callback)
+ callback(Error("usage")); // eslint-disable-line callback-return
+ else
+ process.stderr.write([
+ "protobuf.js v" + pkg.version + " CLI for TypeScript",
+ "",
+ chalk.bold.white("Generates TypeScript definitions from annotated JavaScript files."),
+ "",
+ " -o, --out Saves to a file instead of writing to stdout.",
+ "",
+ " -g, --global Name of the global object in browser environments, if any.",
+ "",
+ " -i, --import Comma delimited list of imports. Local names will equal camelCase of the basename.",
+ "",
+ " --no-comments Does not output any JSDoc comments.",
+ "",
+ chalk.bold.gray(" Internal flags:"),
+ "",
+ " -n, --name Wraps everything in a module of the specified name.",
+ "",
+ " -m, --main Whether building the main library without any imports.",
+ "",
+ "usage: " + chalk.bold.green("pbts") + " [options] file1.js file2.js ..." + chalk.bold.gray(" (or) ") + "other | " + chalk.bold.green("pbts") + " [options] -",
+ ""
+ ].join("\n"));
+ return 1;
+ }
+
+ // Resolve glob expressions
+ for (var i = 0; i < files.length;) {
+ if (glob.hasMagic(files[i])) {
+ var matches = glob.sync(files[i]);
+ Array.prototype.splice.apply(files, [i, 1].concat(matches));
+ i += matches.length;
+ } else
+ ++i;
+ }
+
+ var cleanup = [];
+
+ // Read from stdin (to a temporary file)
+ if (files.length === 1 && files[0] === "-") {
+ var data = [];
+ process.stdin.on("data", function(chunk) {
+ data.push(chunk);
+ });
+ process.stdin.on("end", function() {
+ files[0] = tmp.tmpNameSync() + ".js";
+ fs.writeFileSync(files[0], Buffer.concat(data));
+ cleanup.push(files[0]);
+ callJsdoc();
+ });
+
+ // Load from disk
+ } else {
+ callJsdoc();
+ }
+
+ function callJsdoc() {
+
+ // There is no proper API for jsdoc, so this executes the CLI and pipes the output
+ var basedir = path.join(__dirname, ".");
+ var moduleName = argv.name || "null";
+ var nodePath = process.execPath;
+ var cmd = "\"" + nodePath + "\" \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "lib", "tsd-jsdoc.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
+ var child = child_process.exec(cmd, {
+ cwd: process.cwd(),
+ argv0: "node",
+ stdio: "pipe",
+ maxBuffer: 1 << 24 // 16mb
+ });
+ var out = [];
+ var ended = false;
+ var closed = false;
+ child.stdout.on("data", function(data) {
+ out.push(data);
+ });
+ child.stdout.on("end", function() {
+ if (closed) finish();
+ else ended = true;
+ });
+ child.stderr.pipe(process.stderr);
+ child.on("close", function(code) {
+ // clean up temporary files, no matter what
+ try { cleanup.forEach(fs.unlinkSync); } catch(e) {/**/} cleanup = [];
+
+ if (code) {
+ out = out.join("").replace(/\s*JSDoc \d+\.\d+\.\d+ [^$]+/, "");
+ process.stderr.write(out);
+ var err = Error("code " + code);
+ if (callback)
+ return callback(err);
+ throw err;
+ }
+
+ if (ended) return finish();
+ closed = true;
+ return undefined;
+ });
+
+ function getImportName(importItem) {
+ return path.basename(importItem, ".js").replace(/([-_~.+]\w)/g, function(match) {
+ return match[1].toUpperCase();
+ });
+ }
+
+ function finish() {
+ var output = [];
+ if (argv.main)
+ output.push(
+ "// DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run types'.",
+ ""
+ );
+
+ if (argv.global)
+ output.push(
+ "export as namespace " + argv.global + ";",
+ ""
+ );
+
+ if (!argv.main) {
+ // Ensure we have a usable array of imports
+ var importArray = typeof argv.import === "string" ? argv.import.split(",") : argv.import || [];
+
+ // Build an object of imports and paths
+ var imports = {
+ $protobuf: "@apollo/protobufjs"
+ };
+ importArray.forEach(function(importItem) {
+ imports[getImportName(importItem)] = importItem;
+ });
+
+ // Write out the imports
+ Object.keys(imports).forEach(function(key) {
+ output.push("import * as " + key + " from \"" + imports[key] + "\";");
+ });
+ }
+
+ output = output.join("\n") + "\n" + out.join("");
+
+ try {
+ if (argv.out)
+ fs.writeFileSync(argv.out, output, { encoding: "utf8" });
+ else if (!callback)
+ process.stdout.write(output, "utf8");
+ return callback
+ ? callback(null, output)
+ : undefined;
+ } catch (err) {
+ if (callback)
+ return callback(err);
+ throw err;
+ }
+ }
+ }
+
+ return undefined;
+};
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/json-module.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/json-module.js
new file mode 100644
index 00000000..dc5e5ed2
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/json-module.js
@@ -0,0 +1,38 @@
+"use strict";
+module.exports = json_module;
+
+var util = require("../util");
+
+var protobuf = require("../..");
+
+json_module.description = "JSON representation as a module";
+
+function jsonSafeProp(json) {
+ return json.replace(/^( +)"(\w+)":/mg, function($0, $1, $2) {
+ return protobuf.util.safeProp($2).charAt(0) === "."
+ ? $1 + $2 + ":"
+ : $0;
+ });
+}
+
+function json_module(root, options, callback) {
+ try {
+ var rootProp = protobuf.util.safeProp(options.root || "default");
+ var output = [
+ (options.es6 ? "const" : "var") + " $root = ($protobuf.roots" + rootProp + " || ($protobuf.roots" + rootProp + " = new $protobuf.Root()))\n"
+ ];
+ if (root.options) {
+ var optionsJson = jsonSafeProp(JSON.stringify(root.options, null, 2));
+ output.push(".setOptions(" + optionsJson + ")\n");
+ }
+ var json = jsonSafeProp(JSON.stringify(root.nested, null, 2).trim());
+ output.push(".addJSON(" + json + ");");
+ output = util.wrap(output.join(""), protobuf.util.merge({ dependency: "@apollo/protobufjs/light" }, options));
+ process.nextTick(function() {
+ callback(null, output);
+ });
+ } catch (e) {
+ return callback(e);
+ }
+ return undefined;
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/json.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/json.js
new file mode 100644
index 00000000..70253723
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/json.js
@@ -0,0 +1,8 @@
+"use strict";
+module.exports = json_target;
+
+json_target.description = "JSON representation";
+
+function json_target(root, options, callback) {
+ callback(null, JSON.stringify(root, null, 2));
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto.js
new file mode 100644
index 00000000..d633f168
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto.js
@@ -0,0 +1,326 @@
+"use strict";
+module.exports = proto_target;
+
+proto_target.private = true;
+
+var protobuf = require("../..");
+
+var Namespace = protobuf.Namespace,
+ Enum = protobuf.Enum,
+ Type = protobuf.Type,
+ Field = protobuf.Field,
+ OneOf = protobuf.OneOf,
+ Service = protobuf.Service,
+ Method = protobuf.Method,
+ types = protobuf.types,
+ util = protobuf.util;
+
+function underScore(str) {
+ return str.substring(0,1)
+ + str.substring(1)
+ .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return "_" + $1.toLowerCase(); });
+}
+
+var out = [];
+var indent = 0;
+var first = false;
+var syntax = 3;
+
+function proto_target(root, options, callback) {
+ if (options) {
+ switch (options.syntax) {
+ case undefined:
+ case "proto3":
+ case "3":
+ syntax = 3;
+ break;
+ case "proto2":
+ case "2":
+ syntax = 2;
+ break;
+ default:
+ return callback(Error("invalid syntax: " + options.syntax));
+ }
+ }
+ indent = 0;
+ first = false;
+ try {
+ buildRoot(root);
+ return callback(null, out.join("\n"));
+ } catch (err) {
+ return callback(err);
+ } finally {
+ out = [];
+ syntax = 3;
+ }
+}
+
+function push(line) {
+ if (line === "")
+ out.push("");
+ else {
+ var ind = "";
+ for (var i = 0; i < indent; ++i)
+ ind += " ";
+ out.push(ind + line);
+ }
+}
+
+function escape(str) {
+ return str.replace(/[\\"']/g, "\\$&")
+ .replace(/\r/g, "\\r")
+ .replace(/\n/g, "\\n")
+ .replace(/\u0000/g, "\\0"); // eslint-disable-line no-control-regex
+}
+
+function value(v) {
+ switch (typeof v) {
+ case "boolean":
+ return v ? "true" : "false";
+ case "number":
+ return v.toString();
+ default:
+ return "\"" + escape(String(v)) + "\"";
+ }
+}
+
+function buildRoot(root) {
+ root.resolveAll();
+ var pkg = [];
+ var ptr = root;
+ var repeat = true;
+ do {
+ var nested = ptr.nestedArray;
+ if (nested.length === 1 && nested[0] instanceof Namespace && !(nested[0] instanceof Type || nested[0] instanceof Service)) {
+ ptr = nested[0];
+ if (ptr !== root)
+ pkg.push(ptr.name);
+ } else
+ repeat = false;
+ } while (repeat);
+ out.push("syntax = \"proto" + syntax + "\";");
+ if (pkg.length)
+ out.push("", "package " + pkg.join(".") + ";");
+
+ buildOptions(ptr);
+ ptr.nestedArray.forEach(build);
+}
+
+function build(object) {
+ if (object instanceof Enum)
+ buildEnum(object);
+ else if (object instanceof Type)
+ buildType(object);
+ else if (object instanceof Field)
+ buildField(object);
+ else if (object instanceof OneOf)
+ buildOneOf(object);
+ else if (object instanceof Service)
+ buildService(object);
+ else if (object instanceof Method)
+ buildMethod(object);
+ else
+ buildNamespace(object);
+}
+
+function buildNamespace(namespace) { // just a namespace, not a type etc.
+ push("");
+ push("message " + namespace.name + " {");
+ ++indent;
+ buildOptions(namespace);
+ consolidateExtends(namespace.nestedArray).remaining.forEach(build);
+ --indent;
+ push("}");
+}
+
+function buildEnum(enm) {
+ push("");
+ push("enum " + enm.name + " {");
+ buildOptions(enm);
+ ++indent; first = true;
+ Object.keys(enm.values).forEach(function(name) {
+ var val = enm.values[name];
+ if (first) {
+ push("");
+ first = false;
+ }
+ push(name + " = " + val + ";");
+ });
+ --indent; first = false;
+ push("}");
+}
+
+function buildRanges(keyword, ranges) {
+ if (ranges && ranges.length) {
+ var parts = [];
+ ranges.forEach(function(range) {
+ if (typeof range === "string")
+ parts.push("\"" + escape(range) + "\"");
+ else if (range[0] === range[1])
+ parts.push(range[0]);
+ else
+ parts.push(range[0] + " to " + (range[1] === 0x1FFFFFFF ? "max" : range[1]));
+ });
+ push("");
+ push(keyword + " " + parts.join(", ") + ";");
+ }
+}
+
+function buildType(type) {
+ if (type.group)
+ return; // built with the sister-field
+ push("");
+ push("message " + type.name + " {");
+ ++indent;
+ buildOptions(type);
+ type.oneofsArray.forEach(build);
+ first = true;
+ type.fieldsArray.forEach(build);
+ consolidateExtends(type.nestedArray).remaining.forEach(build);
+ buildRanges("extensions", type.extensions);
+ buildRanges("reserved", type.reserved);
+ --indent;
+ push("}");
+}
+
+function buildField(field, passExtend) {
+ if (field.partOf || field.declaringField || field.extend !== undefined && !passExtend)
+ return;
+ if (first) {
+ first = false;
+ push("");
+ }
+ if (field.resolvedType && field.resolvedType.group) {
+ buildGroup(field);
+ return;
+ }
+ var sb = [];
+ if (field.map)
+ sb.push("map<" + field.keyType + ", " + field.type + ">");
+ else if (field.repeated)
+ sb.push("repeated", field.type);
+ else if (syntax === 2 || field.parent.group)
+ sb.push(field.required ? "required" : "optional", field.type);
+ else
+ sb.push(field.type);
+ sb.push(underScore(field.name), "=", field.id);
+ var opts = buildFieldOptions(field);
+ if (opts)
+ sb.push(opts);
+ push(sb.join(" ") + ";");
+}
+
+function buildGroup(field) {
+ push(field.rule + " group " + field.resolvedType.name + " = " + field.id + " {");
+ ++indent;
+ buildOptions(field.resolvedType);
+ first = true;
+ field.resolvedType.fieldsArray.forEach(function(field) {
+ buildField(field);
+ });
+ --indent;
+ push("}");
+}
+
+function buildFieldOptions(field) {
+ var keys;
+ if (!field.options || !(keys = Object.keys(field.options)).length)
+ return null;
+ var sb = [];
+ keys.forEach(function(key) {
+ var val = field.options[key];
+ var wireType = types.packed[field.resolvedType instanceof Enum ? "int32" : field.type];
+ switch (key) {
+ case "packed":
+ val = Boolean(val);
+ // skip when not packable or syntax default
+ if (wireType === undefined || syntax === 3 === val)
+ return;
+ break;
+ case "default":
+ if (syntax === 3)
+ return;
+ // skip default (resolved) default values
+ if (field.long && !util.longNeq(field.defaultValue, types.defaults[field.type]) || !field.long && field.defaultValue === types.defaults[field.type])
+ return;
+ // enum defaults specified as strings are type references and not enclosed in quotes
+ if (field.resolvedType instanceof Enum)
+ break;
+ // otherwise fallthrough
+ default:
+ val = value(val);
+ break;
+ }
+ sb.push(key + "=" + val);
+ });
+ return sb.length
+ ? "[" + sb.join(", ") + "]"
+ : null;
+}
+
+function consolidateExtends(nested) {
+ var ext = {};
+ nested = nested.filter(function(obj) {
+ if (!(obj instanceof Field) || obj.extend === undefined)
+ return true;
+ (ext[obj.extend] || (ext[obj.extend] = [])).push(obj);
+ return false;
+ });
+ Object.keys(ext).forEach(function(extend) {
+ push("");
+ push("extend " + extend + " {");
+ ++indent; first = true;
+ ext[extend].forEach(function(field) {
+ buildField(field, true);
+ });
+ --indent;
+ push("}");
+ });
+ return {
+ remaining: nested
+ };
+}
+
+function buildOneOf(oneof) {
+ push("");
+ push("oneof " + underScore(oneof.name) + " {");
+ ++indent; first = true;
+ oneof.oneof.forEach(function(fieldName) {
+ var field = oneof.parent.get(fieldName);
+ if (first) {
+ first = false;
+ push("");
+ }
+ var opts = buildFieldOptions(field);
+ push(field.type + " " + underScore(field.name) + " = " + field.id + (opts ? " " + opts : "") + ";");
+ });
+ --indent;
+ push("}");
+}
+
+function buildService(service) {
+ push("service " + service.name + " {");
+ ++indent;
+ service.methodsArray.forEach(build);
+ consolidateExtends(service.nestedArray).remaining.forEach(build);
+ --indent;
+ push("}");
+}
+
+function buildMethod(method) {
+ push(method.type + " " + method.name + " (" + (method.requestStream ? "stream " : "") + method.requestType + ") returns (" + (method.responseStream ? "stream " : "") + method.responseType + ");");
+}
+
+function buildOptions(object) {
+ if (!object.options)
+ return;
+ first = true;
+ Object.keys(object.options).forEach(function(key) {
+ if (first) {
+ first = false;
+ push("");
+ }
+ var val = object.options[key];
+ push("option " + key + " = " + JSON.stringify(val) + ";");
+ });
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto2.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto2.js
new file mode 100644
index 00000000..09521e06
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto2.js
@@ -0,0 +1,10 @@
+"use strict";
+module.exports = proto2_target;
+
+var protobuf = require("../..");
+
+proto2_target.description = "Protocol Buffers, Version 2";
+
+function proto2_target(root, options, callback) {
+ require("./proto")(root, protobuf.util.merge(options, { syntax: "proto2" }), callback);
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto3.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto3.js
new file mode 100644
index 00000000..661c916b
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/proto3.js
@@ -0,0 +1,10 @@
+"use strict";
+module.exports = proto3_target;
+
+var protobuf = require("../..");
+
+proto3_target.description = "Protocol Buffers, Version 3";
+
+function proto3_target(root, options, callback) {
+ require("./proto")(root, protobuf.util.merge(options, { syntax: "proto3" }), callback);
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/static-module.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/static-module.js
new file mode 100644
index 00000000..f69eba8e
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/static-module.js
@@ -0,0 +1,29 @@
+"use strict";
+module.exports = static_module_target;
+
+// - The default wrapper supports AMD, CommonJS and the global scope (as window.root), in this order.
+// - You can specify a custom wrapper with the --wrap argument.
+// - CommonJS modules depend on the minimal build for reduced package size with browserify.
+// - AMD and global scope depend on the full library for now.
+
+var util = require("../util");
+
+var protobuf = require("../..");
+
+static_module_target.description = "Static code without reflection as a module";
+
+function static_module_target(root, options, callback) {
+ require("./static")(root, options, function(err, output) {
+ if (err) {
+ callback(err);
+ return;
+ }
+ try {
+ output = util.wrap(output, protobuf.util.merge({ dependency: "@apollo/protobufjs/minimal" }, options));
+ } catch (e) {
+ callback(e);
+ return;
+ }
+ callback(null, output);
+ });
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/static.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/static.js
new file mode 100644
index 00000000..e8d15349
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/targets/static.js
@@ -0,0 +1,709 @@
+"use strict";
+module.exports = static_target;
+
+var protobuf = require("../.."),
+ UglifyJS = require("uglify-js"),
+ espree = require("espree"),
+ escodegen = require("escodegen"),
+ estraverse = require("estraverse");
+
+var Type = protobuf.Type,
+ Service = protobuf.Service,
+ Enum = protobuf.Enum,
+ Namespace = protobuf.Namespace,
+ util = protobuf.util;
+
+var out = [];
+var indent = 0;
+var config = {};
+
+static_target.description = "Static code without reflection (non-functional on its own)";
+
+function static_target(root, options, callback) {
+ config = options;
+ try {
+ var aliases = [];
+ if (config.decode)
+ aliases.push("Reader");
+ if (config.encode)
+ aliases.push("Writer");
+ aliases.push("util");
+ if (aliases.length) {
+ if (config.comments)
+ push("// Common aliases");
+ push((config.es6 ? "const " : "var ") + aliases.map(function(name) { return "$" + name + " = $protobuf." + name; }).join(", ") + ";");
+ push("");
+ }
+ if (config.comments) {
+ if (root.comment) {
+ pushComment("@fileoverview " + root.comment);
+ push("");
+ }
+ push("// Exported root namespace");
+ }
+ var rootProp = util.safeProp(config.root || "default");
+ push((config.es6 ? "const" : "var") + " $root = $protobuf.roots" + rootProp + " || ($protobuf.roots" + rootProp + " = {});");
+ buildNamespace(null, root);
+ return callback(null, out.join("\n"));
+ } catch (err) {
+ return callback(err);
+ } finally {
+ out = [];
+ indent = 0;
+ config = {};
+ }
+}
+
+function push(line) {
+ if (line === "")
+ return out.push("");
+ var ind = "";
+ for (var i = 0; i < indent; ++i)
+ ind += " ";
+ return out.push(ind + line);
+}
+
+function pushComment(lines) {
+ if (!config.comments)
+ return;
+ var split = [];
+ for (var i = 0; i < lines.length; ++i)
+ if (lines[i] != null && lines[i].substring(0, 8) !== "@exclude")
+ Array.prototype.push.apply(split, lines[i].split(/\r?\n/g));
+ push("/**");
+ split.forEach(function(line) {
+ if (line === null)
+ return;
+ push(" * " + line.replace(/\*\//g, "* /"));
+ });
+ push(" */");
+}
+
+function exportName(object, asInterface) {
+ if (asInterface) {
+ if (object.__interfaceName)
+ return object.__interfaceName;
+ } else if (object.__exportName)
+ return object.__exportName;
+ var parts = object.fullName.substring(1).split("."),
+ i = 0;
+ while (i < parts.length)
+ parts[i] = escapeName(parts[i++]);
+ if (asInterface)
+ parts[i - 1] = "I" + parts[i - 1];
+ return object[asInterface ? "__interfaceName" : "__exportName"] = parts.join(".");
+}
+
+function escapeName(name) {
+ if (!name)
+ return "$root";
+ return util.isReserved(name) ? name + "_" : name;
+}
+
+function aOrAn(name) {
+ return ((/^[hH](?:ou|on|ei)/.test(name) || /^[aeiouAEIOU][a-z]/.test(name)) && !/^us/i.test(name)
+ ? "an "
+ : "a ") + name;
+}
+
+function buildNamespace(ref, ns) {
+ if (!ns)
+ return;
+ if (ns.name !== "") {
+ push("");
+ if (!ref && config.es6)
+ push("export const " + escapeName(ns.name) + " = " + escapeName(ref) + "." + escapeName(ns.name) + " = (() => {");
+ else
+ push(escapeName(ref) + "." + escapeName(ns.name) + " = (function() {");
+ ++indent;
+ }
+
+ if (ns instanceof Type) {
+ buildType(undefined, ns);
+ } else if (ns instanceof Service)
+ buildService(undefined, ns);
+ else if (ns.name !== "") {
+ push("");
+ pushComment([
+ ns.comment || "Namespace " + ns.name + ".",
+ ns.parent instanceof protobuf.Root ? "@exports " + escapeName(ns.name) : "@memberof " + exportName(ns.parent),
+ "@namespace"
+ ]);
+ push((config.es6 ? "const" : "var") + " " + escapeName(ns.name) + " = {};");
+ }
+
+ ns.nestedArray.forEach(function(nested) {
+ if (nested instanceof Enum)
+ buildEnum(ns.name, nested);
+ else if (nested instanceof Namespace)
+ buildNamespace(ns.name, nested);
+ });
+ if (ns.name !== "") {
+ push("");
+ push("return " + escapeName(ns.name) + ";");
+ --indent;
+ push("})();");
+ }
+}
+
+var reduceableBlockStatements = {
+ IfStatement: true,
+ ForStatement: true,
+ WhileStatement: true
+};
+
+var shortVars = {
+ "r": "reader",
+ "w": "writer",
+ "m": "message",
+ "t": "tag",
+ "l": "length",
+ "c": "end", "c2": "end2",
+ "k": "key",
+ "ks": "keys", "ks2": "keys2",
+ "e": "error",
+ "f": "impl",
+ "o": "options",
+ "d": "object",
+ "n": "long",
+ "p": "properties"
+};
+
+function beautifyCode(code) {
+ // Add semicolons
+ code = UglifyJS.minify(code, {
+ compress: false,
+ mangle: false,
+ output: { beautify: true }
+ }).code;
+ // Properly beautify
+ var ast = espree.parse(code);
+ estraverse.replace(ast, {
+ enter: function(node, parent) {
+ // rename short vars
+ if (node.type === "Identifier" && (parent.property !== node || parent.computed) && shortVars[node.name])
+ return {
+ "type": "Identifier",
+ "name": shortVars[node.name]
+ };
+ // replace var with let if es6
+ if (config.es6 && node.type === "VariableDeclaration" && node.kind === "var") {
+ node.kind = "let";
+ return undefined;
+ }
+ // remove braces around block statements with a single child
+ if (node.type === "BlockStatement" && reduceableBlockStatements[parent.type] && node.body.length === 1)
+ return node.body[0];
+ return undefined;
+ }
+ });
+ code = escodegen.generate(ast, {
+ format: {
+ newline: "\n",
+ quotes: "double"
+ }
+ });
+ // Add id, wireType comments
+ if (config.comments)
+ code = code.replace(/\.uint32\((\d+)\)/g, function($0, $1) {
+ var id = $1 >>> 3,
+ wireType = $1 & 7;
+ return ".uint32(/* id " + id + ", wireType " + wireType + " =*/" + $1 + ")";
+ });
+ return code;
+}
+
+var renameVars = {
+ "Writer": "$Writer",
+ "Reader": "$Reader",
+ "util": "$util"
+};
+
+function buildFunction(type, functionName, gen, scope) {
+ var code = gen.toString(functionName)
+ .replace(/((?!\.)types\[\d+])(\.values)/g, "$1"); // enums: use types[N] instead of reflected types[N].values
+
+ var ast = espree.parse(code);
+ /* eslint-disable no-extra-parens */
+ estraverse.replace(ast, {
+ enter: function(node, parent) {
+ // rename vars
+ if (
+ node.type === "Identifier" && renameVars[node.name]
+ && (
+ (parent.type === "MemberExpression" && parent.object === node)
+ || (parent.type === "BinaryExpression" && parent.right === node)
+ )
+ )
+ return {
+ "type": "Identifier",
+ "name": renameVars[node.name]
+ };
+ // replace this.ctor with the actual ctor
+ if (
+ node.type === "MemberExpression"
+ && node.object.type === "ThisExpression"
+ && node.property.type === "Identifier" && node.property.name === "ctor"
+ )
+ return {
+ "type": "Identifier",
+ "name": "$root" + type.fullName
+ };
+ // replace types[N] with the field's actual type
+ if (
+ node.type === "MemberExpression"
+ && node.object.type === "Identifier" && node.object.name === "types"
+ && node.property.type === "Literal"
+ )
+ return {
+ "type": "Identifier",
+ "name": "$root" + type.fieldsArray[node.property.value].resolvedType.fullName
+ };
+ return undefined;
+ }
+ });
+ /* eslint-enable no-extra-parens */
+ code = escodegen.generate(ast, {
+ format: {
+ newline: "\n",
+ quotes: "double"
+ }
+ });
+
+ if (config.beautify)
+ code = beautifyCode(code);
+
+ code = code.replace(/ {4}/g, "\t");
+
+ var hasScope = scope && Object.keys(scope).length,
+ isCtor = functionName === type.name;
+
+ if (hasScope) // remove unused scope vars
+ Object.keys(scope).forEach(function(key) {
+ if (!new RegExp("\\b(" + key + ")\\b", "g").test(code))
+ delete scope[key];
+ });
+
+ var lines = code.split(/\n/g);
+ if (isCtor) // constructor
+ push(lines[0]);
+ else if (hasScope) // enclose in an iife
+ push(escapeName(type.name) + "." + escapeName(functionName) + " = (function(" + Object.keys(scope).map(escapeName).join(", ") + ") { return " + lines[0]);
+ else
+ push(escapeName(type.name) + "." + escapeName(functionName) + " = " + lines[0]);
+ lines.slice(1, lines.length - 1).forEach(function(line) {
+ var prev = indent;
+ var i = 0;
+ while (line.charAt(i++) === "\t")
+ ++indent;
+ push(line.trim());
+ indent = prev;
+ });
+ if (isCtor)
+ push("}");
+ else if (hasScope)
+ push("};})(" + Object.keys(scope).map(function(key) { return scope[key]; }).join(", ") + ");");
+ else
+ push("};");
+}
+
+function toJsType(field, forInterface) {
+ var type;
+
+ switch (field.type) {
+ case "double":
+ case "float":
+ case "int32":
+ case "uint32":
+ case "sint32":
+ case "fixed32":
+ case "sfixed32":
+ type = "number";
+ break;
+ case "int64":
+ case "uint64":
+ case "sint64":
+ case "fixed64":
+ case "sfixed64":
+ type = config.forceLong ? "Long" : config.forceNumber ? "number" : "number|Long";
+ break;
+ case "bool":
+ type = "boolean";
+ break;
+ case "string":
+ type = "string";
+ break;
+ case "bytes":
+ type = "Uint8Array";
+ break;
+ default:
+ if (field.resolve().resolvedType)
+ type = exportName(field.resolvedType, !(field.resolvedType instanceof protobuf.Enum || config.forceMessage));
+ else
+ type = "*"; // should not happen
+ break;
+ }
+ if (field.map)
+ return "Object.";
+ if (field.repeated) {
+ var fullType = field.preEncoded() ? type + "|Uint8Array" : type;
+ if (forInterface && field.useToArray()) {
+ return "$protobuf.ToArray.<" + fullType + ">|Array.<" + fullType + ">";
+ }
+ return "Array.<" + fullType + ">";
+ }
+ return type;
+}
+
+function buildType(ref, type) {
+
+ if (config.comments) {
+ var typeDef = [
+ "Properties of " + aOrAn(type.name) + ".",
+ type.parent instanceof protobuf.Root ? "@exports " + escapeName("I" + type.name) : "@memberof " + exportName(type.parent),
+ "@interface " + escapeName("I" + type.name)
+ ];
+ type.fieldsArray.forEach(function(field) {
+ var prop = util.safeProp(field.name); // either .name or ["name"]
+ prop = prop.substring(1, prop.charAt(0) === "[" ? prop.length - 1 : prop.length);
+ var jsType = toJsType(field, true);
+ if (field.optional)
+ jsType = jsType + "|null";
+ typeDef.push("@property {" + jsType + "} " + (field.optional ? "[" + prop + "]" : prop) + " " + (field.comment || type.name + " " + field.name));
+ });
+ push("");
+ pushComment(typeDef);
+ }
+
+ // constructor
+ push("");
+ pushComment([
+ "Constructs a new " + type.name + ".",
+ type.parent instanceof protobuf.Root ? "@exports " + escapeName(type.name) : "@memberof " + exportName(type.parent),
+ "@classdesc " + (type.comment || "Represents " + aOrAn(type.name) + "."),
+ config.comments ? "@implements " + escapeName("I" + type.name) : null,
+ "@constructor",
+ "@param {" + exportName(type, true) + "=} [" + (config.beautify ? "properties" : "p") + "] Properties to set"
+ ]);
+ buildFunction(type, type.name, Type.generateConstructor(type));
+
+ // default values
+ var firstField = true;
+ type.fieldsArray.forEach(function(field) {
+ field.resolve();
+ var prop = util.safeProp(field.name);
+ if (config.comments) {
+ push("");
+ var jsType = toJsType(field, false);
+ if (field.optional && !field.map && !field.repeated && field.resolvedType instanceof Type)
+ jsType = jsType + "|null|undefined";
+ pushComment([
+ field.comment || type.name + " " + field.name + ".",
+ "@member {" + jsType + "} " + field.name,
+ "@memberof " + exportName(type),
+ "@instance"
+ ]);
+ } else if (firstField) {
+ push("");
+ firstField = false;
+ }
+ if (field.repeated)
+ push(escapeName(type.name) + ".prototype" + prop + " = $util.emptyArray;"); // overwritten in constructor
+ else if (field.map)
+ push(escapeName(type.name) + ".prototype" + prop + " = $util.emptyObject;"); // overwritten in constructor
+ else if (field.long)
+ push(escapeName(type.name) + ".prototype" + prop + " = $util.Long ? $util.Long.fromBits("
+ + JSON.stringify(field.typeDefault.low) + ","
+ + JSON.stringify(field.typeDefault.high) + ","
+ + JSON.stringify(field.typeDefault.unsigned)
+ + ") : " + field.typeDefault.toNumber(field.type.charAt(0) === "u") + ";");
+ else if (field.bytes) {
+ push(escapeName(type.name) + ".prototype" + prop + " = $util.newBuffer(" + JSON.stringify(Array.prototype.slice.call(field.typeDefault)) + ");");
+ } else
+ push(escapeName(type.name) + ".prototype" + prop + " = " + JSON.stringify(field.typeDefault) + ";");
+ });
+
+ // virtual oneof fields
+ var firstOneOf = true;
+ type.oneofsArray.forEach(function(oneof) {
+ if (firstOneOf) {
+ firstOneOf = false;
+ push("");
+ if (config.comments)
+ push("// OneOf field names bound to virtual getters and setters");
+ push((config.es6 ? "let" : "var") + " $oneOfFields;");
+ }
+ oneof.resolve();
+ push("");
+ pushComment([
+ oneof.comment || type.name + " " + oneof.name + ".",
+ "@member {" + oneof.oneof.map(JSON.stringify).join("|") + "|undefined} " + escapeName(oneof.name),
+ "@memberof " + exportName(type),
+ "@instance"
+ ]);
+ push("Object.defineProperty(" + escapeName(type.name) + ".prototype, " + JSON.stringify(oneof.name) +", {");
+ ++indent;
+ push("get: $util.oneOfGetter($oneOfFields = [" + oneof.oneof.map(JSON.stringify).join(", ") + "]),");
+ push("set: $util.oneOfSetter($oneOfFields)");
+ --indent;
+ push("});");
+ });
+
+ if (config.create) {
+ push("");
+ pushComment([
+ "Creates a new " + type.name + " instance using the specified properties.",
+ "@function create",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {" + exportName(type, true) + "=} [properties] Properties to set",
+ "@returns {" + exportName(type) + "} " + type.name + " instance"
+ ]);
+ push(escapeName(type.name) + ".create = function create(properties) {");
+ ++indent;
+ push("return new " + escapeName(type.name) + "(properties);");
+ --indent;
+ push("};");
+ }
+
+ if (config.encode) {
+ push("");
+ pushComment([
+ "Encodes the specified " + type.name + " message. Does not implicitly {@link " + exportName(type) + ".verify|verify} messages.",
+ "@function encode",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {" + exportName(type, !config.forceMessage) + "} " + (config.beautify ? "message" : "m") + " " + type.name + " message or plain object to encode",
+ "@param {$protobuf.Writer} [" + (config.beautify ? "writer" : "w") + "] Writer to encode to",
+ "@returns {$protobuf.Writer} Writer"
+ ]);
+ buildFunction(type, "encode", protobuf.encoder(type));
+
+ if (config.delimited) {
+ push("");
+ pushComment([
+ "Encodes the specified " + type.name + " message, length delimited. Does not implicitly {@link " + exportName(type) + ".verify|verify} messages.",
+ "@function encodeDelimited",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {" + exportName(type, !config.forceMessage) + "} message " + type.name + " message or plain object to encode",
+ "@param {$protobuf.Writer} [writer] Writer to encode to",
+ "@returns {$protobuf.Writer} Writer"
+ ]);
+ push(escapeName(type.name) + ".encodeDelimited = function encodeDelimited(message, writer) {");
+ ++indent;
+ push("return this.encode(message, writer).ldelim();");
+ --indent;
+ push("};");
+ }
+ }
+
+ if (config.decode) {
+ push("");
+ pushComment([
+ "Decodes " + aOrAn(type.name) + " message from the specified reader or buffer.",
+ "@function decode",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {$protobuf.Reader|Uint8Array} " + (config.beautify ? "reader" : "r") + " Reader or buffer to decode from",
+ "@param {number} [" + (config.beautify ? "length" : "l") + "] Message length if known beforehand",
+ "@returns {" + exportName(type) + "} " + type.name,
+ "@throws {Error} If the payload is not a reader or valid buffer",
+ "@throws {$protobuf.util.ProtocolError} If required fields are missing"
+ ]);
+ buildFunction(type, "decode", protobuf.decoder(type));
+
+ if (config.delimited) {
+ push("");
+ pushComment([
+ "Decodes " + aOrAn(type.name) + " message from the specified reader or buffer, length delimited.",
+ "@function decodeDelimited",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from",
+ "@returns {" + exportName(type) + "} " + type.name,
+ "@throws {Error} If the payload is not a reader or valid buffer",
+ "@throws {$protobuf.util.ProtocolError} If required fields are missing"
+ ]);
+ push(escapeName(type.name) + ".decodeDelimited = function decodeDelimited(reader) {");
+ ++indent;
+ push("if (!(reader instanceof $Reader))");
+ ++indent;
+ push("reader = new $Reader(reader);");
+ --indent;
+ push("return this.decode(reader, reader.uint32());");
+ --indent;
+ push("};");
+ }
+ }
+
+ if (config.verify) {
+ push("");
+ pushComment([
+ "Verifies " + aOrAn(type.name) + " message.",
+ "@function verify",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {Object.} " + (config.beautify ? "message" : "m") + " Plain object to verify",
+ "@returns {string|null} `null` if valid, otherwise the reason why it is not"
+ ]);
+ buildFunction(type, "verify", protobuf.verifier(type));
+ }
+
+ if (config.convert) {
+ if (config.fromObject) {
+ push("");
+ pushComment([
+ "Creates " + aOrAn(type.name) + " message from a plain object. Also converts values to their respective internal types.",
+ "@function fromObject",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {Object.} " + (config.beautify ? "object" : "d") + " Plain object",
+ "@returns {" + exportName(type) + "} " + type.name
+ ]);
+ buildFunction(type, "fromObject", protobuf.converter.fromObject(type));
+ }
+
+ push("");
+ pushComment([
+ "Creates a plain object from " + aOrAn(type.name) + " message. Also converts values to other types if specified.",
+ "@function toObject",
+ "@memberof " + exportName(type),
+ "@static",
+ "@param {" + exportName(type) + "} " + (config.beautify ? "message" : "m") + " " + type.name,
+ "@param {$protobuf.IConversionOptions} [" + (config.beautify ? "options" : "o") + "] Conversion options",
+ "@returns {Object.} Plain object"
+ ]);
+ buildFunction(type, "toObject", protobuf.converter.toObject(type));
+
+ push("");
+ pushComment([
+ "Converts this " + type.name + " to JSON.",
+ "@function toJSON",
+ "@memberof " + exportName(type),
+ "@instance",
+ "@returns {Object.} JSON object"
+ ]);
+ push(escapeName(type.name) + ".prototype.toJSON = function toJSON() {");
+ ++indent;
+ push("return this.constructor.toObject(this, $protobuf.util.toJSONOptions);");
+ --indent;
+ push("};");
+ }
+}
+
+function buildService(ref, service) {
+
+ push("");
+ pushComment([
+ "Constructs a new " + service.name + " service.",
+ service.parent instanceof protobuf.Root ? "@exports " + escapeName(service.name) : "@memberof " + exportName(service.parent),
+ "@classdesc " + (service.comment || "Represents " + aOrAn(service.name)),
+ "@extends $protobuf.rpc.Service",
+ "@constructor",
+ "@param {$protobuf.RPCImpl} rpcImpl RPC implementation",
+ "@param {boolean} [requestDelimited=false] Whether requests are length-delimited",
+ "@param {boolean} [responseDelimited=false] Whether responses are length-delimited"
+ ]);
+ push("function " + escapeName(service.name) + "(rpcImpl, requestDelimited, responseDelimited) {");
+ ++indent;
+ push("$protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);");
+ --indent;
+ push("}");
+ push("");
+ push("(" + escapeName(service.name) + ".prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = " + escapeName(service.name) + ";");
+
+ if (config.create) {
+ push("");
+ pushComment([
+ "Creates new " + service.name + " service using the specified rpc implementation.",
+ "@function create",
+ "@memberof " + exportName(service),
+ "@static",
+ "@param {$protobuf.RPCImpl} rpcImpl RPC implementation",
+ "@param {boolean} [requestDelimited=false] Whether requests are length-delimited",
+ "@param {boolean} [responseDelimited=false] Whether responses are length-delimited",
+ "@returns {" + escapeName(service.name) + "} RPC service. Useful where requests and/or responses are streamed."
+ ]);
+ push(escapeName(service.name) + ".create = function create(rpcImpl, requestDelimited, responseDelimited) {");
+ ++indent;
+ push("return new this(rpcImpl, requestDelimited, responseDelimited);");
+ --indent;
+ push("};");
+ }
+
+ service.methodsArray.forEach(function(method) {
+ method.resolve();
+ var lcName = protobuf.util.lcFirst(method.name),
+ cbName = escapeName(method.name + "Callback");
+ push("");
+ pushComment([
+ "Callback as used by {@link " + exportName(service) + "#" + escapeName(lcName) + "}.",
+ // This is a more specialized version of protobuf.rpc.ServiceCallback
+ "@memberof " + exportName(service),
+ "@typedef " + cbName,
+ "@type {function}",
+ "@param {Error|null} error Error, if any",
+ "@param {" + exportName(method.resolvedResponseType) + "} [response] " + method.resolvedResponseType.name
+ ]);
+ push("");
+ pushComment([
+ method.comment || "Calls " + method.name + ".",
+ "@function " + lcName,
+ "@memberof " + exportName(service),
+ "@instance",
+ "@param {" + exportName(method.resolvedRequestType, !config.forceMessage) + "} request " + method.resolvedRequestType.name + " message or plain object",
+ "@param {" + exportName(service) + "." + cbName + "} callback Node-style callback called with the error, if any, and " + method.resolvedResponseType.name,
+ "@returns {undefined}",
+ "@variation 1"
+ ]);
+ push("Object.defineProperty(" + escapeName(service.name) + ".prototype" + util.safeProp(lcName) + " = function " + escapeName(lcName) + "(request, callback) {");
+ ++indent;
+ push("return this.rpcCall(" + escapeName(lcName) + ", $root." + exportName(method.resolvedRequestType) + ", $root." + exportName(method.resolvedResponseType) + ", request, callback);");
+ --indent;
+ push("}, \"name\", { value: " + JSON.stringify(method.name) + " });");
+ if (config.comments)
+ push("");
+ pushComment([
+ method.comment || "Calls " + method.name + ".",
+ "@function " + lcName,
+ "@memberof " + exportName(service),
+ "@instance",
+ "@param {" + exportName(method.resolvedRequestType, !config.forceMessage) + "} request " + method.resolvedRequestType.name + " message or plain object",
+ "@returns {Promise<" + exportName(method.resolvedResponseType) + ">} Promise",
+ "@variation 2"
+ ]);
+ });
+}
+
+function buildEnum(ref, enm) {
+
+ push("");
+ var comment = [
+ enm.comment || enm.name + " enum.",
+ enm.parent instanceof protobuf.Root ? "@exports " + escapeName(enm.name) : "@name " + exportName(enm),
+ config.forceEnumString ? "@enum {number}" : "@enum {string}",
+ ];
+ Object.keys(enm.values).forEach(function(key) {
+ var val = config.forceEnumString ? key : enm.values[key];
+ comment.push((config.forceEnumString ? "@property {string} " : "@property {number} ") + key + "=" + val + " " + (enm.comments[key] || key + " value"));
+ });
+ pushComment(comment);
+ push(escapeName(ref) + "." + escapeName(enm.name) + " = (function() {");
+ ++indent;
+ push((config.es6 ? "const" : "var") + " valuesById = {}, values = Object.create(valuesById);");
+ var aliased = [];
+ Object.keys(enm.values).forEach(function(key) {
+ var valueId = enm.values[key];
+ var val = config.forceEnumString ? JSON.stringify(key) : valueId;
+ if (aliased.indexOf(valueId) > -1)
+ push("values[" + JSON.stringify(key) + "] = " + val + ";");
+ else {
+ push("values[valuesById[" + valueId + "] = " + JSON.stringify(key) + "] = " + val + ";");
+ aliased.push(valueId);
+ }
+ });
+ push("return values;");
+ --indent;
+ push("})();");
+}
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/util.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/util.js
new file mode 100644
index 00000000..40ad29d4
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/util.js
@@ -0,0 +1,183 @@
+"use strict";
+var fs = require("fs"),
+ path = require("path"),
+ child_process = require("child_process");
+
+var semver;
+
+try {
+ // installed as a peer dependency
+ require.resolve("@apollo/protobufjs");
+ exports.pathToProtobufJs = "@apollo/protobufjs";
+} catch (e) {
+ // local development, i.e. forked from github
+ exports.pathToProtobufJs = "..";
+}
+
+var protobuf = require(exports.pathToProtobufJs);
+
+function basenameCompare(a, b) {
+ var aa = String(a).replace(/\.\w+$/, "").split(/(-?\d*\.?\d+)/g),
+ bb = String(b).replace(/\.\w+$/, "").split(/(-?\d*\.?\d+)/g);
+ for (var i = 0, k = Math.min(aa.length, bb.length); i < k; i++) {
+ var x = parseFloat(aa[i]) || aa[i].toLowerCase(),
+ y = parseFloat(bb[i]) || bb[i].toLowerCase();
+ if (x < y)
+ return -1;
+ if (x > y)
+ return 1;
+ }
+ return a.length < b.length ? -1 : 0;
+}
+
+exports.requireAll = function requireAll(dirname) {
+ dirname = path.join(__dirname, dirname);
+ var files = fs.readdirSync(dirname).sort(basenameCompare),
+ all = {};
+ files.forEach(function(file) {
+ var basename = path.basename(file, ".js"),
+ extname = path.extname(file);
+ if (extname === ".js")
+ all[basename] = require(path.join(dirname, file));
+ });
+ return all;
+};
+
+exports.traverse = function traverse(current, fn) {
+ fn(current);
+ if (current.fieldsArray)
+ current.fieldsArray.forEach(function(field) {
+ traverse(field, fn);
+ });
+ if (current.oneofsArray)
+ current.oneofsArray.forEach(function(oneof) {
+ traverse(oneof, fn);
+ });
+ if (current.methodsArray)
+ current.methodsArray.forEach(function(method) {
+ traverse(method, fn);
+ });
+ if (current.nestedArray)
+ current.nestedArray.forEach(function(nested) {
+ traverse(nested, fn);
+ });
+};
+
+exports.traverseResolved = function traverseResolved(current, fn) {
+ fn(current);
+ if (current.resolvedType)
+ traverseResolved(current.resolvedType, fn);
+ if (current.resolvedKeyType)
+ traverseResolved(current.resolvedKeyType, fn);
+ if (current.resolvedRequestType)
+ traverseResolved(current.resolvedRequestType, fn);
+ if (current.resolvedResponseType)
+ traverseResolved(current.resolvedResponseType, fn);
+};
+
+exports.inspect = function inspect(object, indent) {
+ if (!object)
+ return "";
+ var chalk = require("chalk");
+ var sb = [];
+ if (!indent)
+ indent = "";
+ var ind = indent ? indent.substring(0, indent.length - 2) + "└ " : "";
+ sb.push(
+ ind + chalk.bold(object.toString()) + (object.visible ? " (visible)" : ""),
+ indent + chalk.gray("parent: ") + object.parent
+ );
+ if (object instanceof protobuf.Field) {
+ if (object.extend !== undefined)
+ sb.push(indent + chalk.gray("extend: ") + object.extend);
+ if (object.partOf)
+ sb.push(indent + chalk.gray("oneof : ") + object.oneof);
+ }
+ sb.push("");
+ if (object.fieldsArray)
+ object.fieldsArray.forEach(function(field) {
+ sb.push(inspect(field, indent + " "));
+ });
+ if (object.oneofsArray)
+ object.oneofsArray.forEach(function(oneof) {
+ sb.push(inspect(oneof, indent + " "));
+ });
+ if (object.methodsArray)
+ object.methodsArray.forEach(function(service) {
+ sb.push(inspect(service, indent + " "));
+ });
+ if (object.nestedArray)
+ object.nestedArray.forEach(function(nested) {
+ sb.push(inspect(nested, indent + " "));
+ });
+ return sb.join("\n");
+};
+
+function modExists(name, version) {
+ for (var i = 0; i < module.paths.length; ++i) {
+ try {
+ var pkg = JSON.parse(fs.readFileSync(path.join(module.paths[i], name, "package.json")));
+ return semver
+ ? semver.satisfies(pkg.version, version)
+ : parseInt(pkg.version, 10) === parseInt(version.replace(/^[\^~]/, ""), 10); // used for semver only
+ } catch (e) {/**/}
+ }
+ return false;
+}
+
+function modInstall(install) {
+ child_process.execSync("npm --silent install " + (typeof install === "string" ? install : install.join(" ")), {
+ cwd: __dirname,
+ stdio: "ignore"
+ });
+}
+
+exports.setup = function() {
+ var pkg = require(path.join(__dirname, "..", "package.json"));
+ var version = pkg.dependencies["semver"] || pkg.devDependencies["semver"];
+ if (!modExists("semver", version)) {
+ process.stderr.write("installing semver@" + version + "\n");
+ modInstall("semver@" + version);
+ }
+ semver = require("semver"); // used from now on for version comparison
+ var install = [];
+ pkg.cliDependencies.forEach(function(name) {
+ if (name === "semver")
+ return;
+ version = pkg.dependencies[name] || pkg.devDependencies[name];
+ if (!modExists(name, version)) {
+ process.stderr.write("installing " + name + "@" + version + "\n");
+ install.push(name + "@" + version);
+ }
+ });
+ require("../scripts/postinstall"); // emit postinstall warning, if any
+ if (!install.length)
+ return;
+ modInstall(install);
+};
+
+exports.wrap = function(OUTPUT, options) {
+ var name = options.wrap || "default";
+ var wrap;
+ try {
+ // try built-in wrappers first
+ wrap = fs.readFileSync(path.join(__dirname, "wrappers", name + ".js")).toString("utf8");
+ } catch (e) {
+ // otherwise fetch the custom one
+ wrap = fs.readFileSync(path.resolve(process.cwd(), name)).toString("utf8");
+ }
+ wrap = wrap.replace(/\$DEPENDENCY/g, JSON.stringify(options.dependency || "@apollo/protobufjs"));
+ wrap = wrap.replace(/( *)\$OUTPUT;/, function($0, $1) {
+ return $1.length ? OUTPUT.replace(/^/mg, $1) : OUTPUT;
+ });
+ if (options.lint !== "")
+ wrap = "/*" + options.lint + "*/\n" + wrap;
+ return wrap.replace(/\r?\n/g, "\n");
+};
+
+exports.pad = function(str, len, l) {
+ while (str.length < len)
+ str = l ? str + " " : " " + str;
+ return str;
+};
+
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/amd.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/amd.js
new file mode 100644
index 00000000..c43dd73c
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/amd.js
@@ -0,0 +1,7 @@
+define([$DEPENDENCY], function($protobuf) {
+ "use strict";
+
+ $OUTPUT;
+
+ return $root;
+});
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/closure.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/closure.js
new file mode 100644
index 00000000..c94327c5
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/closure.js
@@ -0,0 +1,7 @@
+(function($protobuf) {
+ "use strict";
+
+ $OUTPUT;
+
+ return $root;
+})(protobuf);
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/commonjs.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/commonjs.js
new file mode 100644
index 00000000..6dc91684
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/commonjs.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var $protobuf = require($DEPENDENCY);
+
+$OUTPUT;
+
+module.exports = $root;
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/default.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/default.js
new file mode 100644
index 00000000..34b29ec7
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/default.js
@@ -0,0 +1,15 @@
+(function(global, factory) { /* global define, require, module */
+
+ /* AMD */ if (typeof define === 'function' && define.amd)
+ define([$DEPENDENCY], factory);
+
+ /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
+ module.exports = factory(require($DEPENDENCY));
+
+})(this, function($protobuf) {
+ "use strict";
+
+ $OUTPUT;
+
+ return $root;
+});
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/es6.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/es6.js
new file mode 100644
index 00000000..33246d70
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/cli/wrappers/es6.js
@@ -0,0 +1,5 @@
+import $protobuf from $DEPENDENCY;
+
+$OUTPUT;
+
+export { $root as default };
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/README.md b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/README.md
new file mode 100644
index 00000000..93a54ccd
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/README.md
@@ -0,0 +1,31 @@
+This folder contains prebuilt browser versions of the full library. When sending pull requests, it is not required to update these.
+
+Prebuilt files are in source control to enable pain-free frontend respectively CDN usage:
+
+CDN usage
+---------
+
+Development:
+```
+
+```
+
+Production:
+```
+
+```
+
+**NOTE:** Remember to replace the version tag with the exact [release](https://github.com/dcodeIO/protobuf.js/tags) your project depends upon.
+
+Frontend usage
+--------------
+
+Development:
+```
+
+```
+
+Production:
+```
+
+```
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/README.md b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/README.md
new file mode 100644
index 00000000..2122c3fd
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/README.md
@@ -0,0 +1,31 @@
+This folder contains prebuilt browser versions of the light library suitable for use with reflection, static code and JSON descriptors / modules. When sending pull requests, it is not required to update these.
+
+Prebuilt files are in source control to enable pain-free frontend respectively CDN usage:
+
+CDN usage
+---------
+
+Development:
+```
+
+```
+
+Production:
+```
+
+```
+
+**NOTE:** Remember to replace the version tag with the exact [release](https://github.com/dcodeIO/protobuf.js/tags) your project depends upon.
+
+Frontend usage
+--------------
+
+Development:
+```
+
+```
+
+Production:
+```
+
+```
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/protobuf.js b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/protobuf.js
new file mode 100644
index 00000000..90b6fa66
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/protobuf.js
@@ -0,0 +1,7198 @@
+/*!
+ * protobuf.js (c) 2016, daniel wirtz
+ * licensed under the bsd-3-clause license
+ * see: https://github.com/apollographql/protobuf.js for details
+ */
+(function(undefined){"use strict";(function prelude(modules, cache, entries) {
+
+ // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS
+ // sources through a conflict-free require shim and is again wrapped within an iife that
+ // provides a minification-friendly `undefined` var plus a global "use strict" directive
+ // so that minification can remove the directives of each module.
+
+ function $require(name) {
+ var $module = cache[name];
+ if (!$module)
+ modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);
+ return $module.exports;
+ }
+
+ var protobuf = $require(entries[0]);
+
+ // Expose globally
+ protobuf.util.global.protobuf = protobuf;
+
+ // Be nice to AMD
+ if (typeof define === "function" && define.amd)
+ define(["long"], function(Long) {
+ if (Long && Long.isLong) {
+ protobuf.util.Long = Long;
+ protobuf.configure();
+ }
+ return protobuf;
+ });
+
+ // Be nice to CommonJS
+ if (typeof module === "object" && module && module.exports)
+ module.exports = protobuf;
+
+})/* end of prelude */({1:[function(require,module,exports){
+"use strict";
+module.exports = asPromise;
+
+/**
+ * Callback as used by {@link util.asPromise}.
+ * @typedef asPromiseCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {...*} params Additional arguments
+ * @returns {undefined}
+ */
+
+/**
+ * Returns a promise from a node-style callback function.
+ * @memberof util
+ * @param {asPromiseCallback} fn Function to call
+ * @param {*} ctx Function context
+ * @param {...*} params Function arguments
+ * @returns {Promise<*>} Promisified function
+ */
+function asPromise(fn, ctx/*, varargs */) {
+ var params = new Array(arguments.length - 1),
+ offset = 0,
+ index = 2,
+ pending = true;
+ while (index < arguments.length)
+ params[offset++] = arguments[index++];
+ return new Promise(function executor(resolve, reject) {
+ params[offset] = function callback(err/*, varargs */) {
+ if (pending) {
+ pending = false;
+ if (err)
+ reject(err);
+ else {
+ var params = new Array(arguments.length - 1),
+ offset = 0;
+ while (offset < params.length)
+ params[offset++] = arguments[offset];
+ resolve.apply(null, params);
+ }
+ }
+ };
+ try {
+ fn.apply(ctx || null, params);
+ } catch (err) {
+ if (pending) {
+ pending = false;
+ reject(err);
+ }
+ }
+ });
+}
+
+},{}],2:[function(require,module,exports){
+"use strict";
+
+/**
+ * A minimal base64 implementation for number arrays.
+ * @memberof util
+ * @namespace
+ */
+var base64 = exports;
+
+/**
+ * Calculates the byte length of a base64 encoded string.
+ * @param {string} string Base64 encoded string
+ * @returns {number} Byte length
+ */
+base64.length = function length(string) {
+ var p = string.length;
+ if (!p)
+ return 0;
+ var n = 0;
+ while (--p % 4 > 1 && string.charAt(p) === "=")
+ ++n;
+ return Math.ceil(string.length * 3) / 4 - n;
+};
+
+// Base64 encoding table
+var b64 = new Array(64);
+
+// Base64 decoding table
+var s64 = new Array(123);
+
+// 65..90, 97..122, 48..57, 43, 47
+for (var i = 0; i < 64;)
+ s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
+
+/**
+ * Encodes a buffer to a base64 encoded string.
+ * @param {Uint8Array} buffer Source buffer
+ * @param {number} start Source start
+ * @param {number} end Source end
+ * @returns {string} Base64 encoded string
+ */
+base64.encode = function encode(buffer, start, end) {
+ var parts = null,
+ chunk = [];
+ var i = 0, // output index
+ j = 0, // goto index
+ t; // temporary
+ while (start < end) {
+ var b = buffer[start++];
+ switch (j) {
+ case 0:
+ chunk[i++] = b64[b >> 2];
+ t = (b & 3) << 4;
+ j = 1;
+ break;
+ case 1:
+ chunk[i++] = b64[t | b >> 4];
+ t = (b & 15) << 2;
+ j = 2;
+ break;
+ case 2:
+ chunk[i++] = b64[t | b >> 6];
+ chunk[i++] = b64[b & 63];
+ j = 0;
+ break;
+ }
+ if (i > 8191) {
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
+ i = 0;
+ }
+ }
+ if (j) {
+ chunk[i++] = b64[t];
+ chunk[i++] = 61;
+ if (j === 1)
+ chunk[i++] = 61;
+ }
+ if (parts) {
+ if (i)
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
+ return parts.join("");
+ }
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
+};
+
+var invalidEncoding = "invalid encoding";
+
+/**
+ * Decodes a base64 encoded string to a buffer.
+ * @param {string} string Source string
+ * @param {Uint8Array} buffer Destination buffer
+ * @param {number} offset Destination offset
+ * @returns {number} Number of bytes written
+ * @throws {Error} If encoding is invalid
+ */
+base64.decode = function decode(string, buffer, offset) {
+ var start = offset;
+ var j = 0, // goto index
+ t; // temporary
+ for (var i = 0; i < string.length;) {
+ var c = string.charCodeAt(i++);
+ if (c === 61 && j > 1)
+ break;
+ if ((c = s64[c]) === undefined)
+ throw Error(invalidEncoding);
+ switch (j) {
+ case 0:
+ t = c;
+ j = 1;
+ break;
+ case 1:
+ buffer[offset++] = t << 2 | (c & 48) >> 4;
+ t = c;
+ j = 2;
+ break;
+ case 2:
+ buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
+ t = c;
+ j = 3;
+ break;
+ case 3:
+ buffer[offset++] = (t & 3) << 6 | c;
+ j = 0;
+ break;
+ }
+ }
+ if (j === 1)
+ throw Error(invalidEncoding);
+ return offset - start;
+};
+
+/**
+ * Tests if the specified string appears to be base64 encoded.
+ * @param {string} string String to test
+ * @returns {boolean} `true` if probably base64 encoded, otherwise false
+ */
+base64.test = function test(string) {
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
+};
+
+},{}],3:[function(require,module,exports){
+"use strict";
+module.exports = codegen;
+
+/**
+ * Begins generating a function.
+ * @memberof util
+ * @param {string[]} functionParams Function parameter names
+ * @param {string} [functionName] Function name if not anonymous
+ * @returns {Codegen} Appender that appends code to the function's body
+ */
+function codegen(functionParams, functionName) {
+
+ /* istanbul ignore if */
+ if (typeof functionParams === "string") {
+ functionName = functionParams;
+ functionParams = undefined;
+ }
+
+ var body = [];
+
+ /**
+ * Appends code to the function's body or finishes generation.
+ * @typedef Codegen
+ * @type {function}
+ * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
+ * @param {...*} [formatParams] Format parameters
+ * @returns {Codegen|Function} Itself or the generated function if finished
+ * @throws {Error} If format parameter counts do not match
+ */
+
+ function Codegen(formatStringOrScope) {
+ // note that explicit array handling below makes this ~50% faster
+
+ // finish the function
+ if (typeof formatStringOrScope !== "string") {
+ var source = toString();
+ if (codegen.verbose)
+ console.log("codegen: " + source); // eslint-disable-line no-console
+ source = "return " + source;
+ if (formatStringOrScope) {
+ var scopeKeys = Object.keys(formatStringOrScope),
+ scopeParams = new Array(scopeKeys.length + 1),
+ scopeValues = new Array(scopeKeys.length),
+ scopeOffset = 0;
+ while (scopeOffset < scopeKeys.length) {
+ scopeParams[scopeOffset] = scopeKeys[scopeOffset];
+ scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];
+ }
+ scopeParams[scopeOffset] = source;
+ return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func
+ }
+ return Function(source)(); // eslint-disable-line no-new-func
+ }
+
+ // otherwise append to body
+ var formatParams = new Array(arguments.length - 1),
+ formatOffset = 0;
+ while (formatOffset < formatParams.length)
+ formatParams[formatOffset] = arguments[++formatOffset];
+ formatOffset = 0;
+ formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {
+ var value = formatParams[formatOffset++];
+ switch ($1) {
+ case "d": case "f": return String(Number(value));
+ case "i": return String(Math.floor(value));
+ case "j": return JSON.stringify(value);
+ case "s": return String(value);
+ }
+ return "%";
+ });
+ if (formatOffset !== formatParams.length)
+ throw Error("parameter count mismatch");
+ body.push(formatStringOrScope);
+ return Codegen;
+ }
+
+ function toString(functionNameOverride) {
+ return "function " + (functionNameOverride || functionName || "") + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}";
+ }
+
+ Codegen.toString = toString;
+ return Codegen;
+}
+
+/**
+ * Begins generating a function.
+ * @memberof util
+ * @function codegen
+ * @param {string} [functionName] Function name if not anonymous
+ * @returns {Codegen} Appender that appends code to the function's body
+ * @variation 2
+ */
+
+/**
+ * When set to `true`, codegen will log generated code to console. Useful for debugging.
+ * @name util.codegen.verbose
+ * @type {boolean}
+ */
+codegen.verbose = false;
+
+},{}],4:[function(require,module,exports){
+"use strict";
+module.exports = EventEmitter;
+
+/**
+ * Constructs a new event emitter instance.
+ * @classdesc A minimal event emitter.
+ * @memberof util
+ * @constructor
+ */
+function EventEmitter() {
+
+ /**
+ * Registered listeners.
+ * @type {Object.}
+ * @private
+ */
+ this._listeners = {};
+}
+
+/**
+ * Registers an event listener.
+ * @param {string} evt Event name
+ * @param {function} fn Listener
+ * @param {*} [ctx] Listener context
+ * @returns {util.EventEmitter} `this`
+ */
+EventEmitter.prototype.on = function on(evt, fn, ctx) {
+ (this._listeners[evt] || (this._listeners[evt] = [])).push({
+ fn : fn,
+ ctx : ctx || this
+ });
+ return this;
+};
+
+/**
+ * Removes an event listener or any matching listeners if arguments are omitted.
+ * @param {string} [evt] Event name. Removes all listeners if omitted.
+ * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
+ * @returns {util.EventEmitter} `this`
+ */
+EventEmitter.prototype.off = function off(evt, fn) {
+ if (evt === undefined)
+ this._listeners = {};
+ else {
+ if (fn === undefined)
+ this._listeners[evt] = [];
+ else {
+ var listeners = this._listeners[evt];
+ for (var i = 0; i < listeners.length;)
+ if (listeners[i].fn === fn)
+ listeners.splice(i, 1);
+ else
+ ++i;
+ }
+ }
+ return this;
+};
+
+/**
+ * Emits an event by calling its listeners with the specified arguments.
+ * @param {string} evt Event name
+ * @param {...*} args Arguments
+ * @returns {util.EventEmitter} `this`
+ */
+EventEmitter.prototype.emit = function emit(evt) {
+ var listeners = this._listeners[evt];
+ if (listeners) {
+ var args = [],
+ i = 1;
+ for (; i < arguments.length;)
+ args.push(arguments[i++]);
+ for (i = 0; i < listeners.length;)
+ listeners[i].fn.apply(listeners[i++].ctx, args);
+ }
+ return this;
+};
+
+},{}],5:[function(require,module,exports){
+"use strict";
+module.exports = fetch;
+
+var asPromise = require(1),
+ inquire = require(7);
+
+var fs = inquire("fs");
+
+/**
+ * Node-style callback as used by {@link util.fetch}.
+ * @typedef FetchCallback
+ * @type {function}
+ * @param {?Error} error Error, if any, otherwise `null`
+ * @param {string} [contents] File contents, if there hasn't been an error
+ * @returns {undefined}
+ */
+
+/**
+ * Options as used by {@link util.fetch}.
+ * @typedef FetchOptions
+ * @type {Object}
+ * @property {boolean} [binary=false] Whether expecting a binary response
+ * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest
+ */
+
+/**
+ * Fetches the contents of a file.
+ * @memberof util
+ * @param {string} filename File path or url
+ * @param {FetchOptions} options Fetch options
+ * @param {FetchCallback} callback Callback function
+ * @returns {undefined}
+ */
+function fetch(filename, options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = {};
+ } else if (!options)
+ options = {};
+
+ if (!callback)
+ return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this
+
+ // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.
+ if (!options.xhr && fs && fs.readFile)
+ return fs.readFile(filename, function fetchReadFileCallback(err, contents) {
+ return err && typeof XMLHttpRequest !== "undefined"
+ ? fetch.xhr(filename, options, callback)
+ : err
+ ? callback(err)
+ : callback(null, options.binary ? contents : contents.toString("utf8"));
+ });
+
+ // use the XHR version otherwise.
+ return fetch.xhr(filename, options, callback);
+}
+
+/**
+ * Fetches the contents of a file.
+ * @name util.fetch
+ * @function
+ * @param {string} path File path or url
+ * @param {FetchCallback} callback Callback function
+ * @returns {undefined}
+ * @variation 2
+ */
+
+/**
+ * Fetches the contents of a file.
+ * @name util.fetch
+ * @function
+ * @param {string} path File path or url
+ * @param {FetchOptions} [options] Fetch options
+ * @returns {Promise} Promise
+ * @variation 3
+ */
+
+/**/
+fetch.xhr = function fetch_xhr(filename, options, callback) {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {
+
+ if (xhr.readyState !== 4)
+ return undefined;
+
+ // local cors security errors return status 0 / empty string, too. afaik this cannot be
+ // reliably distinguished from an actually empty file for security reasons. feel free
+ // to send a pull request if you are aware of a solution.
+ if (xhr.status !== 0 && xhr.status !== 200)
+ return callback(Error("status " + xhr.status));
+
+ // if binary data is expected, make sure that some sort of array is returned, even if
+ // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.
+ if (options.binary) {
+ var buffer = xhr.response;
+ if (!buffer) {
+ buffer = [];
+ for (var i = 0; i < xhr.responseText.length; ++i)
+ buffer.push(xhr.responseText.charCodeAt(i) & 255);
+ }
+ return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer);
+ }
+ return callback(null, xhr.responseText);
+ };
+
+ if (options.binary) {
+ // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers
+ if ("overrideMimeType" in xhr)
+ xhr.overrideMimeType("text/plain; charset=x-user-defined");
+ xhr.responseType = "arraybuffer";
+ }
+
+ xhr.open("GET", filename);
+ xhr.send();
+};
+
+},{"1":1,"7":7}],6:[function(require,module,exports){
+"use strict";
+
+module.exports = factory(factory);
+
+/**
+ * Reads / writes floats / doubles from / to buffers.
+ * @name util.float
+ * @namespace
+ */
+
+/**
+ * Writes a 32 bit float to a buffer using little endian byte order.
+ * @name util.float.writeFloatLE
+ * @function
+ * @param {number} val Value to write
+ * @param {Uint8Array} buf Target buffer
+ * @param {number} pos Target buffer offset
+ * @returns {undefined}
+ */
+
+/**
+ * Writes a 32 bit float to a buffer using big endian byte order.
+ * @name util.float.writeFloatBE
+ * @function
+ * @param {number} val Value to write
+ * @param {Uint8Array} buf Target buffer
+ * @param {number} pos Target buffer offset
+ * @returns {undefined}
+ */
+
+/**
+ * Reads a 32 bit float from a buffer using little endian byte order.
+ * @name util.float.readFloatLE
+ * @function
+ * @param {Uint8Array} buf Source buffer
+ * @param {number} pos Source buffer offset
+ * @returns {number} Value read
+ */
+
+/**
+ * Reads a 32 bit float from a buffer using big endian byte order.
+ * @name util.float.readFloatBE
+ * @function
+ * @param {Uint8Array} buf Source buffer
+ * @param {number} pos Source buffer offset
+ * @returns {number} Value read
+ */
+
+/**
+ * Writes a 64 bit double to a buffer using little endian byte order.
+ * @name util.float.writeDoubleLE
+ * @function
+ * @param {number} val Value to write
+ * @param {Uint8Array} buf Target buffer
+ * @param {number} pos Target buffer offset
+ * @returns {undefined}
+ */
+
+/**
+ * Writes a 64 bit double to a buffer using big endian byte order.
+ * @name util.float.writeDoubleBE
+ * @function
+ * @param {number} val Value to write
+ * @param {Uint8Array} buf Target buffer
+ * @param {number} pos Target buffer offset
+ * @returns {undefined}
+ */
+
+/**
+ * Reads a 64 bit double from a buffer using little endian byte order.
+ * @name util.float.readDoubleLE
+ * @function
+ * @param {Uint8Array} buf Source buffer
+ * @param {number} pos Source buffer offset
+ * @returns {number} Value read
+ */
+
+/**
+ * Reads a 64 bit double from a buffer using big endian byte order.
+ * @name util.float.readDoubleBE
+ * @function
+ * @param {Uint8Array} buf Source buffer
+ * @param {number} pos Source buffer offset
+ * @returns {number} Value read
+ */
+
+// Factory function for the purpose of node-based testing in modified global environments
+function factory(exports) {
+
+ // float: typed array
+ if (typeof Float32Array !== "undefined") (function() {
+
+ var f32 = new Float32Array([ -0 ]),
+ f8b = new Uint8Array(f32.buffer),
+ le = f8b[3] === 128;
+
+ function writeFloat_f32_cpy(val, buf, pos) {
+ f32[0] = val;
+ buf[pos ] = f8b[0];
+ buf[pos + 1] = f8b[1];
+ buf[pos + 2] = f8b[2];
+ buf[pos + 3] = f8b[3];
+ }
+
+ function writeFloat_f32_rev(val, buf, pos) {
+ f32[0] = val;
+ buf[pos ] = f8b[3];
+ buf[pos + 1] = f8b[2];
+ buf[pos + 2] = f8b[1];
+ buf[pos + 3] = f8b[0];
+ }
+
+ /* istanbul ignore next */
+ exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
+ /* istanbul ignore next */
+ exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
+
+ function readFloat_f32_cpy(buf, pos) {
+ f8b[0] = buf[pos ];
+ f8b[1] = buf[pos + 1];
+ f8b[2] = buf[pos + 2];
+ f8b[3] = buf[pos + 3];
+ return f32[0];
+ }
+
+ function readFloat_f32_rev(buf, pos) {
+ f8b[3] = buf[pos ];
+ f8b[2] = buf[pos + 1];
+ f8b[1] = buf[pos + 2];
+ f8b[0] = buf[pos + 3];
+ return f32[0];
+ }
+
+ /* istanbul ignore next */
+ exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
+ /* istanbul ignore next */
+ exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
+
+ // float: ieee754
+ })(); else (function() {
+
+ function writeFloat_ieee754(writeUint, val, buf, pos) {
+ var sign = val < 0 ? 1 : 0;
+ if (sign)
+ val = -val;
+ if (val === 0)
+ writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);
+ else if (isNaN(val))
+ writeUint(2143289344, buf, pos);
+ else if (val > 3.4028234663852886e+38) // +-Infinity
+ writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
+ else if (val < 1.1754943508222875e-38) // denormal
+ writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);
+ else {
+ var exponent = Math.floor(Math.log(val) / Math.LN2),
+ mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
+ writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
+ }
+ }
+
+ exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
+ exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
+
+ function readFloat_ieee754(readUint, buf, pos) {
+ var uint = readUint(buf, pos),
+ sign = (uint >> 31) * 2 + 1,
+ exponent = uint >>> 23 & 255,
+ mantissa = uint & 8388607;
+ return exponent === 255
+ ? mantissa
+ ? NaN
+ : sign * Infinity
+ : exponent === 0 // denormal
+ ? sign * 1.401298464324817e-45 * mantissa
+ : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
+ }
+
+ exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
+ exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
+
+ })();
+
+ // double: typed array
+ if (typeof Float64Array !== "undefined") (function() {
+
+ var f64 = new Float64Array([-0]),
+ f8b = new Uint8Array(f64.buffer),
+ le = f8b[7] === 128;
+
+ function writeDouble_f64_cpy(val, buf, pos) {
+ f64[0] = val;
+ buf[pos ] = f8b[0];
+ buf[pos + 1] = f8b[1];
+ buf[pos + 2] = f8b[2];
+ buf[pos + 3] = f8b[3];
+ buf[pos + 4] = f8b[4];
+ buf[pos + 5] = f8b[5];
+ buf[pos + 6] = f8b[6];
+ buf[pos + 7] = f8b[7];
+ }
+
+ function writeDouble_f64_rev(val, buf, pos) {
+ f64[0] = val;
+ buf[pos ] = f8b[7];
+ buf[pos + 1] = f8b[6];
+ buf[pos + 2] = f8b[5];
+ buf[pos + 3] = f8b[4];
+ buf[pos + 4] = f8b[3];
+ buf[pos + 5] = f8b[2];
+ buf[pos + 6] = f8b[1];
+ buf[pos + 7] = f8b[0];
+ }
+
+ /* istanbul ignore next */
+ exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
+ /* istanbul ignore next */
+ exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
+
+ function readDouble_f64_cpy(buf, pos) {
+ f8b[0] = buf[pos ];
+ f8b[1] = buf[pos + 1];
+ f8b[2] = buf[pos + 2];
+ f8b[3] = buf[pos + 3];
+ f8b[4] = buf[pos + 4];
+ f8b[5] = buf[pos + 5];
+ f8b[6] = buf[pos + 6];
+ f8b[7] = buf[pos + 7];
+ return f64[0];
+ }
+
+ function readDouble_f64_rev(buf, pos) {
+ f8b[7] = buf[pos ];
+ f8b[6] = buf[pos + 1];
+ f8b[5] = buf[pos + 2];
+ f8b[4] = buf[pos + 3];
+ f8b[3] = buf[pos + 4];
+ f8b[2] = buf[pos + 5];
+ f8b[1] = buf[pos + 6];
+ f8b[0] = buf[pos + 7];
+ return f64[0];
+ }
+
+ /* istanbul ignore next */
+ exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
+ /* istanbul ignore next */
+ exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
+
+ // double: ieee754
+ })(); else (function() {
+
+ function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
+ var sign = val < 0 ? 1 : 0;
+ if (sign)
+ val = -val;
+ if (val === 0) {
+ writeUint(0, buf, pos + off0);
+ writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);
+ } else if (isNaN(val)) {
+ writeUint(0, buf, pos + off0);
+ writeUint(2146959360, buf, pos + off1);
+ } else if (val > 1.7976931348623157e+308) { // +-Infinity
+ writeUint(0, buf, pos + off0);
+ writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
+ } else {
+ var mantissa;
+ if (val < 2.2250738585072014e-308) { // denormal
+ mantissa = val / 5e-324;
+ writeUint(mantissa >>> 0, buf, pos + off0);
+ writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
+ } else {
+ var exponent = Math.floor(Math.log(val) / Math.LN2);
+ if (exponent === 1024)
+ exponent = 1023;
+ mantissa = val * Math.pow(2, -exponent);
+ writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
+ writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
+ }
+ }
+ }
+
+ exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
+ exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
+
+ function readDouble_ieee754(readUint, off0, off1, buf, pos) {
+ var lo = readUint(buf, pos + off0),
+ hi = readUint(buf, pos + off1);
+ var sign = (hi >> 31) * 2 + 1,
+ exponent = hi >>> 20 & 2047,
+ mantissa = 4294967296 * (hi & 1048575) + lo;
+ return exponent === 2047
+ ? mantissa
+ ? NaN
+ : sign * Infinity
+ : exponent === 0 // denormal
+ ? sign * 5e-324 * mantissa
+ : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
+ }
+
+ exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
+ exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
+
+ })();
+
+ return exports;
+}
+
+// uint helpers
+
+function writeUintLE(val, buf, pos) {
+ buf[pos ] = val & 255;
+ buf[pos + 1] = val >>> 8 & 255;
+ buf[pos + 2] = val >>> 16 & 255;
+ buf[pos + 3] = val >>> 24;
+}
+
+function writeUintBE(val, buf, pos) {
+ buf[pos ] = val >>> 24;
+ buf[pos + 1] = val >>> 16 & 255;
+ buf[pos + 2] = val >>> 8 & 255;
+ buf[pos + 3] = val & 255;
+}
+
+function readUintLE(buf, pos) {
+ return (buf[pos ]
+ | buf[pos + 1] << 8
+ | buf[pos + 2] << 16
+ | buf[pos + 3] << 24) >>> 0;
+}
+
+function readUintBE(buf, pos) {
+ return (buf[pos ] << 24
+ | buf[pos + 1] << 16
+ | buf[pos + 2] << 8
+ | buf[pos + 3]) >>> 0;
+}
+
+},{}],7:[function(require,module,exports){
+"use strict";
+module.exports = inquire;
+
+/**
+ * Requires a module only if available.
+ * @memberof util
+ * @param {string} moduleName Module to require
+ * @returns {?Object} Required module if available and not empty, otherwise `null`
+ */
+function inquire(moduleName) {
+ try {
+ var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
+ if (mod && (mod.length || Object.keys(mod).length))
+ return mod;
+ } catch (e) {} // eslint-disable-line no-empty
+ return null;
+}
+
+},{}],8:[function(require,module,exports){
+"use strict";
+
+/**
+ * A minimal path module to resolve Unix, Windows and URL paths alike.
+ * @memberof util
+ * @namespace
+ */
+var path = exports;
+
+var isAbsolute =
+/**
+ * Tests if the specified path is absolute.
+ * @param {string} path Path to test
+ * @returns {boolean} `true` if path is absolute
+ */
+path.isAbsolute = function isAbsolute(path) {
+ return /^(?:\/|\w+:)/.test(path);
+};
+
+var normalize =
+/**
+ * Normalizes the specified path.
+ * @param {string} path Path to normalize
+ * @returns {string} Normalized path
+ */
+path.normalize = function normalize(path) {
+ path = path.replace(/\\/g, "/")
+ .replace(/\/{2,}/g, "/");
+ var parts = path.split("/"),
+ absolute = isAbsolute(path),
+ prefix = "";
+ if (absolute)
+ prefix = parts.shift() + "/";
+ for (var i = 0; i < parts.length;) {
+ if (parts[i] === "..") {
+ if (i > 0 && parts[i - 1] !== "..")
+ parts.splice(--i, 2);
+ else if (absolute)
+ parts.splice(i, 1);
+ else
+ ++i;
+ } else if (parts[i] === ".")
+ parts.splice(i, 1);
+ else
+ ++i;
+ }
+ return prefix + parts.join("/");
+};
+
+/**
+ * Resolves the specified include path against the specified origin path.
+ * @param {string} originPath Path to the origin file
+ * @param {string} includePath Include path relative to origin path
+ * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized
+ * @returns {string} Path to the include file
+ */
+path.resolve = function resolve(originPath, includePath, alreadyNormalized) {
+ if (!alreadyNormalized)
+ includePath = normalize(includePath);
+ if (isAbsolute(includePath))
+ return includePath;
+ if (!alreadyNormalized)
+ originPath = normalize(originPath);
+ return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath;
+};
+
+},{}],9:[function(require,module,exports){
+"use strict";
+module.exports = pool;
+
+/**
+ * An allocator as used by {@link util.pool}.
+ * @typedef PoolAllocator
+ * @type {function}
+ * @param {number} size Buffer size
+ * @returns {Uint8Array} Buffer
+ */
+
+/**
+ * A slicer as used by {@link util.pool}.
+ * @typedef PoolSlicer
+ * @type {function}
+ * @param {number} start Start offset
+ * @param {number} end End offset
+ * @returns {Uint8Array} Buffer slice
+ * @this {Uint8Array}
+ */
+
+/**
+ * A general purpose buffer pool.
+ * @memberof util
+ * @function
+ * @param {PoolAllocator} alloc Allocator
+ * @param {PoolSlicer} slice Slicer
+ * @param {number} [size=8192] Slab size
+ * @returns {PoolAllocator} Pooled allocator
+ */
+function pool(alloc, slice, size) {
+ var SIZE = size || 8192;
+ var MAX = SIZE >>> 1;
+ var slab = null;
+ var offset = SIZE;
+ return function pool_alloc(size) {
+ if (size < 1 || size > MAX)
+ return alloc(size);
+ if (offset + size > SIZE) {
+ slab = alloc(SIZE);
+ offset = 0;
+ }
+ var buf = slice.call(slab, offset, offset += size);
+ if (offset & 7) // align to 32 bit
+ offset = (offset | 7) + 1;
+ return buf;
+ };
+}
+
+},{}],10:[function(require,module,exports){
+"use strict";
+
+/**
+ * A minimal UTF8 implementation for number arrays.
+ * @memberof util
+ * @namespace
+ */
+var utf8 = exports;
+
+/**
+ * Calculates the UTF8 byte length of a string.
+ * @param {string} string String
+ * @returns {number} Byte length
+ */
+utf8.length = function utf8_length(string) {
+ var len = 0,
+ c = 0;
+ for (var i = 0; i < string.length; ++i) {
+ c = string.charCodeAt(i);
+ if (c < 128)
+ len += 1;
+ else if (c < 2048)
+ len += 2;
+ else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {
+ ++i;
+ len += 4;
+ } else
+ len += 3;
+ }
+ return len;
+};
+
+/**
+ * Reads UTF8 bytes as a string.
+ * @param {Uint8Array} buffer Source buffer
+ * @param {number} start Source start
+ * @param {number} end Source end
+ * @returns {string} String read
+ */
+utf8.read = function utf8_read(buffer, start, end) {
+ var len = end - start;
+ if (len < 1)
+ return "";
+ var parts = null,
+ chunk = [],
+ i = 0, // char offset
+ t; // temporary
+ while (start < end) {
+ t = buffer[start++];
+ if (t < 128)
+ chunk[i++] = t;
+ else if (t > 191 && t < 224)
+ chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
+ else if (t > 239 && t < 365) {
+ t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;
+ chunk[i++] = 0xD800 + (t >> 10);
+ chunk[i++] = 0xDC00 + (t & 1023);
+ } else
+ chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
+ if (i > 8191) {
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
+ i = 0;
+ }
+ }
+ if (parts) {
+ if (i)
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
+ return parts.join("");
+ }
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
+};
+
+/**
+ * Writes a string as UTF8 bytes.
+ * @param {string} string Source string
+ * @param {Uint8Array} buffer Destination buffer
+ * @param {number} offset Destination offset
+ * @returns {number} Bytes written
+ */
+utf8.write = function utf8_write(string, buffer, offset) {
+ var start = offset,
+ c1, // character 1
+ c2; // character 2
+ for (var i = 0; i < string.length; ++i) {
+ c1 = string.charCodeAt(i);
+ if (c1 < 128) {
+ buffer[offset++] = c1;
+ } else if (c1 < 2048) {
+ buffer[offset++] = c1 >> 6 | 192;
+ buffer[offset++] = c1 & 63 | 128;
+ } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {
+ c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);
+ ++i;
+ buffer[offset++] = c1 >> 18 | 240;
+ buffer[offset++] = c1 >> 12 & 63 | 128;
+ buffer[offset++] = c1 >> 6 & 63 | 128;
+ buffer[offset++] = c1 & 63 | 128;
+ } else {
+ buffer[offset++] = c1 >> 12 | 224;
+ buffer[offset++] = c1 >> 6 & 63 | 128;
+ buffer[offset++] = c1 & 63 | 128;
+ }
+ }
+ return offset - start;
+};
+
+},{}],11:[function(require,module,exports){
+"use strict";
+/**
+ * Runtime message from/to plain object converters.
+ * @namespace
+ */
+var converter = exports;
+
+var Enum = require(14),
+ util = require(33);
+
+/**
+ * Generates a partial value fromObject conveter.
+ * @param {Codegen} gen Codegen instance
+ * @param {Field} field Reflected field
+ * @param {number} fieldIndex Field index
+ * @param {string} prop Property reference
+ * @returns {Codegen} Codegen instance
+ * @ignore
+ */
+function genValuePartial_fromObject(gen, field, fieldIndex, prop, ref) {
+ /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */
+ if (ref === undefined) {
+ ref = "d" + prop;
+ }
+ if (field.resolvedType) {
+ if (field.resolvedType instanceof Enum) { gen
+ ("switch(%s){", ref);
+ for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {
+ if (field.repeated && values[keys[i]] === field.typeDefault) gen
+ ("default:");
+ gen
+ ("case%j:", keys[i])
+ ("case %i:", values[keys[i]])
+ ("m%s=%j", prop, values[keys[i]])
+ ("break");
+ } gen
+ ("}");
+ } else gen
+ ("if(typeof %s!==\"object\")", ref)
+ ("throw TypeError(%j)", field.fullName + ": object expected")
+ ("m%s=types[%i].fromObject(%s)", prop, fieldIndex, ref);
+ } else {
+ var isUnsigned = false;
+ switch (field.type) {
+ case "double":
+ case "float": gen
+ ("m%s=Number(%s)", prop, ref); // also catches "NaN", "Infinity"
+ break;
+ case "uint32":
+ case "fixed32": gen
+ ("m%s=%s>>>0", prop, ref);
+ break;
+ case "int32":
+ case "sint32":
+ case "sfixed32": gen
+ ("m%s=%s|0", prop, ref);
+ break;
+ case "uint64":
+ isUnsigned = true;
+ // eslint-disable-line no-fallthrough
+ case "int64":
+ case "sint64":
+ case "fixed64":
+ case "sfixed64": gen
+ ("if(util.Long)")
+ ("(m%s=util.Long.fromValue(%s)).unsigned=%j", prop, ref, isUnsigned)
+ ("else if(typeof %s===\"string\")", ref)
+ ("m%s=parseInt(%s,10)", prop, ref)
+ ("else if(typeof %s===\"number\")", ref)
+ ("m%s=%s", prop, ref)
+ ("else if(typeof %s===\"object\")", ref)
+ ("m%s=new util.LongBits(%s.low>>>0,%s.high>>>0).toNumber(%s)", prop, ref, ref, isUnsigned ? "true" : "");
+ break;
+ case "bytes": gen
+ ("if(typeof %s===\"string\")", ref)
+ ("util.base64.decode(%s,m%s=util.newBuffer(util.base64.length(%s)),0)", ref, prop, ref)
+ ("else if(%s.length)", ref)
+ ("m%s=%s", prop, ref);
+ break;
+ case "string": gen
+ ("m%s=String(%s)", prop, ref);
+ break;
+ case "bool": gen
+ ("m%s=Boolean(%s)", prop, ref);
+ break;
+ /* default: gen
+ ("m%s=%s", prop, ref);
+ break; */
+ }
+ }
+ return gen;
+ /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */
+}
+
+/**
+ * Generates a plain object to runtime message converter specific to the specified message type.
+ * @param {Type} mtype Message type
+ * @returns {Codegen} Codegen instance
+ */
+converter.fromObject = function fromObject(mtype) {
+ /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */
+ var fields = mtype.fieldsArray;
+ var gen = util.codegen(["d"], mtype.name + "$fromObject")
+ ("if(d instanceof this.ctor)")
+ ("return d");
+ if (!fields.length) return gen
+ ("return new this.ctor");
+ gen
+ ("var m=new this.ctor");
+ for (var i = 0; i < fields.length; ++i) {
+ var field = fields[i].resolve(),
+ prop = util.safeProp(field.name);
+
+ // Map fields
+ if (field.map) { gen
+ ("if(d%s){", prop)
+ ("if(typeof d%s!==\"object\")", prop)
+ ("throw TypeError(%j)", field.fullName + ": object expected")
+ ("m%s={}", prop)
+ ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop);
+ break;
+ case "bytes": gen
+ ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop);
+ break;
+ default: gen
+ ("d%s=m%s", prop, prop);
+ break;
+ }
+ }
+ return gen;
+ /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */
+}
+
+/**
+ * Generates a runtime message to plain object converter specific to the specified message type.
+ * @param {Type} mtype Message type
+ * @returns {Codegen} Codegen instance
+ */
+converter.toObject = function toObject(mtype) {
+ /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */
+ var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);
+ if (!fields.length)
+ return util.codegen()("return {}");
+ var gen = util.codegen(["m", "o"], mtype.name + "$toObject")
+ ("if(!o)")
+ ("o={}")
+ ("var d={}");
+
+ var repeatedFields = [],
+ mapFields = [],
+ normalFields = [],
+ i = 0;
+ for (; i < fields.length; ++i)
+ if (!fields[i].partOf)
+ ( fields[i].resolve().repeated ? repeatedFields
+ : fields[i].map ? mapFields
+ : normalFields).push(fields[i]);
+
+ if (repeatedFields.length) { gen
+ ("if(o.arrays||o.defaults){");
+ for (i = 0; i < repeatedFields.length; ++i) gen
+ ("d%s=[]", util.safeProp(repeatedFields[i].name));
+ gen
+ ("}");
+ }
+
+ if (mapFields.length) { gen
+ ("if(o.objects||o.defaults){");
+ for (i = 0; i < mapFields.length; ++i) gen
+ ("d%s={}", util.safeProp(mapFields[i].name));
+ gen
+ ("}");
+ }
+
+ if (normalFields.length) { gen
+ ("if(o.defaults){");
+ for (i = 0; i < normalFields.length; ++i) {
+ var field = normalFields[i],
+ prop = util.safeProp(field.name);
+ if (field.resolvedType instanceof Enum) gen
+ ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);
+ else if (field.long) gen
+ ("if(util.Long){")
+ ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)
+ ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop)
+ ("}else")
+ ("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber());
+ else if (field.bytes) {
+ var arrayDefault = "[" + Array.prototype.slice.call(field.typeDefault).join(",") + "]";
+ gen
+ ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault))
+ ("else{")
+ ("d%s=%s", prop, arrayDefault)
+ ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop)
+ ("}");
+ } else gen
+ ("d%s=%j", prop, field.typeDefault); // also messages (=null)
+ } gen
+ ("}");
+ }
+ var hasKs2 = false;
+ for (i = 0; i < fields.length; ++i) {
+ var field = fields[i],
+ index = mtype._fieldsArray.indexOf(field),
+ prop = util.safeProp(field.name);
+ if (field.map) {
+ if (!hasKs2) { hasKs2 = true; gen
+ ("var ks2");
+ } gen
+ ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop)
+ ("d%s={}", prop)
+ ("for(var j=0;j>>3){");
+
+ var i = 0;
+ for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {
+ var field = mtype._fieldsArray[i].resolve(),
+ type = field.resolvedType instanceof Enum ? "int32" : field.type,
+ ref = "m" + util.safeProp(field.name); gen
+ ("case %i:", field.id);
+
+ // Map fields
+ if (field.map) { gen
+ ("r.skip().pos++") // assumes id 1 + key wireType
+ ("if(%s===util.emptyObject)", ref)
+ ("%s={}", ref)
+ ("k=r.%s()", field.keyType)
+ ("r.pos++"); // assumes id 2 + value wireType
+ if (types.long[field.keyType] !== undefined) {
+ if (types.basic[type] === undefined) gen
+ ("%s[typeof k===\"object\"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())", ref, i); // can't be groups
+ else gen
+ ("%s[typeof k===\"object\"?util.longToHash(k):k]=r.%s()", ref, type);
+ } else {
+ if (types.basic[type] === undefined) gen
+ ("%s[k]=types[%i].decode(r,r.uint32())", ref, i); // can't be groups
+ else gen
+ ("%s[k]=r.%s()", ref, type);
+ }
+
+ // Repeated fields
+ } else if (field.repeated) { gen
+
+ ("if(!(%s&&%s.length))", ref, ref)
+ ("%s=[]", ref);
+
+ // Packable (always check for forward and backward compatiblity)
+ if (types.packed[type] !== undefined) gen
+ ("if((t&7)===2){")
+ ("var c2=r.uint32()+r.pos")
+ ("while(r.pos>> 0, (field.id << 3 | 4) >>> 0);
+ return;
+ }
+ var key = (field.id << 3 | 2) >>> 0;
+ if (field.preEncoded()) {
+ gen("if (%s instanceof Uint8Array) {", ref)
+ ("w.uint32(%i)", key)
+ ("w.bytes(%s)", ref)
+ ("} else {");
+ }
+ gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, key);
+ if (field.preEncoded()) {
+ gen("}")
+ }
+}
+
+/**
+ * Generates an encoder specific to the specified message type.
+ * @param {Type} mtype Message type
+ * @returns {Codegen} Codegen instance
+ */
+function encoder(mtype) {
+ /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */
+ var gen = util.codegen(["m", "w"], mtype.name + "$encode")
+ ("if(!w)")
+ ("w=Writer.create()");
+
+ var i, ref;
+
+ // "when a message is serialized its known fields should be written sequentially by field number"
+ var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);
+
+ for (var i = 0; i < fields.length; ++i) {
+ var field = fields[i].resolve(),
+ index = mtype._fieldsArray.indexOf(field),
+ type = field.resolvedType instanceof Enum ? "int32" : field.type,
+ wireType = types.basic[type];
+ ref = "m" + util.safeProp(field.name);
+
+ // Map fields
+ if (field.map) {
+ gen
+ ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null
+ ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);
+ if (wireType === undefined) gen
+ ("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref); // can't be groups
+ else gen
+ (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref);
+ gen
+ ("}")
+ ("}");
+
+ // Repeated fields
+ } else if (field.repeated) {
+ var arrayRef = ref;
+ if (field.useToArray()) {
+ arrayRef = "array" + field.id;
+ gen("var %s", arrayRef);
+ gen("if (%s!=null&&%s.toArray) { %s = %s.toArray() } else { %s = %s }",
+ ref, ref, arrayRef, ref, arrayRef, ref);
+ }
+ gen("if(%s!=null&&%s.length){", arrayRef, arrayRef); // !== undefined && !== null
+ // Packed repeated
+ if (field.packed && types.packed[type] !== undefined) { gen
+
+ ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0)
+ ("for(var i=0;i<%s.length;++i)", arrayRef)
+ ("w.%s(%s[i])", type, arrayRef)
+ ("w.ldelim()");
+
+ // Non-packed
+ } else { gen
+
+ ("for(var i=0;i<%s.length;++i)", arrayRef);
+ if (wireType === undefined)
+ genTypePartial(gen, field, index, arrayRef + "[i]");
+ else gen
+ ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, arrayRef);
+
+ } gen
+ ("}");
+
+ // Non-repeated
+ } else {
+ if (field.optional) gen
+ ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null
+
+ if (wireType === undefined)
+ genTypePartial(gen, field, index, ref);
+ else gen
+ ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref);
+
+ }
+ }
+
+ return gen
+ ("return w");
+ /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */
+}
+
+},{"14":14,"32":32,"33":33}],14:[function(require,module,exports){
+"use strict";
+module.exports = Enum;
+
+// extends ReflectionObject
+var ReflectionObject = require(22);
+((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum";
+
+var Namespace = require(21),
+ util = require(33);
+
+/**
+ * Constructs a new enum instance.
+ * @classdesc Reflected enum.
+ * @extends ReflectionObject
+ * @constructor
+ * @param {string} name Unique name within its namespace
+ * @param {Object.} [values] Enum values as an object, by name
+ * @param {Object.} [options] Declared options
+ * @param {string} [comment] The comment for this enum
+ * @param {Object.} [comments] The value comments for this enum
+ */
+function Enum(name, values, options, comment, comments) {
+ ReflectionObject.call(this, name, options);
+
+ if (values && typeof values !== "object")
+ throw TypeError("values must be an object");
+
+ /**
+ * Enum values by id.
+ * @type {Object.}
+ */
+ this.valuesById = {};
+
+ /**
+ * Enum values by name.
+ * @type {Object.}
+ */
+ this.values = Object.create(this.valuesById); // toJSON, marker
+
+ /**
+ * Enum comment text.
+ * @type {string|null}
+ */
+ this.comment = comment;
+
+ /**
+ * Value comment texts, if any.
+ * @type {Object.}
+ */
+ this.comments = comments || {};
+
+ /**
+ * Reserved ranges, if any.
+ * @type {Array.}
+ */
+ this.reserved = undefined; // toJSON
+
+ // Note that values inherit valuesById on their prototype which makes them a TypeScript-
+ // compatible enum. This is used by pbts to write actual enum definitions that work for
+ // static and reflection code alike instead of emitting generic object definitions.
+
+ if (values)
+ for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)
+ if (typeof values[keys[i]] === "number") // use forward entries only
+ this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];
+}
+
+/**
+ * Enum descriptor.
+ * @interface IEnum
+ * @property {Object.} values Enum values
+ * @property {Object.} [options] Enum options
+ */
+
+/**
+ * Constructs an enum from an enum descriptor.
+ * @param {string} name Enum name
+ * @param {IEnum} json Enum descriptor
+ * @returns {Enum} Created enum
+ * @throws {TypeError} If arguments are invalid
+ */
+Enum.fromJSON = function fromJSON(name, json) {
+ var enm = new Enum(name, json.values, json.options, json.comment, json.comments);
+ enm.reserved = json.reserved;
+ return enm;
+};
+
+/**
+ * Converts this enum to an enum descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {IEnum} Enum descriptor
+ */
+Enum.prototype.toJSON = function toJSON(toJSONOptions) {
+ var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
+ return util.toObject([
+ "options" , this.options,
+ "values" , this.values,
+ "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined,
+ "comment" , keepComments ? this.comment : undefined,
+ "comments" , keepComments ? this.comments : undefined
+ ]);
+};
+
+/**
+ * Adds a value to this enum.
+ * @param {string} name Value name
+ * @param {number} id Value id
+ * @param {string} [comment] Comment, if any
+ * @returns {Enum} `this`
+ * @throws {TypeError} If arguments are invalid
+ * @throws {Error} If there is already a value with this name or id
+ */
+Enum.prototype.add = function add(name, id, comment) {
+ // utilized by the parser but not by .fromJSON
+
+ if (!util.isString(name))
+ throw TypeError("name must be a string");
+
+ if (!util.isInteger(id))
+ throw TypeError("id must be an integer");
+
+ if (this.values[name] !== undefined)
+ throw Error("duplicate name '" + name + "' in " + this);
+
+ if (this.isReservedId(id))
+ throw Error("id " + id + " is reserved in " + this);
+
+ if (this.isReservedName(name))
+ throw Error("name '" + name + "' is reserved in " + this);
+
+ if (this.valuesById[id] !== undefined) {
+ if (!(this.options && this.options.allow_alias))
+ throw Error("duplicate id " + id + " in " + this);
+ this.values[name] = id;
+ } else
+ this.valuesById[this.values[name] = id] = name;
+
+ this.comments[name] = comment || null;
+ return this;
+};
+
+/**
+ * Removes a value from this enum
+ * @param {string} name Value name
+ * @returns {Enum} `this`
+ * @throws {TypeError} If arguments are invalid
+ * @throws {Error} If `name` is not a name of this enum
+ */
+Enum.prototype.remove = function remove(name) {
+
+ if (!util.isString(name))
+ throw TypeError("name must be a string");
+
+ var val = this.values[name];
+ if (val == null)
+ throw Error("name '" + name + "' does not exist in " + this);
+
+ delete this.valuesById[val];
+ delete this.values[name];
+ delete this.comments[name];
+
+ return this;
+};
+
+/**
+ * Tests if the specified id is reserved.
+ * @param {number} id Id to test
+ * @returns {boolean} `true` if reserved, otherwise `false`
+ */
+Enum.prototype.isReservedId = function isReservedId(id) {
+ return Namespace.isReservedId(this.reserved, id);
+};
+
+/**
+ * Tests if the specified name is reserved.
+ * @param {string} name Name to test
+ * @returns {boolean} `true` if reserved, otherwise `false`
+ */
+Enum.prototype.isReservedName = function isReservedName(name) {
+ return Namespace.isReservedName(this.reserved, name);
+};
+
+},{"21":21,"22":22,"33":33}],15:[function(require,module,exports){
+"use strict";
+module.exports = Field;
+
+// extends ReflectionObject
+var ReflectionObject = require(22);
+((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field";
+
+var Enum = require(14),
+ types = require(32),
+ util = require(33);
+
+var Type; // cyclic
+
+var ruleRe = /^required|optional|repeated$/;
+
+/**
+ * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.
+ * @name Field
+ * @classdesc Reflected message field.
+ * @extends FieldBase
+ * @constructor
+ * @param {string} name Unique name within its namespace
+ * @param {number} id Unique id within its namespace
+ * @param {string} type Value type
+ * @param {string|Object.} [rule="optional"] Field rule
+ * @param {string|Object.} [extend] Extended type if different from parent
+ * @param {Object.} [options] Declared options
+ */
+
+/**
+ * Constructs a field from a field descriptor.
+ * @param {string} name Field name
+ * @param {IField} json Field descriptor
+ * @returns {Field} Created field
+ * @throws {TypeError} If arguments are invalid
+ */
+Field.fromJSON = function fromJSON(name, json) {
+ return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);
+};
+
+/**
+ * Not an actual constructor. Use {@link Field} instead.
+ * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.
+ * @exports FieldBase
+ * @extends ReflectionObject
+ * @constructor
+ * @param {string} name Unique name within its namespace
+ * @param {number} id Unique id within its namespace
+ * @param {string} type Value type
+ * @param {string|Object.} [rule="optional"] Field rule
+ * @param {string|Object.} [extend] Extended type if different from parent
+ * @param {Object.} [options] Declared options
+ * @param {string} [comment] Comment associated with this field
+ */
+function Field(name, id, type, rule, extend, options, comment) {
+
+ if (util.isObject(rule)) {
+ comment = extend;
+ options = rule;
+ rule = extend = undefined;
+ } else if (util.isObject(extend)) {
+ comment = options;
+ options = extend;
+ extend = undefined;
+ }
+
+ ReflectionObject.call(this, name, options);
+
+ if (!util.isInteger(id) || id < 0)
+ throw TypeError("id must be a non-negative integer");
+
+ if (!util.isString(type))
+ throw TypeError("type must be a string");
+
+ if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))
+ throw TypeError("rule must be a string rule");
+
+ if (extend !== undefined && !util.isString(extend))
+ throw TypeError("extend must be a string");
+
+ /**
+ * Field rule, if any.
+ * @type {string|undefined}
+ */
+ this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON
+
+ /**
+ * Field type.
+ * @type {string}
+ */
+ this.type = type; // toJSON
+
+ /**
+ * Unique field id.
+ * @type {number}
+ */
+ this.id = id; // toJSON, marker
+
+ /**
+ * Extended type if different from parent.
+ * @type {string|undefined}
+ */
+ this.extend = extend || undefined; // toJSON
+
+ /**
+ * Whether this field is required.
+ * @type {boolean}
+ */
+ this.required = rule === "required";
+
+ /**
+ * Whether this field is optional.
+ * @type {boolean}
+ */
+ this.optional = !this.required;
+
+ /**
+ * Whether this field is repeated.
+ * @type {boolean}
+ */
+ this.repeated = rule === "repeated";
+
+ /**
+ * Whether this field is a map or not.
+ * @type {boolean}
+ */
+ this.map = false;
+
+ /**
+ * Message this field belongs to.
+ * @type {Type|null}
+ */
+ this.message = null;
+
+ /**
+ * OneOf this field belongs to, if any,
+ * @type {OneOf|null}
+ */
+ this.partOf = null;
+
+ /**
+ * The field type's default value.
+ * @type {*}
+ */
+ this.typeDefault = null;
+
+ /**
+ * The field's default value on prototypes.
+ * @type {*}
+ */
+ this.defaultValue = null;
+
+ /**
+ * Whether this field's value should be treated as a long.
+ * @type {boolean}
+ */
+ this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;
+
+ /**
+ * Whether this field's value is a buffer.
+ * @type {boolean}
+ */
+ this.bytes = type === "bytes";
+
+ /**
+ * Resolved type if not a basic type.
+ * @type {Type|Enum|null}
+ */
+ this.resolvedType = null;
+
+ /**
+ * Sister-field within the extended type if a declaring extension field.
+ * @type {Field|null}
+ */
+ this.extensionField = null;
+
+ /**
+ * Sister-field within the declaring namespace if an extended field.
+ * @type {Field|null}
+ */
+ this.declaringField = null;
+
+ /**
+ * Internally remembers whether this field is packed.
+ * @type {boolean|null}
+ * @private
+ */
+ this._packed = null;
+
+ /**
+ * Comment for this field.
+ * @type {string|null}
+ */
+ this.comment = comment;
+}
+
+/**
+ * Determines whether this field is packed. Only relevant when repeated and working with proto2.
+ * @name Field#packed
+ * @type {boolean}
+ * @readonly
+ */
+Object.defineProperty(Field.prototype, "packed", {
+ get: function() {
+ // defaults to packed=true if not explicity set to false
+ if (this._packed === null)
+ this._packed = this.getOption("packed") !== false;
+ return this._packed;
+ }
+});
+
+/**
+ * @override
+ */
+Field.prototype.setOption = function setOption(name, value, ifNotSet) {
+ if (name === "packed") // clear cached before setting
+ this._packed = null;
+ return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);
+};
+
+/**
+ * Field descriptor.
+ * @interface IField
+ * @property {string} [rule="optional"] Field rule
+ * @property {string} type Field type
+ * @property {number} id Field id
+ * @property {Object.} [options] Field options
+ */
+
+/**
+ * Extension field descriptor.
+ * @interface IExtensionField
+ * @extends IField
+ * @property {string} extend Extended type
+ */
+
+/**
+ * Converts this field to a field descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {IField} Field descriptor
+ */
+Field.prototype.toJSON = function toJSON(toJSONOptions) {
+ var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
+ return util.toObject([
+ "rule" , this.rule !== "optional" && this.rule || undefined,
+ "type" , this.type,
+ "id" , this.id,
+ "extend" , this.extend,
+ "options" , this.options,
+ "comment" , keepComments ? this.comment : undefined
+ ]);
+};
+
+/**
+ * Resolves this field's type references.
+ * @returns {Field} `this`
+ * @throws {Error} If any reference cannot be resolved
+ */
+Field.prototype.resolve = function resolve() {
+
+ if (this.resolved)
+ return this;
+
+ if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it
+ this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);
+ if (this.resolvedType instanceof Type)
+ this.typeDefault = null;
+ else // instanceof Enum
+ this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined
+ }
+
+ // use explicitly set default value if present
+ if (this.options && this.options["default"] != null) {
+ this.typeDefault = this.options["default"];
+ if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string")
+ this.typeDefault = this.resolvedType.values[this.typeDefault];
+ }
+
+ // remove unnecessary options
+ if (this.options) {
+ if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))
+ delete this.options.packed;
+ if (!Object.keys(this.options).length)
+ this.options = undefined;
+ }
+
+ // convert to internal data type if necesssary
+ if (this.long) {
+ this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u");
+
+ /* istanbul ignore else */
+ if (Object.freeze)
+ Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)
+
+ } else if (this.bytes && typeof this.typeDefault === "string") {
+ var buf;
+ if (util.base64.test(this.typeDefault))
+ util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);
+ else
+ util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);
+ this.typeDefault = buf;
+ }
+
+ // take special care of maps and repeated fields
+ if (this.map)
+ this.defaultValue = util.emptyObject;
+ else if (this.repeated)
+ this.defaultValue = util.emptyArray;
+ else
+ this.defaultValue = this.typeDefault;
+
+ // ensure proper value on prototype
+ if (this.parent instanceof Type)
+ this.parent.ctor.prototype[this.name] = this.defaultValue;
+
+ return ReflectionObject.prototype.resolve.call(this);
+};
+
+Field.prototype.useToArray = function useToArray() {
+ return !!this.getOption("(js_use_toArray)");
+};
+
+Field.prototype.preEncoded = function preEncoded() {
+ return !!this.getOption("(js_preEncoded)");
+};
+
+/**
+ * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).
+ * @typedef FieldDecorator
+ * @type {function}
+ * @param {Object} prototype Target prototype
+ * @param {string} fieldName Field name
+ * @returns {undefined}
+ */
+
+/**
+ * Field decorator (TypeScript).
+ * @name Field.d
+ * @function
+ * @param {number} fieldId Field id
+ * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type
+ * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule
+ * @param {T} [defaultValue] Default value
+ * @returns {FieldDecorator} Decorator function
+ * @template T extends number | number[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]
+ */
+Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {
+
+ // submessage: decorate the submessage and use its name as the type
+ if (typeof fieldType === "function")
+ fieldType = util.decorateType(fieldType).name;
+
+ // enum reference: create a reflected copy of the enum and keep reuseing it
+ else if (fieldType && typeof fieldType === "object")
+ fieldType = util.decorateEnum(fieldType).name;
+
+ return function fieldDecorator(prototype, fieldName) {
+ util.decorateType(prototype.constructor)
+ .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue }));
+ };
+};
+
+/**
+ * Field decorator (TypeScript).
+ * @name Field.d
+ * @function
+ * @param {number} fieldId Field id
+ * @param {Constructor|string} fieldType Field type
+ * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule
+ * @returns {FieldDecorator} Decorator function
+ * @template T extends Message
+ * @variation 2
+ */
+// like Field.d but without a default value
+
+// Sets up cyclic dependencies (called in index-light)
+Field._configure = function configure(Type_) {
+ Type = Type_;
+};
+
+},{"14":14,"22":22,"32":32,"33":33}],16:[function(require,module,exports){
+"use strict";
+var protobuf = module.exports = require(17);
+
+protobuf.build = "light";
+
+/**
+ * A node-style callback as used by {@link load} and {@link Root#load}.
+ * @typedef LoadCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any, otherwise `null`
+ * @param {Root} [root] Root, if there hasn't been an error
+ * @returns {undefined}
+ */
+
+/**
+ * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.
+ * @param {string|string[]} filename One or multiple files to load
+ * @param {Root} root Root namespace, defaults to create a new one if omitted.
+ * @param {LoadCallback} callback Callback function
+ * @returns {undefined}
+ * @see {@link Root#load}
+ */
+function load(filename, root, callback) {
+ if (typeof root === "function") {
+ callback = root;
+ root = new protobuf.Root();
+ } else if (!root)
+ root = new protobuf.Root();
+ return root.load(filename, callback);
+}
+
+/**
+ * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.
+ * @name load
+ * @function
+ * @param {string|string[]} filename One or multiple files to load
+ * @param {LoadCallback} callback Callback function
+ * @returns {undefined}
+ * @see {@link Root#load}
+ * @variation 2
+ */
+// function load(filename:string, callback:LoadCallback):undefined
+
+/**
+ * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.
+ * @name load
+ * @function
+ * @param {string|string[]} filename One or multiple files to load
+ * @param {Root} [root] Root namespace, defaults to create a new one if omitted.
+ * @returns {Promise} Promise
+ * @see {@link Root#load}
+ * @variation 3
+ */
+// function load(filename:string, [root:Root]):Promise
+
+protobuf.load = load;
+
+/**
+ * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).
+ * @param {string|string[]} filename One or multiple files to load
+ * @param {Root} [root] Root namespace, defaults to create a new one if omitted.
+ * @returns {Root} Root namespace
+ * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid
+ * @see {@link Root#loadSync}
+ */
+function loadSync(filename, root) {
+ if (!root)
+ root = new protobuf.Root();
+ return root.loadSync(filename);
+}
+
+protobuf.loadSync = loadSync;
+
+// Serialization
+protobuf.encoder = require(13);
+protobuf.decoder = require(12);
+protobuf.verifier = require(36);
+protobuf.converter = require(11);
+
+// Reflection
+protobuf.ReflectionObject = require(22);
+protobuf.Namespace = require(21);
+protobuf.Root = require(26);
+protobuf.Enum = require(14);
+protobuf.Type = require(31);
+protobuf.Field = require(15);
+protobuf.OneOf = require(23);
+protobuf.MapField = require(18);
+protobuf.Service = require(30);
+protobuf.Method = require(20);
+
+// Runtime
+protobuf.Message = require(19);
+protobuf.wrappers = require(37);
+
+// Utility
+protobuf.types = require(32);
+protobuf.util = require(33);
+
+// Set up possibly cyclic reflection dependencies
+protobuf.ReflectionObject._configure(protobuf.Root);
+protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);
+protobuf.Root._configure(protobuf.Type);
+protobuf.Field._configure(protobuf.Type);
+
+},{"11":11,"12":12,"13":13,"14":14,"15":15,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"26":26,"30":30,"31":31,"32":32,"33":33,"36":36,"37":37}],17:[function(require,module,exports){
+"use strict";
+var protobuf = exports;
+
+/**
+ * Build type, one of `"full"`, `"light"` or `"minimal"`.
+ * @name build
+ * @type {string}
+ * @const
+ */
+protobuf.build = "minimal";
+
+// Serialization
+protobuf.Writer = require(38);
+protobuf.BufferWriter = require(39);
+protobuf.Reader = require(24);
+protobuf.BufferReader = require(25);
+
+// Utility
+protobuf.util = require(35);
+protobuf.rpc = require(28);
+protobuf.roots = require(27);
+protobuf.configure = configure;
+
+/* istanbul ignore next */
+/**
+ * Reconfigures the library according to the environment.
+ * @returns {undefined}
+ */
+function configure() {
+ protobuf.Reader._configure(protobuf.BufferReader);
+ protobuf.util._configure();
+}
+
+// Set up buffer utility according to the environment
+protobuf.Writer._configure(protobuf.BufferWriter);
+configure();
+
+},{"24":24,"25":25,"27":27,"28":28,"35":35,"38":38,"39":39}],18:[function(require,module,exports){
+"use strict";
+module.exports = MapField;
+
+// extends Field
+var Field = require(15);
+((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField";
+
+var types = require(32),
+ util = require(33);
+
+/**
+ * Constructs a new map field instance.
+ * @classdesc Reflected map field.
+ * @extends FieldBase
+ * @constructor
+ * @param {string} name Unique name within its namespace
+ * @param {number} id Unique id within its namespace
+ * @param {string} keyType Key type
+ * @param {string} type Value type
+ * @param {Object.} [options] Declared options
+ * @param {string} [comment] Comment associated with this field
+ */
+function MapField(name, id, keyType, type, options, comment) {
+ Field.call(this, name, id, type, undefined, undefined, options, comment);
+
+ /* istanbul ignore if */
+ if (!util.isString(keyType))
+ throw TypeError("keyType must be a string");
+
+ /**
+ * Key type.
+ * @type {string}
+ */
+ this.keyType = keyType; // toJSON, marker
+
+ /**
+ * Resolved key type if not a basic type.
+ * @type {ReflectionObject|null}
+ */
+ this.resolvedKeyType = null;
+
+ // Overrides Field#map
+ this.map = true;
+}
+
+/**
+ * Map field descriptor.
+ * @interface IMapField
+ * @extends {IField}
+ * @property {string} keyType Key type
+ */
+
+/**
+ * Extension map field descriptor.
+ * @interface IExtensionMapField
+ * @extends IMapField
+ * @property {string} extend Extended type
+ */
+
+/**
+ * Constructs a map field from a map field descriptor.
+ * @param {string} name Field name
+ * @param {IMapField} json Map field descriptor
+ * @returns {MapField} Created map field
+ * @throws {TypeError} If arguments are invalid
+ */
+MapField.fromJSON = function fromJSON(name, json) {
+ return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);
+};
+
+/**
+ * Converts this map field to a map field descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {IMapField} Map field descriptor
+ */
+MapField.prototype.toJSON = function toJSON(toJSONOptions) {
+ var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
+ return util.toObject([
+ "keyType" , this.keyType,
+ "type" , this.type,
+ "id" , this.id,
+ "extend" , this.extend,
+ "options" , this.options,
+ "comment" , keepComments ? this.comment : undefined
+ ]);
+};
+
+/**
+ * @override
+ */
+MapField.prototype.resolve = function resolve() {
+ if (this.resolved)
+ return this;
+
+ // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes"
+ if (types.mapKey[this.keyType] === undefined)
+ throw Error("invalid key type: " + this.keyType);
+
+ return Field.prototype.resolve.call(this);
+};
+
+/**
+ * Map field decorator (TypeScript).
+ * @name MapField.d
+ * @function
+ * @param {number} fieldId Field id
+ * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type
+ * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type
+ * @returns {FieldDecorator} Decorator function
+ * @template T extends { [key: string]: number | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }
+ */
+MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {
+
+ // submessage value: decorate the submessage and use its name as the type
+ if (typeof fieldValueType === "function")
+ fieldValueType = util.decorateType(fieldValueType).name;
+
+ // enum reference value: create a reflected copy of the enum and keep reuseing it
+ else if (fieldValueType && typeof fieldValueType === "object")
+ fieldValueType = util.decorateEnum(fieldValueType).name;
+
+ return function mapFieldDecorator(prototype, fieldName) {
+ util.decorateType(prototype.constructor)
+ .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));
+ };
+};
+
+},{"15":15,"32":32,"33":33}],19:[function(require,module,exports){
+"use strict";
+module.exports = Message;
+
+var util = require(35);
+
+/**
+ * Constructs a new message instance.
+ * @classdesc Abstract runtime message.
+ * @constructor
+ * @param {Properties} [properties] Properties to set
+ * @template T extends object = object
+ */
+function Message(properties) {
+ // not used internally
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ this[keys[i]] = properties[keys[i]];
+}
+
+/**
+ * Reference to the reflected type.
+ * @name Message.$type
+ * @type {Type}
+ * @readonly
+ */
+
+/**
+ * Reference to the reflected type.
+ * @name Message#$type
+ * @type {Type}
+ * @readonly
+ */
+
+/*eslint-disable valid-jsdoc*/
+
+/**
+ * Creates a new message of this type using the specified properties.
+ * @param {Object.} [properties] Properties to set
+ * @returns {Message} Message instance
+ * @template T extends Message
+ * @this Constructor
+ */
+Message.create = function create(properties) {
+ return this.$type.create(properties);
+};
+
+/**
+ * Encodes a message of this type.
+ * @param {T|Object.} message Message to encode
+ * @param {Writer} [writer] Writer to use
+ * @returns {Writer} Writer
+ * @template T extends Message
+ * @this Constructor
+ */
+Message.encode = function encode(message, writer) {
+ return this.$type.encode(message, writer);
+};
+
+/**
+ * Encodes a message of this type preceeded by its length as a varint.
+ * @param {T|Object.} message Message to encode
+ * @param {Writer} [writer] Writer to use
+ * @returns {Writer} Writer
+ * @template T extends Message
+ * @this Constructor
+ */
+Message.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.$type.encodeDelimited(message, writer);
+};
+
+/**
+ * Decodes a message of this type.
+ * @name Message.decode
+ * @function
+ * @param {Reader|Uint8Array} reader Reader or buffer to decode
+ * @returns {T} Decoded message
+ * @template T extends Message
+ * @this Constructor
+ */
+Message.decode = function decode(reader) {
+ return this.$type.decode(reader);
+};
+
+/**
+ * Decodes a message of this type preceeded by its length as a varint.
+ * @name Message.decodeDelimited
+ * @function
+ * @param {Reader|Uint8Array} reader Reader or buffer to decode
+ * @returns {T} Decoded message
+ * @template T extends Message
+ * @this Constructor
+ */
+Message.decodeDelimited = function decodeDelimited(reader) {
+ return this.$type.decodeDelimited(reader);
+};
+
+/**
+ * Verifies a message of this type.
+ * @name Message.verify
+ * @function
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+Message.verify = function verify(message) {
+ return this.$type.verify(message);
+};
+
+/**
+ * Creates a new message of this type from a plain object. Also converts values to their respective internal types.
+ * @param {Object.} object Plain object
+ * @returns {T} Message instance
+ * @template T extends Message
+ * @this Constructor
+ */
+Message.fromObject = function fromObject(object) {
+ return this.$type.fromObject(object);
+};
+
+/**
+ * Creates a plain object from a message of this type. Also converts values to other types if specified.
+ * @param {T} message Message instance
+ * @param {IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ * @template T extends Message
+ * @this Constructor
+ */
+Message.toObject = function toObject(message, options) {
+ return this.$type.toObject(message, options);
+};
+
+/**
+ * Converts this message to JSON.
+ * @returns {Object.} JSON object
+ */
+Message.prototype.toJSON = function toJSON() {
+ return this.$type.toObject(this, util.toJSONOptions);
+};
+
+/*eslint-enable valid-jsdoc*/
+},{"35":35}],20:[function(require,module,exports){
+"use strict";
+module.exports = Method;
+
+// extends ReflectionObject
+var ReflectionObject = require(22);
+((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method";
+
+var util = require(33);
+
+/**
+ * Constructs a new service method instance.
+ * @classdesc Reflected service method.
+ * @extends ReflectionObject
+ * @constructor
+ * @param {string} name Method name
+ * @param {string|undefined} type Method type, usually `"rpc"`
+ * @param {string} requestType Request message type
+ * @param {string} responseType Response message type
+ * @param {boolean|Object.} [requestStream] Whether the request is streamed
+ * @param {boolean|Object.} [responseStream] Whether the response is streamed
+ * @param {Object.} [options] Declared options
+ * @param {string} [comment] The comment for this method
+ */
+function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment) {
+
+ /* istanbul ignore next */
+ if (util.isObject(requestStream)) {
+ options = requestStream;
+ requestStream = responseStream = undefined;
+ } else if (util.isObject(responseStream)) {
+ options = responseStream;
+ responseStream = undefined;
+ }
+
+ /* istanbul ignore if */
+ if (!(type === undefined || util.isString(type)))
+ throw TypeError("type must be a string");
+
+ /* istanbul ignore if */
+ if (!util.isString(requestType))
+ throw TypeError("requestType must be a string");
+
+ /* istanbul ignore if */
+ if (!util.isString(responseType))
+ throw TypeError("responseType must be a string");
+
+ ReflectionObject.call(this, name, options);
+
+ /**
+ * Method type.
+ * @type {string}
+ */
+ this.type = type || "rpc"; // toJSON
+
+ /**
+ * Request type.
+ * @type {string}
+ */
+ this.requestType = requestType; // toJSON, marker
+
+ /**
+ * Whether requests are streamed or not.
+ * @type {boolean|undefined}
+ */
+ this.requestStream = requestStream ? true : undefined; // toJSON
+
+ /**
+ * Response type.
+ * @type {string}
+ */
+ this.responseType = responseType; // toJSON
+
+ /**
+ * Whether responses are streamed or not.
+ * @type {boolean|undefined}
+ */
+ this.responseStream = responseStream ? true : undefined; // toJSON
+
+ /**
+ * Resolved request type.
+ * @type {Type|null}
+ */
+ this.resolvedRequestType = null;
+
+ /**
+ * Resolved response type.
+ * @type {Type|null}
+ */
+ this.resolvedResponseType = null;
+
+ /**
+ * Comment for this method
+ * @type {string|null}
+ */
+ this.comment = comment;
+}
+
+/**
+ * Method descriptor.
+ * @interface IMethod
+ * @property {string} [type="rpc"] Method type
+ * @property {string} requestType Request type
+ * @property {string} responseType Response type
+ * @property {boolean} [requestStream=false] Whether requests are streamed
+ * @property {boolean} [responseStream=false] Whether responses are streamed
+ * @property {Object.} [options] Method options
+ */
+
+/**
+ * Constructs a method from a method descriptor.
+ * @param {string} name Method name
+ * @param {IMethod} json Method descriptor
+ * @returns {Method} Created method
+ * @throws {TypeError} If arguments are invalid
+ */
+Method.fromJSON = function fromJSON(name, json) {
+ return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment);
+};
+
+/**
+ * Converts this method to a method descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {IMethod} Method descriptor
+ */
+Method.prototype.toJSON = function toJSON(toJSONOptions) {
+ var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
+ return util.toObject([
+ "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined,
+ "requestType" , this.requestType,
+ "requestStream" , this.requestStream,
+ "responseType" , this.responseType,
+ "responseStream" , this.responseStream,
+ "options" , this.options,
+ "comment" , keepComments ? this.comment : undefined
+ ]);
+};
+
+/**
+ * @override
+ */
+Method.prototype.resolve = function resolve() {
+
+ /* istanbul ignore if */
+ if (this.resolved)
+ return this;
+
+ this.resolvedRequestType = this.parent.lookupType(this.requestType);
+ this.resolvedResponseType = this.parent.lookupType(this.responseType);
+
+ return ReflectionObject.prototype.resolve.call(this);
+};
+
+},{"22":22,"33":33}],21:[function(require,module,exports){
+"use strict";
+module.exports = Namespace;
+
+// extends ReflectionObject
+var ReflectionObject = require(22);
+((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace";
+
+var Field = require(15),
+ util = require(33);
+
+var Type, // cyclic
+ Service,
+ Enum;
+
+/**
+ * Constructs a new namespace instance.
+ * @name Namespace
+ * @classdesc Reflected namespace.
+ * @extends NamespaceBase
+ * @constructor
+ * @param {string} name Namespace name
+ * @param {Object.} [options] Declared options
+ */
+
+/**
+ * Constructs a namespace from JSON.
+ * @memberof Namespace
+ * @function
+ * @param {string} name Namespace name
+ * @param {Object.} json JSON object
+ * @returns {Namespace} Created namespace
+ * @throws {TypeError} If arguments are invalid
+ */
+Namespace.fromJSON = function fromJSON(name, json) {
+ return new Namespace(name, json.options).addJSON(json.nested);
+};
+
+/**
+ * Converts an array of reflection objects to JSON.
+ * @memberof Namespace
+ * @param {ReflectionObject[]} array Object array
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {Object.|undefined} JSON object or `undefined` when array is empty
+ */
+function arrayToJSON(array, toJSONOptions) {
+ if (!(array && array.length))
+ return undefined;
+ var obj = {};
+ for (var i = 0; i < array.length; ++i)
+ obj[array[i].name] = array[i].toJSON(toJSONOptions);
+ return obj;
+}
+
+Namespace.arrayToJSON = arrayToJSON;
+
+/**
+ * Tests if the specified id is reserved.
+ * @param {Array.|undefined} reserved Array of reserved ranges and names
+ * @param {number} id Id to test
+ * @returns {boolean} `true` if reserved, otherwise `false`
+ */
+Namespace.isReservedId = function isReservedId(reserved, id) {
+ if (reserved)
+ for (var i = 0; i < reserved.length; ++i)
+ if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id)
+ return true;
+ return false;
+};
+
+/**
+ * Tests if the specified name is reserved.
+ * @param {Array.|undefined} reserved Array of reserved ranges and names
+ * @param {string} name Name to test
+ * @returns {boolean} `true` if reserved, otherwise `false`
+ */
+Namespace.isReservedName = function isReservedName(reserved, name) {
+ if (reserved)
+ for (var i = 0; i < reserved.length; ++i)
+ if (reserved[i] === name)
+ return true;
+ return false;
+};
+
+/**
+ * Not an actual constructor. Use {@link Namespace} instead.
+ * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.
+ * @exports NamespaceBase
+ * @extends ReflectionObject
+ * @abstract
+ * @constructor
+ * @param {string} name Namespace name
+ * @param {Object.} [options] Declared options
+ * @see {@link Namespace}
+ */
+function Namespace(name, options) {
+ ReflectionObject.call(this, name, options);
+
+ /**
+ * Nested objects by name.
+ * @type {Object.|undefined}
+ */
+ this.nested = undefined; // toJSON
+
+ /**
+ * Cached nested objects as an array.
+ * @type {ReflectionObject[]|null}
+ * @private
+ */
+ this._nestedArray = null;
+}
+
+function clearCache(namespace) {
+ namespace._nestedArray = null;
+ return namespace;
+}
+
+/**
+ * Nested objects of this namespace as an array for iteration.
+ * @name NamespaceBase#nestedArray
+ * @type {ReflectionObject[]}
+ * @readonly
+ */
+Object.defineProperty(Namespace.prototype, "nestedArray", {
+ get: function() {
+ return this._nestedArray || (this._nestedArray = util.toArray(this.nested));
+ }
+});
+
+/**
+ * Namespace descriptor.
+ * @interface INamespace
+ * @property {Object.} [options] Namespace options
+ * @property {Object.} [nested] Nested object descriptors
+ */
+
+/**
+ * Any extension field descriptor.
+ * @typedef AnyExtensionField
+ * @type {IExtensionField|IExtensionMapField}
+ */
+
+/**
+ * Any nested object descriptor.
+ * @typedef AnyNestedObject
+ * @type {IEnum|IType|IService|AnyExtensionField|INamespace}
+ */
+// ^ BEWARE: VSCode hangs forever when using more than 5 types (that's why AnyExtensionField exists in the first place)
+
+/**
+ * Converts this namespace to a namespace descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {INamespace} Namespace descriptor
+ */
+Namespace.prototype.toJSON = function toJSON(toJSONOptions) {
+ return util.toObject([
+ "options" , this.options,
+ "nested" , arrayToJSON(this.nestedArray, toJSONOptions)
+ ]);
+};
+
+/**
+ * Adds nested objects to this namespace from nested object descriptors.
+ * @param {Object.} nestedJson Any nested object descriptors
+ * @returns {Namespace} `this`
+ */
+Namespace.prototype.addJSON = function addJSON(nestedJson) {
+ var ns = this;
+ /* istanbul ignore else */
+ if (nestedJson) {
+ for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {
+ nested = nestedJson[names[i]];
+ ns.add( // most to least likely
+ ( nested.fields !== undefined
+ ? Type.fromJSON
+ : nested.values !== undefined
+ ? Enum.fromJSON
+ : nested.methods !== undefined
+ ? Service.fromJSON
+ : nested.id !== undefined
+ ? Field.fromJSON
+ : Namespace.fromJSON )(names[i], nested)
+ );
+ }
+ }
+ return this;
+};
+
+/**
+ * Gets the nested object of the specified name.
+ * @param {string} name Nested object name
+ * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist
+ */
+Namespace.prototype.get = function get(name) {
+ return this.nested && this.nested[name]
+ || null;
+};
+
+/**
+ * Gets the values of the nested {@link Enum|enum} of the specified name.
+ * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.
+ * @param {string} name Nested enum name
+ * @returns {Object.} Enum values
+ * @throws {Error} If there is no such enum
+ */
+Namespace.prototype.getEnum = function getEnum(name) {
+ if (this.nested && this.nested[name] instanceof Enum)
+ return this.nested[name].values;
+ throw Error("no such enum: " + name);
+};
+
+/**
+ * Adds a nested object to this namespace.
+ * @param {ReflectionObject} object Nested object to add
+ * @returns {Namespace} `this`
+ * @throws {TypeError} If arguments are invalid
+ * @throws {Error} If there is already a nested object with this name
+ */
+Namespace.prototype.add = function add(object) {
+
+ if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace))
+ throw TypeError("object must be a valid nested object");
+
+ if (!this.nested)
+ this.nested = {};
+ else {
+ var prev = this.get(object.name);
+ if (prev) {
+ if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {
+ // replace plain namespace but keep existing nested elements and options
+ var nested = prev.nestedArray;
+ for (var i = 0; i < nested.length; ++i)
+ object.add(nested[i]);
+ this.remove(prev);
+ if (!this.nested)
+ this.nested = {};
+ object.setOptions(prev.options, true);
+
+ } else
+ throw Error("duplicate name '" + object.name + "' in " + this);
+ }
+ }
+ this.nested[object.name] = object;
+ object.onAdd(this);
+ return clearCache(this);
+};
+
+/**
+ * Removes a nested object from this namespace.
+ * @param {ReflectionObject} object Nested object to remove
+ * @returns {Namespace} `this`
+ * @throws {TypeError} If arguments are invalid
+ * @throws {Error} If `object` is not a member of this namespace
+ */
+Namespace.prototype.remove = function remove(object) {
+
+ if (!(object instanceof ReflectionObject))
+ throw TypeError("object must be a ReflectionObject");
+ if (object.parent !== this)
+ throw Error(object + " is not a member of " + this);
+
+ delete this.nested[object.name];
+ if (!Object.keys(this.nested).length)
+ this.nested = undefined;
+
+ object.onRemove(this);
+ return clearCache(this);
+};
+
+/**
+ * Defines additial namespaces within this one if not yet existing.
+ * @param {string|string[]} path Path to create
+ * @param {*} [json] Nested types to create from JSON
+ * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty
+ */
+Namespace.prototype.define = function define(path, json) {
+
+ if (util.isString(path))
+ path = path.split(".");
+ else if (!Array.isArray(path))
+ throw TypeError("illegal path");
+ if (path && path.length && path[0] === "")
+ throw Error("path must be relative");
+
+ var ptr = this;
+ while (path.length > 0) {
+ var part = path.shift();
+ if (ptr.nested && ptr.nested[part]) {
+ ptr = ptr.nested[part];
+ if (!(ptr instanceof Namespace))
+ throw Error("path conflicts with non-namespace objects");
+ } else
+ ptr.add(ptr = new Namespace(part));
+ }
+ if (json)
+ ptr.addJSON(json);
+ return ptr;
+};
+
+/**
+ * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.
+ * @returns {Namespace} `this`
+ */
+Namespace.prototype.resolveAll = function resolveAll() {
+ var nested = this.nestedArray, i = 0;
+ while (i < nested.length)
+ if (nested[i] instanceof Namespace)
+ nested[i++].resolveAll();
+ else
+ nested[i++].resolve();
+ return this.resolve();
+};
+
+/**
+ * Recursively looks up the reflection object matching the specified path in the scope of this namespace.
+ * @param {string|string[]} path Path to look up
+ * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.
+ * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked
+ * @returns {ReflectionObject|null} Looked up object or `null` if none could be found
+ */
+Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {
+
+ /* istanbul ignore next */
+ if (typeof filterTypes === "boolean") {
+ parentAlreadyChecked = filterTypes;
+ filterTypes = undefined;
+ } else if (filterTypes && !Array.isArray(filterTypes))
+ filterTypes = [ filterTypes ];
+
+ if (util.isString(path) && path.length) {
+ if (path === ".")
+ return this.root;
+ path = path.split(".");
+ } else if (!path.length)
+ return this;
+
+ // Start at root if path is absolute
+ if (path[0] === "")
+ return this.root.lookup(path.slice(1), filterTypes);
+
+ // Test if the first part matches any nested object, and if so, traverse if path contains more
+ var found = this.get(path[0]);
+ if (found) {
+ if (path.length === 1) {
+ if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)
+ return found;
+ } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))
+ return found;
+
+ // Otherwise try each nested namespace
+ } else
+ for (var i = 0; i < this.nestedArray.length; ++i)
+ if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))
+ return found;
+
+ // If there hasn't been a match, try again at the parent
+ if (this.parent === null || parentAlreadyChecked)
+ return null;
+ return this.parent.lookup(path, filterTypes);
+};
+
+/**
+ * Looks up the reflection object at the specified path, relative to this namespace.
+ * @name NamespaceBase#lookup
+ * @function
+ * @param {string|string[]} path Path to look up
+ * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked
+ * @returns {ReflectionObject|null} Looked up object or `null` if none could be found
+ * @variation 2
+ */
+// lookup(path: string, [parentAlreadyChecked: boolean])
+
+/**
+ * Looks up the {@link Type|type} at the specified path, relative to this namespace.
+ * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.
+ * @param {string|string[]} path Path to look up
+ * @returns {Type} Looked up type
+ * @throws {Error} If `path` does not point to a type
+ */
+Namespace.prototype.lookupType = function lookupType(path) {
+ var found = this.lookup(path, [ Type ]);
+ if (!found)
+ throw Error("no such type: " + path);
+ return found;
+};
+
+/**
+ * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.
+ * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.
+ * @param {string|string[]} path Path to look up
+ * @returns {Enum} Looked up enum
+ * @throws {Error} If `path` does not point to an enum
+ */
+Namespace.prototype.lookupEnum = function lookupEnum(path) {
+ var found = this.lookup(path, [ Enum ]);
+ if (!found)
+ throw Error("no such Enum '" + path + "' in " + this);
+ return found;
+};
+
+/**
+ * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.
+ * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.
+ * @param {string|string[]} path Path to look up
+ * @returns {Type} Looked up type or enum
+ * @throws {Error} If `path` does not point to a type or enum
+ */
+Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {
+ var found = this.lookup(path, [ Type, Enum ]);
+ if (!found)
+ throw Error("no such Type or Enum '" + path + "' in " + this);
+ return found;
+};
+
+/**
+ * Looks up the {@link Service|service} at the specified path, relative to this namespace.
+ * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.
+ * @param {string|string[]} path Path to look up
+ * @returns {Service} Looked up service
+ * @throws {Error} If `path` does not point to a service
+ */
+Namespace.prototype.lookupService = function lookupService(path) {
+ var found = this.lookup(path, [ Service ]);
+ if (!found)
+ throw Error("no such Service '" + path + "' in " + this);
+ return found;
+};
+
+// Sets up cyclic dependencies (called in index-light)
+Namespace._configure = function(Type_, Service_, Enum_) {
+ Type = Type_;
+ Service = Service_;
+ Enum = Enum_;
+};
+
+},{"15":15,"22":22,"33":33}],22:[function(require,module,exports){
+"use strict";
+module.exports = ReflectionObject;
+
+ReflectionObject.className = "ReflectionObject";
+
+var util = require(33);
+
+var Root; // cyclic
+
+/**
+ * Constructs a new reflection object instance.
+ * @classdesc Base class of all reflection objects.
+ * @constructor
+ * @param {string} name Object name
+ * @param {Object.} [options] Declared options
+ * @abstract
+ */
+function ReflectionObject(name, options) {
+
+ if (!util.isString(name))
+ throw TypeError("name must be a string");
+
+ if (options && !util.isObject(options))
+ throw TypeError("options must be an object");
+
+ /**
+ * Options.
+ * @type {Object.|undefined}
+ */
+ this.options = options; // toJSON
+
+ /**
+ * Unique name within its namespace.
+ * @type {string}
+ */
+ this.name = name;
+
+ /**
+ * Parent namespace.
+ * @type {Namespace|null}
+ */
+ this.parent = null;
+
+ /**
+ * Whether already resolved or not.
+ * @type {boolean}
+ */
+ this.resolved = false;
+
+ /**
+ * Comment text, if any.
+ * @type {string|null}
+ */
+ this.comment = null;
+
+ /**
+ * Defining file name.
+ * @type {string|null}
+ */
+ this.filename = null;
+}
+
+Object.defineProperties(ReflectionObject.prototype, {
+
+ /**
+ * Reference to the root namespace.
+ * @name ReflectionObject#root
+ * @type {Root}
+ * @readonly
+ */
+ root: {
+ get: function() {
+ var ptr = this;
+ while (ptr.parent !== null)
+ ptr = ptr.parent;
+ return ptr;
+ }
+ },
+
+ /**
+ * Full name including leading dot.
+ * @name ReflectionObject#fullName
+ * @type {string}
+ * @readonly
+ */
+ fullName: {
+ get: function() {
+ var path = [ this.name ],
+ ptr = this.parent;
+ while (ptr) {
+ path.unshift(ptr.name);
+ ptr = ptr.parent;
+ }
+ return path.join(".");
+ }
+ }
+});
+
+/**
+ * Converts this reflection object to its descriptor representation.
+ * @returns {Object.} Descriptor
+ * @abstract
+ */
+ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {
+ throw Error(); // not implemented, shouldn't happen
+};
+
+/**
+ * Called when this object is added to a parent.
+ * @param {ReflectionObject} parent Parent added to
+ * @returns {undefined}
+ */
+ReflectionObject.prototype.onAdd = function onAdd(parent) {
+ if (this.parent && this.parent !== parent)
+ this.parent.remove(this);
+ this.parent = parent;
+ this.resolved = false;
+ var root = parent.root;
+ if (root instanceof Root)
+ root._handleAdd(this);
+};
+
+/**
+ * Called when this object is removed from a parent.
+ * @param {ReflectionObject} parent Parent removed from
+ * @returns {undefined}
+ */
+ReflectionObject.prototype.onRemove = function onRemove(parent) {
+ var root = parent.root;
+ if (root instanceof Root)
+ root._handleRemove(this);
+ this.parent = null;
+ this.resolved = false;
+};
+
+/**
+ * Resolves this objects type references.
+ * @returns {ReflectionObject} `this`
+ */
+ReflectionObject.prototype.resolve = function resolve() {
+ if (this.resolved)
+ return this;
+ if (this.root instanceof Root)
+ this.resolved = true; // only if part of a root
+ return this;
+};
+
+/**
+ * Gets an option value.
+ * @param {string} name Option name
+ * @returns {*} Option value or `undefined` if not set
+ */
+ReflectionObject.prototype.getOption = function getOption(name) {
+ if (this.options)
+ return this.options[name];
+ return undefined;
+};
+
+/**
+ * Sets an option.
+ * @param {string} name Option name
+ * @param {*} value Option value
+ * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set
+ * @returns {ReflectionObject} `this`
+ */
+ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {
+ if (!ifNotSet || !this.options || this.options[name] === undefined)
+ (this.options || (this.options = {}))[name] = value;
+ return this;
+};
+
+/**
+ * Sets multiple options.
+ * @param {Object.} options Options to set
+ * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set
+ * @returns {ReflectionObject} `this`
+ */
+ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {
+ if (options)
+ for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)
+ this.setOption(keys[i], options[keys[i]], ifNotSet);
+ return this;
+};
+
+/**
+ * Converts this instance to its string representation.
+ * @returns {string} Class name[, space, full name]
+ */
+ReflectionObject.prototype.toString = function toString() {
+ var className = this.constructor.className,
+ fullName = this.fullName;
+ if (fullName.length)
+ return className + " " + fullName;
+ return className;
+};
+
+// Sets up cyclic dependencies (called in index-light)
+ReflectionObject._configure = function(Root_) {
+ Root = Root_;
+};
+
+},{"33":33}],23:[function(require,module,exports){
+"use strict";
+module.exports = OneOf;
+
+// extends ReflectionObject
+var ReflectionObject = require(22);
+((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf";
+
+var Field = require(15),
+ util = require(33);
+
+/**
+ * Constructs a new oneof instance.
+ * @classdesc Reflected oneof.
+ * @extends ReflectionObject
+ * @constructor
+ * @param {string} name Oneof name
+ * @param {string[]|Object.} [fieldNames] Field names
+ * @param {Object.} [options] Declared options
+ * @param {string} [comment] Comment associated with this field
+ */
+function OneOf(name, fieldNames, options, comment) {
+ if (!Array.isArray(fieldNames)) {
+ options = fieldNames;
+ fieldNames = undefined;
+ }
+ ReflectionObject.call(this, name, options);
+
+ /* istanbul ignore if */
+ if (!(fieldNames === undefined || Array.isArray(fieldNames)))
+ throw TypeError("fieldNames must be an Array");
+
+ /**
+ * Field names that belong to this oneof.
+ * @type {string[]}
+ */
+ this.oneof = fieldNames || []; // toJSON, marker
+
+ /**
+ * Fields that belong to this oneof as an array for iteration.
+ * @type {Field[]}
+ * @readonly
+ */
+ this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent
+
+ /**
+ * Comment for this field.
+ * @type {string|null}
+ */
+ this.comment = comment;
+}
+
+/**
+ * Oneof descriptor.
+ * @interface IOneOf
+ * @property {Array.} oneof Oneof field names
+ * @property {Object.} [options] Oneof options
+ */
+
+/**
+ * Constructs a oneof from a oneof descriptor.
+ * @param {string} name Oneof name
+ * @param {IOneOf} json Oneof descriptor
+ * @returns {OneOf} Created oneof
+ * @throws {TypeError} If arguments are invalid
+ */
+OneOf.fromJSON = function fromJSON(name, json) {
+ return new OneOf(name, json.oneof, json.options, json.comment);
+};
+
+/**
+ * Converts this oneof to a oneof descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {IOneOf} Oneof descriptor
+ */
+OneOf.prototype.toJSON = function toJSON(toJSONOptions) {
+ var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
+ return util.toObject([
+ "options" , this.options,
+ "oneof" , this.oneof,
+ "comment" , keepComments ? this.comment : undefined
+ ]);
+};
+
+/**
+ * Adds the fields of the specified oneof to the parent if not already done so.
+ * @param {OneOf} oneof The oneof
+ * @returns {undefined}
+ * @inner
+ * @ignore
+ */
+function addFieldsToParent(oneof) {
+ if (oneof.parent)
+ for (var i = 0; i < oneof.fieldsArray.length; ++i)
+ if (!oneof.fieldsArray[i].parent)
+ oneof.parent.add(oneof.fieldsArray[i]);
+}
+
+/**
+ * Adds a field to this oneof and removes it from its current parent, if any.
+ * @param {Field} field Field to add
+ * @returns {OneOf} `this`
+ */
+OneOf.prototype.add = function add(field) {
+
+ /* istanbul ignore if */
+ if (!(field instanceof Field))
+ throw TypeError("field must be a Field");
+
+ if (field.parent && field.parent !== this.parent)
+ field.parent.remove(field);
+ this.oneof.push(field.name);
+ this.fieldsArray.push(field);
+ field.partOf = this; // field.parent remains null
+ addFieldsToParent(this);
+ return this;
+};
+
+/**
+ * Removes a field from this oneof and puts it back to the oneof's parent.
+ * @param {Field} field Field to remove
+ * @returns {OneOf} `this`
+ */
+OneOf.prototype.remove = function remove(field) {
+
+ /* istanbul ignore if */
+ if (!(field instanceof Field))
+ throw TypeError("field must be a Field");
+
+ var index = this.fieldsArray.indexOf(field);
+
+ /* istanbul ignore if */
+ if (index < 0)
+ throw Error(field + " is not a member of " + this);
+
+ this.fieldsArray.splice(index, 1);
+ index = this.oneof.indexOf(field.name);
+
+ /* istanbul ignore else */
+ if (index > -1) // theoretical
+ this.oneof.splice(index, 1);
+
+ field.partOf = null;
+ return this;
+};
+
+/**
+ * @override
+ */
+OneOf.prototype.onAdd = function onAdd(parent) {
+ ReflectionObject.prototype.onAdd.call(this, parent);
+ var self = this;
+ // Collect present fields
+ for (var i = 0; i < this.oneof.length; ++i) {
+ var field = parent.get(this.oneof[i]);
+ if (field && !field.partOf) {
+ field.partOf = self;
+ self.fieldsArray.push(field);
+ }
+ }
+ // Add not yet present fields
+ addFieldsToParent(this);
+};
+
+/**
+ * @override
+ */
+OneOf.prototype.onRemove = function onRemove(parent) {
+ for (var i = 0, field; i < this.fieldsArray.length; ++i)
+ if ((field = this.fieldsArray[i]).parent)
+ field.parent.remove(field);
+ ReflectionObject.prototype.onRemove.call(this, parent);
+};
+
+/**
+ * Decorator function as returned by {@link OneOf.d} (TypeScript).
+ * @typedef OneOfDecorator
+ * @type {function}
+ * @param {Object} prototype Target prototype
+ * @param {string} oneofName OneOf name
+ * @returns {undefined}
+ */
+
+/**
+ * OneOf decorator (TypeScript).
+ * @function
+ * @param {...string} fieldNames Field names
+ * @returns {OneOfDecorator} Decorator function
+ * @template T extends string
+ */
+OneOf.d = function decorateOneOf() {
+ var fieldNames = new Array(arguments.length),
+ index = 0;
+ while (index < arguments.length)
+ fieldNames[index] = arguments[index++];
+ return function oneOfDecorator(prototype, oneofName) {
+ util.decorateType(prototype.constructor)
+ .add(new OneOf(oneofName, fieldNames));
+ Object.defineProperty(prototype, oneofName, {
+ get: util.oneOfGetter(fieldNames),
+ set: util.oneOfSetter(fieldNames)
+ });
+ };
+};
+
+},{"15":15,"22":22,"33":33}],24:[function(require,module,exports){
+"use strict";
+module.exports = Reader;
+
+var util = require(35);
+
+var BufferReader; // cyclic
+
+var LongBits = util.LongBits,
+ utf8 = util.utf8;
+
+/* istanbul ignore next */
+function indexOutOfRange(reader, writeLength) {
+ return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
+}
+
+/**
+ * Constructs a new reader instance using the specified buffer.
+ * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.
+ * @constructor
+ * @param {Uint8Array} buffer Buffer to read from
+ */
+function Reader(buffer) {
+
+ /**
+ * Read buffer.
+ * @type {Uint8Array}
+ */
+ this.buf = buffer;
+
+ /**
+ * Read buffer position.
+ * @type {number}
+ */
+ this.pos = 0;
+
+ /**
+ * Read buffer length.
+ * @type {number}
+ */
+ this.len = buffer.length;
+}
+
+var create_array = typeof Uint8Array !== "undefined"
+ ? function create_typed_array(buffer) {
+ if (buffer instanceof Uint8Array || Array.isArray(buffer))
+ return new Reader(buffer);
+ throw Error("illegal buffer");
+ }
+ /* istanbul ignore next */
+ : function create_array(buffer) {
+ if (Array.isArray(buffer))
+ return new Reader(buffer);
+ throw Error("illegal buffer");
+ };
+
+/**
+ * Creates a new reader using the specified buffer.
+ * @function
+ * @param {Uint8Array|Buffer} buffer Buffer to read from
+ * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}
+ * @throws {Error} If `buffer` is not a valid buffer
+ */
+Reader.create = util.Buffer
+ ? function create_buffer_setup(buffer) {
+ return (Reader.create = function create_buffer(buffer) {
+ return util.Buffer.isBuffer(buffer)
+ ? new BufferReader(buffer)
+ /* istanbul ignore next */
+ : create_array(buffer);
+ })(buffer);
+ }
+ /* istanbul ignore next */
+ : create_array;
+
+Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;
+
+/**
+ * Reads a varint as an unsigned 32 bit value.
+ * @function
+ * @returns {number} Value read
+ */
+Reader.prototype.uint32 = (function read_uint32_setup() {
+ var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)
+ return function read_uint32() {
+ value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;
+ value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;
+ value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;
+ value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;
+ value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;
+
+ /* istanbul ignore if */
+ if ((this.pos += 5) > this.len) {
+ this.pos = this.len;
+ throw indexOutOfRange(this, 10);
+ }
+ return value;
+ };
+})();
+
+/**
+ * Reads a varint as a signed 32 bit value.
+ * @returns {number} Value read
+ */
+Reader.prototype.int32 = function read_int32() {
+ return this.uint32() | 0;
+};
+
+/**
+ * Reads a zig-zag encoded varint as a signed 32 bit value.
+ * @returns {number} Value read
+ */
+Reader.prototype.sint32 = function read_sint32() {
+ var value = this.uint32();
+ return value >>> 1 ^ -(value & 1) | 0;
+};
+
+/* eslint-disable no-invalid-this */
+
+function readLongVarint() {
+ // tends to deopt with local vars for octet etc.
+ var bits = new LongBits(0, 0);
+ var i = 0;
+ if (this.len - this.pos > 4) { // fast route (lo)
+ for (; i < 4; ++i) {
+ // 1st..4th
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
+ if (this.buf[this.pos++] < 128)
+ return bits;
+ }
+ // 5th
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
+ if (this.buf[this.pos++] < 128)
+ return bits;
+ i = 0;
+ } else {
+ for (; i < 3; ++i) {
+ /* istanbul ignore if */
+ if (this.pos >= this.len)
+ throw indexOutOfRange(this);
+ // 1st..3th
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
+ if (this.buf[this.pos++] < 128)
+ return bits;
+ }
+ // 4th
+ bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
+ return bits;
+ }
+ if (this.len - this.pos > 4) { // fast route (hi)
+ for (; i < 5; ++i) {
+ // 6th..10th
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
+ if (this.buf[this.pos++] < 128)
+ return bits;
+ }
+ } else {
+ for (; i < 5; ++i) {
+ /* istanbul ignore if */
+ if (this.pos >= this.len)
+ throw indexOutOfRange(this);
+ // 6th..10th
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
+ if (this.buf[this.pos++] < 128)
+ return bits;
+ }
+ }
+ /* istanbul ignore next */
+ throw Error("invalid varint encoding");
+}
+
+/* eslint-enable no-invalid-this */
+
+/*
+ * Reads a varint as a signed 64 bit value.
+ * @name Reader#int64
+ * @function
+ * @returns {Long} Value read
+ */
+
+/*
+ * Reads a varint as an unsigned 64 bit value.
+ * @name Reader#uint64
+ * @function
+ * @returns {Long} Value read
+ */
+
+/*
+ * Reads a zig-zag encoded varint as a signed 64 bit value.
+ * @name Reader#sint64
+ * @function
+ * @returns {Long} Value read
+ */
+
+/**
+ * Reads a varint as a boolean.
+ * @returns {boolean} Value read
+ */
+Reader.prototype.bool = function read_bool() {
+ return this.uint32() !== 0;
+};
+
+function readFixed32_end(buf, end) { // note that this uses `end`, not `pos`
+ return (buf[end - 4]
+ | buf[end - 3] << 8
+ | buf[end - 2] << 16
+ | buf[end - 1] << 24) >>> 0;
+}
+
+/**
+ * Reads fixed 32 bits as an unsigned 32 bit integer.
+ * @returns {number} Value read
+ */
+Reader.prototype.fixed32 = function read_fixed32() {
+
+ /* istanbul ignore if */
+ if (this.pos + 4 > this.len)
+ throw indexOutOfRange(this, 4);
+
+ return readFixed32_end(this.buf, this.pos += 4);
+};
+
+/**
+ * Reads fixed 32 bits as a signed 32 bit integer.
+ * @returns {number} Value read
+ */
+Reader.prototype.sfixed32 = function read_sfixed32() {
+
+ /* istanbul ignore if */
+ if (this.pos + 4 > this.len)
+ throw indexOutOfRange(this, 4);
+
+ return readFixed32_end(this.buf, this.pos += 4) | 0;
+};
+
+/* eslint-disable no-invalid-this */
+
+function readFixed64(/* this: Reader */) {
+
+ /* istanbul ignore if */
+ if (this.pos + 8 > this.len)
+ throw indexOutOfRange(this, 8);
+
+ return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
+}
+
+/* eslint-enable no-invalid-this */
+
+/*
+ * Reads fixed 64 bits.
+ * @name Reader#fixed64
+ * @function
+ * @returns {Long} Value read
+ */
+
+/*
+ * Reads zig-zag encoded fixed 64 bits.
+ * @name Reader#sfixed64
+ * @function
+ * @returns {Long} Value read
+ */
+
+/**
+ * Reads a float (32 bit) as a number.
+ * @function
+ * @returns {number} Value read
+ */
+Reader.prototype.float = function read_float() {
+
+ /* istanbul ignore if */
+ if (this.pos + 4 > this.len)
+ throw indexOutOfRange(this, 4);
+
+ var value = util.float.readFloatLE(this.buf, this.pos);
+ this.pos += 4;
+ return value;
+};
+
+/**
+ * Reads a double (64 bit float) as a number.
+ * @function
+ * @returns {number} Value read
+ */
+Reader.prototype.double = function read_double() {
+
+ /* istanbul ignore if */
+ if (this.pos + 8 > this.len)
+ throw indexOutOfRange(this, 4);
+
+ var value = util.float.readDoubleLE(this.buf, this.pos);
+ this.pos += 8;
+ return value;
+};
+
+/**
+ * Reads a sequence of bytes preceeded by its length as a varint.
+ * @returns {Uint8Array} Value read
+ */
+Reader.prototype.bytes = function read_bytes() {
+ var length = this.uint32(),
+ start = this.pos,
+ end = this.pos + length;
+
+ /* istanbul ignore if */
+ if (end > this.len)
+ throw indexOutOfRange(this, length);
+
+ this.pos += length;
+ if (Array.isArray(this.buf)) // plain array
+ return this.buf.slice(start, end);
+ return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1
+ ? new this.buf.constructor(0)
+ : this._slice.call(this.buf, start, end);
+};
+
+/**
+ * Reads a string preceeded by its byte length as a varint.
+ * @returns {string} Value read
+ */
+Reader.prototype.string = function read_string() {
+ var bytes = this.bytes();
+ return utf8.read(bytes, 0, bytes.length);
+};
+
+/**
+ * Skips the specified number of bytes if specified, otherwise skips a varint.
+ * @param {number} [length] Length if known, otherwise a varint is assumed
+ * @returns {Reader} `this`
+ */
+Reader.prototype.skip = function skip(length) {
+ if (typeof length === "number") {
+ /* istanbul ignore if */
+ if (this.pos + length > this.len)
+ throw indexOutOfRange(this, length);
+ this.pos += length;
+ } else {
+ do {
+ /* istanbul ignore if */
+ if (this.pos >= this.len)
+ throw indexOutOfRange(this);
+ } while (this.buf[this.pos++] & 128);
+ }
+ return this;
+};
+
+/**
+ * Skips the next element of the specified wire type.
+ * @param {number} wireType Wire type received
+ * @returns {Reader} `this`
+ */
+Reader.prototype.skipType = function(wireType) {
+ switch (wireType) {
+ case 0:
+ this.skip();
+ break;
+ case 1:
+ this.skip(8);
+ break;
+ case 2:
+ this.skip(this.uint32());
+ break;
+ case 3:
+ while ((wireType = this.uint32() & 7) !== 4) {
+ this.skipType(wireType);
+ }
+ break;
+ case 5:
+ this.skip(4);
+ break;
+
+ /* istanbul ignore next */
+ default:
+ throw Error("invalid wire type " + wireType + " at offset " + this.pos);
+ }
+ return this;
+};
+
+Reader._configure = function(BufferReader_) {
+ BufferReader = BufferReader_;
+
+ var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber";
+ util.merge(Reader.prototype, {
+
+ int64: function read_int64() {
+ return readLongVarint.call(this)[fn](false);
+ },
+
+ uint64: function read_uint64() {
+ return readLongVarint.call(this)[fn](true);
+ },
+
+ sint64: function read_sint64() {
+ return readLongVarint.call(this).zzDecode()[fn](false);
+ },
+
+ fixed64: function read_fixed64() {
+ return readFixed64.call(this)[fn](true);
+ },
+
+ sfixed64: function read_sfixed64() {
+ return readFixed64.call(this)[fn](false);
+ }
+
+ });
+};
+
+},{"35":35}],25:[function(require,module,exports){
+"use strict";
+module.exports = BufferReader;
+
+// extends Reader
+var Reader = require(24);
+(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
+
+var util = require(35);
+
+/**
+ * Constructs a new buffer reader instance.
+ * @classdesc Wire format reader using node buffers.
+ * @extends Reader
+ * @constructor
+ * @param {Buffer} buffer Buffer to read from
+ */
+function BufferReader(buffer) {
+ Reader.call(this, buffer);
+
+ /**
+ * Read buffer.
+ * @name BufferReader#buf
+ * @type {Buffer}
+ */
+}
+
+/* istanbul ignore else */
+if (util.Buffer)
+ BufferReader.prototype._slice = util.Buffer.prototype.slice;
+
+/**
+ * @override
+ */
+BufferReader.prototype.string = function read_string_buffer() {
+ var len = this.uint32(); // modifies pos
+ return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));
+};
+
+/**
+ * Reads a sequence of bytes preceeded by its length as a varint.
+ * @name BufferReader#bytes
+ * @function
+ * @returns {Buffer} Value read
+ */
+
+},{"24":24,"35":35}],26:[function(require,module,exports){
+"use strict";
+module.exports = Root;
+
+// extends Namespace
+var Namespace = require(21);
+((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root";
+
+var Field = require(15),
+ Enum = require(14),
+ OneOf = require(23),
+ util = require(33);
+
+var Type, // cyclic
+ parse, // might be excluded
+ common; // "
+
+/**
+ * Constructs a new root namespace instance.
+ * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.
+ * @extends NamespaceBase
+ * @constructor
+ * @param {Object.} [options] Top level options
+ */
+function Root(options) {
+ Namespace.call(this, "", options);
+
+ /**
+ * Deferred extension fields.
+ * @type {Field[]}
+ */
+ this.deferred = [];
+
+ /**
+ * Resolved file names of loaded files.
+ * @type {string[]}
+ */
+ this.files = [];
+}
+
+/**
+ * Loads a namespace descriptor into a root namespace.
+ * @param {INamespace} json Nameespace descriptor
+ * @param {Root} [root] Root namespace, defaults to create a new one if omitted
+ * @returns {Root} Root namespace
+ */
+Root.fromJSON = function fromJSON(json, root) {
+ if (!root)
+ root = new Root();
+ if (json.options)
+ root.setOptions(json.options);
+ return root.addJSON(json.nested);
+};
+
+/**
+ * Resolves the path of an imported file, relative to the importing origin.
+ * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.
+ * @function
+ * @param {string} origin The file name of the importing file
+ * @param {string} target The file name being imported
+ * @returns {string|null} Resolved path to `target` or `null` to skip the file
+ */
+Root.prototype.resolvePath = util.path.resolve;
+
+// A symbol-like function to safely signal synchronous loading
+/* istanbul ignore next */
+function SYNC() {} // eslint-disable-line no-empty-function
+
+/**
+ * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.
+ * @param {string|string[]} filename Names of one or multiple files to load
+ * @param {IParseOptions} options Parse options
+ * @param {LoadCallback} callback Callback function
+ * @returns {undefined}
+ */
+Root.prototype.load = function load(filename, options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = undefined;
+ }
+ var self = this;
+ if (!callback)
+ return util.asPromise(load, self, filename, options);
+
+ var sync = callback === SYNC; // undocumented
+
+ // Finishes loading by calling the callback (exactly once)
+ function finish(err, root) {
+ /* istanbul ignore if */
+ if (!callback)
+ return;
+ var cb = callback;
+ callback = null;
+ if (sync)
+ throw err;
+ cb(err, root);
+ }
+
+ // Bundled definition existence checking
+ function getBundledFileName(filename) {
+ var idx = filename.lastIndexOf("google/protobuf/");
+ if (idx > -1) {
+ var altname = filename.substring(idx);
+ if (altname in common) return altname;
+ }
+ return null;
+ }
+
+ // Processes a single file
+ function process(filename, source) {
+ try {
+ if (util.isString(source) && source.charAt(0) === "{")
+ source = JSON.parse(source);
+ if (!util.isString(source))
+ self.setOptions(source.options).addJSON(source.nested);
+ else {
+ parse.filename = filename;
+ var parsed = parse(source, self, options),
+ resolved,
+ i = 0;
+ if (parsed.imports)
+ for (; i < parsed.imports.length; ++i)
+ if (resolved = (getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])))
+ fetch(resolved);
+ if (parsed.weakImports)
+ for (i = 0; i < parsed.weakImports.length; ++i)
+ if (resolved = (getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])))
+ fetch(resolved, true);
+ }
+ } catch (err) {
+ finish(err);
+ }
+ if (!sync && !queued)
+ finish(null, self); // only once anyway
+ }
+
+ // Fetches a single file
+ function fetch(filename, weak) {
+
+ // Skip if already loaded / attempted
+ if (self.files.indexOf(filename) > -1)
+ return;
+ self.files.push(filename);
+
+ // Shortcut bundled definitions
+ if (filename in common) {
+ if (sync)
+ process(filename, common[filename]);
+ else {
+ ++queued;
+ setTimeout(function() {
+ --queued;
+ process(filename, common[filename]);
+ });
+ }
+ return;
+ }
+
+ // Otherwise fetch from disk or network
+ if (sync) {
+ var source;
+ try {
+ source = util.fs.readFileSync(filename).toString("utf8");
+ } catch (err) {
+ if (!weak)
+ finish(err);
+ return;
+ }
+ process(filename, source);
+ } else {
+ ++queued;
+ util.fetch(filename, function(err, source) {
+ --queued;
+ /* istanbul ignore if */
+ if (!callback)
+ return; // terminated meanwhile
+ if (err) {
+ /* istanbul ignore else */
+ if (!weak)
+ finish(err);
+ else if (!queued) // can't be covered reliably
+ finish(null, self);
+ return;
+ }
+ process(filename, source);
+ });
+ }
+ }
+ var queued = 0;
+
+ // Assembling the root namespace doesn't require working type
+ // references anymore, so we can load everything in parallel
+ if (util.isString(filename))
+ filename = [ filename ];
+ for (var i = 0, resolved; i < filename.length; ++i)
+ if (resolved = self.resolvePath("", filename[i]))
+ fetch(resolved);
+
+ if (sync)
+ return self;
+ if (!queued)
+ finish(null, self);
+ return undefined;
+};
+// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined
+
+/**
+ * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.
+ * @function Root#load
+ * @param {string|string[]} filename Names of one or multiple files to load
+ * @param {LoadCallback} callback Callback function
+ * @returns {undefined}
+ * @variation 2
+ */
+// function load(filename:string, callback:LoadCallback):undefined
+
+/**
+ * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.
+ * @function Root#load
+ * @param {string|string[]} filename Names of one or multiple files to load
+ * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.
+ * @returns {Promise} Promise
+ * @variation 3
+ */
+// function load(filename:string, [options:IParseOptions]):Promise
+
+/**
+ * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).
+ * @function Root#loadSync
+ * @param {string|string[]} filename Names of one or multiple files to load
+ * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.
+ * @returns {Root} Root namespace
+ * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid
+ */
+Root.prototype.loadSync = function loadSync(filename, options) {
+ if (!util.isNode)
+ throw Error("not supported");
+ return this.load(filename, options, SYNC);
+};
+
+/**
+ * @override
+ */
+Root.prototype.resolveAll = function resolveAll() {
+ if (this.deferred.length)
+ throw Error("unresolvable extensions: " + this.deferred.map(function(field) {
+ return "'extend " + field.extend + "' in " + field.parent.fullName;
+ }).join(", "));
+ return Namespace.prototype.resolveAll.call(this);
+};
+
+// only uppercased (and thus conflict-free) children are exposed, see below
+var exposeRe = /^[A-Z]/;
+
+/**
+ * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.
+ * @param {Root} root Root instance
+ * @param {Field} field Declaring extension field witin the declaring type
+ * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise
+ * @inner
+ * @ignore
+ */
+function tryHandleExtension(root, field) {
+ var extendedType = field.parent.lookup(field.extend);
+ if (extendedType) {
+ var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);
+ sisterField.declaringField = field;
+ field.extensionField = sisterField;
+ extendedType.add(sisterField);
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Called when any object is added to this root or its sub-namespaces.
+ * @param {ReflectionObject} object Object added
+ * @returns {undefined}
+ * @private
+ */
+Root.prototype._handleAdd = function _handleAdd(object) {
+ if (object instanceof Field) {
+
+ if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)
+ if (!tryHandleExtension(this, object))
+ this.deferred.push(object);
+
+ } else if (object instanceof Enum) {
+
+ if (exposeRe.test(object.name))
+ object.parent[object.name] = object.values; // expose enum values as property of its parent
+
+ } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {
+
+ if (object instanceof Type) // Try to handle any deferred extensions
+ for (var i = 0; i < this.deferred.length;)
+ if (tryHandleExtension(this, this.deferred[i]))
+ this.deferred.splice(i, 1);
+ else
+ ++i;
+ for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace
+ this._handleAdd(object._nestedArray[j]);
+ if (exposeRe.test(object.name))
+ object.parent[object.name] = object; // expose namespace as property of its parent
+ }
+
+ // The above also adds uppercased (and thus conflict-free) nested types, services and enums as
+ // properties of namespaces just like static code does. This allows using a .d.ts generated for
+ // a static module with reflection-based solutions where the condition is met.
+};
+
+/**
+ * Called when any object is removed from this root or its sub-namespaces.
+ * @param {ReflectionObject} object Object removed
+ * @returns {undefined}
+ * @private
+ */
+Root.prototype._handleRemove = function _handleRemove(object) {
+ if (object instanceof Field) {
+
+ if (/* an extension field */ object.extend !== undefined) {
+ if (/* already handled */ object.extensionField) { // remove its sister field
+ object.extensionField.parent.remove(object.extensionField);
+ object.extensionField = null;
+ } else { // cancel the extension
+ var index = this.deferred.indexOf(object);
+ /* istanbul ignore else */
+ if (index > -1)
+ this.deferred.splice(index, 1);
+ }
+ }
+
+ } else if (object instanceof Enum) {
+
+ if (exposeRe.test(object.name))
+ delete object.parent[object.name]; // unexpose enum values
+
+ } else if (object instanceof Namespace) {
+
+ for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace
+ this._handleRemove(object._nestedArray[i]);
+
+ if (exposeRe.test(object.name))
+ delete object.parent[object.name]; // unexpose namespaces
+
+ }
+};
+
+// Sets up cyclic dependencies (called in index-light)
+Root._configure = function(Type_, parse_, common_) {
+ Type = Type_;
+ parse = parse_;
+ common = common_;
+};
+
+},{"14":14,"15":15,"21":21,"23":23,"33":33}],27:[function(require,module,exports){
+"use strict";
+module.exports = {};
+
+/**
+ * Named roots.
+ * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).
+ * Can also be used manually to make roots available accross modules.
+ * @name roots
+ * @type {Object.}
+ * @example
+ * // pbjs -r myroot -o compiled.js ...
+ *
+ * // in another module:
+ * require("./compiled.js");
+ *
+ * // in any subsequent module:
+ * var root = protobuf.roots["myroot"];
+ */
+
+},{}],28:[function(require,module,exports){
+"use strict";
+
+/**
+ * Streaming RPC helpers.
+ * @namespace
+ */
+var rpc = exports;
+
+/**
+ * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.
+ * @typedef RPCImpl
+ * @type {function}
+ * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called
+ * @param {Uint8Array} requestData Request data
+ * @param {RPCImplCallback} callback Callback function
+ * @returns {undefined}
+ * @example
+ * function rpcImpl(method, requestData, callback) {
+ * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code
+ * throw Error("no such method");
+ * asynchronouslyObtainAResponse(requestData, function(err, responseData) {
+ * callback(err, responseData);
+ * });
+ * }
+ */
+
+/**
+ * Node-style callback as used by {@link RPCImpl}.
+ * @typedef RPCImplCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any, otherwise `null`
+ * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error
+ * @returns {undefined}
+ */
+
+rpc.Service = require(29);
+
+},{"29":29}],29:[function(require,module,exports){
+"use strict";
+module.exports = Service;
+
+var util = require(35);
+
+// Extends EventEmitter
+(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
+
+/**
+ * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.
+ *
+ * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.
+ * @typedef rpc.ServiceMethodCallback
+ * @template TRes extends Message
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {TRes} [response] Response message
+ * @returns {undefined}
+ */
+
+/**
+ * A service method part of a {@link rpc.Service} as created by {@link Service.create}.
+ * @typedef rpc.ServiceMethod
+ * @template TReq extends Message
+ * @template TRes extends Message
+ * @type {function}
+ * @param {TReq|Properties} request Request message or plain object
+ * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message
+ * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`
+ */
+
+/**
+ * Constructs a new RPC service instance.
+ * @classdesc An RPC service as returned by {@link Service#create}.
+ * @exports rpc.Service
+ * @extends util.EventEmitter
+ * @constructor
+ * @param {RPCImpl} rpcImpl RPC implementation
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
+ */
+function Service(rpcImpl, requestDelimited, responseDelimited) {
+
+ if (typeof rpcImpl !== "function")
+ throw TypeError("rpcImpl must be a function");
+
+ util.EventEmitter.call(this);
+
+ /**
+ * RPC implementation. Becomes `null` once the service is ended.
+ * @type {RPCImpl|null}
+ */
+ this.rpcImpl = rpcImpl;
+
+ /**
+ * Whether requests are length-delimited.
+ * @type {boolean}
+ */
+ this.requestDelimited = Boolean(requestDelimited);
+
+ /**
+ * Whether responses are length-delimited.
+ * @type {boolean}
+ */
+ this.responseDelimited = Boolean(responseDelimited);
+}
+
+/**
+ * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.
+ * @param {Method|rpc.ServiceMethod} method Reflected or static method
+ * @param {Constructor} requestCtor Request constructor
+ * @param {Constructor} responseCtor Response constructor
+ * @param {TReq|Properties} request Request message or plain object
+ * @param {rpc.ServiceMethodCallback} callback Service callback
+ * @returns {undefined}
+ * @template TReq extends Message
+ * @template TRes extends Message
+ */
+Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
+
+ if (!request)
+ throw TypeError("request must be specified");
+
+ var self = this;
+ if (!callback)
+ return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);
+
+ if (!self.rpcImpl) {
+ setTimeout(function() { callback(Error("already ended")); }, 0);
+ return undefined;
+ }
+
+ try {
+ return self.rpcImpl(
+ method,
+ requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
+ function rpcCallback(err, response) {
+
+ if (err) {
+ self.emit("error", err, method);
+ return callback(err);
+ }
+
+ if (response === null) {
+ self.end(/* endedByRPC */ true);
+ return undefined;
+ }
+
+ if (!(response instanceof responseCtor)) {
+ try {
+ response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response);
+ } catch (err) {
+ self.emit("error", err, method);
+ return callback(err);
+ }
+ }
+
+ self.emit("data", response, method);
+ return callback(null, response);
+ }
+ );
+ } catch (err) {
+ self.emit("error", err, method);
+ setTimeout(function() { callback(err); }, 0);
+ return undefined;
+ }
+};
+
+/**
+ * Ends this service and emits the `end` event.
+ * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.
+ * @returns {rpc.Service} `this`
+ */
+Service.prototype.end = function end(endedByRPC) {
+ if (this.rpcImpl) {
+ if (!endedByRPC) // signal end to rpcImpl
+ this.rpcImpl(null, null, null);
+ this.rpcImpl = null;
+ this.emit("end").off();
+ }
+ return this;
+};
+
+},{"35":35}],30:[function(require,module,exports){
+"use strict";
+module.exports = Service;
+
+// extends Namespace
+var Namespace = require(21);
+((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service";
+
+var Method = require(20),
+ util = require(33),
+ rpc = require(28);
+
+/**
+ * Constructs a new service instance.
+ * @classdesc Reflected service.
+ * @extends NamespaceBase
+ * @constructor
+ * @param {string} name Service name
+ * @param {Object.} [options] Service options
+ * @throws {TypeError} If arguments are invalid
+ */
+function Service(name, options) {
+ Namespace.call(this, name, options);
+
+ /**
+ * Service methods.
+ * @type {Object.}
+ */
+ this.methods = {}; // toJSON, marker
+
+ /**
+ * Cached methods as an array.
+ * @type {Method[]|null}
+ * @private
+ */
+ this._methodsArray = null;
+}
+
+/**
+ * Service descriptor.
+ * @interface IService
+ * @extends INamespace
+ * @property {Object.} methods Method descriptors
+ */
+
+/**
+ * Constructs a service from a service descriptor.
+ * @param {string} name Service name
+ * @param {IService} json Service descriptor
+ * @returns {Service} Created service
+ * @throws {TypeError} If arguments are invalid
+ */
+Service.fromJSON = function fromJSON(name, json) {
+ var service = new Service(name, json.options);
+ /* istanbul ignore else */
+ if (json.methods)
+ for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)
+ service.add(Method.fromJSON(names[i], json.methods[names[i]]));
+ if (json.nested)
+ service.addJSON(json.nested);
+ service.comment = json.comment;
+ return service;
+};
+
+/**
+ * Converts this service to a service descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {IService} Service descriptor
+ */
+Service.prototype.toJSON = function toJSON(toJSONOptions) {
+ var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);
+ var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
+ return util.toObject([
+ "options" , inherited && inherited.options || undefined,
+ "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},
+ "nested" , inherited && inherited.nested || undefined,
+ "comment" , keepComments ? this.comment : undefined
+ ]);
+};
+
+/**
+ * Methods of this service as an array for iteration.
+ * @name Service#methodsArray
+ * @type {Method[]}
+ * @readonly
+ */
+Object.defineProperty(Service.prototype, "methodsArray", {
+ get: function() {
+ return this._methodsArray || (this._methodsArray = util.toArray(this.methods));
+ }
+});
+
+function clearCache(service) {
+ service._methodsArray = null;
+ return service;
+}
+
+/**
+ * @override
+ */
+Service.prototype.get = function get(name) {
+ return this.methods[name]
+ || Namespace.prototype.get.call(this, name);
+};
+
+/**
+ * @override
+ */
+Service.prototype.resolveAll = function resolveAll() {
+ var methods = this.methodsArray;
+ for (var i = 0; i < methods.length; ++i)
+ methods[i].resolve();
+ return Namespace.prototype.resolve.call(this);
+};
+
+/**
+ * @override
+ */
+Service.prototype.add = function add(object) {
+
+ /* istanbul ignore if */
+ if (this.get(object.name))
+ throw Error("duplicate name '" + object.name + "' in " + this);
+
+ if (object instanceof Method) {
+ this.methods[object.name] = object;
+ object.parent = this;
+ return clearCache(this);
+ }
+ return Namespace.prototype.add.call(this, object);
+};
+
+/**
+ * @override
+ */
+Service.prototype.remove = function remove(object) {
+ if (object instanceof Method) {
+
+ /* istanbul ignore if */
+ if (this.methods[object.name] !== object)
+ throw Error(object + " is not a member of " + this);
+
+ delete this.methods[object.name];
+ object.parent = null;
+ return clearCache(this);
+ }
+ return Namespace.prototype.remove.call(this, object);
+};
+
+/**
+ * Creates a runtime service using the specified rpc implementation.
+ * @param {RPCImpl} rpcImpl RPC implementation
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
+ * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.
+ */
+Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);
+ for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {
+ var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, "");
+ rpcService[methodName] = util.codegen(["r","c"], util.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({
+ m: method,
+ q: method.resolvedRequestType.ctor,
+ s: method.resolvedResponseType.ctor
+ });
+ }
+ return rpcService;
+};
+
+},{"20":20,"21":21,"28":28,"33":33}],31:[function(require,module,exports){
+"use strict";
+module.exports = Type;
+
+// extends Namespace
+var Namespace = require(21);
+((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type";
+
+var Enum = require(14),
+ OneOf = require(23),
+ Field = require(15),
+ MapField = require(18),
+ Service = require(30),
+ Message = require(19),
+ Reader = require(24),
+ Writer = require(38),
+ util = require(33),
+ encoder = require(13),
+ decoder = require(12),
+ verifier = require(36),
+ converter = require(11),
+ wrappers = require(37);
+
+/**
+ * Constructs a new reflected message type instance.
+ * @classdesc Reflected message type.
+ * @extends NamespaceBase
+ * @constructor
+ * @param {string} name Message name
+ * @param {Object.} [options] Declared options
+ */
+function Type(name, options) {
+ Namespace.call(this, name, options);
+
+ /**
+ * Message fields.
+ * @type {Object.}
+ */
+ this.fields = {}; // toJSON, marker
+
+ /**
+ * Oneofs declared within this namespace, if any.
+ * @type {Object.}
+ */
+ this.oneofs = undefined; // toJSON
+
+ /**
+ * Extension ranges, if any.
+ * @type {number[][]}
+ */
+ this.extensions = undefined; // toJSON
+
+ /**
+ * Reserved ranges, if any.
+ * @type {Array.}
+ */
+ this.reserved = undefined; // toJSON
+
+ /*?
+ * Whether this type is a legacy group.
+ * @type {boolean|undefined}
+ */
+ this.group = undefined; // toJSON
+
+ /**
+ * Cached fields by id.
+ * @type {Object.|null}
+ * @private
+ */
+ this._fieldsById = null;
+
+ /**
+ * Cached fields as an array.
+ * @type {Field[]|null}
+ * @private
+ */
+ this._fieldsArray = null;
+
+ /**
+ * Cached oneofs as an array.
+ * @type {OneOf[]|null}
+ * @private
+ */
+ this._oneofsArray = null;
+
+ /**
+ * Cached constructor.
+ * @type {Constructor<{}>}
+ * @private
+ */
+ this._ctor = null;
+}
+
+Object.defineProperties(Type.prototype, {
+
+ /**
+ * Message fields by id.
+ * @name Type#fieldsById
+ * @type {Object.}
+ * @readonly
+ */
+ fieldsById: {
+ get: function() {
+
+ /* istanbul ignore if */
+ if (this._fieldsById)
+ return this._fieldsById;
+
+ this._fieldsById = {};
+ for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {
+ var field = this.fields[names[i]],
+ id = field.id;
+
+ /* istanbul ignore if */
+ if (this._fieldsById[id])
+ throw Error("duplicate id " + id + " in " + this);
+
+ this._fieldsById[id] = field;
+ }
+ return this._fieldsById;
+ }
+ },
+
+ /**
+ * Fields of this message as an array for iteration.
+ * @name Type#fieldsArray
+ * @type {Field[]}
+ * @readonly
+ */
+ fieldsArray: {
+ get: function() {
+ return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));
+ }
+ },
+
+ /**
+ * Oneofs of this message as an array for iteration.
+ * @name Type#oneofsArray
+ * @type {OneOf[]}
+ * @readonly
+ */
+ oneofsArray: {
+ get: function() {
+ return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));
+ }
+ },
+
+ /**
+ * The registered constructor, if any registered, otherwise a generic constructor.
+ * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.
+ * @name Type#ctor
+ * @type {Constructor<{}>}
+ */
+ ctor: {
+ get: function() {
+ return this._ctor || (this.ctor = Type.generateConstructor(this)());
+ },
+ set: function(ctor) {
+
+ // Ensure proper prototype
+ var prototype = ctor.prototype;
+ if (!(prototype instanceof Message)) {
+ (ctor.prototype = new Message()).constructor = ctor;
+ util.merge(ctor.prototype, prototype);
+ }
+
+ // Classes and messages reference their reflected type
+ ctor.$type = ctor.prototype.$type = this;
+
+ // Mix in static methods
+ util.merge(ctor, Message, true);
+
+ this._ctor = ctor;
+
+ // Messages have non-enumerable default values on their prototype
+ var i = 0;
+ for (; i < /* initializes */ this.fieldsArray.length; ++i)
+ this._fieldsArray[i].resolve(); // ensures a proper value
+
+ // Messages have non-enumerable getters and setters for each virtual oneof field
+ var ctorProperties = {};
+ for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)
+ ctorProperties[this._oneofsArray[i].resolve().name] = {
+ get: util.oneOfGetter(this._oneofsArray[i].oneof),
+ set: util.oneOfSetter(this._oneofsArray[i].oneof)
+ };
+ if (i)
+ Object.defineProperties(ctor.prototype, ctorProperties);
+ }
+ }
+});
+
+/**
+ * Generates a constructor function for the specified type.
+ * @param {Type} mtype Message type
+ * @returns {Codegen} Codegen instance
+ */
+Type.generateConstructor = function generateConstructor(mtype) {
+ /* eslint-disable no-unexpected-multiline */
+ var gen = util.codegen(["p"], mtype.name);
+ // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype
+ for (var i = 0, field; i < mtype.fieldsArray.length; ++i)
+ if ((field = mtype._fieldsArray[i]).map) gen
+ ("this%s={}", util.safeProp(field.name));
+ else if (field.repeated) gen
+ ("this%s=[]", util.safeProp(field.name));
+ return gen
+ ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors
+ * @property {Object.} fields Field descriptors
+ * @property {number[][]} [extensions] Extension ranges
+ * @property {number[][]} [reserved] Reserved ranges
+ * @property {boolean} [group=false] Whether a legacy group or not
+ */
+
+/**
+ * Creates a message type from a message type descriptor.
+ * @param {string} name Message name
+ * @param {IType} json Message type descriptor
+ * @returns {Type} Created message type
+ */
+Type.fromJSON = function fromJSON(name, json) {
+ var type = new Type(name, json.options);
+ type.extensions = json.extensions;
+ type.reserved = json.reserved;
+ var names = Object.keys(json.fields),
+ i = 0;
+ for (; i < names.length; ++i)
+ type.add(
+ ( typeof json.fields[names[i]].keyType !== "undefined"
+ ? MapField.fromJSON
+ : Field.fromJSON )(names[i], json.fields[names[i]])
+ );
+ if (json.oneofs)
+ for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)
+ type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));
+ if (json.nested)
+ for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {
+ var nested = json.nested[names[i]];
+ type.add( // most to least likely
+ ( nested.id !== undefined
+ ? Field.fromJSON
+ : nested.fields !== undefined
+ ? Type.fromJSON
+ : nested.values !== undefined
+ ? Enum.fromJSON
+ : nested.methods !== undefined
+ ? Service.fromJSON
+ : Namespace.fromJSON )(names[i], nested)
+ );
+ }
+ if (json.extensions && json.extensions.length)
+ type.extensions = json.extensions;
+ if (json.reserved && json.reserved.length)
+ type.reserved = json.reserved;
+ if (json.group)
+ type.group = true;
+ if (json.comment)
+ type.comment = json.comment;
+ return type;
+};
+
+/**
+ * Converts this message type to a message type descriptor.
+ * @param {IToJSONOptions} [toJSONOptions] JSON conversion options
+ * @returns {IType} Message type descriptor
+ */
+Type.prototype.toJSON = function toJSON(toJSONOptions) {
+ var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);
+ var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
+ return util.toObject([
+ "options" , inherited && inherited.options || undefined,
+ "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),
+ "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},
+ "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined,
+ "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined,
+ "group" , this.group || undefined,
+ "nested" , inherited && inherited.nested || undefined,
+ "comment" , keepComments ? this.comment : undefined
+ ]);
+};
+
+/**
+ * @override
+ */
+Type.prototype.resolveAll = function resolveAll() {
+ var fields = this.fieldsArray, i = 0;
+ while (i < fields.length)
+ fields[i++].resolve();
+ var oneofs = this.oneofsArray; i = 0;
+ while (i < oneofs.length)
+ oneofs[i++].resolve();
+ return Namespace.prototype.resolveAll.call(this);
+};
+
+/**
+ * @override
+ */
+Type.prototype.get = function get(name) {
+ return this.fields[name]
+ || this.oneofs && this.oneofs[name]
+ || this.nested && this.nested[name]
+ || null;
+};
+
+/**
+ * Adds a nested object to this type.
+ * @param {ReflectionObject} object Nested object to add
+ * @returns {Type} `this`
+ * @throws {TypeError} If arguments are invalid
+ * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id
+ */
+Type.prototype.add = function add(object) {
+
+ if (this.get(object.name))
+ throw Error("duplicate name '" + object.name + "' in " + this);
+
+ if (object instanceof Field && object.extend === undefined) {
+ // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.
+ // The root object takes care of adding distinct sister-fields to the respective extended
+ // type instead.
+
+ // avoids calling the getter if not absolutely necessary because it's called quite frequently
+ if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])
+ throw Error("duplicate id " + object.id + " in " + this);
+ if (this.isReservedId(object.id))
+ throw Error("id " + object.id + " is reserved in " + this);
+ if (this.isReservedName(object.name))
+ throw Error("name '" + object.name + "' is reserved in " + this);
+
+ if (object.parent)
+ object.parent.remove(object);
+ this.fields[object.name] = object;
+ object.message = this;
+ object.onAdd(this);
+ return clearCache(this);
+ }
+ if (object instanceof OneOf) {
+ if (!this.oneofs)
+ this.oneofs = {};
+ this.oneofs[object.name] = object;
+ object.onAdd(this);
+ return clearCache(this);
+ }
+ return Namespace.prototype.add.call(this, object);
+};
+
+/**
+ * Removes a nested object from this type.
+ * @param {ReflectionObject} object Nested object to remove
+ * @returns {Type} `this`
+ * @throws {TypeError} If arguments are invalid
+ * @throws {Error} If `object` is not a member of this type
+ */
+Type.prototype.remove = function remove(object) {
+ if (object instanceof Field && object.extend === undefined) {
+ // See Type#add for the reason why extension fields are excluded here.
+
+ /* istanbul ignore if */
+ if (!this.fields || this.fields[object.name] !== object)
+ throw Error(object + " is not a member of " + this);
+
+ delete this.fields[object.name];
+ object.parent = null;
+ object.onRemove(this);
+ return clearCache(this);
+ }
+ if (object instanceof OneOf) {
+
+ /* istanbul ignore if */
+ if (!this.oneofs || this.oneofs[object.name] !== object)
+ throw Error(object + " is not a member of " + this);
+
+ delete this.oneofs[object.name];
+ object.parent = null;
+ object.onRemove(this);
+ return clearCache(this);
+ }
+ return Namespace.prototype.remove.call(this, object);
+};
+
+/**
+ * Tests if the specified id is reserved.
+ * @param {number} id Id to test
+ * @returns {boolean} `true` if reserved, otherwise `false`
+ */
+Type.prototype.isReservedId = function isReservedId(id) {
+ return Namespace.isReservedId(this.reserved, id);
+};
+
+/**
+ * Tests if the specified name is reserved.
+ * @param {string} name Name to test
+ * @returns {boolean} `true` if reserved, otherwise `false`
+ */
+Type.prototype.isReservedName = function isReservedName(name) {
+ return Namespace.isReservedName(this.reserved, name);
+};
+
+/**
+ * Creates a new message of this type using the specified properties.
+ * @param {Object.} [properties] Properties to set
+ * @returns {Message<{}>} Message instance
+ */
+Type.prototype.create = function create(properties) {
+ return new this.ctor(properties);
+};
+
+/**
+ * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.
+ * @returns {Type} `this`
+ */
+Type.prototype.setup = function setup() {
+ // Sets up everything at once so that the prototype chain does not have to be re-evaluated
+ // multiple times (V8, soft-deopt prototype-check).
+
+ var fullName = this.fullName,
+ types = [];
+ for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)
+ types.push(this._fieldsArray[i].resolve().resolvedType);
+
+ // Replace setup methods with type-specific generated functions
+ this.encode = encoder(this)({
+ Writer : Writer,
+ types : types,
+ util : util
+ });
+ this.decode = decoder(this)({
+ Reader : Reader,
+ types : types,
+ util : util
+ });
+ this.verify = verifier(this)({
+ types : types,
+ util : util
+ });
+ this.fromObject = converter.fromObject(this)({
+ types : types,
+ util : util
+ });
+ this.toObject = converter.toObject(this)({
+ types : types,
+ util : util
+ });
+
+ // Inject custom wrappers for common types
+ var wrapper = wrappers[fullName];
+ if (wrapper) {
+ var originalThis = Object.create(this);
+ // if (wrapper.fromObject) {
+ originalThis.fromObject = this.fromObject;
+ this.fromObject = wrapper.fromObject.bind(originalThis);
+ // }
+ // if (wrapper.toObject) {
+ originalThis.toObject = this.toObject;
+ this.toObject = wrapper.toObject.bind(originalThis);
+ // }
+ }
+
+ return this;
+};
+
+/**
+ * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.
+ * @param {Message<{}>|Object.} message Message instance or plain object
+ * @param {Writer} [writer] Writer to encode to
+ * @returns {Writer} writer
+ */
+Type.prototype.encode = function encode_setup(message, writer) {
+ return this.setup().encode(message, writer); // overrides this method
+};
+
+/**
+ * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.
+ * @param {Message<{}>|Object.} message Message instance or plain object
+ * @param {Writer} [writer] Writer to encode to
+ * @returns {Writer} writer
+ */
+Type.prototype.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
+};
+
+/**
+ * Decodes a message of this type.
+ * @param {Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Length of the message, if known beforehand
+ * @returns {Message<{}>} Decoded message
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {util.ProtocolError<{}>} If required fields are missing
+ */
+Type.prototype.decode = function decode_setup(reader, length) {
+ return this.setup().decode(reader, length); // overrides this method
+};
+
+/**
+ * Decodes a message of this type preceeded by its byte length as a varint.
+ * @param {Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {Message<{}>} Decoded message
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {util.ProtocolError} If required fields are missing
+ */
+Type.prototype.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof Reader))
+ reader = Reader.create(reader);
+ return this.decode(reader, reader.uint32());
+};
+
+/**
+ * Verifies that field values are valid and that required fields are present.
+ * @param {Object.} message Plain object to verify
+ * @returns {null|string} `null` if valid, otherwise the reason why it is not
+ */
+Type.prototype.verify = function verify_setup(message) {
+ return this.setup().verify(message); // overrides this method
+};
+
+/**
+ * Creates a new message of this type from a plain object. Also converts values to their respective internal types.
+ * @param {Object.} object Plain object to convert
+ * @returns {Message<{}>} Message instance
+ */
+Type.prototype.fromObject = function fromObject(object) {
+ return this.setup().fromObject(object);
+};
+
+/**
+ * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.
+ * @interface IConversionOptions
+ * @property {Function} [longs] Long conversion type.
+ * Valid values are `String` and `Number` (the global types).
+ * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.
+ * @property {Function} [enums] Enum value conversion type.
+ * Only valid value is `String` (the global type).
+ * Defaults to copy the present value, which is the numeric id.
+ * @property {Function} [bytes] Bytes value conversion type.
+ * Valid values are `Array` and (a base64 encoded) `String` (the global types).
+ * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.
+ * @property {boolean} [defaults=false] Also sets default values on the resulting object
+ * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`
+ * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`
+ * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any
+ * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings
+ */
+
+/**
+ * Creates a plain object from a message of this type. Also converts values to other types if specified.
+ * @param {Message<{}>} message Message instance
+ * @param {IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+Type.prototype.toObject = function toObject(message, options) {
+ return this.setup().toObject(message, options);
+};
+
+/**
+ * Decorator function as returned by {@link Type.d} (TypeScript).
+ * @typedef TypeDecorator
+ * @type {function}
+ * @param {Constructor} target Target constructor
+ * @returns {undefined}
+ * @template T extends Message
+ */
+
+/**
+ * Type decorator (TypeScript).
+ * @param {string} [typeName] Type name, defaults to the constructor's name
+ * @returns {TypeDecorator} Decorator function
+ * @template T extends Message
+ */
+Type.d = function decorateType(typeName) {
+ return function typeDecorator(target) {
+ util.decorateType(target, typeName);
+ };
+};
+
+},{"11":11,"12":12,"13":13,"14":14,"15":15,"18":18,"19":19,"21":21,"23":23,"24":24,"30":30,"33":33,"36":36,"37":37,"38":38}],32:[function(require,module,exports){
+"use strict";
+
+/**
+ * Common type constants.
+ * @namespace
+ */
+var types = exports;
+
+var util = require(33);
+
+var s = [
+ "double", // 0
+ "float", // 1
+ "int32", // 2
+ "uint32", // 3
+ "sint32", // 4
+ "fixed32", // 5
+ "sfixed32", // 6
+ "int64", // 7
+ "uint64", // 8
+ "sint64", // 9
+ "fixed64", // 10
+ "sfixed64", // 11
+ "bool", // 12
+ "string", // 13
+ "bytes" // 14
+];
+
+function bake(values, offset) {
+ var i = 0, o = {};
+ offset |= 0;
+ while (i < values.length) o[s[i + offset]] = values[i++];
+ return o;
+}
+
+/**
+ * Basic type wire types.
+ * @type {Object.}
+ * @const
+ * @property {number} double=1 Fixed64 wire type
+ * @property {number} float=5 Fixed32 wire type
+ * @property {number} int32=0 Varint wire type
+ * @property {number} uint32=0 Varint wire type
+ * @property {number} sint32=0 Varint wire type
+ * @property {number} fixed32=5 Fixed32 wire type
+ * @property {number} sfixed32=5 Fixed32 wire type
+ * @property {number} int64=0 Varint wire type
+ * @property {number} uint64=0 Varint wire type
+ * @property {number} sint64=0 Varint wire type
+ * @property {number} fixed64=1 Fixed64 wire type
+ * @property {number} sfixed64=1 Fixed64 wire type
+ * @property {number} bool=0 Varint wire type
+ * @property {number} string=2 Ldelim wire type
+ * @property {number} bytes=2 Ldelim wire type
+ */
+types.basic = bake([
+ /* double */ 1,
+ /* float */ 5,
+ /* int32 */ 0,
+ /* uint32 */ 0,
+ /* sint32 */ 0,
+ /* fixed32 */ 5,
+ /* sfixed32 */ 5,
+ /* int64 */ 0,
+ /* uint64 */ 0,
+ /* sint64 */ 0,
+ /* fixed64 */ 1,
+ /* sfixed64 */ 1,
+ /* bool */ 0,
+ /* string */ 2,
+ /* bytes */ 2
+]);
+
+/**
+ * Basic type defaults.
+ * @type {Object.}
+ * @const
+ * @property {number} double=0 Double default
+ * @property {number} float=0 Float default
+ * @property {number} int32=0 Int32 default
+ * @property {number} uint32=0 Uint32 default
+ * @property {number} sint32=0 Sint32 default
+ * @property {number} fixed32=0 Fixed32 default
+ * @property {number} sfixed32=0 Sfixed32 default
+ * @property {number} int64=0 Int64 default
+ * @property {number} uint64=0 Uint64 default
+ * @property {number} sint64=0 Sint32 default
+ * @property {number} fixed64=0 Fixed64 default
+ * @property {number} sfixed64=0 Sfixed64 default
+ * @property {boolean} bool=false Bool default
+ * @property {string} string="" String default
+ * @property {Array.} bytes=Array(0) Bytes default
+ * @property {null} message=null Message default
+ */
+types.defaults = bake([
+ /* double */ 0,
+ /* float */ 0,
+ /* int32 */ 0,
+ /* uint32 */ 0,
+ /* sint32 */ 0,
+ /* fixed32 */ 0,
+ /* sfixed32 */ 0,
+ /* int64 */ 0,
+ /* uint64 */ 0,
+ /* sint64 */ 0,
+ /* fixed64 */ 0,
+ /* sfixed64 */ 0,
+ /* bool */ false,
+ /* string */ "",
+ /* bytes */ util.emptyArray,
+ /* message */ null
+]);
+
+/**
+ * Basic long type wire types.
+ * @type {Object.}
+ * @const
+ * @property {number} int64=0 Varint wire type
+ * @property {number} uint64=0 Varint wire type
+ * @property {number} sint64=0 Varint wire type
+ * @property {number} fixed64=1 Fixed64 wire type
+ * @property {number} sfixed64=1 Fixed64 wire type
+ */
+types.long = bake([
+ /* int64 */ 0,
+ /* uint64 */ 0,
+ /* sint64 */ 0,
+ /* fixed64 */ 1,
+ /* sfixed64 */ 1
+], 7);
+
+/**
+ * Allowed types for map keys with their associated wire type.
+ * @type {Object.}
+ * @const
+ * @property {number} int32=0 Varint wire type
+ * @property {number} uint32=0 Varint wire type
+ * @property {number} sint32=0 Varint wire type
+ * @property {number} fixed32=5 Fixed32 wire type
+ * @property {number} sfixed32=5 Fixed32 wire type
+ * @property {number} int64=0 Varint wire type
+ * @property {number} uint64=0 Varint wire type
+ * @property {number} sint64=0 Varint wire type
+ * @property {number} fixed64=1 Fixed64 wire type
+ * @property {number} sfixed64=1 Fixed64 wire type
+ * @property {number} bool=0 Varint wire type
+ * @property {number} string=2 Ldelim wire type
+ */
+types.mapKey = bake([
+ /* int32 */ 0,
+ /* uint32 */ 0,
+ /* sint32 */ 0,
+ /* fixed32 */ 5,
+ /* sfixed32 */ 5,
+ /* int64 */ 0,
+ /* uint64 */ 0,
+ /* sint64 */ 0,
+ /* fixed64 */ 1,
+ /* sfixed64 */ 1,
+ /* bool */ 0,
+ /* string */ 2
+], 2);
+
+/**
+ * Allowed types for packed repeated fields with their associated wire type.
+ * @type {Object.}
+ * @const
+ * @property {number} double=1 Fixed64 wire type
+ * @property {number} float=5 Fixed32 wire type
+ * @property {number} int32=0 Varint wire type
+ * @property {number} uint32=0 Varint wire type
+ * @property {number} sint32=0 Varint wire type
+ * @property {number} fixed32=5 Fixed32 wire type
+ * @property {number} sfixed32=5 Fixed32 wire type
+ * @property {number} int64=0 Varint wire type
+ * @property {number} uint64=0 Varint wire type
+ * @property {number} sint64=0 Varint wire type
+ * @property {number} fixed64=1 Fixed64 wire type
+ * @property {number} sfixed64=1 Fixed64 wire type
+ * @property {number} bool=0 Varint wire type
+ */
+types.packed = bake([
+ /* double */ 1,
+ /* float */ 5,
+ /* int32 */ 0,
+ /* uint32 */ 0,
+ /* sint32 */ 0,
+ /* fixed32 */ 5,
+ /* sfixed32 */ 5,
+ /* int64 */ 0,
+ /* uint64 */ 0,
+ /* sint64 */ 0,
+ /* fixed64 */ 1,
+ /* sfixed64 */ 1,
+ /* bool */ 0
+]);
+
+},{"33":33}],33:[function(require,module,exports){
+"use strict";
+
+/**
+ * Various utility functions.
+ * @namespace
+ */
+var util = module.exports = require(35);
+
+var roots = require(27);
+
+var Type, // cyclic
+ Enum;
+
+util.codegen = require(3);
+util.fetch = require(5);
+util.path = require(8);
+
+/**
+ * Node's fs module if available.
+ * @type {Object.}
+ */
+util.fs = util.inquire("fs");
+
+/**
+ * Converts an object's values to an array.
+ * @param {Object.} object Object to convert
+ * @returns {Array.<*>} Converted array
+ */
+util.toArray = function toArray(object) {
+ if (object) {
+ var keys = Object.keys(object),
+ array = new Array(keys.length),
+ index = 0;
+ while (index < keys.length)
+ array[index] = object[keys[index++]];
+ return array;
+ }
+ return [];
+};
+
+/**
+ * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.
+ * @param {Array.<*>} array Array to convert
+ * @returns {Object.} Converted object
+ */
+util.toObject = function toObject(array) {
+ var object = {},
+ index = 0;
+ while (index < array.length) {
+ var key = array[index++],
+ val = array[index++];
+ if (val !== undefined)
+ object[key] = val;
+ }
+ return object;
+};
+
+var safePropBackslashRe = /\\/g,
+ safePropQuoteRe = /"/g;
+
+/**
+ * Tests whether the specified name is a reserved word in JS.
+ * @param {string} name Name to test
+ * @returns {boolean} `true` if reserved, otherwise `false`
+ */
+util.isReserved = function isReserved(name) {
+ return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name);
+};
+
+/**
+ * Returns a safe property accessor for the specified property name.
+ * @param {string} prop Property name
+ * @returns {string} Safe accessor
+ */
+util.safeProp = function safeProp(prop) {
+ if (!/^[$\w_]+$/.test(prop) || util.isReserved(prop))
+ return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]";
+ return "." + prop;
+};
+
+/**
+ * Converts the first character of a string to upper case.
+ * @param {string} str String to convert
+ * @returns {string} Converted string
+ */
+util.ucFirst = function ucFirst(str) {
+ return str.charAt(0).toUpperCase() + str.substring(1);
+};
+
+var camelCaseRe = /_([a-z])/g;
+
+/**
+ * Converts a string to camel case.
+ * @param {string} str String to convert
+ * @returns {string} Converted string
+ */
+util.camelCase = function camelCase(str) {
+ return str.substring(0, 1)
+ + str.substring(1)
+ .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });
+};
+
+/**
+ * Compares reflected fields by id.
+ * @param {Field} a First field
+ * @param {Field} b Second field
+ * @returns {number} Comparison value
+ */
+util.compareFieldsById = function compareFieldsById(a, b) {
+ return a.id - b.id;
+};
+
+/**
+ * Decorator helper for types (TypeScript).
+ * @param {Constructor} ctor Constructor function
+ * @param {string} [typeName] Type name, defaults to the constructor's name
+ * @returns {Type} Reflected type
+ * @template T extends Message
+ * @property {Root} root Decorators root
+ */
+util.decorateType = function decorateType(ctor, typeName) {
+
+ /* istanbul ignore if */
+ if (ctor.$type) {
+ if (typeName && ctor.$type.name !== typeName) {
+ util.decorateRoot.remove(ctor.$type);
+ ctor.$type.name = typeName;
+ util.decorateRoot.add(ctor.$type);
+ }
+ return ctor.$type;
+ }
+
+ /* istanbul ignore next */
+ if (!Type)
+ Type = require(31);
+
+ var type = new Type(typeName || ctor.name);
+ util.decorateRoot.add(type);
+ type.ctor = ctor; // sets up .encode, .decode etc.
+ Object.defineProperty(ctor, "$type", { value: type, enumerable: false });
+ Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false });
+ return type;
+};
+
+var decorateEnumIndex = 0;
+
+/**
+ * Decorator helper for enums (TypeScript).
+ * @param {Object} object Enum object
+ * @returns {Enum} Reflected enum
+ */
+util.decorateEnum = function decorateEnum(object) {
+
+ /* istanbul ignore if */
+ if (object.$type)
+ return object.$type;
+
+ /* istanbul ignore next */
+ if (!Enum)
+ Enum = require(14);
+
+ var enm = new Enum("Enum" + decorateEnumIndex++, object);
+ util.decorateRoot.add(enm);
+ Object.defineProperty(object, "$type", { value: enm, enumerable: false });
+ return enm;
+};
+
+/**
+ * Decorator root (TypeScript).
+ * @name util.decorateRoot
+ * @type {Root}
+ * @readonly
+ */
+Object.defineProperty(util, "decorateRoot", {
+ get: function() {
+ return roots["decorated"] || (roots["decorated"] = new (require(26))());
+ }
+});
+
+},{"14":14,"26":26,"27":27,"3":3,"31":31,"35":35,"5":5,"8":8}],34:[function(require,module,exports){
+"use strict";
+module.exports = LongBits;
+
+var util = require(35);
+
+/**
+ * Constructs new long bits.
+ * @classdesc Helper class for working with the low and high bits of a 64 bit value.
+ * @memberof util
+ * @constructor
+ * @param {number} lo Low 32 bits, unsigned
+ * @param {number} hi High 32 bits, unsigned
+ */
+function LongBits(lo, hi) {
+
+ // note that the casts below are theoretically unnecessary as of today, but older statically
+ // generated converter code might still call the ctor with signed 32bits. kept for compat.
+
+ /**
+ * Low bits.
+ * @type {number}
+ */
+ this.lo = lo >>> 0;
+
+ /**
+ * High bits.
+ * @type {number}
+ */
+ this.hi = hi >>> 0;
+}
+
+/**
+ * Zero bits.
+ * @memberof util.LongBits
+ * @type {util.LongBits}
+ */
+var zero = LongBits.zero = new LongBits(0, 0);
+
+zero.toNumber = function() { return 0; };
+zero.zzEncode = zero.zzDecode = function() { return this; };
+zero.length = function() { return 1; };
+
+/**
+ * Zero hash.
+ * @memberof util.LongBits
+ * @type {string}
+ */
+var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
+
+/**
+ * Constructs new long bits from the specified number.
+ * @param {number} value Value
+ * @returns {util.LongBits} Instance
+ */
+LongBits.fromNumber = function fromNumber(value) {
+ if (value === 0)
+ return zero;
+ var sign = value < 0;
+ if (sign)
+ value = -value;
+ var lo = value >>> 0,
+ hi = (value - lo) / 4294967296 >>> 0;
+ if (sign) {
+ hi = ~hi >>> 0;
+ lo = ~lo >>> 0;
+ if (++lo > 4294967295) {
+ lo = 0;
+ if (++hi > 4294967295)
+ hi = 0;
+ }
+ }
+ return new LongBits(lo, hi);
+};
+
+/**
+ * Constructs new long bits from a number, long or string.
+ * @param {number|string} value Value
+ * @returns {util.LongBits} Instance
+ */
+LongBits.from = function from(value) {
+ if (typeof value === "number")
+ return LongBits.fromNumber(value);
+ if (util.isString(value)) {
+ /* istanbul ignore else */
+ if (util.Long)
+ value = util.Long.fromString(value);
+ else
+ return LongBits.fromNumber(parseInt(value, 10));
+ }
+ return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
+};
+
+/**
+ * Converts this long bits to a possibly unsafe JavaScript number.
+ * @param {boolean} [unsigned=false] Whether unsigned or not
+ * @returns {number} Possibly unsafe number
+ */
+LongBits.prototype.toNumber = function toNumber(unsigned) {
+ if (!unsigned && this.hi >>> 31) {
+ var lo = ~this.lo + 1 >>> 0,
+ hi = ~this.hi >>> 0;
+ if (!lo)
+ hi = hi + 1 >>> 0;
+ return -(lo + hi * 4294967296);
+ }
+ return this.lo + this.hi * 4294967296;
+};
+
+/*
+ * Converts this long bits to a long.
+ * @param {boolean} [unsigned=false] Whether unsigned or not
+ * @returns {Long} Long
+ */
+LongBits.prototype.toLong = function toLong(unsigned) {
+ return util.Long
+ ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))
+ /* istanbul ignore next */
+ : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
+};
+
+var charCodeAt = String.prototype.charCodeAt;
+
+/**
+ * Constructs new long bits from the specified 8 characters long hash.
+ * @param {string} hash Hash
+ * @returns {util.LongBits} Bits
+ */
+LongBits.fromHash = function fromHash(hash) {
+ if (hash === zeroHash)
+ return zero;
+ return new LongBits(
+ ( charCodeAt.call(hash, 0)
+ | charCodeAt.call(hash, 1) << 8
+ | charCodeAt.call(hash, 2) << 16
+ | charCodeAt.call(hash, 3) << 24) >>> 0
+ ,
+ ( charCodeAt.call(hash, 4)
+ | charCodeAt.call(hash, 5) << 8
+ | charCodeAt.call(hash, 6) << 16
+ | charCodeAt.call(hash, 7) << 24) >>> 0
+ );
+};
+
+/**
+ * Converts this long bits to a 8 characters long hash.
+ * @returns {string} Hash
+ */
+LongBits.prototype.toHash = function toHash() {
+ return String.fromCharCode(
+ this.lo & 255,
+ this.lo >>> 8 & 255,
+ this.lo >>> 16 & 255,
+ this.lo >>> 24 ,
+ this.hi & 255,
+ this.hi >>> 8 & 255,
+ this.hi >>> 16 & 255,
+ this.hi >>> 24
+ );
+};
+
+/**
+ * Zig-zag encodes this long bits.
+ * @returns {util.LongBits} `this`
+ */
+LongBits.prototype.zzEncode = function zzEncode() {
+ var mask = this.hi >> 31;
+ this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
+ this.lo = ( this.lo << 1 ^ mask) >>> 0;
+ return this;
+};
+
+/**
+ * Zig-zag decodes this long bits.
+ * @returns {util.LongBits} `this`
+ */
+LongBits.prototype.zzDecode = function zzDecode() {
+ var mask = -(this.lo & 1);
+ this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
+ this.hi = ( this.hi >>> 1 ^ mask) >>> 0;
+ return this;
+};
+
+/**
+ * Calculates the length of this longbits when encoded as a varint.
+ * @returns {number} Length
+ */
+LongBits.prototype.length = function length() {
+ var part0 = this.lo,
+ part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,
+ part2 = this.hi >>> 24;
+ return part2 === 0
+ ? part1 === 0
+ ? part0 < 16384
+ ? part0 < 128 ? 1 : 2
+ : part0 < 2097152 ? 3 : 4
+ : part1 < 16384
+ ? part1 < 128 ? 5 : 6
+ : part1 < 2097152 ? 7 : 8
+ : part2 < 128 ? 9 : 10;
+};
+
+},{"35":35}],35:[function(require,module,exports){
+"use strict";
+var util = exports;
+
+// used to return a Promise where callback is omitted
+util.asPromise = require(1);
+
+// converts to / from base64 encoded strings
+util.base64 = require(2);
+
+// base class of rpc.Service
+util.EventEmitter = require(4);
+
+// float handling accross browsers
+util.float = require(6);
+
+// requires modules optionally and hides the call from bundlers
+util.inquire = require(7);
+
+// converts to / from utf8 encoded strings
+util.utf8 = require(10);
+
+// provides a node-like buffer pool in the browser
+util.pool = require(9);
+
+// utility to work with the low and high bits of a 64 bit value
+util.LongBits = require(34);
+
+// global object reference
+util.global = typeof window !== "undefined" && window
+ || typeof global !== "undefined" && global
+ || typeof self !== "undefined" && self
+ || this; // eslint-disable-line no-invalid-this
+
+/**
+ * An immuable empty array.
+ * @memberof util
+ * @type {Array.<*>}
+ * @const
+ */
+util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes
+
+/**
+ * An immutable empty object.
+ * @type {Object}
+ * @const
+ */
+util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes
+
+/**
+ * Whether running within node or not.
+ * @memberof util
+ * @type {boolean}
+ * @const
+ */
+util.isNode = Boolean(util.global.process && util.global.process.versions && util.global.process.versions.node);
+
+/**
+ * Tests if the specified value is an integer.
+ * @function
+ * @param {*} value Value to test
+ * @returns {boolean} `true` if the value is an integer
+ */
+util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {
+ return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
+};
+
+/**
+ * Tests if the specified value is a string.
+ * @param {*} value Value to test
+ * @returns {boolean} `true` if the value is a string
+ */
+util.isString = function isString(value) {
+ return typeof value === "string" || value instanceof String;
+};
+
+/**
+ * Tests if the specified value is a non-null object.
+ * @param {*} value Value to test
+ * @returns {boolean} `true` if the value is a non-null object
+ */
+util.isObject = function isObject(value) {
+ return value && typeof value === "object";
+};
+
+/**
+ * Checks if a property on a message is considered to be present.
+ * This is an alias of {@link util.isSet}.
+ * @function
+ * @param {Object} obj Plain object or message instance
+ * @param {string} prop Property name
+ * @returns {boolean} `true` if considered to be present, otherwise `false`
+ */
+util.isset =
+
+/**
+ * Checks if a property on a message is considered to be present.
+ * @param {Object} obj Plain object or message instance
+ * @param {string} prop Property name
+ * @returns {boolean} `true` if considered to be present, otherwise `false`
+ */
+util.isSet = function isSet(obj, prop) {
+ var value = obj[prop];
+ if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins
+ return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
+ return false;
+};
+
+/**
+ * Any compatible Buffer instance.
+ * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.
+ * @interface Buffer
+ * @extends Uint8Array
+ */
+
+/**
+ * Node's Buffer class if available.
+ * @type {Constructor}
+ */
+util.Buffer = (function() {
+ try {
+ var Buffer = util.inquire("buffer").Buffer;
+ // refuse to use non-node buffers if not explicitly assigned (perf reasons):
+ return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;
+ } catch (e) {
+ /* istanbul ignore next */
+ return null;
+ }
+})();
+
+// Internal alias of or polyfull for Buffer.from.
+util._Buffer_from = null;
+
+// Internal alias of or polyfill for Buffer.allocUnsafe.
+util._Buffer_allocUnsafe = null;
+
+/**
+ * Creates a new buffer of whatever type supported by the environment.
+ * @param {number|number[]} [sizeOrArray=0] Buffer size or number array
+ * @returns {Uint8Array|Buffer} Buffer
+ */
+util.newBuffer = function newBuffer(sizeOrArray) {
+ /* istanbul ignore next */
+ return typeof sizeOrArray === "number"
+ ? util.Buffer
+ ? util._Buffer_allocUnsafe(sizeOrArray)
+ : new util.Array(sizeOrArray)
+ : util.Buffer
+ ? util._Buffer_from(sizeOrArray)
+ : typeof Uint8Array === "undefined"
+ ? sizeOrArray
+ : new Uint8Array(sizeOrArray);
+};
+
+/**
+ * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.
+ * @type {Constructor}
+ */
+util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array;
+
+/*
+ * Long.js's Long class if available and $ENABLE_LONG is set. This lets us leave it on
+ * for this package's tests but have it be off in actual usage-reporting-protobuf use.
+ * (We leave it on for some mode where there is no `process` that is used by tests.)
+ */
+util.Long = (typeof process === 'undefined' || process.env.ENABLE_LONG) ? (/* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long
+ || /* istanbul ignore next */ util.global.Long
+ || util.inquire("long")) : undefined;
+
+/**
+ * Regular expression used to verify 2 bit (`bool`) map keys.
+ * @type {RegExp}
+ * @const
+ */
+util.key2Re = /^true|false|0|1$/;
+
+/**
+ * Regular expression used to verify 32 bit (`int32` etc.) map keys.
+ * @type {RegExp}
+ * @const
+ */
+util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
+
+/**
+ * Regular expression used to verify 64 bit (`int64` etc.) map keys.
+ * @type {RegExp}
+ * @const
+ */
+util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
+
+/*
+ * Converts a number or long to an 8 characters long hash string.
+ * @param {Long|number} value Value to convert
+ * @returns {string} Hash
+ */
+util.longToHash = function longToHash(value) {
+ return value
+ ? util.LongBits.from(value).toHash()
+ : util.LongBits.zeroHash;
+};
+
+/*
+ * Converts an 8 characters long hash string to a long or number.
+ * @param {string} hash Hash
+ * @param {boolean} [unsigned=false] Whether unsigned or not
+ * @returns {Long|number} Original value
+ */
+util.longFromHash = function longFromHash(hash, unsigned) {
+ var bits = util.LongBits.fromHash(hash);
+ if (util.Long)
+ return util.Long.fromBits(bits.lo, bits.hi, unsigned);
+ return bits.toNumber(Boolean(unsigned));
+};
+
+/**
+ * Merges the properties of the source object into the destination object.
+ * @memberof util
+ * @param {Object.} dst Destination object
+ * @param {Object.} src Source object
+ * @param {boolean} [ifNotSet=false] Merges only if the key is not already set
+ * @returns {Object.} Destination object
+ */
+function merge(dst, src, ifNotSet) { // used by converters
+ for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
+ if (dst[keys[i]] === undefined || !ifNotSet)
+ dst[keys[i]] = src[keys[i]];
+ return dst;
+}
+
+util.merge = merge;
+
+/**
+ * Converts the first character of a string to lower case.
+ * @param {string} str String to convert
+ * @returns {string} Converted string
+ */
+util.lcFirst = function lcFirst(str) {
+ return str.charAt(0).toLowerCase() + str.substring(1);
+};
+
+/**
+ * Creates a custom error constructor.
+ * @memberof util
+ * @param {string} name Error name
+ * @returns {Constructor} Custom error constructor
+ */
+function newError(name) {
+
+ function CustomError(message, properties) {
+
+ if (!(this instanceof CustomError))
+ return new CustomError(message, properties);
+
+ // Error.call(this, message);
+ // ^ just returns a new error instance because the ctor can be called as a function
+
+ Object.defineProperty(this, "message", { get: function() { return message; } });
+
+ /* istanbul ignore next */
+ if (Error.captureStackTrace) // node
+ Error.captureStackTrace(this, CustomError);
+ else
+ Object.defineProperty(this, "stack", { value: (new Error()).stack || "" });
+
+ if (properties)
+ merge(this, properties);
+ }
+
+ (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
+
+ Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });
+
+ CustomError.prototype.toString = function toString() {
+ return this.name + ": " + this.message;
+ };
+
+ return CustomError;
+}
+
+util.newError = newError;
+
+/**
+ * Constructs a new protocol error.
+ * @classdesc Error subclass indicating a protocol specifc error.
+ * @memberof util
+ * @extends Error
+ * @template T extends Message
+ * @constructor
+ * @param {string} message Error message
+ * @param {Object.} [properties] Additional properties
+ * @example
+ * try {
+ * MyMessage.decode(someBuffer); // throws if required fields are missing
+ * } catch (e) {
+ * if (e instanceof ProtocolError && e.instance)
+ * console.log("decoded so far: " + JSON.stringify(e.instance));
+ * }
+ */
+util.ProtocolError = newError("ProtocolError");
+
+/**
+ * So far decoded message instance.
+ * @name util.ProtocolError#instance
+ * @type {Message}
+ */
+
+/**
+ * A OneOf getter as returned by {@link util.oneOfGetter}.
+ * @typedef OneOfGetter
+ * @type {function}
+ * @returns {string|undefined} Set field name, if any
+ */
+
+/**
+ * Builds a getter for a oneof's present field name.
+ * @param {string[]} fieldNames Field names
+ * @returns {OneOfGetter} Unbound getter
+ */
+util.oneOfGetter = function getOneOf(fieldNames) {
+ var fieldMap = {};
+ for (var i = 0; i < fieldNames.length; ++i)
+ fieldMap[fieldNames[i]] = 1;
+
+ /**
+ * @returns {string|undefined} Set field name, if any
+ * @this Object
+ * @ignore
+ */
+ return function() { // eslint-disable-line consistent-return
+ for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)
+ if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)
+ return keys[i];
+ };
+};
+
+/**
+ * A OneOf setter as returned by {@link util.oneOfSetter}.
+ * @typedef OneOfSetter
+ * @type {function}
+ * @param {string|undefined} value Field name
+ * @returns {undefined}
+ */
+
+/**
+ * Builds a setter for a oneof's present field name.
+ * @param {string[]} fieldNames Field names
+ * @returns {OneOfSetter} Unbound setter
+ */
+util.oneOfSetter = function setOneOf(fieldNames) {
+
+ /**
+ * @param {string} name Field name
+ * @returns {undefined}
+ * @this Object
+ * @ignore
+ */
+ return function(name) {
+ for (var i = 0; i < fieldNames.length; ++i)
+ if (fieldNames[i] !== name)
+ delete this[fieldNames[i]];
+ };
+};
+
+/**
+ * Default conversion options used for {@link Message#toJSON} implementations.
+ *
+ * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:
+ *
+ * - Longs become strings
+ * - Enums become string keys
+ * - Bytes become base64 encoded strings
+ * - (Sub-)Messages become plain objects
+ * - Maps become plain objects with all string keys
+ * - Repeated fields become arrays
+ * - NaN and Infinity for float and double fields become strings
+ *
+ * @type {IConversionOptions}
+ * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json
+ */
+util.toJSONOptions = {
+ longs: String,
+ enums: String,
+ bytes: String,
+ json: true
+};
+
+// Sets up buffer utility according to the environment (called in index-minimal)
+util._configure = function() {
+ var Buffer = util.Buffer;
+ /* istanbul ignore if */
+ if (!Buffer) {
+ util._Buffer_from = util._Buffer_allocUnsafe = null;
+ return;
+ }
+ // because node 4.x buffers are incompatible & immutable
+ // see: https://github.com/dcodeIO/protobuf.js/pull/665
+ util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||
+ /* istanbul ignore next */
+ function Buffer_from(value, encoding) {
+ return new Buffer(value, encoding);
+ };
+ util._Buffer_allocUnsafe = Buffer.allocUnsafe ||
+ /* istanbul ignore next */
+ function Buffer_allocUnsafe(size) {
+ return new Buffer(size);
+ };
+};
+
+},{"1":1,"10":10,"2":2,"34":34,"4":4,"6":6,"7":7,"9":9}],36:[function(require,module,exports){
+"use strict";
+module.exports = verifier;
+
+var Enum = require(14),
+ util = require(33);
+
+function invalid(field, expected) {
+ return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected";
+}
+
+/**
+ * Generates a partial value verifier.
+ * @param {Codegen} gen Codegen instance
+ * @param {Field} field Reflected field
+ * @param {number} fieldIndex Field index
+ * @param {string} ref Variable reference
+ * @returns {Codegen} Codegen instance
+ * @ignore
+ */
+function genVerifyValue(gen, field, fieldIndex, ref) {
+ /* eslint-disable no-unexpected-multiline */
+ if (field.resolvedType) {
+ if (field.resolvedType instanceof Enum) { gen
+ ("switch(%s){", ref)
+ ("default:")
+ ("return%j", invalid(field, "enum value"));
+ for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen
+ ("case %i:", field.resolvedType.values[keys[j]]);
+ gen
+ ("break")
+ ("}");
+ } else {
+ gen
+ ("{")
+ ("var e=types[%i].verify(%s);", fieldIndex, ref)
+ ("if(e)")
+ ("return%j+e", field.name + ".")
+ ("}");
+ }
+ } else {
+ switch (field.type) {
+ case "int32":
+ case "uint32":
+ case "sint32":
+ case "fixed32":
+ case "sfixed32": gen
+ ("if(!util.isInteger(%s))", ref)
+ ("return%j", invalid(field, "integer"));
+ break;
+ case "int64":
+ case "uint64":
+ case "sint64":
+ case "fixed64":
+ case "sfixed64": gen
+ ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref)
+ ("return%j", invalid(field, "integer|Long"));
+ break;
+ case "float":
+ case "double": gen
+ ("if(typeof %s!==\"number\")", ref)
+ ("return%j", invalid(field, "number"));
+ break;
+ case "bool": gen
+ ("if(typeof %s!==\"boolean\")", ref)
+ ("return%j", invalid(field, "boolean"));
+ break;
+ case "string": gen
+ ("if(!util.isString(%s))", ref)
+ ("return%j", invalid(field, "string"));
+ break;
+ case "bytes": gen
+ ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref)
+ ("return%j", invalid(field, "buffer"));
+ break;
+ }
+ }
+ return gen;
+ /* eslint-enable no-unexpected-multiline */
+}
+
+/**
+ * Generates a partial key verifier.
+ * @param {Codegen} gen Codegen instance
+ * @param {Field} field Reflected field
+ * @param {string} ref Variable reference
+ * @returns {Codegen} Codegen instance
+ * @ignore
+ */
+function genVerifyKey(gen, field, ref) {
+ /* eslint-disable no-unexpected-multiline */
+ switch (field.keyType) {
+ case "int32":
+ case "uint32":
+ case "sint32":
+ case "fixed32":
+ case "sfixed32": gen
+ ("if(!util.key32Re.test(%s))", ref)
+ ("return%j", invalid(field, "integer key"));
+ break;
+ case "int64":
+ case "uint64":
+ case "sint64":
+ case "fixed64":
+ case "sfixed64": gen
+ ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not
+ ("return%j", invalid(field, "integer|Long key"));
+ break;
+ case "bool": gen
+ ("if(!util.key2Re.test(%s))", ref)
+ ("return%j", invalid(field, "boolean key"));
+ break;
+ }
+ return gen;
+ /* eslint-enable no-unexpected-multiline */
+}
+
+/**
+ * Generates a verifier specific to the specified message type.
+ * @param {Type} mtype Message type
+ * @returns {Codegen} Codegen instance
+ */
+function verifier(mtype) {
+ /* eslint-disable no-unexpected-multiline */
+
+ var gen = util.codegen(["m"], mtype.name + "$verify")
+ ("if(typeof m!==\"object\"||m===null)")
+ ("return%j", "object expected");
+ var oneofs = mtype.oneofsArray,
+ seenFirstField = {};
+ if (oneofs.length) gen
+ ("var p={}");
+
+ for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {
+ var field = mtype._fieldsArray[i].resolve(),
+ ref = "m" + util.safeProp(field.name);
+
+ if (field.optional) gen
+ ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null
+
+ // map fields
+ if (field.map) { gen
+ ("if(!util.isObject(%s))", ref)
+ ("return%j", invalid(field, "object"))
+ ("var k=Object.keys(%s)", ref)
+ ("for(var i=0;i}
+ * @const
+ */
+var wrappers = exports;
+
+var Message = require(19);
+
+/**
+ * From object converter part of an {@link IWrapper}.
+ * @typedef WrapperFromObjectConverter
+ * @type {function}
+ * @param {Object.} object Plain object
+ * @returns {Message<{}>} Message instance
+ * @this Type
+ */
+
+/**
+ * To object converter part of an {@link IWrapper}.
+ * @typedef WrapperToObjectConverter
+ * @type {function}
+ * @param {Message<{}>} message Message instance
+ * @param {IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ * @this Type
+ */
+
+/**
+ * Common type wrapper part of {@link wrappers}.
+ * @interface IWrapper
+ * @property {WrapperFromObjectConverter} [fromObject] From object converter
+ * @property {WrapperToObjectConverter} [toObject] To object converter
+ */
+
+// Custom wrapper for Any
+wrappers[".google.protobuf.Any"] = {
+
+ fromObject: function(object) {
+
+ // unwrap value type if mapped
+ if (object && object["@type"]) {
+ var type = this.lookup(object["@type"]);
+ /* istanbul ignore else */
+ if (type) {
+ // type_url does not accept leading "."
+ var type_url = object["@type"].charAt(0) === "." ?
+ object["@type"].substr(1) : object["@type"];
+ // type_url prefix is optional, but path seperator is required
+ return this.create({
+ type_url: "/" + type_url,
+ value: type.encode(type.fromObject(object)).finish()
+ });
+ }
+ }
+
+ return this.fromObject(object);
+ },
+
+ toObject: function(message, options) {
+
+ // decode value if requested and unmapped
+ if (options && options.json && message.type_url && message.value) {
+ // Only use fully qualified type name after the last '/'
+ var name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1);
+ var type = this.lookup(name);
+ /* istanbul ignore else */
+ if (type)
+ message = type.decode(message.value);
+ }
+
+ // wrap value if unmapped
+ if (!(message instanceof this.ctor) && message instanceof Message) {
+ var object = message.$type.toObject(message, options);
+ object["@type"] = message.$type.fullName;
+ return object;
+ }
+
+ return this.toObject(message, options);
+ }
+};
+
+},{"19":19}],38:[function(require,module,exports){
+"use strict";
+module.exports = Writer;
+
+var util = require(35);
+
+var BufferWriter; // cyclic
+
+var LongBits = util.LongBits,
+ base64 = util.base64,
+ utf8 = util.utf8;
+
+/**
+ * Constructs a new writer operation instance.
+ * @classdesc Scheduled writer operation.
+ * @constructor
+ * @param {function(*, Uint8Array, number)} fn Function to call
+ * @param {number} len Value byte length
+ * @param {*} val Value to write
+ * @ignore
+ */
+function Op(fn, len, val) {
+
+ /**
+ * Function to call.
+ * @type {function(Uint8Array, number, *)}
+ */
+ this.fn = fn;
+
+ /**
+ * Value byte length.
+ * @type {number}
+ */
+ this.len = len;
+
+ /**
+ * Next operation.
+ * @type {Writer.Op|undefined}
+ */
+ this.next = undefined;
+
+ /**
+ * Value to write.
+ * @type {*}
+ */
+ this.val = val; // type varies
+}
+
+/* istanbul ignore next */
+function noop() {} // eslint-disable-line no-empty-function
+
+/**
+ * Constructs a new writer state instance.
+ * @classdesc Copied writer state.
+ * @memberof Writer
+ * @constructor
+ * @param {Writer} writer Writer to copy state from
+ * @ignore
+ */
+function State(writer) {
+
+ /**
+ * Current head.
+ * @type {Writer.Op}
+ */
+ this.head = writer.head;
+
+ /**
+ * Current tail.
+ * @type {Writer.Op}
+ */
+ this.tail = writer.tail;
+
+ /**
+ * Current buffer length.
+ * @type {number}
+ */
+ this.len = writer.len;
+
+ /**
+ * Next state.
+ * @type {State|null}
+ */
+ this.next = writer.states;
+}
+
+/**
+ * Constructs a new writer instance.
+ * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.
+ * @constructor
+ */
+function Writer() {
+
+ /**
+ * Current length.
+ * @type {number}
+ */
+ this.len = 0;
+
+ /**
+ * Operations head.
+ * @type {Object}
+ */
+ this.head = new Op(noop, 0, 0);
+
+ /**
+ * Operations tail
+ * @type {Object}
+ */
+ this.tail = this.head;
+
+ /**
+ * Linked forked states.
+ * @type {Object|null}
+ */
+ this.states = null;
+
+ // When a value is written, the writer calculates its byte length and puts it into a linked
+ // list of operations to perform when finish() is called. This both allows us to allocate
+ // buffers of the exact required size and reduces the amount of work we have to do compared
+ // to first calculating over objects and then encoding over objects. In our case, the encoding
+ // part is just a linked list walk calling operations with already prepared values.
+}
+
+/**
+ * Creates a new writer.
+ * @function
+ * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}
+ */
+Writer.create = util.Buffer
+ ? function create_buffer_setup() {
+ return (Writer.create = function create_buffer() {
+ return new BufferWriter();
+ })();
+ }
+ /* istanbul ignore next */
+ : function create_array() {
+ return new Writer();
+ };
+
+/**
+ * Allocates a buffer of the specified size.
+ * @param {number} size Buffer size
+ * @returns {Uint8Array} Buffer
+ */
+Writer.alloc = function alloc(size) {
+ return new util.Array(size);
+};
+
+// Use Uint8Array buffer pool in the browser, just like node does with buffers
+/* istanbul ignore else */
+if (util.Array !== Array)
+ Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
+
+/**
+ * Pushes a new operation to the queue.
+ * @param {function(Uint8Array, number, *)} fn Function to call
+ * @param {number} len Value byte length
+ * @param {number} val Value to write
+ * @returns {Writer} `this`
+ * @private
+ */
+Writer.prototype._push = function push(fn, len, val) {
+ this.tail = this.tail.next = new Op(fn, len, val);
+ this.len += len;
+ return this;
+};
+
+function writeByte(val, buf, pos) {
+ buf[pos] = val & 255;
+}
+
+function writeVarint32(val, buf, pos) {
+ while (val > 127) {
+ buf[pos++] = val & 127 | 128;
+ val >>>= 7;
+ }
+ buf[pos] = val;
+}
+
+/**
+ * Constructs a new varint writer operation instance.
+ * @classdesc Scheduled varint writer operation.
+ * @extends Op
+ * @constructor
+ * @param {number} len Value byte length
+ * @param {number} val Value to write
+ * @ignore
+ */
+function VarintOp(len, val) {
+ this.len = len;
+ this.next = undefined;
+ this.val = val;
+}
+
+VarintOp.prototype = Object.create(Op.prototype);
+VarintOp.prototype.fn = writeVarint32;
+
+/**
+ * Writes an unsigned 32 bit value as a varint.
+ * @param {number} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.uint32 = function write_uint32(value) {
+ // here, the call to this.push has been inlined and a varint specific Op subclass is used.
+ // uint32 is by far the most frequently used operation and benefits significantly from this.
+ this.len += (this.tail = this.tail.next = new VarintOp(
+ (value = value >>> 0)
+ < 128 ? 1
+ : value < 16384 ? 2
+ : value < 2097152 ? 3
+ : value < 268435456 ? 4
+ : 5,
+ value)).len;
+ return this;
+};
+
+/**
+ * Writes a signed 32 bit value as a varint.
+ * @function
+ * @param {number} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.int32 = function write_int32(value) {
+ return value < 0
+ ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec
+ : this.uint32(value);
+};
+
+/**
+ * Writes a 32 bit value as a varint, zig-zag encoded.
+ * @param {number} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.sint32 = function write_sint32(value) {
+ return this.uint32((value << 1 ^ value >> 31) >>> 0);
+};
+
+function writeVarint64(val, buf, pos) {
+ while (val.hi) {
+ buf[pos++] = val.lo & 127 | 128;
+ val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
+ val.hi >>>= 7;
+ }
+ while (val.lo > 127) {
+ buf[pos++] = val.lo & 127 | 128;
+ val.lo = val.lo >>> 7;
+ }
+ buf[pos++] = val.lo;
+}
+
+/**
+ * Writes an unsigned 64 bit value as a varint.
+ * @param {number|string} value Value to write
+ * @returns {Writer} `this`
+ * @throws {TypeError} If `value` is a string and no long library is present.
+ */
+Writer.prototype.uint64 = function write_uint64(value) {
+ var bits = LongBits.from(value);
+ return this._push(writeVarint64, bits.length(), bits);
+};
+
+/**
+ * Writes a signed 64 bit value as a varint.
+ * @function
+ * @param {number|string} value Value to write
+ * @returns {Writer} `this`
+ * @throws {TypeError} If `value` is a string and no long library is present.
+ */
+Writer.prototype.int64 = Writer.prototype.uint64;
+
+/**
+ * Writes a signed 64 bit value as a varint, zig-zag encoded.
+ * @param {number|string} value Value to write
+ * @returns {Writer} `this`
+ * @throws {TypeError} If `value` is a string and no long library is present.
+ */
+Writer.prototype.sint64 = function write_sint64(value) {
+ var bits = LongBits.from(value).zzEncode();
+ return this._push(writeVarint64, bits.length(), bits);
+};
+
+/**
+ * Writes a boolish value as a varint.
+ * @param {boolean} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.bool = function write_bool(value) {
+ return this._push(writeByte, 1, value ? 1 : 0);
+};
+
+function writeFixed32(val, buf, pos) {
+ buf[pos ] = val & 255;
+ buf[pos + 1] = val >>> 8 & 255;
+ buf[pos + 2] = val >>> 16 & 255;
+ buf[pos + 3] = val >>> 24;
+}
+
+/**
+ * Writes an unsigned 32 bit value as fixed 32 bits.
+ * @param {number} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.fixed32 = function write_fixed32(value) {
+ return this._push(writeFixed32, 4, value >>> 0);
+};
+
+/**
+ * Writes a signed 32 bit value as fixed 32 bits.
+ * @function
+ * @param {number} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.sfixed32 = Writer.prototype.fixed32;
+
+/**
+ * Writes an unsigned 64 bit value as fixed 64 bits.
+ * @param {number|string} value Value to write
+ * @returns {Writer} `this`
+ * @throws {TypeError} If `value` is a string and no long library is present.
+ */
+Writer.prototype.fixed64 = function write_fixed64(value) {
+ var bits = LongBits.from(value);
+ return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
+};
+
+/**
+ * Writes a signed 64 bit value as fixed 64 bits.
+ * @function
+ * @param {number|string} value Value to write
+ * @returns {Writer} `this`
+ * @throws {TypeError} If `value` is a string and no long library is present.
+ */
+Writer.prototype.sfixed64 = Writer.prototype.fixed64;
+
+/**
+ * Writes a float (32 bit).
+ * @function
+ * @param {number} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.float = function write_float(value) {
+ return this._push(util.float.writeFloatLE, 4, value);
+};
+
+/**
+ * Writes a double (64 bit float).
+ * @function
+ * @param {number} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.double = function write_double(value) {
+ return this._push(util.float.writeDoubleLE, 8, value);
+};
+
+var writeBytes = util.Array.prototype.set
+ ? function writeBytes_set(val, buf, pos) {
+ buf.set(val, pos); // also works for plain array values
+ }
+ /* istanbul ignore next */
+ : function writeBytes_for(val, buf, pos) {
+ for (var i = 0; i < val.length; ++i)
+ buf[pos + i] = val[i];
+ };
+
+/**
+ * Writes a sequence of bytes.
+ * @param {Uint8Array|string} value Buffer or base64 encoded string to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.bytes = function write_bytes(value) {
+ var len = value.length >>> 0;
+ if (!len)
+ return this._push(writeByte, 1, 0);
+ if (util.isString(value)) {
+ var buf = Writer.alloc(len = base64.length(value));
+ base64.decode(value, buf, 0);
+ value = buf;
+ }
+ return this.uint32(len)._push(writeBytes, len, value);
+};
+
+/**
+ * Writes a string.
+ * @param {string} value Value to write
+ * @returns {Writer} `this`
+ */
+Writer.prototype.string = function write_string(value) {
+ var len = utf8.length(value);
+ return len
+ ? this.uint32(len)._push(utf8.write, len, value)
+ : this._push(writeByte, 1, 0);
+};
+
+/**
+ * Forks this writer's state by pushing it to a stack.
+ * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.
+ * @returns {Writer} `this`
+ */
+Writer.prototype.fork = function fork() {
+ this.states = new State(this);
+ this.head = this.tail = new Op(noop, 0, 0);
+ this.len = 0;
+ return this;
+};
+
+/**
+ * Resets this instance to the last state.
+ * @returns {Writer} `this`
+ */
+Writer.prototype.reset = function reset() {
+ if (this.states) {
+ this.head = this.states.head;
+ this.tail = this.states.tail;
+ this.len = this.states.len;
+ this.states = this.states.next;
+ } else {
+ this.head = this.tail = new Op(noop, 0, 0);
+ this.len = 0;
+ }
+ return this;
+};
+
+/**
+ * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.
+ * @returns {Writer} `this`
+ */
+Writer.prototype.ldelim = function ldelim() {
+ var head = this.head,
+ tail = this.tail,
+ len = this.len;
+ this.reset().uint32(len);
+ if (len) {
+ this.tail.next = head.next; // skip noop
+ this.tail = tail;
+ this.len += len;
+ }
+ return this;
+};
+
+/**
+ * Finishes the write operation.
+ * @returns {Uint8Array} Finished buffer
+ */
+Writer.prototype.finish = function finish() {
+ var head = this.head.next, // skip noop
+ buf = this.constructor.alloc(this.len),
+ pos = 0;
+ while (head) {
+ head.fn(head.val, buf, pos);
+ pos += head.len;
+ head = head.next;
+ }
+ // this.head = this.tail = null;
+ return buf;
+};
+
+Writer._configure = function(BufferWriter_) {
+ BufferWriter = BufferWriter_;
+};
+
+},{"35":35}],39:[function(require,module,exports){
+"use strict";
+module.exports = BufferWriter;
+
+// extends Writer
+var Writer = require(38);
+(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
+
+var util = require(35);
+
+var Buffer = util.Buffer;
+
+/**
+ * Constructs a new buffer writer instance.
+ * @classdesc Wire format writer using node buffers.
+ * @extends Writer
+ * @constructor
+ */
+function BufferWriter() {
+ Writer.call(this);
+}
+
+/**
+ * Allocates a buffer of the specified size.
+ * @param {number} size Buffer size
+ * @returns {Buffer} Buffer
+ */
+BufferWriter.alloc = function alloc_buffer(size) {
+ return (BufferWriter.alloc = util._Buffer_allocUnsafe)(size);
+};
+
+var writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === "set"
+ ? function writeBytesBuffer_set(val, buf, pos) {
+ buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)
+ // also works for plain array values
+ }
+ /* istanbul ignore next */
+ : function writeBytesBuffer_copy(val, buf, pos) {
+ if (val.copy) // Buffer values
+ val.copy(buf, pos, 0, val.length);
+ else for (var i = 0; i < val.length;) // plain array values
+ buf[pos++] = val[i++];
+ };
+
+/**
+ * @override
+ */
+BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
+ if (util.isString(value))
+ value = util._Buffer_from(value, "base64");
+ var len = value.length >>> 0;
+ this.uint32(len);
+ if (len)
+ this._push(writeBytesBuffer, len, value);
+ return this;
+};
+
+function writeStringBuffer(val, buf, pos) {
+ if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)
+ util.utf8.write(val, buf, pos);
+ else
+ buf.utf8Write(val, pos);
+}
+
+/**
+ * @override
+ */
+BufferWriter.prototype.string = function write_string_buffer(value) {
+ var len = Buffer.byteLength(value);
+ this.uint32(len);
+ if (len)
+ this._push(writeStringBuffer, len, value);
+ return this;
+};
+
+
+/**
+ * Finishes the write operation.
+ * @name BufferWriter#finish
+ * @function
+ * @returns {Buffer} Finished buffer
+ */
+
+},{"35":35,"38":38}]},{},[16])
+
+})();
+//# sourceMappingURL=protobuf.js.map
diff --git a/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/protobuf.js.map b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/protobuf.js.map
new file mode 100644
index 00000000..e81b2c6f
--- /dev/null
+++ b/node_modules/.pnpm/@apollo+protobufjs@1.2.6/node_modules/@apollo/protobufjs/dist/light/protobuf.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light","../src/index-minimal.js","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/type.js","../src/types.js","../src/util.js","../src/util/longbits.js","../src/util/minimal.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + (functionNameOverride || functionName || \"\") + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @typedef FetchOptions\r\n * @type {Object}\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {FetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(14),\n util = require(33);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop, ref) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (ref === undefined) {\n ref = \"d\" + prop;\n }\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n if (field.repeated && values[keys[i]] === field.typeDefault) gen\n (\"default:\");\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof %s!==\\\"object\\\")\", ref)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(%s)\", prop, fieldIndex, ref);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(%s)\", prop, ref); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=%s>>>0\", prop, ref);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=%s|0\", prop, ref);\n break;\n case \"uint64\":\n isUnsigned = true;\n // eslint-disable-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"(m%s=util.Long.fromValue(%s)).unsigned=%j\", prop, ref, isUnsigned)\n (\"else if(typeof %s===\\\"string\\\")\", ref)\n (\"m%s=parseInt(%s,10)\", prop, ref)\n (\"else if(typeof %s===\\\"number\\\")\", ref)\n (\"m%s=%s\", prop, ref)\n (\"else if(typeof %s===\\\"object\\\")\", ref)\n (\"m%s=new util.LongBits(%s.low>>>0,%s.high>>>0).toNumber(%s)\", prop, ref, ref, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof %s===\\\"string\\\")\", ref)\n (\"util.base64.decode(%s,m%s=util.newBuffer(util.base64.length(%s)),0)\", ref, prop, ref)\n (\"else if(%s.length)\", ref)\n (\"m%s=%s\", prop, ref);\n break;\n case \"string\": gen\n (\"m%s=String(%s)\", prop, ref);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(%s)\", prop, ref);\n break;\n /* default: gen\n (\"m%s=%s\", prop, ref);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:%i\", prop, field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = \"[\" + Array.prototype.slice.call(field.typeDefault).join(\",\") + \"]\";\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%s\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;j>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i:\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"r.skip().pos++\") // assumes id 1 + key wireType\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"k=r.%s()\", field.keyType)\n (\"r.pos++\"); // assumes id 2 + value wireType\n if (types.long[field.keyType] !== undefined) {\n if (types.basic[type] === undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())\", ref, i); // can't be groups\n else gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=r.%s()\", ref, type);\n } else {\n if (types.basic[type] === undefined) gen\n (\"%s[k]=types[%i].decode(r,r.uint32())\", ref, i); // can't be groups\n else gen\n (\"%s[k]=r.%s()\", ref, type);\n }\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0);\n return;\n }\n var key = (field.id << 3 | 2) >>> 0;\n if (field.preEncoded()) {\n gen(\"if (%s instanceof Uint8Array) {\", ref)\n (\"w.uint32(%i)\", key)\n (\"w.bytes(%s)\", ref)\n (\"} else {\");\n }\n gen(\"types[%i].encode(%s,w.uint32(%i).fork()).ldelim()\", fieldIndex, ref, key);\n if (field.preEncoded()) {\n gen(\"}\")\n }\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) {\n var arrayRef = ref;\n if (field.useToArray()) {\n arrayRef = \"array\" + field.id;\n gen(\"var %s\", arrayRef);\n gen(\"if (%s!=null&&%s.toArray) { %s = %s.toArray() } else { %s = %s }\",\n ref, ref, arrayRef, ref, arrayRef, ref);\n }\n gen(\"if(%s!=null&&%s.length){\", arrayRef, arrayRef); // !== undefined && !== null\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", arrayRef)\n (\"w.%s(%s[i])\", type, arrayRef)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", arrayRef);\n if (wireType === undefined)\n genTypePartial(gen, field, index, arrayRef + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, arrayRef);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(21),\n util = require(33);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n */\nfunction Enum(name, values, options, comment, comments) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(14),\n types = require(32),\n util = require(33);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is required.\n * @type {boolean}\n */\n this.required = rule === \"required\";\n\n /**\n * Whether this field is optional.\n * @type {boolean}\n */\n this.optional = !this.required;\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Internally remembers whether this field is packed.\n * @type {boolean|null}\n * @private\n */\n this._packed = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n // defaults to packed=true if not explicity set to false\n if (this._packed === null)\n this._packed = this.getOption(\"packed\") !== false;\n return this._packed;\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"packed\") // clear cached before setting\n this._packed = null;\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === \"u\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\nField.prototype.useToArray = function useToArray() {\n return !!this.getOption(\"(js_use_toArray)\");\n};\n\nField.prototype.preEncoded = function preEncoded() {\n return !!this.getOption(\"(js_preEncoded)\");\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(17);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(13);\nprotobuf.decoder = require(12);\nprotobuf.verifier = require(36);\nprotobuf.converter = require(11);\n\n// Reflection\nprotobuf.ReflectionObject = require(22);\nprotobuf.Namespace = require(21);\nprotobuf.Root = require(26);\nprotobuf.Enum = require(14);\nprotobuf.Type = require(31);\nprotobuf.Field = require(15);\nprotobuf.OneOf = require(23);\nprotobuf.MapField = require(18);\nprotobuf.Service = require(30);\nprotobuf.Method = require(20);\n\n// Runtime\nprotobuf.Message = require(19);\nprotobuf.wrappers = require(37);\n\n// Utility\nprotobuf.types = require(32);\nprotobuf.util = require(33);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(38);\nprotobuf.BufferWriter = require(39);\nprotobuf.Reader = require(24);\nprotobuf.BufferReader = require(25);\n\n// Utility\nprotobuf.util = require(35);\nprotobuf.rpc = require(28);\nprotobuf.roots = require(27);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.Reader._configure(protobuf.BufferReader);\n protobuf.util._configure();\n}\n\n// Set up buffer utility according to the environment\nprotobuf.Writer._configure(protobuf.BufferWriter);\nconfigure();\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(15);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(32),\n util = require(33);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(35);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n this[keys[i]] = properties[keys[i]];\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(33);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(15),\n util = require(33);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json) {\n return new Namespace(name, json.options).addJSON(json.nested);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace}\n */\n// ^ BEWARE: VSCode hangs forever when using more than 5 types (that's why AnyExtensionField exists in the first place)\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson) {\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n var nested = this.nestedArray, i = 0;\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n return this.resolve();\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n if (found) {\n if (path.length === 1) {\n if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)\n return found;\n } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))\n return found;\n\n // Otherwise try each nested namespace\n } else\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))\n return found;\n\n // If there hasn't been a match, try again at the parent\n if (this.parent === null || parentAlreadyChecked)\n return null;\n return this.parent.lookup(path, filterTypes);\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nvar util = require(33);\n\nvar Root; // cyclic\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (!ifNotSet || !this.options || this.options[name] === undefined)\n (this.options || (this.options = {}))[name] = value;\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(15),\n util = require(33);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(35);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/*\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/*\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/*\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/*\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/*\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\n ? new this.buf.constructor(0)\n : this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(24);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(35);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\n/* istanbul ignore else */\nif (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(21);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(15),\n Enum = require(14),\n OneOf = require(23),\n util = require(33);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Nameespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root) {\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested);\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback)\n return util.asPromise(load, self, filename, options);\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback)\n return;\n var cb = callback;\n callback = null;\n if (sync)\n throw err;\n cb(err, root);\n }\n\t\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname; \n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source) {\n try {\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = (getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])))\n fetch(resolved);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = (getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])))\n fetch(resolved, true);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued)\n finish(null, self); // only once anyway\n }\n\n // Fetches a single file\n function fetch(filename, weak) {\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1)\n return;\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync)\n process(filename, common[filename]);\n else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename]);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source);\n } else {\n ++queued;\n util.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback)\n return; // terminated meanwhile\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename))\n filename = [ filename ];\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n\n if (sync)\n return self;\n if (!queued)\n finish(null, self);\n return undefined;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available accross modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(29);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(35);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(21);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(20),\n util = require(33),\n rpc = require(28);\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json) {\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested);\n service.comment = json.comment;\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return this.methods[name]\n || Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], util.isReserved(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(21);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(14),\n OneOf = require(23),\n Field = require(15),\n MapField = require(18),\n Service = require(30),\n Message = require(19),\n Reader = require(24),\n Writer = require(38),\n util = require(33),\n encoder = require(13),\n decoder = require(12),\n verifier = require(36),\n converter = require(11),\n wrappers = require(37);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.