From 9b4ddaed036c74b84b64e0e6a34733f1586610f5 Mon Sep 17 00:00:00 2001 From: shafat-96 Date: Mon, 24 Feb 2025 23:28:22 +0600 Subject: [PATCH] Add files via upload --- README.md | 127 + embedHandler.js | 110 + hls.js | 43 + index.js | 255 + mapper.js | 345 + package-lock.json | 1354 + package.json | 23 + sources/rabbit.js | 58292 ++++++++++++++++++++++++++++++++++++++++++++ vercel.json | 15 + 9 files changed, 60564 insertions(+) create mode 100644 README.md create mode 100644 embedHandler.js create mode 100644 hls.js create mode 100644 index.js create mode 100644 mapper.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 sources/rabbit.js create mode 100644 vercel.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae5716a --- /dev/null +++ b/README.md @@ -0,0 +1,127 @@ +# Anime Sources API + +A simple API wrapper for fetching anime sources from anicrush.to. + +## Setup + +1. Install dependencies: +```bash +npm install +``` + +2. Start the server: +```bash +npm start +``` + +For development with auto-reload: +```bash +npm run dev +``` + +## API Endpoints + +### Map AniList ID to Anicrush + +``` +GET /api/mapper/{anilistId} +``` + +Maps an AniList ID to anicrush.to anime ID and episode information. + +Example Request: +``` +GET http://localhost:3000/api/mapper/21 +``` + +Example Response: +```json +{ + "anilist_id": "21", + "anicrush_id": "vRPjMA", + "titles": { + "romaji": "One Piece", + "english": "One Piece", + "native": "ワンピース", + "anicrush": "One Piece" + }, + "total_episodes": 1000, + "episodes": [ + { + "number": 1, + "id": "vRPjMA&episode=1" + }, + // ... more episodes + ], + "format": "TV", + "status": "RELEASING" +} +``` + +### Search Anime + +``` +GET /api/anime/search +``` + +Query Parameters: +- `keyword` (required): Search term +- `page` (optional): Page number (default: 1) +- `limit` (optional): Results per page (default: 24) + +### Get Episode List + +``` +GET /api/anime/episodes +``` + +Query Parameters: +- `movieId` (required): The ID of the movie/anime + +### Get Servers + +``` +GET /api/anime/servers +``` + +Query Parameters: +- `movieId` (required): The ID of the movie/anime +- `episode` (optional): Episode number (default: 1) + +### Get Sources + +``` +GET /api/anime/sources +``` + +Query Parameters: +- `movieId` (required): The ID of the movie/anime (e.g., "vRPjMA") +- `episode` (optional): Episode number (default: 1) +- `server` (optional): Server number (default: 4) +- `subOrDub` (optional): "sub" or "dub" (default: "sub") + +Example Request: +``` +GET http://localhost:3000/api/anime/sources?movieId=vRPjMA&episode=1&server=4&subOrDub=sub +``` + +### Health Check + +``` +GET /health +``` + +Returns the API status. + +## Error Handling + +The API will return appropriate error messages with corresponding HTTP status codes: +- 400: Bad Request (missing required parameters) +- 404: Not Found (anime or episode not found) +- 500: Internal Server Error (server-side issues) + +## Notes + +- The API includes necessary headers for authentication +- CORS is enabled for cross-origin requests +- The server runs on port 3000 by default (can be changed via PORT environment variable) \ No newline at end of file diff --git a/embedHandler.js b/embedHandler.js new file mode 100644 index 0000000..20847c2 --- /dev/null +++ b/embedHandler.js @@ -0,0 +1,110 @@ +const { spawn } = require('child_process'); +const path = require('path'); +const fs = require('fs').promises; + +class EmbedSource { + constructor(file, sourceType) { + this.file = file; + this.type = sourceType; + } +} + +class Track { + constructor(file, label, kind, isDefault = false) { + this.file = file; + this.label = label; + this.kind = kind; + if (isDefault) { + this.default = isDefault; + } + } +} + +class EmbedSources { + constructor(sources = [], tracks = [], t = 0, server = 1, intro = null, outro = null) { + this.sources = sources; + this.tracks = tracks; + this.t = t; + this.server = server; + if (intro) this.intro = intro; + if (outro) this.outro = outro; + } +} + +const findRabbitScript = async () => { + const possiblePaths = [ + path.join(__dirname, 'sources', 'rabbit.ts'), + path.join(__dirname, 'sources', 'rabbit.js'), + path.join(__dirname, 'rabbit.js'), + path.join(process.cwd(), 'rabbit.js') + ]; + + for (const p of possiblePaths) { + try { + await fs.access(p); + return p; + } catch (error) { + continue; + } + } + throw new Error('rabbit.js not found in any expected locations'); +}; + +const handleEmbed = async (embedUrl, referrer) => { + return new Promise(async (resolve, reject) => { + try { + const rabbitPath = await findRabbitScript(); + const childProcess = spawn('node', [ + rabbitPath, + `--embed-url=${embedUrl}`, + `--referrer=${referrer}` + ]); + + let outputData = ''; + let errorData = ''; + + childProcess.stdout.on('data', (data) => { + outputData += data.toString(); + }); + + childProcess.stderr.on('data', (data) => { + errorData += data.toString(); + }); + + childProcess.on('close', (code) => { + if (code !== 0) { + reject(new Error(`Process exited with code ${code}: ${errorData}`)); + return; + } + + try { + const parsedOutput = JSON.parse(outputData.trim()); + const embedSources = new EmbedSources( + parsedOutput.sources.map(s => new EmbedSource(s.file, s.type)), + parsedOutput.tracks.map(t => new Track(t.file, t.label, t.kind, t.default)), + parsedOutput.t, + parsedOutput.server, + parsedOutput.intro, + parsedOutput.outro + ); + resolve(embedSources); + } catch (error) { + reject(error); + } + }); + + childProcess.on('error', (error) => { + reject(error); + }); + } catch (error) { + reject(error); + } + }); +}; + +module.exports = { + handleEmbed, + EmbedSource, + Track, + EmbedSources +}; \ No newline at end of file diff --git a/hls.js b/hls.js new file mode 100644 index 0000000..ec23e06 --- /dev/null +++ b/hls.js @@ -0,0 +1,43 @@ +const axios = require('axios'); +const { getCommonHeaders } = require('./mapper'); +const { handleEmbed } = require('./embedHandler'); + +// Function to get HLS link +async function getHlsLink(embedUrl) { + try { + if (!embedUrl) { + throw new Error('Embed URL is required'); + } + + // Use rabbit.js to decode the embed URL and get sources + const embedSources = await handleEmbed(embedUrl, 'https://anicrush.to'); + + if (!embedSources || !embedSources.sources || !embedSources.sources.length) { + throw new Error('No sources found'); + } + + // Return the complete response + return { + status: true, + result: { + sources: embedSources.sources, + tracks: embedSources.tracks, + t: embedSources.t, + intro: embedSources.intro, + outro: embedSources.outro, + server: embedSources.server + } + }; + + } catch (error) { + console.error('Error getting HLS link:', error); + return { + status: false, + error: error.message || 'Failed to get HLS link' + }; + } +} + +module.exports = { + getHlsLink +}; \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..29ccf8c --- /dev/null +++ b/index.js @@ -0,0 +1,255 @@ +const express = require('express'); +const axios = require('axios'); +const cors = require('cors'); +const { mapAniListToAnicrush, getCommonHeaders } = require('./mapper'); +const { getHlsLink } = require('./hls'); +require('dotenv').config(); + +const app = express(); + +// Remove explicit port for Vercel +const PORT = process.env.PORT || 3000; + +// CORS configuration for Vercel +app.use(cors({ + origin: '*', + methods: ['GET', 'POST', 'OPTIONS'], + allowedHeaders: ['Content-Type', 'Authorization'] +})); + +app.use(express.json()); + +// Endpoint to map AniList ID to anicrush +app.get('/api/mapper/:anilistId', async (req, res) => { + try { + const { anilistId } = req.params; + + if (!anilistId) { + return res.status(400).json({ error: 'AniList ID is required' }); + } + + const mappedData = await mapAniListToAnicrush(anilistId); + res.json(mappedData); + } catch (error) { + console.error('Error in mapper:', error); + res.status(500).json({ + error: 'Failed to map AniList ID', + message: error.message + }); + } +}); + +// Endpoint to search for anime +app.get('/api/anime/search', async (req, res) => { + try { + const { keyword, page = 1, limit = 24 } = req.query; + + if (!keyword) { + return res.status(400).json({ error: 'Search keyword is required' }); + } + + const headers = getCommonHeaders(); + + const response = await axios({ + method: 'GET', + url: `https://api.anicrush.to/shared/v2/movie/list`, + params: { + keyword, + page, + limit + }, + headers + }); + + res.json(response.data); + } catch (error) { + console.error('Error searching anime:', error); + res.status(500).json({ + error: 'Failed to search anime', + message: error.message + }); + } +}); + +// Endpoint to fetch episode list +app.get('/api/anime/episodes', async (req, res) => { + try { + const { movieId } = req.query; + + if (!movieId) { + return res.status(400).json({ error: 'Movie ID is required' }); + } + + const headers = getCommonHeaders(); + + const response = await axios({ + method: 'GET', + url: `https://api.anicrush.to/shared/v2/episode/list`, + params: { + _movieId: movieId + }, + headers + }); + + res.json(response.data); + } catch (error) { + console.error('Error fetching episode list:', error); + res.status(500).json({ + error: 'Failed to fetch episode list', + message: error.message + }); + } +}); + +// Endpoint to fetch servers for an episode +app.get('/api/anime/servers', async (req, res) => { + try { + const { movieId, episode } = req.query; + + if (!movieId) { + return res.status(400).json({ error: 'Movie ID is required' }); + } + + const headers = getCommonHeaders(); + + const response = await axios({ + method: 'GET', + url: `https://api.anicrush.to/shared/v2/episode/servers`, + params: { + _movieId: movieId, + ep: episode || 1 + }, + headers + }); + + res.json(response.data); + } catch (error) { + console.error('Error fetching servers:', error); + res.status(500).json({ + error: 'Failed to fetch servers', + message: error.message + }); + } +}); + +// Main endpoint to fetch anime sources +app.get('/api/anime/sources', async (req, res) => { + try { + const { movieId, episode, server, subOrDub } = req.query; + + if (!movieId) { + return res.status(400).json({ error: 'Movie ID is required' }); + } + + const headers = getCommonHeaders(); + + // First, check if the episode list exists + const episodeListResponse = await axios({ + method: 'GET', + url: `https://api.anicrush.to/shared/v2/episode/list`, + params: { + _movieId: movieId + }, + headers + }); + + if (!episodeListResponse.data || episodeListResponse.data.status === false) { + return res.status(404).json({ error: 'Episode list not found' }); + } + + // Then, get the servers for the episode + const serversResponse = await axios({ + method: 'GET', + url: `https://api.anicrush.to/shared/v2/episode/servers`, + params: { + _movieId: movieId, + ep: episode || 1 + }, + headers + }); + + if (!serversResponse.data || serversResponse.data.status === false) { + return res.status(404).json({ error: 'Servers not found' }); + } + + // Finally, get the sources + const sourcesResponse = await axios({ + method: 'GET', + url: `https://api.anicrush.to/shared/v2/episode/sources`, + params: { + _movieId: movieId, + ep: episode || 1, + sv: server || 4, + sc: subOrDub || 'sub' + }, + headers + }); + + res.json(sourcesResponse.data); + } catch (error) { + console.error('Error fetching anime sources:', error); + res.status(500).json({ + error: 'Failed to fetch anime sources', + message: error.message + }); + } +}); + +// Endpoint to get HLS link +app.get('/api/anime/hls/:movieId', async (req, res) => { + try { + const { movieId } = req.params; + const { episode = 1, server = 4, subOrDub = 'sub' } = req.query; + + if (!movieId) { + return res.status(400).json({ error: 'Movie ID is required' }); + } + + const headers = getCommonHeaders(); + + // First get the embed link + const embedResponse = await axios({ + method: 'GET', + url: `https://api.anicrush.to/shared/v2/episode/sources`, + params: { + _movieId: movieId, + ep: episode, + sv: server, + sc: subOrDub + }, + headers + }); + + if (!embedResponse.data || embedResponse.data.status === false) { + return res.status(404).json({ error: 'Embed link not found' }); + } + + const embedUrl = embedResponse.data.result.link; + + // Get HLS link from embed URL + const hlsData = await getHlsLink(embedUrl); + res.json(hlsData); + + } catch (error) { + console.error('Error fetching HLS link:', error); + res.status(500).json({ + error: 'Failed to fetch HLS link', + message: error.message + }); + } +}); + +// Health check endpoint +app.get('/health', (req, res) => { + res.json({ status: 'OK' }); +}); + +// Only start the server if not in Vercel environment +if (process.env.VERCEL !== '1') { + app.listen(PORT, () => { + console.log(`Server is running on port ${PORT}`); + }); +} + +// Export the Express app for Vercel +module.exports = app; \ No newline at end of file diff --git a/mapper.js b/mapper.js new file mode 100644 index 0000000..9c08bc7 --- /dev/null +++ b/mapper.js @@ -0,0 +1,345 @@ +const axios = require('axios'); + +// Common headers for API requests +const getCommonHeaders = () => ({ + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36', + 'x-site': 'anicrush', + 'Referer': 'https://anicrush.to/', + 'Origin': 'https://anicrush.to', + 'sec-fetch-site': 'same-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty' +}); + +// GraphQL query for AniList with synonyms +const ANILIST_QUERY = ` +query ($id: Int) { + Media(id: $id, type: ANIME) { + id + title { + romaji + english + native + } + synonyms + episodes + format + status + countryOfOrigin + seasonYear + description + genres + tags { + name + } + } +}`; + +// Function to calculate string similarity using Levenshtein distance +function calculateLevenshteinSimilarity(str1, str2) { + if (!str1 || !str2) return 0; + str1 = str1.toLowerCase(); + str2 = str2.toLowerCase(); + + const matrix = Array(str2.length + 1).fill(null) + .map(() => Array(str1.length + 1).fill(null)); + + for (let i = 0; i <= str1.length; i++) matrix[0][i] = i; + for (let j = 0; j <= str2.length; j++) matrix[j][0] = j; + + for (let j = 1; j <= str2.length; j++) { + for (let i = 1; i <= str1.length; i++) { + const indicator = str1[i - 1] === str2[j - 1] ? 0 : 1; + matrix[j][i] = Math.min( + matrix[j][i - 1] + 1, + matrix[j - 1][i] + 1, + matrix[j - 1][i - 1] + indicator + ); + } + } + + const maxLength = Math.max(str1.length, str2.length); + if (maxLength === 0) return 100; + return ((maxLength - matrix[str2.length][str1.length]) / maxLength) * 100; +} + +// Function to calculate word-based similarity +function calculateWordSimilarity(str1, str2) { + if (!str1 || !str2) return 0; + + const words1 = str1.toLowerCase().split(/\s+/).filter(Boolean); + const words2 = str2.toLowerCase().split(/\s+/).filter(Boolean); + + const commonWords = words1.filter(word => words2.includes(word)); + const totalUniqueWords = new Set([...words1, ...words2]).size; + + return (commonWords.length / totalUniqueWords) * 100; +} + +// Function to normalize title for comparison +function normalizeTitle(title) { + if (!title) return ''; + return title.toLowerCase() + .replace(/[^a-z0-9\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\u4e00-\u9faf\uff00-\uff9f]/g, ' ') + .replace(/\s+/g, ' ') + .trim(); +} + +// Function to get anime details from AniList +async function getAniListDetails(anilistId) { + try { + const response = await axios({ + url: 'https://graphql.anilist.co', + method: 'POST', + data: { + query: ANILIST_QUERY, + variables: { + id: parseInt(anilistId) + } + } + }); + + if (!response.data?.data?.Media) { + throw new Error('Anime not found on AniList'); + } + + return response.data.data.Media; + } catch (error) { + console.error('Error fetching from AniList:', error.message); + throw new Error('Failed to fetch anime details from AniList'); + } +} + +// Function to search anime on anicrush +async function searchAnicrush(title) { + if (!title) { + throw new Error('Search title is required'); + } + + try { + const headers = getCommonHeaders(); + const response = await axios({ + method: 'GET', + url: 'https://api.anicrush.to/shared/v2/movie/list', + params: { + keyword: title, + page: 1, + limit: 24 + }, + headers + }); + + if (response.data?.status === false) { + throw new Error(response.data.message || 'Search failed'); + } + + return response.data; + } catch (error) { + if (error.response) { + console.error('Search API error:', error.response.data); + throw new Error(error.response.data.message || 'Search request failed'); + } else if (error.request) { + console.error('No response received:', error.request); + throw new Error('No response from search API'); + } else { + console.error('Search error:', error.message); + throw new Error('Failed to search anime'); + } + } +} + +// Function to get episode list from anicrush +async function getEpisodeList(movieId) { + if (!movieId) { + throw new Error('Movie ID is required'); + } + + try { + const headers = getCommonHeaders(); + const response = await axios({ + method: 'GET', + url: 'https://api.anicrush.to/shared/v2/episode/list', + params: { + _movieId: movieId + }, + headers + }); + + if (response.data?.status === false) { + throw new Error(response.data.message || 'Failed to fetch episode list'); + } + + return response.data; + } catch (error) { + if (error.response) { + console.error('Episode list API error:', error.response.data); + throw new Error(error.response.data.message || 'Episode list request failed'); + } else if (error.request) { + console.error('No response received:', error.request); + throw new Error('No response from episode list API'); + } else { + console.error('Episode list error:', error.message); + throw new Error('Failed to fetch episode list'); + } + } +} + +// Function to calculate overall similarity between titles +function calculateTitleSimilarity(title1, title2) { + const levenshteinSim = calculateLevenshteinSimilarity(title1, title2); + const wordSim = calculateWordSimilarity(title1, title2); + + // Weight the similarities (favoring word-based matching for titles) + return (levenshteinSim * 0.4) + (wordSim * 0.6); +} + +// Function to find best match between AniList and anicrush results +function findBestMatch(anilistData, anicrushResults) { + if (!anicrushResults?.result?.movies || !anicrushResults.result.movies.length) { + return null; + } + + // Prepare all possible titles from AniList + const titles = [ + anilistData.title.romaji, + anilistData.title.english, + anilistData.title.native, + ...(anilistData.synonyms || []) + ].filter(Boolean); + + let bestMatch = null; + let highestSimilarity = 0; + + // Check each result from anicrush + for (const result of anicrushResults.result.movies) { + const resultTitles = [ + result.name, + result.name_english + ].filter(Boolean); + + for (const resultTitle of resultTitles) { + // Try each possible title combination + for (const title of titles) { + const similarity = calculateTitleSimilarity( + normalizeTitle(title), + normalizeTitle(resultTitle) + ); + + // Add bonus for year match + if (anilistData.seasonYear && result.aired_from) { + const yearMatch = result.aired_from.includes(anilistData.seasonYear.toString()); + const currentSimilarity = similarity + (yearMatch ? 15 : 0); + + if (currentSimilarity > highestSimilarity) { + highestSimilarity = currentSimilarity; + bestMatch = result; + } + } else if (similarity > highestSimilarity) { + highestSimilarity = similarity; + bestMatch = result; + } + } + } + } + + // Only return a match if similarity is above threshold + console.log(`Best match found with similarity: ${highestSimilarity}%`); + return highestSimilarity >= 60 ? bestMatch : null; +} + +// Function to parse episode list response +function parseEpisodeList(episodeList) { + if (!episodeList?.result) return []; + + const episodes = []; + for (const [key, value] of Object.entries(episodeList.result)) { + if (Array.isArray(value)) { + value.forEach(ep => { + episodes.push({ + number: ep.number, + name: ep.name, + name_english: ep.name_english, + is_filler: ep.is_filler + }); + }); + } + } + return episodes.sort((a, b) => a.number - b.number); +} + +// Main mapper function +async function mapAniListToAnicrush(anilistId) { + try { + // Get AniList details + const anilistData = await getAniListDetails(anilistId); + + // Try all possible titles for search + const titlesToTry = [ + anilistData.title.romaji, + anilistData.title.english, + anilistData.title.native, + ...(anilistData.synonyms || []) + ].filter(Boolean); + + let searchResults = null; + let bestMatch = null; + + // Try each title until we find a match + for (const title of titlesToTry) { + console.log(`Trying title: ${title}`); + searchResults = await searchAnicrush(title); + bestMatch = findBestMatch(anilistData, searchResults); + if (bestMatch) break; + } + + if (!bestMatch) { + throw new Error('No matching anime found on anicrush'); + } + + // Get episode list + const episodeList = await getEpisodeList(bestMatch.id); + const parsedEpisodes = parseEpisodeList(episodeList); + + // Create episode mapping + const episodes = parsedEpisodes.map(ep => ({ + number: ep.number, + name: ep.name, + name_english: ep.name_english, + is_filler: ep.is_filler, + id: `${bestMatch.id}&episode=${ep.number}` + })); + + return { + anilist_id: anilistId, + anicrush_id: bestMatch.id, + titles: { + romaji: anilistData.title.romaji, + english: anilistData.title.english, + native: anilistData.title.native, + synonyms: anilistData.synonyms, + anicrush: bestMatch.name, + anicrush_english: bestMatch.name_english + }, + type: bestMatch.type, + total_episodes: episodes.length, + episodes: episodes, + format: anilistData.format, + status: anilistData.status, + mal_score: bestMatch.mal_score, + genres: bestMatch.genres, + country_of_origin: anilistData.countryOfOrigin, + year: anilistData.seasonYear, + description: anilistData.description + }; + + } catch (error) { + console.error('Mapper error:', error.message); + throw error; + } +} + +module.exports = { + mapAniListToAnicrush, + getCommonHeaders +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..69579f5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1354 @@ +{ + "name": "anime-api", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "anime-api", + "version": "1.0.0", + "dependencies": { + "axios": "^1.6.2", + "cors": "^2.8.5", + "dotenv": "^16.3.1", + "express": "^4.18.2" + }, + "devDependencies": { + "nodemon": "^3.0.2" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemon": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", + "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..da5618c --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "anime-api", + "version": "1.0.0", + "description": "API for fetching anime sources", + "main": "index.js", + "engines": { + "node": "18.x" + }, + "scripts": { + "start": "node index.js", + "dev": "nodemon index.js", + "vercel-build": "echo hello" + }, + "dependencies": { + "express": "^4.18.2", + "axios": "^1.6.2", + "dotenv": "^16.3.1", + "cors": "^2.8.5" + }, + "devDependencies": { + "nodemon": "^3.0.2" + } +} \ No newline at end of file diff --git a/sources/rabbit.js b/sources/rabbit.js new file mode 100644 index 0000000..0ed9513 --- /dev/null +++ b/sources/rabbit.js @@ -0,0 +1,58292 @@ +"use strict"; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; + +// node_modules/is-plain-obj/index.js +var require_is_plain_obj = __commonJS({ + "node_modules/is-plain-obj/index.js"(exports2, module2) { + "use strict"; + var toString = Object.prototype.toString; + module2.exports = function(x) { + var prototype; + return toString.call(x) === "[object Object]" && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); + }; + } +}); + +// node_modules/is-base64/is-base64.js +var require_is_base64 = __commonJS({ + "node_modules/is-base64/is-base64.js"(exports2, module2) { + (function(root) { + "use strict"; + function isBase64(v, opts) { + if (v instanceof Boolean || typeof v === "boolean") { + return false; + } + if (!(opts instanceof Object)) { + opts = {}; + } + if (opts.hasOwnProperty("allowBlank") && !opts.allowBlank && v === "") { + return false; + } + var regex = "(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+/]{3}=)?"; + if (opts.mime) { + regex = "(data:\\w+\\/[a-zA-Z\\+\\-\\.]+;base64,)?" + regex; + } + if (opts.paddingRequired === false) { + regex = "(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}(==)?|[A-Za-z0-9+\\/]{3}=?)?"; + } + return new RegExp("^" + regex + "$", "gi").test(v); + } + if (typeof exports2 !== "undefined") { + if (typeof module2 !== "undefined" && module2.exports) { + exports2 = module2.exports = isBase64; + } + exports2.isBase64 = isBase64; + } else if (typeof define === "function" && define.amd) { + define([], function() { + return isBase64; + }); + } else { + root.isBase64 = isBase64; + } + })(exports2); + } +}); + +// node_modules/pick-by-alias/index.js +var require_pick_by_alias = __commonJS({ + "node_modules/pick-by-alias/index.js"(exports2, module2) { + "use strict"; + module2.exports = function pick(src, props, keepRest) { + var result = {}, prop, i2; + if (typeof props === "string") props = toList(props); + if (Array.isArray(props)) { + var res = {}; + for (i2 = 0; i2 < props.length; i2++) { + res[props[i2]] = true; + } + props = res; + } + for (prop in props) { + props[prop] = toList(props[prop]); + } + var occupied = {}; + for (prop in props) { + var aliases = props[prop]; + if (Array.isArray(aliases)) { + for (i2 = 0; i2 < aliases.length; i2++) { + var alias = aliases[i2]; + if (keepRest) { + occupied[alias] = true; + } + if (alias in src) { + result[prop] = src[alias]; + if (keepRest) { + for (var j = i2; j < aliases.length; j++) { + occupied[aliases[j]] = true; + } + } + break; + } + } + } else if (prop in src) { + if (props[prop]) { + result[prop] = src[prop]; + } + if (keepRest) { + occupied[prop] = true; + } + } + } + if (keepRest) { + for (prop in src) { + if (occupied[prop]) continue; + result[prop] = src[prop]; + } + } + return result; + }; + var CACHE = {}; + function toList(arg) { + if (CACHE[arg]) return CACHE[arg]; + if (typeof arg === "string") { + arg = CACHE[arg] = arg.split(/\s*,\s*|\s+/); + } + return arg; + } + } +}); + +// node_modules/parse-rect/index.js +var require_parse_rect = __commonJS({ + "node_modules/parse-rect/index.js"(exports2, module2) { + "use strict"; + var pick = require_pick_by_alias(); + module2.exports = parseRect; + function parseRect(arg) { + var rect; + if (arguments.length > 1) { + arg = arguments; + } + if (typeof arg === "string") { + arg = arg.split(/\s/).map(parseFloat); + } else if (typeof arg === "number") { + arg = [arg]; + } + if (arg.length && typeof arg[0] === "number") { + if (arg.length === 1) { + rect = { + width: arg[0], + height: arg[0], + x: 0, + y: 0 + }; + } else if (arg.length === 2) { + rect = { + width: arg[0], + height: arg[1], + x: 0, + y: 0 + }; + } else { + rect = { + x: arg[0], + y: arg[1], + width: arg[2] - arg[0] || 0, + height: arg[3] - arg[1] || 0 + }; + } + } else if (arg) { + arg = pick(arg, { + left: "x l left Left", + top: "y t top Top", + width: "w width W Width", + height: "h height W Width", + bottom: "b bottom Bottom", + right: "r right Right" + }); + rect = { + x: arg.left || 0, + y: arg.top || 0 + }; + if (arg.width == null) { + if (arg.right) rect.width = arg.right - rect.x; + else rect.width = 0; + } else { + rect.width = arg.width; + } + if (arg.height == null) { + if (arg.bottom) rect.height = arg.bottom - rect.y; + else rect.height = 0; + } else { + rect.height = arg.height; + } + } + return rect; + } + } +}); + +// node_modules/object-assign/index.js +var require_object_assign = __commonJS({ + "node_modules/object-assign/index.js"(exports2, module2) { + "use strict"; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === void 0) { + throw new TypeError("Object.assign cannot be called with null or undefined"); + } + return Object(val); + } + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + var test1 = new String("abc"); + test1[5] = "de"; + if (Object.getOwnPropertyNames(test1)[0] === "5") { + return false; + } + var test2 = {}; + for (var i2 = 0; i2 < 10; i2++) { + test2["_" + String.fromCharCode(i2)] = i2; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if (order2.join("") !== "0123456789") { + return false; + } + var test3 = {}; + "abcdefghijklmnopqrst".split("").forEach(function(letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") { + return false; + } + return true; + } catch (err) { + return false; + } + } + module2.exports = shouldUseNative() ? Object.assign : function(target, source) { + var from; + var to = toObject(target); + var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i2 = 0; i2 < symbols.length; i2++) { + if (propIsEnumerable.call(from, symbols[i2])) { + to[symbols[i2]] = from[symbols[i2]]; + } + } + } + } + return to; + }; + } +}); + +// node_modules/is-blob/index.js +var require_is_blob = __commonJS({ + "node_modules/is-blob/index.js"(exports2, module2) { + "use strict"; + module2.exports = (value) => { + if (typeof Blob === "undefined") { + return false; + } + return value instanceof Blob || Object.prototype.toString.call(value) === "[object Blob]"; + }; + } +}); + +// node_modules/clip-pixels/index.js +var require_clip_pixels = __commonJS({ + "node_modules/clip-pixels/index.js"(exports2, module2) { + "use strict"; + module2.exports = function clip(pixels2, shape, rect) { + var stride = shape[2] || 4; + var row = shape[0], col = shape[1] || Math.floor(pixels2.length / stride / row); + var x = rect[0], y = rect[1] || 0, w = rect[2] || row - x, h = rect[3] || col - y; + var result = Array(w * stride * h); + var off = y * row * stride + x * stride; + for (var j = 0; j < h; j++) { + for (var i2 = 0; i2 < w; i2++) { + for (var k = 0; k < stride; k++) { + result[j * w * stride + i2 * stride + k] = pixels2[off + j * row * stride + i2 * stride + k]; + } + } + } + return result; + }; + } +}); + +// node_modules/is-browser/server.js +var require_server = __commonJS({ + "node_modules/is-browser/server.js"(exports2, module2) { + module2.exports = false; + } +}); + +// node_modules/extend/index.js +var require_extend = __commonJS({ + "node_modules/extend/index.js"(exports2, module2) { + "use strict"; + var hasOwn = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var defineProperty = Object.defineProperty; + var gOPD = Object.getOwnPropertyDescriptor; + var isArray = function isArray2(arr2) { + if (typeof Array.isArray === "function") { + return Array.isArray(arr2); + } + return toStr.call(arr2) === "[object Array]"; + }; + var isPlainObject = function isPlainObject2(obj) { + if (!obj || toStr.call(obj) !== "[object Object]") { + return false; + } + var hasOwnConstructor = hasOwn.call(obj, "constructor"); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf"); + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + var key; + for (key in obj) { + } + return typeof key === "undefined" || hasOwn.call(obj, key); + }; + var setProperty = function setProperty2(target, options) { + if (defineProperty && options.name === "__proto__") { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } + }; + var getProperty = function getProperty2(obj, name) { + if (name === "__proto__") { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + return gOPD(obj, name).value; + } + } + return obj[name]; + }; + module2.exports = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i2 = 1; + var length = arguments.length; + var deep = false; + if (typeof target === "boolean") { + deep = target; + target = arguments[1] || {}; + i2 = 2; + } + if (target == null || typeof target !== "object" && typeof target !== "function") { + target = {}; + } + for (; i2 < length; ++i2) { + options = arguments[i2]; + if (options != null) { + for (name in options) { + src = getProperty(target, name); + copy = getProperty(options, name); + if (target !== copy) { + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + setProperty(target, { name, newValue: extend(deep, clone, copy) }); + } else if (typeof copy !== "undefined") { + setProperty(target, { name, newValue: copy }); + } + } + } + } + } + return target; + }; + } +}); + +// node_modules/psl/dist/psl.cjs +var require_psl = __commonJS({ + "node_modules/psl/dist/psl.cjs"(exports2) { + "use strict"; + Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); + function K(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; + } + var O; + var F; + function Q() { + if (F) return O; + F = 1; + const e = 2147483647, s = 36, c = 1, o = 26, t = 38, d = 700, z2 = 72, y = 128, g = "-", P = /^xn--/, V2 = /[^\0-\x7F]/, G = /[\x2E\u3002\uFF0E\uFF61]/g, W = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, C = s - c, h = Math.floor, I = String.fromCharCode; + function v(a) { + throw new RangeError(W[a]); + } + function U(a, i2) { + const m = []; + let n = a.length; + for (; n--; ) m[n] = i2(a[n]); + return m; + } + function S(a, i2) { + const m = a.split("@"); + let n = ""; + m.length > 1 && (n = m[0] + "@", a = m[1]), a = a.replace(G, "."); + const r = a.split("."), p = U(r, i2).join("."); + return n + p; + } + function L(a) { + const i2 = []; + let m = 0; + const n = a.length; + for (; m < n; ) { + const r = a.charCodeAt(m++); + if (r >= 55296 && r <= 56319 && m < n) { + const p = a.charCodeAt(m++); + (p & 64512) == 56320 ? i2.push(((r & 1023) << 10) + (p & 1023) + 65536) : (i2.push(r), m--); + } else i2.push(r); + } + return i2; + } + const $ = (a) => String.fromCodePoint(...a), J = function(a) { + return a >= 48 && a < 58 ? 26 + (a - 48) : a >= 65 && a < 91 ? a - 65 : a >= 97 && a < 123 ? a - 97 : s; + }, D = function(a, i2) { + return a + 22 + 75 * (a < 26) - ((i2 != 0) << 5); + }, T = function(a, i2, m) { + let n = 0; + for (a = m ? h(a / d) : a >> 1, a += h(a / i2); a > C * o >> 1; n += s) a = h(a / C); + return h(n + (C + 1) * a / (a + t)); + }, E = function(a) { + const i2 = [], m = a.length; + let n = 0, r = y, p = z2, j = a.lastIndexOf(g); + j < 0 && (j = 0); + for (let u = 0; u < j; ++u) a.charCodeAt(u) >= 128 && v("not-basic"), i2.push(a.charCodeAt(u)); + for (let u = j > 0 ? j + 1 : 0; u < m; ) { + const k = n; + for (let l = 1, b = s; ; b += s) { + u >= m && v("invalid-input"); + const w = J(a.charCodeAt(u++)); + w >= s && v("invalid-input"), w > h((e - n) / l) && v("overflow"), n += w * l; + const x = b <= p ? c : b >= p + o ? o : b - p; + if (w < x) break; + const q2 = s - x; + l > h(e / q2) && v("overflow"), l *= q2; + } + const f = i2.length + 1; + p = T(n - k, f, k == 0), h(n / f) > e - r && v("overflow"), r += h(n / f), n %= f, i2.splice(n++, 0, r); + } + return String.fromCodePoint(...i2); + }, B = function(a) { + const i2 = []; + a = L(a); + const m = a.length; + let n = y, r = 0, p = z2; + for (const k of a) k < 128 && i2.push(I(k)); + const j = i2.length; + let u = j; + for (j && i2.push(g); u < m; ) { + let k = e; + for (const l of a) l >= n && l < k && (k = l); + const f = u + 1; + k - n > h((e - r) / f) && v("overflow"), r += (k - n) * f, n = k; + for (const l of a) if (l < n && ++r > e && v("overflow"), l === n) { + let b = r; + for (let w = s; ; w += s) { + const x = w <= p ? c : w >= p + o ? o : w - p; + if (b < x) break; + const q2 = b - x, M2 = s - x; + i2.push(I(D(x + q2 % M2, 0))), b = h(q2 / M2); + } + i2.push(I(D(b, 0))), p = T(r, f, u === j), r = 0, ++u; + } + ++r, ++n; + } + return i2.join(""); + }; + return O = { version: "2.3.1", ucs2: { decode: L, encode: $ }, decode: E, encode: B, toASCII: function(a) { + return S(a, function(i2) { + return V2.test(i2) ? "xn--" + B(i2) : i2; + }); + }, toUnicode: function(a) { + return S(a, function(i2) { + return P.test(i2) ? E(i2.slice(4).toLowerCase()) : i2; + }); + } }, O; + } + var X = Q(); + var A = K(X); + var Y = ["ac", "com.ac", "edu.ac", "gov.ac", "mil.ac", "net.ac", "org.ac", "ad", "ae", "ac.ae", "co.ae", "gov.ae", "mil.ae", "net.ae", "org.ae", "sch.ae", "aero", "airline.aero", "airport.aero", "accident-investigation.aero", "accident-prevention.aero", "aerobatic.aero", "aeroclub.aero", "aerodrome.aero", "agents.aero", "air-surveillance.aero", "air-traffic-control.aero", "aircraft.aero", "airtraffic.aero", "ambulance.aero", "association.aero", "author.aero", "ballooning.aero", "broker.aero", "caa.aero", "cargo.aero", "catering.aero", "certification.aero", "championship.aero", "charter.aero", "civilaviation.aero", "club.aero", "conference.aero", "consultant.aero", "consulting.aero", "control.aero", "council.aero", "crew.aero", "design.aero", "dgca.aero", "educator.aero", "emergency.aero", "engine.aero", "engineer.aero", "entertainment.aero", "equipment.aero", "exchange.aero", "express.aero", "federation.aero", "flight.aero", "freight.aero", "fuel.aero", "gliding.aero", "government.aero", "groundhandling.aero", "group.aero", "hanggliding.aero", "homebuilt.aero", "insurance.aero", "journal.aero", "journalist.aero", "leasing.aero", "logistics.aero", "magazine.aero", "maintenance.aero", "marketplace.aero", "media.aero", "microlight.aero", "modelling.aero", "navigation.aero", "parachuting.aero", "paragliding.aero", "passenger-association.aero", "pilot.aero", "press.aero", "production.aero", "recreation.aero", "repbody.aero", "res.aero", "research.aero", "rotorcraft.aero", "safety.aero", "scientist.aero", "services.aero", "show.aero", "skydiving.aero", "software.aero", "student.aero", "taxi.aero", "trader.aero", "trading.aero", "trainer.aero", "union.aero", "workinggroup.aero", "works.aero", "af", "com.af", "edu.af", "gov.af", "net.af", "org.af", "ag", "co.ag", "com.ag", "net.ag", "nom.ag", "org.ag", "ai", "com.ai", "net.ai", "off.ai", "org.ai", "al", "com.al", "edu.al", "gov.al", "mil.al", "net.al", "org.al", "am", "co.am", "com.am", "commune.am", "net.am", "org.am", "ao", "co.ao", "ed.ao", "edu.ao", "gov.ao", "gv.ao", "it.ao", "og.ao", "org.ao", "pb.ao", "aq", "ar", "bet.ar", "com.ar", "coop.ar", "edu.ar", "gob.ar", "gov.ar", "int.ar", "mil.ar", "musica.ar", "mutual.ar", "net.ar", "org.ar", "senasa.ar", "tur.ar", "arpa", "e164.arpa", "home.arpa", "in-addr.arpa", "ip6.arpa", "iris.arpa", "uri.arpa", "urn.arpa", "as", "gov.as", "asia", "at", "ac.at", "sth.ac.at", "co.at", "gv.at", "or.at", "au", "asn.au", "com.au", "edu.au", "gov.au", "id.au", "net.au", "org.au", "conf.au", "oz.au", "act.au", "nsw.au", "nt.au", "qld.au", "sa.au", "tas.au", "vic.au", "wa.au", "act.edu.au", "catholic.edu.au", "nsw.edu.au", "nt.edu.au", "qld.edu.au", "sa.edu.au", "tas.edu.au", "vic.edu.au", "wa.edu.au", "qld.gov.au", "sa.gov.au", "tas.gov.au", "vic.gov.au", "wa.gov.au", "schools.nsw.edu.au", "aw", "com.aw", "ax", "az", "biz.az", "com.az", "edu.az", "gov.az", "info.az", "int.az", "mil.az", "name.az", "net.az", "org.az", "pp.az", "pro.az", "ba", "com.ba", "edu.ba", "gov.ba", "mil.ba", "net.ba", "org.ba", "bb", "biz.bb", "co.bb", "com.bb", "edu.bb", "gov.bb", "info.bb", "net.bb", "org.bb", "store.bb", "tv.bb", "*.bd", "be", "ac.be", "bf", "gov.bf", "bg", "0.bg", "1.bg", "2.bg", "3.bg", "4.bg", "5.bg", "6.bg", "7.bg", "8.bg", "9.bg", "a.bg", "b.bg", "c.bg", "d.bg", "e.bg", "f.bg", "g.bg", "h.bg", "i.bg", "j.bg", "k.bg", "l.bg", "m.bg", "n.bg", "o.bg", "p.bg", "q.bg", "r.bg", "s.bg", "t.bg", "u.bg", "v.bg", "w.bg", "x.bg", "y.bg", "z.bg", "bh", "com.bh", "edu.bh", "gov.bh", "net.bh", "org.bh", "bi", "co.bi", "com.bi", "edu.bi", "or.bi", "org.bi", "biz", "bj", "africa.bj", "agro.bj", "architectes.bj", "assur.bj", "avocats.bj", "co.bj", "com.bj", "eco.bj", "econo.bj", "edu.bj", "info.bj", "loisirs.bj", "money.bj", "net.bj", "org.bj", "ote.bj", "restaurant.bj", "resto.bj", "tourism.bj", "univ.bj", "bm", "com.bm", "edu.bm", "gov.bm", "net.bm", "org.bm", "bn", "com.bn", "edu.bn", "gov.bn", "net.bn", "org.bn", "bo", "com.bo", "edu.bo", "gob.bo", "int.bo", "mil.bo", "net.bo", "org.bo", "tv.bo", "web.bo", "academia.bo", "agro.bo", "arte.bo", "blog.bo", "bolivia.bo", "ciencia.bo", "cooperativa.bo", "democracia.bo", "deporte.bo", "ecologia.bo", "economia.bo", "empresa.bo", "indigena.bo", "industria.bo", "info.bo", "medicina.bo", "movimiento.bo", "musica.bo", "natural.bo", "nombre.bo", "noticias.bo", "patria.bo", "plurinacional.bo", "politica.bo", "profesional.bo", "pueblo.bo", "revista.bo", "salud.bo", "tecnologia.bo", "tksat.bo", "transporte.bo", "wiki.bo", "br", "9guacu.br", "abc.br", "adm.br", "adv.br", "agr.br", "aju.br", "am.br", "anani.br", "aparecida.br", "app.br", "arq.br", "art.br", "ato.br", "b.br", "barueri.br", "belem.br", "bet.br", "bhz.br", "bib.br", "bio.br", "blog.br", "bmd.br", "boavista.br", "bsb.br", "campinagrande.br", "campinas.br", "caxias.br", "cim.br", "cng.br", "cnt.br", "com.br", "contagem.br", "coop.br", "coz.br", "cri.br", "cuiaba.br", "curitiba.br", "def.br", "des.br", "det.br", "dev.br", "ecn.br", "eco.br", "edu.br", "emp.br", "enf.br", "eng.br", "esp.br", "etc.br", "eti.br", "far.br", "feira.br", "flog.br", "floripa.br", "fm.br", "fnd.br", "fortal.br", "fot.br", "foz.br", "fst.br", "g12.br", "geo.br", "ggf.br", "goiania.br", "gov.br", "ac.gov.br", "al.gov.br", "am.gov.br", "ap.gov.br", "ba.gov.br", "ce.gov.br", "df.gov.br", "es.gov.br", "go.gov.br", "ma.gov.br", "mg.gov.br", "ms.gov.br", "mt.gov.br", "pa.gov.br", "pb.gov.br", "pe.gov.br", "pi.gov.br", "pr.gov.br", "rj.gov.br", "rn.gov.br", "ro.gov.br", "rr.gov.br", "rs.gov.br", "sc.gov.br", "se.gov.br", "sp.gov.br", "to.gov.br", "gru.br", "imb.br", "ind.br", "inf.br", "jab.br", "jampa.br", "jdf.br", "joinville.br", "jor.br", "jus.br", "leg.br", "leilao.br", "lel.br", "log.br", "londrina.br", "macapa.br", "maceio.br", "manaus.br", "maringa.br", "mat.br", "med.br", "mil.br", "morena.br", "mp.br", "mus.br", "natal.br", "net.br", "niteroi.br", "*.nom.br", "not.br", "ntr.br", "odo.br", "ong.br", "org.br", "osasco.br", "palmas.br", "poa.br", "ppg.br", "pro.br", "psc.br", "psi.br", "pvh.br", "qsl.br", "radio.br", "rec.br", "recife.br", "rep.br", "ribeirao.br", "rio.br", "riobranco.br", "riopreto.br", "salvador.br", "sampa.br", "santamaria.br", "santoandre.br", "saobernardo.br", "saogonca.br", "seg.br", "sjc.br", "slg.br", "slz.br", "sorocaba.br", "srv.br", "taxi.br", "tc.br", "tec.br", "teo.br", "the.br", "tmp.br", "trd.br", "tur.br", "tv.br", "udi.br", "vet.br", "vix.br", "vlog.br", "wiki.br", "zlg.br", "bs", "com.bs", "edu.bs", "gov.bs", "net.bs", "org.bs", "bt", "com.bt", "edu.bt", "gov.bt", "net.bt", "org.bt", "bv", "bw", "co.bw", "org.bw", "by", "gov.by", "mil.by", "com.by", "of.by", "bz", "co.bz", "com.bz", "edu.bz", "gov.bz", "net.bz", "org.bz", "ca", "ab.ca", "bc.ca", "mb.ca", "nb.ca", "nf.ca", "nl.ca", "ns.ca", "nt.ca", "nu.ca", "on.ca", "pe.ca", "qc.ca", "sk.ca", "yk.ca", "gc.ca", "cat", "cc", "cd", "gov.cd", "cf", "cg", "ch", "ci", "ac.ci", "a\xE9roport.ci", "asso.ci", "co.ci", "com.ci", "ed.ci", "edu.ci", "go.ci", "gouv.ci", "int.ci", "net.ci", "or.ci", "org.ci", "*.ck", "!www.ck", "cl", "co.cl", "gob.cl", "gov.cl", "mil.cl", "cm", "co.cm", "com.cm", "gov.cm", "net.cm", "cn", "ac.cn", "com.cn", "edu.cn", "gov.cn", "mil.cn", "net.cn", "org.cn", "\u516C\u53F8.cn", "\u7DB2\u7D61.cn", "\u7F51\u7EDC.cn", "ah.cn", "bj.cn", "cq.cn", "fj.cn", "gd.cn", "gs.cn", "gx.cn", "gz.cn", "ha.cn", "hb.cn", "he.cn", "hi.cn", "hk.cn", "hl.cn", "hn.cn", "jl.cn", "js.cn", "jx.cn", "ln.cn", "mo.cn", "nm.cn", "nx.cn", "qh.cn", "sc.cn", "sd.cn", "sh.cn", "sn.cn", "sx.cn", "tj.cn", "tw.cn", "xj.cn", "xz.cn", "yn.cn", "zj.cn", "co", "com.co", "edu.co", "gov.co", "mil.co", "net.co", "nom.co", "org.co", "com", "coop", "cr", "ac.cr", "co.cr", "ed.cr", "fi.cr", "go.cr", "or.cr", "sa.cr", "cu", "com.cu", "edu.cu", "gob.cu", "inf.cu", "nat.cu", "net.cu", "org.cu", "cv", "com.cv", "edu.cv", "id.cv", "int.cv", "net.cv", "nome.cv", "org.cv", "publ.cv", "cw", "com.cw", "edu.cw", "net.cw", "org.cw", "cx", "gov.cx", "cy", "ac.cy", "biz.cy", "com.cy", "ekloges.cy", "gov.cy", "ltd.cy", "mil.cy", "net.cy", "org.cy", "press.cy", "pro.cy", "tm.cy", "cz", "de", "dj", "dk", "dm", "co.dm", "com.dm", "edu.dm", "gov.dm", "net.dm", "org.dm", "do", "art.do", "com.do", "edu.do", "gob.do", "gov.do", "mil.do", "net.do", "org.do", "sld.do", "web.do", "dz", "art.dz", "asso.dz", "com.dz", "edu.dz", "gov.dz", "net.dz", "org.dz", "pol.dz", "soc.dz", "tm.dz", "ec", "com.ec", "edu.ec", "fin.ec", "gob.ec", "gov.ec", "info.ec", "k12.ec", "med.ec", "mil.ec", "net.ec", "org.ec", "pro.ec", "edu", "ee", "aip.ee", "com.ee", "edu.ee", "fie.ee", "gov.ee", "lib.ee", "med.ee", "org.ee", "pri.ee", "riik.ee", "eg", "ac.eg", "com.eg", "edu.eg", "eun.eg", "gov.eg", "info.eg", "me.eg", "mil.eg", "name.eg", "net.eg", "org.eg", "sci.eg", "sport.eg", "tv.eg", "*.er", "es", "com.es", "edu.es", "gob.es", "nom.es", "org.es", "et", "biz.et", "com.et", "edu.et", "gov.et", "info.et", "name.et", "net.et", "org.et", "eu", "fi", "aland.fi", "fj", "ac.fj", "biz.fj", "com.fj", "gov.fj", "info.fj", "mil.fj", "name.fj", "net.fj", "org.fj", "pro.fj", "*.fk", "fm", "com.fm", "edu.fm", "net.fm", "org.fm", "fo", "fr", "asso.fr", "com.fr", "gouv.fr", "nom.fr", "prd.fr", "tm.fr", "avoues.fr", "cci.fr", "greta.fr", "huissier-justice.fr", "ga", "gb", "gd", "edu.gd", "gov.gd", "ge", "com.ge", "edu.ge", "gov.ge", "net.ge", "org.ge", "pvt.ge", "school.ge", "gf", "gg", "co.gg", "net.gg", "org.gg", "gh", "com.gh", "edu.gh", "gov.gh", "mil.gh", "org.gh", "gi", "com.gi", "edu.gi", "gov.gi", "ltd.gi", "mod.gi", "org.gi", "gl", "co.gl", "com.gl", "edu.gl", "net.gl", "org.gl", "gm", "gn", "ac.gn", "com.gn", "edu.gn", "gov.gn", "net.gn", "org.gn", "gov", "gp", "asso.gp", "com.gp", "edu.gp", "mobi.gp", "net.gp", "org.gp", "gq", "gr", "com.gr", "edu.gr", "gov.gr", "net.gr", "org.gr", "gs", "gt", "com.gt", "edu.gt", "gob.gt", "ind.gt", "mil.gt", "net.gt", "org.gt", "gu", "com.gu", "edu.gu", "gov.gu", "guam.gu", "info.gu", "net.gu", "org.gu", "web.gu", "gw", "gy", "co.gy", "com.gy", "edu.gy", "gov.gy", "net.gy", "org.gy", "hk", "com.hk", "edu.hk", "gov.hk", "idv.hk", "net.hk", "org.hk", "\u4E2A\u4EBA.hk", "\u500B\u4EBA.hk", "\u516C\u53F8.hk", "\u653F\u5E9C.hk", "\u654E\u80B2.hk", "\u6559\u80B2.hk", "\u7B87\u4EBA.hk", "\u7D44\u7E54.hk", "\u7D44\u7EC7.hk", "\u7DB2\u7D61.hk", "\u7DB2\u7EDC.hk", "\u7EC4\u7E54.hk", "\u7EC4\u7EC7.hk", "\u7F51\u7D61.hk", "\u7F51\u7EDC.hk", "hm", "hn", "com.hn", "edu.hn", "gob.hn", "mil.hn", "net.hn", "org.hn", "hr", "com.hr", "from.hr", "iz.hr", "name.hr", "ht", "adult.ht", "art.ht", "asso.ht", "com.ht", "coop.ht", "edu.ht", "firm.ht", "gouv.ht", "info.ht", "med.ht", "net.ht", "org.ht", "perso.ht", "pol.ht", "pro.ht", "rel.ht", "shop.ht", "hu", "2000.hu", "agrar.hu", "bolt.hu", "casino.hu", "city.hu", "co.hu", "erotica.hu", "erotika.hu", "film.hu", "forum.hu", "games.hu", "hotel.hu", "info.hu", "ingatlan.hu", "jogasz.hu", "konyvelo.hu", "lakas.hu", "media.hu", "news.hu", "org.hu", "priv.hu", "reklam.hu", "sex.hu", "shop.hu", "sport.hu", "suli.hu", "szex.hu", "tm.hu", "tozsde.hu", "utazas.hu", "video.hu", "id", "ac.id", "biz.id", "co.id", "desa.id", "go.id", "mil.id", "my.id", "net.id", "or.id", "ponpes.id", "sch.id", "web.id", "ie", "gov.ie", "il", "ac.il", "co.il", "gov.il", "idf.il", "k12.il", "muni.il", "net.il", "org.il", "\u05D9\u05E9\u05E8\u05D0\u05DC", "\u05D0\u05E7\u05D3\u05DE\u05D9\u05D4.\u05D9\u05E9\u05E8\u05D0\u05DC", "\u05D9\u05E9\u05D5\u05D1.\u05D9\u05E9\u05E8\u05D0\u05DC", "\u05E6\u05D4\u05DC.\u05D9\u05E9\u05E8\u05D0\u05DC", "\u05DE\u05DE\u05E9\u05DC.\u05D9\u05E9\u05E8\u05D0\u05DC", "im", "ac.im", "co.im", "ltd.co.im", "plc.co.im", "com.im", "net.im", "org.im", "tt.im", "tv.im", "in", "5g.in", "6g.in", "ac.in", "ai.in", "am.in", "bihar.in", "biz.in", "business.in", "ca.in", "cn.in", "co.in", "com.in", "coop.in", "cs.in", "delhi.in", "dr.in", "edu.in", "er.in", "firm.in", "gen.in", "gov.in", "gujarat.in", "ind.in", "info.in", "int.in", "internet.in", "io.in", "me.in", "mil.in", "net.in", "nic.in", "org.in", "pg.in", "post.in", "pro.in", "res.in", "travel.in", "tv.in", "uk.in", "up.in", "us.in", "info", "int", "eu.int", "io", "co.io", "com.io", "edu.io", "gov.io", "mil.io", "net.io", "nom.io", "org.io", "iq", "com.iq", "edu.iq", "gov.iq", "mil.iq", "net.iq", "org.iq", "ir", "ac.ir", "co.ir", "gov.ir", "id.ir", "net.ir", "org.ir", "sch.ir", "\u0627\u06CC\u0631\u0627\u0646.ir", "\u0627\u064A\u0631\u0627\u0646.ir", "is", "it", "edu.it", "gov.it", "abr.it", "abruzzo.it", "aosta-valley.it", "aostavalley.it", "bas.it", "basilicata.it", "cal.it", "calabria.it", "cam.it", "campania.it", "emilia-romagna.it", "emiliaromagna.it", "emr.it", "friuli-v-giulia.it", "friuli-ve-giulia.it", "friuli-vegiulia.it", "friuli-venezia-giulia.it", "friuli-veneziagiulia.it", "friuli-vgiulia.it", "friuliv-giulia.it", "friulive-giulia.it", "friulivegiulia.it", "friulivenezia-giulia.it", "friuliveneziagiulia.it", "friulivgiulia.it", "fvg.it", "laz.it", "lazio.it", "lig.it", "liguria.it", "lom.it", "lombardia.it", "lombardy.it", "lucania.it", "mar.it", "marche.it", "mol.it", "molise.it", "piedmont.it", "piemonte.it", "pmn.it", "pug.it", "puglia.it", "sar.it", "sardegna.it", "sardinia.it", "sic.it", "sicilia.it", "sicily.it", "taa.it", "tos.it", "toscana.it", "trentin-sud-tirol.it", "trentin-s\xFCd-tirol.it", "trentin-sudtirol.it", "trentin-s\xFCdtirol.it", "trentin-sued-tirol.it", "trentin-suedtirol.it", "trentino.it", "trentino-a-adige.it", "trentino-aadige.it", "trentino-alto-adige.it", "trentino-altoadige.it", "trentino-s-tirol.it", "trentino-stirol.it", "trentino-sud-tirol.it", "trentino-s\xFCd-tirol.it", "trentino-sudtirol.it", "trentino-s\xFCdtirol.it", "trentino-sued-tirol.it", "trentino-suedtirol.it", "trentinoa-adige.it", "trentinoaadige.it", "trentinoalto-adige.it", "trentinoaltoadige.it", "trentinos-tirol.it", "trentinostirol.it", "trentinosud-tirol.it", "trentinos\xFCd-tirol.it", "trentinosudtirol.it", "trentinos\xFCdtirol.it", "trentinosued-tirol.it", "trentinosuedtirol.it", "trentinsud-tirol.it", "trentins\xFCd-tirol.it", "trentinsudtirol.it", "trentins\xFCdtirol.it", "trentinsued-tirol.it", "trentinsuedtirol.it", "tuscany.it", "umb.it", "umbria.it", "val-d-aosta.it", "val-daosta.it", "vald-aosta.it", "valdaosta.it", "valle-aosta.it", "valle-d-aosta.it", "valle-daosta.it", "valleaosta.it", "valled-aosta.it", "valledaosta.it", "vallee-aoste.it", "vall\xE9e-aoste.it", "vallee-d-aoste.it", "vall\xE9e-d-aoste.it", "valleeaoste.it", "vall\xE9eaoste.it", "valleedaoste.it", "vall\xE9edaoste.it", "vao.it", "vda.it", "ven.it", "veneto.it", "ag.it", "agrigento.it", "al.it", "alessandria.it", "alto-adige.it", "altoadige.it", "an.it", "ancona.it", "andria-barletta-trani.it", "andria-trani-barletta.it", "andriabarlettatrani.it", "andriatranibarletta.it", "ao.it", "aosta.it", "aoste.it", "ap.it", "aq.it", "aquila.it", "ar.it", "arezzo.it", "ascoli-piceno.it", "ascolipiceno.it", "asti.it", "at.it", "av.it", "avellino.it", "ba.it", "balsan.it", "balsan-sudtirol.it", "balsan-s\xFCdtirol.it", "balsan-suedtirol.it", "bari.it", "barletta-trani-andria.it", "barlettatraniandria.it", "belluno.it", "benevento.it", "bergamo.it", "bg.it", "bi.it", "biella.it", "bl.it", "bn.it", "bo.it", "bologna.it", "bolzano.it", "bolzano-altoadige.it", "bozen.it", "bozen-sudtirol.it", "bozen-s\xFCdtirol.it", "bozen-suedtirol.it", "br.it", "brescia.it", "brindisi.it", "bs.it", "bt.it", "bulsan.it", "bulsan-sudtirol.it", "bulsan-s\xFCdtirol.it", "bulsan-suedtirol.it", "bz.it", "ca.it", "cagliari.it", "caltanissetta.it", "campidano-medio.it", "campidanomedio.it", "campobasso.it", "carbonia-iglesias.it", "carboniaiglesias.it", "carrara-massa.it", "carraramassa.it", "caserta.it", "catania.it", "catanzaro.it", "cb.it", "ce.it", "cesena-forli.it", "cesena-forl\xEC.it", "cesenaforli.it", "cesenaforl\xEC.it", "ch.it", "chieti.it", "ci.it", "cl.it", "cn.it", "co.it", "como.it", "cosenza.it", "cr.it", "cremona.it", "crotone.it", "cs.it", "ct.it", "cuneo.it", "cz.it", "dell-ogliastra.it", "dellogliastra.it", "en.it", "enna.it", "fc.it", "fe.it", "fermo.it", "ferrara.it", "fg.it", "fi.it", "firenze.it", "florence.it", "fm.it", "foggia.it", "forli-cesena.it", "forl\xEC-cesena.it", "forlicesena.it", "forl\xECcesena.it", "fr.it", "frosinone.it", "ge.it", "genoa.it", "genova.it", "go.it", "gorizia.it", "gr.it", "grosseto.it", "iglesias-carbonia.it", "iglesiascarbonia.it", "im.it", "imperia.it", "is.it", "isernia.it", "kr.it", "la-spezia.it", "laquila.it", "laspezia.it", "latina.it", "lc.it", "le.it", "lecce.it", "lecco.it", "li.it", "livorno.it", "lo.it", "lodi.it", "lt.it", "lu.it", "lucca.it", "macerata.it", "mantova.it", "massa-carrara.it", "massacarrara.it", "matera.it", "mb.it", "mc.it", "me.it", "medio-campidano.it", "mediocampidano.it", "messina.it", "mi.it", "milan.it", "milano.it", "mn.it", "mo.it", "modena.it", "monza.it", "monza-brianza.it", "monza-e-della-brianza.it", "monzabrianza.it", "monzaebrianza.it", "monzaedellabrianza.it", "ms.it", "mt.it", "na.it", "naples.it", "napoli.it", "no.it", "novara.it", "nu.it", "nuoro.it", "og.it", "ogliastra.it", "olbia-tempio.it", "olbiatempio.it", "or.it", "oristano.it", "ot.it", "pa.it", "padova.it", "padua.it", "palermo.it", "parma.it", "pavia.it", "pc.it", "pd.it", "pe.it", "perugia.it", "pesaro-urbino.it", "pesarourbino.it", "pescara.it", "pg.it", "pi.it", "piacenza.it", "pisa.it", "pistoia.it", "pn.it", "po.it", "pordenone.it", "potenza.it", "pr.it", "prato.it", "pt.it", "pu.it", "pv.it", "pz.it", "ra.it", "ragusa.it", "ravenna.it", "rc.it", "re.it", "reggio-calabria.it", "reggio-emilia.it", "reggiocalabria.it", "reggioemilia.it", "rg.it", "ri.it", "rieti.it", "rimini.it", "rm.it", "rn.it", "ro.it", "roma.it", "rome.it", "rovigo.it", "sa.it", "salerno.it", "sassari.it", "savona.it", "si.it", "siena.it", "siracusa.it", "so.it", "sondrio.it", "sp.it", "sr.it", "ss.it", "s\xFCdtirol.it", "suedtirol.it", "sv.it", "ta.it", "taranto.it", "te.it", "tempio-olbia.it", "tempioolbia.it", "teramo.it", "terni.it", "tn.it", "to.it", "torino.it", "tp.it", "tr.it", "trani-andria-barletta.it", "trani-barletta-andria.it", "traniandriabarletta.it", "tranibarlettaandria.it", "trapani.it", "trento.it", "treviso.it", "trieste.it", "ts.it", "turin.it", "tv.it", "ud.it", "udine.it", "urbino-pesaro.it", "urbinopesaro.it", "va.it", "varese.it", "vb.it", "vc.it", "ve.it", "venezia.it", "venice.it", "verbania.it", "vercelli.it", "verona.it", "vi.it", "vibo-valentia.it", "vibovalentia.it", "vicenza.it", "viterbo.it", "vr.it", "vs.it", "vt.it", "vv.it", "je", "co.je", "net.je", "org.je", "*.jm", "jo", "agri.jo", "ai.jo", "com.jo", "edu.jo", "eng.jo", "fm.jo", "gov.jo", "mil.jo", "net.jo", "org.jo", "per.jo", "phd.jo", "sch.jo", "tv.jo", "jobs", "jp", "ac.jp", "ad.jp", "co.jp", "ed.jp", "go.jp", "gr.jp", "lg.jp", "ne.jp", "or.jp", "aichi.jp", "akita.jp", "aomori.jp", "chiba.jp", "ehime.jp", "fukui.jp", "fukuoka.jp", "fukushima.jp", "gifu.jp", "gunma.jp", "hiroshima.jp", "hokkaido.jp", "hyogo.jp", "ibaraki.jp", "ishikawa.jp", "iwate.jp", "kagawa.jp", "kagoshima.jp", "kanagawa.jp", "kochi.jp", "kumamoto.jp", "kyoto.jp", "mie.jp", "miyagi.jp", "miyazaki.jp", "nagano.jp", "nagasaki.jp", "nara.jp", "niigata.jp", "oita.jp", "okayama.jp", "okinawa.jp", "osaka.jp", "saga.jp", "saitama.jp", "shiga.jp", "shimane.jp", "shizuoka.jp", "tochigi.jp", "tokushima.jp", "tokyo.jp", "tottori.jp", "toyama.jp", "wakayama.jp", "yamagata.jp", "yamaguchi.jp", "yamanashi.jp", "\u4E09\u91CD.jp", "\u4EAC\u90FD.jp", "\u4F50\u8CC0.jp", "\u5175\u5EAB.jp", "\u5317\u6D77\u9053.jp", "\u5343\u8449.jp", "\u548C\u6B4C\u5C71.jp", "\u57FC\u7389.jp", "\u5927\u5206.jp", "\u5927\u962A.jp", "\u5948\u826F.jp", "\u5BAE\u57CE.jp", "\u5BAE\u5D0E.jp", "\u5BCC\u5C71.jp", "\u5C71\u53E3.jp", "\u5C71\u5F62.jp", "\u5C71\u68A8.jp", "\u5C90\u961C.jp", "\u5CA1\u5C71.jp", "\u5CA9\u624B.jp", "\u5CF6\u6839.jp", "\u5E83\u5CF6.jp", "\u5FB3\u5CF6.jp", "\u611B\u5A9B.jp", "\u611B\u77E5.jp", "\u65B0\u6F5F.jp", "\u6771\u4EAC.jp", "\u6803\u6728.jp", "\u6C96\u7E04.jp", "\u6ECB\u8CC0.jp", "\u718A\u672C.jp", "\u77F3\u5DDD.jp", "\u795E\u5948\u5DDD.jp", "\u798F\u4E95.jp", "\u798F\u5CA1.jp", "\u798F\u5CF6.jp", "\u79CB\u7530.jp", "\u7FA4\u99AC.jp", "\u8328\u57CE.jp", "\u9577\u5D0E.jp", "\u9577\u91CE.jp", "\u9752\u68EE.jp", "\u9759\u5CA1.jp", "\u9999\u5DDD.jp", "\u9AD8\u77E5.jp", "\u9CE5\u53D6.jp", "\u9E7F\u5150\u5CF6.jp", "*.kawasaki.jp", "!city.kawasaki.jp", "*.kitakyushu.jp", "!city.kitakyushu.jp", "*.kobe.jp", "!city.kobe.jp", "*.nagoya.jp", "!city.nagoya.jp", "*.sapporo.jp", "!city.sapporo.jp", "*.sendai.jp", "!city.sendai.jp", "*.yokohama.jp", "!city.yokohama.jp", "aisai.aichi.jp", "ama.aichi.jp", "anjo.aichi.jp", "asuke.aichi.jp", "chiryu.aichi.jp", "chita.aichi.jp", "fuso.aichi.jp", "gamagori.aichi.jp", "handa.aichi.jp", "hazu.aichi.jp", "hekinan.aichi.jp", "higashiura.aichi.jp", "ichinomiya.aichi.jp", "inazawa.aichi.jp", "inuyama.aichi.jp", "isshiki.aichi.jp", "iwakura.aichi.jp", "kanie.aichi.jp", "kariya.aichi.jp", "kasugai.aichi.jp", "kira.aichi.jp", "kiyosu.aichi.jp", "komaki.aichi.jp", "konan.aichi.jp", "kota.aichi.jp", "mihama.aichi.jp", "miyoshi.aichi.jp", "nishio.aichi.jp", "nisshin.aichi.jp", "obu.aichi.jp", "oguchi.aichi.jp", "oharu.aichi.jp", "okazaki.aichi.jp", "owariasahi.aichi.jp", "seto.aichi.jp", "shikatsu.aichi.jp", "shinshiro.aichi.jp", "shitara.aichi.jp", "tahara.aichi.jp", "takahama.aichi.jp", "tobishima.aichi.jp", "toei.aichi.jp", "togo.aichi.jp", "tokai.aichi.jp", "tokoname.aichi.jp", "toyoake.aichi.jp", "toyohashi.aichi.jp", "toyokawa.aichi.jp", "toyone.aichi.jp", "toyota.aichi.jp", "tsushima.aichi.jp", "yatomi.aichi.jp", "akita.akita.jp", "daisen.akita.jp", "fujisato.akita.jp", "gojome.akita.jp", "hachirogata.akita.jp", "happou.akita.jp", "higashinaruse.akita.jp", "honjo.akita.jp", "honjyo.akita.jp", "ikawa.akita.jp", "kamikoani.akita.jp", "kamioka.akita.jp", "katagami.akita.jp", "kazuno.akita.jp", "kitaakita.akita.jp", "kosaka.akita.jp", "kyowa.akita.jp", "misato.akita.jp", "mitane.akita.jp", "moriyoshi.akita.jp", "nikaho.akita.jp", "noshiro.akita.jp", "odate.akita.jp", "oga.akita.jp", "ogata.akita.jp", "semboku.akita.jp", "yokote.akita.jp", "yurihonjo.akita.jp", "aomori.aomori.jp", "gonohe.aomori.jp", "hachinohe.aomori.jp", "hashikami.aomori.jp", "hiranai.aomori.jp", "hirosaki.aomori.jp", "itayanagi.aomori.jp", "kuroishi.aomori.jp", "misawa.aomori.jp", "mutsu.aomori.jp", "nakadomari.aomori.jp", "noheji.aomori.jp", "oirase.aomori.jp", "owani.aomori.jp", "rokunohe.aomori.jp", "sannohe.aomori.jp", "shichinohe.aomori.jp", "shingo.aomori.jp", "takko.aomori.jp", "towada.aomori.jp", "tsugaru.aomori.jp", "tsuruta.aomori.jp", "abiko.chiba.jp", "asahi.chiba.jp", "chonan.chiba.jp", "chosei.chiba.jp", "choshi.chiba.jp", "chuo.chiba.jp", "funabashi.chiba.jp", "futtsu.chiba.jp", "hanamigawa.chiba.jp", "ichihara.chiba.jp", "ichikawa.chiba.jp", "ichinomiya.chiba.jp", "inzai.chiba.jp", "isumi.chiba.jp", "kamagaya.chiba.jp", "kamogawa.chiba.jp", "kashiwa.chiba.jp", "katori.chiba.jp", "katsuura.chiba.jp", "kimitsu.chiba.jp", "kisarazu.chiba.jp", "kozaki.chiba.jp", "kujukuri.chiba.jp", "kyonan.chiba.jp", "matsudo.chiba.jp", "midori.chiba.jp", "mihama.chiba.jp", "minamiboso.chiba.jp", "mobara.chiba.jp", "mutsuzawa.chiba.jp", "nagara.chiba.jp", "nagareyama.chiba.jp", "narashino.chiba.jp", "narita.chiba.jp", "noda.chiba.jp", "oamishirasato.chiba.jp", "omigawa.chiba.jp", "onjuku.chiba.jp", "otaki.chiba.jp", "sakae.chiba.jp", "sakura.chiba.jp", "shimofusa.chiba.jp", "shirako.chiba.jp", "shiroi.chiba.jp", "shisui.chiba.jp", "sodegaura.chiba.jp", "sosa.chiba.jp", "tako.chiba.jp", "tateyama.chiba.jp", "togane.chiba.jp", "tohnosho.chiba.jp", "tomisato.chiba.jp", "urayasu.chiba.jp", "yachimata.chiba.jp", "yachiyo.chiba.jp", "yokaichiba.chiba.jp", "yokoshibahikari.chiba.jp", "yotsukaido.chiba.jp", "ainan.ehime.jp", "honai.ehime.jp", "ikata.ehime.jp", "imabari.ehime.jp", "iyo.ehime.jp", "kamijima.ehime.jp", "kihoku.ehime.jp", "kumakogen.ehime.jp", "masaki.ehime.jp", "matsuno.ehime.jp", "matsuyama.ehime.jp", "namikata.ehime.jp", "niihama.ehime.jp", "ozu.ehime.jp", "saijo.ehime.jp", "seiyo.ehime.jp", "shikokuchuo.ehime.jp", "tobe.ehime.jp", "toon.ehime.jp", "uchiko.ehime.jp", "uwajima.ehime.jp", "yawatahama.ehime.jp", "echizen.fukui.jp", "eiheiji.fukui.jp", "fukui.fukui.jp", "ikeda.fukui.jp", "katsuyama.fukui.jp", "mihama.fukui.jp", "minamiechizen.fukui.jp", "obama.fukui.jp", "ohi.fukui.jp", "ono.fukui.jp", "sabae.fukui.jp", "sakai.fukui.jp", "takahama.fukui.jp", "tsuruga.fukui.jp", "wakasa.fukui.jp", "ashiya.fukuoka.jp", "buzen.fukuoka.jp", "chikugo.fukuoka.jp", "chikuho.fukuoka.jp", "chikujo.fukuoka.jp", "chikushino.fukuoka.jp", "chikuzen.fukuoka.jp", "chuo.fukuoka.jp", "dazaifu.fukuoka.jp", "fukuchi.fukuoka.jp", "hakata.fukuoka.jp", "higashi.fukuoka.jp", "hirokawa.fukuoka.jp", "hisayama.fukuoka.jp", "iizuka.fukuoka.jp", "inatsuki.fukuoka.jp", "kaho.fukuoka.jp", "kasuga.fukuoka.jp", "kasuya.fukuoka.jp", "kawara.fukuoka.jp", "keisen.fukuoka.jp", "koga.fukuoka.jp", "kurate.fukuoka.jp", "kurogi.fukuoka.jp", "kurume.fukuoka.jp", "minami.fukuoka.jp", "miyako.fukuoka.jp", "miyama.fukuoka.jp", "miyawaka.fukuoka.jp", "mizumaki.fukuoka.jp", "munakata.fukuoka.jp", "nakagawa.fukuoka.jp", "nakama.fukuoka.jp", "nishi.fukuoka.jp", "nogata.fukuoka.jp", "ogori.fukuoka.jp", "okagaki.fukuoka.jp", "okawa.fukuoka.jp", "oki.fukuoka.jp", "omuta.fukuoka.jp", "onga.fukuoka.jp", "onojo.fukuoka.jp", "oto.fukuoka.jp", "saigawa.fukuoka.jp", "sasaguri.fukuoka.jp", "shingu.fukuoka.jp", "shinyoshitomi.fukuoka.jp", "shonai.fukuoka.jp", "soeda.fukuoka.jp", "sue.fukuoka.jp", "tachiarai.fukuoka.jp", "tagawa.fukuoka.jp", "takata.fukuoka.jp", "toho.fukuoka.jp", "toyotsu.fukuoka.jp", "tsuiki.fukuoka.jp", "ukiha.fukuoka.jp", "umi.fukuoka.jp", "usui.fukuoka.jp", "yamada.fukuoka.jp", "yame.fukuoka.jp", "yanagawa.fukuoka.jp", "yukuhashi.fukuoka.jp", "aizubange.fukushima.jp", "aizumisato.fukushima.jp", "aizuwakamatsu.fukushima.jp", "asakawa.fukushima.jp", "bandai.fukushima.jp", "date.fukushima.jp", "fukushima.fukushima.jp", "furudono.fukushima.jp", "futaba.fukushima.jp", "hanawa.fukushima.jp", "higashi.fukushima.jp", "hirata.fukushima.jp", "hirono.fukushima.jp", "iitate.fukushima.jp", "inawashiro.fukushima.jp", "ishikawa.fukushima.jp", "iwaki.fukushima.jp", "izumizaki.fukushima.jp", "kagamiishi.fukushima.jp", "kaneyama.fukushima.jp", "kawamata.fukushima.jp", "kitakata.fukushima.jp", "kitashiobara.fukushima.jp", "koori.fukushima.jp", "koriyama.fukushima.jp", "kunimi.fukushima.jp", "miharu.fukushima.jp", "mishima.fukushima.jp", "namie.fukushima.jp", "nango.fukushima.jp", "nishiaizu.fukushima.jp", "nishigo.fukushima.jp", "okuma.fukushima.jp", "omotego.fukushima.jp", "ono.fukushima.jp", "otama.fukushima.jp", "samegawa.fukushima.jp", "shimogo.fukushima.jp", "shirakawa.fukushima.jp", "showa.fukushima.jp", "soma.fukushima.jp", "sukagawa.fukushima.jp", "taishin.fukushima.jp", "tamakawa.fukushima.jp", "tanagura.fukushima.jp", "tenei.fukushima.jp", "yabuki.fukushima.jp", "yamato.fukushima.jp", "yamatsuri.fukushima.jp", "yanaizu.fukushima.jp", "yugawa.fukushima.jp", "anpachi.gifu.jp", "ena.gifu.jp", "gifu.gifu.jp", "ginan.gifu.jp", "godo.gifu.jp", "gujo.gifu.jp", "hashima.gifu.jp", "hichiso.gifu.jp", "hida.gifu.jp", "higashishirakawa.gifu.jp", "ibigawa.gifu.jp", "ikeda.gifu.jp", "kakamigahara.gifu.jp", "kani.gifu.jp", "kasahara.gifu.jp", "kasamatsu.gifu.jp", "kawaue.gifu.jp", "kitagata.gifu.jp", "mino.gifu.jp", "minokamo.gifu.jp", "mitake.gifu.jp", "mizunami.gifu.jp", "motosu.gifu.jp", "nakatsugawa.gifu.jp", "ogaki.gifu.jp", "sakahogi.gifu.jp", "seki.gifu.jp", "sekigahara.gifu.jp", "shirakawa.gifu.jp", "tajimi.gifu.jp", "takayama.gifu.jp", "tarui.gifu.jp", "toki.gifu.jp", "tomika.gifu.jp", "wanouchi.gifu.jp", "yamagata.gifu.jp", "yaotsu.gifu.jp", "yoro.gifu.jp", "annaka.gunma.jp", "chiyoda.gunma.jp", "fujioka.gunma.jp", "higashiagatsuma.gunma.jp", "isesaki.gunma.jp", "itakura.gunma.jp", "kanna.gunma.jp", "kanra.gunma.jp", "katashina.gunma.jp", "kawaba.gunma.jp", "kiryu.gunma.jp", "kusatsu.gunma.jp", "maebashi.gunma.jp", "meiwa.gunma.jp", "midori.gunma.jp", "minakami.gunma.jp", "naganohara.gunma.jp", "nakanojo.gunma.jp", "nanmoku.gunma.jp", "numata.gunma.jp", "oizumi.gunma.jp", "ora.gunma.jp", "ota.gunma.jp", "shibukawa.gunma.jp", "shimonita.gunma.jp", "shinto.gunma.jp", "showa.gunma.jp", "takasaki.gunma.jp", "takayama.gunma.jp", "tamamura.gunma.jp", "tatebayashi.gunma.jp", "tomioka.gunma.jp", "tsukiyono.gunma.jp", "tsumagoi.gunma.jp", "ueno.gunma.jp", "yoshioka.gunma.jp", "asaminami.hiroshima.jp", "daiwa.hiroshima.jp", "etajima.hiroshima.jp", "fuchu.hiroshima.jp", "fukuyama.hiroshima.jp", "hatsukaichi.hiroshima.jp", "higashihiroshima.hiroshima.jp", "hongo.hiroshima.jp", "jinsekikogen.hiroshima.jp", "kaita.hiroshima.jp", "kui.hiroshima.jp", "kumano.hiroshima.jp", "kure.hiroshima.jp", "mihara.hiroshima.jp", "miyoshi.hiroshima.jp", "naka.hiroshima.jp", "onomichi.hiroshima.jp", "osakikamijima.hiroshima.jp", "otake.hiroshima.jp", "saka.hiroshima.jp", "sera.hiroshima.jp", "seranishi.hiroshima.jp", "shinichi.hiroshima.jp", "shobara.hiroshima.jp", "takehara.hiroshima.jp", "abashiri.hokkaido.jp", "abira.hokkaido.jp", "aibetsu.hokkaido.jp", "akabira.hokkaido.jp", "akkeshi.hokkaido.jp", "asahikawa.hokkaido.jp", "ashibetsu.hokkaido.jp", "ashoro.hokkaido.jp", "assabu.hokkaido.jp", "atsuma.hokkaido.jp", "bibai.hokkaido.jp", "biei.hokkaido.jp", "bifuka.hokkaido.jp", "bihoro.hokkaido.jp", "biratori.hokkaido.jp", "chippubetsu.hokkaido.jp", "chitose.hokkaido.jp", "date.hokkaido.jp", "ebetsu.hokkaido.jp", "embetsu.hokkaido.jp", "eniwa.hokkaido.jp", "erimo.hokkaido.jp", "esan.hokkaido.jp", "esashi.hokkaido.jp", "fukagawa.hokkaido.jp", "fukushima.hokkaido.jp", "furano.hokkaido.jp", "furubira.hokkaido.jp", "haboro.hokkaido.jp", "hakodate.hokkaido.jp", "hamatonbetsu.hokkaido.jp", "hidaka.hokkaido.jp", "higashikagura.hokkaido.jp", "higashikawa.hokkaido.jp", "hiroo.hokkaido.jp", "hokuryu.hokkaido.jp", "hokuto.hokkaido.jp", "honbetsu.hokkaido.jp", "horokanai.hokkaido.jp", "horonobe.hokkaido.jp", "ikeda.hokkaido.jp", "imakane.hokkaido.jp", "ishikari.hokkaido.jp", "iwamizawa.hokkaido.jp", "iwanai.hokkaido.jp", "kamifurano.hokkaido.jp", "kamikawa.hokkaido.jp", "kamishihoro.hokkaido.jp", "kamisunagawa.hokkaido.jp", "kamoenai.hokkaido.jp", "kayabe.hokkaido.jp", "kembuchi.hokkaido.jp", "kikonai.hokkaido.jp", "kimobetsu.hokkaido.jp", "kitahiroshima.hokkaido.jp", "kitami.hokkaido.jp", "kiyosato.hokkaido.jp", "koshimizu.hokkaido.jp", "kunneppu.hokkaido.jp", "kuriyama.hokkaido.jp", "kuromatsunai.hokkaido.jp", "kushiro.hokkaido.jp", "kutchan.hokkaido.jp", "kyowa.hokkaido.jp", "mashike.hokkaido.jp", "matsumae.hokkaido.jp", "mikasa.hokkaido.jp", "minamifurano.hokkaido.jp", "mombetsu.hokkaido.jp", "moseushi.hokkaido.jp", "mukawa.hokkaido.jp", "muroran.hokkaido.jp", "naie.hokkaido.jp", "nakagawa.hokkaido.jp", "nakasatsunai.hokkaido.jp", "nakatombetsu.hokkaido.jp", "nanae.hokkaido.jp", "nanporo.hokkaido.jp", "nayoro.hokkaido.jp", "nemuro.hokkaido.jp", "niikappu.hokkaido.jp", "niki.hokkaido.jp", "nishiokoppe.hokkaido.jp", "noboribetsu.hokkaido.jp", "numata.hokkaido.jp", "obihiro.hokkaido.jp", "obira.hokkaido.jp", "oketo.hokkaido.jp", "okoppe.hokkaido.jp", "otaru.hokkaido.jp", "otobe.hokkaido.jp", "otofuke.hokkaido.jp", "otoineppu.hokkaido.jp", "oumu.hokkaido.jp", "ozora.hokkaido.jp", "pippu.hokkaido.jp", "rankoshi.hokkaido.jp", "rebun.hokkaido.jp", "rikubetsu.hokkaido.jp", "rishiri.hokkaido.jp", "rishirifuji.hokkaido.jp", "saroma.hokkaido.jp", "sarufutsu.hokkaido.jp", "shakotan.hokkaido.jp", "shari.hokkaido.jp", "shibecha.hokkaido.jp", "shibetsu.hokkaido.jp", "shikabe.hokkaido.jp", "shikaoi.hokkaido.jp", "shimamaki.hokkaido.jp", "shimizu.hokkaido.jp", "shimokawa.hokkaido.jp", "shinshinotsu.hokkaido.jp", "shintoku.hokkaido.jp", "shiranuka.hokkaido.jp", "shiraoi.hokkaido.jp", "shiriuchi.hokkaido.jp", "sobetsu.hokkaido.jp", "sunagawa.hokkaido.jp", "taiki.hokkaido.jp", "takasu.hokkaido.jp", "takikawa.hokkaido.jp", "takinoue.hokkaido.jp", "teshikaga.hokkaido.jp", "tobetsu.hokkaido.jp", "tohma.hokkaido.jp", "tomakomai.hokkaido.jp", "tomari.hokkaido.jp", "toya.hokkaido.jp", "toyako.hokkaido.jp", "toyotomi.hokkaido.jp", "toyoura.hokkaido.jp", "tsubetsu.hokkaido.jp", "tsukigata.hokkaido.jp", "urakawa.hokkaido.jp", "urausu.hokkaido.jp", "uryu.hokkaido.jp", "utashinai.hokkaido.jp", "wakkanai.hokkaido.jp", "wassamu.hokkaido.jp", "yakumo.hokkaido.jp", "yoichi.hokkaido.jp", "aioi.hyogo.jp", "akashi.hyogo.jp", "ako.hyogo.jp", "amagasaki.hyogo.jp", "aogaki.hyogo.jp", "asago.hyogo.jp", "ashiya.hyogo.jp", "awaji.hyogo.jp", "fukusaki.hyogo.jp", "goshiki.hyogo.jp", "harima.hyogo.jp", "himeji.hyogo.jp", "ichikawa.hyogo.jp", "inagawa.hyogo.jp", "itami.hyogo.jp", "kakogawa.hyogo.jp", "kamigori.hyogo.jp", "kamikawa.hyogo.jp", "kasai.hyogo.jp", "kasuga.hyogo.jp", "kawanishi.hyogo.jp", "miki.hyogo.jp", "minamiawaji.hyogo.jp", "nishinomiya.hyogo.jp", "nishiwaki.hyogo.jp", "ono.hyogo.jp", "sanda.hyogo.jp", "sannan.hyogo.jp", "sasayama.hyogo.jp", "sayo.hyogo.jp", "shingu.hyogo.jp", "shinonsen.hyogo.jp", "shiso.hyogo.jp", "sumoto.hyogo.jp", "taishi.hyogo.jp", "taka.hyogo.jp", "takarazuka.hyogo.jp", "takasago.hyogo.jp", "takino.hyogo.jp", "tamba.hyogo.jp", "tatsuno.hyogo.jp", "toyooka.hyogo.jp", "yabu.hyogo.jp", "yashiro.hyogo.jp", "yoka.hyogo.jp", "yokawa.hyogo.jp", "ami.ibaraki.jp", "asahi.ibaraki.jp", "bando.ibaraki.jp", "chikusei.ibaraki.jp", "daigo.ibaraki.jp", "fujishiro.ibaraki.jp", "hitachi.ibaraki.jp", "hitachinaka.ibaraki.jp", "hitachiomiya.ibaraki.jp", "hitachiota.ibaraki.jp", "ibaraki.ibaraki.jp", "ina.ibaraki.jp", "inashiki.ibaraki.jp", "itako.ibaraki.jp", "iwama.ibaraki.jp", "joso.ibaraki.jp", "kamisu.ibaraki.jp", "kasama.ibaraki.jp", "kashima.ibaraki.jp", "kasumigaura.ibaraki.jp", "koga.ibaraki.jp", "miho.ibaraki.jp", "mito.ibaraki.jp", "moriya.ibaraki.jp", "naka.ibaraki.jp", "namegata.ibaraki.jp", "oarai.ibaraki.jp", "ogawa.ibaraki.jp", "omitama.ibaraki.jp", "ryugasaki.ibaraki.jp", "sakai.ibaraki.jp", "sakuragawa.ibaraki.jp", "shimodate.ibaraki.jp", "shimotsuma.ibaraki.jp", "shirosato.ibaraki.jp", "sowa.ibaraki.jp", "suifu.ibaraki.jp", "takahagi.ibaraki.jp", "tamatsukuri.ibaraki.jp", "tokai.ibaraki.jp", "tomobe.ibaraki.jp", "tone.ibaraki.jp", "toride.ibaraki.jp", "tsuchiura.ibaraki.jp", "tsukuba.ibaraki.jp", "uchihara.ibaraki.jp", "ushiku.ibaraki.jp", "yachiyo.ibaraki.jp", "yamagata.ibaraki.jp", "yawara.ibaraki.jp", "yuki.ibaraki.jp", "anamizu.ishikawa.jp", "hakui.ishikawa.jp", "hakusan.ishikawa.jp", "kaga.ishikawa.jp", "kahoku.ishikawa.jp", "kanazawa.ishikawa.jp", "kawakita.ishikawa.jp", "komatsu.ishikawa.jp", "nakanoto.ishikawa.jp", "nanao.ishikawa.jp", "nomi.ishikawa.jp", "nonoichi.ishikawa.jp", "noto.ishikawa.jp", "shika.ishikawa.jp", "suzu.ishikawa.jp", "tsubata.ishikawa.jp", "tsurugi.ishikawa.jp", "uchinada.ishikawa.jp", "wajima.ishikawa.jp", "fudai.iwate.jp", "fujisawa.iwate.jp", "hanamaki.iwate.jp", "hiraizumi.iwate.jp", "hirono.iwate.jp", "ichinohe.iwate.jp", "ichinoseki.iwate.jp", "iwaizumi.iwate.jp", "iwate.iwate.jp", "joboji.iwate.jp", "kamaishi.iwate.jp", "kanegasaki.iwate.jp", "karumai.iwate.jp", "kawai.iwate.jp", "kitakami.iwate.jp", "kuji.iwate.jp", "kunohe.iwate.jp", "kuzumaki.iwate.jp", "miyako.iwate.jp", "mizusawa.iwate.jp", "morioka.iwate.jp", "ninohe.iwate.jp", "noda.iwate.jp", "ofunato.iwate.jp", "oshu.iwate.jp", "otsuchi.iwate.jp", "rikuzentakata.iwate.jp", "shiwa.iwate.jp", "shizukuishi.iwate.jp", "sumita.iwate.jp", "tanohata.iwate.jp", "tono.iwate.jp", "yahaba.iwate.jp", "yamada.iwate.jp", "ayagawa.kagawa.jp", "higashikagawa.kagawa.jp", "kanonji.kagawa.jp", "kotohira.kagawa.jp", "manno.kagawa.jp", "marugame.kagawa.jp", "mitoyo.kagawa.jp", "naoshima.kagawa.jp", "sanuki.kagawa.jp", "tadotsu.kagawa.jp", "takamatsu.kagawa.jp", "tonosho.kagawa.jp", "uchinomi.kagawa.jp", "utazu.kagawa.jp", "zentsuji.kagawa.jp", "akune.kagoshima.jp", "amami.kagoshima.jp", "hioki.kagoshima.jp", "isa.kagoshima.jp", "isen.kagoshima.jp", "izumi.kagoshima.jp", "kagoshima.kagoshima.jp", "kanoya.kagoshima.jp", "kawanabe.kagoshima.jp", "kinko.kagoshima.jp", "kouyama.kagoshima.jp", "makurazaki.kagoshima.jp", "matsumoto.kagoshima.jp", "minamitane.kagoshima.jp", "nakatane.kagoshima.jp", "nishinoomote.kagoshima.jp", "satsumasendai.kagoshima.jp", "soo.kagoshima.jp", "tarumizu.kagoshima.jp", "yusui.kagoshima.jp", "aikawa.kanagawa.jp", "atsugi.kanagawa.jp", "ayase.kanagawa.jp", "chigasaki.kanagawa.jp", "ebina.kanagawa.jp", "fujisawa.kanagawa.jp", "hadano.kanagawa.jp", "hakone.kanagawa.jp", "hiratsuka.kanagawa.jp", "isehara.kanagawa.jp", "kaisei.kanagawa.jp", "kamakura.kanagawa.jp", "kiyokawa.kanagawa.jp", "matsuda.kanagawa.jp", "minamiashigara.kanagawa.jp", "miura.kanagawa.jp", "nakai.kanagawa.jp", "ninomiya.kanagawa.jp", "odawara.kanagawa.jp", "oi.kanagawa.jp", "oiso.kanagawa.jp", "sagamihara.kanagawa.jp", "samukawa.kanagawa.jp", "tsukui.kanagawa.jp", "yamakita.kanagawa.jp", "yamato.kanagawa.jp", "yokosuka.kanagawa.jp", "yugawara.kanagawa.jp", "zama.kanagawa.jp", "zushi.kanagawa.jp", "aki.kochi.jp", "geisei.kochi.jp", "hidaka.kochi.jp", "higashitsuno.kochi.jp", "ino.kochi.jp", "kagami.kochi.jp", "kami.kochi.jp", "kitagawa.kochi.jp", "kochi.kochi.jp", "mihara.kochi.jp", "motoyama.kochi.jp", "muroto.kochi.jp", "nahari.kochi.jp", "nakamura.kochi.jp", "nankoku.kochi.jp", "nishitosa.kochi.jp", "niyodogawa.kochi.jp", "ochi.kochi.jp", "okawa.kochi.jp", "otoyo.kochi.jp", "otsuki.kochi.jp", "sakawa.kochi.jp", "sukumo.kochi.jp", "susaki.kochi.jp", "tosa.kochi.jp", "tosashimizu.kochi.jp", "toyo.kochi.jp", "tsuno.kochi.jp", "umaji.kochi.jp", "yasuda.kochi.jp", "yusuhara.kochi.jp", "amakusa.kumamoto.jp", "arao.kumamoto.jp", "aso.kumamoto.jp", "choyo.kumamoto.jp", "gyokuto.kumamoto.jp", "kamiamakusa.kumamoto.jp", "kikuchi.kumamoto.jp", "kumamoto.kumamoto.jp", "mashiki.kumamoto.jp", "mifune.kumamoto.jp", "minamata.kumamoto.jp", "minamioguni.kumamoto.jp", "nagasu.kumamoto.jp", "nishihara.kumamoto.jp", "oguni.kumamoto.jp", "ozu.kumamoto.jp", "sumoto.kumamoto.jp", "takamori.kumamoto.jp", "uki.kumamoto.jp", "uto.kumamoto.jp", "yamaga.kumamoto.jp", "yamato.kumamoto.jp", "yatsushiro.kumamoto.jp", "ayabe.kyoto.jp", "fukuchiyama.kyoto.jp", "higashiyama.kyoto.jp", "ide.kyoto.jp", "ine.kyoto.jp", "joyo.kyoto.jp", "kameoka.kyoto.jp", "kamo.kyoto.jp", "kita.kyoto.jp", "kizu.kyoto.jp", "kumiyama.kyoto.jp", "kyotamba.kyoto.jp", "kyotanabe.kyoto.jp", "kyotango.kyoto.jp", "maizuru.kyoto.jp", "minami.kyoto.jp", "minamiyamashiro.kyoto.jp", "miyazu.kyoto.jp", "muko.kyoto.jp", "nagaokakyo.kyoto.jp", "nakagyo.kyoto.jp", "nantan.kyoto.jp", "oyamazaki.kyoto.jp", "sakyo.kyoto.jp", "seika.kyoto.jp", "tanabe.kyoto.jp", "uji.kyoto.jp", "ujitawara.kyoto.jp", "wazuka.kyoto.jp", "yamashina.kyoto.jp", "yawata.kyoto.jp", "asahi.mie.jp", "inabe.mie.jp", "ise.mie.jp", "kameyama.mie.jp", "kawagoe.mie.jp", "kiho.mie.jp", "kisosaki.mie.jp", "kiwa.mie.jp", "komono.mie.jp", "kumano.mie.jp", "kuwana.mie.jp", "matsusaka.mie.jp", "meiwa.mie.jp", "mihama.mie.jp", "minamiise.mie.jp", "misugi.mie.jp", "miyama.mie.jp", "nabari.mie.jp", "shima.mie.jp", "suzuka.mie.jp", "tado.mie.jp", "taiki.mie.jp", "taki.mie.jp", "tamaki.mie.jp", "toba.mie.jp", "tsu.mie.jp", "udono.mie.jp", "ureshino.mie.jp", "watarai.mie.jp", "yokkaichi.mie.jp", "furukawa.miyagi.jp", "higashimatsushima.miyagi.jp", "ishinomaki.miyagi.jp", "iwanuma.miyagi.jp", "kakuda.miyagi.jp", "kami.miyagi.jp", "kawasaki.miyagi.jp", "marumori.miyagi.jp", "matsushima.miyagi.jp", "minamisanriku.miyagi.jp", "misato.miyagi.jp", "murata.miyagi.jp", "natori.miyagi.jp", "ogawara.miyagi.jp", "ohira.miyagi.jp", "onagawa.miyagi.jp", "osaki.miyagi.jp", "rifu.miyagi.jp", "semine.miyagi.jp", "shibata.miyagi.jp", "shichikashuku.miyagi.jp", "shikama.miyagi.jp", "shiogama.miyagi.jp", "shiroishi.miyagi.jp", "tagajo.miyagi.jp", "taiwa.miyagi.jp", "tome.miyagi.jp", "tomiya.miyagi.jp", "wakuya.miyagi.jp", "watari.miyagi.jp", "yamamoto.miyagi.jp", "zao.miyagi.jp", "aya.miyazaki.jp", "ebino.miyazaki.jp", "gokase.miyazaki.jp", "hyuga.miyazaki.jp", "kadogawa.miyazaki.jp", "kawaminami.miyazaki.jp", "kijo.miyazaki.jp", "kitagawa.miyazaki.jp", "kitakata.miyazaki.jp", "kitaura.miyazaki.jp", "kobayashi.miyazaki.jp", "kunitomi.miyazaki.jp", "kushima.miyazaki.jp", "mimata.miyazaki.jp", "miyakonojo.miyazaki.jp", "miyazaki.miyazaki.jp", "morotsuka.miyazaki.jp", "nichinan.miyazaki.jp", "nishimera.miyazaki.jp", "nobeoka.miyazaki.jp", "saito.miyazaki.jp", "shiiba.miyazaki.jp", "shintomi.miyazaki.jp", "takaharu.miyazaki.jp", "takanabe.miyazaki.jp", "takazaki.miyazaki.jp", "tsuno.miyazaki.jp", "achi.nagano.jp", "agematsu.nagano.jp", "anan.nagano.jp", "aoki.nagano.jp", "asahi.nagano.jp", "azumino.nagano.jp", "chikuhoku.nagano.jp", "chikuma.nagano.jp", "chino.nagano.jp", "fujimi.nagano.jp", "hakuba.nagano.jp", "hara.nagano.jp", "hiraya.nagano.jp", "iida.nagano.jp", "iijima.nagano.jp", "iiyama.nagano.jp", "iizuna.nagano.jp", "ikeda.nagano.jp", "ikusaka.nagano.jp", "ina.nagano.jp", "karuizawa.nagano.jp", "kawakami.nagano.jp", "kiso.nagano.jp", "kisofukushima.nagano.jp", "kitaaiki.nagano.jp", "komagane.nagano.jp", "komoro.nagano.jp", "matsukawa.nagano.jp", "matsumoto.nagano.jp", "miasa.nagano.jp", "minamiaiki.nagano.jp", "minamimaki.nagano.jp", "minamiminowa.nagano.jp", "minowa.nagano.jp", "miyada.nagano.jp", "miyota.nagano.jp", "mochizuki.nagano.jp", "nagano.nagano.jp", "nagawa.nagano.jp", "nagiso.nagano.jp", "nakagawa.nagano.jp", "nakano.nagano.jp", "nozawaonsen.nagano.jp", "obuse.nagano.jp", "ogawa.nagano.jp", "okaya.nagano.jp", "omachi.nagano.jp", "omi.nagano.jp", "ookuwa.nagano.jp", "ooshika.nagano.jp", "otaki.nagano.jp", "otari.nagano.jp", "sakae.nagano.jp", "sakaki.nagano.jp", "saku.nagano.jp", "sakuho.nagano.jp", "shimosuwa.nagano.jp", "shinanomachi.nagano.jp", "shiojiri.nagano.jp", "suwa.nagano.jp", "suzaka.nagano.jp", "takagi.nagano.jp", "takamori.nagano.jp", "takayama.nagano.jp", "tateshina.nagano.jp", "tatsuno.nagano.jp", "togakushi.nagano.jp", "togura.nagano.jp", "tomi.nagano.jp", "ueda.nagano.jp", "wada.nagano.jp", "yamagata.nagano.jp", "yamanouchi.nagano.jp", "yasaka.nagano.jp", "yasuoka.nagano.jp", "chijiwa.nagasaki.jp", "futsu.nagasaki.jp", "goto.nagasaki.jp", "hasami.nagasaki.jp", "hirado.nagasaki.jp", "iki.nagasaki.jp", "isahaya.nagasaki.jp", "kawatana.nagasaki.jp", "kuchinotsu.nagasaki.jp", "matsuura.nagasaki.jp", "nagasaki.nagasaki.jp", "obama.nagasaki.jp", "omura.nagasaki.jp", "oseto.nagasaki.jp", "saikai.nagasaki.jp", "sasebo.nagasaki.jp", "seihi.nagasaki.jp", "shimabara.nagasaki.jp", "shinkamigoto.nagasaki.jp", "togitsu.nagasaki.jp", "tsushima.nagasaki.jp", "unzen.nagasaki.jp", "ando.nara.jp", "gose.nara.jp", "heguri.nara.jp", "higashiyoshino.nara.jp", "ikaruga.nara.jp", "ikoma.nara.jp", "kamikitayama.nara.jp", "kanmaki.nara.jp", "kashiba.nara.jp", "kashihara.nara.jp", "katsuragi.nara.jp", "kawai.nara.jp", "kawakami.nara.jp", "kawanishi.nara.jp", "koryo.nara.jp", "kurotaki.nara.jp", "mitsue.nara.jp", "miyake.nara.jp", "nara.nara.jp", "nosegawa.nara.jp", "oji.nara.jp", "ouda.nara.jp", "oyodo.nara.jp", "sakurai.nara.jp", "sango.nara.jp", "shimoichi.nara.jp", "shimokitayama.nara.jp", "shinjo.nara.jp", "soni.nara.jp", "takatori.nara.jp", "tawaramoto.nara.jp", "tenkawa.nara.jp", "tenri.nara.jp", "uda.nara.jp", "yamatokoriyama.nara.jp", "yamatotakada.nara.jp", "yamazoe.nara.jp", "yoshino.nara.jp", "aga.niigata.jp", "agano.niigata.jp", "gosen.niigata.jp", "itoigawa.niigata.jp", "izumozaki.niigata.jp", "joetsu.niigata.jp", "kamo.niigata.jp", "kariwa.niigata.jp", "kashiwazaki.niigata.jp", "minamiuonuma.niigata.jp", "mitsuke.niigata.jp", "muika.niigata.jp", "murakami.niigata.jp", "myoko.niigata.jp", "nagaoka.niigata.jp", "niigata.niigata.jp", "ojiya.niigata.jp", "omi.niigata.jp", "sado.niigata.jp", "sanjo.niigata.jp", "seiro.niigata.jp", "seirou.niigata.jp", "sekikawa.niigata.jp", "shibata.niigata.jp", "tagami.niigata.jp", "tainai.niigata.jp", "tochio.niigata.jp", "tokamachi.niigata.jp", "tsubame.niigata.jp", "tsunan.niigata.jp", "uonuma.niigata.jp", "yahiko.niigata.jp", "yoita.niigata.jp", "yuzawa.niigata.jp", "beppu.oita.jp", "bungoono.oita.jp", "bungotakada.oita.jp", "hasama.oita.jp", "hiji.oita.jp", "himeshima.oita.jp", "hita.oita.jp", "kamitsue.oita.jp", "kokonoe.oita.jp", "kuju.oita.jp", "kunisaki.oita.jp", "kusu.oita.jp", "oita.oita.jp", "saiki.oita.jp", "taketa.oita.jp", "tsukumi.oita.jp", "usa.oita.jp", "usuki.oita.jp", "yufu.oita.jp", "akaiwa.okayama.jp", "asakuchi.okayama.jp", "bizen.okayama.jp", "hayashima.okayama.jp", "ibara.okayama.jp", "kagamino.okayama.jp", "kasaoka.okayama.jp", "kibichuo.okayama.jp", "kumenan.okayama.jp", "kurashiki.okayama.jp", "maniwa.okayama.jp", "misaki.okayama.jp", "nagi.okayama.jp", "niimi.okayama.jp", "nishiawakura.okayama.jp", "okayama.okayama.jp", "satosho.okayama.jp", "setouchi.okayama.jp", "shinjo.okayama.jp", "shoo.okayama.jp", "soja.okayama.jp", "takahashi.okayama.jp", "tamano.okayama.jp", "tsuyama.okayama.jp", "wake.okayama.jp", "yakage.okayama.jp", "aguni.okinawa.jp", "ginowan.okinawa.jp", "ginoza.okinawa.jp", "gushikami.okinawa.jp", "haebaru.okinawa.jp", "higashi.okinawa.jp", "hirara.okinawa.jp", "iheya.okinawa.jp", "ishigaki.okinawa.jp", "ishikawa.okinawa.jp", "itoman.okinawa.jp", "izena.okinawa.jp", "kadena.okinawa.jp", "kin.okinawa.jp", "kitadaito.okinawa.jp", "kitanakagusuku.okinawa.jp", "kumejima.okinawa.jp", "kunigami.okinawa.jp", "minamidaito.okinawa.jp", "motobu.okinawa.jp", "nago.okinawa.jp", "naha.okinawa.jp", "nakagusuku.okinawa.jp", "nakijin.okinawa.jp", "nanjo.okinawa.jp", "nishihara.okinawa.jp", "ogimi.okinawa.jp", "okinawa.okinawa.jp", "onna.okinawa.jp", "shimoji.okinawa.jp", "taketomi.okinawa.jp", "tarama.okinawa.jp", "tokashiki.okinawa.jp", "tomigusuku.okinawa.jp", "tonaki.okinawa.jp", "urasoe.okinawa.jp", "uruma.okinawa.jp", "yaese.okinawa.jp", "yomitan.okinawa.jp", "yonabaru.okinawa.jp", "yonaguni.okinawa.jp", "zamami.okinawa.jp", "abeno.osaka.jp", "chihayaakasaka.osaka.jp", "chuo.osaka.jp", "daito.osaka.jp", "fujiidera.osaka.jp", "habikino.osaka.jp", "hannan.osaka.jp", "higashiosaka.osaka.jp", "higashisumiyoshi.osaka.jp", "higashiyodogawa.osaka.jp", "hirakata.osaka.jp", "ibaraki.osaka.jp", "ikeda.osaka.jp", "izumi.osaka.jp", "izumiotsu.osaka.jp", "izumisano.osaka.jp", "kadoma.osaka.jp", "kaizuka.osaka.jp", "kanan.osaka.jp", "kashiwara.osaka.jp", "katano.osaka.jp", "kawachinagano.osaka.jp", "kishiwada.osaka.jp", "kita.osaka.jp", "kumatori.osaka.jp", "matsubara.osaka.jp", "minato.osaka.jp", "minoh.osaka.jp", "misaki.osaka.jp", "moriguchi.osaka.jp", "neyagawa.osaka.jp", "nishi.osaka.jp", "nose.osaka.jp", "osakasayama.osaka.jp", "sakai.osaka.jp", "sayama.osaka.jp", "sennan.osaka.jp", "settsu.osaka.jp", "shijonawate.osaka.jp", "shimamoto.osaka.jp", "suita.osaka.jp", "tadaoka.osaka.jp", "taishi.osaka.jp", "tajiri.osaka.jp", "takaishi.osaka.jp", "takatsuki.osaka.jp", "tondabayashi.osaka.jp", "toyonaka.osaka.jp", "toyono.osaka.jp", "yao.osaka.jp", "ariake.saga.jp", "arita.saga.jp", "fukudomi.saga.jp", "genkai.saga.jp", "hamatama.saga.jp", "hizen.saga.jp", "imari.saga.jp", "kamimine.saga.jp", "kanzaki.saga.jp", "karatsu.saga.jp", "kashima.saga.jp", "kitagata.saga.jp", "kitahata.saga.jp", "kiyama.saga.jp", "kouhoku.saga.jp", "kyuragi.saga.jp", "nishiarita.saga.jp", "ogi.saga.jp", "omachi.saga.jp", "ouchi.saga.jp", "saga.saga.jp", "shiroishi.saga.jp", "taku.saga.jp", "tara.saga.jp", "tosu.saga.jp", "yoshinogari.saga.jp", "arakawa.saitama.jp", "asaka.saitama.jp", "chichibu.saitama.jp", "fujimi.saitama.jp", "fujimino.saitama.jp", "fukaya.saitama.jp", "hanno.saitama.jp", "hanyu.saitama.jp", "hasuda.saitama.jp", "hatogaya.saitama.jp", "hatoyama.saitama.jp", "hidaka.saitama.jp", "higashichichibu.saitama.jp", "higashimatsuyama.saitama.jp", "honjo.saitama.jp", "ina.saitama.jp", "iruma.saitama.jp", "iwatsuki.saitama.jp", "kamiizumi.saitama.jp", "kamikawa.saitama.jp", "kamisato.saitama.jp", "kasukabe.saitama.jp", "kawagoe.saitama.jp", "kawaguchi.saitama.jp", "kawajima.saitama.jp", "kazo.saitama.jp", "kitamoto.saitama.jp", "koshigaya.saitama.jp", "kounosu.saitama.jp", "kuki.saitama.jp", "kumagaya.saitama.jp", "matsubushi.saitama.jp", "minano.saitama.jp", "misato.saitama.jp", "miyashiro.saitama.jp", "miyoshi.saitama.jp", "moroyama.saitama.jp", "nagatoro.saitama.jp", "namegawa.saitama.jp", "niiza.saitama.jp", "ogano.saitama.jp", "ogawa.saitama.jp", "ogose.saitama.jp", "okegawa.saitama.jp", "omiya.saitama.jp", "otaki.saitama.jp", "ranzan.saitama.jp", "ryokami.saitama.jp", "saitama.saitama.jp", "sakado.saitama.jp", "satte.saitama.jp", "sayama.saitama.jp", "shiki.saitama.jp", "shiraoka.saitama.jp", "soka.saitama.jp", "sugito.saitama.jp", "toda.saitama.jp", "tokigawa.saitama.jp", "tokorozawa.saitama.jp", "tsurugashima.saitama.jp", "urawa.saitama.jp", "warabi.saitama.jp", "yashio.saitama.jp", "yokoze.saitama.jp", "yono.saitama.jp", "yorii.saitama.jp", "yoshida.saitama.jp", "yoshikawa.saitama.jp", "yoshimi.saitama.jp", "aisho.shiga.jp", "gamo.shiga.jp", "higashiomi.shiga.jp", "hikone.shiga.jp", "koka.shiga.jp", "konan.shiga.jp", "kosei.shiga.jp", "koto.shiga.jp", "kusatsu.shiga.jp", "maibara.shiga.jp", "moriyama.shiga.jp", "nagahama.shiga.jp", "nishiazai.shiga.jp", "notogawa.shiga.jp", "omihachiman.shiga.jp", "otsu.shiga.jp", "ritto.shiga.jp", "ryuoh.shiga.jp", "takashima.shiga.jp", "takatsuki.shiga.jp", "torahime.shiga.jp", "toyosato.shiga.jp", "yasu.shiga.jp", "akagi.shimane.jp", "ama.shimane.jp", "gotsu.shimane.jp", "hamada.shimane.jp", "higashiizumo.shimane.jp", "hikawa.shimane.jp", "hikimi.shimane.jp", "izumo.shimane.jp", "kakinoki.shimane.jp", "masuda.shimane.jp", "matsue.shimane.jp", "misato.shimane.jp", "nishinoshima.shimane.jp", "ohda.shimane.jp", "okinoshima.shimane.jp", "okuizumo.shimane.jp", "shimane.shimane.jp", "tamayu.shimane.jp", "tsuwano.shimane.jp", "unnan.shimane.jp", "yakumo.shimane.jp", "yasugi.shimane.jp", "yatsuka.shimane.jp", "arai.shizuoka.jp", "atami.shizuoka.jp", "fuji.shizuoka.jp", "fujieda.shizuoka.jp", "fujikawa.shizuoka.jp", "fujinomiya.shizuoka.jp", "fukuroi.shizuoka.jp", "gotemba.shizuoka.jp", "haibara.shizuoka.jp", "hamamatsu.shizuoka.jp", "higashiizu.shizuoka.jp", "ito.shizuoka.jp", "iwata.shizuoka.jp", "izu.shizuoka.jp", "izunokuni.shizuoka.jp", "kakegawa.shizuoka.jp", "kannami.shizuoka.jp", "kawanehon.shizuoka.jp", "kawazu.shizuoka.jp", "kikugawa.shizuoka.jp", "kosai.shizuoka.jp", "makinohara.shizuoka.jp", "matsuzaki.shizuoka.jp", "minamiizu.shizuoka.jp", "mishima.shizuoka.jp", "morimachi.shizuoka.jp", "nishiizu.shizuoka.jp", "numazu.shizuoka.jp", "omaezaki.shizuoka.jp", "shimada.shizuoka.jp", "shimizu.shizuoka.jp", "shimoda.shizuoka.jp", "shizuoka.shizuoka.jp", "susono.shizuoka.jp", "yaizu.shizuoka.jp", "yoshida.shizuoka.jp", "ashikaga.tochigi.jp", "bato.tochigi.jp", "haga.tochigi.jp", "ichikai.tochigi.jp", "iwafune.tochigi.jp", "kaminokawa.tochigi.jp", "kanuma.tochigi.jp", "karasuyama.tochigi.jp", "kuroiso.tochigi.jp", "mashiko.tochigi.jp", "mibu.tochigi.jp", "moka.tochigi.jp", "motegi.tochigi.jp", "nasu.tochigi.jp", "nasushiobara.tochigi.jp", "nikko.tochigi.jp", "nishikata.tochigi.jp", "nogi.tochigi.jp", "ohira.tochigi.jp", "ohtawara.tochigi.jp", "oyama.tochigi.jp", "sakura.tochigi.jp", "sano.tochigi.jp", "shimotsuke.tochigi.jp", "shioya.tochigi.jp", "takanezawa.tochigi.jp", "tochigi.tochigi.jp", "tsuga.tochigi.jp", "ujiie.tochigi.jp", "utsunomiya.tochigi.jp", "yaita.tochigi.jp", "aizumi.tokushima.jp", "anan.tokushima.jp", "ichiba.tokushima.jp", "itano.tokushima.jp", "kainan.tokushima.jp", "komatsushima.tokushima.jp", "matsushige.tokushima.jp", "mima.tokushima.jp", "minami.tokushima.jp", "miyoshi.tokushima.jp", "mugi.tokushima.jp", "nakagawa.tokushima.jp", "naruto.tokushima.jp", "sanagochi.tokushima.jp", "shishikui.tokushima.jp", "tokushima.tokushima.jp", "wajiki.tokushima.jp", "adachi.tokyo.jp", "akiruno.tokyo.jp", "akishima.tokyo.jp", "aogashima.tokyo.jp", "arakawa.tokyo.jp", "bunkyo.tokyo.jp", "chiyoda.tokyo.jp", "chofu.tokyo.jp", "chuo.tokyo.jp", "edogawa.tokyo.jp", "fuchu.tokyo.jp", "fussa.tokyo.jp", "hachijo.tokyo.jp", "hachioji.tokyo.jp", "hamura.tokyo.jp", "higashikurume.tokyo.jp", "higashimurayama.tokyo.jp", "higashiyamato.tokyo.jp", "hino.tokyo.jp", "hinode.tokyo.jp", "hinohara.tokyo.jp", "inagi.tokyo.jp", "itabashi.tokyo.jp", "katsushika.tokyo.jp", "kita.tokyo.jp", "kiyose.tokyo.jp", "kodaira.tokyo.jp", "koganei.tokyo.jp", "kokubunji.tokyo.jp", "komae.tokyo.jp", "koto.tokyo.jp", "kouzushima.tokyo.jp", "kunitachi.tokyo.jp", "machida.tokyo.jp", "meguro.tokyo.jp", "minato.tokyo.jp", "mitaka.tokyo.jp", "mizuho.tokyo.jp", "musashimurayama.tokyo.jp", "musashino.tokyo.jp", "nakano.tokyo.jp", "nerima.tokyo.jp", "ogasawara.tokyo.jp", "okutama.tokyo.jp", "ome.tokyo.jp", "oshima.tokyo.jp", "ota.tokyo.jp", "setagaya.tokyo.jp", "shibuya.tokyo.jp", "shinagawa.tokyo.jp", "shinjuku.tokyo.jp", "suginami.tokyo.jp", "sumida.tokyo.jp", "tachikawa.tokyo.jp", "taito.tokyo.jp", "tama.tokyo.jp", "toshima.tokyo.jp", "chizu.tottori.jp", "hino.tottori.jp", "kawahara.tottori.jp", "koge.tottori.jp", "kotoura.tottori.jp", "misasa.tottori.jp", "nanbu.tottori.jp", "nichinan.tottori.jp", "sakaiminato.tottori.jp", "tottori.tottori.jp", "wakasa.tottori.jp", "yazu.tottori.jp", "yonago.tottori.jp", "asahi.toyama.jp", "fuchu.toyama.jp", "fukumitsu.toyama.jp", "funahashi.toyama.jp", "himi.toyama.jp", "imizu.toyama.jp", "inami.toyama.jp", "johana.toyama.jp", "kamiichi.toyama.jp", "kurobe.toyama.jp", "nakaniikawa.toyama.jp", "namerikawa.toyama.jp", "nanto.toyama.jp", "nyuzen.toyama.jp", "oyabe.toyama.jp", "taira.toyama.jp", "takaoka.toyama.jp", "tateyama.toyama.jp", "toga.toyama.jp", "tonami.toyama.jp", "toyama.toyama.jp", "unazuki.toyama.jp", "uozu.toyama.jp", "yamada.toyama.jp", "arida.wakayama.jp", "aridagawa.wakayama.jp", "gobo.wakayama.jp", "hashimoto.wakayama.jp", "hidaka.wakayama.jp", "hirogawa.wakayama.jp", "inami.wakayama.jp", "iwade.wakayama.jp", "kainan.wakayama.jp", "kamitonda.wakayama.jp", "katsuragi.wakayama.jp", "kimino.wakayama.jp", "kinokawa.wakayama.jp", "kitayama.wakayama.jp", "koya.wakayama.jp", "koza.wakayama.jp", "kozagawa.wakayama.jp", "kudoyama.wakayama.jp", "kushimoto.wakayama.jp", "mihama.wakayama.jp", "misato.wakayama.jp", "nachikatsuura.wakayama.jp", "shingu.wakayama.jp", "shirahama.wakayama.jp", "taiji.wakayama.jp", "tanabe.wakayama.jp", "wakayama.wakayama.jp", "yuasa.wakayama.jp", "yura.wakayama.jp", "asahi.yamagata.jp", "funagata.yamagata.jp", "higashine.yamagata.jp", "iide.yamagata.jp", "kahoku.yamagata.jp", "kaminoyama.yamagata.jp", "kaneyama.yamagata.jp", "kawanishi.yamagata.jp", "mamurogawa.yamagata.jp", "mikawa.yamagata.jp", "murayama.yamagata.jp", "nagai.yamagata.jp", "nakayama.yamagata.jp", "nanyo.yamagata.jp", "nishikawa.yamagata.jp", "obanazawa.yamagata.jp", "oe.yamagata.jp", "oguni.yamagata.jp", "ohkura.yamagata.jp", "oishida.yamagata.jp", "sagae.yamagata.jp", "sakata.yamagata.jp", "sakegawa.yamagata.jp", "shinjo.yamagata.jp", "shirataka.yamagata.jp", "shonai.yamagata.jp", "takahata.yamagata.jp", "tendo.yamagata.jp", "tozawa.yamagata.jp", "tsuruoka.yamagata.jp", "yamagata.yamagata.jp", "yamanobe.yamagata.jp", "yonezawa.yamagata.jp", "yuza.yamagata.jp", "abu.yamaguchi.jp", "hagi.yamaguchi.jp", "hikari.yamaguchi.jp", "hofu.yamaguchi.jp", "iwakuni.yamaguchi.jp", "kudamatsu.yamaguchi.jp", "mitou.yamaguchi.jp", "nagato.yamaguchi.jp", "oshima.yamaguchi.jp", "shimonoseki.yamaguchi.jp", "shunan.yamaguchi.jp", "tabuse.yamaguchi.jp", "tokuyama.yamaguchi.jp", "toyota.yamaguchi.jp", "ube.yamaguchi.jp", "yuu.yamaguchi.jp", "chuo.yamanashi.jp", "doshi.yamanashi.jp", "fuefuki.yamanashi.jp", "fujikawa.yamanashi.jp", "fujikawaguchiko.yamanashi.jp", "fujiyoshida.yamanashi.jp", "hayakawa.yamanashi.jp", "hokuto.yamanashi.jp", "ichikawamisato.yamanashi.jp", "kai.yamanashi.jp", "kofu.yamanashi.jp", "koshu.yamanashi.jp", "kosuge.yamanashi.jp", "minami-alps.yamanashi.jp", "minobu.yamanashi.jp", "nakamichi.yamanashi.jp", "nanbu.yamanashi.jp", "narusawa.yamanashi.jp", "nirasaki.yamanashi.jp", "nishikatsura.yamanashi.jp", "oshino.yamanashi.jp", "otsuki.yamanashi.jp", "showa.yamanashi.jp", "tabayama.yamanashi.jp", "tsuru.yamanashi.jp", "uenohara.yamanashi.jp", "yamanakako.yamanashi.jp", "yamanashi.yamanashi.jp", "ke", "ac.ke", "co.ke", "go.ke", "info.ke", "me.ke", "mobi.ke", "ne.ke", "or.ke", "sc.ke", "kg", "com.kg", "edu.kg", "gov.kg", "mil.kg", "net.kg", "org.kg", "*.kh", "ki", "biz.ki", "com.ki", "edu.ki", "gov.ki", "info.ki", "net.ki", "org.ki", "km", "ass.km", "com.km", "edu.km", "gov.km", "mil.km", "nom.km", "org.km", "prd.km", "tm.km", "asso.km", "coop.km", "gouv.km", "medecin.km", "notaires.km", "pharmaciens.km", "presse.km", "veterinaire.km", "kn", "edu.kn", "gov.kn", "net.kn", "org.kn", "kp", "com.kp", "edu.kp", "gov.kp", "org.kp", "rep.kp", "tra.kp", "kr", "ac.kr", "co.kr", "es.kr", "go.kr", "hs.kr", "kg.kr", "mil.kr", "ms.kr", "ne.kr", "or.kr", "pe.kr", "re.kr", "sc.kr", "busan.kr", "chungbuk.kr", "chungnam.kr", "daegu.kr", "daejeon.kr", "gangwon.kr", "gwangju.kr", "gyeongbuk.kr", "gyeonggi.kr", "gyeongnam.kr", "incheon.kr", "jeju.kr", "jeonbuk.kr", "jeonnam.kr", "seoul.kr", "ulsan.kr", "kw", "com.kw", "edu.kw", "emb.kw", "gov.kw", "ind.kw", "net.kw", "org.kw", "ky", "com.ky", "edu.ky", "net.ky", "org.ky", "kz", "com.kz", "edu.kz", "gov.kz", "mil.kz", "net.kz", "org.kz", "la", "com.la", "edu.la", "gov.la", "info.la", "int.la", "net.la", "org.la", "per.la", "lb", "com.lb", "edu.lb", "gov.lb", "net.lb", "org.lb", "lc", "co.lc", "com.lc", "edu.lc", "gov.lc", "net.lc", "org.lc", "li", "lk", "ac.lk", "assn.lk", "com.lk", "edu.lk", "gov.lk", "grp.lk", "hotel.lk", "int.lk", "ltd.lk", "net.lk", "ngo.lk", "org.lk", "sch.lk", "soc.lk", "web.lk", "lr", "com.lr", "edu.lr", "gov.lr", "net.lr", "org.lr", "ls", "ac.ls", "biz.ls", "co.ls", "edu.ls", "gov.ls", "info.ls", "net.ls", "org.ls", "sc.ls", "lt", "gov.lt", "lu", "lv", "asn.lv", "com.lv", "conf.lv", "edu.lv", "gov.lv", "id.lv", "mil.lv", "net.lv", "org.lv", "ly", "com.ly", "edu.ly", "gov.ly", "id.ly", "med.ly", "net.ly", "org.ly", "plc.ly", "sch.ly", "ma", "ac.ma", "co.ma", "gov.ma", "net.ma", "org.ma", "press.ma", "mc", "asso.mc", "tm.mc", "md", "me", "ac.me", "co.me", "edu.me", "gov.me", "its.me", "net.me", "org.me", "priv.me", "mg", "co.mg", "com.mg", "edu.mg", "gov.mg", "mil.mg", "nom.mg", "org.mg", "prd.mg", "mh", "mil", "mk", "com.mk", "edu.mk", "gov.mk", "inf.mk", "name.mk", "net.mk", "org.mk", "ml", "com.ml", "edu.ml", "gouv.ml", "gov.ml", "net.ml", "org.ml", "presse.ml", "*.mm", "mn", "edu.mn", "gov.mn", "org.mn", "mo", "com.mo", "edu.mo", "gov.mo", "net.mo", "org.mo", "mobi", "mp", "mq", "mr", "gov.mr", "ms", "com.ms", "edu.ms", "gov.ms", "net.ms", "org.ms", "mt", "com.mt", "edu.mt", "net.mt", "org.mt", "mu", "ac.mu", "co.mu", "com.mu", "gov.mu", "net.mu", "or.mu", "org.mu", "museum", "mv", "aero.mv", "biz.mv", "com.mv", "coop.mv", "edu.mv", "gov.mv", "info.mv", "int.mv", "mil.mv", "museum.mv", "name.mv", "net.mv", "org.mv", "pro.mv", "mw", "ac.mw", "biz.mw", "co.mw", "com.mw", "coop.mw", "edu.mw", "gov.mw", "int.mw", "net.mw", "org.mw", "mx", "com.mx", "edu.mx", "gob.mx", "net.mx", "org.mx", "my", "biz.my", "com.my", "edu.my", "gov.my", "mil.my", "name.my", "net.my", "org.my", "mz", "ac.mz", "adv.mz", "co.mz", "edu.mz", "gov.mz", "mil.mz", "net.mz", "org.mz", "na", "alt.na", "co.na", "com.na", "gov.na", "net.na", "org.na", "name", "nc", "asso.nc", "nom.nc", "ne", "net", "nf", "arts.nf", "com.nf", "firm.nf", "info.nf", "net.nf", "other.nf", "per.nf", "rec.nf", "store.nf", "web.nf", "ng", "com.ng", "edu.ng", "gov.ng", "i.ng", "mil.ng", "mobi.ng", "name.ng", "net.ng", "org.ng", "sch.ng", "ni", "ac.ni", "biz.ni", "co.ni", "com.ni", "edu.ni", "gob.ni", "in.ni", "info.ni", "int.ni", "mil.ni", "net.ni", "nom.ni", "org.ni", "web.ni", "nl", "no", "fhs.no", "folkebibl.no", "fylkesbibl.no", "idrett.no", "museum.no", "priv.no", "vgs.no", "dep.no", "herad.no", "kommune.no", "mil.no", "stat.no", "aa.no", "ah.no", "bu.no", "fm.no", "hl.no", "hm.no", "jan-mayen.no", "mr.no", "nl.no", "nt.no", "of.no", "ol.no", "oslo.no", "rl.no", "sf.no", "st.no", "svalbard.no", "tm.no", "tr.no", "va.no", "vf.no", "gs.aa.no", "gs.ah.no", "gs.bu.no", "gs.fm.no", "gs.hl.no", "gs.hm.no", "gs.jan-mayen.no", "gs.mr.no", "gs.nl.no", "gs.nt.no", "gs.of.no", "gs.ol.no", "gs.oslo.no", "gs.rl.no", "gs.sf.no", "gs.st.no", "gs.svalbard.no", "gs.tm.no", "gs.tr.no", "gs.va.no", "gs.vf.no", "akrehamn.no", "\xE5krehamn.no", "algard.no", "\xE5lg\xE5rd.no", "arna.no", "bronnoysund.no", "br\xF8nn\xF8ysund.no", "brumunddal.no", "bryne.no", "drobak.no", "dr\xF8bak.no", "egersund.no", "fetsund.no", "floro.no", "flor\xF8.no", "fredrikstad.no", "hokksund.no", "honefoss.no", "h\xF8nefoss.no", "jessheim.no", "jorpeland.no", "j\xF8rpeland.no", "kirkenes.no", "kopervik.no", "krokstadelva.no", "langevag.no", "langev\xE5g.no", "leirvik.no", "mjondalen.no", "mj\xF8ndalen.no", "mo-i-rana.no", "mosjoen.no", "mosj\xF8en.no", "nesoddtangen.no", "orkanger.no", "osoyro.no", "os\xF8yro.no", "raholt.no", "r\xE5holt.no", "sandnessjoen.no", "sandnessj\xF8en.no", "skedsmokorset.no", "slattum.no", "spjelkavik.no", "stathelle.no", "stavern.no", "stjordalshalsen.no", "stj\xF8rdalshalsen.no", "tananger.no", "tranby.no", "vossevangen.no", "aarborte.no", "aejrie.no", "afjord.no", "\xE5fjord.no", "agdenes.no", "nes.akershus.no", "aknoluokta.no", "\xE1k\u014Boluokta.no", "al.no", "\xE5l.no", "alaheadju.no", "\xE1laheadju.no", "alesund.no", "\xE5lesund.no", "alstahaug.no", "alta.no", "\xE1lt\xE1.no", "alvdal.no", "amli.no", "\xE5mli.no", "amot.no", "\xE5mot.no", "andasuolo.no", "andebu.no", "andoy.no", "and\xF8y.no", "ardal.no", "\xE5rdal.no", "aremark.no", "arendal.no", "\xE5s.no", "aseral.no", "\xE5seral.no", "asker.no", "askim.no", "askoy.no", "ask\xF8y.no", "askvoll.no", "asnes.no", "\xE5snes.no", "audnedaln.no", "aukra.no", "aure.no", "aurland.no", "aurskog-holand.no", "aurskog-h\xF8land.no", "austevoll.no", "austrheim.no", "averoy.no", "aver\xF8y.no", "badaddja.no", "b\xE5d\xE5ddj\xE5.no", "b\xE6rum.no", "bahcavuotna.no", "b\xE1hcavuotna.no", "bahccavuotna.no", "b\xE1hccavuotna.no", "baidar.no", "b\xE1id\xE1r.no", "bajddar.no", "b\xE1jddar.no", "balat.no", "b\xE1l\xE1t.no", "balestrand.no", "ballangen.no", "balsfjord.no", "bamble.no", "bardu.no", "barum.no", "batsfjord.no", "b\xE5tsfjord.no", "bearalvahki.no", "bearalv\xE1hki.no", "beardu.no", "beiarn.no", "berg.no", "bergen.no", "berlevag.no", "berlev\xE5g.no", "bievat.no", "biev\xE1t.no", "bindal.no", "birkenes.no", "bjarkoy.no", "bjark\xF8y.no", "bjerkreim.no", "bjugn.no", "bodo.no", "bod\xF8.no", "bokn.no", "bomlo.no", "b\xF8mlo.no", "bremanger.no", "bronnoy.no", "br\xF8nn\xF8y.no", "budejju.no", "nes.buskerud.no", "bygland.no", "bykle.no", "cahcesuolo.no", "\u010D\xE1hcesuolo.no", "davvenjarga.no", "davvenj\xE1rga.no", "davvesiida.no", "deatnu.no", "dielddanuorri.no", "divtasvuodna.no", "divttasvuotna.no", "donna.no", "d\xF8nna.no", "dovre.no", "drammen.no", "drangedal.no", "dyroy.no", "dyr\xF8y.no", "eid.no", "eidfjord.no", "eidsberg.no", "eidskog.no", "eidsvoll.no", "eigersund.no", "elverum.no", "enebakk.no", "engerdal.no", "etne.no", "etnedal.no", "evenassi.no", "even\xE1\u0161\u0161i.no", "evenes.no", "evje-og-hornnes.no", "farsund.no", "fauske.no", "fedje.no", "fet.no", "finnoy.no", "finn\xF8y.no", "fitjar.no", "fjaler.no", "fjell.no", "fla.no", "fl\xE5.no", "flakstad.no", "flatanger.no", "flekkefjord.no", "flesberg.no", "flora.no", "folldal.no", "forde.no", "f\xF8rde.no", "forsand.no", "fosnes.no", "fr\xE6na.no", "frana.no", "frei.no", "frogn.no", "froland.no", "frosta.no", "froya.no", "fr\xF8ya.no", "fuoisku.no", "fuossko.no", "fusa.no", "fyresdal.no", "gaivuotna.no", "g\xE1ivuotna.no", "galsa.no", "g\xE1ls\xE1.no", "gamvik.no", "gangaviika.no", "g\xE1\u014Bgaviika.no", "gaular.no", "gausdal.no", "giehtavuoatna.no", "gildeskal.no", "gildesk\xE5l.no", "giske.no", "gjemnes.no", "gjerdrum.no", "gjerstad.no", "gjesdal.no", "gjovik.no", "gj\xF8vik.no", "gloppen.no", "gol.no", "gran.no", "grane.no", "granvin.no", "gratangen.no", "grimstad.no", "grong.no", "grue.no", "gulen.no", "guovdageaidnu.no", "ha.no", "h\xE5.no", "habmer.no", "h\xE1bmer.no", "hadsel.no", "h\xE6gebostad.no", "hagebostad.no", "halden.no", "halsa.no", "hamar.no", "hamaroy.no", "hammarfeasta.no", "h\xE1mm\xE1rfeasta.no", "hammerfest.no", "hapmir.no", "h\xE1pmir.no", "haram.no", "hareid.no", "harstad.no", "hasvik.no", "hattfjelldal.no", "haugesund.no", "os.hedmark.no", "valer.hedmark.no", "v\xE5ler.hedmark.no", "hemne.no", "hemnes.no", "hemsedal.no", "hitra.no", "hjartdal.no", "hjelmeland.no", "hobol.no", "hob\xF8l.no", "hof.no", "hol.no", "hole.no", "holmestrand.no", "holtalen.no", "holt\xE5len.no", "os.hordaland.no", "hornindal.no", "horten.no", "hoyanger.no", "h\xF8yanger.no", "hoylandet.no", "h\xF8ylandet.no", "hurdal.no", "hurum.no", "hvaler.no", "hyllestad.no", "ibestad.no", "inderoy.no", "inder\xF8y.no", "iveland.no", "ivgu.no", "jevnaker.no", "jolster.no", "j\xF8lster.no", "jondal.no", "kafjord.no", "k\xE5fjord.no", "karasjohka.no", "k\xE1r\xE1\u0161johka.no", "karasjok.no", "karlsoy.no", "karmoy.no", "karm\xF8y.no", "kautokeino.no", "klabu.no", "kl\xE6bu.no", "klepp.no", "kongsberg.no", "kongsvinger.no", "kraanghke.no", "kr\xE5anghke.no", "kragero.no", "krager\xF8.no", "kristiansand.no", "kristiansund.no", "krodsherad.no", "kr\xF8dsherad.no", "kv\xE6fjord.no", "kv\xE6nangen.no", "kvafjord.no", "kvalsund.no", "kvam.no", "kvanangen.no", "kvinesdal.no", "kvinnherad.no", "kviteseid.no", "kvitsoy.no", "kvits\xF8y.no", "laakesvuemie.no", "l\xE6rdal.no", "lahppi.no", "l\xE1hppi.no", "lardal.no", "larvik.no", "lavagis.no", "lavangen.no", "leangaviika.no", "lea\u014Bgaviika.no", "lebesby.no", "leikanger.no", "leirfjord.no", "leka.no", "leksvik.no", "lenvik.no", "lerdal.no", "lesja.no", "levanger.no", "lier.no", "lierne.no", "lillehammer.no", "lillesand.no", "lindas.no", "lind\xE5s.no", "lindesnes.no", "loabat.no", "loab\xE1t.no", "lodingen.no", "l\xF8dingen.no", "lom.no", "loppa.no", "lorenskog.no", "l\xF8renskog.no", "loten.no", "l\xF8ten.no", "lund.no", "lunner.no", "luroy.no", "lur\xF8y.no", "luster.no", "lyngdal.no", "lyngen.no", "malatvuopmi.no", "m\xE1latvuopmi.no", "malselv.no", "m\xE5lselv.no", "malvik.no", "mandal.no", "marker.no", "marnardal.no", "masfjorden.no", "masoy.no", "m\xE5s\xF8y.no", "matta-varjjat.no", "m\xE1tta-v\xE1rjjat.no", "meland.no", "meldal.no", "melhus.no", "meloy.no", "mel\xF8y.no", "meraker.no", "mer\xE5ker.no", "midsund.no", "midtre-gauldal.no", "moareke.no", "mo\xE5reke.no", "modalen.no", "modum.no", "molde.no", "heroy.more-og-romsdal.no", "sande.more-og-romsdal.no", "her\xF8y.m\xF8re-og-romsdal.no", "sande.m\xF8re-og-romsdal.no", "moskenes.no", "moss.no", "mosvik.no", "muosat.no", "muos\xE1t.no", "naamesjevuemie.no", "n\xE5\xE5mesjevuemie.no", "n\xE6r\xF8y.no", "namdalseid.no", "namsos.no", "namsskogan.no", "nannestad.no", "naroy.no", "narviika.no", "narvik.no", "naustdal.no", "navuotna.no", "n\xE1vuotna.no", "nedre-eiker.no", "nesna.no", "nesodden.no", "nesseby.no", "nesset.no", "nissedal.no", "nittedal.no", "nord-aurdal.no", "nord-fron.no", "nord-odal.no", "norddal.no", "nordkapp.no", "bo.nordland.no", "b\xF8.nordland.no", "heroy.nordland.no", "her\xF8y.nordland.no", "nordre-land.no", "nordreisa.no", "nore-og-uvdal.no", "notodden.no", "notteroy.no", "n\xF8tter\xF8y.no", "odda.no", "oksnes.no", "\xF8ksnes.no", "omasvuotna.no", "oppdal.no", "oppegard.no", "oppeg\xE5rd.no", "orkdal.no", "orland.no", "\xF8rland.no", "orskog.no", "\xF8rskog.no", "orsta.no", "\xF8rsta.no", "osen.no", "osteroy.no", "oster\xF8y.no", "valer.ostfold.no", "v\xE5ler.\xF8stfold.no", "ostre-toten.no", "\xF8stre-toten.no", "overhalla.no", "ovre-eiker.no", "\xF8vre-eiker.no", "oyer.no", "\xF8yer.no", "oygarden.no", "\xF8ygarden.no", "oystre-slidre.no", "\xF8ystre-slidre.no", "porsanger.no", "porsangu.no", "pors\xE1\u014Bgu.no", "porsgrunn.no", "rade.no", "r\xE5de.no", "radoy.no", "rad\xF8y.no", "r\xE6lingen.no", "rahkkeravju.no", "r\xE1hkker\xE1vju.no", "raisa.no", "r\xE1isa.no", "rakkestad.no", "ralingen.no", "rana.no", "randaberg.no", "rauma.no", "rendalen.no", "rennebu.no", "rennesoy.no", "rennes\xF8y.no", "rindal.no", "ringebu.no", "ringerike.no", "ringsaker.no", "risor.no", "ris\xF8r.no", "rissa.no", "roan.no", "rodoy.no", "r\xF8d\xF8y.no", "rollag.no", "romsa.no", "romskog.no", "r\xF8mskog.no", "roros.no", "r\xF8ros.no", "rost.no", "r\xF8st.no", "royken.no", "r\xF8yken.no", "royrvik.no", "r\xF8yrvik.no", "ruovat.no", "rygge.no", "salangen.no", "salat.no", "s\xE1lat.no", "s\xE1l\xE1t.no", "saltdal.no", "samnanger.no", "sandefjord.no", "sandnes.no", "sandoy.no", "sand\xF8y.no", "sarpsborg.no", "sauda.no", "sauherad.no", "sel.no", "selbu.no", "selje.no", "seljord.no", "siellak.no", "sigdal.no", "siljan.no", "sirdal.no", "skanit.no", "sk\xE1nit.no", "skanland.no", "sk\xE5nland.no", "skaun.no", "skedsmo.no", "ski.no", "skien.no", "skierva.no", "skierv\xE1.no", "skiptvet.no", "skjak.no", "skj\xE5k.no", "skjervoy.no", "skjerv\xF8y.no", "skodje.no", "smola.no", "sm\xF8la.no", "snaase.no", "sn\xE5ase.no", "snasa.no", "sn\xE5sa.no", "snillfjord.no", "snoasa.no", "sogndal.no", "sogne.no", "s\xF8gne.no", "sokndal.no", "sola.no", "solund.no", "somna.no", "s\xF8mna.no", "sondre-land.no", "s\xF8ndre-land.no", "songdalen.no", "sor-aurdal.no", "s\xF8r-aurdal.no", "sor-fron.no", "s\xF8r-fron.no", "sor-odal.no", "s\xF8r-odal.no", "sor-varanger.no", "s\xF8r-varanger.no", "sorfold.no", "s\xF8rfold.no", "sorreisa.no", "s\xF8rreisa.no", "sortland.no", "sorum.no", "s\xF8rum.no", "spydeberg.no", "stange.no", "stavanger.no", "steigen.no", "steinkjer.no", "stjordal.no", "stj\xF8rdal.no", "stokke.no", "stor-elvdal.no", "stord.no", "stordal.no", "storfjord.no", "strand.no", "stranda.no", "stryn.no", "sula.no", "suldal.no", "sund.no", "sunndal.no", "surnadal.no", "sveio.no", "svelvik.no", "sykkylven.no", "tana.no", "bo.telemark.no", "b\xF8.telemark.no", "time.no", "tingvoll.no", "tinn.no", "tjeldsund.no", "tjome.no", "tj\xF8me.no", "tokke.no", "tolga.no", "tonsberg.no", "t\xF8nsberg.no", "torsken.no", "tr\xE6na.no", "trana.no", "tranoy.no", "tran\xF8y.no", "troandin.no", "trogstad.no", "tr\xF8gstad.no", "tromsa.no", "tromso.no", "troms\xF8.no", "trondheim.no", "trysil.no", "tvedestrand.no", "tydal.no", "tynset.no", "tysfjord.no", "tysnes.no", "tysv\xE6r.no", "tysvar.no", "ullensaker.no", "ullensvang.no", "ulvik.no", "unjarga.no", "unj\xE1rga.no", "utsira.no", "vaapste.no", "vadso.no", "vads\xF8.no", "v\xE6r\xF8y.no", "vaga.no", "v\xE5g\xE5.no", "vagan.no", "v\xE5gan.no", "vagsoy.no", "v\xE5gs\xF8y.no", "vaksdal.no", "valle.no", "vang.no", "vanylven.no", "vardo.no", "vard\xF8.no", "varggat.no", "v\xE1rgg\xE1t.no", "varoy.no", "vefsn.no", "vega.no", "vegarshei.no", "veg\xE5rshei.no", "vennesla.no", "verdal.no", "verran.no", "vestby.no", "sande.vestfold.no", "vestnes.no", "vestre-slidre.no", "vestre-toten.no", "vestvagoy.no", "vestv\xE5g\xF8y.no", "vevelstad.no", "vik.no", "vikna.no", "vindafjord.no", "voagat.no", "volda.no", "voss.no", "*.np", "nr", "biz.nr", "com.nr", "edu.nr", "gov.nr", "info.nr", "net.nr", "org.nr", "nu", "nz", "ac.nz", "co.nz", "cri.nz", "geek.nz", "gen.nz", "govt.nz", "health.nz", "iwi.nz", "kiwi.nz", "maori.nz", "m\u0101ori.nz", "mil.nz", "net.nz", "org.nz", "parliament.nz", "school.nz", "om", "co.om", "com.om", "edu.om", "gov.om", "med.om", "museum.om", "net.om", "org.om", "pro.om", "onion", "org", "pa", "abo.pa", "ac.pa", "com.pa", "edu.pa", "gob.pa", "ing.pa", "med.pa", "net.pa", "nom.pa", "org.pa", "sld.pa", "pe", "com.pe", "edu.pe", "gob.pe", "mil.pe", "net.pe", "nom.pe", "org.pe", "pf", "com.pf", "edu.pf", "org.pf", "*.pg", "ph", "com.ph", "edu.ph", "gov.ph", "i.ph", "mil.ph", "net.ph", "ngo.ph", "org.ph", "pk", "ac.pk", "biz.pk", "com.pk", "edu.pk", "fam.pk", "gkp.pk", "gob.pk", "gog.pk", "gok.pk", "gon.pk", "gop.pk", "gos.pk", "gov.pk", "net.pk", "org.pk", "web.pk", "pl", "com.pl", "net.pl", "org.pl", "agro.pl", "aid.pl", "atm.pl", "auto.pl", "biz.pl", "edu.pl", "gmina.pl", "gsm.pl", "info.pl", "mail.pl", "media.pl", "miasta.pl", "mil.pl", "nieruchomosci.pl", "nom.pl", "pc.pl", "powiat.pl", "priv.pl", "realestate.pl", "rel.pl", "sex.pl", "shop.pl", "sklep.pl", "sos.pl", "szkola.pl", "targi.pl", "tm.pl", "tourism.pl", "travel.pl", "turystyka.pl", "gov.pl", "ap.gov.pl", "griw.gov.pl", "ic.gov.pl", "is.gov.pl", "kmpsp.gov.pl", "konsulat.gov.pl", "kppsp.gov.pl", "kwp.gov.pl", "kwpsp.gov.pl", "mup.gov.pl", "mw.gov.pl", "oia.gov.pl", "oirm.gov.pl", "oke.gov.pl", "oow.gov.pl", "oschr.gov.pl", "oum.gov.pl", "pa.gov.pl", "pinb.gov.pl", "piw.gov.pl", "po.gov.pl", "pr.gov.pl", "psp.gov.pl", "psse.gov.pl", "pup.gov.pl", "rzgw.gov.pl", "sa.gov.pl", "sdn.gov.pl", "sko.gov.pl", "so.gov.pl", "sr.gov.pl", "starostwo.gov.pl", "ug.gov.pl", "ugim.gov.pl", "um.gov.pl", "umig.gov.pl", "upow.gov.pl", "uppo.gov.pl", "us.gov.pl", "uw.gov.pl", "uzs.gov.pl", "wif.gov.pl", "wiih.gov.pl", "winb.gov.pl", "wios.gov.pl", "witd.gov.pl", "wiw.gov.pl", "wkz.gov.pl", "wsa.gov.pl", "wskr.gov.pl", "wsse.gov.pl", "wuoz.gov.pl", "wzmiuw.gov.pl", "zp.gov.pl", "zpisdn.gov.pl", "augustow.pl", "babia-gora.pl", "bedzin.pl", "beskidy.pl", "bialowieza.pl", "bialystok.pl", "bielawa.pl", "bieszczady.pl", "boleslawiec.pl", "bydgoszcz.pl", "bytom.pl", "cieszyn.pl", "czeladz.pl", "czest.pl", "dlugoleka.pl", "elblag.pl", "elk.pl", "glogow.pl", "gniezno.pl", "gorlice.pl", "grajewo.pl", "ilawa.pl", "jaworzno.pl", "jelenia-gora.pl", "jgora.pl", "kalisz.pl", "karpacz.pl", "kartuzy.pl", "kaszuby.pl", "katowice.pl", "kazimierz-dolny.pl", "kepno.pl", "ketrzyn.pl", "klodzko.pl", "kobierzyce.pl", "kolobrzeg.pl", "konin.pl", "konskowola.pl", "kutno.pl", "lapy.pl", "lebork.pl", "legnica.pl", "lezajsk.pl", "limanowa.pl", "lomza.pl", "lowicz.pl", "lubin.pl", "lukow.pl", "malbork.pl", "malopolska.pl", "mazowsze.pl", "mazury.pl", "mielec.pl", "mielno.pl", "mragowo.pl", "naklo.pl", "nowaruda.pl", "nysa.pl", "olawa.pl", "olecko.pl", "olkusz.pl", "olsztyn.pl", "opoczno.pl", "opole.pl", "ostroda.pl", "ostroleka.pl", "ostrowiec.pl", "ostrowwlkp.pl", "pila.pl", "pisz.pl", "podhale.pl", "podlasie.pl", "polkowice.pl", "pomorskie.pl", "pomorze.pl", "prochowice.pl", "pruszkow.pl", "przeworsk.pl", "pulawy.pl", "radom.pl", "rawa-maz.pl", "rybnik.pl", "rzeszow.pl", "sanok.pl", "sejny.pl", "skoczow.pl", "slask.pl", "slupsk.pl", "sosnowiec.pl", "stalowa-wola.pl", "starachowice.pl", "stargard.pl", "suwalki.pl", "swidnica.pl", "swiebodzin.pl", "swinoujscie.pl", "szczecin.pl", "szczytno.pl", "tarnobrzeg.pl", "tgory.pl", "turek.pl", "tychy.pl", "ustka.pl", "walbrzych.pl", "warmia.pl", "warszawa.pl", "waw.pl", "wegrow.pl", "wielun.pl", "wlocl.pl", "wloclawek.pl", "wodzislaw.pl", "wolomin.pl", "wroclaw.pl", "zachpomor.pl", "zagan.pl", "zarow.pl", "zgora.pl", "zgorzelec.pl", "pm", "pn", "co.pn", "edu.pn", "gov.pn", "net.pn", "org.pn", "post", "pr", "biz.pr", "com.pr", "edu.pr", "gov.pr", "info.pr", "isla.pr", "name.pr", "net.pr", "org.pr", "pro.pr", "ac.pr", "est.pr", "prof.pr", "pro", "aaa.pro", "aca.pro", "acct.pro", "avocat.pro", "bar.pro", "cpa.pro", "eng.pro", "jur.pro", "law.pro", "med.pro", "recht.pro", "ps", "com.ps", "edu.ps", "gov.ps", "net.ps", "org.ps", "plo.ps", "sec.ps", "pt", "com.pt", "edu.pt", "gov.pt", "int.pt", "net.pt", "nome.pt", "org.pt", "publ.pt", "pw", "belau.pw", "co.pw", "ed.pw", "go.pw", "or.pw", "py", "com.py", "coop.py", "edu.py", "gov.py", "mil.py", "net.py", "org.py", "qa", "com.qa", "edu.qa", "gov.qa", "mil.qa", "name.qa", "net.qa", "org.qa", "sch.qa", "re", "asso.re", "com.re", "ro", "arts.ro", "com.ro", "firm.ro", "info.ro", "nom.ro", "nt.ro", "org.ro", "rec.ro", "store.ro", "tm.ro", "www.ro", "rs", "ac.rs", "co.rs", "edu.rs", "gov.rs", "in.rs", "org.rs", "ru", "rw", "ac.rw", "co.rw", "coop.rw", "gov.rw", "mil.rw", "net.rw", "org.rw", "sa", "com.sa", "edu.sa", "gov.sa", "med.sa", "net.sa", "org.sa", "pub.sa", "sch.sa", "sb", "com.sb", "edu.sb", "gov.sb", "net.sb", "org.sb", "sc", "com.sc", "edu.sc", "gov.sc", "net.sc", "org.sc", "sd", "com.sd", "edu.sd", "gov.sd", "info.sd", "med.sd", "net.sd", "org.sd", "tv.sd", "se", "a.se", "ac.se", "b.se", "bd.se", "brand.se", "c.se", "d.se", "e.se", "f.se", "fh.se", "fhsk.se", "fhv.se", "g.se", "h.se", "i.se", "k.se", "komforb.se", "kommunalforbund.se", "komvux.se", "l.se", "lanbib.se", "m.se", "n.se", "naturbruksgymn.se", "o.se", "org.se", "p.se", "parti.se", "pp.se", "press.se", "r.se", "s.se", "t.se", "tm.se", "u.se", "w.se", "x.se", "y.se", "z.se", "sg", "com.sg", "edu.sg", "gov.sg", "net.sg", "org.sg", "sh", "com.sh", "gov.sh", "mil.sh", "net.sh", "org.sh", "si", "sj", "sk", "sl", "com.sl", "edu.sl", "gov.sl", "net.sl", "org.sl", "sm", "sn", "art.sn", "com.sn", "edu.sn", "gouv.sn", "org.sn", "perso.sn", "univ.sn", "so", "com.so", "edu.so", "gov.so", "me.so", "net.so", "org.so", "sr", "ss", "biz.ss", "co.ss", "com.ss", "edu.ss", "gov.ss", "me.ss", "net.ss", "org.ss", "sch.ss", "st", "co.st", "com.st", "consulado.st", "edu.st", "embaixada.st", "mil.st", "net.st", "org.st", "principe.st", "saotome.st", "store.st", "su", "sv", "com.sv", "edu.sv", "gob.sv", "org.sv", "red.sv", "sx", "gov.sx", "sy", "com.sy", "edu.sy", "gov.sy", "mil.sy", "net.sy", "org.sy", "sz", "ac.sz", "co.sz", "org.sz", "tc", "td", "tel", "tf", "tg", "th", "ac.th", "co.th", "go.th", "in.th", "mi.th", "net.th", "or.th", "tj", "ac.tj", "biz.tj", "co.tj", "com.tj", "edu.tj", "go.tj", "gov.tj", "int.tj", "mil.tj", "name.tj", "net.tj", "nic.tj", "org.tj", "test.tj", "web.tj", "tk", "tl", "gov.tl", "tm", "co.tm", "com.tm", "edu.tm", "gov.tm", "mil.tm", "net.tm", "nom.tm", "org.tm", "tn", "com.tn", "ens.tn", "fin.tn", "gov.tn", "ind.tn", "info.tn", "intl.tn", "mincom.tn", "nat.tn", "net.tn", "org.tn", "perso.tn", "tourism.tn", "to", "com.to", "edu.to", "gov.to", "mil.to", "net.to", "org.to", "tr", "av.tr", "bbs.tr", "bel.tr", "biz.tr", "com.tr", "dr.tr", "edu.tr", "gen.tr", "gov.tr", "info.tr", "k12.tr", "kep.tr", "mil.tr", "name.tr", "net.tr", "org.tr", "pol.tr", "tel.tr", "tsk.tr", "tv.tr", "web.tr", "nc.tr", "gov.nc.tr", "tt", "biz.tt", "co.tt", "com.tt", "edu.tt", "gov.tt", "info.tt", "mil.tt", "name.tt", "net.tt", "org.tt", "pro.tt", "tv", "tw", "club.tw", "com.tw", "ebiz.tw", "edu.tw", "game.tw", "gov.tw", "idv.tw", "mil.tw", "net.tw", "org.tw", "tz", "ac.tz", "co.tz", "go.tz", "hotel.tz", "info.tz", "me.tz", "mil.tz", "mobi.tz", "ne.tz", "or.tz", "sc.tz", "tv.tz", "ua", "com.ua", "edu.ua", "gov.ua", "in.ua", "net.ua", "org.ua", "cherkassy.ua", "cherkasy.ua", "chernigov.ua", "chernihiv.ua", "chernivtsi.ua", "chernovtsy.ua", "ck.ua", "cn.ua", "cr.ua", "crimea.ua", "cv.ua", "dn.ua", "dnepropetrovsk.ua", "dnipropetrovsk.ua", "donetsk.ua", "dp.ua", "if.ua", "ivano-frankivsk.ua", "kh.ua", "kharkiv.ua", "kharkov.ua", "kherson.ua", "khmelnitskiy.ua", "khmelnytskyi.ua", "kiev.ua", "kirovograd.ua", "km.ua", "kr.ua", "kropyvnytskyi.ua", "krym.ua", "ks.ua", "kv.ua", "kyiv.ua", "lg.ua", "lt.ua", "lugansk.ua", "luhansk.ua", "lutsk.ua", "lv.ua", "lviv.ua", "mk.ua", "mykolaiv.ua", "nikolaev.ua", "od.ua", "odesa.ua", "odessa.ua", "pl.ua", "poltava.ua", "rivne.ua", "rovno.ua", "rv.ua", "sb.ua", "sebastopol.ua", "sevastopol.ua", "sm.ua", "sumy.ua", "te.ua", "ternopil.ua", "uz.ua", "uzhgorod.ua", "uzhhorod.ua", "vinnica.ua", "vinnytsia.ua", "vn.ua", "volyn.ua", "yalta.ua", "zakarpattia.ua", "zaporizhzhe.ua", "zaporizhzhia.ua", "zhitomir.ua", "zhytomyr.ua", "zp.ua", "zt.ua", "ug", "ac.ug", "co.ug", "com.ug", "go.ug", "ne.ug", "or.ug", "org.ug", "sc.ug", "uk", "ac.uk", "co.uk", "gov.uk", "ltd.uk", "me.uk", "net.uk", "nhs.uk", "org.uk", "plc.uk", "police.uk", "*.sch.uk", "us", "dni.us", "fed.us", "isa.us", "kids.us", "nsn.us", "ak.us", "al.us", "ar.us", "as.us", "az.us", "ca.us", "co.us", "ct.us", "dc.us", "de.us", "fl.us", "ga.us", "gu.us", "hi.us", "ia.us", "id.us", "il.us", "in.us", "ks.us", "ky.us", "la.us", "ma.us", "md.us", "me.us", "mi.us", "mn.us", "mo.us", "ms.us", "mt.us", "nc.us", "nd.us", "ne.us", "nh.us", "nj.us", "nm.us", "nv.us", "ny.us", "oh.us", "ok.us", "or.us", "pa.us", "pr.us", "ri.us", "sc.us", "sd.us", "tn.us", "tx.us", "ut.us", "va.us", "vi.us", "vt.us", "wa.us", "wi.us", "wv.us", "wy.us", "k12.ak.us", "k12.al.us", "k12.ar.us", "k12.as.us", "k12.az.us", "k12.ca.us", "k12.co.us", "k12.ct.us", "k12.dc.us", "k12.fl.us", "k12.ga.us", "k12.gu.us", "k12.ia.us", "k12.id.us", "k12.il.us", "k12.in.us", "k12.ks.us", "k12.ky.us", "k12.la.us", "k12.ma.us", "k12.md.us", "k12.me.us", "k12.mi.us", "k12.mn.us", "k12.mo.us", "k12.ms.us", "k12.mt.us", "k12.nc.us", "k12.ne.us", "k12.nh.us", "k12.nj.us", "k12.nm.us", "k12.nv.us", "k12.ny.us", "k12.oh.us", "k12.ok.us", "k12.or.us", "k12.pa.us", "k12.pr.us", "k12.sc.us", "k12.tn.us", "k12.tx.us", "k12.ut.us", "k12.va.us", "k12.vi.us", "k12.vt.us", "k12.wa.us", "k12.wi.us", "cc.ak.us", "lib.ak.us", "cc.al.us", "lib.al.us", "cc.ar.us", "lib.ar.us", "cc.as.us", "lib.as.us", "cc.az.us", "lib.az.us", "cc.ca.us", "lib.ca.us", "cc.co.us", "lib.co.us", "cc.ct.us", "lib.ct.us", "cc.dc.us", "lib.dc.us", "cc.de.us", "cc.fl.us", "cc.ga.us", "cc.gu.us", "cc.hi.us", "cc.ia.us", "cc.id.us", "cc.il.us", "cc.in.us", "cc.ks.us", "cc.ky.us", "cc.la.us", "cc.ma.us", "cc.md.us", "cc.me.us", "cc.mi.us", "cc.mn.us", "cc.mo.us", "cc.ms.us", "cc.mt.us", "cc.nc.us", "cc.nd.us", "cc.ne.us", "cc.nh.us", "cc.nj.us", "cc.nm.us", "cc.nv.us", "cc.ny.us", "cc.oh.us", "cc.ok.us", "cc.or.us", "cc.pa.us", "cc.pr.us", "cc.ri.us", "cc.sc.us", "cc.sd.us", "cc.tn.us", "cc.tx.us", "cc.ut.us", "cc.va.us", "cc.vi.us", "cc.vt.us", "cc.wa.us", "cc.wi.us", "cc.wv.us", "cc.wy.us", "k12.wy.us", "lib.fl.us", "lib.ga.us", "lib.gu.us", "lib.hi.us", "lib.ia.us", "lib.id.us", "lib.il.us", "lib.in.us", "lib.ks.us", "lib.ky.us", "lib.la.us", "lib.ma.us", "lib.md.us", "lib.me.us", "lib.mi.us", "lib.mn.us", "lib.mo.us", "lib.ms.us", "lib.mt.us", "lib.nc.us", "lib.nd.us", "lib.ne.us", "lib.nh.us", "lib.nj.us", "lib.nm.us", "lib.nv.us", "lib.ny.us", "lib.oh.us", "lib.ok.us", "lib.or.us", "lib.pa.us", "lib.pr.us", "lib.ri.us", "lib.sc.us", "lib.sd.us", "lib.tn.us", "lib.tx.us", "lib.ut.us", "lib.va.us", "lib.vi.us", "lib.vt.us", "lib.wa.us", "lib.wi.us", "lib.wy.us", "chtr.k12.ma.us", "paroch.k12.ma.us", "pvt.k12.ma.us", "ann-arbor.mi.us", "cog.mi.us", "dst.mi.us", "eaton.mi.us", "gen.mi.us", "mus.mi.us", "tec.mi.us", "washtenaw.mi.us", "uy", "com.uy", "edu.uy", "gub.uy", "mil.uy", "net.uy", "org.uy", "uz", "co.uz", "com.uz", "net.uz", "org.uz", "va", "vc", "com.vc", "edu.vc", "gov.vc", "mil.vc", "net.vc", "org.vc", "ve", "arts.ve", "bib.ve", "co.ve", "com.ve", "e12.ve", "edu.ve", "firm.ve", "gob.ve", "gov.ve", "info.ve", "int.ve", "mil.ve", "net.ve", "nom.ve", "org.ve", "rar.ve", "rec.ve", "store.ve", "tec.ve", "web.ve", "vg", "vi", "co.vi", "com.vi", "k12.vi", "net.vi", "org.vi", "vn", "ac.vn", "ai.vn", "biz.vn", "com.vn", "edu.vn", "gov.vn", "health.vn", "id.vn", "info.vn", "int.vn", "io.vn", "name.vn", "net.vn", "org.vn", "pro.vn", "angiang.vn", "bacgiang.vn", "backan.vn", "baclieu.vn", "bacninh.vn", "baria-vungtau.vn", "bentre.vn", "binhdinh.vn", "binhduong.vn", "binhphuoc.vn", "binhthuan.vn", "camau.vn", "cantho.vn", "caobang.vn", "daklak.vn", "daknong.vn", "danang.vn", "dienbien.vn", "dongnai.vn", "dongthap.vn", "gialai.vn", "hagiang.vn", "haiduong.vn", "haiphong.vn", "hanam.vn", "hanoi.vn", "hatinh.vn", "haugiang.vn", "hoabinh.vn", "hungyen.vn", "khanhhoa.vn", "kiengiang.vn", "kontum.vn", "laichau.vn", "lamdong.vn", "langson.vn", "laocai.vn", "longan.vn", "namdinh.vn", "nghean.vn", "ninhbinh.vn", "ninhthuan.vn", "phutho.vn", "phuyen.vn", "quangbinh.vn", "quangnam.vn", "quangngai.vn", "quangninh.vn", "quangtri.vn", "soctrang.vn", "sonla.vn", "tayninh.vn", "thaibinh.vn", "thainguyen.vn", "thanhhoa.vn", "thanhphohochiminh.vn", "thuathienhue.vn", "tiengiang.vn", "travinh.vn", "tuyenquang.vn", "vinhlong.vn", "vinhphuc.vn", "yenbai.vn", "vu", "com.vu", "edu.vu", "net.vu", "org.vu", "wf", "ws", "com.ws", "edu.ws", "gov.ws", "net.ws", "org.ws", "yt", "\u0627\u0645\u0627\u0631\u0627\u062A", "\u0570\u0561\u0575", "\u09AC\u09BE\u0982\u09B2\u09BE", "\u0431\u0433", "\u0627\u0644\u0628\u062D\u0631\u064A\u0646", "\u0431\u0435\u043B", "\u4E2D\u56FD", "\u4E2D\u570B", "\u0627\u0644\u062C\u0632\u0627\u0626\u0631", "\u0645\u0635\u0631", "\u0435\u044E", "\u03B5\u03C5", "\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627", "\u10D2\u10D4", "\u03B5\u03BB", "\u9999\u6E2F", "\u500B\u4EBA.\u9999\u6E2F", "\u516C\u53F8.\u9999\u6E2F", "\u653F\u5E9C.\u9999\u6E2F", "\u6559\u80B2.\u9999\u6E2F", "\u7D44\u7E54.\u9999\u6E2F", "\u7DB2\u7D61.\u9999\u6E2F", "\u0CAD\u0CBE\u0CB0\u0CA4", "\u0B2D\u0B3E\u0B30\u0B24", "\u09AD\u09BE\u09F0\u09A4", "\u092D\u093E\u0930\u0924\u092E\u094D", "\u092D\u093E\u0930\u094B\u0924", "\u0680\u0627\u0631\u062A", "\u0D2D\u0D3E\u0D30\u0D24\u0D02", "\u092D\u093E\u0930\u0924", "\u0628\u0627\u0631\u062A", "\u0628\u06BE\u0627\u0631\u062A", "\u0C2D\u0C3E\u0C30\u0C24\u0C4D", "\u0AAD\u0ABE\u0AB0\u0AA4", "\u0A2D\u0A3E\u0A30\u0A24", "\u09AD\u09BE\u09B0\u09A4", "\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE", "\u0627\u06CC\u0631\u0627\u0646", "\u0627\u064A\u0631\u0627\u0646", "\u0639\u0631\u0627\u0642", "\u0627\u0644\u0627\u0631\u062F\u0646", "\uD55C\uAD6D", "\u049B\u0430\u0437", "\u0EA5\u0EB2\u0EA7", "\u0DBD\u0D82\u0D9A\u0DCF", "\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8", "\u0627\u0644\u0645\u063A\u0631\u0628", "\u043C\u043A\u0434", "\u043C\u043E\u043D", "\u6FB3\u9580", "\u6FB3\u95E8", "\u0645\u0644\u064A\u0633\u064A\u0627", "\u0639\u0645\u0627\u0646", "\u067E\u0627\u06A9\u0633\u062A\u0627\u0646", "\u067E\u0627\u0643\u0633\u062A\u0627\u0646", "\u0641\u0644\u0633\u0637\u064A\u0646", "\u0441\u0440\u0431", "\u0430\u043A.\u0441\u0440\u0431", "\u043E\u0431\u0440.\u0441\u0440\u0431", "\u043E\u0434.\u0441\u0440\u0431", "\u043E\u0440\u0433.\u0441\u0440\u0431", "\u043F\u0440.\u0441\u0440\u0431", "\u0443\u043F\u0440.\u0441\u0440\u0431", "\u0440\u0444", "\u0642\u0637\u0631", "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629", "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u0629", "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u06C3", "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647", "\u0633\u0648\u062F\u0627\u0646", "\u65B0\u52A0\u5761", "\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD", "\u0633\u0648\u0631\u064A\u0629", "\u0633\u0648\u0631\u064A\u0627", "\u0E44\u0E17\u0E22", "\u0E17\u0E2B\u0E32\u0E23.\u0E44\u0E17\u0E22", "\u0E18\u0E38\u0E23\u0E01\u0E34\u0E08.\u0E44\u0E17\u0E22", "\u0E40\u0E19\u0E47\u0E15.\u0E44\u0E17\u0E22", "\u0E23\u0E31\u0E10\u0E1A\u0E32\u0E25.\u0E44\u0E17\u0E22", "\u0E28\u0E36\u0E01\u0E29\u0E32.\u0E44\u0E17\u0E22", "\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23.\u0E44\u0E17\u0E22", "\u062A\u0648\u0646\u0633", "\u53F0\u7063", "\u53F0\u6E7E", "\u81FA\u7063", "\u0443\u043A\u0440", "\u0627\u0644\u064A\u0645\u0646", "xxx", "ye", "com.ye", "edu.ye", "gov.ye", "mil.ye", "net.ye", "org.ye", "ac.za", "agric.za", "alt.za", "co.za", "edu.za", "gov.za", "grondar.za", "law.za", "mil.za", "net.za", "ngo.za", "nic.za", "nis.za", "nom.za", "org.za", "school.za", "tm.za", "web.za", "zm", "ac.zm", "biz.zm", "co.zm", "com.zm", "edu.zm", "gov.zm", "info.zm", "mil.zm", "net.zm", "org.zm", "sch.zm", "zw", "ac.zw", "co.zw", "gov.zw", "mil.zw", "org.zw", "aaa", "aarp", "abb", "abbott", "abbvie", "abc", "able", "abogado", "abudhabi", "academy", "accenture", "accountant", "accountants", "aco", "actor", "ads", "adult", "aeg", "aetna", "afl", "africa", "agakhan", "agency", "aig", "airbus", "airforce", "airtel", "akdn", "alibaba", "alipay", "allfinanz", "allstate", "ally", "alsace", "alstom", "amazon", "americanexpress", "americanfamily", "amex", "amfam", "amica", "amsterdam", "analytics", "android", "anquan", "anz", "aol", "apartments", "app", "apple", "aquarelle", "arab", "aramco", "archi", "army", "art", "arte", "asda", "associates", "athleta", "attorney", "auction", "audi", "audible", "audio", "auspost", "author", "auto", "autos", "aws", "axa", "azure", "baby", "baidu", "banamex", "band", "bank", "bar", "barcelona", "barclaycard", "barclays", "barefoot", "bargains", "baseball", "basketball", "bauhaus", "bayern", "bbc", "bbt", "bbva", "bcg", "bcn", "beats", "beauty", "beer", "bentley", "berlin", "best", "bestbuy", "bet", "bharti", "bible", "bid", "bike", "bing", "bingo", "bio", "black", "blackfriday", "blockbuster", "blog", "bloomberg", "blue", "bms", "bmw", "bnpparibas", "boats", "boehringer", "bofa", "bom", "bond", "boo", "book", "booking", "bosch", "bostik", "boston", "bot", "boutique", "box", "bradesco", "bridgestone", "broadway", "broker", "brother", "brussels", "build", "builders", "business", "buy", "buzz", "bzh", "cab", "cafe", "cal", "call", "calvinklein", "cam", "camera", "camp", "canon", "capetown", "capital", "capitalone", "car", "caravan", "cards", "care", "career", "careers", "cars", "casa", "case", "cash", "casino", "catering", "catholic", "cba", "cbn", "cbre", "center", "ceo", "cern", "cfa", "cfd", "chanel", "channel", "charity", "chase", "chat", "cheap", "chintai", "christmas", "chrome", "church", "cipriani", "circle", "cisco", "citadel", "citi", "citic", "city", "claims", "cleaning", "click", "clinic", "clinique", "clothing", "cloud", "club", "clubmed", "coach", "codes", "coffee", "college", "cologne", "commbank", "community", "company", "compare", "computer", "comsec", "condos", "construction", "consulting", "contact", "contractors", "cooking", "cool", "corsica", "country", "coupon", "coupons", "courses", "cpa", "credit", "creditcard", "creditunion", "cricket", "crown", "crs", "cruise", "cruises", "cuisinella", "cymru", "cyou", "dad", "dance", "data", "date", "dating", "datsun", "day", "dclk", "dds", "deal", "dealer", "deals", "degree", "delivery", "dell", "deloitte", "delta", "democrat", "dental", "dentist", "desi", "design", "dev", "dhl", "diamonds", "diet", "digital", "direct", "directory", "discount", "discover", "dish", "diy", "dnp", "docs", "doctor", "dog", "domains", "dot", "download", "drive", "dtv", "dubai", "dunlop", "dupont", "durban", "dvag", "dvr", "earth", "eat", "eco", "edeka", "education", "email", "emerck", "energy", "engineer", "engineering", "enterprises", "epson", "equipment", "ericsson", "erni", "esq", "estate", "eurovision", "eus", "events", "exchange", "expert", "exposed", "express", "extraspace", "fage", "fail", "fairwinds", "faith", "family", "fan", "fans", "farm", "farmers", "fashion", "fast", "fedex", "feedback", "ferrari", "ferrero", "fidelity", "fido", "film", "final", "finance", "financial", "fire", "firestone", "firmdale", "fish", "fishing", "fit", "fitness", "flickr", "flights", "flir", "florist", "flowers", "fly", "foo", "food", "football", "ford", "forex", "forsale", "forum", "foundation", "fox", "free", "fresenius", "frl", "frogans", "frontier", "ftr", "fujitsu", "fun", "fund", "furniture", "futbol", "fyi", "gal", "gallery", "gallo", "gallup", "game", "games", "gap", "garden", "gay", "gbiz", "gdn", "gea", "gent", "genting", "george", "ggee", "gift", "gifts", "gives", "giving", "glass", "gle", "global", "globo", "gmail", "gmbh", "gmo", "gmx", "godaddy", "gold", "goldpoint", "golf", "goo", "goodyear", "goog", "google", "gop", "got", "grainger", "graphics", "gratis", "green", "gripe", "grocery", "group", "gucci", "guge", "guide", "guitars", "guru", "hair", "hamburg", "hangout", "haus", "hbo", "hdfc", "hdfcbank", "health", "healthcare", "help", "helsinki", "here", "hermes", "hiphop", "hisamitsu", "hitachi", "hiv", "hkt", "hockey", "holdings", "holiday", "homedepot", "homegoods", "homes", "homesense", "honda", "horse", "hospital", "host", "hosting", "hot", "hotels", "hotmail", "house", "how", "hsbc", "hughes", "hyatt", "hyundai", "ibm", "icbc", "ice", "icu", "ieee", "ifm", "ikano", "imamat", "imdb", "immo", "immobilien", "inc", "industries", "infiniti", "ing", "ink", "institute", "insurance", "insure", "international", "intuit", "investments", "ipiranga", "irish", "ismaili", "ist", "istanbul", "itau", "itv", "jaguar", "java", "jcb", "jeep", "jetzt", "jewelry", "jio", "jll", "jmp", "jnj", "joburg", "jot", "joy", "jpmorgan", "jprs", "juegos", "juniper", "kaufen", "kddi", "kerryhotels", "kerrylogistics", "kerryproperties", "kfh", "kia", "kids", "kim", "kindle", "kitchen", "kiwi", "koeln", "komatsu", "kosher", "kpmg", "kpn", "krd", "kred", "kuokgroup", "kyoto", "lacaixa", "lamborghini", "lamer", "lancaster", "land", "landrover", "lanxess", "lasalle", "lat", "latino", "latrobe", "law", "lawyer", "lds", "lease", "leclerc", "lefrak", "legal", "lego", "lexus", "lgbt", "lidl", "life", "lifeinsurance", "lifestyle", "lighting", "like", "lilly", "limited", "limo", "lincoln", "link", "lipsy", "live", "living", "llc", "llp", "loan", "loans", "locker", "locus", "lol", "london", "lotte", "lotto", "love", "lpl", "lplfinancial", "ltd", "ltda", "lundbeck", "luxe", "luxury", "madrid", "maif", "maison", "makeup", "man", "management", "mango", "map", "market", "marketing", "markets", "marriott", "marshalls", "mattel", "mba", "mckinsey", "med", "media", "meet", "melbourne", "meme", "memorial", "men", "menu", "merck", "merckmsd", "miami", "microsoft", "mini", "mint", "mit", "mitsubishi", "mlb", "mls", "mma", "mobile", "moda", "moe", "moi", "mom", "monash", "money", "monster", "mormon", "mortgage", "moscow", "moto", "motorcycles", "mov", "movie", "msd", "mtn", "mtr", "music", "nab", "nagoya", "navy", "nba", "nec", "netbank", "netflix", "network", "neustar", "new", "news", "next", "nextdirect", "nexus", "nfl", "ngo", "nhk", "nico", "nike", "nikon", "ninja", "nissan", "nissay", "nokia", "norton", "now", "nowruz", "nowtv", "nra", "nrw", "ntt", "nyc", "obi", "observer", "office", "okinawa", "olayan", "olayangroup", "ollo", "omega", "one", "ong", "onl", "online", "ooo", "open", "oracle", "orange", "organic", "origins", "osaka", "otsuka", "ott", "ovh", "page", "panasonic", "paris", "pars", "partners", "parts", "party", "pay", "pccw", "pet", "pfizer", "pharmacy", "phd", "philips", "phone", "photo", "photography", "photos", "physio", "pics", "pictet", "pictures", "pid", "pin", "ping", "pink", "pioneer", "pizza", "place", "play", "playstation", "plumbing", "plus", "pnc", "pohl", "poker", "politie", "porn", "pramerica", "praxi", "press", "prime", "prod", "productions", "prof", "progressive", "promo", "properties", "property", "protection", "pru", "prudential", "pub", "pwc", "qpon", "quebec", "quest", "racing", "radio", "read", "realestate", "realtor", "realty", "recipes", "red", "redstone", "redumbrella", "rehab", "reise", "reisen", "reit", "reliance", "ren", "rent", "rentals", "repair", "report", "republican", "rest", "restaurant", "review", "reviews", "rexroth", "rich", "richardli", "ricoh", "ril", "rio", "rip", "rocks", "rodeo", "rogers", "room", "rsvp", "rugby", "ruhr", "run", "rwe", "ryukyu", "saarland", "safe", "safety", "sakura", "sale", "salon", "samsclub", "samsung", "sandvik", "sandvikcoromant", "sanofi", "sap", "sarl", "sas", "save", "saxo", "sbi", "sbs", "scb", "schaeffler", "schmidt", "scholarships", "school", "schule", "schwarz", "science", "scot", "search", "seat", "secure", "security", "seek", "select", "sener", "services", "seven", "sew", "sex", "sexy", "sfr", "shangrila", "sharp", "shell", "shia", "shiksha", "shoes", "shop", "shopping", "shouji", "show", "silk", "sina", "singles", "site", "ski", "skin", "sky", "skype", "sling", "smart", "smile", "sncf", "soccer", "social", "softbank", "software", "sohu", "solar", "solutions", "song", "sony", "soy", "spa", "space", "sport", "spot", "srl", "stada", "staples", "star", "statebank", "statefarm", "stc", "stcgroup", "stockholm", "storage", "store", "stream", "studio", "study", "style", "sucks", "supplies", "supply", "support", "surf", "surgery", "suzuki", "swatch", "swiss", "sydney", "systems", "tab", "taipei", "talk", "taobao", "target", "tatamotors", "tatar", "tattoo", "tax", "taxi", "tci", "tdk", "team", "tech", "technology", "temasek", "tennis", "teva", "thd", "theater", "theatre", "tiaa", "tickets", "tienda", "tips", "tires", "tirol", "tjmaxx", "tjx", "tkmaxx", "tmall", "today", "tokyo", "tools", "top", "toray", "toshiba", "total", "tours", "town", "toyota", "toys", "trade", "trading", "training", "travel", "travelers", "travelersinsurance", "trust", "trv", "tube", "tui", "tunes", "tushu", "tvs", "ubank", "ubs", "unicom", "university", "uno", "uol", "ups", "vacations", "vana", "vanguard", "vegas", "ventures", "verisign", "versicherung", "vet", "viajes", "video", "vig", "viking", "villas", "vin", "vip", "virgin", "visa", "vision", "viva", "vivo", "vlaanderen", "vodka", "volvo", "vote", "voting", "voto", "voyage", "wales", "walmart", "walter", "wang", "wanggou", "watch", "watches", "weather", "weatherchannel", "webcam", "weber", "website", "wed", "wedding", "weibo", "weir", "whoswho", "wien", "wiki", "williamhill", "win", "windows", "wine", "winners", "wme", "wolterskluwer", "woodside", "work", "works", "world", "wow", "wtc", "wtf", "xbox", "xerox", "xihuan", "xin", "\u0915\u0949\u092E", "\u30BB\u30FC\u30EB", "\u4F5B\u5C71", "\u6148\u5584", "\u96C6\u56E2", "\u5728\u7EBF", "\u70B9\u770B", "\u0E04\u0E2D\u0E21", "\u516B\u5366", "\u0645\u0648\u0642\u0639", "\u516C\u76CA", "\u516C\u53F8", "\u9999\u683C\u91CC\u62C9", "\u7F51\u7AD9", "\u79FB\u52A8", "\u6211\u7231\u4F60", "\u043C\u043E\u0441\u043A\u0432\u0430", "\u043A\u0430\u0442\u043E\u043B\u0438\u043A", "\u043E\u043D\u043B\u0430\u0439\u043D", "\u0441\u0430\u0439\u0442", "\u8054\u901A", "\u05E7\u05D5\u05DD", "\u65F6\u5C1A", "\u5FAE\u535A", "\u6DE1\u9A6C\u9521", "\u30D5\u30A1\u30C3\u30B7\u30E7\u30F3", "\u043E\u0440\u0433", "\u0928\u0947\u091F", "\u30B9\u30C8\u30A2", "\u30A2\u30DE\u30BE\u30F3", "\uC0BC\uC131", "\u5546\u6807", "\u5546\u5E97", "\u5546\u57CE", "\u0434\u0435\u0442\u0438", "\u30DD\u30A4\u30F3\u30C8", "\u65B0\u95FB", "\u5BB6\u96FB", "\u0643\u0648\u0645", "\u4E2D\u6587\u7F51", "\u4E2D\u4FE1", "\u5A31\u4E50", "\u8C37\u6B4C", "\u96FB\u8A0A\u76C8\u79D1", "\u8D2D\u7269", "\u30AF\u30E9\u30A6\u30C9", "\u901A\u8CA9", "\u7F51\u5E97", "\u0938\u0902\u0917\u0920\u0928", "\u9910\u5385", "\u7F51\u7EDC", "\u043A\u043E\u043C", "\u4E9A\u9A6C\u900A", "\u98DF\u54C1", "\u98DE\u5229\u6D66", "\u624B\u673A", "\u0627\u0631\u0627\u0645\u0643\u0648", "\u0627\u0644\u0639\u0644\u064A\u0627\u0646", "\u0628\u0627\u0632\u0627\u0631", "\u0627\u0628\u0648\u0638\u0628\u064A", "\u0643\u0627\u062B\u0648\u0644\u064A\u0643", "\u0647\u0645\u0631\u0627\u0647", "\uB2F7\uCEF4", "\u653F\u5E9C", "\u0634\u0628\u0643\u0629", "\u0628\u064A\u062A\u0643", "\u0639\u0631\u0628", "\u673A\u6784", "\u7EC4\u7EC7\u673A\u6784", "\u5065\u5EB7", "\u62DB\u8058", "\u0440\u0443\u0441", "\u5927\u62FF", "\u307F\u3093\u306A", "\u30B0\u30FC\u30B0\u30EB", "\u4E16\u754C", "\u66F8\u7C4D", "\u7F51\u5740", "\uB2F7\uB137", "\u30B3\u30E0", "\u5929\u4E3B\u6559", "\u6E38\u620F", "verm\xF6gensberater", "verm\xF6gensberatung", "\u4F01\u4E1A", "\u4FE1\u606F", "\u5609\u91CC\u5927\u9152\u5E97", "\u5609\u91CC", "\u5E7F\u4E1C", "\u653F\u52A1", "xyz", "yachts", "yahoo", "yamaxun", "yandex", "yodobashi", "yoga", "yokohama", "you", "youtube", "yun", "zappos", "zara", "zero", "zip", "zone", "zuerich", "co.krd", "edu.krd", "art.pl", "gliwice.pl", "krakow.pl", "poznan.pl", "wroc.pl", "zakopane.pl", "lib.de.us", "12chars.dev", "12chars.it", "12chars.pro", "cc.ua", "inf.ua", "ltd.ua", "611.to", "a2hosted.com", "cpserver.com", "aaa.vodka", "*.on-acorn.io", "activetrail.biz", "adaptable.app", "adobeaemcloud.com", "*.dev.adobeaemcloud.com", "aem.live", "hlx.live", "adobeaemcloud.net", "aem.page", "hlx.page", "hlx3.page", "adobeio-static.net", "adobeioruntime.net", "africa.com", "beep.pl", "airkitapps.com", "airkitapps-au.com", "airkitapps.eu", "aivencloud.com", "akadns.net", "akamai.net", "akamai-staging.net", "akamaiedge.net", "akamaiedge-staging.net", "akamaihd.net", "akamaihd-staging.net", "akamaiorigin.net", "akamaiorigin-staging.net", "akamaized.net", "akamaized-staging.net", "edgekey.net", "edgekey-staging.net", "edgesuite.net", "edgesuite-staging.net", "barsy.ca", "*.compute.estate", "*.alces.network", "kasserver.com", "altervista.org", "alwaysdata.net", "myamaze.net", "execute-api.cn-north-1.amazonaws.com.cn", "execute-api.cn-northwest-1.amazonaws.com.cn", "execute-api.af-south-1.amazonaws.com", "execute-api.ap-east-1.amazonaws.com", "execute-api.ap-northeast-1.amazonaws.com", "execute-api.ap-northeast-2.amazonaws.com", "execute-api.ap-northeast-3.amazonaws.com", "execute-api.ap-south-1.amazonaws.com", "execute-api.ap-south-2.amazonaws.com", "execute-api.ap-southeast-1.amazonaws.com", "execute-api.ap-southeast-2.amazonaws.com", "execute-api.ap-southeast-3.amazonaws.com", "execute-api.ap-southeast-4.amazonaws.com", "execute-api.ap-southeast-5.amazonaws.com", "execute-api.ca-central-1.amazonaws.com", "execute-api.ca-west-1.amazonaws.com", "execute-api.eu-central-1.amazonaws.com", "execute-api.eu-central-2.amazonaws.com", "execute-api.eu-north-1.amazonaws.com", "execute-api.eu-south-1.amazonaws.com", "execute-api.eu-south-2.amazonaws.com", "execute-api.eu-west-1.amazonaws.com", "execute-api.eu-west-2.amazonaws.com", "execute-api.eu-west-3.amazonaws.com", "execute-api.il-central-1.amazonaws.com", "execute-api.me-central-1.amazonaws.com", "execute-api.me-south-1.amazonaws.com", "execute-api.sa-east-1.amazonaws.com", "execute-api.us-east-1.amazonaws.com", "execute-api.us-east-2.amazonaws.com", "execute-api.us-gov-east-1.amazonaws.com", "execute-api.us-gov-west-1.amazonaws.com", "execute-api.us-west-1.amazonaws.com", "execute-api.us-west-2.amazonaws.com", "cloudfront.net", "auth.af-south-1.amazoncognito.com", "auth.ap-east-1.amazoncognito.com", "auth.ap-northeast-1.amazoncognito.com", "auth.ap-northeast-2.amazoncognito.com", "auth.ap-northeast-3.amazoncognito.com", "auth.ap-south-1.amazoncognito.com", "auth.ap-south-2.amazoncognito.com", "auth.ap-southeast-1.amazoncognito.com", "auth.ap-southeast-2.amazoncognito.com", "auth.ap-southeast-3.amazoncognito.com", "auth.ap-southeast-4.amazoncognito.com", "auth.ca-central-1.amazoncognito.com", "auth.ca-west-1.amazoncognito.com", "auth.eu-central-1.amazoncognito.com", "auth.eu-central-2.amazoncognito.com", "auth.eu-north-1.amazoncognito.com", "auth.eu-south-1.amazoncognito.com", "auth.eu-south-2.amazoncognito.com", "auth.eu-west-1.amazoncognito.com", "auth.eu-west-2.amazoncognito.com", "auth.eu-west-3.amazoncognito.com", "auth.il-central-1.amazoncognito.com", "auth.me-central-1.amazoncognito.com", "auth.me-south-1.amazoncognito.com", "auth.sa-east-1.amazoncognito.com", "auth.us-east-1.amazoncognito.com", "auth-fips.us-east-1.amazoncognito.com", "auth.us-east-2.amazoncognito.com", "auth-fips.us-east-2.amazoncognito.com", "auth-fips.us-gov-west-1.amazoncognito.com", "auth.us-west-1.amazoncognito.com", "auth-fips.us-west-1.amazoncognito.com", "auth.us-west-2.amazoncognito.com", "auth-fips.us-west-2.amazoncognito.com", "*.compute.amazonaws.com.cn", "*.compute.amazonaws.com", "*.compute-1.amazonaws.com", "us-east-1.amazonaws.com", "emrappui-prod.cn-north-1.amazonaws.com.cn", "emrnotebooks-prod.cn-north-1.amazonaws.com.cn", "emrstudio-prod.cn-north-1.amazonaws.com.cn", "emrappui-prod.cn-northwest-1.amazonaws.com.cn", "emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn", "emrstudio-prod.cn-northwest-1.amazonaws.com.cn", "emrappui-prod.af-south-1.amazonaws.com", "emrnotebooks-prod.af-south-1.amazonaws.com", "emrstudio-prod.af-south-1.amazonaws.com", "emrappui-prod.ap-east-1.amazonaws.com", "emrnotebooks-prod.ap-east-1.amazonaws.com", "emrstudio-prod.ap-east-1.amazonaws.com", "emrappui-prod.ap-northeast-1.amazonaws.com", "emrnotebooks-prod.ap-northeast-1.amazonaws.com", "emrstudio-prod.ap-northeast-1.amazonaws.com", "emrappui-prod.ap-northeast-2.amazonaws.com", "emrnotebooks-prod.ap-northeast-2.amazonaws.com", "emrstudio-prod.ap-northeast-2.amazonaws.com", "emrappui-prod.ap-northeast-3.amazonaws.com", "emrnotebooks-prod.ap-northeast-3.amazonaws.com", "emrstudio-prod.ap-northeast-3.amazonaws.com", "emrappui-prod.ap-south-1.amazonaws.com", "emrnotebooks-prod.ap-south-1.amazonaws.com", "emrstudio-prod.ap-south-1.amazonaws.com", "emrappui-prod.ap-south-2.amazonaws.com", "emrnotebooks-prod.ap-south-2.amazonaws.com", "emrstudio-prod.ap-south-2.amazonaws.com", "emrappui-prod.ap-southeast-1.amazonaws.com", "emrnotebooks-prod.ap-southeast-1.amazonaws.com", "emrstudio-prod.ap-southeast-1.amazonaws.com", "emrappui-prod.ap-southeast-2.amazonaws.com", "emrnotebooks-prod.ap-southeast-2.amazonaws.com", "emrstudio-prod.ap-southeast-2.amazonaws.com", "emrappui-prod.ap-southeast-3.amazonaws.com", "emrnotebooks-prod.ap-southeast-3.amazonaws.com", "emrstudio-prod.ap-southeast-3.amazonaws.com", "emrappui-prod.ap-southeast-4.amazonaws.com", "emrnotebooks-prod.ap-southeast-4.amazonaws.com", "emrstudio-prod.ap-southeast-4.amazonaws.com", "emrappui-prod.ca-central-1.amazonaws.com", "emrnotebooks-prod.ca-central-1.amazonaws.com", "emrstudio-prod.ca-central-1.amazonaws.com", "emrappui-prod.ca-west-1.amazonaws.com", "emrnotebooks-prod.ca-west-1.amazonaws.com", "emrstudio-prod.ca-west-1.amazonaws.com", "emrappui-prod.eu-central-1.amazonaws.com", "emrnotebooks-prod.eu-central-1.amazonaws.com", "emrstudio-prod.eu-central-1.amazonaws.com", "emrappui-prod.eu-central-2.amazonaws.com", "emrnotebooks-prod.eu-central-2.amazonaws.com", "emrstudio-prod.eu-central-2.amazonaws.com", "emrappui-prod.eu-north-1.amazonaws.com", "emrnotebooks-prod.eu-north-1.amazonaws.com", "emrstudio-prod.eu-north-1.amazonaws.com", "emrappui-prod.eu-south-1.amazonaws.com", "emrnotebooks-prod.eu-south-1.amazonaws.com", "emrstudio-prod.eu-south-1.amazonaws.com", "emrappui-prod.eu-south-2.amazonaws.com", "emrnotebooks-prod.eu-south-2.amazonaws.com", "emrstudio-prod.eu-south-2.amazonaws.com", "emrappui-prod.eu-west-1.amazonaws.com", "emrnotebooks-prod.eu-west-1.amazonaws.com", "emrstudio-prod.eu-west-1.amazonaws.com", "emrappui-prod.eu-west-2.amazonaws.com", "emrnotebooks-prod.eu-west-2.amazonaws.com", "emrstudio-prod.eu-west-2.amazonaws.com", "emrappui-prod.eu-west-3.amazonaws.com", "emrnotebooks-prod.eu-west-3.amazonaws.com", "emrstudio-prod.eu-west-3.amazonaws.com", "emrappui-prod.il-central-1.amazonaws.com", "emrnotebooks-prod.il-central-1.amazonaws.com", "emrstudio-prod.il-central-1.amazonaws.com", "emrappui-prod.me-central-1.amazonaws.com", "emrnotebooks-prod.me-central-1.amazonaws.com", "emrstudio-prod.me-central-1.amazonaws.com", "emrappui-prod.me-south-1.amazonaws.com", "emrnotebooks-prod.me-south-1.amazonaws.com", "emrstudio-prod.me-south-1.amazonaws.com", "emrappui-prod.sa-east-1.amazonaws.com", "emrnotebooks-prod.sa-east-1.amazonaws.com", "emrstudio-prod.sa-east-1.amazonaws.com", "emrappui-prod.us-east-1.amazonaws.com", "emrnotebooks-prod.us-east-1.amazonaws.com", "emrstudio-prod.us-east-1.amazonaws.com", "emrappui-prod.us-east-2.amazonaws.com", "emrnotebooks-prod.us-east-2.amazonaws.com", "emrstudio-prod.us-east-2.amazonaws.com", "emrappui-prod.us-gov-east-1.amazonaws.com", "emrnotebooks-prod.us-gov-east-1.amazonaws.com", "emrstudio-prod.us-gov-east-1.amazonaws.com", "emrappui-prod.us-gov-west-1.amazonaws.com", "emrnotebooks-prod.us-gov-west-1.amazonaws.com", "emrstudio-prod.us-gov-west-1.amazonaws.com", "emrappui-prod.us-west-1.amazonaws.com", "emrnotebooks-prod.us-west-1.amazonaws.com", "emrstudio-prod.us-west-1.amazonaws.com", "emrappui-prod.us-west-2.amazonaws.com", "emrnotebooks-prod.us-west-2.amazonaws.com", "emrstudio-prod.us-west-2.amazonaws.com", "*.cn-north-1.airflow.amazonaws.com.cn", "*.cn-northwest-1.airflow.amazonaws.com.cn", "*.af-south-1.airflow.amazonaws.com", "*.ap-east-1.airflow.amazonaws.com", "*.ap-northeast-1.airflow.amazonaws.com", "*.ap-northeast-2.airflow.amazonaws.com", "*.ap-northeast-3.airflow.amazonaws.com", "*.ap-south-1.airflow.amazonaws.com", "*.ap-south-2.airflow.amazonaws.com", "*.ap-southeast-1.airflow.amazonaws.com", "*.ap-southeast-2.airflow.amazonaws.com", "*.ap-southeast-3.airflow.amazonaws.com", "*.ap-southeast-4.airflow.amazonaws.com", "*.ca-central-1.airflow.amazonaws.com", "*.ca-west-1.airflow.amazonaws.com", "*.eu-central-1.airflow.amazonaws.com", "*.eu-central-2.airflow.amazonaws.com", "*.eu-north-1.airflow.amazonaws.com", "*.eu-south-1.airflow.amazonaws.com", "*.eu-south-2.airflow.amazonaws.com", "*.eu-west-1.airflow.amazonaws.com", "*.eu-west-2.airflow.amazonaws.com", "*.eu-west-3.airflow.amazonaws.com", "*.il-central-1.airflow.amazonaws.com", "*.me-central-1.airflow.amazonaws.com", "*.me-south-1.airflow.amazonaws.com", "*.sa-east-1.airflow.amazonaws.com", "*.us-east-1.airflow.amazonaws.com", "*.us-east-2.airflow.amazonaws.com", "*.us-west-1.airflow.amazonaws.com", "*.us-west-2.airflow.amazonaws.com", "s3.dualstack.cn-north-1.amazonaws.com.cn", "s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn", "s3-website.dualstack.cn-north-1.amazonaws.com.cn", "s3.cn-north-1.amazonaws.com.cn", "s3-accesspoint.cn-north-1.amazonaws.com.cn", "s3-deprecated.cn-north-1.amazonaws.com.cn", "s3-object-lambda.cn-north-1.amazonaws.com.cn", "s3-website.cn-north-1.amazonaws.com.cn", "s3.dualstack.cn-northwest-1.amazonaws.com.cn", "s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn", "s3.cn-northwest-1.amazonaws.com.cn", "s3-accesspoint.cn-northwest-1.amazonaws.com.cn", "s3-object-lambda.cn-northwest-1.amazonaws.com.cn", "s3-website.cn-northwest-1.amazonaws.com.cn", "s3.dualstack.af-south-1.amazonaws.com", "s3-accesspoint.dualstack.af-south-1.amazonaws.com", "s3-website.dualstack.af-south-1.amazonaws.com", "s3.af-south-1.amazonaws.com", "s3-accesspoint.af-south-1.amazonaws.com", "s3-object-lambda.af-south-1.amazonaws.com", "s3-website.af-south-1.amazonaws.com", "s3.dualstack.ap-east-1.amazonaws.com", "s3-accesspoint.dualstack.ap-east-1.amazonaws.com", "s3.ap-east-1.amazonaws.com", "s3-accesspoint.ap-east-1.amazonaws.com", "s3-object-lambda.ap-east-1.amazonaws.com", "s3-website.ap-east-1.amazonaws.com", "s3.dualstack.ap-northeast-1.amazonaws.com", "s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com", "s3-website.dualstack.ap-northeast-1.amazonaws.com", "s3.ap-northeast-1.amazonaws.com", "s3-accesspoint.ap-northeast-1.amazonaws.com", "s3-object-lambda.ap-northeast-1.amazonaws.com", "s3-website.ap-northeast-1.amazonaws.com", "s3.dualstack.ap-northeast-2.amazonaws.com", "s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com", "s3-website.dualstack.ap-northeast-2.amazonaws.com", "s3.ap-northeast-2.amazonaws.com", "s3-accesspoint.ap-northeast-2.amazonaws.com", "s3-object-lambda.ap-northeast-2.amazonaws.com", "s3-website.ap-northeast-2.amazonaws.com", "s3.dualstack.ap-northeast-3.amazonaws.com", "s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com", "s3-website.dualstack.ap-northeast-3.amazonaws.com", "s3.ap-northeast-3.amazonaws.com", "s3-accesspoint.ap-northeast-3.amazonaws.com", "s3-object-lambda.ap-northeast-3.amazonaws.com", "s3-website.ap-northeast-3.amazonaws.com", "s3.dualstack.ap-south-1.amazonaws.com", "s3-accesspoint.dualstack.ap-south-1.amazonaws.com", "s3-website.dualstack.ap-south-1.amazonaws.com", "s3.ap-south-1.amazonaws.com", "s3-accesspoint.ap-south-1.amazonaws.com", "s3-object-lambda.ap-south-1.amazonaws.com", "s3-website.ap-south-1.amazonaws.com", "s3.dualstack.ap-south-2.amazonaws.com", "s3-accesspoint.dualstack.ap-south-2.amazonaws.com", "s3-website.dualstack.ap-south-2.amazonaws.com", "s3.ap-south-2.amazonaws.com", "s3-accesspoint.ap-south-2.amazonaws.com", "s3-object-lambda.ap-south-2.amazonaws.com", "s3-website.ap-south-2.amazonaws.com", "s3.dualstack.ap-southeast-1.amazonaws.com", "s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com", "s3-website.dualstack.ap-southeast-1.amazonaws.com", "s3.ap-southeast-1.amazonaws.com", "s3-accesspoint.ap-southeast-1.amazonaws.com", "s3-object-lambda.ap-southeast-1.amazonaws.com", "s3-website.ap-southeast-1.amazonaws.com", "s3.dualstack.ap-southeast-2.amazonaws.com", "s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com", "s3-website.dualstack.ap-southeast-2.amazonaws.com", "s3.ap-southeast-2.amazonaws.com", "s3-accesspoint.ap-southeast-2.amazonaws.com", "s3-object-lambda.ap-southeast-2.amazonaws.com", "s3-website.ap-southeast-2.amazonaws.com", "s3.dualstack.ap-southeast-3.amazonaws.com", "s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com", "s3-website.dualstack.ap-southeast-3.amazonaws.com", "s3.ap-southeast-3.amazonaws.com", "s3-accesspoint.ap-southeast-3.amazonaws.com", "s3-object-lambda.ap-southeast-3.amazonaws.com", "s3-website.ap-southeast-3.amazonaws.com", "s3.dualstack.ap-southeast-4.amazonaws.com", "s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com", "s3-website.dualstack.ap-southeast-4.amazonaws.com", "s3.ap-southeast-4.amazonaws.com", "s3-accesspoint.ap-southeast-4.amazonaws.com", "s3-object-lambda.ap-southeast-4.amazonaws.com", "s3-website.ap-southeast-4.amazonaws.com", "s3.dualstack.ap-southeast-5.amazonaws.com", "s3-accesspoint.dualstack.ap-southeast-5.amazonaws.com", "s3-website.dualstack.ap-southeast-5.amazonaws.com", "s3.ap-southeast-5.amazonaws.com", "s3-accesspoint.ap-southeast-5.amazonaws.com", "s3-deprecated.ap-southeast-5.amazonaws.com", "s3-object-lambda.ap-southeast-5.amazonaws.com", "s3-website.ap-southeast-5.amazonaws.com", "s3.dualstack.ca-central-1.amazonaws.com", "s3-accesspoint.dualstack.ca-central-1.amazonaws.com", "s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com", "s3-fips.dualstack.ca-central-1.amazonaws.com", "s3-website.dualstack.ca-central-1.amazonaws.com", "s3.ca-central-1.amazonaws.com", "s3-accesspoint.ca-central-1.amazonaws.com", "s3-accesspoint-fips.ca-central-1.amazonaws.com", "s3-fips.ca-central-1.amazonaws.com", "s3-object-lambda.ca-central-1.amazonaws.com", "s3-website.ca-central-1.amazonaws.com", "s3.dualstack.ca-west-1.amazonaws.com", "s3-accesspoint.dualstack.ca-west-1.amazonaws.com", "s3-accesspoint-fips.dualstack.ca-west-1.amazonaws.com", "s3-fips.dualstack.ca-west-1.amazonaws.com", "s3-website.dualstack.ca-west-1.amazonaws.com", "s3.ca-west-1.amazonaws.com", "s3-accesspoint.ca-west-1.amazonaws.com", "s3-accesspoint-fips.ca-west-1.amazonaws.com", "s3-fips.ca-west-1.amazonaws.com", "s3-object-lambda.ca-west-1.amazonaws.com", "s3-website.ca-west-1.amazonaws.com", "s3.dualstack.eu-central-1.amazonaws.com", "s3-accesspoint.dualstack.eu-central-1.amazonaws.com", "s3-website.dualstack.eu-central-1.amazonaws.com", "s3.eu-central-1.amazonaws.com", "s3-accesspoint.eu-central-1.amazonaws.com", "s3-object-lambda.eu-central-1.amazonaws.com", "s3-website.eu-central-1.amazonaws.com", "s3.dualstack.eu-central-2.amazonaws.com", "s3-accesspoint.dualstack.eu-central-2.amazonaws.com", "s3-website.dualstack.eu-central-2.amazonaws.com", "s3.eu-central-2.amazonaws.com", "s3-accesspoint.eu-central-2.amazonaws.com", "s3-object-lambda.eu-central-2.amazonaws.com", "s3-website.eu-central-2.amazonaws.com", "s3.dualstack.eu-north-1.amazonaws.com", "s3-accesspoint.dualstack.eu-north-1.amazonaws.com", "s3.eu-north-1.amazonaws.com", "s3-accesspoint.eu-north-1.amazonaws.com", "s3-object-lambda.eu-north-1.amazonaws.com", "s3-website.eu-north-1.amazonaws.com", "s3.dualstack.eu-south-1.amazonaws.com", "s3-accesspoint.dualstack.eu-south-1.amazonaws.com", "s3-website.dualstack.eu-south-1.amazonaws.com", "s3.eu-south-1.amazonaws.com", "s3-accesspoint.eu-south-1.amazonaws.com", "s3-object-lambda.eu-south-1.amazonaws.com", "s3-website.eu-south-1.amazonaws.com", "s3.dualstack.eu-south-2.amazonaws.com", "s3-accesspoint.dualstack.eu-south-2.amazonaws.com", "s3-website.dualstack.eu-south-2.amazonaws.com", "s3.eu-south-2.amazonaws.com", "s3-accesspoint.eu-south-2.amazonaws.com", "s3-object-lambda.eu-south-2.amazonaws.com", "s3-website.eu-south-2.amazonaws.com", "s3.dualstack.eu-west-1.amazonaws.com", "s3-accesspoint.dualstack.eu-west-1.amazonaws.com", "s3-website.dualstack.eu-west-1.amazonaws.com", "s3.eu-west-1.amazonaws.com", "s3-accesspoint.eu-west-1.amazonaws.com", "s3-deprecated.eu-west-1.amazonaws.com", "s3-object-lambda.eu-west-1.amazonaws.com", "s3-website.eu-west-1.amazonaws.com", "s3.dualstack.eu-west-2.amazonaws.com", "s3-accesspoint.dualstack.eu-west-2.amazonaws.com", "s3.eu-west-2.amazonaws.com", "s3-accesspoint.eu-west-2.amazonaws.com", "s3-object-lambda.eu-west-2.amazonaws.com", "s3-website.eu-west-2.amazonaws.com", "s3.dualstack.eu-west-3.amazonaws.com", "s3-accesspoint.dualstack.eu-west-3.amazonaws.com", "s3-website.dualstack.eu-west-3.amazonaws.com", "s3.eu-west-3.amazonaws.com", "s3-accesspoint.eu-west-3.amazonaws.com", "s3-object-lambda.eu-west-3.amazonaws.com", "s3-website.eu-west-3.amazonaws.com", "s3.dualstack.il-central-1.amazonaws.com", "s3-accesspoint.dualstack.il-central-1.amazonaws.com", "s3-website.dualstack.il-central-1.amazonaws.com", "s3.il-central-1.amazonaws.com", "s3-accesspoint.il-central-1.amazonaws.com", "s3-object-lambda.il-central-1.amazonaws.com", "s3-website.il-central-1.amazonaws.com", "s3.dualstack.me-central-1.amazonaws.com", "s3-accesspoint.dualstack.me-central-1.amazonaws.com", "s3-website.dualstack.me-central-1.amazonaws.com", "s3.me-central-1.amazonaws.com", "s3-accesspoint.me-central-1.amazonaws.com", "s3-object-lambda.me-central-1.amazonaws.com", "s3-website.me-central-1.amazonaws.com", "s3.dualstack.me-south-1.amazonaws.com", "s3-accesspoint.dualstack.me-south-1.amazonaws.com", "s3.me-south-1.amazonaws.com", "s3-accesspoint.me-south-1.amazonaws.com", "s3-object-lambda.me-south-1.amazonaws.com", "s3-website.me-south-1.amazonaws.com", "s3.amazonaws.com", "s3-1.amazonaws.com", "s3-ap-east-1.amazonaws.com", "s3-ap-northeast-1.amazonaws.com", "s3-ap-northeast-2.amazonaws.com", "s3-ap-northeast-3.amazonaws.com", "s3-ap-south-1.amazonaws.com", "s3-ap-southeast-1.amazonaws.com", "s3-ap-southeast-2.amazonaws.com", "s3-ca-central-1.amazonaws.com", "s3-eu-central-1.amazonaws.com", "s3-eu-north-1.amazonaws.com", "s3-eu-west-1.amazonaws.com", "s3-eu-west-2.amazonaws.com", "s3-eu-west-3.amazonaws.com", "s3-external-1.amazonaws.com", "s3-fips-us-gov-east-1.amazonaws.com", "s3-fips-us-gov-west-1.amazonaws.com", "mrap.accesspoint.s3-global.amazonaws.com", "s3-me-south-1.amazonaws.com", "s3-sa-east-1.amazonaws.com", "s3-us-east-2.amazonaws.com", "s3-us-gov-east-1.amazonaws.com", "s3-us-gov-west-1.amazonaws.com", "s3-us-west-1.amazonaws.com", "s3-us-west-2.amazonaws.com", "s3-website-ap-northeast-1.amazonaws.com", "s3-website-ap-southeast-1.amazonaws.com", "s3-website-ap-southeast-2.amazonaws.com", "s3-website-eu-west-1.amazonaws.com", "s3-website-sa-east-1.amazonaws.com", "s3-website-us-east-1.amazonaws.com", "s3-website-us-gov-west-1.amazonaws.com", "s3-website-us-west-1.amazonaws.com", "s3-website-us-west-2.amazonaws.com", "s3.dualstack.sa-east-1.amazonaws.com", "s3-accesspoint.dualstack.sa-east-1.amazonaws.com", "s3-website.dualstack.sa-east-1.amazonaws.com", "s3.sa-east-1.amazonaws.com", "s3-accesspoint.sa-east-1.amazonaws.com", "s3-object-lambda.sa-east-1.amazonaws.com", "s3-website.sa-east-1.amazonaws.com", "s3.dualstack.us-east-1.amazonaws.com", "s3-accesspoint.dualstack.us-east-1.amazonaws.com", "s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com", "s3-fips.dualstack.us-east-1.amazonaws.com", "s3-website.dualstack.us-east-1.amazonaws.com", "s3.us-east-1.amazonaws.com", "s3-accesspoint.us-east-1.amazonaws.com", "s3-accesspoint-fips.us-east-1.amazonaws.com", "s3-deprecated.us-east-1.amazonaws.com", "s3-fips.us-east-1.amazonaws.com", "s3-object-lambda.us-east-1.amazonaws.com", "s3-website.us-east-1.amazonaws.com", "s3.dualstack.us-east-2.amazonaws.com", "s3-accesspoint.dualstack.us-east-2.amazonaws.com", "s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com", "s3-fips.dualstack.us-east-2.amazonaws.com", "s3-website.dualstack.us-east-2.amazonaws.com", "s3.us-east-2.amazonaws.com", "s3-accesspoint.us-east-2.amazonaws.com", "s3-accesspoint-fips.us-east-2.amazonaws.com", "s3-deprecated.us-east-2.amazonaws.com", "s3-fips.us-east-2.amazonaws.com", "s3-object-lambda.us-east-2.amazonaws.com", "s3-website.us-east-2.amazonaws.com", "s3.dualstack.us-gov-east-1.amazonaws.com", "s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com", "s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com", "s3-fips.dualstack.us-gov-east-1.amazonaws.com", "s3.us-gov-east-1.amazonaws.com", "s3-accesspoint.us-gov-east-1.amazonaws.com", "s3-accesspoint-fips.us-gov-east-1.amazonaws.com", "s3-fips.us-gov-east-1.amazonaws.com", "s3-object-lambda.us-gov-east-1.amazonaws.com", "s3-website.us-gov-east-1.amazonaws.com", "s3.dualstack.us-gov-west-1.amazonaws.com", "s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com", "s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com", "s3-fips.dualstack.us-gov-west-1.amazonaws.com", "s3.us-gov-west-1.amazonaws.com", "s3-accesspoint.us-gov-west-1.amazonaws.com", "s3-accesspoint-fips.us-gov-west-1.amazonaws.com", "s3-fips.us-gov-west-1.amazonaws.com", "s3-object-lambda.us-gov-west-1.amazonaws.com", "s3-website.us-gov-west-1.amazonaws.com", "s3.dualstack.us-west-1.amazonaws.com", "s3-accesspoint.dualstack.us-west-1.amazonaws.com", "s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com", "s3-fips.dualstack.us-west-1.amazonaws.com", "s3-website.dualstack.us-west-1.amazonaws.com", "s3.us-west-1.amazonaws.com", "s3-accesspoint.us-west-1.amazonaws.com", "s3-accesspoint-fips.us-west-1.amazonaws.com", "s3-fips.us-west-1.amazonaws.com", "s3-object-lambda.us-west-1.amazonaws.com", "s3-website.us-west-1.amazonaws.com", "s3.dualstack.us-west-2.amazonaws.com", "s3-accesspoint.dualstack.us-west-2.amazonaws.com", "s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com", "s3-fips.dualstack.us-west-2.amazonaws.com", "s3-website.dualstack.us-west-2.amazonaws.com", "s3.us-west-2.amazonaws.com", "s3-accesspoint.us-west-2.amazonaws.com", "s3-accesspoint-fips.us-west-2.amazonaws.com", "s3-deprecated.us-west-2.amazonaws.com", "s3-fips.us-west-2.amazonaws.com", "s3-object-lambda.us-west-2.amazonaws.com", "s3-website.us-west-2.amazonaws.com", "labeling.ap-northeast-1.sagemaker.aws", "labeling.ap-northeast-2.sagemaker.aws", "labeling.ap-south-1.sagemaker.aws", "labeling.ap-southeast-1.sagemaker.aws", "labeling.ap-southeast-2.sagemaker.aws", "labeling.ca-central-1.sagemaker.aws", "labeling.eu-central-1.sagemaker.aws", "labeling.eu-west-1.sagemaker.aws", "labeling.eu-west-2.sagemaker.aws", "labeling.us-east-1.sagemaker.aws", "labeling.us-east-2.sagemaker.aws", "labeling.us-west-2.sagemaker.aws", "notebook.af-south-1.sagemaker.aws", "notebook.ap-east-1.sagemaker.aws", "notebook.ap-northeast-1.sagemaker.aws", "notebook.ap-northeast-2.sagemaker.aws", "notebook.ap-northeast-3.sagemaker.aws", "notebook.ap-south-1.sagemaker.aws", "notebook.ap-south-2.sagemaker.aws", "notebook.ap-southeast-1.sagemaker.aws", "notebook.ap-southeast-2.sagemaker.aws", "notebook.ap-southeast-3.sagemaker.aws", "notebook.ap-southeast-4.sagemaker.aws", "notebook.ca-central-1.sagemaker.aws", "notebook-fips.ca-central-1.sagemaker.aws", "notebook.ca-west-1.sagemaker.aws", "notebook-fips.ca-west-1.sagemaker.aws", "notebook.eu-central-1.sagemaker.aws", "notebook.eu-central-2.sagemaker.aws", "notebook.eu-north-1.sagemaker.aws", "notebook.eu-south-1.sagemaker.aws", "notebook.eu-south-2.sagemaker.aws", "notebook.eu-west-1.sagemaker.aws", "notebook.eu-west-2.sagemaker.aws", "notebook.eu-west-3.sagemaker.aws", "notebook.il-central-1.sagemaker.aws", "notebook.me-central-1.sagemaker.aws", "notebook.me-south-1.sagemaker.aws", "notebook.sa-east-1.sagemaker.aws", "notebook.us-east-1.sagemaker.aws", "notebook-fips.us-east-1.sagemaker.aws", "notebook.us-east-2.sagemaker.aws", "notebook-fips.us-east-2.sagemaker.aws", "notebook.us-gov-east-1.sagemaker.aws", "notebook-fips.us-gov-east-1.sagemaker.aws", "notebook.us-gov-west-1.sagemaker.aws", "notebook-fips.us-gov-west-1.sagemaker.aws", "notebook.us-west-1.sagemaker.aws", "notebook-fips.us-west-1.sagemaker.aws", "notebook.us-west-2.sagemaker.aws", "notebook-fips.us-west-2.sagemaker.aws", "notebook.cn-north-1.sagemaker.com.cn", "notebook.cn-northwest-1.sagemaker.com.cn", "studio.af-south-1.sagemaker.aws", "studio.ap-east-1.sagemaker.aws", "studio.ap-northeast-1.sagemaker.aws", "studio.ap-northeast-2.sagemaker.aws", "studio.ap-northeast-3.sagemaker.aws", "studio.ap-south-1.sagemaker.aws", "studio.ap-southeast-1.sagemaker.aws", "studio.ap-southeast-2.sagemaker.aws", "studio.ap-southeast-3.sagemaker.aws", "studio.ca-central-1.sagemaker.aws", "studio.eu-central-1.sagemaker.aws", "studio.eu-north-1.sagemaker.aws", "studio.eu-south-1.sagemaker.aws", "studio.eu-south-2.sagemaker.aws", "studio.eu-west-1.sagemaker.aws", "studio.eu-west-2.sagemaker.aws", "studio.eu-west-3.sagemaker.aws", "studio.il-central-1.sagemaker.aws", "studio.me-central-1.sagemaker.aws", "studio.me-south-1.sagemaker.aws", "studio.sa-east-1.sagemaker.aws", "studio.us-east-1.sagemaker.aws", "studio.us-east-2.sagemaker.aws", "studio.us-gov-east-1.sagemaker.aws", "studio-fips.us-gov-east-1.sagemaker.aws", "studio.us-gov-west-1.sagemaker.aws", "studio-fips.us-gov-west-1.sagemaker.aws", "studio.us-west-1.sagemaker.aws", "studio.us-west-2.sagemaker.aws", "studio.cn-north-1.sagemaker.com.cn", "studio.cn-northwest-1.sagemaker.com.cn", "*.experiments.sagemaker.aws", "analytics-gateway.ap-northeast-1.amazonaws.com", "analytics-gateway.ap-northeast-2.amazonaws.com", "analytics-gateway.ap-south-1.amazonaws.com", "analytics-gateway.ap-southeast-1.amazonaws.com", "analytics-gateway.ap-southeast-2.amazonaws.com", "analytics-gateway.eu-central-1.amazonaws.com", "analytics-gateway.eu-west-1.amazonaws.com", "analytics-gateway.us-east-1.amazonaws.com", "analytics-gateway.us-east-2.amazonaws.com", "analytics-gateway.us-west-2.amazonaws.com", "amplifyapp.com", "*.awsapprunner.com", "webview-assets.aws-cloud9.af-south-1.amazonaws.com", "vfs.cloud9.af-south-1.amazonaws.com", "webview-assets.cloud9.af-south-1.amazonaws.com", "webview-assets.aws-cloud9.ap-east-1.amazonaws.com", "vfs.cloud9.ap-east-1.amazonaws.com", "webview-assets.cloud9.ap-east-1.amazonaws.com", "webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com", "vfs.cloud9.ap-northeast-1.amazonaws.com", "webview-assets.cloud9.ap-northeast-1.amazonaws.com", "webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com", "vfs.cloud9.ap-northeast-2.amazonaws.com", "webview-assets.cloud9.ap-northeast-2.amazonaws.com", "webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com", "vfs.cloud9.ap-northeast-3.amazonaws.com", "webview-assets.cloud9.ap-northeast-3.amazonaws.com", "webview-assets.aws-cloud9.ap-south-1.amazonaws.com", "vfs.cloud9.ap-south-1.amazonaws.com", "webview-assets.cloud9.ap-south-1.amazonaws.com", "webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com", "vfs.cloud9.ap-southeast-1.amazonaws.com", "webview-assets.cloud9.ap-southeast-1.amazonaws.com", "webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com", "vfs.cloud9.ap-southeast-2.amazonaws.com", "webview-assets.cloud9.ap-southeast-2.amazonaws.com", "webview-assets.aws-cloud9.ca-central-1.amazonaws.com", "vfs.cloud9.ca-central-1.amazonaws.com", "webview-assets.cloud9.ca-central-1.amazonaws.com", "webview-assets.aws-cloud9.eu-central-1.amazonaws.com", "vfs.cloud9.eu-central-1.amazonaws.com", "webview-assets.cloud9.eu-central-1.amazonaws.com", "webview-assets.aws-cloud9.eu-north-1.amazonaws.com", "vfs.cloud9.eu-north-1.amazonaws.com", "webview-assets.cloud9.eu-north-1.amazonaws.com", "webview-assets.aws-cloud9.eu-south-1.amazonaws.com", "vfs.cloud9.eu-south-1.amazonaws.com", "webview-assets.cloud9.eu-south-1.amazonaws.com", "webview-assets.aws-cloud9.eu-west-1.amazonaws.com", "vfs.cloud9.eu-west-1.amazonaws.com", "webview-assets.cloud9.eu-west-1.amazonaws.com", "webview-assets.aws-cloud9.eu-west-2.amazonaws.com", "vfs.cloud9.eu-west-2.amazonaws.com", "webview-assets.cloud9.eu-west-2.amazonaws.com", "webview-assets.aws-cloud9.eu-west-3.amazonaws.com", "vfs.cloud9.eu-west-3.amazonaws.com", "webview-assets.cloud9.eu-west-3.amazonaws.com", "webview-assets.aws-cloud9.il-central-1.amazonaws.com", "vfs.cloud9.il-central-1.amazonaws.com", "webview-assets.aws-cloud9.me-south-1.amazonaws.com", "vfs.cloud9.me-south-1.amazonaws.com", "webview-assets.cloud9.me-south-1.amazonaws.com", "webview-assets.aws-cloud9.sa-east-1.amazonaws.com", "vfs.cloud9.sa-east-1.amazonaws.com", "webview-assets.cloud9.sa-east-1.amazonaws.com", "webview-assets.aws-cloud9.us-east-1.amazonaws.com", "vfs.cloud9.us-east-1.amazonaws.com", "webview-assets.cloud9.us-east-1.amazonaws.com", "webview-assets.aws-cloud9.us-east-2.amazonaws.com", "vfs.cloud9.us-east-2.amazonaws.com", "webview-assets.cloud9.us-east-2.amazonaws.com", "webview-assets.aws-cloud9.us-west-1.amazonaws.com", "vfs.cloud9.us-west-1.amazonaws.com", "webview-assets.cloud9.us-west-1.amazonaws.com", "webview-assets.aws-cloud9.us-west-2.amazonaws.com", "vfs.cloud9.us-west-2.amazonaws.com", "webview-assets.cloud9.us-west-2.amazonaws.com", "awsapps.com", "cn-north-1.eb.amazonaws.com.cn", "cn-northwest-1.eb.amazonaws.com.cn", "elasticbeanstalk.com", "af-south-1.elasticbeanstalk.com", "ap-east-1.elasticbeanstalk.com", "ap-northeast-1.elasticbeanstalk.com", "ap-northeast-2.elasticbeanstalk.com", "ap-northeast-3.elasticbeanstalk.com", "ap-south-1.elasticbeanstalk.com", "ap-southeast-1.elasticbeanstalk.com", "ap-southeast-2.elasticbeanstalk.com", "ap-southeast-3.elasticbeanstalk.com", "ca-central-1.elasticbeanstalk.com", "eu-central-1.elasticbeanstalk.com", "eu-north-1.elasticbeanstalk.com", "eu-south-1.elasticbeanstalk.com", "eu-west-1.elasticbeanstalk.com", "eu-west-2.elasticbeanstalk.com", "eu-west-3.elasticbeanstalk.com", "il-central-1.elasticbeanstalk.com", "me-south-1.elasticbeanstalk.com", "sa-east-1.elasticbeanstalk.com", "us-east-1.elasticbeanstalk.com", "us-east-2.elasticbeanstalk.com", "us-gov-east-1.elasticbeanstalk.com", "us-gov-west-1.elasticbeanstalk.com", "us-west-1.elasticbeanstalk.com", "us-west-2.elasticbeanstalk.com", "*.elb.amazonaws.com.cn", "*.elb.amazonaws.com", "awsglobalaccelerator.com", "*.private.repost.aws", "eero.online", "eero-stage.online", "apigee.io", "panel.dev", "siiites.com", "appspacehosted.com", "appspaceusercontent.com", "appudo.net", "on-aptible.com", "f5.si", "arvanedge.ir", "user.aseinet.ne.jp", "gv.vc", "d.gv.vc", "user.party.eus", "pimienta.org", "poivron.org", "potager.org", "sweetpepper.org", "myasustor.com", "cdn.prod.atlassian-dev.net", "translated.page", "myfritz.link", "myfritz.net", "onavstack.net", "*.awdev.ca", "*.advisor.ws", "ecommerce-shop.pl", "b-data.io", "balena-devices.com", "base.ec", "official.ec", "buyshop.jp", "fashionstore.jp", "handcrafted.jp", "kawaiishop.jp", "supersale.jp", "theshop.jp", "shopselect.net", "base.shop", "beagleboard.io", "*.beget.app", "pages.gay", "bnr.la", "bitbucket.io", "blackbaudcdn.net", "of.je", "bluebite.io", "boomla.net", "boutir.com", "boxfuse.io", "square7.ch", "bplaced.com", "bplaced.de", "square7.de", "bplaced.net", "square7.net", "*.s.brave.io", "shop.brendly.hr", "shop.brendly.rs", "browsersafetymark.io", "radio.am", "radio.fm", "uk0.bigv.io", "dh.bytemark.co.uk", "vm.bytemark.co.uk", "cafjs.com", "canva-apps.cn", "*.my.canvasite.cn", "canva-apps.com", "*.my.canva.site", "drr.ac", "uwu.ai", "carrd.co", "crd.co", "ju.mp", "api.gov.uk", "cdn77-storage.com", "rsc.contentproxy9.cz", "r.cdn77.net", "cdn77-ssl.net", "c.cdn77.org", "rsc.cdn77.org", "ssl.origin.cdn77-secure.org", "za.bz", "br.com", "cn.com", "de.com", "eu.com", "jpn.com", "mex.com", "ru.com", "sa.com", "uk.com", "us.com", "za.com", "com.de", "gb.net", "hu.net", "jp.net", "se.net", "uk.net", "ae.org", "com.se", "cx.ua", "discourse.group", "discourse.team", "clerk.app", "clerkstage.app", "*.lcl.dev", "*.lclstage.dev", "*.stg.dev", "*.stgstage.dev", "cleverapps.cc", "*.services.clever-cloud.com", "cleverapps.io", "cleverapps.tech", "clickrising.net", "cloudns.asia", "cloudns.be", "cloud-ip.biz", "cloudns.biz", "cloudns.cc", "cloudns.ch", "cloudns.cl", "cloudns.club", "dnsabr.com", "ip-ddns.com", "cloudns.cx", "cloudns.eu", "cloudns.in", "cloudns.info", "ddns-ip.net", "dns-cloud.net", "dns-dynamic.net", "cloudns.nz", "cloudns.org", "ip-dynamic.org", "cloudns.ph", "cloudns.pro", "cloudns.pw", "cloudns.us", "c66.me", "cloud66.ws", "cloud66.zone", "jdevcloud.com", "wpdevcloud.com", "cloudaccess.host", "freesite.host", "cloudaccess.net", "*.cloudera.site", "cf-ipfs.com", "cloudflare-ipfs.com", "trycloudflare.com", "pages.dev", "r2.dev", "workers.dev", "cloudflare.net", "cdn.cloudflare.net", "cdn.cloudflareanycast.net", "cdn.cloudflarecn.net", "cdn.cloudflareglobal.net", "cust.cloudscale.ch", "objects.lpg.cloudscale.ch", "objects.rma.cloudscale.ch", "wnext.app", "cnpy.gdn", "*.otap.co", "co.ca", "co.com", "codeberg.page", "csb.app", "preview.csb.app", "co.nl", "co.no", "webhosting.be", "hosting-cluster.nl", "ctfcloud.net", "convex.site", "ac.ru", "edu.ru", "gov.ru", "int.ru", "mil.ru", "test.ru", "dyn.cosidns.de", "dnsupdater.de", "dynamisches-dns.de", "internet-dns.de", "l-o-g-i-n.de", "dynamic-dns.info", "feste-ip.net", "knx-server.net", "static-access.net", "craft.me", "realm.cz", "on.crisp.email", "*.cryptonomic.net", "curv.dev", "cfolks.pl", "cyon.link", "cyon.site", "platform0.app", "fnwk.site", "folionetwork.site", "biz.dk", "co.dk", "firm.dk", "reg.dk", "store.dk", "dyndns.dappnode.io", "builtwithdark.com", "darklang.io", "demo.datadetect.com", "instance.datadetect.com", "edgestack.me", "dattolocal.com", "dattorelay.com", "dattoweb.com", "mydatto.com", "dattolocal.net", "mydatto.net", "ddnss.de", "dyn.ddnss.de", "dyndns.ddnss.de", "dyn-ip24.de", "dyndns1.de", "home-webserver.de", "dyn.home-webserver.de", "myhome-server.de", "ddnss.org", "debian.net", "definima.io", "definima.net", "deno.dev", "deno-staging.dev", "dedyn.io", "deta.app", "deta.dev", "dfirma.pl", "dkonto.pl", "you2.pl", "ondigitalocean.app", "*.digitaloceanspaces.com", "us.kg", "rss.my.id", "diher.solutions", "discordsays.com", "discordsez.com", "jozi.biz", "dnshome.de", "online.th", "shop.th", "drayddns.com", "shoparena.pl", "dreamhosters.com", "durumis.com", "mydrobo.com", "drud.io", "drud.us", "duckdns.org", "dy.fi", "tunk.org", "dyndns.biz", "for-better.biz", "for-more.biz", "for-some.biz", "for-the.biz", "selfip.biz", "webhop.biz", "ftpaccess.cc", "game-server.cc", "myphotos.cc", "scrapping.cc", "blogdns.com", "cechire.com", "dnsalias.com", "dnsdojo.com", "doesntexist.com", "dontexist.com", "doomdns.com", "dyn-o-saur.com", "dynalias.com", "dyndns-at-home.com", "dyndns-at-work.com", "dyndns-blog.com", "dyndns-free.com", "dyndns-home.com", "dyndns-ip.com", "dyndns-mail.com", "dyndns-office.com", "dyndns-pics.com", "dyndns-remote.com", "dyndns-server.com", "dyndns-web.com", "dyndns-wiki.com", "dyndns-work.com", "est-a-la-maison.com", "est-a-la-masion.com", "est-le-patron.com", "est-mon-blogueur.com", "from-ak.com", "from-al.com", "from-ar.com", "from-ca.com", "from-ct.com", "from-dc.com", "from-de.com", "from-fl.com", "from-ga.com", "from-hi.com", "from-ia.com", "from-id.com", "from-il.com", "from-in.com", "from-ks.com", "from-ky.com", "from-ma.com", "from-md.com", "from-mi.com", "from-mn.com", "from-mo.com", "from-ms.com", "from-mt.com", "from-nc.com", "from-nd.com", "from-ne.com", "from-nh.com", "from-nj.com", "from-nm.com", "from-nv.com", "from-oh.com", "from-ok.com", "from-or.com", "from-pa.com", "from-pr.com", "from-ri.com", "from-sc.com", "from-sd.com", "from-tn.com", "from-tx.com", "from-ut.com", "from-va.com", "from-vt.com", "from-wa.com", "from-wi.com", "from-wv.com", "from-wy.com", "getmyip.com", "gotdns.com", "hobby-site.com", "homelinux.com", "homeunix.com", "iamallama.com", "is-a-anarchist.com", "is-a-blogger.com", "is-a-bookkeeper.com", "is-a-bulls-fan.com", "is-a-caterer.com", "is-a-chef.com", "is-a-conservative.com", "is-a-cpa.com", "is-a-cubicle-slave.com", "is-a-democrat.com", "is-a-designer.com", "is-a-doctor.com", "is-a-financialadvisor.com", "is-a-geek.com", "is-a-green.com", "is-a-guru.com", "is-a-hard-worker.com", "is-a-hunter.com", "is-a-landscaper.com", "is-a-lawyer.com", "is-a-liberal.com", "is-a-libertarian.com", "is-a-llama.com", "is-a-musician.com", "is-a-nascarfan.com", "is-a-nurse.com", "is-a-painter.com", "is-a-personaltrainer.com", "is-a-photographer.com", "is-a-player.com", "is-a-republican.com", "is-a-rockstar.com", "is-a-socialist.com", "is-a-student.com", "is-a-teacher.com", "is-a-techie.com", "is-a-therapist.com", "is-an-accountant.com", "is-an-actor.com", "is-an-actress.com", "is-an-anarchist.com", "is-an-artist.com", "is-an-engineer.com", "is-an-entertainer.com", "is-certified.com", "is-gone.com", "is-into-anime.com", "is-into-cars.com", "is-into-cartoons.com", "is-into-games.com", "is-leet.com", "is-not-certified.com", "is-slick.com", "is-uberleet.com", "is-with-theband.com", "isa-geek.com", "isa-hockeynut.com", "issmarterthanyou.com", "likes-pie.com", "likescandy.com", "neat-url.com", "saves-the-whales.com", "selfip.com", "sells-for-less.com", "sells-for-u.com", "servebbs.com", "simple-url.com", "space-to-rent.com", "teaches-yoga.com", "writesthisblog.com", "ath.cx", "fuettertdasnetz.de", "isteingeek.de", "istmein.de", "lebtimnetz.de", "leitungsen.de", "traeumtgerade.de", "barrel-of-knowledge.info", "barrell-of-knowledge.info", "dyndns.info", "for-our.info", "groks-the.info", "groks-this.info", "here-for-more.info", "knowsitall.info", "selfip.info", "webhop.info", "forgot.her.name", "forgot.his.name", "at-band-camp.net", "blogdns.net", "broke-it.net", "buyshouses.net", "dnsalias.net", "dnsdojo.net", "does-it.net", "dontexist.net", "dynalias.net", "dynathome.net", "endofinternet.net", "from-az.net", "from-co.net", "from-la.net", "from-ny.net", "gets-it.net", "ham-radio-op.net", "homeftp.net", "homeip.net", "homelinux.net", "homeunix.net", "in-the-band.net", "is-a-chef.net", "is-a-geek.net", "isa-geek.net", "kicks-ass.net", "office-on-the.net", "podzone.net", "scrapper-site.net", "selfip.net", "sells-it.net", "servebbs.net", "serveftp.net", "thruhere.net", "webhop.net", "merseine.nu", "mine.nu", "shacknet.nu", "blogdns.org", "blogsite.org", "boldlygoingnowhere.org", "dnsalias.org", "dnsdojo.org", "doesntexist.org", "dontexist.org", "doomdns.org", "dvrdns.org", "dynalias.org", "dyndns.org", "go.dyndns.org", "home.dyndns.org", "endofinternet.org", "endoftheinternet.org", "from-me.org", "game-host.org", "gotdns.org", "hobby-site.org", "homedns.org", "homeftp.org", "homelinux.org", "homeunix.org", "is-a-bruinsfan.org", "is-a-candidate.org", "is-a-celticsfan.org", "is-a-chef.org", "is-a-geek.org", "is-a-knight.org", "is-a-linux-user.org", "is-a-patsfan.org", "is-a-soxfan.org", "is-found.org", "is-lost.org", "is-saved.org", "is-very-bad.org", "is-very-evil.org", "is-very-good.org", "is-very-nice.org", "is-very-sweet.org", "isa-geek.org", "kicks-ass.org", "misconfused.org", "podzone.org", "readmyblog.org", "selfip.org", "sellsyourhome.org", "servebbs.org", "serveftp.org", "servegame.org", "stuff-4-sale.org", "webhop.org", "better-than.tv", "dyndns.tv", "on-the-web.tv", "worse-than.tv", "is-by.us", "land-4-sale.us", "stuff-4-sale.us", "dyndns.ws", "mypets.ws", "ddnsfree.com", "ddnsgeek.com", "giize.com", "gleeze.com", "kozow.com", "loseyourip.com", "ooguy.com", "theworkpc.com", "casacam.net", "dynu.net", "accesscam.org", "camdvr.org", "freeddns.org", "mywire.org", "webredirect.org", "myddns.rocks", "dynv6.net", "e4.cz", "easypanel.app", "easypanel.host", "*.ewp.live", "twmail.cc", "twmail.net", "twmail.org", "mymailer.com.tw", "url.tw", "at.emf.camp", "rt.ht", "elementor.cloud", "elementor.cool", "en-root.fr", "mytuleap.com", "tuleap-partners.com", "encr.app", "encoreapi.com", "eu.encoway.cloud", "eu.org", "al.eu.org", "asso.eu.org", "at.eu.org", "au.eu.org", "be.eu.org", "bg.eu.org", "ca.eu.org", "cd.eu.org", "ch.eu.org", "cn.eu.org", "cy.eu.org", "cz.eu.org", "de.eu.org", "dk.eu.org", "edu.eu.org", "ee.eu.org", "es.eu.org", "fi.eu.org", "fr.eu.org", "gr.eu.org", "hr.eu.org", "hu.eu.org", "ie.eu.org", "il.eu.org", "in.eu.org", "int.eu.org", "is.eu.org", "it.eu.org", "jp.eu.org", "kr.eu.org", "lt.eu.org", "lu.eu.org", "lv.eu.org", "me.eu.org", "mk.eu.org", "mt.eu.org", "my.eu.org", "net.eu.org", "ng.eu.org", "nl.eu.org", "no.eu.org", "nz.eu.org", "pl.eu.org", "pt.eu.org", "ro.eu.org", "ru.eu.org", "se.eu.org", "si.eu.org", "sk.eu.org", "tr.eu.org", "uk.eu.org", "us.eu.org", "eurodir.ru", "eu-1.evennode.com", "eu-2.evennode.com", "eu-3.evennode.com", "eu-4.evennode.com", "us-1.evennode.com", "us-2.evennode.com", "us-3.evennode.com", "us-4.evennode.com", "relay.evervault.app", "relay.evervault.dev", "expo.app", "staging.expo.app", "onfabrica.com", "ru.net", "adygeya.ru", "bashkiria.ru", "bir.ru", "cbg.ru", "com.ru", "dagestan.ru", "grozny.ru", "kalmykia.ru", "kustanai.ru", "marine.ru", "mordovia.ru", "msk.ru", "mytis.ru", "nalchik.ru", "nov.ru", "pyatigorsk.ru", "spb.ru", "vladikavkaz.ru", "vladimir.ru", "abkhazia.su", "adygeya.su", "aktyubinsk.su", "arkhangelsk.su", "armenia.su", "ashgabad.su", "azerbaijan.su", "balashov.su", "bashkiria.su", "bryansk.su", "bukhara.su", "chimkent.su", "dagestan.su", "east-kazakhstan.su", "exnet.su", "georgia.su", "grozny.su", "ivanovo.su", "jambyl.su", "kalmykia.su", "kaluga.su", "karacol.su", "karaganda.su", "karelia.su", "khakassia.su", "krasnodar.su", "kurgan.su", "kustanai.su", "lenug.su", "mangyshlak.su", "mordovia.su", "msk.su", "murmansk.su", "nalchik.su", "navoi.su", "north-kazakhstan.su", "nov.su", "obninsk.su", "penza.su", "pokrovsk.su", "sochi.su", "spb.su", "tashkent.su", "termez.su", "togliatti.su", "troitsk.su", "tselinograd.su", "tula.su", "tuva.su", "vladikavkaz.su", "vladimir.su", "vologda.su", "channelsdvr.net", "u.channelsdvr.net", "edgecompute.app", "fastly-edge.com", "fastly-terrarium.com", "freetls.fastly.net", "map.fastly.net", "a.prod.fastly.net", "global.prod.fastly.net", "a.ssl.fastly.net", "b.ssl.fastly.net", "global.ssl.fastly.net", "fastlylb.net", "map.fastlylb.net", "*.user.fm", "fastvps-server.com", "fastvps.host", "myfast.host", "fastvps.site", "myfast.space", "conn.uk", "copro.uk", "hosp.uk", "fedorainfracloud.org", "fedorapeople.org", "cloud.fedoraproject.org", "app.os.fedoraproject.org", "app.os.stg.fedoraproject.org", "mydobiss.com", "fh-muenster.io", "filegear.me", "firebaseapp.com", "fldrv.com", "flutterflow.app", "fly.dev", "shw.io", "edgeapp.net", "forgeblocks.com", "id.forgerock.io", "framer.ai", "framer.app", "framercanvas.com", "framer.media", "framer.photos", "framer.website", "framer.wiki", "0e.vc", "freebox-os.com", "freeboxos.com", "fbx-os.fr", "fbxos.fr", "freebox-os.fr", "freeboxos.fr", "freedesktop.org", "freemyip.com", "*.frusky.de", "wien.funkfeuer.at", "daemon.asia", "dix.asia", "mydns.bz", "0am.jp", "0g0.jp", "0j0.jp", "0t0.jp", "mydns.jp", "pgw.jp", "wjg.jp", "keyword-on.net", "live-on.net", "server-on.net", "mydns.tw", "mydns.vc", "*.futurecms.at", "*.ex.futurecms.at", "*.in.futurecms.at", "futurehosting.at", "futuremailing.at", "*.ex.ortsinfo.at", "*.kunden.ortsinfo.at", "*.statics.cloud", "aliases121.com", "campaign.gov.uk", "service.gov.uk", "independent-commission.uk", "independent-inquest.uk", "independent-inquiry.uk", "independent-panel.uk", "independent-review.uk", "public-inquiry.uk", "royal-commission.uk", "gehirn.ne.jp", "usercontent.jp", "gentapps.com", "gentlentapis.com", "lab.ms", "cdn-edges.net", "localcert.net", "localhostcert.net", "gsj.bz", "githubusercontent.com", "githubpreview.dev", "github.io", "gitlab.io", "gitapp.si", "gitpage.si", "glitch.me", "nog.community", "co.ro", "shop.ro", "lolipop.io", "angry.jp", "babyblue.jp", "babymilk.jp", "backdrop.jp", "bambina.jp", "bitter.jp", "blush.jp", "boo.jp", "boy.jp", "boyfriend.jp", "but.jp", "candypop.jp", "capoo.jp", "catfood.jp", "cheap.jp", "chicappa.jp", "chillout.jp", "chips.jp", "chowder.jp", "chu.jp", "ciao.jp", "cocotte.jp", "coolblog.jp", "cranky.jp", "cutegirl.jp", "daa.jp", "deca.jp", "deci.jp", "digick.jp", "egoism.jp", "fakefur.jp", "fem.jp", "flier.jp", "floppy.jp", "fool.jp", "frenchkiss.jp", "girlfriend.jp", "girly.jp", "gloomy.jp", "gonna.jp", "greater.jp", "hacca.jp", "heavy.jp", "her.jp", "hiho.jp", "hippy.jp", "holy.jp", "hungry.jp", "icurus.jp", "itigo.jp", "jellybean.jp", "kikirara.jp", "kill.jp", "kilo.jp", "kuron.jp", "littlestar.jp", "lolipopmc.jp", "lolitapunk.jp", "lomo.jp", "lovepop.jp", "lovesick.jp", "main.jp", "mods.jp", "mond.jp", "mongolian.jp", "moo.jp", "namaste.jp", "nikita.jp", "nobushi.jp", "noor.jp", "oops.jp", "parallel.jp", "parasite.jp", "pecori.jp", "peewee.jp", "penne.jp", "pepper.jp", "perma.jp", "pigboat.jp", "pinoko.jp", "punyu.jp", "pupu.jp", "pussycat.jp", "pya.jp", "raindrop.jp", "readymade.jp", "sadist.jp", "schoolbus.jp", "secret.jp", "staba.jp", "stripper.jp", "sub.jp", "sunnyday.jp", "thick.jp", "tonkotsu.jp", "under.jp", "upper.jp", "velvet.jp", "verse.jp", "versus.jp", "vivian.jp", "watson.jp", "weblike.jp", "whitesnow.jp", "zombie.jp", "heteml.net", "graphic.design", "goip.de", "blogspot.ae", "blogspot.al", "blogspot.am", "*.hosted.app", "*.run.app", "web.app", "blogspot.com.ar", "blogspot.co.at", "blogspot.com.au", "blogspot.ba", "blogspot.be", "blogspot.bg", "blogspot.bj", "blogspot.com.br", "blogspot.com.by", "blogspot.ca", "blogspot.cf", "blogspot.ch", "blogspot.cl", "blogspot.com.co", "*.0emm.com", "appspot.com", "*.r.appspot.com", "blogspot.com", "codespot.com", "googleapis.com", "googlecode.com", "pagespeedmobilizer.com", "withgoogle.com", "withyoutube.com", "blogspot.cv", "blogspot.com.cy", "blogspot.cz", "blogspot.de", "*.gateway.dev", "blogspot.dk", "blogspot.com.ee", "blogspot.com.eg", "blogspot.com.es", "blogspot.fi", "blogspot.fr", "cloud.goog", "translate.goog", "*.usercontent.goog", "blogspot.gr", "blogspot.hk", "blogspot.hr", "blogspot.hu", "blogspot.co.id", "blogspot.ie", "blogspot.co.il", "blogspot.in", "blogspot.is", "blogspot.it", "blogspot.jp", "blogspot.co.ke", "blogspot.kr", "blogspot.li", "blogspot.lt", "blogspot.lu", "blogspot.md", "blogspot.mk", "blogspot.com.mt", "blogspot.mx", "blogspot.my", "cloudfunctions.net", "blogspot.com.ng", "blogspot.nl", "blogspot.no", "blogspot.co.nz", "blogspot.pe", "blogspot.pt", "blogspot.qa", "blogspot.re", "blogspot.ro", "blogspot.rs", "blogspot.ru", "blogspot.se", "blogspot.sg", "blogspot.si", "blogspot.sk", "blogspot.sn", "blogspot.td", "blogspot.com.tr", "blogspot.tw", "blogspot.ug", "blogspot.co.uk", "blogspot.com.uy", "blogspot.vn", "blogspot.co.za", "goupile.fr", "pymnt.uk", "cloudapps.digital", "london.cloudapps.digital", "gov.nl", "grafana-dev.net", "grayjayleagues.com", "g\xFCnstigbestellen.de", "g\xFCnstigliefern.de", "fin.ci", "free.hr", "caa.li", "ua.rs", "conf.se", "h\xE4kkinen.fi", "hrsn.dev", "hashbang.sh", "hasura.app", "hasura-app.io", "hatenablog.com", "hatenadiary.com", "hateblo.jp", "hatenablog.jp", "hatenadiary.jp", "hatenadiary.org", "pages.it.hs-heilbronn.de", "pages-research.it.hs-heilbronn.de", "heiyu.space", "helioho.st", "heliohost.us", "hepforge.org", "herokuapp.com", "herokussl.com", "heyflow.page", "heyflow.site", "ravendb.cloud", "ravendb.community", "development.run", "ravendb.run", "homesklep.pl", "*.kin.one", "*.id.pub", "*.kin.pub", "secaas.hk", "hoplix.shop", "orx.biz", "biz.gl", "biz.ng", "co.biz.ng", "dl.biz.ng", "go.biz.ng", "lg.biz.ng", "on.biz.ng", "col.ng", "firm.ng", "gen.ng", "ltd.ng", "ngo.ng", "plc.ng", "ie.ua", "hostyhosting.io", "hf.space", "static.hf.space", "hypernode.io", "iobb.net", "co.cz", "*.moonscale.io", "moonscale.net", "gr.com", "iki.fi", "ibxos.it", "iliadboxos.it", "smushcdn.com", "wphostedmail.com", "wpmucdn.com", "tempurl.host", "wpmudev.host", "dyn-berlin.de", "in-berlin.de", "in-brb.de", "in-butter.de", "in-dsl.de", "in-vpn.de", "in-dsl.net", "in-vpn.net", "in-dsl.org", "in-vpn.org", "biz.at", "info.at", "info.cx", "ac.leg.br", "al.leg.br", "am.leg.br", "ap.leg.br", "ba.leg.br", "ce.leg.br", "df.leg.br", "es.leg.br", "go.leg.br", "ma.leg.br", "mg.leg.br", "ms.leg.br", "mt.leg.br", "pa.leg.br", "pb.leg.br", "pe.leg.br", "pi.leg.br", "pr.leg.br", "rj.leg.br", "rn.leg.br", "ro.leg.br", "rr.leg.br", "rs.leg.br", "sc.leg.br", "se.leg.br", "sp.leg.br", "to.leg.br", "pixolino.com", "na4u.ru", "apps-1and1.com", "live-website.com", "apps-1and1.net", "websitebuilder.online", "app-ionos.space", "iopsys.se", "*.dweb.link", "ipifony.net", "ir.md", "is-a-good.dev", "is-a.dev", "iservschule.de", "mein-iserv.de", "schulplattform.de", "schulserver.de", "test-iserv.de", "iserv.dev", "mel.cloudlets.com.au", "cloud.interhostsolutions.be", "alp1.ae.flow.ch", "appengine.flow.ch", "es-1.axarnet.cloud", "diadem.cloud", "vip.jelastic.cloud", "jele.cloud", "it1.eur.aruba.jenv-aruba.cloud", "it1.jenv-aruba.cloud", "keliweb.cloud", "cs.keliweb.cloud", "oxa.cloud", "tn.oxa.cloud", "uk.oxa.cloud", "primetel.cloud", "uk.primetel.cloud", "ca.reclaim.cloud", "uk.reclaim.cloud", "us.reclaim.cloud", "ch.trendhosting.cloud", "de.trendhosting.cloud", "jele.club", "dopaas.com", "paas.hosted-by-previder.com", "rag-cloud.hosteur.com", "rag-cloud-ch.hosteur.com", "jcloud.ik-server.com", "jcloud-ver-jpc.ik-server.com", "demo.jelastic.com", "paas.massivegrid.com", "jed.wafaicloud.com", "ryd.wafaicloud.com", "j.scaleforce.com.cy", "jelastic.dogado.eu", "fi.cloudplatform.fi", "demo.datacenter.fi", "paas.datacenter.fi", "jele.host", "mircloud.host", "paas.beebyte.io", "sekd1.beebyteapp.io", "jele.io", "jc.neen.it", "jcloud.kz", "cloudjiffy.net", "fra1-de.cloudjiffy.net", "west1-us.cloudjiffy.net", "jls-sto1.elastx.net", "jls-sto2.elastx.net", "jls-sto3.elastx.net", "fr-1.paas.massivegrid.net", "lon-1.paas.massivegrid.net", "lon-2.paas.massivegrid.net", "ny-1.paas.massivegrid.net", "ny-2.paas.massivegrid.net", "sg-1.paas.massivegrid.net", "jelastic.saveincloud.net", "nordeste-idc.saveincloud.net", "j.scaleforce.net", "sdscloud.pl", "unicloud.pl", "mircloud.ru", "enscaled.sg", "jele.site", "jelastic.team", "orangecloud.tn", "j.layershift.co.uk", "phx.enscaled.us", "mircloud.us", "myjino.ru", "*.hosting.myjino.ru", "*.landing.myjino.ru", "*.spectrum.myjino.ru", "*.vps.myjino.ru", "jotelulu.cloud", "webadorsite.com", "jouwweb.site", "*.cns.joyent.com", "*.triton.zone", "js.org", "kaas.gg", "khplay.nl", "kapsi.fi", "ezproxy.kuleuven.be", "kuleuven.cloud", "keymachine.de", "kinghost.net", "uni5.net", "knightpoint.systems", "koobin.events", "webthings.io", "krellian.net", "oya.to", "git-repos.de", "lcube-server.de", "svn-repos.de", "leadpages.co", "lpages.co", "lpusercontent.com", "lelux.site", "libp2p.direct", "runcontainers.dev", "co.business", "co.education", "co.events", "co.financial", "co.network", "co.place", "co.technology", "linkyard-cloud.ch", "linkyard.cloud", "members.linode.com", "*.nodebalancer.linode.com", "*.linodeobjects.com", "ip.linodeusercontent.com", "we.bs", "filegear-sg.me", "ggff.net", "*.user.localcert.dev", "lodz.pl", "pabianice.pl", "plock.pl", "sieradz.pl", "skierniewice.pl", "zgierz.pl", "loginline.app", "loginline.dev", "loginline.io", "loginline.services", "loginline.site", "lohmus.me", "servers.run", "krasnik.pl", "leczna.pl", "lubartow.pl", "lublin.pl", "poniatowa.pl", "swidnik.pl", "glug.org.uk", "lug.org.uk", "lugs.org.uk", "barsy.bg", "barsy.club", "barsycenter.com", "barsyonline.com", "barsy.de", "barsy.dev", "barsy.eu", "barsy.gr", "barsy.in", "barsy.info", "barsy.io", "barsy.me", "barsy.menu", "barsyonline.menu", "barsy.mobi", "barsy.net", "barsy.online", "barsy.org", "barsy.pro", "barsy.pub", "barsy.ro", "barsy.rs", "barsy.shop", "barsyonline.shop", "barsy.site", "barsy.store", "barsy.support", "barsy.uk", "barsy.co.uk", "barsyonline.co.uk", "*.magentosite.cloud", "hb.cldmail.ru", "matlab.cloud", "modelscape.com", "mwcloudnonprod.com", "polyspace.com", "mayfirst.info", "mayfirst.org", "mazeplay.com", "mcdir.me", "mcdir.ru", "vps.mcdir.ru", "mcpre.ru", "mediatech.by", "mediatech.dev", "hra.health", "medusajs.app", "miniserver.com", "memset.net", "messerli.app", "atmeta.com", "apps.fbsbx.com", "*.cloud.metacentrum.cz", "custom.metacentrum.cz", "flt.cloud.muni.cz", "usr.cloud.muni.cz", "meteorapp.com", "eu.meteorapp.com", "co.pl", "*.azurecontainer.io", "azure-api.net", "azure-mobile.net", "azureedge.net", "azurefd.net", "azurestaticapps.net", "1.azurestaticapps.net", "2.azurestaticapps.net", "3.azurestaticapps.net", "4.azurestaticapps.net", "5.azurestaticapps.net", "6.azurestaticapps.net", "7.azurestaticapps.net", "centralus.azurestaticapps.net", "eastasia.azurestaticapps.net", "eastus2.azurestaticapps.net", "westeurope.azurestaticapps.net", "westus2.azurestaticapps.net", "azurewebsites.net", "cloudapp.net", "trafficmanager.net", "blob.core.windows.net", "servicebus.windows.net", "routingthecloud.com", "sn.mynetname.net", "routingthecloud.net", "routingthecloud.org", "csx.cc", "mydbserver.com", "webspaceconfig.de", "mittwald.info", "mittwaldserver.info", "typo3server.info", "project.space", "modx.dev", "bmoattachments.org", "net.ru", "org.ru", "pp.ru", "hostedpi.com", "caracal.mythic-beasts.com", "customer.mythic-beasts.com", "fentiger.mythic-beasts.com", "lynx.mythic-beasts.com", "ocelot.mythic-beasts.com", "oncilla.mythic-beasts.com", "onza.mythic-beasts.com", "sphinx.mythic-beasts.com", "vs.mythic-beasts.com", "x.mythic-beasts.com", "yali.mythic-beasts.com", "cust.retrosnub.co.uk", "ui.nabu.casa", "cloud.nospamproxy.com", "netfy.app", "netlify.app", "4u.com", "nfshost.com", "ipfs.nftstorage.link", "ngo.us", "ngrok.app", "ngrok-free.app", "ngrok.dev", "ngrok-free.dev", "ngrok.io", "ap.ngrok.io", "au.ngrok.io", "eu.ngrok.io", "in.ngrok.io", "jp.ngrok.io", "sa.ngrok.io", "us.ngrok.io", "ngrok.pizza", "ngrok.pro", "torun.pl", "nh-serv.co.uk", "nimsite.uk", "mmafan.biz", "myftp.biz", "no-ip.biz", "no-ip.ca", "fantasyleague.cc", "gotdns.ch", "3utilities.com", "blogsyte.com", "ciscofreak.com", "damnserver.com", "ddnsking.com", "ditchyourip.com", "dnsiskinky.com", "dynns.com", "geekgalaxy.com", "health-carereform.com", "homesecuritymac.com", "homesecuritypc.com", "myactivedirectory.com", "mysecuritycamera.com", "myvnc.com", "net-freaks.com", "onthewifi.com", "point2this.com", "quicksytes.com", "securitytactics.com", "servebeer.com", "servecounterstrike.com", "serveexchange.com", "serveftp.com", "servegame.com", "servehalflife.com", "servehttp.com", "servehumour.com", "serveirc.com", "servemp3.com", "servep2p.com", "servepics.com", "servequake.com", "servesarcasm.com", "stufftoread.com", "unusualperson.com", "workisboring.com", "dvrcam.info", "ilovecollege.info", "no-ip.info", "brasilia.me", "ddns.me", "dnsfor.me", "hopto.me", "loginto.me", "noip.me", "webhop.me", "bounceme.net", "ddns.net", "eating-organic.net", "mydissent.net", "myeffect.net", "mymediapc.net", "mypsx.net", "mysecuritycamera.net", "nhlfan.net", "no-ip.net", "pgafan.net", "privatizehealthinsurance.net", "redirectme.net", "serveblog.net", "serveminecraft.net", "sytes.net", "cable-modem.org", "collegefan.org", "couchpotatofries.org", "hopto.org", "mlbfan.org", "myftp.org", "mysecuritycamera.org", "nflfan.org", "no-ip.org", "read-books.org", "ufcfan.org", "zapto.org", "no-ip.co.uk", "golffan.us", "noip.us", "pointto.us", "stage.nodeart.io", "*.developer.app", "noop.app", "*.northflank.app", "*.build.run", "*.code.run", "*.database.run", "*.migration.run", "noticeable.news", "notion.site", "dnsking.ch", "mypi.co", "n4t.co", "001www.com", "myiphost.com", "forumz.info", "soundcast.me", "tcp4.me", "dnsup.net", "hicam.net", "now-dns.net", "ownip.net", "vpndns.net", "dynserv.org", "now-dns.org", "x443.pw", "now-dns.top", "ntdll.top", "freeddns.us", "nsupdate.info", "nerdpol.ovh", "nyc.mn", "prvcy.page", "obl.ong", "observablehq.cloud", "static.observableusercontent.com", "omg.lol", "cloudycluster.net", "omniwe.site", "123webseite.at", "123website.be", "simplesite.com.br", "123website.ch", "simplesite.com", "123webseite.de", "123hjemmeside.dk", "123miweb.es", "123kotisivu.fi", "123siteweb.fr", "simplesite.gr", "123homepage.it", "123website.lu", "123website.nl", "123hjemmeside.no", "service.one", "simplesite.pl", "123paginaweb.pt", "123minsida.se", "is-a-fullstack.dev", "is-cool.dev", "is-not-a.dev", "localplayer.dev", "is-local.org", "opensocial.site", "opencraft.hosting", "16-b.it", "32-b.it", "64-b.it", "orsites.com", "operaunite.com", "*.customer-oci.com", "*.oci.customer-oci.com", "*.ocp.customer-oci.com", "*.ocs.customer-oci.com", "*.oraclecloudapps.com", "*.oraclegovcloudapps.com", "*.oraclegovcloudapps.uk", "tech.orange", "can.re", "authgear-staging.com", "authgearapps.com", "skygearapp.com", "outsystemscloud.com", "*.hosting.ovh.net", "*.webpaas.ovh.net", "ownprovider.com", "own.pm", "*.owo.codes", "ox.rs", "oy.lc", "pgfog.com", "pagexl.com", "gotpantheon.com", "pantheonsite.io", "*.paywhirl.com", "*.xmit.co", "xmit.dev", "madethis.site", "srv.us", "gh.srv.us", "gl.srv.us", "lk3.ru", "mypep.link", "perspecta.cloud", "on-web.fr", "*.upsun.app", "upsunapp.com", "ent.platform.sh", "eu.platform.sh", "us.platform.sh", "*.platformsh.site", "*.tst.site", "platter-app.com", "platter-app.dev", "platterp.us", "pley.games", "onporter.run", "co.bn", "postman-echo.com", "pstmn.io", "mock.pstmn.io", "httpbin.org", "prequalifyme.today", "xen.prgmr.com", "priv.at", "protonet.io", "chirurgiens-dentistes-en-france.fr", "byen.site", "pubtls.org", "pythonanywhere.com", "eu.pythonanywhere.com", "qa2.com", "qcx.io", "*.sys.qcx.io", "myqnapcloud.cn", "alpha-myqnapcloud.com", "dev-myqnapcloud.com", "mycloudnas.com", "mynascloud.com", "myqnapcloud.com", "qoto.io", "qualifioapp.com", "ladesk.com", "qbuser.com", "*.quipelements.com", "vapor.cloud", "vaporcloud.io", "rackmaze.com", "rackmaze.net", "cloudsite.builders", "myradweb.net", "servername.us", "web.in", "in.net", "myrdbx.io", "site.rb-hosting.io", "*.on-rancher.cloud", "*.on-k3s.io", "*.on-rio.io", "ravpage.co.il", "readthedocs-hosted.com", "readthedocs.io", "rhcloud.com", "instances.spawn.cc", "onrender.com", "app.render.com", "replit.app", "id.replit.app", "firewalledreplit.co", "id.firewalledreplit.co", "repl.co", "id.repl.co", "replit.dev", "archer.replit.dev", "bones.replit.dev", "canary.replit.dev", "global.replit.dev", "hacker.replit.dev", "id.replit.dev", "janeway.replit.dev", "kim.replit.dev", "kira.replit.dev", "kirk.replit.dev", "odo.replit.dev", "paris.replit.dev", "picard.replit.dev", "pike.replit.dev", "prerelease.replit.dev", "reed.replit.dev", "riker.replit.dev", "sisko.replit.dev", "spock.replit.dev", "staging.replit.dev", "sulu.replit.dev", "tarpit.replit.dev", "teams.replit.dev", "tucker.replit.dev", "wesley.replit.dev", "worf.replit.dev", "repl.run", "resindevice.io", "devices.resinstaging.io", "hzc.io", "adimo.co.uk", "itcouldbewor.se", "aus.basketball", "nz.basketball", "git-pages.rit.edu", "rocky.page", "rub.de", "ruhr-uni-bochum.de", "io.noc.ruhr-uni-bochum.de", "\u0431\u0438\u0437.\u0440\u0443\u0441", "\u043A\u043E\u043C.\u0440\u0443\u0441", "\u043A\u0440\u044B\u043C.\u0440\u0443\u0441", "\u043C\u0438\u0440.\u0440\u0443\u0441", "\u043C\u0441\u043A.\u0440\u0443\u0441", "\u043E\u0440\u0433.\u0440\u0443\u0441", "\u0441\u0430\u043C\u0430\u0440\u0430.\u0440\u0443\u0441", "\u0441\u043E\u0447\u0438.\u0440\u0443\u0441", "\u0441\u043F\u0431.\u0440\u0443\u0441", "\u044F.\u0440\u0443\u0441", "ras.ru", "nyat.app", "180r.com", "dojin.com", "sakuratan.com", "sakuraweb.com", "x0.com", "2-d.jp", "bona.jp", "crap.jp", "daynight.jp", "eek.jp", "flop.jp", "halfmoon.jp", "jeez.jp", "matrix.jp", "mimoza.jp", "ivory.ne.jp", "mail-box.ne.jp", "mints.ne.jp", "mokuren.ne.jp", "opal.ne.jp", "sakura.ne.jp", "sumomo.ne.jp", "topaz.ne.jp", "netgamers.jp", "nyanta.jp", "o0o0.jp", "rdy.jp", "rgr.jp", "rulez.jp", "s3.isk01.sakurastorage.jp", "s3.isk02.sakurastorage.jp", "saloon.jp", "sblo.jp", "skr.jp", "tank.jp", "uh-oh.jp", "undo.jp", "rs.webaccel.jp", "user.webaccel.jp", "websozai.jp", "xii.jp", "squares.net", "jpn.org", "kirara.st", "x0.to", "from.tv", "sakura.tv", "*.builder.code.com", "*.dev-builder.code.com", "*.stg-builder.code.com", "*.001.test.code-builder-stg.platform.salesforce.com", "*.d.crm.dev", "*.w.crm.dev", "*.wa.crm.dev", "*.wb.crm.dev", "*.wc.crm.dev", "*.wd.crm.dev", "*.we.crm.dev", "*.wf.crm.dev", "sandcats.io", "logoip.com", "logoip.de", "fr-par-1.baremetal.scw.cloud", "fr-par-2.baremetal.scw.cloud", "nl-ams-1.baremetal.scw.cloud", "cockpit.fr-par.scw.cloud", "fnc.fr-par.scw.cloud", "functions.fnc.fr-par.scw.cloud", "k8s.fr-par.scw.cloud", "nodes.k8s.fr-par.scw.cloud", "s3.fr-par.scw.cloud", "s3-website.fr-par.scw.cloud", "whm.fr-par.scw.cloud", "priv.instances.scw.cloud", "pub.instances.scw.cloud", "k8s.scw.cloud", "cockpit.nl-ams.scw.cloud", "k8s.nl-ams.scw.cloud", "nodes.k8s.nl-ams.scw.cloud", "s3.nl-ams.scw.cloud", "s3-website.nl-ams.scw.cloud", "whm.nl-ams.scw.cloud", "cockpit.pl-waw.scw.cloud", "k8s.pl-waw.scw.cloud", "nodes.k8s.pl-waw.scw.cloud", "s3.pl-waw.scw.cloud", "s3-website.pl-waw.scw.cloud", "scalebook.scw.cloud", "smartlabeling.scw.cloud", "dedibox.fr", "schokokeks.net", "gov.scot", "service.gov.scot", "scrysec.com", "client.scrypted.io", "firewall-gateway.com", "firewall-gateway.de", "my-gateway.de", "my-router.de", "spdns.de", "spdns.eu", "firewall-gateway.net", "my-firewall.org", "myfirewall.org", "spdns.org", "seidat.net", "sellfy.store", "minisite.ms", "senseering.net", "servebolt.cloud", "biz.ua", "co.ua", "pp.ua", "as.sh.cn", "sheezy.games", "shiftedit.io", "myshopblocks.com", "myshopify.com", "shopitsite.com", "shopware.shop", "shopware.store", "mo-siemens.io", "1kapp.com", "appchizi.com", "applinzi.com", "sinaapp.com", "vipsinaapp.com", "siteleaf.net", "small-web.org", "aeroport.fr", "avocat.fr", "chambagri.fr", "chirurgiens-dentistes.fr", "experts-comptables.fr", "medecin.fr", "notaires.fr", "pharmacien.fr", "port.fr", "veterinaire.fr", "vp4.me", "*.snowflake.app", "*.privatelink.snowflake.app", "streamlit.app", "streamlitapp.com", "try-snowplow.com", "mafelo.net", "playstation-cloud.com", "srht.site", "apps.lair.io", "*.stolos.io", "spacekit.io", "ind.mom", "customer.speedpartner.de", "myspreadshop.at", "myspreadshop.com.au", "myspreadshop.be", "myspreadshop.ca", "myspreadshop.ch", "myspreadshop.com", "myspreadshop.de", "myspreadshop.dk", "myspreadshop.es", "myspreadshop.fi", "myspreadshop.fr", "myspreadshop.ie", "myspreadshop.it", "myspreadshop.net", "myspreadshop.nl", "myspreadshop.no", "myspreadshop.pl", "myspreadshop.se", "myspreadshop.co.uk", "w-corp-staticblitz.com", "w-credentialless-staticblitz.com", "w-staticblitz.com", "stackhero-network.com", "runs.onstackit.cloud", "stackit.gg", "stackit.rocks", "stackit.run", "stackit.zone", "musician.io", "novecore.site", "api.stdlib.com", "feedback.ac", "forms.ac", "assessments.cx", "calculators.cx", "funnels.cx", "paynow.cx", "quizzes.cx", "researched.cx", "tests.cx", "surveys.so", "storebase.store", "storipress.app", "storj.farm", "strapiapp.com", "media.strapiapp.com", "vps-host.net", "atl.jelastic.vps-host.net", "njs.jelastic.vps-host.net", "ric.jelastic.vps-host.net", "streak-link.com", "streaklinks.com", "streakusercontent.com", "soc.srcf.net", "user.srcf.net", "utwente.io", "temp-dns.com", "supabase.co", "supabase.in", "supabase.net", "syncloud.it", "dscloud.biz", "direct.quickconnect.cn", "dsmynas.com", "familyds.com", "diskstation.me", "dscloud.me", "i234.me", "myds.me", "synology.me", "dscloud.mobi", "dsmynas.net", "familyds.net", "dsmynas.org", "familyds.org", "direct.quickconnect.to", "vpnplus.to", "mytabit.com", "mytabit.co.il", "tabitorder.co.il", "taifun-dns.de", "ts.net", "*.c.ts.net", "gda.pl", "gdansk.pl", "gdynia.pl", "med.pl", "sopot.pl", "taveusercontent.com", "p.tawk.email", "p.tawkto.email", "site.tb-hosting.com", "edugit.io", "s3.teckids.org", "telebit.app", "telebit.io", "*.telebit.xyz", "*.firenet.ch", "*.svc.firenet.ch", "reservd.com", "thingdustdata.com", "cust.dev.thingdust.io", "reservd.dev.thingdust.io", "cust.disrec.thingdust.io", "reservd.disrec.thingdust.io", "cust.prod.thingdust.io", "cust.testing.thingdust.io", "reservd.testing.thingdust.io", "tickets.io", "arvo.network", "azimuth.network", "tlon.network", "torproject.net", "pages.torproject.net", "townnews-staging.com", "12hp.at", "2ix.at", "4lima.at", "lima-city.at", "12hp.ch", "2ix.ch", "4lima.ch", "lima-city.ch", "trafficplex.cloud", "de.cool", "12hp.de", "2ix.de", "4lima.de", "lima-city.de", "1337.pictures", "clan.rip", "lima-city.rocks", "webspace.rocks", "lima.zone", "*.transurl.be", "*.transurl.eu", "site.transip.me", "*.transurl.nl", "tuxfamily.org", "dd-dns.de", "dray-dns.de", "draydns.de", "dyn-vpn.de", "dynvpn.de", "mein-vigor.de", "my-vigor.de", "my-wan.de", "syno-ds.de", "synology-diskstation.de", "synology-ds.de", "diskstation.eu", "diskstation.org", "typedream.app", "pro.typeform.com", "*.uberspace.de", "uber.space", "hk.com", "inc.hk", "ltd.hk", "hk.org", "it.com", "unison-services.cloud", "virtual-user.de", "virtualuser.de", "name.pm", "sch.tf", "biz.wf", "sch.wf", "org.yt", "rs.ba", "bielsko.pl", "upli.io", "urown.cloud", "dnsupdate.info", "us.org", "v.ua", "express.val.run", "web.val.run", "vercel.app", "v0.build", "vercel.dev", "vusercontent.net", "now.sh", "2038.io", "router.management", "v-info.info", "voorloper.cloud", "*.vultrobjects.com", "wafflecell.com", "webflow.io", "webflowtest.io", "*.webhare.dev", "bookonline.app", "hotelwithflight.com", "reserve-online.com", "reserve-online.net", "cprapid.com", "pleskns.com", "wp2.host", "pdns.page", "plesk.page", "wpsquared.site", "*.wadl.top", "remotewd.com", "box.ca", "pages.wiardweb.com", "toolforge.org", "wmcloud.org", "wmflabs.org", "wdh.app", "panel.gg", "daemon.panel.gg", "wixsite.com", "wixstudio.com", "editorx.io", "wixstudio.io", "wix.run", "messwithdns.com", "woltlab-demo.com", "myforum.community", "community-pro.de", "diskussionsbereich.de", "community-pro.net", "meinforum.net", "affinitylottery.org.uk", "raffleentry.org.uk", "weeklylottery.org.uk", "wpenginepowered.com", "js.wpenginepowered.com", "half.host", "xnbay.com", "u2.xnbay.com", "u2-local.xnbay.com", "cistron.nl", "demon.nl", "xs4all.space", "yandexcloud.net", "storage.yandexcloud.net", "website.yandexcloud.net", "official.academy", "yolasite.com", "yombo.me", "ynh.fr", "nohost.me", "noho.st", "za.net", "za.org", "zap.cloud", "zeabur.app", "bss.design", "basicserver.io", "virtualserver.io", "enterprisecloud.nu"]; + var Z = Y.reduce((e, s) => { + const c = s.replace(/^(\*\.|\!)/, ""), o = A.toASCII(c), t = s.charAt(0); + if (e.has(o)) throw new Error(`Multiple rules found for ${s} (${o})`); + return e.set(o, { rule: s, suffix: c, punySuffix: o, wildcard: t === "*", exception: t === "!" }), e; + }, /* @__PURE__ */ new Map()); + var aa = (e) => { + const c = A.toASCII(e).split("."); + for (let o = 0; o < c.length; o++) { + const t = c.slice(o).join("."), d = Z.get(t); + if (d) return d; + } + return null; + }; + var H = { DOMAIN_TOO_SHORT: "Domain name too short.", DOMAIN_TOO_LONG: "Domain name too long. It should be no more than 255 chars.", LABEL_STARTS_WITH_DASH: "Domain name label can not start with a dash.", LABEL_ENDS_WITH_DASH: "Domain name label can not end with a dash.", LABEL_TOO_LONG: "Domain name label should be at most 63 chars long.", LABEL_TOO_SHORT: "Domain name label should be at least 1 character long.", LABEL_INVALID_CHARS: "Domain name label can only contain alphanumeric characters or dashes." }; + var oa = (e) => { + const s = A.toASCII(e); + if (s.length < 1) return "DOMAIN_TOO_SHORT"; + if (s.length > 255) return "DOMAIN_TOO_LONG"; + const c = s.split("."); + let o; + for (let t = 0; t < c.length; ++t) { + if (o = c[t], !o.length) return "LABEL_TOO_SHORT"; + if (o.length > 63) return "LABEL_TOO_LONG"; + if (o.charAt(0) === "-") return "LABEL_STARTS_WITH_DASH"; + if (o.charAt(o.length - 1) === "-") return "LABEL_ENDS_WITH_DASH"; + if (!/^[a-z0-9\-_]+$/.test(o)) return "LABEL_INVALID_CHARS"; + } + }; + var _ = (e) => { + if (typeof e != "string") throw new TypeError("Domain name must be a string."); + let s = e.slice(0).toLowerCase(); + s.charAt(s.length - 1) === "." && (s = s.slice(0, s.length - 1)); + const c = oa(s); + if (c) return { input: e, error: { message: H[c], code: c } }; + const o = { input: e, tld: null, sld: null, domain: null, subdomain: null, listed: false }, t = s.split("."); + if (t[t.length - 1] === "local") return o; + const d = () => (/xn--/.test(s) && (o.domain && (o.domain = A.toASCII(o.domain)), o.subdomain && (o.subdomain = A.toASCII(o.subdomain))), o), z2 = aa(s); + if (!z2) return t.length < 2 ? o : (o.tld = t.pop(), o.sld = t.pop(), o.domain = [o.sld, o.tld].join("."), t.length && (o.subdomain = t.pop()), d()); + o.listed = true; + const y = z2.suffix.split("."), g = t.slice(0, t.length - y.length); + return z2.exception && g.push(y.shift()), o.tld = y.join("."), !g.length || (z2.wildcard && (y.unshift(g.pop()), o.tld = y.join(".")), !g.length) || (o.sld = g.pop(), o.domain = [o.sld, o.tld].join("."), g.length && (o.subdomain = g.join("."))), d(); + }; + var N = (e) => e && _(e).domain || null; + var R = (e) => { + const s = _(e); + return !!(s.domain && s.listed); + }; + var sa = { parse: _, get: N, isValid: R }; + exports2.default = sa; + exports2.errorCodes = H; + exports2.get = N; + exports2.isValid = R; + exports2.parse = _; + } +}); + +// node_modules/tough-cookie/lib/pubsuffix-psl.js +var require_pubsuffix_psl = __commonJS({ + "node_modules/tough-cookie/lib/pubsuffix-psl.js"(exports2) { + "use strict"; + var psl = require_psl(); + function getPublicSuffix(domain) { + return psl.get(domain); + } + exports2.getPublicSuffix = getPublicSuffix; + } +}); + +// node_modules/tough-cookie/lib/store.js +var require_store = __commonJS({ + "node_modules/tough-cookie/lib/store.js"(exports2) { + "use strict"; + function Store() { + } + exports2.Store = Store; + Store.prototype.synchronous = false; + Store.prototype.findCookie = function(domain, path, key, cb) { + throw new Error("findCookie is not implemented"); + }; + Store.prototype.findCookies = function(domain, path, cb) { + throw new Error("findCookies is not implemented"); + }; + Store.prototype.putCookie = function(cookie, cb) { + throw new Error("putCookie is not implemented"); + }; + Store.prototype.updateCookie = function(oldCookie, newCookie, cb) { + throw new Error("updateCookie is not implemented"); + }; + Store.prototype.removeCookie = function(domain, path, key, cb) { + throw new Error("removeCookie is not implemented"); + }; + Store.prototype.removeCookies = function(domain, path, cb) { + throw new Error("removeCookies is not implemented"); + }; + Store.prototype.removeAllCookies = function(cb) { + throw new Error("removeAllCookies is not implemented"); + }; + Store.prototype.getAllCookies = function(cb) { + throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)"); + }; + } +}); + +// node_modules/tough-cookie/lib/permuteDomain.js +var require_permuteDomain = __commonJS({ + "node_modules/tough-cookie/lib/permuteDomain.js"(exports2) { + "use strict"; + var pubsuffix = require_pubsuffix_psl(); + function permuteDomain(domain) { + var pubSuf = pubsuffix.getPublicSuffix(domain); + if (!pubSuf) { + return null; + } + if (pubSuf == domain) { + return [domain]; + } + var prefix = domain.slice(0, -(pubSuf.length + 1)); + var parts = prefix.split(".").reverse(); + var cur = pubSuf; + var permutations = [cur]; + while (parts.length) { + cur = parts.shift() + "." + cur; + permutations.push(cur); + } + return permutations; + } + exports2.permuteDomain = permuteDomain; + } +}); + +// node_modules/tough-cookie/lib/pathMatch.js +var require_pathMatch = __commonJS({ + "node_modules/tough-cookie/lib/pathMatch.js"(exports2) { + "use strict"; + function pathMatch(reqPath, cookiePath) { + if (cookiePath === reqPath) { + return true; + } + var idx = reqPath.indexOf(cookiePath); + if (idx === 0) { + if (cookiePath.substr(-1) === "/") { + return true; + } + if (reqPath.substr(cookiePath.length, 1) === "/") { + return true; + } + } + return false; + } + exports2.pathMatch = pathMatch; + } +}); + +// node_modules/tough-cookie/lib/memstore.js +var require_memstore = __commonJS({ + "node_modules/tough-cookie/lib/memstore.js"(exports2) { + "use strict"; + var Store = require_store().Store; + var permuteDomain = require_permuteDomain().permuteDomain; + var pathMatch = require_pathMatch().pathMatch; + var util2 = require("util"); + function MemoryCookieStore() { + Store.call(this); + this.idx = {}; + } + util2.inherits(MemoryCookieStore, Store); + exports2.MemoryCookieStore = MemoryCookieStore; + MemoryCookieStore.prototype.idx = null; + MemoryCookieStore.prototype.synchronous = true; + MemoryCookieStore.prototype.inspect = function() { + return "{ idx: " + util2.inspect(this.idx, false, 2) + " }"; + }; + if (util2.inspect.custom) { + MemoryCookieStore.prototype[util2.inspect.custom] = MemoryCookieStore.prototype.inspect; + } + MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) { + if (!this.idx[domain]) { + return cb(null, void 0); + } + if (!this.idx[domain][path]) { + return cb(null, void 0); + } + return cb(null, this.idx[domain][path][key] || null); + }; + MemoryCookieStore.prototype.findCookies = function(domain, path, cb) { + var results = []; + if (!domain) { + return cb(null, []); + } + var pathMatcher; + if (!path) { + pathMatcher = function matchAll(domainIndex) { + for (var curPath in domainIndex) { + var pathIndex = domainIndex[curPath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }; + } else { + pathMatcher = function matchRFC(domainIndex) { + Object.keys(domainIndex).forEach(function(cookiePath) { + if (pathMatch(path, cookiePath)) { + var pathIndex = domainIndex[cookiePath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }); + }; + } + var domains = permuteDomain(domain) || [domain]; + var idx = this.idx; + domains.forEach(function(curDomain) { + var domainIndex = idx[curDomain]; + if (!domainIndex) { + return; + } + pathMatcher(domainIndex); + }); + cb(null, results); + }; + MemoryCookieStore.prototype.putCookie = function(cookie, cb) { + if (!this.idx[cookie.domain]) { + this.idx[cookie.domain] = {}; + } + if (!this.idx[cookie.domain][cookie.path]) { + this.idx[cookie.domain][cookie.path] = {}; + } + this.idx[cookie.domain][cookie.path][cookie.key] = cookie; + cb(null); + }; + MemoryCookieStore.prototype.updateCookie = function(oldCookie, newCookie, cb) { + this.putCookie(newCookie, cb); + }; + MemoryCookieStore.prototype.removeCookie = function(domain, path, key, cb) { + if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { + delete this.idx[domain][path][key]; + } + cb(null); + }; + MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) { + if (this.idx[domain]) { + if (path) { + delete this.idx[domain][path]; + } else { + delete this.idx[domain]; + } + } + return cb(null); + }; + MemoryCookieStore.prototype.removeAllCookies = function(cb) { + this.idx = {}; + return cb(null); + }; + MemoryCookieStore.prototype.getAllCookies = function(cb) { + var cookies = []; + var idx = this.idx; + var domains = Object.keys(idx); + domains.forEach(function(domain) { + var paths = Object.keys(idx[domain]); + paths.forEach(function(path) { + var keys = Object.keys(idx[domain][path]); + keys.forEach(function(key) { + if (key !== null) { + cookies.push(idx[domain][path][key]); + } + }); + }); + }); + cookies.sort(function(a, b) { + return (a.creationIndex || 0) - (b.creationIndex || 0); + }); + cb(null, cookies); + }; + } +}); + +// node_modules/tough-cookie/lib/version.js +var require_version = __commonJS({ + "node_modules/tough-cookie/lib/version.js"(exports2, module2) { + module2.exports = "2.5.0"; + } +}); + +// node_modules/tough-cookie/lib/cookie.js +var require_cookie = __commonJS({ + "node_modules/tough-cookie/lib/cookie.js"(exports2) { + "use strict"; + var net = require("net"); + var urlParse = require("url").parse; + var util2 = require("util"); + var pubsuffix = require_pubsuffix_psl(); + var Store = require_store().Store; + var MemoryCookieStore = require_memstore().MemoryCookieStore; + var pathMatch = require_pathMatch().pathMatch; + var VERSION = require_version(); + var punycode; + try { + punycode = require("punycode"); + } catch (e) { + console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); + } + var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; + var CONTROL_CHARS = /[\x00-\x1F]/; + var TERMINATORS = ["\n", "\r", "\0"]; + var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; + var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + var MONTH_TO_NUM = { + jan: 0, + feb: 1, + mar: 2, + apr: 3, + may: 4, + jun: 5, + jul: 6, + aug: 7, + sep: 8, + oct: 9, + nov: 10, + dec: 11 + }; + var NUM_TO_MONTH = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + var NUM_TO_DAY = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + var MAX_TIME = 2147483647e3; + var MIN_TIME = 0; + function parseDigits(token, minDigits, maxDigits, trailingOK) { + var count = 0; + while (count < token.length) { + var c = token.charCodeAt(count); + if (c <= 47 || c >= 58) { + break; + } + count++; + } + if (count < minDigits || count > maxDigits) { + return null; + } + if (!trailingOK && count != token.length) { + return null; + } + return parseInt(token.substr(0, count), 10); + } + function parseTime(token) { + var parts = token.split(":"); + var result = [0, 0, 0]; + if (parts.length !== 3) { + return null; + } + for (var i2 = 0; i2 < 3; i2++) { + var trailingOK = i2 == 2; + var num = parseDigits(parts[i2], 1, 2, trailingOK); + if (num === null) { + return null; + } + result[i2] = num; + } + return result; + } + function parseMonth(token) { + token = String(token).substr(0, 3).toLowerCase(); + var num = MONTH_TO_NUM[token]; + return num >= 0 ? num : null; + } + function parseDate(str) { + if (!str) { + return; + } + var tokens = str.split(DATE_DELIM); + if (!tokens) { + return; + } + var hour = null; + var minute = null; + var second = null; + var dayOfMonth = null; + var month = null; + var year = null; + for (var i2 = 0; i2 < tokens.length; i2++) { + var token = tokens[i2].trim(); + if (!token.length) { + continue; + } + var result; + if (second === null) { + result = parseTime(token); + if (result) { + hour = result[0]; + minute = result[1]; + second = result[2]; + continue; + } + } + if (dayOfMonth === null) { + result = parseDigits(token, 1, 2, true); + if (result !== null) { + dayOfMonth = result; + continue; + } + } + if (month === null) { + result = parseMonth(token); + if (result !== null) { + month = result; + continue; + } + } + if (year === null) { + result = parseDigits(token, 2, 4, true); + if (result !== null) { + year = result; + if (year >= 70 && year <= 99) { + year += 1900; + } else if (year >= 0 && year <= 69) { + year += 2e3; + } + } + } + } + if (dayOfMonth === null || month === null || year === null || second === null || dayOfMonth < 1 || dayOfMonth > 31 || year < 1601 || hour > 23 || minute > 59 || second > 59) { + return; + } + return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); + } + function formatDate(date) { + var d = date.getUTCDate(); + d = d >= 10 ? d : "0" + d; + var h = date.getUTCHours(); + h = h >= 10 ? h : "0" + h; + var m = date.getUTCMinutes(); + m = m >= 10 ? m : "0" + m; + var s = date.getUTCSeconds(); + s = s >= 10 ? s : "0" + s; + return NUM_TO_DAY[date.getUTCDay()] + ", " + d + " " + NUM_TO_MONTH[date.getUTCMonth()] + " " + date.getUTCFullYear() + " " + h + ":" + m + ":" + s + " GMT"; + } + function canonicalDomain(str) { + if (str == null) { + return null; + } + str = str.trim().replace(/^\./, ""); + if (punycode && /[^\u0001-\u007f]/.test(str)) { + str = punycode.toASCII(str); + } + return str.toLowerCase(); + } + function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) { + return null; + } + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + if (str == domStr) { + return true; + } + if (net.isIP(str)) { + return false; + } + var idx = str.indexOf(domStr); + if (idx <= 0) { + return false; + } + if (str.length !== domStr.length + idx) { + return false; + } + if (str.substr(idx - 1, 1) !== ".") { + return false; + } + return true; + } + function defaultPath(path) { + if (!path || path.substr(0, 1) !== "/") { + return "/"; + } + if (path === "/") { + return path; + } + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) { + return "/"; + } + return path.slice(0, rightSlash); + } + function trimTerminator(str) { + for (var t = 0; t < TERMINATORS.length; t++) { + var terminatorIdx = str.indexOf(TERMINATORS[t]); + if (terminatorIdx !== -1) { + str = str.substr(0, terminatorIdx); + } + } + return str; + } + function parseCookiePair(cookiePair, looseMode) { + cookiePair = trimTerminator(cookiePair); + var firstEq = cookiePair.indexOf("="); + if (looseMode) { + if (firstEq === 0) { + cookiePair = cookiePair.substr(1); + firstEq = cookiePair.indexOf("="); + } + } else { + if (firstEq <= 0) { + return; + } + } + var cookieName, cookieValue; + if (firstEq <= 0) { + cookieName = ""; + cookieValue = cookiePair.trim(); + } else { + cookieName = cookiePair.substr(0, firstEq).trim(); + cookieValue = cookiePair.substr(firstEq + 1).trim(); + } + if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { + return; + } + var c = new Cookie(); + c.key = cookieName; + c.value = cookieValue; + return c; + } + function parse2(str, options) { + if (!options || typeof options !== "object") { + options = {}; + } + str = str.trim(); + var firstSemi = str.indexOf(";"); + var cookiePair = firstSemi === -1 ? str : str.substr(0, firstSemi); + var c = parseCookiePair(cookiePair, !!options.loose); + if (!c) { + return; + } + if (firstSemi === -1) { + return c; + } + var unparsed = str.slice(firstSemi + 1).trim(); + if (unparsed.length === 0) { + return c; + } + var cookie_avs = unparsed.split(";"); + while (cookie_avs.length) { + var av = cookie_avs.shift().trim(); + if (av.length === 0) { + continue; + } + var av_sep = av.indexOf("="); + var av_key, av_value; + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0, av_sep); + av_value = av.substr(av_sep + 1); + } + av_key = av_key.trim().toLowerCase(); + if (av_value) { + av_value = av_value.trim(); + } + switch (av_key) { + case "expires": + if (av_value) { + var exp = parseDate(av_value); + if (exp) { + c.expires = exp; + } + } + break; + case "max-age": + if (av_value) { + if (/^-?[0-9]+$/.test(av_value)) { + var delta = parseInt(av_value, 10); + c.setMaxAge(delta); + } + } + break; + case "domain": + if (av_value) { + var domain = av_value.trim().replace(/^\./, ""); + if (domain) { + c.domain = domain.toLowerCase(); + } + } + break; + case "path": + c.path = av_value && av_value[0] === "/" ? av_value : null; + break; + case "secure": + c.secure = true; + break; + case "httponly": + c.httpOnly = true; + break; + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + return c; + } + function jsonParse(str) { + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return e; + } + return obj; + } + function fromJSON(str) { + if (!str) { + return null; + } + var obj; + if (typeof str === "string") { + obj = jsonParse(str); + if (obj instanceof Error) { + return null; + } + } else { + obj = str; + } + var c = new Cookie(); + for (var i2 = 0; i2 < Cookie.serializableProperties.length; i2++) { + var prop = Cookie.serializableProperties[i2]; + if (obj[prop] === void 0 || obj[prop] === Cookie.prototype[prop]) { + continue; + } + if (prop === "expires" || prop === "creation" || prop === "lastAccessed") { + if (obj[prop] === null) { + c[prop] = null; + } else { + c[prop] = obj[prop] == "Infinity" ? "Infinity" : new Date(obj[prop]); + } + } else { + c[prop] = obj[prop]; + } + } + return c; + } + function cookieCompare(a, b) { + var cmp = 0; + var aPathLen = a.path ? a.path.length : 0; + var bPathLen = b.path ? b.path.length : 0; + cmp = bPathLen - aPathLen; + if (cmp !== 0) { + return cmp; + } + var aTime = a.creation ? a.creation.getTime() : MAX_TIME; + var bTime = b.creation ? b.creation.getTime() : MAX_TIME; + cmp = aTime - bTime; + if (cmp !== 0) { + return cmp; + } + cmp = a.creationIndex - b.creationIndex; + return cmp; + } + function permutePath(path) { + if (path === "/") { + return ["/"]; + } + if (path.lastIndexOf("/") === path.length - 1) { + path = path.substr(0, path.length - 1); + } + var permutations = [path]; + while (path.length > 1) { + var lindex = path.lastIndexOf("/"); + if (lindex === 0) { + break; + } + path = path.substr(0, lindex); + permutations.push(path); + } + permutations.push("/"); + return permutations; + } + function getCookieContext(url) { + if (url instanceof Object) { + return url; + } + try { + url = decodeURI(url); + } catch (err) { + } + return urlParse(url); + } + function Cookie(options) { + options = options || {}; + Object.keys(options).forEach(function(prop) { + if (Cookie.prototype.hasOwnProperty(prop) && Cookie.prototype[prop] !== options[prop] && prop.substr(0, 1) !== "_") { + this[prop] = options[prop]; + } + }, this); + this.creation = this.creation || /* @__PURE__ */ new Date(); + Object.defineProperty(this, "creationIndex", { + configurable: false, + enumerable: false, + // important for assert.deepEqual checks + writable: true, + value: ++Cookie.cookiesCreated + }); + } + Cookie.cookiesCreated = 0; + Cookie.parse = parse2; + Cookie.fromJSON = fromJSON; + Cookie.prototype.key = ""; + Cookie.prototype.value = ""; + Cookie.prototype.expires = "Infinity"; + Cookie.prototype.maxAge = null; + Cookie.prototype.domain = null; + Cookie.prototype.path = null; + Cookie.prototype.secure = false; + Cookie.prototype.httpOnly = false; + Cookie.prototype.extensions = null; + Cookie.prototype.hostOnly = null; + Cookie.prototype.pathIsDefault = null; + Cookie.prototype.creation = null; + Cookie.prototype.lastAccessed = null; + Object.defineProperty(Cookie.prototype, "creationIndex", { + configurable: true, + enumerable: false, + writable: true, + value: 0 + }); + Cookie.serializableProperties = Object.keys(Cookie.prototype).filter(function(prop) { + return !(Cookie.prototype[prop] instanceof Function || prop === "creationIndex" || prop.substr(0, 1) === "_"); + }); + Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="' + this.toString() + "; hostOnly=" + (this.hostOnly != null ? this.hostOnly : "?") + "; aAge=" + (this.lastAccessed ? now - this.lastAccessed.getTime() + "ms" : "?") + "; cAge=" + (this.creation ? now - this.creation.getTime() + "ms" : "?") + '"'; + }; + if (util2.inspect.custom) { + Cookie.prototype[util2.inspect.custom] = Cookie.prototype.inspect; + } + Cookie.prototype.toJSON = function() { + var obj = {}; + var props = Cookie.serializableProperties; + for (var i2 = 0; i2 < props.length; i2++) { + var prop = props[i2]; + if (this[prop] === Cookie.prototype[prop]) { + continue; + } + if (prop === "expires" || prop === "creation" || prop === "lastAccessed") { + if (this[prop] === null) { + obj[prop] = null; + } else { + obj[prop] = this[prop] == "Infinity" ? ( + // intentionally not === + "Infinity" + ) : this[prop].toISOString(); + } + } else if (prop === "maxAge") { + if (this[prop] !== null) { + obj[prop] = this[prop] == Infinity || this[prop] == -Infinity ? this[prop].toString() : this[prop]; + } + } else { + if (this[prop] !== Cookie.prototype[prop]) { + obj[prop] = this[prop]; + } + } + } + return obj; + }; + Cookie.prototype.clone = function() { + return fromJSON(this.toJSON()); + }; + Cookie.prototype.validate = function validate() { + if (!COOKIE_OCTETS.test(this.value)) { + return false; + } + if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires)) { + return false; + } + if (this.maxAge != null && this.maxAge <= 0) { + return false; + } + if (this.path != null && !PATH_VALUE.test(this.path)) { + return false; + } + var cdomain = this.cdomain(); + if (cdomain) { + if (cdomain.match(/\.$/)) { + return false; + } + var suffix = pubsuffix.getPublicSuffix(cdomain); + if (suffix == null) { + return false; + } + } + return true; + }; + Cookie.prototype.setExpires = function setExpires(exp) { + if (exp instanceof Date) { + this.expires = exp; + } else { + this.expires = parseDate(exp) || "Infinity"; + } + }; + Cookie.prototype.setMaxAge = function setMaxAge(age) { + if (age === Infinity || age === -Infinity) { + this.maxAge = age.toString(); + } else { + this.maxAge = age; + } + }; + Cookie.prototype.cookieString = function cookieString() { + var val = this.value; + if (val == null) { + val = ""; + } + if (this.key === "") { + return val; + } + return this.key + "=" + val; + }; + Cookie.prototype.toString = function toString() { + var str = this.cookieString(); + if (this.expires != Infinity) { + if (this.expires instanceof Date) { + str += "; Expires=" + formatDate(this.expires); + } else { + str += "; Expires=" + this.expires; + } + } + if (this.maxAge != null && this.maxAge != Infinity) { + str += "; Max-Age=" + this.maxAge; + } + if (this.domain && !this.hostOnly) { + str += "; Domain=" + this.domain; + } + if (this.path) { + str += "; Path=" + this.path; + } + if (this.secure) { + str += "; Secure"; + } + if (this.httpOnly) { + str += "; HttpOnly"; + } + if (this.extensions) { + this.extensions.forEach(function(ext) { + str += "; " + ext; + }); + } + return str; + }; + Cookie.prototype.TTL = function TTL(now) { + if (this.maxAge != null) { + return this.maxAge <= 0 ? 0 : this.maxAge * 1e3; + } + var expires = this.expires; + if (expires != Infinity) { + if (!(expires instanceof Date)) { + expires = parseDate(expires) || Infinity; + } + if (expires == Infinity) { + return Infinity; + } + return expires.getTime() - (now || Date.now()); + } + return Infinity; + }; + Cookie.prototype.expiryTime = function expiryTime(now) { + if (this.maxAge != null) { + var relativeTo = now || this.creation || /* @__PURE__ */ new Date(); + var age = this.maxAge <= 0 ? -Infinity : this.maxAge * 1e3; + return relativeTo.getTime() + age; + } + if (this.expires == Infinity) { + return Infinity; + } + return this.expires.getTime(); + }; + Cookie.prototype.expiryDate = function expiryDate(now) { + var millisec = this.expiryTime(now); + if (millisec == Infinity) { + return new Date(MAX_TIME); + } else if (millisec == -Infinity) { + return new Date(MIN_TIME); + } else { + return new Date(millisec); + } + }; + Cookie.prototype.isPersistent = function isPersistent() { + return this.maxAge != null || this.expires != Infinity; + }; + Cookie.prototype.cdomain = Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { + if (this.domain == null) { + return null; + } + return canonicalDomain(this.domain); + }; + function CookieJar(store, options) { + if (typeof options === "boolean") { + options = { rejectPublicSuffixes: options }; + } else if (options == null) { + options = {}; + } + if (options.rejectPublicSuffixes != null) { + this.rejectPublicSuffixes = options.rejectPublicSuffixes; + } + if (options.looseMode != null) { + this.enableLooseMode = options.looseMode; + } + if (!store) { + store = new MemoryCookieStore(); + } + this.store = store; + } + CookieJar.prototype.store = null; + CookieJar.prototype.rejectPublicSuffixes = true; + CookieJar.prototype.enableLooseMode = false; + var CAN_BE_SYNC = []; + CAN_BE_SYNC.push("setCookie"); + CookieJar.prototype.setCookie = function(cookie, url, options, cb) { + var err; + var context = getCookieContext(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + var host = canonicalDomain(context.hostname); + var loose = this.enableLooseMode; + if (options.loose != null) { + loose = options.loose; + } + if (!(cookie instanceof Cookie)) { + cookie = Cookie.parse(cookie, { loose }); + } + if (!cookie) { + err = new Error("Cookie failed to parse"); + return cb(options.ignoreError ? null : err); + } + var now = options.now || /* @__PURE__ */ new Date(); + if (this.rejectPublicSuffixes && cookie.domain) { + var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); + if (suffix == null) { + err = new Error("Cookie has domain set to a public suffix"); + return cb(options.ignoreError ? null : err); + } + } + if (cookie.domain) { + if (!domainMatch(host, cookie.cdomain(), false)) { + err = new Error("Cookie not in this host's domain. Cookie:" + cookie.cdomain() + " Request:" + host); + return cb(options.ignoreError ? null : err); + } + if (cookie.hostOnly == null) { + cookie.hostOnly = false; + } + } else { + cookie.hostOnly = true; + cookie.domain = host; + } + if (!cookie.path || cookie.path[0] !== "/") { + cookie.path = defaultPath(context.pathname); + cookie.pathIsDefault = true; + } + if (options.http === false && cookie.httpOnly) { + err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + var store = this.store; + if (!store.updateCookie) { + store.updateCookie = function(oldCookie, newCookie, cb2) { + this.putCookie(newCookie, cb2); + }; + } + function withCookie(err2, oldCookie) { + if (err2) { + return cb(err2); + } + var next = function(err3) { + if (err3) { + return cb(err3); + } else { + cb(null, cookie); + } + }; + if (oldCookie) { + if (options.http === false && oldCookie.httpOnly) { + err2 = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err2); + } + cookie.creation = oldCookie.creation; + cookie.creationIndex = oldCookie.creationIndex; + cookie.lastAccessed = now; + store.updateCookie(oldCookie, cookie, next); + } else { + cookie.creation = cookie.lastAccessed = now; + store.putCookie(cookie, next); + } + } + store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie); + }; + CAN_BE_SYNC.push("getCookies"); + CookieJar.prototype.getCookies = function(url, options, cb) { + var context = getCookieContext(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + var host = canonicalDomain(context.hostname); + var path = context.pathname || "/"; + var secure = options.secure; + if (secure == null && context.protocol && (context.protocol == "https:" || context.protocol == "wss:")) { + secure = true; + } + var http = options.http; + if (http == null) { + http = true; + } + var now = options.now || Date.now(); + var expireCheck = options.expire !== false; + var allPaths = !!options.allPaths; + var store = this.store; + function matchingCookie(c) { + if (c.hostOnly) { + if (c.domain != host) { + return false; + } + } else { + if (!domainMatch(host, c.domain, false)) { + return false; + } + } + if (!allPaths && !pathMatch(path, c.path)) { + return false; + } + if (c.secure && !secure) { + return false; + } + if (c.httpOnly && !http) { + return false; + } + if (expireCheck && c.expiryTime() <= now) { + store.removeCookie(c.domain, c.path, c.key, function() { + }); + return false; + } + return true; + } + store.findCookies(host, allPaths ? null : path, function(err, cookies) { + if (err) { + return cb(err); + } + cookies = cookies.filter(matchingCookie); + if (options.sort !== false) { + cookies = cookies.sort(cookieCompare); + } + var now2 = /* @__PURE__ */ new Date(); + cookies.forEach(function(c) { + c.lastAccessed = now2; + }); + cb(null, cookies); + }); + }; + CAN_BE_SYNC.push("getCookieString"); + CookieJar.prototype.getCookieString = function() { + var args2 = Array.prototype.slice.call(arguments, 0); + var cb = args2.pop(); + var next = function(err, cookies) { + if (err) { + cb(err); + } else { + cb(null, cookies.sort(cookieCompare).map(function(c) { + return c.cookieString(); + }).join("; ")); + } + }; + args2.push(next); + this.getCookies.apply(this, args2); + }; + CAN_BE_SYNC.push("getSetCookieStrings"); + CookieJar.prototype.getSetCookieStrings = function() { + var args2 = Array.prototype.slice.call(arguments, 0); + var cb = args2.pop(); + var next = function(err, cookies) { + if (err) { + cb(err); + } else { + cb(null, cookies.map(function(c) { + return c.toString(); + })); + } + }; + args2.push(next); + this.getCookies.apply(this, args2); + }; + CAN_BE_SYNC.push("serialize"); + CookieJar.prototype.serialize = function(cb) { + var type = this.store.constructor.name; + if (type === "Object") { + type = null; + } + var serialized = { + // The version of tough-cookie that serialized this jar. Generally a good + // practice since future versions can make data import decisions based on + // known past behavior. When/if this matters, use `semver`. + version: "tough-cookie@" + VERSION, + // add the store type, to make humans happy: + storeType: type, + // CookieJar configuration: + rejectPublicSuffixes: !!this.rejectPublicSuffixes, + // this gets filled from getAllCookies: + cookies: [] + }; + if (!(this.store.getAllCookies && typeof this.store.getAllCookies === "function")) { + return cb(new Error("store does not support getAllCookies and cannot be serialized")); + } + this.store.getAllCookies(function(err, cookies) { + if (err) { + return cb(err); + } + serialized.cookies = cookies.map(function(cookie) { + cookie = cookie instanceof Cookie ? cookie.toJSON() : cookie; + delete cookie.creationIndex; + return cookie; + }); + return cb(null, serialized); + }); + }; + CookieJar.prototype.toJSON = function() { + return this.serializeSync(); + }; + CAN_BE_SYNC.push("_importCookies"); + CookieJar.prototype._importCookies = function(serialized, cb) { + var jar = this; + var cookies = serialized.cookies; + if (!cookies || !Array.isArray(cookies)) { + return cb(new Error("serialized jar has no cookies array")); + } + cookies = cookies.slice(); + function putNext(err) { + if (err) { + return cb(err); + } + if (!cookies.length) { + return cb(err, jar); + } + var cookie; + try { + cookie = fromJSON(cookies.shift()); + } catch (e) { + return cb(e); + } + if (cookie === null) { + return putNext(null); + } + jar.store.putCookie(cookie, putNext); + } + putNext(); + }; + CookieJar.deserialize = function(strOrObj, store, cb) { + if (arguments.length !== 3) { + cb = store; + store = null; + } + var serialized; + if (typeof strOrObj === "string") { + serialized = jsonParse(strOrObj); + if (serialized instanceof Error) { + return cb(serialized); + } + } else { + serialized = strOrObj; + } + var jar = new CookieJar(store, serialized.rejectPublicSuffixes); + jar._importCookies(serialized, function(err) { + if (err) { + return cb(err); + } + cb(null, jar); + }); + }; + CookieJar.deserializeSync = function(strOrObj, store) { + var serialized = typeof strOrObj === "string" ? JSON.parse(strOrObj) : strOrObj; + var jar = new CookieJar(store, serialized.rejectPublicSuffixes); + if (!jar.store.synchronous) { + throw new Error("CookieJar store is not synchronous; use async API instead."); + } + jar._importCookiesSync(serialized); + return jar; + }; + CookieJar.fromJSON = CookieJar.deserializeSync; + CookieJar.prototype.clone = function(newStore, cb) { + if (arguments.length === 1) { + cb = newStore; + newStore = null; + } + this.serialize(function(err, serialized) { + if (err) { + return cb(err); + } + CookieJar.deserialize(serialized, newStore, cb); + }); + }; + CAN_BE_SYNC.push("removeAllCookies"); + CookieJar.prototype.removeAllCookies = function(cb) { + var store = this.store; + if (store.removeAllCookies instanceof Function && store.removeAllCookies !== Store.prototype.removeAllCookies) { + return store.removeAllCookies(cb); + } + store.getAllCookies(function(err, cookies) { + if (err) { + return cb(err); + } + if (cookies.length === 0) { + return cb(null); + } + var completedCount = 0; + var removeErrors = []; + function removeCookieCb(removeErr) { + if (removeErr) { + removeErrors.push(removeErr); + } + completedCount++; + if (completedCount === cookies.length) { + return cb(removeErrors.length ? removeErrors[0] : null); + } + } + cookies.forEach(function(cookie) { + store.removeCookie(cookie.domain, cookie.path, cookie.key, removeCookieCb); + }); + }); + }; + CookieJar.prototype._cloneSync = syncWrap("clone"); + CookieJar.prototype.cloneSync = function(newStore) { + if (!newStore.synchronous) { + throw new Error("CookieJar clone destination store is not synchronous; use async API instead."); + } + return this._cloneSync(newStore); + }; + function syncWrap(method) { + return function() { + if (!this.store.synchronous) { + throw new Error("CookieJar store is not synchronous; use async API instead."); + } + var args2 = Array.prototype.slice.call(arguments); + var syncErr, syncResult; + args2.push(function syncCb(err, result) { + syncErr = err; + syncResult = result; + }); + this[method].apply(this, args2); + if (syncErr) { + throw syncErr; + } + return syncResult; + }; + } + CAN_BE_SYNC.forEach(function(method) { + CookieJar.prototype[method + "Sync"] = syncWrap(method); + }); + exports2.version = VERSION; + exports2.CookieJar = CookieJar; + exports2.Cookie = Cookie; + exports2.Store = Store; + exports2.MemoryCookieStore = MemoryCookieStore; + exports2.parseDate = parseDate; + exports2.formatDate = formatDate; + exports2.parse = parse2; + exports2.fromJSON = fromJSON; + exports2.domainMatch = domainMatch; + exports2.defaultPath = defaultPath; + exports2.pathMatch = pathMatch; + exports2.getPublicSuffix = pubsuffix.getPublicSuffix; + exports2.cookieCompare = cookieCompare; + exports2.permuteDomain = require_permuteDomain().permuteDomain; + exports2.permutePath = permutePath; + exports2.canonicalDomain = canonicalDomain; + } +}); + +// node_modules/request/lib/cookies.js +var require_cookies = __commonJS({ + "node_modules/request/lib/cookies.js"(exports2) { + "use strict"; + var tough = require_cookie(); + var Cookie = tough.Cookie; + var CookieJar = tough.CookieJar; + exports2.parse = function(str) { + if (str && str.uri) { + str = str.uri; + } + if (typeof str !== "string") { + throw new Error("The cookie function only accepts STRING as param"); + } + return Cookie.parse(str, { loose: true }); + }; + function RequestJar(store) { + var self2 = this; + self2._jar = new CookieJar(store, { looseMode: true }); + } + RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) { + var self2 = this; + return self2._jar.setCookieSync(cookieOrStr, uri, options || {}); + }; + RequestJar.prototype.getCookieString = function(uri) { + var self2 = this; + return self2._jar.getCookieStringSync(uri); + }; + RequestJar.prototype.getCookies = function(uri) { + var self2 = this; + return self2._jar.getCookiesSync(uri); + }; + exports2.jar = function(store) { + return new RequestJar(store); + }; + } +}); + +// node_modules/json-stringify-safe/stringify.js +var require_stringify = __commonJS({ + "node_modules/json-stringify-safe/stringify.js"(exports2, module2) { + exports2 = module2.exports = stringify; + exports2.getSerialize = serializer; + function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces); + } + function serializer(replacer, cycleReplacer) { + var stack = [], keys = []; + if (cycleReplacer == null) cycleReplacer = function(key, value) { + if (stack[0] === value) return "[Circular ~]"; + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"; + }; + return function(key, value) { + if (stack.length > 0) { + var thisPos = stack.indexOf(this); + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); + if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value); + } else stack.push(value); + return replacer == null ? value : replacer.call(this, key, value); + }; + } + } +}); + +// node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + "node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + SafeBuffer.prototype = Object.create(Buffer2.prototype); + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size2, fill, encoding) { + if (typeof size2 !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size2); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size2) { + if (typeof size2 !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size2); + }; + SafeBuffer.allocUnsafeSlow = function(size2) { + if (typeof size2 !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size2); + }; + } +}); + +// node_modules/request/lib/helpers.js +var require_helpers = __commonJS({ + "node_modules/request/lib/helpers.js"(exports2) { + "use strict"; + var jsonSafeStringify = require_stringify(); + var crypto2 = require("crypto"); + var Buffer2 = require_safe_buffer().Buffer; + var defer = typeof setImmediate === "undefined" ? process.nextTick : setImmediate; + function paramsHaveRequestBody(params) { + return params.body || params.requestBodyStream || params.json && typeof params.json !== "boolean" || params.multipart; + } + function safeStringify(obj, replacer) { + var ret; + try { + ret = JSON.stringify(obj, replacer); + } catch (e) { + ret = jsonSafeStringify(obj, replacer); + } + return ret; + } + function md5(str) { + return crypto2.createHash("md5").update(str).digest("hex"); + } + function isReadStream(rs) { + return rs.readable && rs.path && rs.mode; + } + function toBase64(str) { + return Buffer2.from(str || "", "utf8").toString("base64"); + } + function copy(obj) { + var o = {}; + Object.keys(obj).forEach(function(i2) { + o[i2] = obj[i2]; + }); + return o; + } + function version() { + var numbers = process.version.replace("v", "").split("."); + return { + major: parseInt(numbers[0], 10), + minor: parseInt(numbers[1], 10), + patch: parseInt(numbers[2], 10) + }; + } + exports2.paramsHaveRequestBody = paramsHaveRequestBody; + exports2.safeStringify = safeStringify; + exports2.md5 = md5; + exports2.isReadStream = isReadStream; + exports2.toBase64 = toBase64; + exports2.copy = copy; + exports2.version = version; + exports2.defer = defer; + } +}); + +// node_modules/aws-sign2/index.js +var require_aws_sign2 = __commonJS({ + "node_modules/aws-sign2/index.js"(exports2, module2) { + var crypto2 = require("crypto"); + var parse2 = require("url").parse; + var keys = [ + "acl", + "location", + "logging", + "notification", + "partNumber", + "policy", + "requestPayment", + "torrent", + "uploadId", + "uploads", + "versionId", + "versioning", + "versions", + "website" + ]; + function authorization(options) { + return "AWS " + options.key + ":" + sign(options); + } + module2.exports = authorization; + module2.exports.authorization = authorization; + function hmacSha1(options) { + return crypto2.createHmac("sha1", options.secret).update(options.message).digest("base64"); + } + module2.exports.hmacSha1 = hmacSha1; + function sign(options) { + options.message = stringToSign(options); + return hmacSha1(options); + } + module2.exports.sign = sign; + function signQuery(options) { + options.message = queryStringToSign(options); + return hmacSha1(options); + } + module2.exports.signQuery = signQuery; + function stringToSign(options) { + var headers = options.amazonHeaders || ""; + if (headers) headers += "\n"; + var r = [ + options.verb, + options.md5, + options.contentType, + options.date ? options.date.toUTCString() : "", + headers + options.resource + ]; + return r.join("\n"); + } + module2.exports.stringToSign = stringToSign; + function queryStringToSign(options) { + return "GET\n\n\n" + options.date + "\n" + options.resource; + } + module2.exports.queryStringToSign = queryStringToSign; + function canonicalizeHeaders(headers) { + var buf = [], fields = Object.keys(headers); + for (var i2 = 0, len = fields.length; i2 < len; ++i2) { + var field = fields[i2], val = headers[field], field = field.toLowerCase(); + if (0 !== field.indexOf("x-amz")) continue; + buf.push(field + ":" + val); + } + return buf.sort().join("\n"); + } + module2.exports.canonicalizeHeaders = canonicalizeHeaders; + function canonicalizeResource(resource) { + var url = parse2(resource, true), path = url.pathname, buf = []; + Object.keys(url.query).forEach(function(key) { + if (!~keys.indexOf(key)) return; + var val = "" == url.query[key] ? "" : "=" + encodeURIComponent(url.query[key]); + buf.push(key + val); + }); + return path + (buf.length ? "?" + buf.sort().join("&") : ""); + } + module2.exports.canonicalizeResource = canonicalizeResource; + } +}); + +// node_modules/aws4/lru.js +var require_lru = __commonJS({ + "node_modules/aws4/lru.js"(exports2, module2) { + module2.exports = function(size2) { + return new LruCache(size2); + }; + function LruCache(size2) { + this.capacity = size2 | 0; + this.map = /* @__PURE__ */ Object.create(null); + this.list = new DoublyLinkedList(); + } + LruCache.prototype.get = function(key) { + var node = this.map[key]; + if (node == null) return void 0; + this.used(node); + return node.val; + }; + LruCache.prototype.set = function(key, val) { + var node = this.map[key]; + if (node != null) { + node.val = val; + } else { + if (!this.capacity) this.prune(); + if (!this.capacity) return false; + node = new DoublyLinkedNode(key, val); + this.map[key] = node; + this.capacity--; + } + this.used(node); + return true; + }; + LruCache.prototype.used = function(node) { + this.list.moveToFront(node); + }; + LruCache.prototype.prune = function() { + var node = this.list.pop(); + if (node != null) { + delete this.map[node.key]; + this.capacity++; + } + }; + function DoublyLinkedList() { + this.firstNode = null; + this.lastNode = null; + } + DoublyLinkedList.prototype.moveToFront = function(node) { + if (this.firstNode == node) return; + this.remove(node); + if (this.firstNode == null) { + this.firstNode = node; + this.lastNode = node; + node.prev = null; + node.next = null; + } else { + node.prev = null; + node.next = this.firstNode; + node.next.prev = node; + this.firstNode = node; + } + }; + DoublyLinkedList.prototype.pop = function() { + var lastNode = this.lastNode; + if (lastNode != null) { + this.remove(lastNode); + } + return lastNode; + }; + DoublyLinkedList.prototype.remove = function(node) { + if (this.firstNode == node) { + this.firstNode = node.next; + } else if (node.prev != null) { + node.prev.next = node.next; + } + if (this.lastNode == node) { + this.lastNode = node.prev; + } else if (node.next != null) { + node.next.prev = node.prev; + } + }; + function DoublyLinkedNode(key, val) { + this.key = key; + this.val = val; + this.prev = null; + this.next = null; + } + } +}); + +// node_modules/aws4/aws4.js +var require_aws4 = __commonJS({ + "node_modules/aws4/aws4.js"(exports2) { + var aws4 = exports2; + var url = require("url"); + var querystring = require("querystring"); + var crypto2 = require("crypto"); + var lru = require_lru(); + var credentialsCache = lru(1e3); + function hmac(key, string, encoding) { + return crypto2.createHmac("sha256", key).update(string, "utf8").digest(encoding); + } + function hash(string, encoding) { + return crypto2.createHash("sha256").update(string, "utf8").digest(encoding); + } + function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); + } + function encodeRfc3986Full(str) { + return encodeRfc3986(encodeURIComponent(str)); + } + var HEADERS_TO_IGNORE = { + "authorization": true, + "connection": true, + "x-amzn-trace-id": true, + "user-agent": true, + "expect": true, + "presigned-expires": true, + "range": true + }; + function RequestSigner(request, credentials) { + if (typeof request === "string") request = url.parse(request); + var headers = request.headers = Object.assign({}, request.headers || {}), hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host); + this.request = request; + this.credentials = credentials || this.defaultCredentials(); + this.service = request.service || hostParts[0] || ""; + this.region = request.region || hostParts[1] || "us-east-1"; + if (this.service === "email") this.service = "ses"; + if (!request.method && request.body) + request.method = "POST"; + if (!headers.Host && !headers.host) { + headers.Host = request.hostname || request.host || this.createHost(); + if (request.port) + headers.Host += ":" + request.port; + } + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host; + this.isCodeCommitGit = this.service === "codecommit" && request.method === "GIT"; + this.extraHeadersToIgnore = request.extraHeadersToIgnore || /* @__PURE__ */ Object.create(null); + this.extraHeadersToInclude = request.extraHeadersToInclude || /* @__PURE__ */ Object.create(null); + } + RequestSigner.prototype.matchHost = function(host) { + var match = (host || "").match(/([^\.]{1,63})\.(?:([^\.]{0,63})\.)?amazonaws\.com(\.cn)?$/); + var hostParts = (match || []).slice(1, 3); + if (hostParts[1] === "es" || hostParts[1] === "aoss") + hostParts = hostParts.reverse(); + if (hostParts[1] == "s3") { + hostParts[0] = "s3"; + hostParts[1] = "us-east-1"; + } else { + for (var i2 = 0; i2 < 2; i2++) { + if (/^s3-/.test(hostParts[i2])) { + hostParts[1] = hostParts[i2].slice(3); + hostParts[0] = "s3"; + break; + } + } + } + return hostParts; + }; + RequestSigner.prototype.isSingleRegion = function() { + if (["s3", "sdb"].indexOf(this.service) >= 0 && this.region === "us-east-1") return true; + return ["cloudfront", "ls", "route53", "iam", "importexport", "sts"].indexOf(this.service) >= 0; + }; + RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? "" : "." + this.region, subdomain = this.service === "ses" ? "email" : this.service; + return subdomain + region + ".amazonaws.com"; + }; + RequestSigner.prototype.prepareRequest = function() { + this.parsePath(); + var request = this.request, headers = request.headers, query; + if (request.signQuery) { + this.parsedPath.query = query = this.parsedPath.query || {}; + if (this.credentials.sessionToken) + query["X-Amz-Security-Token"] = this.credentials.sessionToken; + if (this.service === "s3" && !query["X-Amz-Expires"]) + query["X-Amz-Expires"] = 86400; + if (query["X-Amz-Date"]) + this.datetime = query["X-Amz-Date"]; + else + query["X-Amz-Date"] = this.getDateTime(); + query["X-Amz-Algorithm"] = "AWS4-HMAC-SHA256"; + query["X-Amz-Credential"] = this.credentials.accessKeyId + "/" + this.credentialString(); + query["X-Amz-SignedHeaders"] = this.signedHeaders(); + } else { + if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { + if (request.body && !headers["Content-Type"] && !headers["content-type"]) + headers["Content-Type"] = "application/x-www-form-urlencoded; charset=utf-8"; + if (request.body && !headers["Content-Length"] && !headers["content-length"]) + headers["Content-Length"] = Buffer.byteLength(request.body); + if (this.credentials.sessionToken && !headers["X-Amz-Security-Token"] && !headers["x-amz-security-token"]) + headers["X-Amz-Security-Token"] = this.credentials.sessionToken; + if (this.service === "s3" && !headers["X-Amz-Content-Sha256"] && !headers["x-amz-content-sha256"]) + headers["X-Amz-Content-Sha256"] = hash(this.request.body || "", "hex"); + if (headers["X-Amz-Date"] || headers["x-amz-date"]) + this.datetime = headers["X-Amz-Date"] || headers["x-amz-date"]; + else + headers["X-Amz-Date"] = this.getDateTime(); + } + delete headers.Authorization; + delete headers.authorization; + } + }; + RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest(); + if (this.request.signQuery) { + this.parsedPath.query["X-Amz-Signature"] = this.signature(); + } else { + this.request.headers.Authorization = this.authHeader(); + } + this.request.path = this.formatPath(); + return this.request; + }; + RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, date = new Date(headers.Date || headers.date || /* @__PURE__ */ new Date()); + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, ""); + if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1); + } + return this.datetime; + }; + RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8); + }; + RequestSigner.prototype.authHeader = function() { + return [ + "AWS4-HMAC-SHA256 Credential=" + this.credentials.accessKeyId + "/" + this.credentialString(), + "SignedHeaders=" + this.signedHeaders(), + "Signature=" + this.signature() + ].join(", "); + }; + RequestSigner.prototype.signature = function() { + var date = this.getDate(), cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey); + if (!kCredentials) { + kDate = hmac("AWS4" + this.credentials.secretAccessKey, date); + kRegion = hmac(kDate, this.region); + kService = hmac(kRegion, this.service); + kCredentials = hmac(kService, "aws4_request"); + credentialsCache.set(cacheKey, kCredentials); + } + return hmac(kCredentials, this.stringToSign(), "hex"); + }; + RequestSigner.prototype.stringToSign = function() { + return [ + "AWS4-HMAC-SHA256", + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), "hex") + ].join("\n"); + }; + RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest(); + var pathStr = this.parsedPath.path, query = this.parsedPath.query, headers = this.request.headers, queryStr = "", normalizePath = this.service !== "s3", decodePath = this.service === "s3" || this.request.doNotEncodePath, decodeSlashesInPath = this.service === "s3", firstValOnly = this.service === "s3", bodyHash; + if (this.service === "s3" && this.request.signQuery) { + bodyHash = "UNSIGNED-PAYLOAD"; + } else if (this.isCodeCommitGit) { + bodyHash = ""; + } else { + bodyHash = headers["X-Amz-Content-Sha256"] || headers["x-amz-content-sha256"] || hash(this.request.body || "", "hex"); + } + if (query) { + var reducedQuery = Object.keys(query).reduce(function(obj, key) { + if (!key) return obj; + obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : firstValOnly ? query[key][0] : query[key]; + return obj; + }, {}); + var encodedQueryPieces = []; + Object.keys(reducedQuery).sort().forEach(function(key) { + if (!Array.isArray(reducedQuery[key])) { + encodedQueryPieces.push(key + "=" + encodeRfc3986Full(reducedQuery[key])); + } else { + reducedQuery[key].map(encodeRfc3986Full).sort().forEach(function(val) { + encodedQueryPieces.push(key + "=" + val); + }); + } + }); + queryStr = encodedQueryPieces.join("&"); + } + if (pathStr !== "/") { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, "/"); + pathStr = pathStr.split("/").reduce(function(path, piece) { + if (normalizePath && piece === "..") { + path.pop(); + } else if (!normalizePath || piece !== ".") { + if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, " ")); + path.push(encodeRfc3986Full(piece)); + } + return path; + }, []).join("/"); + if (pathStr[0] !== "/") pathStr = "/" + pathStr; + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, "/"); + } + return [ + this.request.method || "GET", + pathStr, + queryStr, + this.canonicalHeaders() + "\n", + this.signedHeaders(), + bodyHash + ].join("\n"); + }; + RequestSigner.prototype.filterHeaders = function() { + var headers = this.request.headers, extraHeadersToInclude = this.extraHeadersToInclude, extraHeadersToIgnore = this.extraHeadersToIgnore; + this.filteredHeaders = Object.keys(headers).map(function(key) { + return [key.toLowerCase(), headers[key]]; + }).filter(function(entry) { + return extraHeadersToInclude[entry[0]] || HEADERS_TO_IGNORE[entry[0]] == null && !extraHeadersToIgnore[entry[0]]; + }).sort(function(a, b) { + return a[0] < b[0] ? -1 : 1; + }); + }; + RequestSigner.prototype.canonicalHeaders = function() { + if (!this.filteredHeaders) this.filterHeaders(); + return this.filteredHeaders.map(function(entry) { + return entry[0] + ":" + entry[1].toString().trim().replace(/\s+/g, " "); + }).join("\n"); + }; + RequestSigner.prototype.signedHeaders = function() { + if (!this.filteredHeaders) this.filterHeaders(); + return this.filteredHeaders.map(function(entry) { + return entry[0]; + }).join(";"); + }; + RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + "aws4_request" + ].join("/"); + }; + RequestSigner.prototype.defaultCredentials = function() { + var env = process.env; + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN + }; + }; + RequestSigner.prototype.parsePath = function() { + var path = this.request.path || "/"; + if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) { + path = encodeURI(decodeURI(path)); + } + var queryIx = path.indexOf("?"), query = null; + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)); + path = path.slice(0, queryIx); + } + this.parsedPath = { + path, + query + }; + }; + RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, query = this.parsedPath.query; + if (!query) return path; + if (query[""] != null) delete query[""]; + return path + "?" + encodeRfc3986(querystring.stringify(query)); + }; + aws4.RequestSigner = RequestSigner; + aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign(); + }; + } +}); + +// node_modules/assert-plus/assert.js +var require_assert = __commonJS({ + "node_modules/assert-plus/assert.js"(exports2, module2) { + var assert = require("assert"); + var Stream = require("stream").Stream; + var util2 = require("util"); + var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + function _capitalize(str) { + return str.charAt(0).toUpperCase() + str.slice(1); + } + function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util2.format("%s (%s) is required", name, expected), + actual: actual === void 0 ? typeof arg : actual(arg), + expected, + operator: oper || "===", + stackStartFunction: _toss.caller + }); + } + function _getClass(arg) { + return Object.prototype.toString.call(arg).slice(8, -1); + } + function noop() { + } + var types = { + bool: { + check: function(arg) { + return typeof arg === "boolean"; + } + }, + func: { + check: function(arg) { + return typeof arg === "function"; + } + }, + string: { + check: function(arg) { + return typeof arg === "string"; + } + }, + object: { + check: function(arg) { + return typeof arg === "object" && arg !== null; + } + }, + number: { + check: function(arg) { + return typeof arg === "number" && !isNaN(arg); + } + }, + finite: { + check: function(arg) { + return typeof arg === "number" && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function(arg) { + return Buffer.isBuffer(arg); + }, + operator: "Buffer.isBuffer" + }, + array: { + check: function(arg) { + return Array.isArray(arg); + }, + operator: "Array.isArray" + }, + stream: { + check: function(arg) { + return arg instanceof Stream; + }, + operator: "instanceof", + actual: _getClass + }, + date: { + check: function(arg) { + return arg instanceof Date; + }, + operator: "instanceof", + actual: _getClass + }, + regexp: { + check: function(arg) { + return arg instanceof RegExp; + }, + operator: "instanceof", + actual: _getClass + }, + uuid: { + check: function(arg) { + return typeof arg === "string" && UUID_REGEXP.test(arg); + }, + operator: "isUUID" + } + }; + function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function(arg, msg) { + if (!arg) { + _toss(msg, "true", arg); + } + }; + } + keys.forEach(function(k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function(arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + keys.forEach(function(k) { + var name = "optional" + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function(arg, msg) { + if (arg === void 0 || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + keys.forEach(function(k) { + var name = "arrayOf" + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = "[" + k + "]"; + out[name] = function(arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i2; + for (i2 = 0; i2 < arg.length; i2++) { + if (!type.check(arg[i2])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + keys.forEach(function(k) { + var name = "optionalArrayOf" + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = "[" + k + "]"; + out[name] = function(arg, msg) { + if (arg === void 0 || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i2; + for (i2 = 0; i2 < arg.length; i2++) { + if (!type.check(arg[i2])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + Object.keys(assert).forEach(function(k) { + if (k === "AssertionError") { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + out._setExports = _setExports; + return out; + } + module2.exports = _setExports(process.env.NODE_NDEBUG); + } +}); + +// node_modules/safer-buffer/safer.js +var require_safer = __commonJS({ + "node_modules/safer-buffer/safer.js"(exports2, module2) { + "use strict"; + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + var safer = {}; + var key; + for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue; + if (key === "SlowBuffer" || key === "Buffer") continue; + safer[key] = buffer[key]; + } + var Safer = safer.Buffer = {}; + for (key in Buffer2) { + if (!Buffer2.hasOwnProperty(key)) continue; + if (key === "allocUnsafe" || key === "allocUnsafeSlow") continue; + Safer[key] = Buffer2[key]; + } + safer.Buffer.prototype = Buffer2.prototype; + if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function(value, encodingOrOffset, length) { + if (typeof value === "number") { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value); + } + if (value && typeof value.length === "undefined") { + throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); + } + return Buffer2(value, encodingOrOffset, length); + }; + } + if (!Safer.alloc) { + Safer.alloc = function(size2, fill, encoding) { + if (typeof size2 !== "number") { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size2); + } + if (size2 < 0 || size2 >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size2 + '" is invalid for option "size"'); + } + var buf = Buffer2(size2); + if (!fill || fill.length === 0) { + buf.fill(0); + } else if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + return buf; + }; + } + if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding("buffer").kStringMaxLength; + } catch (e) { + } + } + if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + }; + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength; + } + } + module2.exports = safer; + } +}); + +// node_modules/sshpk/lib/algs.js +var require_algs = __commonJS({ + "node_modules/sshpk/lib/algs.js"(exports2, module2) { + var Buffer2 = require_safer().Buffer; + var algInfo = { + "dsa": { + parts: ["p", "q", "g", "y"], + sizePart: "p" + }, + "rsa": { + parts: ["e", "n"], + sizePart: "n" + }, + "ecdsa": { + parts: ["curve", "Q"], + sizePart: "Q" + }, + "ed25519": { + parts: ["A"], + sizePart: "A" + } + }; + algInfo["curve25519"] = algInfo["ed25519"]; + var algPrivInfo = { + "dsa": { + parts: ["p", "q", "g", "y", "x"] + }, + "rsa": { + parts: ["n", "e", "d", "iqmp", "p", "q"] + }, + "ecdsa": { + parts: ["curve", "Q", "d"] + }, + "ed25519": { + parts: ["A", "k"] + } + }; + algPrivInfo["curve25519"] = algPrivInfo["ed25519"]; + var hashAlgs = { + "md5": true, + "sha1": true, + "sha256": true, + "sha384": true, + "sha512": true + }; + var curves = { + "nistp256": { + size: 256, + pkcs8oid: "1.2.840.10045.3.1.7", + p: Buffer2.from("00ffffffff 00000001 00000000 0000000000000000 ffffffff ffffffff ffffffff".replace(/ /g, ""), "hex"), + a: Buffer2.from("00FFFFFFFF 00000001 00000000 0000000000000000 FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g, ""), "hex"), + b: Buffer2.from("5ac635d8 aa3a93e7 b3ebbd55 769886bc651d06b0 cc53b0f6 3bce3c3e 27d2604b".replace(/ /g, ""), "hex"), + s: Buffer2.from("00c49d3608 86e70493 6a6678e1 139d26b7819f7e90".replace(/ /g, ""), "hex"), + n: Buffer2.from("00ffffffff 00000000 ffffffff ffffffffbce6faad a7179e84 f3b9cac2 fc632551".replace(/ /g, ""), "hex"), + G: Buffer2.from("046b17d1f2 e12c4247 f8bce6e5 63a440f277037d81 2deb33a0 f4a13945 d898c2964fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e162bce3357 6b315ece cbb64068 37bf51f5".replace(/ /g, ""), "hex") + }, + "nistp384": { + size: 384, + pkcs8oid: "1.3.132.0.34", + p: Buffer2.from("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffeffffffff 00000000 00000000 ffffffff".replace(/ /g, ""), "hex"), + a: Buffer2.from("00FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFEFFFFFFFF 00000000 00000000 FFFFFFFC".replace(/ /g, ""), "hex"), + b: Buffer2.from("b3312fa7 e23ee7e4 988e056b e3f82d19181d9c6e fe814112 0314088f 5013875ac656398d 8a2ed19d 2a85c8ed d3ec2aef".replace(/ /g, ""), "hex"), + s: Buffer2.from("00a335926a a319a27a 1d00896a 6773a4827acdac73".replace(/ /g, ""), "hex"), + n: Buffer2.from("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff c7634d81 f4372ddf581a0db2 48b0a77a ecec196a ccc52973".replace(/ /g, ""), "hex"), + G: Buffer2.from("04aa87ca22 be8b0537 8eb1c71e f320ad746e1d3b62 8ba79b98 59f741e0 82542a385502f25d bf55296c 3a545e38 72760ab73617de4a 96262c6f 5d9e98bf 9292dc29f8f41dbd 289a147c e9da3113 b5f0b8c00a60b1ce 1d7e819d 7a431d7c 90ea0e5f".replace(/ /g, ""), "hex") + }, + "nistp521": { + size: 521, + pkcs8oid: "1.3.132.0.35", + p: Buffer2.from("01ffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffff".replace(/ /g, ""), "hex"), + a: Buffer2.from("01FFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g, ""), "hex"), + b: Buffer2.from("51953eb961 8e1c9a1f 929a21a0 b68540eea2da725b 99b315f3 b8b48991 8ef109e156193951 ec7e937b 1652c0bd 3bb1bf073573df88 3d2c34f1 ef451fd4 6b503f00".replace(/ /g, ""), "hex"), + s: Buffer2.from("00d09e8800 291cb853 96cc6717 393284aaa0da64ba".replace(/ /g, ""), "hex"), + n: Buffer2.from("01ffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffa51868783 bf2f966b 7fcc0148 f709a5d03bb5c9b8 899c47ae bb6fb71e 91386409".replace(/ /g, ""), "hex"), + G: Buffer2.from("0400c6 858e06b7 0404e9cd 9e3ecb66 2395b4429c648139 053fb521 f828af60 6b4d3dbaa14b5e77 efe75928 fe1dc127 a2ffa8de3348b3c1 856a429b f97e7e31 c2e5bd660118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd998f54449 579b4468 17afbd17 273e662c97ee7299 5ef42640 c550b901 3fad0761353c7086 a272c240 88be9476 9fd16650".replace(/ /g, ""), "hex") + } + }; + module2.exports = { + info: algInfo, + privInfo: algPrivInfo, + hashAlgs, + curves + }; + } +}); + +// node_modules/sshpk/lib/errors.js +var require_errors = __commonJS({ + "node_modules/sshpk/lib/errors.js"(exports2, module2) { + var assert = require_assert(); + var util2 = require("util"); + function FingerprintFormatError(fp, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, FingerprintFormatError); + this.name = "FingerprintFormatError"; + this.fingerprint = fp; + this.format = format; + this.message = "Fingerprint format is not supported, or is invalid: "; + if (fp !== void 0) + this.message += " fingerprint = " + fp; + if (format !== void 0) + this.message += " format = " + format; + } + util2.inherits(FingerprintFormatError, Error); + function InvalidAlgorithmError(alg) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, InvalidAlgorithmError); + this.name = "InvalidAlgorithmError"; + this.algorithm = alg; + this.message = 'Algorithm "' + alg + '" is not supported'; + } + util2.inherits(InvalidAlgorithmError, Error); + function KeyParseError(name, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyParseError); + this.name = "KeyParseError"; + this.format = format; + this.keyName = name; + this.innerErr = innerErr; + this.message = "Failed to parse " + name + " as a valid " + format + " format key: " + innerErr.message; + } + util2.inherits(KeyParseError, Error); + function SignatureParseError(type, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, SignatureParseError); + this.name = "SignatureParseError"; + this.type = type; + this.format = format; + this.innerErr = innerErr; + this.message = "Failed to parse the given data as a " + type + " signature in " + format + " format: " + innerErr.message; + } + util2.inherits(SignatureParseError, Error); + function CertificateParseError(name, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, CertificateParseError); + this.name = "CertificateParseError"; + this.format = format; + this.certName = name; + this.innerErr = innerErr; + this.message = "Failed to parse " + name + " as a valid " + format + " format certificate: " + innerErr.message; + } + util2.inherits(CertificateParseError, Error); + function KeyEncryptedError(name, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyEncryptedError); + this.name = "KeyEncryptedError"; + this.format = format; + this.keyName = name; + this.message = "The " + format + " format key " + name + " is encrypted (password-protected), and no passphrase was provided in `options`"; + } + util2.inherits(KeyEncryptedError, Error); + module2.exports = { + FingerprintFormatError, + InvalidAlgorithmError, + KeyParseError, + SignatureParseError, + KeyEncryptedError, + CertificateParseError + }; + } +}); + +// node_modules/asn1/lib/ber/errors.js +var require_errors2 = __commonJS({ + "node_modules/asn1/lib/ber/errors.js"(exports2, module2) { + module2.exports = { + newInvalidAsn1Error: function(msg) { + var e = new Error(); + e.name = "InvalidAsn1Error"; + e.message = msg || ""; + return e; + } + }; + } +}); + +// node_modules/asn1/lib/ber/types.js +var require_types = __commonJS({ + "node_modules/asn1/lib/ber/types.js"(exports2, module2) { + module2.exports = { + EOC: 0, + Boolean: 1, + Integer: 2, + BitString: 3, + OctetString: 4, + Null: 5, + OID: 6, + ObjectDescriptor: 7, + External: 8, + Real: 9, + // float + Enumeration: 10, + PDV: 11, + Utf8String: 12, + RelativeOID: 13, + Sequence: 16, + Set: 17, + NumericString: 18, + PrintableString: 19, + T61String: 20, + VideotexString: 21, + IA5String: 22, + UTCTime: 23, + GeneralizedTime: 24, + GraphicString: 25, + VisibleString: 26, + GeneralString: 28, + UniversalString: 29, + CharacterString: 30, + BMPString: 31, + Constructor: 32, + Context: 128 + }; + } +}); + +// node_modules/asn1/lib/ber/reader.js +var require_reader = __commonJS({ + "node_modules/asn1/lib/ber/reader.js"(exports2, module2) { + var assert = require("assert"); + var Buffer2 = require_safer().Buffer; + var ASN1 = require_types(); + var errors = require_errors2(); + var newInvalidAsn1Error = errors.newInvalidAsn1Error; + function Reader(data) { + if (!data || !Buffer2.isBuffer(data)) + throw new TypeError("data must be a node Buffer"); + this._buf = data; + this._size = data.length; + this._len = 0; + this._offset = 0; + } + Object.defineProperty(Reader.prototype, "length", { + enumerable: true, + get: function() { + return this._len; + } + }); + Object.defineProperty(Reader.prototype, "offset", { + enumerable: true, + get: function() { + return this._offset; + } + }); + Object.defineProperty(Reader.prototype, "remain", { + get: function() { + return this._size - this._offset; + } + }); + Object.defineProperty(Reader.prototype, "buffer", { + get: function() { + return this._buf.slice(this._offset); + } + }); + Reader.prototype.readByte = function(peek) { + if (this._size - this._offset < 1) + return null; + var b = this._buf[this._offset] & 255; + if (!peek) + this._offset += 1; + return b; + }; + Reader.prototype.peek = function() { + return this.readByte(true); + }; + Reader.prototype.readLength = function(offset2) { + if (offset2 === void 0) + offset2 = this._offset; + if (offset2 >= this._size) + return null; + var lenB = this._buf[offset2++] & 255; + if (lenB === null) + return null; + if ((lenB & 128) === 128) { + lenB &= 127; + if (lenB === 0) + throw newInvalidAsn1Error("Indefinite length not supported"); + if (lenB > 4) + throw newInvalidAsn1Error("encoding too long"); + if (this._size - offset2 < lenB) + return null; + this._len = 0; + for (var i2 = 0; i2 < lenB; i2++) + this._len = (this._len << 8) + (this._buf[offset2++] & 255); + } else { + this._len = lenB; + } + return offset2; + }; + Reader.prototype.readSequence = function(tag) { + var seq = this.peek(); + if (seq === null) + return null; + if (tag !== void 0 && tag !== seq) + throw newInvalidAsn1Error("Expected 0x" + tag.toString(16) + ": got 0x" + seq.toString(16)); + var o = this.readLength(this._offset + 1); + if (o === null) + return null; + this._offset = o; + return seq; + }; + Reader.prototype.readInt = function() { + return this._readTag(ASN1.Integer); + }; + Reader.prototype.readBoolean = function() { + return this._readTag(ASN1.Boolean) === 0 ? false : true; + }; + Reader.prototype.readEnumeration = function() { + return this._readTag(ASN1.Enumeration); + }; + Reader.prototype.readString = function(tag, retbuf) { + if (!tag) + tag = ASN1.OctetString; + var b = this.peek(); + if (b === null) + return null; + if (b !== tag) + throw newInvalidAsn1Error("Expected 0x" + tag.toString(16) + ": got 0x" + b.toString(16)); + var o = this.readLength(this._offset + 1); + if (o === null) + return null; + if (this.length > this._size - o) + return null; + this._offset = o; + if (this.length === 0) + return retbuf ? Buffer2.alloc(0) : ""; + var str = this._buf.slice(this._offset, this._offset + this.length); + this._offset += this.length; + return retbuf ? str : str.toString("utf8"); + }; + Reader.prototype.readOID = function(tag) { + if (!tag) + tag = ASN1.OID; + var b = this.readString(tag, true); + if (b === null) + return null; + var values = []; + var value = 0; + for (var i2 = 0; i2 < b.length; i2++) { + var byte = b[i2] & 255; + value <<= 7; + value += byte & 127; + if ((byte & 128) === 0) { + values.push(value); + value = 0; + } + } + value = values.shift(); + values.unshift(value % 40); + values.unshift(value / 40 >> 0); + return values.join("."); + }; + Reader.prototype._readTag = function(tag) { + assert.ok(tag !== void 0); + var b = this.peek(); + if (b === null) + return null; + if (b !== tag) + throw newInvalidAsn1Error("Expected 0x" + tag.toString(16) + ": got 0x" + b.toString(16)); + var o = this.readLength(this._offset + 1); + if (o === null) + return null; + if (this.length > 4) + throw newInvalidAsn1Error("Integer too long: " + this.length); + if (this.length > this._size - o) + return null; + this._offset = o; + var fb = this._buf[this._offset]; + var value = 0; + for (var i2 = 0; i2 < this.length; i2++) { + value <<= 8; + value |= this._buf[this._offset++] & 255; + } + if ((fb & 128) === 128 && i2 !== 4) + value -= 1 << i2 * 8; + return value >> 0; + }; + module2.exports = Reader; + } +}); + +// node_modules/asn1/lib/ber/writer.js +var require_writer = __commonJS({ + "node_modules/asn1/lib/ber/writer.js"(exports2, module2) { + var assert = require("assert"); + var Buffer2 = require_safer().Buffer; + var ASN1 = require_types(); + var errors = require_errors2(); + var newInvalidAsn1Error = errors.newInvalidAsn1Error; + var DEFAULT_OPTS = { + size: 1024, + growthFactor: 8 + }; + function merge(from, to) { + assert.ok(from); + assert.equal(typeof from, "object"); + assert.ok(to); + assert.equal(typeof to, "object"); + var keys = Object.getOwnPropertyNames(from); + keys.forEach(function(key) { + if (to[key]) + return; + var value = Object.getOwnPropertyDescriptor(from, key); + Object.defineProperty(to, key, value); + }); + return to; + } + function Writer(options) { + options = merge(DEFAULT_OPTS, options || {}); + this._buf = Buffer2.alloc(options.size || 1024); + this._size = this._buf.length; + this._offset = 0; + this._options = options; + this._seq = []; + } + Object.defineProperty(Writer.prototype, "buffer", { + get: function() { + if (this._seq.length) + throw newInvalidAsn1Error(this._seq.length + " unended sequence(s)"); + return this._buf.slice(0, this._offset); + } + }); + Writer.prototype.writeByte = function(b) { + if (typeof b !== "number") + throw new TypeError("argument must be a Number"); + this._ensure(1); + this._buf[this._offset++] = b; + }; + Writer.prototype.writeInt = function(i2, tag) { + if (typeof i2 !== "number") + throw new TypeError("argument must be a Number"); + if (typeof tag !== "number") + tag = ASN1.Integer; + var sz = 4; + while (((i2 & 4286578688) === 0 || (i2 & 4286578688) === 4286578688 >> 0) && sz > 1) { + sz--; + i2 <<= 8; + } + if (sz > 4) + throw newInvalidAsn1Error("BER ints cannot be > 0xffffffff"); + this._ensure(2 + sz); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = sz; + while (sz-- > 0) { + this._buf[this._offset++] = (i2 & 4278190080) >>> 24; + i2 <<= 8; + } + }; + Writer.prototype.writeNull = function() { + this.writeByte(ASN1.Null); + this.writeByte(0); + }; + Writer.prototype.writeEnumeration = function(i2, tag) { + if (typeof i2 !== "number") + throw new TypeError("argument must be a Number"); + if (typeof tag !== "number") + tag = ASN1.Enumeration; + return this.writeInt(i2, tag); + }; + Writer.prototype.writeBoolean = function(b, tag) { + if (typeof b !== "boolean") + throw new TypeError("argument must be a Boolean"); + if (typeof tag !== "number") + tag = ASN1.Boolean; + this._ensure(3); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = 1; + this._buf[this._offset++] = b ? 255 : 0; + }; + Writer.prototype.writeString = function(s, tag) { + if (typeof s !== "string") + throw new TypeError("argument must be a string (was: " + typeof s + ")"); + if (typeof tag !== "number") + tag = ASN1.OctetString; + var len = Buffer2.byteLength(s); + this.writeByte(tag); + this.writeLength(len); + if (len) { + this._ensure(len); + this._buf.write(s, this._offset); + this._offset += len; + } + }; + Writer.prototype.writeBuffer = function(buf, tag) { + if (typeof tag !== "number") + throw new TypeError("tag must be a number"); + if (!Buffer2.isBuffer(buf)) + throw new TypeError("argument must be a buffer"); + this.writeByte(tag); + this.writeLength(buf.length); + this._ensure(buf.length); + buf.copy(this._buf, this._offset, 0, buf.length); + this._offset += buf.length; + }; + Writer.prototype.writeStringArray = function(strings) { + if (!strings instanceof Array) + throw new TypeError("argument must be an Array[String]"); + var self2 = this; + strings.forEach(function(s) { + self2.writeString(s); + }); + }; + Writer.prototype.writeOID = function(s, tag) { + if (typeof s !== "string") + throw new TypeError("argument must be a string"); + if (typeof tag !== "number") + tag = ASN1.OID; + if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) + throw new Error("argument is not a valid OID string"); + function encodeOctet(bytes2, octet) { + if (octet < 128) { + bytes2.push(octet); + } else if (octet < 16384) { + bytes2.push(octet >>> 7 | 128); + bytes2.push(octet & 127); + } else if (octet < 2097152) { + bytes2.push(octet >>> 14 | 128); + bytes2.push((octet >>> 7 | 128) & 255); + bytes2.push(octet & 127); + } else if (octet < 268435456) { + bytes2.push(octet >>> 21 | 128); + bytes2.push((octet >>> 14 | 128) & 255); + bytes2.push((octet >>> 7 | 128) & 255); + bytes2.push(octet & 127); + } else { + bytes2.push((octet >>> 28 | 128) & 255); + bytes2.push((octet >>> 21 | 128) & 255); + bytes2.push((octet >>> 14 | 128) & 255); + bytes2.push((octet >>> 7 | 128) & 255); + bytes2.push(octet & 127); + } + } + var tmp = s.split("."); + var bytes = []; + bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); + tmp.slice(2).forEach(function(b) { + encodeOctet(bytes, parseInt(b, 10)); + }); + var self2 = this; + this._ensure(2 + bytes.length); + this.writeByte(tag); + this.writeLength(bytes.length); + bytes.forEach(function(b) { + self2.writeByte(b); + }); + }; + Writer.prototype.writeLength = function(len) { + if (typeof len !== "number") + throw new TypeError("argument must be a Number"); + this._ensure(4); + if (len <= 127) { + this._buf[this._offset++] = len; + } else if (len <= 255) { + this._buf[this._offset++] = 129; + this._buf[this._offset++] = len; + } else if (len <= 65535) { + this._buf[this._offset++] = 130; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else if (len <= 16777215) { + this._buf[this._offset++] = 131; + this._buf[this._offset++] = len >> 16; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else { + throw newInvalidAsn1Error("Length too long (> 4 bytes)"); + } + }; + Writer.prototype.startSequence = function(tag) { + if (typeof tag !== "number") + tag = ASN1.Sequence | ASN1.Constructor; + this.writeByte(tag); + this._seq.push(this._offset); + this._ensure(3); + this._offset += 3; + }; + Writer.prototype.endSequence = function() { + var seq = this._seq.pop(); + var start = seq + 3; + var len = this._offset - start; + if (len <= 127) { + this._shift(start, len, -2); + this._buf[seq] = len; + } else if (len <= 255) { + this._shift(start, len, -1); + this._buf[seq] = 129; + this._buf[seq + 1] = len; + } else if (len <= 65535) { + this._buf[seq] = 130; + this._buf[seq + 1] = len >> 8; + this._buf[seq + 2] = len; + } else if (len <= 16777215) { + this._shift(start, len, 1); + this._buf[seq] = 131; + this._buf[seq + 1] = len >> 16; + this._buf[seq + 2] = len >> 8; + this._buf[seq + 3] = len; + } else { + throw newInvalidAsn1Error("Sequence too long"); + } + }; + Writer.prototype._shift = function(start, len, shift2) { + assert.ok(start !== void 0); + assert.ok(len !== void 0); + assert.ok(shift2); + this._buf.copy(this._buf, start + shift2, start, start + len); + this._offset += shift2; + }; + Writer.prototype._ensure = function(len) { + assert.ok(len); + if (this._size - this._offset < len) { + var sz = this._size * this._options.growthFactor; + if (sz - this._offset < len) + sz += len; + var buf = Buffer2.alloc(sz); + this._buf.copy(buf, 0, 0, this._offset); + this._buf = buf; + this._size = sz; + } + }; + module2.exports = Writer; + } +}); + +// node_modules/asn1/lib/ber/index.js +var require_ber = __commonJS({ + "node_modules/asn1/lib/ber/index.js"(exports2, module2) { + var errors = require_errors2(); + var types = require_types(); + var Reader = require_reader(); + var Writer = require_writer(); + module2.exports = { + Reader, + Writer + }; + for (t in types) { + if (types.hasOwnProperty(t)) + module2.exports[t] = types[t]; + } + var t; + for (e in errors) { + if (errors.hasOwnProperty(e)) + module2.exports[e] = errors[e]; + } + var e; + } +}); + +// node_modules/asn1/lib/index.js +var require_lib = __commonJS({ + "node_modules/asn1/lib/index.js"(exports2, module2) { + var Ber = require_ber(); + module2.exports = { + Ber, + BerReader: Ber.Reader, + BerWriter: Ber.Writer + }; + } +}); + +// node_modules/jsbn/index.js +var require_jsbn = __commonJS({ + "node_modules/jsbn/index.js"(exports2, module2) { + (function() { + var dbits; + var canary = 244837814094590; + var j_lm = (canary & 16777215) == 15715070; + function BigInteger(a, b, c) { + if (a != null) + if ("number" == typeof a) this.fromNumber(a, b, c); + else if (b == null && "string" != typeof a) this.fromString(a, 256); + else this.fromString(a, b); + } + function nbi() { + return new BigInteger(null); + } + function am1(i2, x, w, j, c, n) { + while (--n >= 0) { + var v = x * this[i2++] + w[j] + c; + c = Math.floor(v / 67108864); + w[j++] = v & 67108863; + } + return c; + } + function am2(i2, x, w, j, c, n) { + var xl = x & 32767, xh = x >> 15; + while (--n >= 0) { + var l = this[i2] & 32767; + var h = this[i2++] >> 15; + var m = xh * l + h * xl; + l = xl * l + ((m & 32767) << 15) + w[j] + (c & 1073741823); + c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30); + w[j++] = l & 1073741823; + } + return c; + } + function am3(i2, x, w, j, c, n) { + var xl = x & 16383, xh = x >> 14; + while (--n >= 0) { + var l = this[i2] & 16383; + var h = this[i2++] >> 14; + var m = xh * l + h * xl; + l = xl * l + ((m & 16383) << 14) + w[j] + c; + c = (l >> 28) + (m >> 14) + xh * h; + w[j++] = l & 268435455; + } + return c; + } + var inBrowser = typeof navigator !== "undefined"; + if (inBrowser && j_lm && navigator.appName == "Microsoft Internet Explorer") { + BigInteger.prototype.am = am2; + dbits = 30; + } else if (inBrowser && j_lm && navigator.appName != "Netscape") { + BigInteger.prototype.am = am1; + dbits = 26; + } else { + BigInteger.prototype.am = am3; + dbits = 28; + } + BigInteger.prototype.DB = dbits; + BigInteger.prototype.DM = (1 << dbits) - 1; + BigInteger.prototype.DV = 1 << dbits; + var BI_FP = 52; + BigInteger.prototype.FV = Math.pow(2, BI_FP); + BigInteger.prototype.F1 = BI_FP - dbits; + BigInteger.prototype.F2 = 2 * dbits - BI_FP; + var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz"; + var BI_RC = new Array(); + var rr, vv; + rr = "0".charCodeAt(0); + for (vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv; + rr = "a".charCodeAt(0); + for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv; + rr = "A".charCodeAt(0); + for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv; + function int2char(n) { + return BI_RM.charAt(n); + } + function intAt(s, i2) { + var c = BI_RC[s.charCodeAt(i2)]; + return c == null ? -1 : c; + } + function bnpCopyTo(r) { + for (var i2 = this.t - 1; i2 >= 0; --i2) r[i2] = this[i2]; + r.t = this.t; + r.s = this.s; + } + function bnpFromInt(x) { + this.t = 1; + this.s = x < 0 ? -1 : 0; + if (x > 0) this[0] = x; + else if (x < -1) this[0] = x + this.DV; + else this.t = 0; + } + function nbv(i2) { + var r = nbi(); + r.fromInt(i2); + return r; + } + function bnpFromString(s, b) { + var k; + if (b == 16) k = 4; + else if (b == 8) k = 3; + else if (b == 256) k = 8; + else if (b == 2) k = 1; + else if (b == 32) k = 5; + else if (b == 4) k = 2; + else { + this.fromRadix(s, b); + return; + } + this.t = 0; + this.s = 0; + var i2 = s.length, mi = false, sh = 0; + while (--i2 >= 0) { + var x = k == 8 ? s[i2] & 255 : intAt(s, i2); + if (x < 0) { + if (s.charAt(i2) == "-") mi = true; + continue; + } + mi = false; + if (sh == 0) + this[this.t++] = x; + else if (sh + k > this.DB) { + this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh; + this[this.t++] = x >> this.DB - sh; + } else + this[this.t - 1] |= x << sh; + sh += k; + if (sh >= this.DB) sh -= this.DB; + } + if (k == 8 && (s[0] & 128) != 0) { + this.s = -1; + if (sh > 0) this[this.t - 1] |= (1 << this.DB - sh) - 1 << sh; + } + this.clamp(); + if (mi) BigInteger.ZERO.subTo(this, this); + } + function bnpClamp() { + var c = this.s & this.DM; + while (this.t > 0 && this[this.t - 1] == c) --this.t; + } + function bnToString(b) { + if (this.s < 0) return "-" + this.negate().toString(b); + var k; + if (b == 16) k = 4; + else if (b == 8) k = 3; + else if (b == 2) k = 1; + else if (b == 32) k = 5; + else if (b == 4) k = 2; + else return this.toRadix(b); + var km = (1 << k) - 1, d, m = false, r = "", i2 = this.t; + var p = this.DB - i2 * this.DB % k; + if (i2-- > 0) { + if (p < this.DB && (d = this[i2] >> p) > 0) { + m = true; + r = int2char(d); + } + while (i2 >= 0) { + if (p < k) { + d = (this[i2] & (1 << p) - 1) << k - p; + d |= this[--i2] >> (p += this.DB - k); + } else { + d = this[i2] >> (p -= k) & km; + if (p <= 0) { + p += this.DB; + --i2; + } + } + if (d > 0) m = true; + if (m) r += int2char(d); + } + } + return m ? r : "0"; + } + function bnNegate() { + var r = nbi(); + BigInteger.ZERO.subTo(this, r); + return r; + } + function bnAbs() { + return this.s < 0 ? this.negate() : this; + } + function bnCompareTo(a) { + var r = this.s - a.s; + if (r != 0) return r; + var i2 = this.t; + r = i2 - a.t; + if (r != 0) return this.s < 0 ? -r : r; + while (--i2 >= 0) if ((r = this[i2] - a[i2]) != 0) return r; + return 0; + } + function nbits(x) { + var r = 1, t2; + if ((t2 = x >>> 16) != 0) { + x = t2; + r += 16; + } + if ((t2 = x >> 8) != 0) { + x = t2; + r += 8; + } + if ((t2 = x >> 4) != 0) { + x = t2; + r += 4; + } + if ((t2 = x >> 2) != 0) { + x = t2; + r += 2; + } + if ((t2 = x >> 1) != 0) { + x = t2; + r += 1; + } + return r; + } + function bnBitLength() { + if (this.t <= 0) return 0; + return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM); + } + function bnpDLShiftTo(n, r) { + var i2; + for (i2 = this.t - 1; i2 >= 0; --i2) r[i2 + n] = this[i2]; + for (i2 = n - 1; i2 >= 0; --i2) r[i2] = 0; + r.t = this.t + n; + r.s = this.s; + } + function bnpDRShiftTo(n, r) { + for (var i2 = n; i2 < this.t; ++i2) r[i2 - n] = this[i2]; + r.t = Math.max(this.t - n, 0); + r.s = this.s; + } + function bnpLShiftTo(n, r) { + var bs = n % this.DB; + var cbs = this.DB - bs; + var bm = (1 << cbs) - 1; + var ds = Math.floor(n / this.DB), c = this.s << bs & this.DM, i2; + for (i2 = this.t - 1; i2 >= 0; --i2) { + r[i2 + ds + 1] = this[i2] >> cbs | c; + c = (this[i2] & bm) << bs; + } + for (i2 = ds - 1; i2 >= 0; --i2) r[i2] = 0; + r[ds] = c; + r.t = this.t + ds + 1; + r.s = this.s; + r.clamp(); + } + function bnpRShiftTo(n, r) { + r.s = this.s; + var ds = Math.floor(n / this.DB); + if (ds >= this.t) { + r.t = 0; + return; + } + var bs = n % this.DB; + var cbs = this.DB - bs; + var bm = (1 << bs) - 1; + r[0] = this[ds] >> bs; + for (var i2 = ds + 1; i2 < this.t; ++i2) { + r[i2 - ds - 1] |= (this[i2] & bm) << cbs; + r[i2 - ds] = this[i2] >> bs; + } + if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs; + r.t = this.t - ds; + r.clamp(); + } + function bnpSubTo(a, r) { + var i2 = 0, c = 0, m = Math.min(a.t, this.t); + while (i2 < m) { + c += this[i2] - a[i2]; + r[i2++] = c & this.DM; + c >>= this.DB; + } + if (a.t < this.t) { + c -= a.s; + while (i2 < this.t) { + c += this[i2]; + r[i2++] = c & this.DM; + c >>= this.DB; + } + c += this.s; + } else { + c += this.s; + while (i2 < a.t) { + c -= a[i2]; + r[i2++] = c & this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = c < 0 ? -1 : 0; + if (c < -1) r[i2++] = this.DV + c; + else if (c > 0) r[i2++] = c; + r.t = i2; + r.clamp(); + } + function bnpMultiplyTo(a, r) { + var x = this.abs(), y = a.abs(); + var i2 = x.t; + r.t = i2 + y.t; + while (--i2 >= 0) r[i2] = 0; + for (i2 = 0; i2 < y.t; ++i2) r[i2 + x.t] = x.am(0, y[i2], r, i2, 0, x.t); + r.s = 0; + r.clamp(); + if (this.s != a.s) BigInteger.ZERO.subTo(r, r); + } + function bnpSquareTo(r) { + var x = this.abs(); + var i2 = r.t = 2 * x.t; + while (--i2 >= 0) r[i2] = 0; + for (i2 = 0; i2 < x.t - 1; ++i2) { + var c = x.am(i2, x[i2], r, 2 * i2, 0, 1); + if ((r[i2 + x.t] += x.am(i2 + 1, 2 * x[i2], r, 2 * i2 + 1, c, x.t - i2 - 1)) >= x.DV) { + r[i2 + x.t] -= x.DV; + r[i2 + x.t + 1] = 1; + } + } + if (r.t > 0) r[r.t - 1] += x.am(i2, x[i2], r, 2 * i2, 0, 1); + r.s = 0; + r.clamp(); + } + function bnpDivRemTo(m, q2, r) { + var pm = m.abs(); + if (pm.t <= 0) return; + var pt = this.abs(); + if (pt.t < pm.t) { + if (q2 != null) q2.fromInt(0); + if (r != null) this.copyTo(r); + return; + } + if (r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB - nbits(pm[pm.t - 1]); + if (nsh > 0) { + pm.lShiftTo(nsh, y); + pt.lShiftTo(nsh, r); + } else { + pm.copyTo(y); + pt.copyTo(r); + } + var ys = y.t; + var y0 = y[ys - 1]; + if (y0 == 0) return; + var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0); + var d1 = this.FV / yt, d2 = (1 << this.F1) / yt, e = 1 << this.F2; + var i2 = r.t, j = i2 - ys, t2 = q2 == null ? nbi() : q2; + y.dlShiftTo(j, t2); + if (r.compareTo(t2) >= 0) { + r[r.t++] = 1; + r.subTo(t2, r); + } + BigInteger.ONE.dlShiftTo(ys, t2); + t2.subTo(y, y); + while (y.t < ys) y[y.t++] = 0; + while (--j >= 0) { + var qd = r[--i2] == y0 ? this.DM : Math.floor(r[i2] * d1 + (r[i2 - 1] + e) * d2); + if ((r[i2] += y.am(0, qd, r, j, 0, ys)) < qd) { + y.dlShiftTo(j, t2); + r.subTo(t2, r); + while (r[i2] < --qd) r.subTo(t2, r); + } + } + if (q2 != null) { + r.drShiftTo(ys, q2); + if (ts != ms) BigInteger.ZERO.subTo(q2, q2); + } + r.t = ys; + r.clamp(); + if (nsh > 0) r.rShiftTo(nsh, r); + if (ts < 0) BigInteger.ZERO.subTo(r, r); + } + function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a, null, r); + if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r); + return r; + } + function Classic(m) { + this.m = m; + } + function cConvert(x) { + if (x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; + } + function cRevert(x) { + return x; + } + function cReduce(x) { + x.divRemTo(this.m, null, x); + } + function cMulTo(x, y, r) { + x.multiplyTo(y, r); + this.reduce(r); + } + function cSqrTo(x, r) { + x.squareTo(r); + this.reduce(r); + } + Classic.prototype.convert = cConvert; + Classic.prototype.revert = cRevert; + Classic.prototype.reduce = cReduce; + Classic.prototype.mulTo = cMulTo; + Classic.prototype.sqrTo = cSqrTo; + function bnpInvDigit() { + if (this.t < 1) return 0; + var x = this[0]; + if ((x & 1) == 0) return 0; + var y = x & 3; + y = y * (2 - (x & 15) * y) & 15; + y = y * (2 - (x & 255) * y) & 255; + y = y * (2 - ((x & 65535) * y & 65535)) & 65535; + y = y * (2 - x * y % this.DV) % this.DV; + return y > 0 ? this.DV - y : -y; + } + function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp & 32767; + this.mph = this.mp >> 15; + this.um = (1 << m.DB - 15) - 1; + this.mt2 = 2 * m.t; + } + function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t, r); + r.divRemTo(this.m, null, r); + if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r); + return r; + } + function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; + } + function montReduce(x) { + while (x.t <= this.mt2) + x[x.t++] = 0; + for (var i2 = 0; i2 < this.m.t; ++i2) { + var j = x[i2] & 32767; + var u0 = j * this.mpl + ((j * this.mph + (x[i2] >> 15) * this.mpl & this.um) << 15) & x.DM; + j = i2 + this.m.t; + x[j] += this.m.am(0, u0, x, i2, 0, this.m.t); + while (x[j] >= x.DV) { + x[j] -= x.DV; + x[++j]++; + } + } + x.clamp(); + x.drShiftTo(this.m.t, x); + if (x.compareTo(this.m) >= 0) x.subTo(this.m, x); + } + function montSqrTo(x, r) { + x.squareTo(r); + this.reduce(r); + } + function montMulTo(x, y, r) { + x.multiplyTo(y, r); + this.reduce(r); + } + Montgomery.prototype.convert = montConvert; + Montgomery.prototype.revert = montRevert; + Montgomery.prototype.reduce = montReduce; + Montgomery.prototype.mulTo = montMulTo; + Montgomery.prototype.sqrTo = montSqrTo; + function bnpIsEven() { + return (this.t > 0 ? this[0] & 1 : this.s) == 0; + } + function bnpExp(e, z3) { + if (e > 4294967295 || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z3.convert(this), i2 = nbits(e) - 1; + g.copyTo(r); + while (--i2 >= 0) { + z3.sqrTo(r, r2); + if ((e & 1 << i2) > 0) z3.mulTo(r2, g, r); + else { + var t2 = r; + r = r2; + r2 = t2; + } + } + return z3.revert(r); + } + function bnModPowInt(e, m) { + var z3; + if (e < 256 || m.isEven()) z3 = new Classic(m); + else z3 = new Montgomery(m); + return this.exp(e, z3); + } + BigInteger.prototype.copyTo = bnpCopyTo; + BigInteger.prototype.fromInt = bnpFromInt; + BigInteger.prototype.fromString = bnpFromString; + BigInteger.prototype.clamp = bnpClamp; + BigInteger.prototype.dlShiftTo = bnpDLShiftTo; + BigInteger.prototype.drShiftTo = bnpDRShiftTo; + BigInteger.prototype.lShiftTo = bnpLShiftTo; + BigInteger.prototype.rShiftTo = bnpRShiftTo; + BigInteger.prototype.subTo = bnpSubTo; + BigInteger.prototype.multiplyTo = bnpMultiplyTo; + BigInteger.prototype.squareTo = bnpSquareTo; + BigInteger.prototype.divRemTo = bnpDivRemTo; + BigInteger.prototype.invDigit = bnpInvDigit; + BigInteger.prototype.isEven = bnpIsEven; + BigInteger.prototype.exp = bnpExp; + BigInteger.prototype.toString = bnToString; + BigInteger.prototype.negate = bnNegate; + BigInteger.prototype.abs = bnAbs; + BigInteger.prototype.compareTo = bnCompareTo; + BigInteger.prototype.bitLength = bnBitLength; + BigInteger.prototype.mod = bnMod; + BigInteger.prototype.modPowInt = bnModPowInt; + BigInteger.ZERO = nbv(0); + BigInteger.ONE = nbv(1); + function bnClone() { + var r = nbi(); + this.copyTo(r); + return r; + } + function bnIntValue() { + if (this.s < 0) { + if (this.t == 1) return this[0] - this.DV; + else if (this.t == 0) return -1; + } else if (this.t == 1) return this[0]; + else if (this.t == 0) return 0; + return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]; + } + function bnByteValue() { + return this.t == 0 ? this.s : this[0] << 24 >> 24; + } + function bnShortValue() { + return this.t == 0 ? this.s : this[0] << 16 >> 16; + } + function bnpChunkSize(r) { + return Math.floor(Math.LN2 * this.DB / Math.log(r)); + } + function bnSigNum() { + if (this.s < 0) return -1; + else if (this.t <= 0 || this.t == 1 && this[0] <= 0) return 0; + else return 1; + } + function bnpToRadix(b) { + if (b == null) b = 10; + if (this.signum() == 0 || b < 2 || b > 36) return "0"; + var cs = this.chunkSize(b); + var a = Math.pow(b, cs); + var d = nbv(a), y = nbi(), z3 = nbi(), r = ""; + this.divRemTo(d, y, z3); + while (y.signum() > 0) { + r = (a + z3.intValue()).toString(b).substr(1) + r; + y.divRemTo(d, y, z3); + } + return z3.intValue().toString(b) + r; + } + function bnpFromRadix(s, b) { + this.fromInt(0); + if (b == null) b = 10; + var cs = this.chunkSize(b); + var d = Math.pow(b, cs), mi = false, j = 0, w = 0; + for (var i2 = 0; i2 < s.length; ++i2) { + var x = intAt(s, i2); + if (x < 0) { + if (s.charAt(i2) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b * w + x; + if (++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w, 0); + j = 0; + w = 0; + } + } + if (j > 0) { + this.dMultiply(Math.pow(b, j)); + this.dAddOffset(w, 0); + } + if (mi) BigInteger.ZERO.subTo(this, this); + } + function bnpFromNumber(a, b, c) { + if ("number" == typeof b) { + if (a < 2) this.fromInt(1); + else { + this.fromNumber(a, c); + if (!this.testBit(a - 1)) + this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this); + if (this.isEven()) this.dAddOffset(1, 0); + while (!this.isProbablePrime(b)) { + this.dAddOffset(2, 0); + if (this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a - 1), this); + } + } + } else { + var x = new Array(), t2 = a & 7; + x.length = (a >> 3) + 1; + b.nextBytes(x); + if (t2 > 0) x[0] &= (1 << t2) - 1; + else x[0] = 0; + this.fromString(x, 256); + } + } + function bnToByteArray() { + var i2 = this.t, r = new Array(); + r[0] = this.s; + var p = this.DB - i2 * this.DB % 8, d, k = 0; + if (i2-- > 0) { + if (p < this.DB && (d = this[i2] >> p) != (this.s & this.DM) >> p) + r[k++] = d | this.s << this.DB - p; + while (i2 >= 0) { + if (p < 8) { + d = (this[i2] & (1 << p) - 1) << 8 - p; + d |= this[--i2] >> (p += this.DB - 8); + } else { + d = this[i2] >> (p -= 8) & 255; + if (p <= 0) { + p += this.DB; + --i2; + } + } + if ((d & 128) != 0) d |= -256; + if (k == 0 && (this.s & 128) != (d & 128)) ++k; + if (k > 0 || d != this.s) r[k++] = d; + } + } + return r; + } + function bnEquals(a) { + return this.compareTo(a) == 0; + } + function bnMin(a) { + return this.compareTo(a) < 0 ? this : a; + } + function bnMax(a) { + return this.compareTo(a) > 0 ? this : a; + } + function bnpBitwiseTo(a, op, r) { + var i2, f, m = Math.min(a.t, this.t); + for (i2 = 0; i2 < m; ++i2) r[i2] = op(this[i2], a[i2]); + if (a.t < this.t) { + f = a.s & this.DM; + for (i2 = m; i2 < this.t; ++i2) r[i2] = op(this[i2], f); + r.t = this.t; + } else { + f = this.s & this.DM; + for (i2 = m; i2 < a.t; ++i2) r[i2] = op(f, a[i2]); + r.t = a.t; + } + r.s = op(this.s, a.s); + r.clamp(); + } + function op_and(x, y) { + return x & y; + } + function bnAnd(a) { + var r = nbi(); + this.bitwiseTo(a, op_and, r); + return r; + } + function op_or(x, y) { + return x | y; + } + function bnOr(a) { + var r = nbi(); + this.bitwiseTo(a, op_or, r); + return r; + } + function op_xor(x, y) { + return x ^ y; + } + function bnXor(a) { + var r = nbi(); + this.bitwiseTo(a, op_xor, r); + return r; + } + function op_andnot(x, y) { + return x & ~y; + } + function bnAndNot(a) { + var r = nbi(); + this.bitwiseTo(a, op_andnot, r); + return r; + } + function bnNot() { + var r = nbi(); + for (var i2 = 0; i2 < this.t; ++i2) r[i2] = this.DM & ~this[i2]; + r.t = this.t; + r.s = ~this.s; + return r; + } + function bnShiftLeft(n) { + var r = nbi(); + if (n < 0) this.rShiftTo(-n, r); + else this.lShiftTo(n, r); + return r; + } + function bnShiftRight(n) { + var r = nbi(); + if (n < 0) this.lShiftTo(-n, r); + else this.rShiftTo(n, r); + return r; + } + function lbit(x) { + if (x == 0) return -1; + var r = 0; + if ((x & 65535) == 0) { + x >>= 16; + r += 16; + } + if ((x & 255) == 0) { + x >>= 8; + r += 8; + } + if ((x & 15) == 0) { + x >>= 4; + r += 4; + } + if ((x & 3) == 0) { + x >>= 2; + r += 2; + } + if ((x & 1) == 0) ++r; + return r; + } + function bnGetLowestSetBit() { + for (var i2 = 0; i2 < this.t; ++i2) + if (this[i2] != 0) return i2 * this.DB + lbit(this[i2]); + if (this.s < 0) return this.t * this.DB; + return -1; + } + function cbit(x) { + var r = 0; + while (x != 0) { + x &= x - 1; + ++r; + } + return r; + } + function bnBitCount() { + var r = 0, x = this.s & this.DM; + for (var i2 = 0; i2 < this.t; ++i2) r += cbit(this[i2] ^ x); + return r; + } + function bnTestBit(n) { + var j = Math.floor(n / this.DB); + if (j >= this.t) return this.s != 0; + return (this[j] & 1 << n % this.DB) != 0; + } + function bnpChangeBit(n, op) { + var r = BigInteger.ONE.shiftLeft(n); + this.bitwiseTo(r, op, r); + return r; + } + function bnSetBit(n) { + return this.changeBit(n, op_or); + } + function bnClearBit(n) { + return this.changeBit(n, op_andnot); + } + function bnFlipBit(n) { + return this.changeBit(n, op_xor); + } + function bnpAddTo(a, r) { + var i2 = 0, c = 0, m = Math.min(a.t, this.t); + while (i2 < m) { + c += this[i2] + a[i2]; + r[i2++] = c & this.DM; + c >>= this.DB; + } + if (a.t < this.t) { + c += a.s; + while (i2 < this.t) { + c += this[i2]; + r[i2++] = c & this.DM; + c >>= this.DB; + } + c += this.s; + } else { + c += this.s; + while (i2 < a.t) { + c += a[i2]; + r[i2++] = c & this.DM; + c >>= this.DB; + } + c += a.s; + } + r.s = c < 0 ? -1 : 0; + if (c > 0) r[i2++] = c; + else if (c < -1) r[i2++] = this.DV + c; + r.t = i2; + r.clamp(); + } + function bnAdd(a) { + var r = nbi(); + this.addTo(a, r); + return r; + } + function bnSubtract(a) { + var r = nbi(); + this.subTo(a, r); + return r; + } + function bnMultiply(a) { + var r = nbi(); + this.multiplyTo(a, r); + return r; + } + function bnSquare() { + var r = nbi(); + this.squareTo(r); + return r; + } + function bnDivide(a) { + var r = nbi(); + this.divRemTo(a, r, null); + return r; + } + function bnRemainder(a) { + var r = nbi(); + this.divRemTo(a, null, r); + return r; + } + function bnDivideAndRemainder(a) { + var q2 = nbi(), r = nbi(); + this.divRemTo(a, q2, r); + return new Array(q2, r); + } + function bnpDMultiply(n) { + this[this.t] = this.am(0, n - 1, this, 0, 0, this.t); + ++this.t; + this.clamp(); + } + function bnpDAddOffset(n, w) { + if (n == 0) return; + while (this.t <= w) this[this.t++] = 0; + this[w] += n; + while (this[w] >= this.DV) { + this[w] -= this.DV; + if (++w >= this.t) this[this.t++] = 0; + ++this[w]; + } + } + function NullExp() { + } + function nNop(x) { + return x; + } + function nMulTo(x, y, r) { + x.multiplyTo(y, r); + } + function nSqrTo(x, r) { + x.squareTo(r); + } + NullExp.prototype.convert = nNop; + NullExp.prototype.revert = nNop; + NullExp.prototype.mulTo = nMulTo; + NullExp.prototype.sqrTo = nSqrTo; + function bnPow(e) { + return this.exp(e, new NullExp()); + } + function bnpMultiplyLowerTo(a, n, r) { + var i2 = Math.min(this.t + a.t, n); + r.s = 0; + r.t = i2; + while (i2 > 0) r[--i2] = 0; + var j; + for (j = r.t - this.t; i2 < j; ++i2) r[i2 + this.t] = this.am(0, a[i2], r, i2, 0, this.t); + for (j = Math.min(a.t, n); i2 < j; ++i2) this.am(0, a[i2], r, i2, 0, n - i2); + r.clamp(); + } + function bnpMultiplyUpperTo(a, n, r) { + --n; + var i2 = r.t = this.t + a.t - n; + r.s = 0; + while (--i2 >= 0) r[i2] = 0; + for (i2 = Math.max(n - this.t, 0); i2 < a.t; ++i2) + r[this.t + i2 - n] = this.am(n - i2, a[i2], r, 0, 0, this.t + i2 - n); + r.clamp(); + r.drShiftTo(1, r); + } + function Barrett(m) { + this.r2 = nbi(); + this.q3 = nbi(); + BigInteger.ONE.dlShiftTo(2 * m.t, this.r2); + this.mu = this.r2.divide(m); + this.m = m; + } + function barrettConvert(x) { + if (x.s < 0 || x.t > 2 * this.m.t) return x.mod(this.m); + else if (x.compareTo(this.m) < 0) return x; + else { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; + } + } + function barrettRevert(x) { + return x; + } + function barrettReduce(x) { + x.drShiftTo(this.m.t - 1, this.r2); + if (x.t > this.m.t + 1) { + x.t = this.m.t + 1; + x.clamp(); + } + this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3); + this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); + while (x.compareTo(this.r2) < 0) x.dAddOffset(1, this.m.t + 1); + x.subTo(this.r2, x); + while (x.compareTo(this.m) >= 0) x.subTo(this.m, x); + } + function barrettSqrTo(x, r) { + x.squareTo(r); + this.reduce(r); + } + function barrettMulTo(x, y, r) { + x.multiplyTo(y, r); + this.reduce(r); + } + Barrett.prototype.convert = barrettConvert; + Barrett.prototype.revert = barrettRevert; + Barrett.prototype.reduce = barrettReduce; + Barrett.prototype.mulTo = barrettMulTo; + Barrett.prototype.sqrTo = barrettSqrTo; + function bnModPow(e, m) { + var i2 = e.bitLength(), k, r = nbv(1), z3; + if (i2 <= 0) return r; + else if (i2 < 18) k = 1; + else if (i2 < 48) k = 3; + else if (i2 < 144) k = 4; + else if (i2 < 768) k = 5; + else k = 6; + if (i2 < 8) + z3 = new Classic(m); + else if (m.isEven()) + z3 = new Barrett(m); + else + z3 = new Montgomery(m); + var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1; + g[1] = z3.convert(this); + if (k > 1) { + var g2 = nbi(); + z3.sqrTo(g[1], g2); + while (n <= km) { + g[n] = nbi(); + z3.mulTo(g2, g[n - 2], g[n]); + n += 2; + } + } + var j = e.t - 1, w, is1 = true, r2 = nbi(), t2; + i2 = nbits(e[j]) - 1; + while (j >= 0) { + if (i2 >= k1) w = e[j] >> i2 - k1 & km; + else { + w = (e[j] & (1 << i2 + 1) - 1) << k1 - i2; + if (j > 0) w |= e[j - 1] >> this.DB + i2 - k1; + } + n = k; + while ((w & 1) == 0) { + w >>= 1; + --n; + } + if ((i2 -= n) < 0) { + i2 += this.DB; + --j; + } + if (is1) { + g[w].copyTo(r); + is1 = false; + } else { + while (n > 1) { + z3.sqrTo(r, r2); + z3.sqrTo(r2, r); + n -= 2; + } + if (n > 0) z3.sqrTo(r, r2); + else { + t2 = r; + r = r2; + r2 = t2; + } + z3.mulTo(r2, g[w], r); + } + while (j >= 0 && (e[j] & 1 << i2) == 0) { + z3.sqrTo(r, r2); + t2 = r; + r = r2; + r2 = t2; + if (--i2 < 0) { + i2 = this.DB - 1; + --j; + } + } + } + return z3.revert(r); + } + function bnGCD(a) { + var x = this.s < 0 ? this.negate() : this.clone(); + var y = a.s < 0 ? a.negate() : a.clone(); + if (x.compareTo(y) < 0) { + var t2 = x; + x = y; + y = t2; + } + var i2 = x.getLowestSetBit(), g = y.getLowestSetBit(); + if (g < 0) return x; + if (i2 < g) g = i2; + if (g > 0) { + x.rShiftTo(g, x); + y.rShiftTo(g, y); + } + while (x.signum() > 0) { + if ((i2 = x.getLowestSetBit()) > 0) x.rShiftTo(i2, x); + if ((i2 = y.getLowestSetBit()) > 0) y.rShiftTo(i2, y); + if (x.compareTo(y) >= 0) { + x.subTo(y, x); + x.rShiftTo(1, x); + } else { + y.subTo(x, y); + y.rShiftTo(1, y); + } + } + if (g > 0) y.lShiftTo(g, y); + return y; + } + function bnpModInt(n) { + if (n <= 0) return 0; + var d = this.DV % n, r = this.s < 0 ? n - 1 : 0; + if (this.t > 0) + if (d == 0) r = this[0] % n; + else for (var i2 = this.t - 1; i2 >= 0; --i2) r = (d * r + this[i2]) % n; + return r; + } + function bnModInverse(m) { + var ac = m.isEven(); + if (this.isEven() && ac || m.signum() == 0) return BigInteger.ZERO; + var u = m.clone(), v = this.clone(); + var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); + while (u.signum() != 0) { + while (u.isEven()) { + u.rShiftTo(1, u); + if (ac) { + if (!a.isEven() || !b.isEven()) { + a.addTo(this, a); + b.subTo(m, b); + } + a.rShiftTo(1, a); + } else if (!b.isEven()) b.subTo(m, b); + b.rShiftTo(1, b); + } + while (v.isEven()) { + v.rShiftTo(1, v); + if (ac) { + if (!c.isEven() || !d.isEven()) { + c.addTo(this, c); + d.subTo(m, d); + } + c.rShiftTo(1, c); + } else if (!d.isEven()) d.subTo(m, d); + d.rShiftTo(1, d); + } + if (u.compareTo(v) >= 0) { + u.subTo(v, u); + if (ac) a.subTo(c, a); + b.subTo(d, b); + } else { + v.subTo(u, v); + if (ac) c.subTo(a, c); + d.subTo(b, d); + } + } + if (v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; + if (d.compareTo(m) >= 0) return d.subtract(m); + if (d.signum() < 0) d.addTo(m, d); + else return d; + if (d.signum() < 0) return d.add(m); + else return d; + } + var lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]; + var lplim = (1 << 26) / lowprimes[lowprimes.length - 1]; + function bnIsProbablePrime(t2) { + var i2, x = this.abs(); + if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) { + for (i2 = 0; i2 < lowprimes.length; ++i2) + if (x[0] == lowprimes[i2]) return true; + return false; + } + if (x.isEven()) return false; + i2 = 1; + while (i2 < lowprimes.length) { + var m = lowprimes[i2], j = i2 + 1; + while (j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while (i2 < j) if (m % lowprimes[i2++] == 0) return false; + } + return x.millerRabin(t2); + } + function bnpMillerRabin(t2) { + var n1 = this.subtract(BigInteger.ONE); + var k = n1.getLowestSetBit(); + if (k <= 0) return false; + var r = n1.shiftRight(k); + t2 = t2 + 1 >> 1; + if (t2 > lowprimes.length) t2 = lowprimes.length; + var a = nbi(); + for (var i2 = 0; i2 < t2; ++i2) { + a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]); + var y = a.modPow(r, this); + if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while (j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2, this); + if (y.compareTo(BigInteger.ONE) == 0) return false; + } + if (y.compareTo(n1) != 0) return false; + } + } + return true; + } + BigInteger.prototype.chunkSize = bnpChunkSize; + BigInteger.prototype.toRadix = bnpToRadix; + BigInteger.prototype.fromRadix = bnpFromRadix; + BigInteger.prototype.fromNumber = bnpFromNumber; + BigInteger.prototype.bitwiseTo = bnpBitwiseTo; + BigInteger.prototype.changeBit = bnpChangeBit; + BigInteger.prototype.addTo = bnpAddTo; + BigInteger.prototype.dMultiply = bnpDMultiply; + BigInteger.prototype.dAddOffset = bnpDAddOffset; + BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; + BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; + BigInteger.prototype.modInt = bnpModInt; + BigInteger.prototype.millerRabin = bnpMillerRabin; + BigInteger.prototype.clone = bnClone; + BigInteger.prototype.intValue = bnIntValue; + BigInteger.prototype.byteValue = bnByteValue; + BigInteger.prototype.shortValue = bnShortValue; + BigInteger.prototype.signum = bnSigNum; + BigInteger.prototype.toByteArray = bnToByteArray; + BigInteger.prototype.equals = bnEquals; + BigInteger.prototype.min = bnMin; + BigInteger.prototype.max = bnMax; + BigInteger.prototype.and = bnAnd; + BigInteger.prototype.or = bnOr; + BigInteger.prototype.xor = bnXor; + BigInteger.prototype.andNot = bnAndNot; + BigInteger.prototype.not = bnNot; + BigInteger.prototype.shiftLeft = bnShiftLeft; + BigInteger.prototype.shiftRight = bnShiftRight; + BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; + BigInteger.prototype.bitCount = bnBitCount; + BigInteger.prototype.testBit = bnTestBit; + BigInteger.prototype.setBit = bnSetBit; + BigInteger.prototype.clearBit = bnClearBit; + BigInteger.prototype.flipBit = bnFlipBit; + BigInteger.prototype.add = bnAdd; + BigInteger.prototype.subtract = bnSubtract; + BigInteger.prototype.multiply = bnMultiply; + BigInteger.prototype.divide = bnDivide; + BigInteger.prototype.remainder = bnRemainder; + BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; + BigInteger.prototype.modPow = bnModPow; + BigInteger.prototype.modInverse = bnModInverse; + BigInteger.prototype.pow = bnPow; + BigInteger.prototype.gcd = bnGCD; + BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + BigInteger.prototype.square = bnSquare; + BigInteger.prototype.Barrett = Barrett; + var rng_state; + var rng_pool; + var rng_pptr; + function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= x >> 8 & 255; + rng_pool[rng_pptr++] ^= x >> 16 & 255; + rng_pool[rng_pptr++] ^= x >> 24 & 255; + if (rng_pptr >= rng_psize) rng_pptr -= rng_psize; + } + function rng_seed_time() { + rng_seed_int((/* @__PURE__ */ new Date()).getTime()); + } + if (rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + if (typeof window !== "undefined" && window.crypto) { + if (window.crypto.getRandomValues) { + var ua = new Uint8Array(32); + window.crypto.getRandomValues(ua); + for (t = 0; t < 32; ++t) + rng_pool[rng_pptr++] = ua[t]; + } else if (navigator.appName == "Netscape" && navigator.appVersion < "5") { + var z2 = window.crypto.random(32); + for (t = 0; t < z2.length; ++t) + rng_pool[rng_pptr++] = z2.charCodeAt(t) & 255; + } + } + while (rng_pptr < rng_psize) { + t = Math.floor(65536 * Math.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + } + function rng_get_byte() { + if (rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + } + return rng_state.next(); + } + function rng_get_bytes(ba) { + var i2; + for (i2 = 0; i2 < ba.length; ++i2) ba[i2] = rng_get_byte(); + } + function SecureRandom2() { + } + SecureRandom2.prototype.nextBytes = rng_get_bytes; + function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); + } + function ARC4init(key) { + var i2, j, t2; + for (i2 = 0; i2 < 256; ++i2) + this.S[i2] = i2; + j = 0; + for (i2 = 0; i2 < 256; ++i2) { + j = j + this.S[i2] + key[i2 % key.length] & 255; + t2 = this.S[i2]; + this.S[i2] = this.S[j]; + this.S[j] = t2; + } + this.i = 0; + this.j = 0; + } + function ARC4next() { + var t2; + this.i = this.i + 1 & 255; + this.j = this.j + this.S[this.i] & 255; + t2 = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t2; + return this.S[t2 + this.S[this.i] & 255]; + } + Arcfour.prototype.init = ARC4init; + Arcfour.prototype.next = ARC4next; + function prng_newstate() { + return new Arcfour(); + } + var rng_psize = 256; + BigInteger.SecureRandom = SecureRandom2; + BigInteger.BigInteger = BigInteger; + if (typeof exports2 !== "undefined") { + exports2 = module2.exports = BigInteger; + } else { + this.BigInteger = BigInteger; + this.SecureRandom = SecureRandom2; + } + }).call(exports2); + } +}); + +// node_modules/ecc-jsbn/lib/ec.js +var require_ec = __commonJS({ + "node_modules/ecc-jsbn/lib/ec.js"(exports2, module2) { + var BigInteger = require_jsbn().BigInteger; + var Barrett = BigInteger.prototype.Barrett; + function ECFieldElementFp(q2, x) { + this.x = x; + this.q = q2; + } + function feFpEquals(other) { + if (other == this) return true; + return this.q.equals(other.q) && this.x.equals(other.x); + } + function feFpToBigInteger() { + return this.x; + } + function feFpNegate() { + return new ECFieldElementFp(this.q, this.x.negate().mod(this.q)); + } + function feFpAdd(b) { + return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q)); + } + function feFpSubtract(b) { + return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q)); + } + function feFpMultiply(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q)); + } + function feFpSquare() { + return new ECFieldElementFp(this.q, this.x.square().mod(this.q)); + } + function feFpDivide(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q)); + } + ECFieldElementFp.prototype.equals = feFpEquals; + ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger; + ECFieldElementFp.prototype.negate = feFpNegate; + ECFieldElementFp.prototype.add = feFpAdd; + ECFieldElementFp.prototype.subtract = feFpSubtract; + ECFieldElementFp.prototype.multiply = feFpMultiply; + ECFieldElementFp.prototype.square = feFpSquare; + ECFieldElementFp.prototype.divide = feFpDivide; + function ECPointFp(curve, x, y, z2) { + this.curve = curve; + this.x = x; + this.y = y; + if (z2 == null) { + this.z = BigInteger.ONE; + } else { + this.z = z2; + } + this.zinv = null; + } + function pointFpGetX() { + if (this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.x.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); + } + function pointFpGetY() { + if (this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.y.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); + } + function pointFpEquals(other) { + if (other == this) return true; + if (this.isInfinity()) return other.isInfinity(); + if (other.isInfinity()) return this.isInfinity(); + var u, v; + u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q); + if (!u.equals(BigInteger.ZERO)) return false; + v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q); + return v.equals(BigInteger.ZERO); + } + function pointFpIsInfinity() { + if (this.x == null && this.y == null) return true; + return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO); + } + function pointFpNegate() { + return new ECPointFp(this.curve, this.x, this.y.negate(), this.z); + } + function pointFpAdd(b) { + if (this.isInfinity()) return b; + if (b.isInfinity()) return this; + var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q); + var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q); + if (BigInteger.ZERO.equals(v)) { + if (BigInteger.ZERO.equals(u)) { + return this.twice(); + } + return this.curve.getInfinity(); + } + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + var x2 = b.x.toBigInteger(); + var y2 = b.y.toBigInteger(); + var v2 = v.square(); + var v3 = v2.multiply(v); + var x1v2 = x1.multiply(v2); + var zu2 = u.square().multiply(this.z); + var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q); + var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q); + var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q); + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); + } + function pointFpTwice() { + if (this.isInfinity()) return this; + if (this.y.toBigInteger().signum() == 0) return this.curve.getInfinity(); + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + var y1z1 = y1.multiply(this.z); + var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q); + var a = this.curve.a.toBigInteger(); + var w = x1.square().multiply(THREE); + if (!BigInteger.ZERO.equals(a)) { + w = w.add(this.z.square().multiply(a)); + } + w = w.mod(this.curve.q); + var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q); + var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q); + var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q); + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); + } + function pointFpMultiply(k) { + if (this.isInfinity()) return this; + if (k.signum() == 0) return this.curve.getInfinity(); + var e = k; + var h = e.multiply(new BigInteger("3")); + var neg = this.negate(); + var R = this; + var i2; + for (i2 = h.bitLength() - 2; i2 > 0; --i2) { + R = R.twice(); + var hBit = h.testBit(i2); + var eBit = e.testBit(i2); + if (hBit != eBit) { + R = R.add(hBit ? this : neg); + } + } + return R; + } + function pointFpMultiplyTwo(j, x, k) { + var i2; + if (j.bitLength() > k.bitLength()) + i2 = j.bitLength() - 1; + else + i2 = k.bitLength() - 1; + var R = this.curve.getInfinity(); + var both = this.add(x); + while (i2 >= 0) { + R = R.twice(); + if (j.testBit(i2)) { + if (k.testBit(i2)) { + R = R.add(both); + } else { + R = R.add(this); + } + } else { + if (k.testBit(i2)) { + R = R.add(x); + } + } + --i2; + } + return R; + } + ECPointFp.prototype.getX = pointFpGetX; + ECPointFp.prototype.getY = pointFpGetY; + ECPointFp.prototype.equals = pointFpEquals; + ECPointFp.prototype.isInfinity = pointFpIsInfinity; + ECPointFp.prototype.negate = pointFpNegate; + ECPointFp.prototype.add = pointFpAdd; + ECPointFp.prototype.twice = pointFpTwice; + ECPointFp.prototype.multiply = pointFpMultiply; + ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo; + function ECCurveFp(q2, a, b) { + this.q = q2; + this.a = this.fromBigInteger(a); + this.b = this.fromBigInteger(b); + this.infinity = new ECPointFp(this, null, null); + this.reducer = new Barrett(this.q); + } + function curveFpGetQ() { + return this.q; + } + function curveFpGetA() { + return this.a; + } + function curveFpGetB() { + return this.b; + } + function curveFpEquals(other) { + if (other == this) return true; + return this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b); + } + function curveFpGetInfinity() { + return this.infinity; + } + function curveFpFromBigInteger(x) { + return new ECFieldElementFp(this.q, x); + } + function curveReduce(x) { + this.reducer.reduce(x); + } + function curveFpEncodePointHex(p) { + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var yHex = p.getY().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if (oLen % 2 != 0) oLen++; + while (xHex.length < oLen) { + xHex = "0" + xHex; + } + while (yHex.length < oLen) { + yHex = "0" + yHex; + } + return "04" + xHex + yHex; + } + ECCurveFp.prototype.getQ = curveFpGetQ; + ECCurveFp.prototype.getA = curveFpGetA; + ECCurveFp.prototype.getB = curveFpGetB; + ECCurveFp.prototype.equals = curveFpEquals; + ECCurveFp.prototype.getInfinity = curveFpGetInfinity; + ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger; + ECCurveFp.prototype.reduce = curveReduce; + ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex; + ECCurveFp.prototype.decodePointHex = function(s) { + var yIsEven; + switch (parseInt(s.substr(0, 2), 16)) { + // first byte + case 0: + return this.infinity; + case 2: + yIsEven = false; + case 3: + if (yIsEven == void 0) yIsEven = true; + var len = s.length - 2; + var xHex = s.substr(2, len); + var x = this.fromBigInteger(new BigInteger(xHex, 16)); + var alpha = x.multiply(x.square().add(this.getA())).add(this.getB()); + var beta = alpha.sqrt(); + if (beta == null) throw "Invalid point compression"; + var betaValue = beta.toBigInteger(); + if (betaValue.testBit(0) != yIsEven) { + beta = this.fromBigInteger(this.getQ().subtract(betaValue)); + } + return new ECPointFp(this, x, beta); + case 4: + case 6: + case 7: + var len = (s.length - 2) / 2; + var xHex = s.substr(2, len); + var yHex = s.substr(len + 2, len); + return new ECPointFp( + this, + this.fromBigInteger(new BigInteger(xHex, 16)), + this.fromBigInteger(new BigInteger(yHex, 16)) + ); + default: + return null; + } + }; + ECCurveFp.prototype.encodeCompressedPointHex = function(p) { + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if (oLen % 2 != 0) oLen++; + while (xHex.length < oLen) + xHex = "0" + xHex; + var yPrefix; + if (p.getY().toBigInteger().isEven()) yPrefix = "02"; + else yPrefix = "03"; + return yPrefix + xHex; + }; + ECFieldElementFp.prototype.getR = function() { + if (this.r != void 0) return this.r; + this.r = null; + var bitLength = this.q.bitLength(); + if (bitLength > 128) { + var firstWord = this.q.shiftRight(bitLength - 64); + if (firstWord.intValue() == -1) { + this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q); + } + } + return this.r; + }; + ECFieldElementFp.prototype.modMult = function(x1, x2) { + return this.modReduce(x1.multiply(x2)); + }; + ECFieldElementFp.prototype.modReduce = function(x) { + if (this.getR() != null) { + var qLen = q.bitLength(); + while (x.bitLength() > qLen + 1) { + var u = x.shiftRight(qLen); + var v = x.subtract(u.shiftLeft(qLen)); + if (!this.getR().equals(BigInteger.ONE)) { + u = u.multiply(this.getR()); + } + x = u.add(v); + } + while (x.compareTo(q) >= 0) { + x = x.subtract(q); + } + } else { + x = x.mod(q); + } + return x; + }; + ECFieldElementFp.prototype.sqrt = function() { + if (!this.q.testBit(0)) throw "unsupported"; + if (this.q.testBit(1)) { + var z2 = new ECFieldElementFp(this.q, this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE), this.q)); + return z2.square().equals(this) ? z2 : null; + } + var qMinusOne = this.q.subtract(BigInteger.ONE); + var legendreExponent = qMinusOne.shiftRight(1); + if (!this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE)) { + return null; + } + var u = qMinusOne.shiftRight(2); + var k = u.shiftLeft(1).add(BigInteger.ONE); + var Q = this.x; + var fourQ = modDouble(modDouble(Q)); + var U, V2; + do { + var P; + do { + P = new BigInteger(this.q.bitLength(), new SecureRandom()); + } while (P.compareTo(this.q) >= 0 || !P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne)); + var result = this.lucasSequence(P, Q, k); + U = result[0]; + V2 = result[1]; + if (this.modMult(V2, V2).equals(fourQ)) { + if (V2.testBit(0)) { + V2 = V2.add(q); + } + V2 = V2.shiftRight(1); + return new ECFieldElementFp(q, V2); + } + } while (U.equals(BigInteger.ONE) || U.equals(qMinusOne)); + return null; + }; + ECFieldElementFp.prototype.lucasSequence = function(P, Q, k) { + var n = k.bitLength(); + var s = k.getLowestSetBit(); + var Uh = BigInteger.ONE; + var Vl = BigInteger.TWO; + var Vh = P; + var Ql = BigInteger.ONE; + var Qh = BigInteger.ONE; + for (var j = n - 1; j >= s + 1; --j) { + Ql = this.modMult(Ql, Qh); + if (k.testBit(j)) { + Qh = this.modMult(Ql, Q); + Uh = this.modMult(Uh, Vh); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1))); + } else { + Qh = Ql; + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + } + } + Ql = this.modMult(Ql, Qh); + Qh = this.modMult(Ql, Q); + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Ql = this.modMult(Ql, Qh); + for (var j = 1; j <= s; ++j) { + Uh = this.modMult(Uh, Vl); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + Ql = this.modMult(Ql, Ql); + } + return [Uh, Vl]; + }; + var exports2 = { + ECCurveFp, + ECPointFp, + ECFieldElementFp + }; + module2.exports = exports2; + } +}); + +// node_modules/tweetnacl/nacl-fast.js +var require_nacl_fast = __commonJS({ + "node_modules/tweetnacl/nacl-fast.js"(exports2, module2) { + (function(nacl) { + "use strict"; + var gf = function(init) { + var i2, r = new Float64Array(16); + if (init) for (i2 = 0; i2 < init.length; i2++) r[i2] = init[i2]; + return r; + }; + var randombytes = function() { + throw new Error("no PRNG"); + }; + var _0 = new Uint8Array(16); + var _9 = new Uint8Array(32); + _9[0] = 9; + var gf0 = gf(), gf1 = gf([1]), _121665 = gf([56129, 1]), D = gf([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), D2 = gf([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), X = gf([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), Y = gf([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), I = gf([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]); + function ts64(x, i2, h, l) { + x[i2] = h >> 24 & 255; + x[i2 + 1] = h >> 16 & 255; + x[i2 + 2] = h >> 8 & 255; + x[i2 + 3] = h & 255; + x[i2 + 4] = l >> 24 & 255; + x[i2 + 5] = l >> 16 & 255; + x[i2 + 6] = l >> 8 & 255; + x[i2 + 7] = l & 255; + } + function vn(x, xi, y, yi, n) { + var i2, d = 0; + for (i2 = 0; i2 < n; i2++) d |= x[xi + i2] ^ y[yi + i2]; + return (1 & d - 1 >>> 8) - 1; + } + function crypto_verify_16(x, xi, y, yi) { + return vn(x, xi, y, yi, 16); + } + function crypto_verify_32(x, xi, y, yi) { + return vn(x, xi, y, yi, 32); + } + function core_salsa20(o, p, k, c) { + var j0 = c[0] & 255 | (c[1] & 255) << 8 | (c[2] & 255) << 16 | (c[3] & 255) << 24, j1 = k[0] & 255 | (k[1] & 255) << 8 | (k[2] & 255) << 16 | (k[3] & 255) << 24, j2 = k[4] & 255 | (k[5] & 255) << 8 | (k[6] & 255) << 16 | (k[7] & 255) << 24, j3 = k[8] & 255 | (k[9] & 255) << 8 | (k[10] & 255) << 16 | (k[11] & 255) << 24, j4 = k[12] & 255 | (k[13] & 255) << 8 | (k[14] & 255) << 16 | (k[15] & 255) << 24, j5 = c[4] & 255 | (c[5] & 255) << 8 | (c[6] & 255) << 16 | (c[7] & 255) << 24, j6 = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, j7 = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, j8 = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, j9 = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, j10 = c[8] & 255 | (c[9] & 255) << 8 | (c[10] & 255) << 16 | (c[11] & 255) << 24, j11 = k[16] & 255 | (k[17] & 255) << 8 | (k[18] & 255) << 16 | (k[19] & 255) << 24, j12 = k[20] & 255 | (k[21] & 255) << 8 | (k[22] & 255) << 16 | (k[23] & 255) << 24, j13 = k[24] & 255 | (k[25] & 255) << 8 | (k[26] & 255) << 16 | (k[27] & 255) << 24, j14 = k[28] & 255 | (k[29] & 255) << 8 | (k[30] & 255) << 16 | (k[31] & 255) << 24, j15 = c[12] & 255 | (c[13] & 255) << 8 | (c[14] & 255) << 16 | (c[15] & 255) << 24; + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, x15 = j15, u; + for (var i2 = 0; i2 < 20; i2 += 2) { + u = x0 + x12 | 0; + x4 ^= u << 7 | u >>> 32 - 7; + u = x4 + x0 | 0; + x8 ^= u << 9 | u >>> 32 - 9; + u = x8 + x4 | 0; + x12 ^= u << 13 | u >>> 32 - 13; + u = x12 + x8 | 0; + x0 ^= u << 18 | u >>> 32 - 18; + u = x5 + x1 | 0; + x9 ^= u << 7 | u >>> 32 - 7; + u = x9 + x5 | 0; + x13 ^= u << 9 | u >>> 32 - 9; + u = x13 + x9 | 0; + x1 ^= u << 13 | u >>> 32 - 13; + u = x1 + x13 | 0; + x5 ^= u << 18 | u >>> 32 - 18; + u = x10 + x6 | 0; + x14 ^= u << 7 | u >>> 32 - 7; + u = x14 + x10 | 0; + x2 ^= u << 9 | u >>> 32 - 9; + u = x2 + x14 | 0; + x6 ^= u << 13 | u >>> 32 - 13; + u = x6 + x2 | 0; + x10 ^= u << 18 | u >>> 32 - 18; + u = x15 + x11 | 0; + x3 ^= u << 7 | u >>> 32 - 7; + u = x3 + x15 | 0; + x7 ^= u << 9 | u >>> 32 - 9; + u = x7 + x3 | 0; + x11 ^= u << 13 | u >>> 32 - 13; + u = x11 + x7 | 0; + x15 ^= u << 18 | u >>> 32 - 18; + u = x0 + x3 | 0; + x1 ^= u << 7 | u >>> 32 - 7; + u = x1 + x0 | 0; + x2 ^= u << 9 | u >>> 32 - 9; + u = x2 + x1 | 0; + x3 ^= u << 13 | u >>> 32 - 13; + u = x3 + x2 | 0; + x0 ^= u << 18 | u >>> 32 - 18; + u = x5 + x4 | 0; + x6 ^= u << 7 | u >>> 32 - 7; + u = x6 + x5 | 0; + x7 ^= u << 9 | u >>> 32 - 9; + u = x7 + x6 | 0; + x4 ^= u << 13 | u >>> 32 - 13; + u = x4 + x7 | 0; + x5 ^= u << 18 | u >>> 32 - 18; + u = x10 + x9 | 0; + x11 ^= u << 7 | u >>> 32 - 7; + u = x11 + x10 | 0; + x8 ^= u << 9 | u >>> 32 - 9; + u = x8 + x11 | 0; + x9 ^= u << 13 | u >>> 32 - 13; + u = x9 + x8 | 0; + x10 ^= u << 18 | u >>> 32 - 18; + u = x15 + x14 | 0; + x12 ^= u << 7 | u >>> 32 - 7; + u = x12 + x15 | 0; + x13 ^= u << 9 | u >>> 32 - 9; + u = x13 + x12 | 0; + x14 ^= u << 13 | u >>> 32 - 13; + u = x14 + x13 | 0; + x15 ^= u << 18 | u >>> 32 - 18; + } + x0 = x0 + j0 | 0; + x1 = x1 + j1 | 0; + x2 = x2 + j2 | 0; + x3 = x3 + j3 | 0; + x4 = x4 + j4 | 0; + x5 = x5 + j5 | 0; + x6 = x6 + j6 | 0; + x7 = x7 + j7 | 0; + x8 = x8 + j8 | 0; + x9 = x9 + j9 | 0; + x10 = x10 + j10 | 0; + x11 = x11 + j11 | 0; + x12 = x12 + j12 | 0; + x13 = x13 + j13 | 0; + x14 = x14 + j14 | 0; + x15 = x15 + j15 | 0; + o[0] = x0 >>> 0 & 255; + o[1] = x0 >>> 8 & 255; + o[2] = x0 >>> 16 & 255; + o[3] = x0 >>> 24 & 255; + o[4] = x1 >>> 0 & 255; + o[5] = x1 >>> 8 & 255; + o[6] = x1 >>> 16 & 255; + o[7] = x1 >>> 24 & 255; + o[8] = x2 >>> 0 & 255; + o[9] = x2 >>> 8 & 255; + o[10] = x2 >>> 16 & 255; + o[11] = x2 >>> 24 & 255; + o[12] = x3 >>> 0 & 255; + o[13] = x3 >>> 8 & 255; + o[14] = x3 >>> 16 & 255; + o[15] = x3 >>> 24 & 255; + o[16] = x4 >>> 0 & 255; + o[17] = x4 >>> 8 & 255; + o[18] = x4 >>> 16 & 255; + o[19] = x4 >>> 24 & 255; + o[20] = x5 >>> 0 & 255; + o[21] = x5 >>> 8 & 255; + o[22] = x5 >>> 16 & 255; + o[23] = x5 >>> 24 & 255; + o[24] = x6 >>> 0 & 255; + o[25] = x6 >>> 8 & 255; + o[26] = x6 >>> 16 & 255; + o[27] = x6 >>> 24 & 255; + o[28] = x7 >>> 0 & 255; + o[29] = x7 >>> 8 & 255; + o[30] = x7 >>> 16 & 255; + o[31] = x7 >>> 24 & 255; + o[32] = x8 >>> 0 & 255; + o[33] = x8 >>> 8 & 255; + o[34] = x8 >>> 16 & 255; + o[35] = x8 >>> 24 & 255; + o[36] = x9 >>> 0 & 255; + o[37] = x9 >>> 8 & 255; + o[38] = x9 >>> 16 & 255; + o[39] = x9 >>> 24 & 255; + o[40] = x10 >>> 0 & 255; + o[41] = x10 >>> 8 & 255; + o[42] = x10 >>> 16 & 255; + o[43] = x10 >>> 24 & 255; + o[44] = x11 >>> 0 & 255; + o[45] = x11 >>> 8 & 255; + o[46] = x11 >>> 16 & 255; + o[47] = x11 >>> 24 & 255; + o[48] = x12 >>> 0 & 255; + o[49] = x12 >>> 8 & 255; + o[50] = x12 >>> 16 & 255; + o[51] = x12 >>> 24 & 255; + o[52] = x13 >>> 0 & 255; + o[53] = x13 >>> 8 & 255; + o[54] = x13 >>> 16 & 255; + o[55] = x13 >>> 24 & 255; + o[56] = x14 >>> 0 & 255; + o[57] = x14 >>> 8 & 255; + o[58] = x14 >>> 16 & 255; + o[59] = x14 >>> 24 & 255; + o[60] = x15 >>> 0 & 255; + o[61] = x15 >>> 8 & 255; + o[62] = x15 >>> 16 & 255; + o[63] = x15 >>> 24 & 255; + } + function core_hsalsa20(o, p, k, c) { + var j0 = c[0] & 255 | (c[1] & 255) << 8 | (c[2] & 255) << 16 | (c[3] & 255) << 24, j1 = k[0] & 255 | (k[1] & 255) << 8 | (k[2] & 255) << 16 | (k[3] & 255) << 24, j2 = k[4] & 255 | (k[5] & 255) << 8 | (k[6] & 255) << 16 | (k[7] & 255) << 24, j3 = k[8] & 255 | (k[9] & 255) << 8 | (k[10] & 255) << 16 | (k[11] & 255) << 24, j4 = k[12] & 255 | (k[13] & 255) << 8 | (k[14] & 255) << 16 | (k[15] & 255) << 24, j5 = c[4] & 255 | (c[5] & 255) << 8 | (c[6] & 255) << 16 | (c[7] & 255) << 24, j6 = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, j7 = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, j8 = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, j9 = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, j10 = c[8] & 255 | (c[9] & 255) << 8 | (c[10] & 255) << 16 | (c[11] & 255) << 24, j11 = k[16] & 255 | (k[17] & 255) << 8 | (k[18] & 255) << 16 | (k[19] & 255) << 24, j12 = k[20] & 255 | (k[21] & 255) << 8 | (k[22] & 255) << 16 | (k[23] & 255) << 24, j13 = k[24] & 255 | (k[25] & 255) << 8 | (k[26] & 255) << 16 | (k[27] & 255) << 24, j14 = k[28] & 255 | (k[29] & 255) << 8 | (k[30] & 255) << 16 | (k[31] & 255) << 24, j15 = c[12] & 255 | (c[13] & 255) << 8 | (c[14] & 255) << 16 | (c[15] & 255) << 24; + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, x15 = j15, u; + for (var i2 = 0; i2 < 20; i2 += 2) { + u = x0 + x12 | 0; + x4 ^= u << 7 | u >>> 32 - 7; + u = x4 + x0 | 0; + x8 ^= u << 9 | u >>> 32 - 9; + u = x8 + x4 | 0; + x12 ^= u << 13 | u >>> 32 - 13; + u = x12 + x8 | 0; + x0 ^= u << 18 | u >>> 32 - 18; + u = x5 + x1 | 0; + x9 ^= u << 7 | u >>> 32 - 7; + u = x9 + x5 | 0; + x13 ^= u << 9 | u >>> 32 - 9; + u = x13 + x9 | 0; + x1 ^= u << 13 | u >>> 32 - 13; + u = x1 + x13 | 0; + x5 ^= u << 18 | u >>> 32 - 18; + u = x10 + x6 | 0; + x14 ^= u << 7 | u >>> 32 - 7; + u = x14 + x10 | 0; + x2 ^= u << 9 | u >>> 32 - 9; + u = x2 + x14 | 0; + x6 ^= u << 13 | u >>> 32 - 13; + u = x6 + x2 | 0; + x10 ^= u << 18 | u >>> 32 - 18; + u = x15 + x11 | 0; + x3 ^= u << 7 | u >>> 32 - 7; + u = x3 + x15 | 0; + x7 ^= u << 9 | u >>> 32 - 9; + u = x7 + x3 | 0; + x11 ^= u << 13 | u >>> 32 - 13; + u = x11 + x7 | 0; + x15 ^= u << 18 | u >>> 32 - 18; + u = x0 + x3 | 0; + x1 ^= u << 7 | u >>> 32 - 7; + u = x1 + x0 | 0; + x2 ^= u << 9 | u >>> 32 - 9; + u = x2 + x1 | 0; + x3 ^= u << 13 | u >>> 32 - 13; + u = x3 + x2 | 0; + x0 ^= u << 18 | u >>> 32 - 18; + u = x5 + x4 | 0; + x6 ^= u << 7 | u >>> 32 - 7; + u = x6 + x5 | 0; + x7 ^= u << 9 | u >>> 32 - 9; + u = x7 + x6 | 0; + x4 ^= u << 13 | u >>> 32 - 13; + u = x4 + x7 | 0; + x5 ^= u << 18 | u >>> 32 - 18; + u = x10 + x9 | 0; + x11 ^= u << 7 | u >>> 32 - 7; + u = x11 + x10 | 0; + x8 ^= u << 9 | u >>> 32 - 9; + u = x8 + x11 | 0; + x9 ^= u << 13 | u >>> 32 - 13; + u = x9 + x8 | 0; + x10 ^= u << 18 | u >>> 32 - 18; + u = x15 + x14 | 0; + x12 ^= u << 7 | u >>> 32 - 7; + u = x12 + x15 | 0; + x13 ^= u << 9 | u >>> 32 - 9; + u = x13 + x12 | 0; + x14 ^= u << 13 | u >>> 32 - 13; + u = x14 + x13 | 0; + x15 ^= u << 18 | u >>> 32 - 18; + } + o[0] = x0 >>> 0 & 255; + o[1] = x0 >>> 8 & 255; + o[2] = x0 >>> 16 & 255; + o[3] = x0 >>> 24 & 255; + o[4] = x5 >>> 0 & 255; + o[5] = x5 >>> 8 & 255; + o[6] = x5 >>> 16 & 255; + o[7] = x5 >>> 24 & 255; + o[8] = x10 >>> 0 & 255; + o[9] = x10 >>> 8 & 255; + o[10] = x10 >>> 16 & 255; + o[11] = x10 >>> 24 & 255; + o[12] = x15 >>> 0 & 255; + o[13] = x15 >>> 8 & 255; + o[14] = x15 >>> 16 & 255; + o[15] = x15 >>> 24 & 255; + o[16] = x6 >>> 0 & 255; + o[17] = x6 >>> 8 & 255; + o[18] = x6 >>> 16 & 255; + o[19] = x6 >>> 24 & 255; + o[20] = x7 >>> 0 & 255; + o[21] = x7 >>> 8 & 255; + o[22] = x7 >>> 16 & 255; + o[23] = x7 >>> 24 & 255; + o[24] = x8 >>> 0 & 255; + o[25] = x8 >>> 8 & 255; + o[26] = x8 >>> 16 & 255; + o[27] = x8 >>> 24 & 255; + o[28] = x9 >>> 0 & 255; + o[29] = x9 >>> 8 & 255; + o[30] = x9 >>> 16 & 255; + o[31] = x9 >>> 24 & 255; + } + function crypto_core_salsa20(out, inp, k, c) { + core_salsa20(out, inp, k, c); + } + function crypto_core_hsalsa20(out, inp, k, c) { + core_hsalsa20(out, inp, k, c); + } + var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + function crypto_stream_salsa20_xor(c, cpos, m, mpos, b, n, k) { + var z2 = new Uint8Array(16), x = new Uint8Array(64); + var u, i2; + for (i2 = 0; i2 < 16; i2++) z2[i2] = 0; + for (i2 = 0; i2 < 8; i2++) z2[i2] = n[i2]; + while (b >= 64) { + crypto_core_salsa20(x, z2, k, sigma); + for (i2 = 0; i2 < 64; i2++) c[cpos + i2] = m[mpos + i2] ^ x[i2]; + u = 1; + for (i2 = 8; i2 < 16; i2++) { + u = u + (z2[i2] & 255) | 0; + z2[i2] = u & 255; + u >>>= 8; + } + b -= 64; + cpos += 64; + mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x, z2, k, sigma); + for (i2 = 0; i2 < b; i2++) c[cpos + i2] = m[mpos + i2] ^ x[i2]; + } + return 0; + } + function crypto_stream_salsa20(c, cpos, b, n, k) { + var z2 = new Uint8Array(16), x = new Uint8Array(64); + var u, i2; + for (i2 = 0; i2 < 16; i2++) z2[i2] = 0; + for (i2 = 0; i2 < 8; i2++) z2[i2] = n[i2]; + while (b >= 64) { + crypto_core_salsa20(x, z2, k, sigma); + for (i2 = 0; i2 < 64; i2++) c[cpos + i2] = x[i2]; + u = 1; + for (i2 = 8; i2 < 16; i2++) { + u = u + (z2[i2] & 255) | 0; + z2[i2] = u & 255; + u >>>= 8; + } + b -= 64; + cpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x, z2, k, sigma); + for (i2 = 0; i2 < b; i2++) c[cpos + i2] = x[i2]; + } + return 0; + } + function crypto_stream(c, cpos, d, n, k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s, n, k, sigma); + var sn = new Uint8Array(8); + for (var i2 = 0; i2 < 8; i2++) sn[i2] = n[i2 + 16]; + return crypto_stream_salsa20(c, cpos, d, sn, s); + } + function crypto_stream_xor(c, cpos, m, mpos, d, n, k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s, n, k, sigma); + var sn = new Uint8Array(8); + for (var i2 = 0; i2 < 8; i2++) sn[i2] = n[i2 + 16]; + return crypto_stream_salsa20_xor(c, cpos, m, mpos, d, sn, s); + } + var poly1305 = function(key) { + this.buffer = new Uint8Array(16); + this.r = new Uint16Array(10); + this.h = new Uint16Array(10); + this.pad = new Uint16Array(8); + this.leftover = 0; + this.fin = 0; + var t0, t1, t2, t3, t4, t5, t6, t7; + t0 = key[0] & 255 | (key[1] & 255) << 8; + this.r[0] = t0 & 8191; + t1 = key[2] & 255 | (key[3] & 255) << 8; + this.r[1] = (t0 >>> 13 | t1 << 3) & 8191; + t2 = key[4] & 255 | (key[5] & 255) << 8; + this.r[2] = (t1 >>> 10 | t2 << 6) & 7939; + t3 = key[6] & 255 | (key[7] & 255) << 8; + this.r[3] = (t2 >>> 7 | t3 << 9) & 8191; + t4 = key[8] & 255 | (key[9] & 255) << 8; + this.r[4] = (t3 >>> 4 | t4 << 12) & 255; + this.r[5] = t4 >>> 1 & 8190; + t5 = key[10] & 255 | (key[11] & 255) << 8; + this.r[6] = (t4 >>> 14 | t5 << 2) & 8191; + t6 = key[12] & 255 | (key[13] & 255) << 8; + this.r[7] = (t5 >>> 11 | t6 << 5) & 8065; + t7 = key[14] & 255 | (key[15] & 255) << 8; + this.r[8] = (t6 >>> 8 | t7 << 8) & 8191; + this.r[9] = t7 >>> 5 & 127; + this.pad[0] = key[16] & 255 | (key[17] & 255) << 8; + this.pad[1] = key[18] & 255 | (key[19] & 255) << 8; + this.pad[2] = key[20] & 255 | (key[21] & 255) << 8; + this.pad[3] = key[22] & 255 | (key[23] & 255) << 8; + this.pad[4] = key[24] & 255 | (key[25] & 255) << 8; + this.pad[5] = key[26] & 255 | (key[27] & 255) << 8; + this.pad[6] = key[28] & 255 | (key[29] & 255) << 8; + this.pad[7] = key[30] & 255 | (key[31] & 255) << 8; + }; + poly1305.prototype.blocks = function(m, mpos, bytes) { + var hibit = this.fin ? 0 : 1 << 11; + var t0, t1, t2, t3, t4, t5, t6, t7, c; + var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; + var h0 = this.h[0], h1 = this.h[1], h2 = this.h[2], h3 = this.h[3], h4 = this.h[4], h5 = this.h[5], h6 = this.h[6], h7 = this.h[7], h8 = this.h[8], h9 = this.h[9]; + var r0 = this.r[0], r1 = this.r[1], r2 = this.r[2], r3 = this.r[3], r4 = this.r[4], r5 = this.r[5], r6 = this.r[6], r7 = this.r[7], r8 = this.r[8], r9 = this.r[9]; + while (bytes >= 16) { + t0 = m[mpos + 0] & 255 | (m[mpos + 1] & 255) << 8; + h0 += t0 & 8191; + t1 = m[mpos + 2] & 255 | (m[mpos + 3] & 255) << 8; + h1 += (t0 >>> 13 | t1 << 3) & 8191; + t2 = m[mpos + 4] & 255 | (m[mpos + 5] & 255) << 8; + h2 += (t1 >>> 10 | t2 << 6) & 8191; + t3 = m[mpos + 6] & 255 | (m[mpos + 7] & 255) << 8; + h3 += (t2 >>> 7 | t3 << 9) & 8191; + t4 = m[mpos + 8] & 255 | (m[mpos + 9] & 255) << 8; + h4 += (t3 >>> 4 | t4 << 12) & 8191; + h5 += t4 >>> 1 & 8191; + t5 = m[mpos + 10] & 255 | (m[mpos + 11] & 255) << 8; + h6 += (t4 >>> 14 | t5 << 2) & 8191; + t6 = m[mpos + 12] & 255 | (m[mpos + 13] & 255) << 8; + h7 += (t5 >>> 11 | t6 << 5) & 8191; + t7 = m[mpos + 14] & 255 | (m[mpos + 15] & 255) << 8; + h8 += (t6 >>> 8 | t7 << 8) & 8191; + h9 += t7 >>> 5 | hibit; + c = 0; + d0 = c; + d0 += h0 * r0; + d0 += h1 * (5 * r9); + d0 += h2 * (5 * r8); + d0 += h3 * (5 * r7); + d0 += h4 * (5 * r6); + c = d0 >>> 13; + d0 &= 8191; + d0 += h5 * (5 * r5); + d0 += h6 * (5 * r4); + d0 += h7 * (5 * r3); + d0 += h8 * (5 * r2); + d0 += h9 * (5 * r1); + c += d0 >>> 13; + d0 &= 8191; + d1 = c; + d1 += h0 * r1; + d1 += h1 * r0; + d1 += h2 * (5 * r9); + d1 += h3 * (5 * r8); + d1 += h4 * (5 * r7); + c = d1 >>> 13; + d1 &= 8191; + d1 += h5 * (5 * r6); + d1 += h6 * (5 * r5); + d1 += h7 * (5 * r4); + d1 += h8 * (5 * r3); + d1 += h9 * (5 * r2); + c += d1 >>> 13; + d1 &= 8191; + d2 = c; + d2 += h0 * r2; + d2 += h1 * r1; + d2 += h2 * r0; + d2 += h3 * (5 * r9); + d2 += h4 * (5 * r8); + c = d2 >>> 13; + d2 &= 8191; + d2 += h5 * (5 * r7); + d2 += h6 * (5 * r6); + d2 += h7 * (5 * r5); + d2 += h8 * (5 * r4); + d2 += h9 * (5 * r3); + c += d2 >>> 13; + d2 &= 8191; + d3 = c; + d3 += h0 * r3; + d3 += h1 * r2; + d3 += h2 * r1; + d3 += h3 * r0; + d3 += h4 * (5 * r9); + c = d3 >>> 13; + d3 &= 8191; + d3 += h5 * (5 * r8); + d3 += h6 * (5 * r7); + d3 += h7 * (5 * r6); + d3 += h8 * (5 * r5); + d3 += h9 * (5 * r4); + c += d3 >>> 13; + d3 &= 8191; + d4 = c; + d4 += h0 * r4; + d4 += h1 * r3; + d4 += h2 * r2; + d4 += h3 * r1; + d4 += h4 * r0; + c = d4 >>> 13; + d4 &= 8191; + d4 += h5 * (5 * r9); + d4 += h6 * (5 * r8); + d4 += h7 * (5 * r7); + d4 += h8 * (5 * r6); + d4 += h9 * (5 * r5); + c += d4 >>> 13; + d4 &= 8191; + d5 = c; + d5 += h0 * r5; + d5 += h1 * r4; + d5 += h2 * r3; + d5 += h3 * r2; + d5 += h4 * r1; + c = d5 >>> 13; + d5 &= 8191; + d5 += h5 * r0; + d5 += h6 * (5 * r9); + d5 += h7 * (5 * r8); + d5 += h8 * (5 * r7); + d5 += h9 * (5 * r6); + c += d5 >>> 13; + d5 &= 8191; + d6 = c; + d6 += h0 * r6; + d6 += h1 * r5; + d6 += h2 * r4; + d6 += h3 * r3; + d6 += h4 * r2; + c = d6 >>> 13; + d6 &= 8191; + d6 += h5 * r1; + d6 += h6 * r0; + d6 += h7 * (5 * r9); + d6 += h8 * (5 * r8); + d6 += h9 * (5 * r7); + c += d6 >>> 13; + d6 &= 8191; + d7 = c; + d7 += h0 * r7; + d7 += h1 * r6; + d7 += h2 * r5; + d7 += h3 * r4; + d7 += h4 * r3; + c = d7 >>> 13; + d7 &= 8191; + d7 += h5 * r2; + d7 += h6 * r1; + d7 += h7 * r0; + d7 += h8 * (5 * r9); + d7 += h9 * (5 * r8); + c += d7 >>> 13; + d7 &= 8191; + d8 = c; + d8 += h0 * r8; + d8 += h1 * r7; + d8 += h2 * r6; + d8 += h3 * r5; + d8 += h4 * r4; + c = d8 >>> 13; + d8 &= 8191; + d8 += h5 * r3; + d8 += h6 * r2; + d8 += h7 * r1; + d8 += h8 * r0; + d8 += h9 * (5 * r9); + c += d8 >>> 13; + d8 &= 8191; + d9 = c; + d9 += h0 * r9; + d9 += h1 * r8; + d9 += h2 * r7; + d9 += h3 * r6; + d9 += h4 * r5; + c = d9 >>> 13; + d9 &= 8191; + d9 += h5 * r4; + d9 += h6 * r3; + d9 += h7 * r2; + d9 += h8 * r1; + d9 += h9 * r0; + c += d9 >>> 13; + d9 &= 8191; + c = (c << 2) + c | 0; + c = c + d0 | 0; + d0 = c & 8191; + c = c >>> 13; + d1 += c; + h0 = d0; + h1 = d1; + h2 = d2; + h3 = d3; + h4 = d4; + h5 = d5; + h6 = d6; + h7 = d7; + h8 = d8; + h9 = d9; + mpos += 16; + bytes -= 16; + } + this.h[0] = h0; + this.h[1] = h1; + this.h[2] = h2; + this.h[3] = h3; + this.h[4] = h4; + this.h[5] = h5; + this.h[6] = h6; + this.h[7] = h7; + this.h[8] = h8; + this.h[9] = h9; + }; + poly1305.prototype.finish = function(mac, macpos) { + var g = new Uint16Array(10); + var c, mask, f, i2; + if (this.leftover) { + i2 = this.leftover; + this.buffer[i2++] = 1; + for (; i2 < 16; i2++) this.buffer[i2] = 0; + this.fin = 1; + this.blocks(this.buffer, 0, 16); + } + c = this.h[1] >>> 13; + this.h[1] &= 8191; + for (i2 = 2; i2 < 10; i2++) { + this.h[i2] += c; + c = this.h[i2] >>> 13; + this.h[i2] &= 8191; + } + this.h[0] += c * 5; + c = this.h[0] >>> 13; + this.h[0] &= 8191; + this.h[1] += c; + c = this.h[1] >>> 13; + this.h[1] &= 8191; + this.h[2] += c; + g[0] = this.h[0] + 5; + c = g[0] >>> 13; + g[0] &= 8191; + for (i2 = 1; i2 < 10; i2++) { + g[i2] = this.h[i2] + c; + c = g[i2] >>> 13; + g[i2] &= 8191; + } + g[9] -= 1 << 13; + mask = (c ^ 1) - 1; + for (i2 = 0; i2 < 10; i2++) g[i2] &= mask; + mask = ~mask; + for (i2 = 0; i2 < 10; i2++) this.h[i2] = this.h[i2] & mask | g[i2]; + this.h[0] = (this.h[0] | this.h[1] << 13) & 65535; + this.h[1] = (this.h[1] >>> 3 | this.h[2] << 10) & 65535; + this.h[2] = (this.h[2] >>> 6 | this.h[3] << 7) & 65535; + this.h[3] = (this.h[3] >>> 9 | this.h[4] << 4) & 65535; + this.h[4] = (this.h[4] >>> 12 | this.h[5] << 1 | this.h[6] << 14) & 65535; + this.h[5] = (this.h[6] >>> 2 | this.h[7] << 11) & 65535; + this.h[6] = (this.h[7] >>> 5 | this.h[8] << 8) & 65535; + this.h[7] = (this.h[8] >>> 8 | this.h[9] << 5) & 65535; + f = this.h[0] + this.pad[0]; + this.h[0] = f & 65535; + for (i2 = 1; i2 < 8; i2++) { + f = (this.h[i2] + this.pad[i2] | 0) + (f >>> 16) | 0; + this.h[i2] = f & 65535; + } + mac[macpos + 0] = this.h[0] >>> 0 & 255; + mac[macpos + 1] = this.h[0] >>> 8 & 255; + mac[macpos + 2] = this.h[1] >>> 0 & 255; + mac[macpos + 3] = this.h[1] >>> 8 & 255; + mac[macpos + 4] = this.h[2] >>> 0 & 255; + mac[macpos + 5] = this.h[2] >>> 8 & 255; + mac[macpos + 6] = this.h[3] >>> 0 & 255; + mac[macpos + 7] = this.h[3] >>> 8 & 255; + mac[macpos + 8] = this.h[4] >>> 0 & 255; + mac[macpos + 9] = this.h[4] >>> 8 & 255; + mac[macpos + 10] = this.h[5] >>> 0 & 255; + mac[macpos + 11] = this.h[5] >>> 8 & 255; + mac[macpos + 12] = this.h[6] >>> 0 & 255; + mac[macpos + 13] = this.h[6] >>> 8 & 255; + mac[macpos + 14] = this.h[7] >>> 0 & 255; + mac[macpos + 15] = this.h[7] >>> 8 & 255; + }; + poly1305.prototype.update = function(m, mpos, bytes) { + var i2, want; + if (this.leftover) { + want = 16 - this.leftover; + if (want > bytes) + want = bytes; + for (i2 = 0; i2 < want; i2++) + this.buffer[this.leftover + i2] = m[mpos + i2]; + bytes -= want; + mpos += want; + this.leftover += want; + if (this.leftover < 16) + return; + this.blocks(this.buffer, 0, 16); + this.leftover = 0; + } + if (bytes >= 16) { + want = bytes - bytes % 16; + this.blocks(m, mpos, want); + mpos += want; + bytes -= want; + } + if (bytes) { + for (i2 = 0; i2 < bytes; i2++) + this.buffer[this.leftover + i2] = m[mpos + i2]; + this.leftover += bytes; + } + }; + function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s = new poly1305(k); + s.update(m, mpos, n); + s.finish(out, outpos); + return 0; + } + function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x, 0, m, mpos, n, k); + return crypto_verify_16(h, hpos, x, 0); + } + function crypto_secretbox(c, m, d, n, k) { + var i2; + if (d < 32) return -1; + crypto_stream_xor(c, 0, m, 0, d, n, k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i2 = 0; i2 < 16; i2++) c[i2] = 0; + return 0; + } + function crypto_secretbox_open(m, c, d, n, k) { + var i2; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x, 0, 32, n, k); + if (crypto_onetimeauth_verify(c, 16, c, 32, d - 32, x) !== 0) return -1; + crypto_stream_xor(m, 0, c, 0, d, n, k); + for (i2 = 0; i2 < 32; i2++) m[i2] = 0; + return 0; + } + function set25519(r, a) { + var i2; + for (i2 = 0; i2 < 16; i2++) r[i2] = a[i2] | 0; + } + function car25519(o) { + var i2, v, c = 1; + for (i2 = 0; i2 < 16; i2++) { + v = o[i2] + c + 65535; + c = Math.floor(v / 65536); + o[i2] = v - c * 65536; + } + o[0] += c - 1 + 37 * (c - 1); + } + function sel25519(p, q2, b) { + var t, c = ~(b - 1); + for (var i2 = 0; i2 < 16; i2++) { + t = c & (p[i2] ^ q2[i2]); + p[i2] ^= t; + q2[i2] ^= t; + } + } + function pack25519(o, n) { + var i2, j, b; + var m = gf(), t = gf(); + for (i2 = 0; i2 < 16; i2++) t[i2] = n[i2]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 65517; + for (i2 = 1; i2 < 15; i2++) { + m[i2] = t[i2] - 65535 - (m[i2 - 1] >> 16 & 1); + m[i2 - 1] &= 65535; + } + m[15] = t[15] - 32767 - (m[14] >> 16 & 1); + b = m[15] >> 16 & 1; + m[14] &= 65535; + sel25519(t, m, 1 - b); + } + for (i2 = 0; i2 < 16; i2++) { + o[2 * i2] = t[i2] & 255; + o[2 * i2 + 1] = t[i2] >> 8; + } + } + function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); + } + function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; + } + function unpack25519(o, n) { + var i2; + for (i2 = 0; i2 < 16; i2++) o[i2] = n[2 * i2] + (n[2 * i2 + 1] << 8); + o[15] &= 32767; + } + function A(o, a, b) { + for (var i2 = 0; i2 < 16; i2++) o[i2] = a[i2] + b[i2]; + } + function Z(o, a, b) { + for (var i2 = 0; i2 < 16; i2++) o[i2] = a[i2] - b[i2]; + } + function M2(o, a, b) { + var v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15]; + v = a[0]; + t0 += v * b0; + t1 += v * b1; + t2 += v * b2; + t3 += v * b3; + t4 += v * b4; + t5 += v * b5; + t6 += v * b6; + t7 += v * b7; + t8 += v * b8; + t9 += v * b9; + t10 += v * b10; + t11 += v * b11; + t12 += v * b12; + t13 += v * b13; + t14 += v * b14; + t15 += v * b15; + v = a[1]; + t1 += v * b0; + t2 += v * b1; + t3 += v * b2; + t4 += v * b3; + t5 += v * b4; + t6 += v * b5; + t7 += v * b6; + t8 += v * b7; + t9 += v * b8; + t10 += v * b9; + t11 += v * b10; + t12 += v * b11; + t13 += v * b12; + t14 += v * b13; + t15 += v * b14; + t16 += v * b15; + v = a[2]; + t2 += v * b0; + t3 += v * b1; + t4 += v * b2; + t5 += v * b3; + t6 += v * b4; + t7 += v * b5; + t8 += v * b6; + t9 += v * b7; + t10 += v * b8; + t11 += v * b9; + t12 += v * b10; + t13 += v * b11; + t14 += v * b12; + t15 += v * b13; + t16 += v * b14; + t17 += v * b15; + v = a[3]; + t3 += v * b0; + t4 += v * b1; + t5 += v * b2; + t6 += v * b3; + t7 += v * b4; + t8 += v * b5; + t9 += v * b6; + t10 += v * b7; + t11 += v * b8; + t12 += v * b9; + t13 += v * b10; + t14 += v * b11; + t15 += v * b12; + t16 += v * b13; + t17 += v * b14; + t18 += v * b15; + v = a[4]; + t4 += v * b0; + t5 += v * b1; + t6 += v * b2; + t7 += v * b3; + t8 += v * b4; + t9 += v * b5; + t10 += v * b6; + t11 += v * b7; + t12 += v * b8; + t13 += v * b9; + t14 += v * b10; + t15 += v * b11; + t16 += v * b12; + t17 += v * b13; + t18 += v * b14; + t19 += v * b15; + v = a[5]; + t5 += v * b0; + t6 += v * b1; + t7 += v * b2; + t8 += v * b3; + t9 += v * b4; + t10 += v * b5; + t11 += v * b6; + t12 += v * b7; + t13 += v * b8; + t14 += v * b9; + t15 += v * b10; + t16 += v * b11; + t17 += v * b12; + t18 += v * b13; + t19 += v * b14; + t20 += v * b15; + v = a[6]; + t6 += v * b0; + t7 += v * b1; + t8 += v * b2; + t9 += v * b3; + t10 += v * b4; + t11 += v * b5; + t12 += v * b6; + t13 += v * b7; + t14 += v * b8; + t15 += v * b9; + t16 += v * b10; + t17 += v * b11; + t18 += v * b12; + t19 += v * b13; + t20 += v * b14; + t21 += v * b15; + v = a[7]; + t7 += v * b0; + t8 += v * b1; + t9 += v * b2; + t10 += v * b3; + t11 += v * b4; + t12 += v * b5; + t13 += v * b6; + t14 += v * b7; + t15 += v * b8; + t16 += v * b9; + t17 += v * b10; + t18 += v * b11; + t19 += v * b12; + t20 += v * b13; + t21 += v * b14; + t22 += v * b15; + v = a[8]; + t8 += v * b0; + t9 += v * b1; + t10 += v * b2; + t11 += v * b3; + t12 += v * b4; + t13 += v * b5; + t14 += v * b6; + t15 += v * b7; + t16 += v * b8; + t17 += v * b9; + t18 += v * b10; + t19 += v * b11; + t20 += v * b12; + t21 += v * b13; + t22 += v * b14; + t23 += v * b15; + v = a[9]; + t9 += v * b0; + t10 += v * b1; + t11 += v * b2; + t12 += v * b3; + t13 += v * b4; + t14 += v * b5; + t15 += v * b6; + t16 += v * b7; + t17 += v * b8; + t18 += v * b9; + t19 += v * b10; + t20 += v * b11; + t21 += v * b12; + t22 += v * b13; + t23 += v * b14; + t24 += v * b15; + v = a[10]; + t10 += v * b0; + t11 += v * b1; + t12 += v * b2; + t13 += v * b3; + t14 += v * b4; + t15 += v * b5; + t16 += v * b6; + t17 += v * b7; + t18 += v * b8; + t19 += v * b9; + t20 += v * b10; + t21 += v * b11; + t22 += v * b12; + t23 += v * b13; + t24 += v * b14; + t25 += v * b15; + v = a[11]; + t11 += v * b0; + t12 += v * b1; + t13 += v * b2; + t14 += v * b3; + t15 += v * b4; + t16 += v * b5; + t17 += v * b6; + t18 += v * b7; + t19 += v * b8; + t20 += v * b9; + t21 += v * b10; + t22 += v * b11; + t23 += v * b12; + t24 += v * b13; + t25 += v * b14; + t26 += v * b15; + v = a[12]; + t12 += v * b0; + t13 += v * b1; + t14 += v * b2; + t15 += v * b3; + t16 += v * b4; + t17 += v * b5; + t18 += v * b6; + t19 += v * b7; + t20 += v * b8; + t21 += v * b9; + t22 += v * b10; + t23 += v * b11; + t24 += v * b12; + t25 += v * b13; + t26 += v * b14; + t27 += v * b15; + v = a[13]; + t13 += v * b0; + t14 += v * b1; + t15 += v * b2; + t16 += v * b3; + t17 += v * b4; + t18 += v * b5; + t19 += v * b6; + t20 += v * b7; + t21 += v * b8; + t22 += v * b9; + t23 += v * b10; + t24 += v * b11; + t25 += v * b12; + t26 += v * b13; + t27 += v * b14; + t28 += v * b15; + v = a[14]; + t14 += v * b0; + t15 += v * b1; + t16 += v * b2; + t17 += v * b3; + t18 += v * b4; + t19 += v * b5; + t20 += v * b6; + t21 += v * b7; + t22 += v * b8; + t23 += v * b9; + t24 += v * b10; + t25 += v * b11; + t26 += v * b12; + t27 += v * b13; + t28 += v * b14; + t29 += v * b15; + v = a[15]; + t15 += v * b0; + t16 += v * b1; + t17 += v * b2; + t18 += v * b3; + t19 += v * b4; + t20 += v * b5; + t21 += v * b6; + t22 += v * b7; + t23 += v * b8; + t24 += v * b9; + t25 += v * b10; + t26 += v * b11; + t27 += v * b12; + t28 += v * b13; + t29 += v * b14; + t30 += v * b15; + t0 += 38 * t16; + t1 += 38 * t17; + t2 += 38 * t18; + t3 += 38 * t19; + t4 += 38 * t20; + t5 += 38 * t21; + t6 += 38 * t22; + t7 += 38 * t23; + t8 += 38 * t24; + t9 += 38 * t25; + t10 += 38 * t26; + t11 += 38 * t27; + t12 += 38 * t28; + t13 += 38 * t29; + t14 += 38 * t30; + c = 1; + v = t0 + c + 65535; + c = Math.floor(v / 65536); + t0 = v - c * 65536; + v = t1 + c + 65535; + c = Math.floor(v / 65536); + t1 = v - c * 65536; + v = t2 + c + 65535; + c = Math.floor(v / 65536); + t2 = v - c * 65536; + v = t3 + c + 65535; + c = Math.floor(v / 65536); + t3 = v - c * 65536; + v = t4 + c + 65535; + c = Math.floor(v / 65536); + t4 = v - c * 65536; + v = t5 + c + 65535; + c = Math.floor(v / 65536); + t5 = v - c * 65536; + v = t6 + c + 65535; + c = Math.floor(v / 65536); + t6 = v - c * 65536; + v = t7 + c + 65535; + c = Math.floor(v / 65536); + t7 = v - c * 65536; + v = t8 + c + 65535; + c = Math.floor(v / 65536); + t8 = v - c * 65536; + v = t9 + c + 65535; + c = Math.floor(v / 65536); + t9 = v - c * 65536; + v = t10 + c + 65535; + c = Math.floor(v / 65536); + t10 = v - c * 65536; + v = t11 + c + 65535; + c = Math.floor(v / 65536); + t11 = v - c * 65536; + v = t12 + c + 65535; + c = Math.floor(v / 65536); + t12 = v - c * 65536; + v = t13 + c + 65535; + c = Math.floor(v / 65536); + t13 = v - c * 65536; + v = t14 + c + 65535; + c = Math.floor(v / 65536); + t14 = v - c * 65536; + v = t15 + c + 65535; + c = Math.floor(v / 65536); + t15 = v - c * 65536; + t0 += c - 1 + 37 * (c - 1); + c = 1; + v = t0 + c + 65535; + c = Math.floor(v / 65536); + t0 = v - c * 65536; + v = t1 + c + 65535; + c = Math.floor(v / 65536); + t1 = v - c * 65536; + v = t2 + c + 65535; + c = Math.floor(v / 65536); + t2 = v - c * 65536; + v = t3 + c + 65535; + c = Math.floor(v / 65536); + t3 = v - c * 65536; + v = t4 + c + 65535; + c = Math.floor(v / 65536); + t4 = v - c * 65536; + v = t5 + c + 65535; + c = Math.floor(v / 65536); + t5 = v - c * 65536; + v = t6 + c + 65535; + c = Math.floor(v / 65536); + t6 = v - c * 65536; + v = t7 + c + 65535; + c = Math.floor(v / 65536); + t7 = v - c * 65536; + v = t8 + c + 65535; + c = Math.floor(v / 65536); + t8 = v - c * 65536; + v = t9 + c + 65535; + c = Math.floor(v / 65536); + t9 = v - c * 65536; + v = t10 + c + 65535; + c = Math.floor(v / 65536); + t10 = v - c * 65536; + v = t11 + c + 65535; + c = Math.floor(v / 65536); + t11 = v - c * 65536; + v = t12 + c + 65535; + c = Math.floor(v / 65536); + t12 = v - c * 65536; + v = t13 + c + 65535; + c = Math.floor(v / 65536); + t13 = v - c * 65536; + v = t14 + c + 65535; + c = Math.floor(v / 65536); + t14 = v - c * 65536; + v = t15 + c + 65535; + c = Math.floor(v / 65536); + t15 = v - c * 65536; + t0 += c - 1 + 37 * (c - 1); + o[0] = t0; + o[1] = t1; + o[2] = t2; + o[3] = t3; + o[4] = t4; + o[5] = t5; + o[6] = t6; + o[7] = t7; + o[8] = t8; + o[9] = t9; + o[10] = t10; + o[11] = t11; + o[12] = t12; + o[13] = t13; + o[14] = t14; + o[15] = t15; + } + function S(o, a) { + M2(o, a, a); + } + function inv25519(o, i2) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i2[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if (a !== 2 && a !== 4) M2(c, c, i2); + } + for (a = 0; a < 16; a++) o[a] = c[a]; + } + function pow2523(o, i2) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i2[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if (a !== 1) M2(c, c, i2); + } + for (a = 0; a < 16; a++) o[a] = c[a]; + } + function crypto_scalarmult(q2, n, p) { + var z2 = new Uint8Array(32); + var x = new Float64Array(80), r, i2; + var a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(); + for (i2 = 0; i2 < 31; i2++) z2[i2] = n[i2]; + z2[31] = n[31] & 127 | 64; + z2[0] &= 248; + unpack25519(x, p); + for (i2 = 0; i2 < 16; i2++) { + b[i2] = x[i2]; + d[i2] = a[i2] = c[i2] = 0; + } + a[0] = d[0] = 1; + for (i2 = 254; i2 >= 0; --i2) { + r = z2[i2 >>> 3] >>> (i2 & 7) & 1; + sel25519(a, b, r); + sel25519(c, d, r); + A(e, a, c); + Z(a, a, c); + A(c, b, d); + Z(b, b, d); + S(d, e); + S(f, a); + M2(a, c, a); + M2(c, b, e); + A(e, a, c); + Z(a, a, c); + S(b, a); + Z(c, d, f); + M2(a, c, _121665); + A(a, a, d); + M2(c, c, a); + M2(a, d, f); + M2(d, b, x); + S(b, e); + sel25519(a, b, r); + sel25519(c, d, r); + } + for (i2 = 0; i2 < 16; i2++) { + x[i2 + 16] = a[i2]; + x[i2 + 32] = c[i2]; + x[i2 + 48] = b[i2]; + x[i2 + 64] = d[i2]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32, x32); + M2(x16, x16, x32); + pack25519(q2, x16); + return 0; + } + function crypto_scalarmult_base(q2, n) { + return crypto_scalarmult(q2, n, _9); + } + function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); + } + function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); + } + var crypto_box_afternm = crypto_secretbox; + var crypto_box_open_afternm = crypto_secretbox_open; + function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); + } + function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); + } + var K = [ + 1116352408, + 3609767458, + 1899447441, + 602891725, + 3049323471, + 3964484399, + 3921009573, + 2173295548, + 961987163, + 4081628472, + 1508970993, + 3053834265, + 2453635748, + 2937671579, + 2870763221, + 3664609560, + 3624381080, + 2734883394, + 310598401, + 1164996542, + 607225278, + 1323610764, + 1426881987, + 3590304994, + 1925078388, + 4068182383, + 2162078206, + 991336113, + 2614888103, + 633803317, + 3248222580, + 3479774868, + 3835390401, + 2666613458, + 4022224774, + 944711139, + 264347078, + 2341262773, + 604807628, + 2007800933, + 770255983, + 1495990901, + 1249150122, + 1856431235, + 1555081692, + 3175218132, + 1996064986, + 2198950837, + 2554220882, + 3999719339, + 2821834349, + 766784016, + 2952996808, + 2566594879, + 3210313671, + 3203337956, + 3336571891, + 1034457026, + 3584528711, + 2466948901, + 113926993, + 3758326383, + 338241895, + 168717936, + 666307205, + 1188179964, + 773529912, + 1546045734, + 1294757372, + 1522805485, + 1396182291, + 2643833823, + 1695183700, + 2343527390, + 1986661051, + 1014477480, + 2177026350, + 1206759142, + 2456956037, + 344077627, + 2730485921, + 1290863460, + 2820302411, + 3158454273, + 3259730800, + 3505952657, + 3345764771, + 106217008, + 3516065817, + 3606008344, + 3600352804, + 1432725776, + 4094571909, + 1467031594, + 275423344, + 851169720, + 430227734, + 3100823752, + 506948616, + 1363258195, + 659060556, + 3750685593, + 883997877, + 3785050280, + 958139571, + 3318307427, + 1322822218, + 3812723403, + 1537002063, + 2003034995, + 1747873779, + 3602036899, + 1955562222, + 1575990012, + 2024104815, + 1125592928, + 2227730452, + 2716904306, + 2361852424, + 442776044, + 2428436474, + 593698344, + 2756734187, + 3733110249, + 3204031479, + 2999351573, + 3329325298, + 3815920427, + 3391569614, + 3928383900, + 3515267271, + 566280711, + 3940187606, + 3454069534, + 4118630271, + 4000239992, + 116418474, + 1914138554, + 174292421, + 2731055270, + 289380356, + 3203993006, + 460393269, + 320620315, + 685471733, + 587496836, + 852142971, + 1086792851, + 1017036298, + 365543100, + 1126000580, + 2618297676, + 1288033470, + 3409855158, + 1501505948, + 4234509866, + 1607167915, + 987167468, + 1816402316, + 1246189591 + ]; + function crypto_hashblocks_hl(hh, hl, m, n) { + var wh = new Int32Array(16), wl = new Int32Array(16), bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, th, tl, i2, j, h, l, a, b, c, d; + var ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7]; + var pos = 0; + while (n >= 128) { + for (i2 = 0; i2 < 16; i2++) { + j = 8 * i2 + pos; + wh[i2] = m[j + 0] << 24 | m[j + 1] << 16 | m[j + 2] << 8 | m[j + 3]; + wl[i2] = m[j + 4] << 24 | m[j + 5] << 16 | m[j + 6] << 8 | m[j + 7]; + } + for (i2 = 0; i2 < 80; i2++) { + bh0 = ah0; + bh1 = ah1; + bh2 = ah2; + bh3 = ah3; + bh4 = ah4; + bh5 = ah5; + bh6 = ah6; + bh7 = ah7; + bl0 = al0; + bl1 = al1; + bl2 = al2; + bl3 = al3; + bl4 = al4; + bl5 = al5; + bl6 = al6; + bl7 = al7; + h = ah7; + l = al7; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = (ah4 >>> 14 | al4 << 32 - 14) ^ (ah4 >>> 18 | al4 << 32 - 18) ^ (al4 >>> 41 - 32 | ah4 << 32 - (41 - 32)); + l = (al4 >>> 14 | ah4 << 32 - 14) ^ (al4 >>> 18 | ah4 << 32 - 18) ^ (ah4 >>> 41 - 32 | al4 << 32 - (41 - 32)); + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + h = ah4 & ah5 ^ ~ah4 & ah6; + l = al4 & al5 ^ ~al4 & al6; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + h = K[i2 * 2]; + l = K[i2 * 2 + 1]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + h = wh[i2 % 16]; + l = wl[i2 % 16]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + th = c & 65535 | d << 16; + tl = a & 65535 | b << 16; + h = th; + l = tl; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = (ah0 >>> 28 | al0 << 32 - 28) ^ (al0 >>> 34 - 32 | ah0 << 32 - (34 - 32)) ^ (al0 >>> 39 - 32 | ah0 << 32 - (39 - 32)); + l = (al0 >>> 28 | ah0 << 32 - 28) ^ (ah0 >>> 34 - 32 | al0 << 32 - (34 - 32)) ^ (ah0 >>> 39 - 32 | al0 << 32 - (39 - 32)); + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + h = ah0 & ah1 ^ ah0 & ah2 ^ ah1 & ah2; + l = al0 & al1 ^ al0 & al2 ^ al1 & al2; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + bh7 = c & 65535 | d << 16; + bl7 = a & 65535 | b << 16; + h = bh3; + l = bl3; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = th; + l = tl; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + bh3 = c & 65535 | d << 16; + bl3 = a & 65535 | b << 16; + ah1 = bh0; + ah2 = bh1; + ah3 = bh2; + ah4 = bh3; + ah5 = bh4; + ah6 = bh5; + ah7 = bh6; + ah0 = bh7; + al1 = bl0; + al2 = bl1; + al3 = bl2; + al4 = bl3; + al5 = bl4; + al6 = bl5; + al7 = bl6; + al0 = bl7; + if (i2 % 16 === 15) { + for (j = 0; j < 16; j++) { + h = wh[j]; + l = wl[j]; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = wh[(j + 9) % 16]; + l = wl[(j + 9) % 16]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + th = wh[(j + 1) % 16]; + tl = wl[(j + 1) % 16]; + h = (th >>> 1 | tl << 32 - 1) ^ (th >>> 8 | tl << 32 - 8) ^ th >>> 7; + l = (tl >>> 1 | th << 32 - 1) ^ (tl >>> 8 | th << 32 - 8) ^ (tl >>> 7 | th << 32 - 7); + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + th = wh[(j + 14) % 16]; + tl = wl[(j + 14) % 16]; + h = (th >>> 19 | tl << 32 - 19) ^ (tl >>> 61 - 32 | th << 32 - (61 - 32)) ^ th >>> 6; + l = (tl >>> 19 | th << 32 - 19) ^ (th >>> 61 - 32 | tl << 32 - (61 - 32)) ^ (tl >>> 6 | th << 32 - 6); + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + wh[j] = c & 65535 | d << 16; + wl[j] = a & 65535 | b << 16; + } + } + } + h = ah0; + l = al0; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[0]; + l = hl[0]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[0] = ah0 = c & 65535 | d << 16; + hl[0] = al0 = a & 65535 | b << 16; + h = ah1; + l = al1; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[1]; + l = hl[1]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[1] = ah1 = c & 65535 | d << 16; + hl[1] = al1 = a & 65535 | b << 16; + h = ah2; + l = al2; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[2]; + l = hl[2]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[2] = ah2 = c & 65535 | d << 16; + hl[2] = al2 = a & 65535 | b << 16; + h = ah3; + l = al3; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[3]; + l = hl[3]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[3] = ah3 = c & 65535 | d << 16; + hl[3] = al3 = a & 65535 | b << 16; + h = ah4; + l = al4; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[4]; + l = hl[4]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[4] = ah4 = c & 65535 | d << 16; + hl[4] = al4 = a & 65535 | b << 16; + h = ah5; + l = al5; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[5]; + l = hl[5]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[5] = ah5 = c & 65535 | d << 16; + hl[5] = al5 = a & 65535 | b << 16; + h = ah6; + l = al6; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[6]; + l = hl[6]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[6] = ah6 = c & 65535 | d << 16; + hl[6] = al6 = a & 65535 | b << 16; + h = ah7; + l = al7; + a = l & 65535; + b = l >>> 16; + c = h & 65535; + d = h >>> 16; + h = hh[7]; + l = hl[7]; + a += l & 65535; + b += l >>> 16; + c += h & 65535; + d += h >>> 16; + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + hh[7] = ah7 = c & 65535 | d << 16; + hl[7] = al7 = a & 65535 | b << 16; + pos += 128; + n -= 128; + } + return n; + } + function crypto_hash(out, m, n) { + var hh = new Int32Array(8), hl = new Int32Array(8), x = new Uint8Array(256), i2, b = n; + hh[0] = 1779033703; + hh[1] = 3144134277; + hh[2] = 1013904242; + hh[3] = 2773480762; + hh[4] = 1359893119; + hh[5] = 2600822924; + hh[6] = 528734635; + hh[7] = 1541459225; + hl[0] = 4089235720; + hl[1] = 2227873595; + hl[2] = 4271175723; + hl[3] = 1595750129; + hl[4] = 2917565137; + hl[5] = 725511199; + hl[6] = 4215389547; + hl[7] = 327033209; + crypto_hashblocks_hl(hh, hl, m, n); + n %= 128; + for (i2 = 0; i2 < n; i2++) x[i2] = m[b - n + i2]; + x[n] = 128; + n = 256 - 128 * (n < 112 ? 1 : 0); + x[n - 9] = 0; + ts64(x, n - 8, b / 536870912 | 0, b << 3); + crypto_hashblocks_hl(hh, hl, x, n); + for (i2 = 0; i2 < 8; i2++) ts64(out, 8 * i2, hh[i2], hl[i2]); + return 0; + } + function add(p, q2) { + var a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(), g = gf(), h = gf(), t = gf(); + Z(a, p[1], p[0]); + Z(t, q2[1], q2[0]); + M2(a, a, t); + A(b, p[0], p[1]); + A(t, q2[0], q2[1]); + M2(b, b, t); + M2(c, p[3], q2[3]); + M2(c, c, D2); + M2(d, p[2], q2[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + M2(p[0], e, f); + M2(p[1], h, g); + M2(p[2], g, f); + M2(p[3], e, h); + } + function cswap(p, q2, b) { + var i2; + for (i2 = 0; i2 < 4; i2++) { + sel25519(p[i2], q2[i2], b); + } + } + function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M2(tx, p[0], zi); + M2(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; + } + function scalarmult(p, q2, s) { + var b, i2; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i2 = 255; i2 >= 0; --i2) { + b = s[i2 / 8 | 0] >> (i2 & 7) & 1; + cswap(p, q2, b); + add(q2, p); + add(p, p); + cswap(p, q2, b); + } + } + function scalarbase(p, s) { + var q2 = [gf(), gf(), gf(), gf()]; + set25519(q2[0], X); + set25519(q2[1], Y); + set25519(q2[2], gf1); + M2(q2[3], X, Y); + scalarmult(p, q2, s); + } + function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i2; + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + scalarbase(p, d); + pack(pk, p); + for (i2 = 0; i2 < 32; i2++) sk[i2 + 32] = pk[i2]; + return 0; + } + var L = new Float64Array([237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]); + function modL(r, x) { + var carry, i2, j, k; + for (i2 = 63; i2 >= 32; --i2) { + carry = 0; + for (j = i2 - 32, k = i2 - 12; j < k; ++j) { + x[j] += carry - 16 * x[i2] * L[j - (i2 - 32)]; + carry = x[j] + 128 >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i2] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i2 = 0; i2 < 32; i2++) { + x[i2 + 1] += x[i2] >> 8; + r[i2] = x[i2] & 255; + } + } + function reduce(r) { + var x = new Float64Array(64), i2; + for (i2 = 0; i2 < 64; i2++) x[i2] = r[i2]; + for (i2 = 0; i2 < 64; i2++) r[i2] = 0; + modL(r, x); + } + function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i2, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + var smlen = n + 64; + for (i2 = 0; i2 < n; i2++) sm[64 + i2] = m[i2]; + for (i2 = 0; i2 < 32; i2++) sm[32 + i2] = d[32 + i2]; + crypto_hash(r, sm.subarray(32), n + 32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + for (i2 = 32; i2 < 64; i2++) sm[i2] = sk[i2]; + crypto_hash(h, sm, n + 64); + reduce(h); + for (i2 = 0; i2 < 64; i2++) x[i2] = 0; + for (i2 = 0; i2 < 32; i2++) x[i2] = r[i2]; + for (i2 = 0; i2 < 32; i2++) { + for (j = 0; j < 32; j++) { + x[i2 + j] += h[i2] * d[j]; + } + } + modL(sm.subarray(32), x); + return smlen; + } + function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf(); + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M2(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + S(den2, den); + S(den4, den2); + M2(den6, den4, den2); + M2(t, den6, num); + M2(t, t, den); + pow2523(t, t); + M2(t, t, num); + M2(t, t, den); + M2(t, t, den); + M2(r[0], t, den); + S(chk, r[0]); + M2(chk, chk, den); + if (neq25519(chk, num)) M2(r[0], r[0], I); + S(chk, r[0]); + M2(chk, chk, den); + if (neq25519(chk, num)) return -1; + if (par25519(r[0]) === p[31] >> 7) Z(r[0], gf0, r[0]); + M2(r[3], r[0], r[1]); + return 0; + } + function crypto_sign_open(m, sm, n, pk) { + var i2, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], q2 = [gf(), gf(), gf(), gf()]; + mlen = -1; + if (n < 64) return -1; + if (unpackneg(q2, pk)) return -1; + for (i2 = 0; i2 < n; i2++) m[i2] = sm[i2]; + for (i2 = 0; i2 < 32; i2++) m[i2 + 32] = pk[i2]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q2, h); + scalarbase(q2, sm.subarray(32)); + add(p, q2); + pack(t, p); + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i2 = 0; i2 < n; i2++) m[i2] = 0; + return -1; + } + for (i2 = 0; i2 < n; i2++) m[i2] = sm[i2 + 64]; + mlen = n; + return mlen; + } + var crypto_secretbox_KEYBYTES = 32, crypto_secretbox_NONCEBYTES = 24, crypto_secretbox_ZEROBYTES = 32, crypto_secretbox_BOXZEROBYTES = 16, crypto_scalarmult_BYTES = 32, crypto_scalarmult_SCALARBYTES = 32, crypto_box_PUBLICKEYBYTES = 32, crypto_box_SECRETKEYBYTES = 32, crypto_box_BEFORENMBYTES = 32, crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, crypto_sign_BYTES = 64, crypto_sign_PUBLICKEYBYTES = 32, crypto_sign_SECRETKEYBYTES = 64, crypto_sign_SEEDBYTES = 32, crypto_hash_BYTES = 64; + nacl.lowlevel = { + crypto_core_hsalsa20, + crypto_stream_xor, + crypto_stream, + crypto_stream_salsa20_xor, + crypto_stream_salsa20, + crypto_onetimeauth, + crypto_onetimeauth_verify, + crypto_verify_16, + crypto_verify_32, + crypto_secretbox, + crypto_secretbox_open, + crypto_scalarmult, + crypto_scalarmult_base, + crypto_box_beforenm, + crypto_box_afternm, + crypto_box, + crypto_box_open, + crypto_box_keypair, + crypto_hash, + crypto_sign, + crypto_sign_keypair, + crypto_sign_open, + crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES, + crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES, + crypto_hash_BYTES + }; + function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error("bad key size"); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error("bad nonce size"); + } + function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error("bad public key size"); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error("bad secret key size"); + } + function checkArrayTypes() { + var t, i2; + for (i2 = 0; i2 < arguments.length; i2++) { + if ((t = Object.prototype.toString.call(arguments[i2])) !== "[object Uint8Array]") + throw new TypeError("unexpected type " + t + ", use Uint8Array"); + } + } + function cleanup(arr2) { + for (var i2 = 0; i2 < arr2.length; i2++) arr2[i2] = 0; + } + if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js"); + }; + } + nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; + }; + nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i2 = 0; i2 < msg.length; i2++) m[i2 + crypto_secretbox_ZEROBYTES] = msg[i2]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); + }; + nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i2 = 0; i2 < box.length; i2++) c[i2 + crypto_secretbox_BOXZEROBYTES] = box[i2]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); + }; + nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; + nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; + nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error("bad n size"); + if (p.length !== crypto_scalarmult_BYTES) throw new Error("bad p size"); + var q2 = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q2, n, p); + return q2; + }; + nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error("bad n size"); + var q2 = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q2, n); + return q2; + }; + nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; + nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); + }; + nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; + }; + nacl.box.after = nacl.secretbox; + nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); + }; + nacl.box.open.after = nacl.secretbox.open; + nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return { publicKey: pk, secretKey: sk }; + }; + nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error("bad secret key size"); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return { publicKey: pk, secretKey: new Uint8Array(secretKey) }; + }; + nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; + nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; + nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; + nacl.box.nonceLength = crypto_box_NONCEBYTES; + nacl.box.overheadLength = nacl.secretbox.overheadLength; + nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error("bad secret key size"); + var signedMsg = new Uint8Array(crypto_sign_BYTES + msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; + }; + nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?"); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error("bad public key size"); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i2 = 0; i2 < m.length; i2++) m[i2] = tmp[i2]; + return m; + }; + nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i2 = 0; i2 < sig.length; i2++) sig[i2] = signedMsg[i2]; + return sig; + }; + nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error("bad signature size"); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error("bad public key size"); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i2; + for (i2 = 0; i2 < crypto_sign_BYTES; i2++) sm[i2] = sig[i2]; + for (i2 = 0; i2 < msg.length; i2++) sm[i2 + crypto_sign_BYTES] = msg[i2]; + return crypto_sign_open(m, sm, sm.length, publicKey) >= 0; + }; + nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return { publicKey: pk, secretKey: sk }; + }; + nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error("bad secret key size"); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i2 = 0; i2 < pk.length; i2++) pk[i2] = secretKey[32 + i2]; + return { publicKey: pk, secretKey: new Uint8Array(secretKey) }; + }; + nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error("bad seed size"); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i2 = 0; i2 < 32; i2++) sk[i2] = seed[i2]; + crypto_sign_keypair(pk, sk, true); + return { publicKey: pk, secretKey: sk }; + }; + nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; + nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; + nacl.sign.seedLength = crypto_sign_SEEDBYTES; + nacl.sign.signatureLength = crypto_sign_BYTES; + nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; + }; + nacl.hash.hashLength = crypto_hash_BYTES; + nacl.verify = function(x, y) { + checkArrayTypes(x, y); + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return vn(x, 0, y, 0, x.length) === 0 ? true : false; + }; + nacl.setPRNG = function(fn) { + randombytes = fn; + }; + (function() { + var crypto2 = typeof self !== "undefined" ? self.crypto || self.msCrypto : null; + if (crypto2 && crypto2.getRandomValues) { + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i2, v = new Uint8Array(n); + for (i2 = 0; i2 < n; i2 += QUOTA) { + crypto2.getRandomValues(v.subarray(i2, i2 + Math.min(n - i2, QUOTA))); + } + for (i2 = 0; i2 < n; i2++) x[i2] = v[i2]; + cleanup(v); + }); + } else if (typeof require !== "undefined") { + crypto2 = require("crypto"); + if (crypto2 && crypto2.randomBytes) { + nacl.setPRNG(function(x, n) { + var i2, v = crypto2.randomBytes(n); + for (i2 = 0; i2 < n; i2++) x[i2] = v[i2]; + cleanup(v); + }); + } + } + })(); + })(typeof module2 !== "undefined" && module2.exports ? module2.exports : self.nacl = self.nacl || {}); + } +}); + +// node_modules/sshpk/lib/utils.js +var require_utils = __commonJS({ + "node_modules/sshpk/lib/utils.js"(exports2, module2) { + module2.exports = { + bufferSplit, + addRSAMissing, + calculateDSAPublic, + calculateED25519Public, + calculateX25519Public, + mpNormalize, + mpDenormalize, + ecNormalize, + countZeros, + assertCompatible, + isCompatible, + opensslKeyDeriv, + opensshCipherInfo, + publicFromPrivateECDSA, + zeroPadToLength, + writeBitString, + readBitString, + pbkdf2 + }; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var PrivateKey = require_private_key(); + var Key = require_key(); + var crypto2 = require("crypto"); + var algs = require_algs(); + var asn1 = require_lib(); + var ec = require_ec(); + var jsbn = require_jsbn().BigInteger; + var nacl = require_nacl_fast(); + var MAX_CLASS_DEPTH = 3; + function isCompatible(obj, klass, needVer) { + if (obj === null || typeof obj !== "object") + return false; + if (needVer === void 0) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && klass.prototype._sshpkApiVersion[0] == needVer[0]) + return true; + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + if (!proto || ++depth > MAX_CLASS_DEPTH) + return false; + } + if (proto.constructor.name !== klass.name) + return false; + var ver = proto._sshpkApiVersion; + if (ver === void 0) + ver = klass._oldVersionDetect(obj); + if (ver[0] != needVer[0] || ver[1] < needVer[1]) + return false; + return true; + } + function assertCompatible(obj, klass, needVer, name) { + if (name === void 0) + name = "object"; + assert.ok(obj, name + " must not be null"); + assert.object(obj, name + " must be an object"); + if (needVer === void 0) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && klass.prototype._sshpkApiVersion[0] == needVer[0]) + return; + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + assert.ok( + proto && ++depth <= MAX_CLASS_DEPTH, + name + " must be a " + klass.name + " instance" + ); + } + assert.strictEqual( + proto.constructor.name, + klass.name, + name + " must be a " + klass.name + " instance" + ); + var ver = proto._sshpkApiVersion; + if (ver === void 0) + ver = klass._oldVersionDetect(obj); + assert.ok( + ver[0] == needVer[0] && ver[1] >= needVer[1], + name + " must be compatible with " + klass.name + " klass version " + needVer[0] + "." + needVer[1] + ); + } + var CIPHER_LEN = { + "des-ede3-cbc": { key: 24, iv: 8 }, + "aes-128-cbc": { key: 16, iv: 16 }, + "aes-256-cbc": { key: 32, iv: 16 } + }; + var PKCS5_SALT_LEN = 8; + function opensslKeyDeriv(cipher, salt, passphrase, count) { + assert.buffer(salt, "salt"); + assert.buffer(passphrase, "passphrase"); + assert.number(count, "iteration count"); + var clen = CIPHER_LEN[cipher]; + assert.object(clen, "supported cipher"); + salt = salt.slice(0, PKCS5_SALT_LEN); + var D, D_prev, bufs; + var material = Buffer2.alloc(0); + while (material.length < clen.key + clen.iv) { + bufs = []; + if (D_prev) + bufs.push(D_prev); + bufs.push(passphrase); + bufs.push(salt); + D = Buffer2.concat(bufs); + for (var j = 0; j < count; ++j) + D = crypto2.createHash("md5").update(D).digest(); + material = Buffer2.concat([material, D]); + D_prev = D; + } + return { + key: material.slice(0, clen.key), + iv: material.slice(clen.key, clen.key + clen.iv) + }; + } + function pbkdf2(hashAlg, salt, iterations, size2, passphrase) { + var hkey = Buffer2.alloc(salt.length + 4); + salt.copy(hkey); + var gen = 0, ts = []; + var i2 = 1; + while (gen < size2) { + var t = T(i2++); + gen += t.length; + ts.push(t); + } + return Buffer2.concat(ts).slice(0, size2); + function T(I) { + hkey.writeUInt32BE(I, hkey.length - 4); + var hmac = crypto2.createHmac(hashAlg, passphrase); + hmac.update(hkey); + var Ti = hmac.digest(); + var Uc = Ti; + var c = 1; + while (c++ < iterations) { + hmac = crypto2.createHmac(hashAlg, passphrase); + hmac.update(Uc); + Uc = hmac.digest(); + for (var x = 0; x < Ti.length; ++x) + Ti[x] ^= Uc[x]; + } + return Ti; + } + } + function countZeros(buf) { + var o = 0, obit = 8; + while (o < buf.length) { + var mask = 1 << obit; + if ((buf[o] & mask) === mask) + break; + obit--; + if (obit < 0) { + o++; + obit = 8; + } + } + return o * 8 + (8 - obit) - 1; + } + function bufferSplit(buf, chr) { + assert.buffer(buf); + assert.string(chr); + var parts = []; + var lastPart = 0; + var matches = 0; + for (var i2 = 0; i2 < buf.length; ++i2) { + if (buf[i2] === chr.charCodeAt(matches)) + ++matches; + else if (buf[i2] === chr.charCodeAt(0)) + matches = 1; + else + matches = 0; + if (matches >= chr.length) { + var newPart = i2 + 1; + parts.push(buf.slice(lastPart, newPart - matches)); + lastPart = newPart; + matches = 0; + } + } + if (lastPart <= buf.length) + parts.push(buf.slice(lastPart, buf.length)); + return parts; + } + function ecNormalize(buf, addZero) { + assert.buffer(buf); + if (buf[0] === 0 && buf[1] === 4) { + if (addZero) + return buf; + return buf.slice(1); + } else if (buf[0] === 4) { + if (!addZero) + return buf; + } else { + while (buf[0] === 0) + buf = buf.slice(1); + if (buf[0] === 2 || buf[0] === 3) + throw new Error("Compressed elliptic curve points are not supported"); + if (buf[0] !== 4) + throw new Error("Not a valid elliptic curve point"); + if (!addZero) + return buf; + } + var b = Buffer2.alloc(buf.length + 1); + b[0] = 0; + buf.copy(b, 1); + return b; + } + function readBitString(der, tag) { + if (tag === void 0) + tag = asn1.Ber.BitString; + var buf = der.readString(tag, true); + assert.strictEqual(buf[0], 0, "bit strings with unused bits are not supported (0x" + buf[0].toString(16) + ")"); + return buf.slice(1); + } + function writeBitString(der, buf, tag) { + if (tag === void 0) + tag = asn1.Ber.BitString; + var b = Buffer2.alloc(buf.length + 1); + b[0] = 0; + buf.copy(b, 1); + der.writeBuffer(b, tag); + } + function mpNormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0 && (buf[1] & 128) === 0) + buf = buf.slice(1); + if ((buf[0] & 128) === 128) { + var b = Buffer2.alloc(buf.length + 1); + b[0] = 0; + buf.copy(b, 1); + buf = b; + } + return buf; + } + function mpDenormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0) + buf = buf.slice(1); + return buf; + } + function zeroPadToLength(buf, len) { + assert.buffer(buf); + assert.number(len); + while (buf.length > len) { + assert.equal(buf[0], 0); + buf = buf.slice(1); + } + while (buf.length < len) { + var b = Buffer2.alloc(buf.length + 1); + b[0] = 0; + buf.copy(b, 1); + buf = b; + } + return buf; + } + function bigintToMpBuf(bigint) { + var buf = Buffer2.from(bigint.toByteArray()); + buf = mpNormalize(buf); + return buf; + } + function calculateDSAPublic(g, p, x) { + assert.buffer(g); + assert.buffer(p); + assert.buffer(x); + g = new jsbn(g); + p = new jsbn(p); + x = new jsbn(x); + var y = g.modPow(x, p); + var ybuf = bigintToMpBuf(y); + return ybuf; + } + function calculateED25519Public(k) { + assert.buffer(k); + var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); + return Buffer2.from(kp.publicKey); + } + function calculateX25519Public(k) { + assert.buffer(k); + var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); + return Buffer2.from(kp.publicKey); + } + function addRSAMissing(key) { + assert.object(key); + assertCompatible(key, PrivateKey, [1, 1]); + var d = new jsbn(key.part.d.data); + var buf; + if (!key.part.dmodp) { + var p = new jsbn(key.part.p.data); + var dmodp = d.mod(p.subtract(1)); + buf = bigintToMpBuf(dmodp); + key.part.dmodp = { name: "dmodp", data: buf }; + key.parts.push(key.part.dmodp); + } + if (!key.part.dmodq) { + var q2 = new jsbn(key.part.q.data); + var dmodq = d.mod(q2.subtract(1)); + buf = bigintToMpBuf(dmodq); + key.part.dmodq = { name: "dmodq", data: buf }; + key.parts.push(key.part.dmodq); + } + } + function publicFromPrivateECDSA(curveName, priv) { + assert.string(curveName, "curveName"); + assert.buffer(priv); + var params = algs.curves[curveName]; + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString("hex")); + var d = new jsbn(mpNormalize(priv)); + var pub = G.multiply(d); + pub = Buffer2.from(curve.encodePointHex(pub), "hex"); + var parts = []; + parts.push({ name: "curve", data: Buffer2.from(curveName) }); + parts.push({ name: "Q", data: pub }); + var key = new Key({ type: "ecdsa", curve, parts }); + return key; + } + function opensshCipherInfo(cipher) { + var inf = {}; + switch (cipher) { + case "3des-cbc": + inf.keySize = 24; + inf.blockSize = 8; + inf.opensslName = "des-ede3-cbc"; + break; + case "blowfish-cbc": + inf.keySize = 16; + inf.blockSize = 8; + inf.opensslName = "bf-cbc"; + break; + case "aes128-cbc": + case "aes128-ctr": + case "aes128-gcm@openssh.com": + inf.keySize = 16; + inf.blockSize = 16; + inf.opensslName = "aes-128-" + cipher.slice(7, 10); + break; + case "aes192-cbc": + case "aes192-ctr": + case "aes192-gcm@openssh.com": + inf.keySize = 24; + inf.blockSize = 16; + inf.opensslName = "aes-192-" + cipher.slice(7, 10); + break; + case "aes256-cbc": + case "aes256-ctr": + case "aes256-gcm@openssh.com": + inf.keySize = 32; + inf.blockSize = 16; + inf.opensslName = "aes-256-" + cipher.slice(7, 10); + break; + default: + throw new Error( + 'Unsupported openssl cipher "' + cipher + '"' + ); + } + return inf; + } + } +}); + +// node_modules/sshpk/lib/ssh-buffer.js +var require_ssh_buffer = __commonJS({ + "node_modules/sshpk/lib/ssh-buffer.js"(exports2, module2) { + module2.exports = SSHBuffer; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + function SSHBuffer(opts) { + assert.object(opts, "options"); + if (opts.buffer !== void 0) + assert.buffer(opts.buffer, "options.buffer"); + this._size = opts.buffer ? opts.buffer.length : 1024; + this._buffer = opts.buffer || Buffer2.alloc(this._size); + this._offset = 0; + } + SSHBuffer.prototype.toBuffer = function() { + return this._buffer.slice(0, this._offset); + }; + SSHBuffer.prototype.atEnd = function() { + return this._offset >= this._buffer.length; + }; + SSHBuffer.prototype.remainder = function() { + return this._buffer.slice(this._offset); + }; + SSHBuffer.prototype.skip = function(n) { + this._offset += n; + }; + SSHBuffer.prototype.expand = function() { + this._size *= 2; + var buf = Buffer2.alloc(this._size); + this._buffer.copy(buf, 0); + this._buffer = buf; + }; + SSHBuffer.prototype.readPart = function() { + return { data: this.readBuffer() }; + }; + SSHBuffer.prototype.readBuffer = function() { + var len = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + assert.ok( + this._offset + len <= this._buffer.length, + "length out of bounds at +0x" + this._offset.toString(16) + " (data truncated?)" + ); + var buf = this._buffer.slice(this._offset, this._offset + len); + this._offset += len; + return buf; + }; + SSHBuffer.prototype.readString = function() { + return this.readBuffer().toString(); + }; + SSHBuffer.prototype.readCString = function() { + var offset2 = this._offset; + while (offset2 < this._buffer.length && this._buffer[offset2] !== 0) + offset2++; + assert.ok(offset2 < this._buffer.length, "c string does not terminate"); + var str = this._buffer.slice(this._offset, offset2).toString(); + this._offset = offset2 + 1; + return str; + }; + SSHBuffer.prototype.readInt = function() { + var v = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + return v; + }; + SSHBuffer.prototype.readInt64 = function() { + assert.ok( + this._offset + 8 < this._buffer.length, + "buffer not long enough to read Int64" + ); + var v = this._buffer.slice(this._offset, this._offset + 8); + this._offset += 8; + return v; + }; + SSHBuffer.prototype.readChar = function() { + var v = this._buffer[this._offset++]; + return v; + }; + SSHBuffer.prototype.writeBuffer = function(buf) { + while (this._offset + 4 + buf.length > this._size) + this.expand(); + this._buffer.writeUInt32BE(buf.length, this._offset); + this._offset += 4; + buf.copy(this._buffer, this._offset); + this._offset += buf.length; + }; + SSHBuffer.prototype.writeString = function(str) { + this.writeBuffer(Buffer2.from(str, "utf8")); + }; + SSHBuffer.prototype.writeCString = function(str) { + while (this._offset + 1 + str.length > this._size) + this.expand(); + this._buffer.write(str, this._offset); + this._offset += str.length; + this._buffer[this._offset++] = 0; + }; + SSHBuffer.prototype.writeInt = function(v) { + while (this._offset + 4 > this._size) + this.expand(); + this._buffer.writeUInt32BE(v, this._offset); + this._offset += 4; + }; + SSHBuffer.prototype.writeInt64 = function(v) { + assert.buffer(v, "value"); + if (v.length > 8) { + var lead = v.slice(0, v.length - 8); + for (var i2 = 0; i2 < lead.length; ++i2) { + assert.strictEqual( + lead[i2], + 0, + "must fit in 64 bits of precision" + ); + } + v = v.slice(v.length - 8, v.length); + } + while (this._offset + 8 > this._size) + this.expand(); + v.copy(this._buffer, this._offset); + this._offset += 8; + }; + SSHBuffer.prototype.writeChar = function(v) { + while (this._offset + 1 > this._size) + this.expand(); + this._buffer[this._offset++] = v; + }; + SSHBuffer.prototype.writePart = function(p) { + this.writeBuffer(p.data); + }; + SSHBuffer.prototype.write = function(buf) { + while (this._offset + buf.length > this._size) + this.expand(); + buf.copy(this._buffer, this._offset); + this._offset += buf.length; + }; + } +}); + +// node_modules/sshpk/lib/signature.js +var require_signature = __commonJS({ + "node_modules/sshpk/lib/signature.js"(exports2, module2) { + module2.exports = Signature; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var crypto2 = require("crypto"); + var errs = require_errors(); + var utils = require_utils(); + var asn1 = require_lib(); + var SSHBuffer = require_ssh_buffer(); + var InvalidAlgorithmError = errs.InvalidAlgorithmError; + var SignatureParseError = errs.SignatureParseError; + function Signature(opts) { + assert.object(opts, "options"); + assert.arrayOfObject(opts.parts, "options.parts"); + assert.string(opts.type, "options.type"); + var partLookup = {}; + for (var i2 = 0; i2 < opts.parts.length; ++i2) { + var part = opts.parts[i2]; + partLookup[part.name] = part; + } + this.type = opts.type; + this.hashAlgorithm = opts.hashAlgo; + this.curve = opts.curve; + this.parts = opts.parts; + this.part = partLookup; + } + Signature.prototype.toBuffer = function(format) { + if (format === void 0) + format = "asn1"; + assert.string(format, "format"); + var buf; + var stype = "ssh-" + this.type; + switch (this.type) { + case "rsa": + switch (this.hashAlgorithm) { + case "sha256": + stype = "rsa-sha2-256"; + break; + case "sha512": + stype = "rsa-sha2-512"; + break; + case "sha1": + case void 0: + break; + default: + throw new Error("SSH signature format does not support hash algorithm " + this.hashAlgorithm); + } + if (format === "ssh") { + buf = new SSHBuffer({}); + buf.writeString(stype); + buf.writePart(this.part.sig); + return buf.toBuffer(); + } else { + return this.part.sig.data; + } + break; + case "ed25519": + if (format === "ssh") { + buf = new SSHBuffer({}); + buf.writeString(stype); + buf.writePart(this.part.sig); + return buf.toBuffer(); + } else { + return this.part.sig.data; + } + break; + case "dsa": + case "ecdsa": + var r, s; + if (format === "asn1") { + var der = new asn1.BerWriter(); + der.startSequence(); + r = utils.mpNormalize(this.part.r.data); + s = utils.mpNormalize(this.part.s.data); + der.writeBuffer(r, asn1.Ber.Integer); + der.writeBuffer(s, asn1.Ber.Integer); + der.endSequence(); + return der.buffer; + } else if (format === "ssh" && this.type === "dsa") { + buf = new SSHBuffer({}); + buf.writeString("ssh-dss"); + r = this.part.r.data; + if (r.length > 20 && r[0] === 0) + r = r.slice(1); + s = this.part.s.data; + if (s.length > 20 && s[0] === 0) + s = s.slice(1); + if (this.hashAlgorithm && this.hashAlgorithm !== "sha1" || r.length + s.length !== 40) { + throw new Error("OpenSSH only supports DSA signatures with SHA1 hash"); + } + buf.writeBuffer(Buffer2.concat([r, s])); + return buf.toBuffer(); + } else if (format === "ssh" && this.type === "ecdsa") { + var inner = new SSHBuffer({}); + r = this.part.r.data; + inner.writeBuffer(r); + inner.writePart(this.part.s); + buf = new SSHBuffer({}); + var curve; + if (r[0] === 0) + r = r.slice(1); + var sz = r.length * 8; + if (sz === 256) + curve = "nistp256"; + else if (sz === 384) + curve = "nistp384"; + else if (sz === 528) + curve = "nistp521"; + buf.writeString("ecdsa-sha2-" + curve); + buf.writeBuffer(inner.toBuffer()); + return buf.toBuffer(); + } + throw new Error("Invalid signature format"); + default: + throw new Error("Invalid signature data"); + } + }; + Signature.prototype.toString = function(format) { + assert.optionalString(format, "format"); + return this.toBuffer(format).toString("base64"); + }; + Signature.parse = function(data, type, format) { + if (typeof data === "string") + data = Buffer2.from(data, "base64"); + assert.buffer(data, "data"); + assert.string(format, "format"); + assert.string(type, "type"); + var opts = {}; + opts.type = type.toLowerCase(); + opts.parts = []; + try { + assert.ok(data.length > 0, "signature must not be empty"); + switch (opts.type) { + case "rsa": + return parseOneNum(data, type, format, opts); + case "ed25519": + return parseOneNum(data, type, format, opts); + case "dsa": + case "ecdsa": + if (format === "asn1") + return parseDSAasn1(data, type, format, opts); + else if (opts.type === "dsa") + return parseDSA(data, type, format, opts); + else + return parseECDSA(data, type, format, opts); + default: + throw new InvalidAlgorithmError(type); + } + } catch (e) { + if (e instanceof InvalidAlgorithmError) + throw e; + throw new SignatureParseError(type, format, e); + } + }; + function parseOneNum(data, type, format, opts) { + if (format === "ssh") { + try { + var buf = new SSHBuffer({ buffer: data }); + var head = buf.readString(); + } catch (e) { + } + if (buf !== void 0) { + var msg = "SSH signature does not match expected type (expected " + type + ", got " + head + ")"; + switch (head) { + case "ssh-rsa": + assert.strictEqual(type, "rsa", msg); + opts.hashAlgo = "sha1"; + break; + case "rsa-sha2-256": + assert.strictEqual(type, "rsa", msg); + opts.hashAlgo = "sha256"; + break; + case "rsa-sha2-512": + assert.strictEqual(type, "rsa", msg); + opts.hashAlgo = "sha512"; + break; + case "ssh-ed25519": + assert.strictEqual(type, "ed25519", msg); + opts.hashAlgo = "sha512"; + break; + default: + throw new Error("Unknown SSH signature type: " + head); + } + var sig = buf.readPart(); + assert.ok(buf.atEnd(), "extra trailing bytes"); + sig.name = "sig"; + opts.parts.push(sig); + return new Signature(opts); + } + } + opts.parts.push({ name: "sig", data }); + return new Signature(opts); + } + function parseDSAasn1(data, type, format, opts) { + var der = new asn1.BerReader(data); + der.readSequence(); + var r = der.readString(asn1.Ber.Integer, true); + var s = der.readString(asn1.Ber.Integer, true); + opts.parts.push({ name: "r", data: utils.mpNormalize(r) }); + opts.parts.push({ name: "s", data: utils.mpNormalize(s) }); + return new Signature(opts); + } + function parseDSA(data, type, format, opts) { + if (data.length != 40) { + var buf = new SSHBuffer({ buffer: data }); + var d = buf.readBuffer(); + if (d.toString("ascii") === "ssh-dss") + d = buf.readBuffer(); + assert.ok(buf.atEnd(), "extra trailing bytes"); + assert.strictEqual(d.length, 40, "invalid inner length"); + data = d; + } + opts.parts.push({ name: "r", data: data.slice(0, 20) }); + opts.parts.push({ name: "s", data: data.slice(20, 40) }); + return new Signature(opts); + } + function parseECDSA(data, type, format, opts) { + var buf = new SSHBuffer({ buffer: data }); + var r, s; + var inner = buf.readBuffer(); + var stype = inner.toString("ascii"); + if (stype.slice(0, 6) === "ecdsa-") { + var parts = stype.split("-"); + assert.strictEqual(parts[0], "ecdsa"); + assert.strictEqual(parts[1], "sha2"); + opts.curve = parts[2]; + switch (opts.curve) { + case "nistp256": + opts.hashAlgo = "sha256"; + break; + case "nistp384": + opts.hashAlgo = "sha384"; + break; + case "nistp521": + opts.hashAlgo = "sha512"; + break; + default: + throw new Error("Unsupported ECDSA curve: " + opts.curve); + } + inner = buf.readBuffer(); + assert.ok(buf.atEnd(), "extra trailing bytes on outer"); + buf = new SSHBuffer({ buffer: inner }); + r = buf.readPart(); + } else { + r = { data: inner }; + } + s = buf.readPart(); + assert.ok(buf.atEnd(), "extra trailing bytes"); + r.name = "r"; + s.name = "s"; + opts.parts.push(r); + opts.parts.push(s); + return new Signature(opts); + } + Signature.isSignature = function(obj, ver) { + return utils.isCompatible(obj, Signature, ver); + }; + Signature.prototype._sshpkApiVersion = [2, 1]; + Signature._oldVersionDetect = function(obj) { + assert.func(obj.toBuffer); + if (obj.hasOwnProperty("hashAlgorithm")) + return [2, 0]; + return [1, 0]; + }; + } +}); + +// node_modules/ecc-jsbn/lib/sec.js +var require_sec = __commonJS({ + "node_modules/ecc-jsbn/lib/sec.js"(exports2, module2) { + var BigInteger = require_jsbn().BigInteger; + var ECCurveFp = require_ec().ECCurveFp; + function X9ECParameters(curve, g, n, h) { + this.curve = curve; + this.g = g; + this.n = n; + this.h = h; + } + function x9getCurve() { + return this.curve; + } + function x9getG() { + return this.g; + } + function x9getN() { + return this.n; + } + function x9getH() { + return this.h; + } + X9ECParameters.prototype.getCurve = x9getCurve; + X9ECParameters.prototype.getG = x9getG; + X9ECParameters.prototype.getN = x9getN; + X9ECParameters.prototype.getH = x9getH; + function fromHex(s) { + return new BigInteger(s, 16); + } + function secp128r1() { + var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"); + var b = fromHex("E87579C11079F43DD824993C2CEE5ED3"); + var n = fromHex("FFFFFFFE0000000075A30D1B9038A115"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83"); + return new X9ECParameters(curve, G, n, h); + } + function secp160k1() { + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"); + var a = BigInteger.ZERO; + var b = fromHex("7"); + var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE"); + return new X9ECParameters(curve, G, n, h); + } + function secp160r1() { + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"); + var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"); + var n = fromHex("0100000000000000000001F4C8F927AED3CA752257"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32"); + return new X9ECParameters(curve, G, n, h); + } + function secp192k1() { + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"); + var a = BigInteger.ZERO; + var b = fromHex("3"); + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D"); + return new X9ECParameters(curve, G, n, h); + } + function secp192r1() { + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"); + var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"); + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811"); + return new X9ECParameters(curve, G, n, h); + } + function secp224r1() { + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"); + var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"); + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34"); + return new X9ECParameters(curve, G, n, h); + } + function secp256r1() { + var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"); + var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"); + var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"); + return new X9ECParameters(curve, G, n, h); + } + module2.exports = { + "secp128r1": secp128r1, + "secp160k1": secp160k1, + "secp160r1": secp160r1, + "secp192k1": secp192k1, + "secp192r1": secp192r1, + "secp224r1": secp224r1, + "secp256r1": secp256r1 + }; + } +}); + +// node_modules/ecc-jsbn/index.js +var require_ecc_jsbn = __commonJS({ + "node_modules/ecc-jsbn/index.js"(exports2) { + var crypto2 = require("crypto"); + var BigInteger = require_jsbn().BigInteger; + var ECPointFp = require_ec().ECPointFp; + var Buffer2 = require_safer().Buffer; + exports2.ECCurves = require_sec(); + function unstupid(hex, len) { + return hex.length >= len ? hex : unstupid("0" + hex, len); + } + exports2.ECKey = function(curve, key, isPublic) { + var priv; + var c = curve(); + var n = c.getN(); + var bytes = Math.floor(n.bitLength() / 8); + if (key) { + if (isPublic) { + var curve = c.getCurve(); + this.P = curve.decodePointHex(key.toString("hex")); + } else { + if (key.length != bytes) return false; + priv = new BigInteger(key.toString("hex"), 16); + } + } else { + var n1 = n.subtract(BigInteger.ONE); + var r = new BigInteger(crypto2.randomBytes(n.bitLength())); + priv = r.mod(n1).add(BigInteger.ONE); + this.P = c.getG().multiply(priv); + } + if (this.P) { + this.PublicKey = Buffer2.from(c.getCurve().encodeCompressedPointHex(this.P), "hex"); + } + if (priv) { + this.PrivateKey = Buffer2.from(unstupid(priv.toString(16), bytes * 2), "hex"); + this.deriveSharedSecret = function(key2) { + if (!key2 || !key2.P) return false; + var S = key2.P.multiply(priv); + return Buffer2.from(unstupid(S.getX().toBigInteger().toString(16), bytes * 2), "hex"); + }; + } + }; + } +}); + +// node_modules/sshpk/lib/dhe.js +var require_dhe = __commonJS({ + "node_modules/sshpk/lib/dhe.js"(exports2, module2) { + module2.exports = { + DiffieHellman, + generateECDSA, + generateED25519 + }; + var assert = require_assert(); + var crypto2 = require("crypto"); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var nacl = require_nacl_fast(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var CRYPTO_HAVE_ECDH = crypto2.createECDH !== void 0; + var ecdh = require_ecc_jsbn(); + var ec = require_ec(); + var jsbn = require_jsbn().BigInteger; + function DiffieHellman(key) { + utils.assertCompatible(key, Key, [1, 4], "key"); + this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); + this._algo = key.type; + this._curve = key.curve; + this._key = key; + if (key.type === "dsa") { + if (!CRYPTO_HAVE_ECDH) { + throw new Error("Due to bugs in the node 0.10 crypto API, node 0.12.x or later is required to use DH"); + } + this._dh = crypto2.createDiffieHellman( + key.part.p.data, + void 0, + key.part.g.data, + void 0 + ); + this._p = key.part.p; + this._g = key.part.g; + if (this._isPriv) + this._dh.setPrivateKey(key.part.x.data); + this._dh.setPublicKey(key.part.y.data); + } else if (key.type === "ecdsa") { + if (!CRYPTO_HAVE_ECDH) { + this._ecParams = new X9ECParameters(this._curve); + if (this._isPriv) { + this._priv = new ECPrivate( + this._ecParams, + key.part.d.data + ); + } + return; + } + var curve = { + "nistp256": "prime256v1", + "nistp384": "secp384r1", + "nistp521": "secp521r1" + }[key.curve]; + this._dh = crypto2.createECDH(curve); + if (typeof this._dh !== "object" || typeof this._dh.setPrivateKey !== "function") { + CRYPTO_HAVE_ECDH = false; + DiffieHellman.call(this, key); + return; + } + if (this._isPriv) + this._dh.setPrivateKey(key.part.d.data); + this._dh.setPublicKey(key.part.Q.data); + } else if (key.type === "curve25519") { + if (this._isPriv) { + utils.assertCompatible(key, PrivateKey, [1, 5], "key"); + this._priv = key.part.k.data; + } + } else { + throw new Error("DH not supported for " + key.type + " keys"); + } + } + DiffieHellman.prototype.getPublicKey = function() { + if (this._isPriv) + return this._key.toPublic(); + return this._key; + }; + DiffieHellman.prototype.getPrivateKey = function() { + if (this._isPriv) + return this._key; + else + return void 0; + }; + DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; + DiffieHellman.prototype._keyCheck = function(pk, isPub) { + assert.object(pk, "key"); + if (!isPub) + utils.assertCompatible(pk, PrivateKey, [1, 3], "key"); + utils.assertCompatible(pk, Key, [1, 4], "key"); + if (pk.type !== this._algo) { + throw new Error("A " + pk.type + " key cannot be used in " + this._algo + " Diffie-Hellman"); + } + if (pk.curve !== this._curve) { + throw new Error("A key from the " + pk.curve + " curve cannot be used with a " + this._curve + " Diffie-Hellman"); + } + if (pk.type === "dsa") { + assert.deepEqual( + pk.part.p, + this._p, + "DSA key prime does not match" + ); + assert.deepEqual( + pk.part.g, + this._g, + "DSA key generator does not match" + ); + } + }; + DiffieHellman.prototype.setKey = function(pk) { + this._keyCheck(pk); + if (pk.type === "dsa") { + this._dh.setPrivateKey(pk.part.x.data); + this._dh.setPublicKey(pk.part.y.data); + } else if (pk.type === "ecdsa") { + if (CRYPTO_HAVE_ECDH) { + this._dh.setPrivateKey(pk.part.d.data); + this._dh.setPublicKey(pk.part.Q.data); + } else { + this._priv = new ECPrivate( + this._ecParams, + pk.part.d.data + ); + } + } else if (pk.type === "curve25519") { + var k = pk.part.k; + if (!pk.part.k) + k = pk.part.r; + this._priv = k.data; + if (this._priv[0] === 0) + this._priv = this._priv.slice(1); + this._priv = this._priv.slice(0, 32); + } + this._key = pk; + this._isPriv = true; + }; + DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; + DiffieHellman.prototype.computeSecret = function(otherpk) { + this._keyCheck(otherpk, true); + if (!this._isPriv) + throw new Error("DH exchange has not been initialized with a private key yet"); + var pub; + if (this._algo === "dsa") { + return this._dh.computeSecret( + otherpk.part.y.data + ); + } else if (this._algo === "ecdsa") { + if (CRYPTO_HAVE_ECDH) { + return this._dh.computeSecret( + otherpk.part.Q.data + ); + } else { + pub = new ECPublic( + this._ecParams, + otherpk.part.Q.data + ); + return this._priv.deriveSharedSecret(pub); + } + } else if (this._algo === "curve25519") { + pub = otherpk.part.A.data; + while (pub[0] === 0 && pub.length > 32) + pub = pub.slice(1); + var priv = this._priv; + assert.strictEqual(pub.length, 32); + assert.strictEqual(priv.length, 32); + var secret = nacl.box.before( + new Uint8Array(pub), + new Uint8Array(priv) + ); + return Buffer2.from(secret); + } + throw new Error("Invalid algorithm: " + this._algo); + }; + DiffieHellman.prototype.generateKey = function() { + var parts = []; + var priv, pub; + if (this._algo === "dsa") { + this._dh.generateKeys(); + parts.push({ name: "p", data: this._p.data }); + parts.push({ name: "q", data: this._key.part.q.data }); + parts.push({ name: "g", data: this._g.data }); + parts.push({ name: "y", data: this._dh.getPublicKey() }); + parts.push({ name: "x", data: this._dh.getPrivateKey() }); + this._key = new PrivateKey({ + type: "dsa", + parts + }); + this._isPriv = true; + return this._key; + } else if (this._algo === "ecdsa") { + if (CRYPTO_HAVE_ECDH) { + this._dh.generateKeys(); + parts.push({ + name: "curve", + data: Buffer2.from(this._curve) + }); + parts.push({ name: "Q", data: this._dh.getPublicKey() }); + parts.push({ name: "d", data: this._dh.getPrivateKey() }); + this._key = new PrivateKey({ + type: "ecdsa", + curve: this._curve, + parts + }); + this._isPriv = true; + return this._key; + } else { + var n = this._ecParams.getN(); + var r = new jsbn(crypto2.randomBytes(n.bitLength())); + var n1 = n.subtract(jsbn.ONE); + priv = r.mod(n1).add(jsbn.ONE); + pub = this._ecParams.getG().multiply(priv); + priv = Buffer2.from(priv.toByteArray()); + pub = Buffer2.from(this._ecParams.getCurve().encodePointHex(pub), "hex"); + this._priv = new ECPrivate(this._ecParams, priv); + parts.push({ + name: "curve", + data: Buffer2.from(this._curve) + }); + parts.push({ name: "Q", data: pub }); + parts.push({ name: "d", data: priv }); + this._key = new PrivateKey({ + type: "ecdsa", + curve: this._curve, + parts + }); + this._isPriv = true; + return this._key; + } + } else if (this._algo === "curve25519") { + var pair = nacl.box.keyPair(); + priv = Buffer2.from(pair.secretKey); + pub = Buffer2.from(pair.publicKey); + priv = Buffer2.concat([priv, pub]); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + parts.push({ name: "A", data: pub }); + parts.push({ name: "k", data: priv }); + this._key = new PrivateKey({ + type: "curve25519", + parts + }); + this._isPriv = true; + return this._key; + } + throw new Error("Invalid algorithm: " + this._algo); + }; + DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; + function X9ECParameters(name) { + var params = algs.curves[name]; + assert.object(params); + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var n = new jsbn(params.n); + var h = jsbn.ONE; + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString("hex")); + this.curve = curve; + this.g = G; + this.n = n; + this.h = h; + } + X9ECParameters.prototype.getCurve = function() { + return this.curve; + }; + X9ECParameters.prototype.getG = function() { + return this.g; + }; + X9ECParameters.prototype.getN = function() { + return this.n; + }; + X9ECParameters.prototype.getH = function() { + return this.h; + }; + function ECPublic(params, buffer) { + this._params = params; + if (buffer[0] === 0) + buffer = buffer.slice(1); + this._pub = params.getCurve().decodePointHex(buffer.toString("hex")); + } + function ECPrivate(params, buffer) { + this._params = params; + this._priv = new jsbn(utils.mpNormalize(buffer)); + } + ECPrivate.prototype.deriveSharedSecret = function(pubKey) { + assert.ok(pubKey instanceof ECPublic); + var S = pubKey._pub.multiply(this._priv); + return Buffer2.from(S.getX().toBigInteger().toByteArray()); + }; + function generateED25519() { + var pair = nacl.sign.keyPair(); + var priv = Buffer2.from(pair.secretKey); + var pub = Buffer2.from(pair.publicKey); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + var parts = []; + parts.push({ name: "A", data: pub }); + parts.push({ name: "k", data: priv.slice(0, 32) }); + var key = new PrivateKey({ + type: "ed25519", + parts + }); + return key; + } + function generateECDSA(curve) { + var parts = []; + var key; + if (CRYPTO_HAVE_ECDH) { + var osCurve = { + "nistp256": "prime256v1", + "nistp384": "secp384r1", + "nistp521": "secp521r1" + }[curve]; + var dh = crypto2.createECDH(osCurve); + dh.generateKeys(); + parts.push({ + name: "curve", + data: Buffer2.from(curve) + }); + parts.push({ name: "Q", data: dh.getPublicKey() }); + parts.push({ name: "d", data: dh.getPrivateKey() }); + key = new PrivateKey({ + type: "ecdsa", + curve, + parts + }); + return key; + } else { + var ecParams = new X9ECParameters(curve); + var n = ecParams.getN(); + var cByteLen = Math.ceil((n.bitLength() + 64) / 8); + var c = new jsbn(crypto2.randomBytes(cByteLen)); + var n1 = n.subtract(jsbn.ONE); + var priv = c.mod(n1).add(jsbn.ONE); + var pub = ecParams.getG().multiply(priv); + priv = Buffer2.from(priv.toByteArray()); + pub = Buffer2.from(ecParams.getCurve().encodePointHex(pub), "hex"); + parts.push({ name: "curve", data: Buffer2.from(curve) }); + parts.push({ name: "Q", data: pub }); + parts.push({ name: "d", data: priv }); + key = new PrivateKey({ + type: "ecdsa", + curve, + parts + }); + return key; + } + } + } +}); + +// node_modules/sshpk/lib/ed-compat.js +var require_ed_compat = __commonJS({ + "node_modules/sshpk/lib/ed-compat.js"(exports2, module2) { + module2.exports = { + Verifier, + Signer + }; + var nacl = require_nacl_fast(); + var stream2 = require("stream"); + var util2 = require("util"); + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var Signature = require_signature(); + function Verifier(key, hashAlgo) { + if (hashAlgo.toLowerCase() !== "sha512") + throw new Error("ED25519 only supports the use of SHA-512 hashes"); + this.key = key; + this.chunks = []; + stream2.Writable.call(this, {}); + } + util2.inherits(Verifier, stream2.Writable); + Verifier.prototype._write = function(chunk, enc, cb) { + this.chunks.push(chunk); + cb(); + }; + Verifier.prototype.update = function(chunk) { + if (typeof chunk === "string") + chunk = Buffer2.from(chunk, "binary"); + this.chunks.push(chunk); + }; + Verifier.prototype.verify = function(signature, fmt) { + var sig; + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== "ed25519") + return false; + sig = signature.toBuffer("raw"); + } else if (typeof signature === "string") { + sig = Buffer2.from(signature, "base64"); + } else if (Signature.isSignature(signature, [1, 0])) { + throw new Error("signature was created by too old a version of sshpk and cannot be verified"); + } + assert.buffer(sig); + return nacl.sign.detached.verify( + new Uint8Array(Buffer2.concat(this.chunks)), + new Uint8Array(sig), + new Uint8Array(this.key.part.A.data) + ); + }; + function Signer(key, hashAlgo) { + if (hashAlgo.toLowerCase() !== "sha512") + throw new Error("ED25519 only supports the use of SHA-512 hashes"); + this.key = key; + this.chunks = []; + stream2.Writable.call(this, {}); + } + util2.inherits(Signer, stream2.Writable); + Signer.prototype._write = function(chunk, enc, cb) { + this.chunks.push(chunk); + cb(); + }; + Signer.prototype.update = function(chunk) { + if (typeof chunk === "string") + chunk = Buffer2.from(chunk, "binary"); + this.chunks.push(chunk); + }; + Signer.prototype.sign = function() { + var sig = nacl.sign.detached( + new Uint8Array(Buffer2.concat(this.chunks)), + new Uint8Array(Buffer2.concat([ + this.key.part.k.data, + this.key.part.A.data + ])) + ); + var sigBuf = Buffer2.from(sig); + var sigObj = Signature.parse(sigBuf, "ed25519", "raw"); + sigObj.hashAlgorithm = "sha512"; + return sigObj; + }; + } +}); + +// node_modules/sshpk/lib/formats/pkcs8.js +var require_pkcs8 = __commonJS({ + "node_modules/sshpk/lib/formats/pkcs8.js"(exports2, module2) { + module2.exports = { + read, + readPkcs8, + write, + writePkcs8, + pkcs8ToBuffer, + readECDSACurve, + writeECDSACurve + }; + var assert = require_assert(); + var asn1 = require_lib(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var pem = require_pem(); + function read(buf, options) { + return pem.read(buf, options, "pkcs8"); + } + function write(key, options) { + return pem.write(key, options, "pkcs8"); + } + function readMPInt(der, nm) { + assert.strictEqual( + der.peek(), + asn1.Ber.Integer, + nm + " is not an Integer" + ); + return utils.mpNormalize(der.readString(asn1.Ber.Integer, true)); + } + function readPkcs8(alg, type, der) { + if (der.peek() === asn1.Ber.Integer) { + assert.strictEqual( + type, + "private", + "unexpected Integer at start of public key" + ); + der.readString(asn1.Ber.Integer, true); + } + der.readSequence(); + var next = der.offset + der.length; + var oid = der.readOID(); + switch (oid) { + case "1.2.840.113549.1.1.1": + der._offset = next; + if (type === "public") + return readPkcs8RSAPublic(der); + else + return readPkcs8RSAPrivate(der); + case "1.2.840.10040.4.1": + if (type === "public") + return readPkcs8DSAPublic(der); + else + return readPkcs8DSAPrivate(der); + case "1.2.840.10045.2.1": + if (type === "public") + return readPkcs8ECDSAPublic(der); + else + return readPkcs8ECDSAPrivate(der); + case "1.3.101.112": + if (type === "public") { + return readPkcs8EdDSAPublic(der); + } else { + return readPkcs8EdDSAPrivate(der); + } + case "1.3.101.110": + if (type === "public") { + return readPkcs8X25519Public(der); + } else { + return readPkcs8X25519Private(der); + } + default: + throw new Error("Unknown key type OID " + oid); + } + } + function readPkcs8RSAPublic(der) { + der.readSequence(asn1.Ber.BitString); + der.readByte(); + der.readSequence(); + var n = readMPInt(der, "modulus"); + var e = readMPInt(der, "exponent"); + var key = { + type: "rsa", + source: der.originalInput, + parts: [ + { name: "e", data: e }, + { name: "n", data: n } + ] + }; + return new Key(key); + } + function readPkcs8RSAPrivate(der) { + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var ver = readMPInt(der, "version"); + assert.equal(ver[0], 0, "unknown RSA private key version"); + var n = readMPInt(der, "modulus"); + var e = readMPInt(der, "public exponent"); + var d = readMPInt(der, "private exponent"); + var p = readMPInt(der, "prime1"); + var q2 = readMPInt(der, "prime2"); + var dmodp = readMPInt(der, "exponent1"); + var dmodq = readMPInt(der, "exponent2"); + var iqmp = readMPInt(der, "iqmp"); + var key = { + type: "rsa", + parts: [ + { name: "n", data: n }, + { name: "e", data: e }, + { name: "d", data: d }, + { name: "iqmp", data: iqmp }, + { name: "p", data: p }, + { name: "q", data: q2 }, + { name: "dmodp", data: dmodp }, + { name: "dmodq", data: dmodq } + ] + }; + return new PrivateKey(key); + } + function readPkcs8DSAPublic(der) { + der.readSequence(); + var p = readMPInt(der, "p"); + var q2 = readMPInt(der, "q"); + var g = readMPInt(der, "g"); + der.readSequence(asn1.Ber.BitString); + der.readByte(); + var y = readMPInt(der, "y"); + var key = { + type: "dsa", + parts: [ + { name: "p", data: p }, + { name: "q", data: q2 }, + { name: "g", data: g }, + { name: "y", data: y } + ] + }; + return new Key(key); + } + function readPkcs8DSAPrivate(der) { + der.readSequence(); + var p = readMPInt(der, "p"); + var q2 = readMPInt(der, "q"); + var g = readMPInt(der, "g"); + der.readSequence(asn1.Ber.OctetString); + var x = readMPInt(der, "x"); + var y = utils.calculateDSAPublic(g, p, x); + var key = { + type: "dsa", + parts: [ + { name: "p", data: p }, + { name: "q", data: q2 }, + { name: "g", data: g }, + { name: "y", data: y }, + { name: "x", data: x } + ] + }; + return new PrivateKey(key); + } + function readECDSACurve(der) { + var curveName, curveNames; + var j, c, cd; + if (der.peek() === asn1.Ber.OID) { + var oid = der.readOID(); + curveNames = Object.keys(algs.curves); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + if (cd.pkcs8oid === oid) { + curveName = c; + break; + } + } + } else { + der.readSequence(); + var version = der.readString(asn1.Ber.Integer, true); + assert.strictEqual(version[0], 1, "ECDSA key not version 1"); + var curve = {}; + der.readSequence(); + var fieldTypeOid = der.readOID(); + assert.strictEqual( + fieldTypeOid, + "1.2.840.10045.1.1", + "ECDSA key is not from a prime-field" + ); + var p = curve.p = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true) + ); + curve.size = p.length * 8 - utils.countZeros(p); + der.readSequence(); + curve.a = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true) + ); + curve.b = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true) + ); + if (der.peek() === asn1.Ber.BitString) + curve.s = der.readString(asn1.Ber.BitString, true); + curve.G = der.readString(asn1.Ber.OctetString, true); + assert.strictEqual( + curve.G[0], + 4, + "uncompressed G is required" + ); + curve.n = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true) + ); + curve.h = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true) + ); + assert.strictEqual(curve.h[0], 1, "a cofactor=1 curve is required"); + curveNames = Object.keys(algs.curves); + var ks = Object.keys(curve); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + var equal = true; + for (var i2 = 0; i2 < ks.length; ++i2) { + var k = ks[i2]; + if (cd[k] === void 0) + continue; + if (typeof cd[k] === "object" && cd[k].equals !== void 0) { + if (!cd[k].equals(curve[k])) { + equal = false; + break; + } + } else if (Buffer2.isBuffer(cd[k])) { + if (cd[k].toString("binary") !== curve[k].toString("binary")) { + equal = false; + break; + } + } else { + if (cd[k] !== curve[k]) { + equal = false; + break; + } + } + } + if (equal) { + curveName = c; + break; + } + } + } + return curveName; + } + function readPkcs8ECDSAPrivate(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, "a known elliptic curve"); + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var version = readMPInt(der, "version"); + assert.equal(version[0], 1, "unknown version of ECDSA key"); + var d = der.readString(asn1.Ber.OctetString, true); + var Q; + if (der.peek() == 160) { + der.readSequence(160); + der._offset += der.length; + } + if (der.peek() == 161) { + der.readSequence(161); + Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + } + if (Q === void 0) { + var pub = utils.publicFromPrivateECDSA(curveName, d); + Q = pub.part.Q.data; + } + var key = { + type: "ecdsa", + parts: [ + { name: "curve", data: Buffer2.from(curveName) }, + { name: "Q", data: Q }, + { name: "d", data: d } + ] + }; + return new PrivateKey(key); + } + function readPkcs8ECDSAPublic(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, "a known elliptic curve"); + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + var key = { + type: "ecdsa", + parts: [ + { name: "curve", data: Buffer2.from(curveName) }, + { name: "Q", data: Q } + ] + }; + return new Key(key); + } + function readPkcs8EdDSAPublic(der) { + if (der.peek() === 0) + der.readByte(); + var A = utils.readBitString(der); + var key = { + type: "ed25519", + parts: [ + { name: "A", data: utils.zeroPadToLength(A, 32) } + ] + }; + return new Key(key); + } + function readPkcs8X25519Public(der) { + var A = utils.readBitString(der); + var key = { + type: "curve25519", + parts: [ + { name: "A", data: utils.zeroPadToLength(A, 32) } + ] + }; + return new Key(key); + } + function readPkcs8EdDSAPrivate(der) { + if (der.peek() === 0) + der.readByte(); + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + var A, tag; + while ((tag = der.peek()) !== null) { + if (tag === (asn1.Ber.Context | 1)) { + A = utils.readBitString(der, tag); + } else { + der.readSequence(tag); + der._offset += der.length; + } + } + if (A === void 0) + A = utils.calculateED25519Public(k); + var key = { + type: "ed25519", + parts: [ + { name: "A", data: utils.zeroPadToLength(A, 32) }, + { name: "k", data: utils.zeroPadToLength(k, 32) } + ] + }; + return new PrivateKey(key); + } + function readPkcs8X25519Private(der) { + if (der.peek() === 0) + der.readByte(); + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + var A = utils.calculateX25519Public(k); + var key = { + type: "curve25519", + parts: [ + { name: "A", data: utils.zeroPadToLength(A, 32) }, + { name: "k", data: utils.zeroPadToLength(k, 32) } + ] + }; + return new PrivateKey(key); + } + function pkcs8ToBuffer(key) { + var der = new asn1.BerWriter(); + writePkcs8(der, key); + return der.buffer; + } + function writePkcs8(der, key) { + der.startSequence(); + if (PrivateKey.isPrivateKey(key)) { + var version = 0; + if (key.type === "ed25519") + version = 1; + var vbuf = Buffer2.from([version]); + der.writeBuffer(vbuf, asn1.Ber.Integer); + } + der.startSequence(); + switch (key.type) { + case "rsa": + der.writeOID("1.2.840.113549.1.1.1"); + if (PrivateKey.isPrivateKey(key)) + writePkcs8RSAPrivate(key, der); + else + writePkcs8RSAPublic(key, der); + break; + case "dsa": + der.writeOID("1.2.840.10040.4.1"); + if (PrivateKey.isPrivateKey(key)) + writePkcs8DSAPrivate(key, der); + else + writePkcs8DSAPublic(key, der); + break; + case "ecdsa": + der.writeOID("1.2.840.10045.2.1"); + if (PrivateKey.isPrivateKey(key)) + writePkcs8ECDSAPrivate(key, der); + else + writePkcs8ECDSAPublic(key, der); + break; + case "ed25519": + der.writeOID("1.3.101.112"); + if (PrivateKey.isPrivateKey(key)) + writePkcs8EdDSAPrivate(key, der); + else + writePkcs8EdDSAPublic(key, der); + break; + default: + throw new Error("Unsupported key type: " + key.type); + } + der.endSequence(); + } + function writePkcs8RSAPrivate(key, der) { + der.writeNull(); + der.endSequence(); + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + var version = Buffer2.from([0]); + der.writeBuffer(version, asn1.Ber.Integer); + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + } + function writePkcs8RSAPublic(key, der) { + der.writeNull(); + der.endSequence(); + der.startSequence(asn1.Ber.BitString); + der.writeByte(0); + der.startSequence(); + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + } + function writePkcs8DSAPrivate(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + der.startSequence(asn1.Ber.OctetString); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); + der.endSequence(); + } + function writePkcs8DSAPublic(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + der.startSequence(asn1.Ber.BitString); + der.writeByte(0); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.endSequence(); + } + function writeECDSACurve(key, der) { + var curve = algs.curves[key.curve]; + if (curve.pkcs8oid) { + der.writeOID(curve.pkcs8oid); + } else { + der.startSequence(); + var version = Buffer2.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + der.startSequence(); + der.writeOID("1.2.840.10045.1.1"); + der.writeBuffer(curve.p, asn1.Ber.Integer); + der.endSequence(); + der.startSequence(); + var a = curve.p; + if (a[0] === 0) + a = a.slice(1); + der.writeBuffer(a, asn1.Ber.OctetString); + der.writeBuffer(curve.b, asn1.Ber.OctetString); + der.writeBuffer(curve.s, asn1.Ber.BitString); + der.endSequence(); + der.writeBuffer(curve.G, asn1.Ber.OctetString); + der.writeBuffer(curve.n, asn1.Ber.Integer); + var h = curve.h; + if (!h) { + h = Buffer2.from([1]); + } + der.writeBuffer(h, asn1.Ber.Integer); + der.endSequence(); + } + } + function writePkcs8ECDSAPublic(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + } + function writePkcs8ECDSAPrivate(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + var version = Buffer2.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + der.startSequence(161); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); + der.endSequence(); + der.endSequence(); + } + function writePkcs8EdDSAPublic(key, der) { + der.endSequence(); + utils.writeBitString(der, key.part.A.data); + } + function writePkcs8EdDSAPrivate(key, der) { + der.endSequence(); + der.startSequence(asn1.Ber.OctetString); + var k = utils.mpNormalize(key.part.k.data); + while (k.length > 32 && k[0] === 0) + k = k.slice(1); + der.writeBuffer(k, asn1.Ber.OctetString); + der.endSequence(); + utils.writeBitString(der, key.part.A.data, asn1.Ber.Context | 1); + } + } +}); + +// node_modules/sshpk/lib/formats/pkcs1.js +var require_pkcs1 = __commonJS({ + "node_modules/sshpk/lib/formats/pkcs1.js"(exports2, module2) { + module2.exports = { + read, + readPkcs1, + write, + writePkcs1 + }; + var assert = require_assert(); + var asn1 = require_lib(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var pem = require_pem(); + var pkcs8 = require_pkcs8(); + var readECDSACurve = pkcs8.readECDSACurve; + function read(buf, options) { + return pem.read(buf, options, "pkcs1"); + } + function write(key, options) { + return pem.write(key, options, "pkcs1"); + } + function readMPInt(der, nm) { + assert.strictEqual( + der.peek(), + asn1.Ber.Integer, + nm + " is not an Integer" + ); + return utils.mpNormalize(der.readString(asn1.Ber.Integer, true)); + } + function readPkcs1(alg, type, der) { + switch (alg) { + case "RSA": + if (type === "public") + return readPkcs1RSAPublic(der); + else if (type === "private") + return readPkcs1RSAPrivate(der); + throw new Error("Unknown key type: " + type); + case "DSA": + if (type === "public") + return readPkcs1DSAPublic(der); + else if (type === "private") + return readPkcs1DSAPrivate(der); + throw new Error("Unknown key type: " + type); + case "EC": + case "ECDSA": + if (type === "private") + return readPkcs1ECDSAPrivate(der); + else if (type === "public") + return readPkcs1ECDSAPublic(der); + throw new Error("Unknown key type: " + type); + case "EDDSA": + case "EdDSA": + if (type === "private") + return readPkcs1EdDSAPrivate(der); + throw new Error(type + " keys not supported with EdDSA"); + default: + throw new Error("Unknown key algo: " + alg); + } + } + function readPkcs1RSAPublic(der) { + var n = readMPInt(der, "modulus"); + var e = readMPInt(der, "exponent"); + var key = { + type: "rsa", + parts: [ + { name: "e", data: e }, + { name: "n", data: n } + ] + }; + return new Key(key); + } + function readPkcs1RSAPrivate(der) { + var version = readMPInt(der, "version"); + assert.strictEqual(version[0], 0); + var n = readMPInt(der, "modulus"); + var e = readMPInt(der, "public exponent"); + var d = readMPInt(der, "private exponent"); + var p = readMPInt(der, "prime1"); + var q2 = readMPInt(der, "prime2"); + var dmodp = readMPInt(der, "exponent1"); + var dmodq = readMPInt(der, "exponent2"); + var iqmp = readMPInt(der, "iqmp"); + var key = { + type: "rsa", + parts: [ + { name: "n", data: n }, + { name: "e", data: e }, + { name: "d", data: d }, + { name: "iqmp", data: iqmp }, + { name: "p", data: p }, + { name: "q", data: q2 }, + { name: "dmodp", data: dmodp }, + { name: "dmodq", data: dmodq } + ] + }; + return new PrivateKey(key); + } + function readPkcs1DSAPrivate(der) { + var version = readMPInt(der, "version"); + assert.strictEqual(version.readUInt8(0), 0); + var p = readMPInt(der, "p"); + var q2 = readMPInt(der, "q"); + var g = readMPInt(der, "g"); + var y = readMPInt(der, "y"); + var x = readMPInt(der, "x"); + var key = { + type: "dsa", + parts: [ + { name: "p", data: p }, + { name: "q", data: q2 }, + { name: "g", data: g }, + { name: "y", data: y }, + { name: "x", data: x } + ] + }; + return new PrivateKey(key); + } + function readPkcs1EdDSAPrivate(der) { + var version = readMPInt(der, "version"); + assert.strictEqual(version.readUInt8(0), 1); + var k = der.readString(asn1.Ber.OctetString, true); + der.readSequence(160); + var oid = der.readOID(); + assert.strictEqual(oid, "1.3.101.112", "the ed25519 curve identifier"); + der.readSequence(161); + var A = utils.readBitString(der); + var key = { + type: "ed25519", + parts: [ + { name: "A", data: utils.zeroPadToLength(A, 32) }, + { name: "k", data: k } + ] + }; + return new PrivateKey(key); + } + function readPkcs1DSAPublic(der) { + var y = readMPInt(der, "y"); + var p = readMPInt(der, "p"); + var q2 = readMPInt(der, "q"); + var g = readMPInt(der, "g"); + var key = { + type: "dsa", + parts: [ + { name: "y", data: y }, + { name: "p", data: p }, + { name: "q", data: q2 }, + { name: "g", data: g } + ] + }; + return new Key(key); + } + function readPkcs1ECDSAPublic(der) { + der.readSequence(); + var oid = der.readOID(); + assert.strictEqual(oid, "1.2.840.10045.2.1", "must be ecPublicKey"); + var curveOid = der.readOID(); + var curve; + var curves = Object.keys(algs.curves); + for (var j = 0; j < curves.length; ++j) { + var c = curves[j]; + var cd = algs.curves[c]; + if (cd.pkcs8oid === curveOid) { + curve = c; + break; + } + } + assert.string(curve, "a known ECDSA named curve"); + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + var key = { + type: "ecdsa", + parts: [ + { name: "curve", data: Buffer2.from(curve) }, + { name: "Q", data: Q } + ] + }; + return new Key(key); + } + function readPkcs1ECDSAPrivate(der) { + var version = readMPInt(der, "version"); + assert.strictEqual(version.readUInt8(0), 1); + var d = der.readString(asn1.Ber.OctetString, true); + der.readSequence(160); + var curve = readECDSACurve(der); + assert.string(curve, "a known elliptic curve"); + der.readSequence(161); + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + var key = { + type: "ecdsa", + parts: [ + { name: "curve", data: Buffer2.from(curve) }, + { name: "Q", data: Q }, + { name: "d", data: d } + ] + }; + return new PrivateKey(key); + } + function writePkcs1(der, key) { + der.startSequence(); + switch (key.type) { + case "rsa": + if (PrivateKey.isPrivateKey(key)) + writePkcs1RSAPrivate(der, key); + else + writePkcs1RSAPublic(der, key); + break; + case "dsa": + if (PrivateKey.isPrivateKey(key)) + writePkcs1DSAPrivate(der, key); + else + writePkcs1DSAPublic(der, key); + break; + case "ecdsa": + if (PrivateKey.isPrivateKey(key)) + writePkcs1ECDSAPrivate(der, key); + else + writePkcs1ECDSAPublic(der, key); + break; + case "ed25519": + if (PrivateKey.isPrivateKey(key)) + writePkcs1EdDSAPrivate(der, key); + else + writePkcs1EdDSAPublic(der, key); + break; + default: + throw new Error("Unknown key algo: " + key.type); + } + der.endSequence(); + } + function writePkcs1RSAPublic(der, key) { + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + } + function writePkcs1RSAPrivate(der, key) { + var ver = Buffer2.from([0]); + der.writeBuffer(ver, asn1.Ber.Integer); + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); + } + function writePkcs1DSAPrivate(der, key) { + var ver = Buffer2.from([0]); + der.writeBuffer(ver, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); + } + function writePkcs1DSAPublic(der, key) { + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + } + function writePkcs1ECDSAPublic(der, key) { + der.startSequence(); + der.writeOID("1.2.840.10045.2.1"); + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, "a known ECDSA named curve"); + der.writeOID(curveOid); + der.endSequence(); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + } + function writePkcs1ECDSAPrivate(der, key) { + var ver = Buffer2.from([1]); + der.writeBuffer(ver, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + der.startSequence(160); + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, "a known ECDSA named curve"); + der.writeOID(curveOid); + der.endSequence(); + der.startSequence(161); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); + } + function writePkcs1EdDSAPrivate(der, key) { + var ver = Buffer2.from([1]); + der.writeBuffer(ver, asn1.Ber.Integer); + der.writeBuffer(key.part.k.data, asn1.Ber.OctetString); + der.startSequence(160); + der.writeOID("1.3.101.112"); + der.endSequence(); + der.startSequence(161); + utils.writeBitString(der, key.part.A.data); + der.endSequence(); + } + function writePkcs1EdDSAPublic(der, key) { + throw new Error("Public keys are not supported for EdDSA PKCS#1"); + } + } +}); + +// node_modules/sshpk/lib/formats/rfc4253.js +var require_rfc4253 = __commonJS({ + "node_modules/sshpk/lib/formats/rfc4253.js"(exports2, module2) { + module2.exports = { + read: read.bind(void 0, false, void 0), + readType: read.bind(void 0, false), + write, + /* semi-private api, used by sshpk-agent */ + readPartial: read.bind(void 0, true), + /* shared with ssh format */ + readInternal: read, + keyTypeToAlg, + algToKeyType + }; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var SSHBuffer = require_ssh_buffer(); + function algToKeyType(alg) { + assert.string(alg); + if (alg === "ssh-dss") + return "dsa"; + else if (alg === "ssh-rsa") + return "rsa"; + else if (alg === "ssh-ed25519") + return "ed25519"; + else if (alg === "ssh-curve25519") + return "curve25519"; + else if (alg.match(/^ecdsa-sha2-/)) + return "ecdsa"; + else + throw new Error("Unknown algorithm " + alg); + } + function keyTypeToAlg(key) { + assert.object(key); + if (key.type === "dsa") + return "ssh-dss"; + else if (key.type === "rsa") + return "ssh-rsa"; + else if (key.type === "ed25519") + return "ssh-ed25519"; + else if (key.type === "curve25519") + return "ssh-curve25519"; + else if (key.type === "ecdsa") + return "ecdsa-sha2-" + key.part.curve.data.toString(); + else + throw new Error("Unknown key type " + key.type); + } + function read(partial, type, buf, options) { + if (typeof buf === "string") + buf = Buffer2.from(buf); + assert.buffer(buf, "buf"); + var key = {}; + var parts = key.parts = []; + var sshbuf = new SSHBuffer({ buffer: buf }); + var alg = sshbuf.readString(); + assert.ok(!sshbuf.atEnd(), "key must have at least one part"); + key.type = algToKeyType(alg); + var partCount = algs.info[key.type].parts.length; + if (type && type === "private") + partCount = algs.privInfo[key.type].parts.length; + while (!sshbuf.atEnd() && parts.length < partCount) + parts.push(sshbuf.readPart()); + while (!partial && !sshbuf.atEnd()) + parts.push(sshbuf.readPart()); + assert.ok( + parts.length >= 1, + "key must have at least one part" + ); + assert.ok( + partial || sshbuf.atEnd(), + "leftover bytes at end of key" + ); + var Constructor = Key; + var algInfo = algs.info[key.type]; + if (type === "private" || algInfo.parts.length !== parts.length) { + algInfo = algs.privInfo[key.type]; + Constructor = PrivateKey; + } + assert.strictEqual(algInfo.parts.length, parts.length); + if (key.type === "ecdsa") { + var res = /^ecdsa-sha2-(.+)$/.exec(alg); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + var normalized = true; + for (var i2 = 0; i2 < algInfo.parts.length; ++i2) { + var p = parts[i2]; + p.name = algInfo.parts[i2]; + if (key.type === "ed25519" && p.name === "k") + p.data = p.data.slice(0, 32); + if (p.name !== "curve" && algInfo.normalize !== false) { + var nd; + if (key.type === "ed25519") { + nd = utils.zeroPadToLength(p.data, 32); + } else { + nd = utils.mpNormalize(p.data); + } + if (nd.toString("binary") !== p.data.toString("binary")) { + p.data = nd; + normalized = false; + } + } + } + if (normalized) + key._rfc4253Cache = sshbuf.toBuffer(); + if (partial && typeof partial === "object") { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + return new Constructor(key); + } + function write(key, options) { + assert.object(key); + var alg = keyTypeToAlg(key); + var i2; + var algInfo = algs.info[key.type]; + if (PrivateKey.isPrivateKey(key)) + algInfo = algs.privInfo[key.type]; + var parts = algInfo.parts; + var buf = new SSHBuffer({}); + buf.writeString(alg); + for (i2 = 0; i2 < parts.length; ++i2) { + var data = key.part[parts[i2]].data; + if (algInfo.normalize !== false) { + if (key.type === "ed25519") + data = utils.zeroPadToLength(data, 32); + else + data = utils.mpNormalize(data); + } + if (key.type === "ed25519" && parts[i2] === "k") + data = Buffer2.concat([data, key.part.A.data]); + buf.writeBuffer(data); + } + return buf.toBuffer(); + } + } +}); + +// node_modules/bcrypt-pbkdf/index.js +var require_bcrypt_pbkdf = __commonJS({ + "node_modules/bcrypt-pbkdf/index.js"(exports2, module2) { + "use strict"; + var crypto_hash_sha512 = require_nacl_fast().lowlevel.crypto_hash; + var BLF_J = 0; + var Blowfish = function() { + this.S = [ + new Uint32Array([ + 3509652390, + 2564797868, + 805139163, + 3491422135, + 3101798381, + 1780907670, + 3128725573, + 4046225305, + 614570311, + 3012652279, + 134345442, + 2240740374, + 1667834072, + 1901547113, + 2757295779, + 4103290238, + 227898511, + 1921955416, + 1904987480, + 2182433518, + 2069144605, + 3260701109, + 2620446009, + 720527379, + 3318853667, + 677414384, + 3393288472, + 3101374703, + 2390351024, + 1614419982, + 1822297739, + 2954791486, + 3608508353, + 3174124327, + 2024746970, + 1432378464, + 3864339955, + 2857741204, + 1464375394, + 1676153920, + 1439316330, + 715854006, + 3033291828, + 289532110, + 2706671279, + 2087905683, + 3018724369, + 1668267050, + 732546397, + 1947742710, + 3462151702, + 2609353502, + 2950085171, + 1814351708, + 2050118529, + 680887927, + 999245976, + 1800124847, + 3300911131, + 1713906067, + 1641548236, + 4213287313, + 1216130144, + 1575780402, + 4018429277, + 3917837745, + 3693486850, + 3949271944, + 596196993, + 3549867205, + 258830323, + 2213823033, + 772490370, + 2760122372, + 1774776394, + 2652871518, + 566650946, + 4142492826, + 1728879713, + 2882767088, + 1783734482, + 3629395816, + 2517608232, + 2874225571, + 1861159788, + 326777828, + 3124490320, + 2130389656, + 2716951837, + 967770486, + 1724537150, + 2185432712, + 2364442137, + 1164943284, + 2105845187, + 998989502, + 3765401048, + 2244026483, + 1075463327, + 1455516326, + 1322494562, + 910128902, + 469688178, + 1117454909, + 936433444, + 3490320968, + 3675253459, + 1240580251, + 122909385, + 2157517691, + 634681816, + 4142456567, + 3825094682, + 3061402683, + 2540495037, + 79693498, + 3249098678, + 1084186820, + 1583128258, + 426386531, + 1761308591, + 1047286709, + 322548459, + 995290223, + 1845252383, + 2603652396, + 3431023940, + 2942221577, + 3202600964, + 3727903485, + 1712269319, + 422464435, + 3234572375, + 1170764815, + 3523960633, + 3117677531, + 1434042557, + 442511882, + 3600875718, + 1076654713, + 1738483198, + 4213154764, + 2393238008, + 3677496056, + 1014306527, + 4251020053, + 793779912, + 2902807211, + 842905082, + 4246964064, + 1395751752, + 1040244610, + 2656851899, + 3396308128, + 445077038, + 3742853595, + 3577915638, + 679411651, + 2892444358, + 2354009459, + 1767581616, + 3150600392, + 3791627101, + 3102740896, + 284835224, + 4246832056, + 1258075500, + 768725851, + 2589189241, + 3069724005, + 3532540348, + 1274779536, + 3789419226, + 2764799539, + 1660621633, + 3471099624, + 4011903706, + 913787905, + 3497959166, + 737222580, + 2514213453, + 2928710040, + 3937242737, + 1804850592, + 3499020752, + 2949064160, + 2386320175, + 2390070455, + 2415321851, + 4061277028, + 2290661394, + 2416832540, + 1336762016, + 1754252060, + 3520065937, + 3014181293, + 791618072, + 3188594551, + 3933548030, + 2332172193, + 3852520463, + 3043980520, + 413987798, + 3465142937, + 3030929376, + 4245938359, + 2093235073, + 3534596313, + 375366246, + 2157278981, + 2479649556, + 555357303, + 3870105701, + 2008414854, + 3344188149, + 4221384143, + 3956125452, + 2067696032, + 3594591187, + 2921233993, + 2428461, + 544322398, + 577241275, + 1471733935, + 610547355, + 4027169054, + 1432588573, + 1507829418, + 2025931657, + 3646575487, + 545086370, + 48609733, + 2200306550, + 1653985193, + 298326376, + 1316178497, + 3007786442, + 2064951626, + 458293330, + 2589141269, + 3591329599, + 3164325604, + 727753846, + 2179363840, + 146436021, + 1461446943, + 4069977195, + 705550613, + 3059967265, + 3887724982, + 4281599278, + 3313849956, + 1404054877, + 2845806497, + 146425753, + 1854211946 + ]), + new Uint32Array([ + 1266315497, + 3048417604, + 3681880366, + 3289982499, + 290971e4, + 1235738493, + 2632868024, + 2414719590, + 3970600049, + 1771706367, + 1449415276, + 3266420449, + 422970021, + 1963543593, + 2690192192, + 3826793022, + 1062508698, + 1531092325, + 1804592342, + 2583117782, + 2714934279, + 4024971509, + 1294809318, + 4028980673, + 1289560198, + 2221992742, + 1669523910, + 35572830, + 157838143, + 1052438473, + 1016535060, + 1802137761, + 1753167236, + 1386275462, + 3080475397, + 2857371447, + 1040679964, + 2145300060, + 2390574316, + 1461121720, + 2956646967, + 4031777805, + 4028374788, + 33600511, + 2920084762, + 1018524850, + 629373528, + 3691585981, + 3515945977, + 2091462646, + 2486323059, + 586499841, + 988145025, + 935516892, + 3367335476, + 2599673255, + 2839830854, + 265290510, + 3972581182, + 2759138881, + 3795373465, + 1005194799, + 847297441, + 406762289, + 1314163512, + 1332590856, + 1866599683, + 4127851711, + 750260880, + 613907577, + 1450815602, + 3165620655, + 3734664991, + 3650291728, + 3012275730, + 3704569646, + 1427272223, + 778793252, + 1343938022, + 2676280711, + 2052605720, + 1946737175, + 3164576444, + 3914038668, + 3967478842, + 3682934266, + 1661551462, + 3294938066, + 4011595847, + 840292616, + 3712170807, + 616741398, + 312560963, + 711312465, + 1351876610, + 322626781, + 1910503582, + 271666773, + 2175563734, + 1594956187, + 70604529, + 3617834859, + 1007753275, + 1495573769, + 4069517037, + 2549218298, + 2663038764, + 504708206, + 2263041392, + 3941167025, + 2249088522, + 1514023603, + 1998579484, + 1312622330, + 694541497, + 2582060303, + 2151582166, + 1382467621, + 776784248, + 2618340202, + 3323268794, + 2497899128, + 2784771155, + 503983604, + 4076293799, + 907881277, + 423175695, + 432175456, + 1378068232, + 4145222326, + 3954048622, + 3938656102, + 3820766613, + 2793130115, + 2977904593, + 26017576, + 3274890735, + 3194772133, + 1700274565, + 1756076034, + 4006520079, + 3677328699, + 720338349, + 1533947780, + 354530856, + 688349552, + 3973924725, + 1637815568, + 332179504, + 3949051286, + 53804574, + 2852348879, + 3044236432, + 1282449977, + 3583942155, + 3416972820, + 4006381244, + 1617046695, + 2628476075, + 3002303598, + 1686838959, + 431878346, + 2686675385, + 1700445008, + 1080580658, + 1009431731, + 832498133, + 3223435511, + 2605976345, + 2271191193, + 2516031870, + 1648197032, + 4164389018, + 2548247927, + 300782431, + 375919233, + 238389289, + 3353747414, + 2531188641, + 2019080857, + 1475708069, + 455242339, + 2609103871, + 448939670, + 3451063019, + 1395535956, + 2413381860, + 1841049896, + 1491858159, + 885456874, + 4264095073, + 4001119347, + 1565136089, + 3898914787, + 1108368660, + 540939232, + 1173283510, + 2745871338, + 3681308437, + 4207628240, + 3343053890, + 4016749493, + 1699691293, + 1103962373, + 3625875870, + 2256883143, + 3830138730, + 1031889488, + 3479347698, + 1535977030, + 4236805024, + 3251091107, + 2132092099, + 1774941330, + 1199868427, + 1452454533, + 157007616, + 2904115357, + 342012276, + 595725824, + 1480756522, + 206960106, + 497939518, + 591360097, + 863170706, + 2375253569, + 3596610801, + 1814182875, + 2094937945, + 3421402208, + 1082520231, + 3463918190, + 2785509508, + 435703966, + 3908032597, + 1641649973, + 2842273706, + 3305899714, + 1510255612, + 2148256476, + 2655287854, + 3276092548, + 4258621189, + 236887753, + 3681803219, + 274041037, + 1734335097, + 3815195456, + 3317970021, + 1899903192, + 1026095262, + 4050517792, + 356393447, + 2410691914, + 3873677099, + 3682840055 + ]), + new Uint32Array([ + 3913112168, + 2491498743, + 4132185628, + 2489919796, + 1091903735, + 1979897079, + 3170134830, + 3567386728, + 3557303409, + 857797738, + 1136121015, + 1342202287, + 507115054, + 2535736646, + 337727348, + 3213592640, + 1301675037, + 2528481711, + 1895095763, + 1721773893, + 3216771564, + 62756741, + 2142006736, + 835421444, + 2531993523, + 1442658625, + 3659876326, + 2882144922, + 676362277, + 1392781812, + 170690266, + 3921047035, + 1759253602, + 3611846912, + 1745797284, + 664899054, + 1329594018, + 3901205900, + 3045908486, + 2062866102, + 2865634940, + 3543621612, + 3464012697, + 1080764994, + 553557557, + 3656615353, + 3996768171, + 991055499, + 499776247, + 1265440854, + 648242737, + 3940784050, + 980351604, + 3713745714, + 1749149687, + 3396870395, + 4211799374, + 3640570775, + 1161844396, + 3125318951, + 1431517754, + 545492359, + 4268468663, + 3499529547, + 1437099964, + 2702547544, + 3433638243, + 2581715763, + 2787789398, + 1060185593, + 1593081372, + 2418618748, + 4260947970, + 69676912, + 2159744348, + 86519011, + 2512459080, + 3838209314, + 1220612927, + 3339683548, + 133810670, + 1090789135, + 1078426020, + 1569222167, + 845107691, + 3583754449, + 4072456591, + 1091646820, + 628848692, + 1613405280, + 3757631651, + 526609435, + 236106946, + 48312990, + 2942717905, + 3402727701, + 1797494240, + 859738849, + 992217954, + 4005476642, + 2243076622, + 3870952857, + 3732016268, + 765654824, + 3490871365, + 2511836413, + 1685915746, + 3888969200, + 1414112111, + 2273134842, + 3281911079, + 4080962846, + 172450625, + 2569994100, + 980381355, + 4109958455, + 2819808352, + 2716589560, + 2568741196, + 3681446669, + 3329971472, + 1835478071, + 660984891, + 3704678404, + 4045999559, + 3422617507, + 3040415634, + 1762651403, + 1719377915, + 3470491036, + 2693910283, + 3642056355, + 3138596744, + 1364962596, + 2073328063, + 1983633131, + 926494387, + 3423689081, + 2150032023, + 4096667949, + 1749200295, + 3328846651, + 309677260, + 2016342300, + 1779581495, + 3079819751, + 111262694, + 1274766160, + 443224088, + 298511866, + 1025883608, + 3806446537, + 1145181785, + 168956806, + 3641502830, + 3584813610, + 1689216846, + 3666258015, + 3200248200, + 1692713982, + 2646376535, + 4042768518, + 1618508792, + 1610833997, + 3523052358, + 4130873264, + 2001055236, + 3610705100, + 2202168115, + 4028541809, + 2961195399, + 1006657119, + 2006996926, + 3186142756, + 1430667929, + 3210227297, + 1314452623, + 4074634658, + 4101304120, + 2273951170, + 1399257539, + 3367210612, + 3027628629, + 1190975929, + 2062231137, + 2333990788, + 2221543033, + 2438960610, + 1181637006, + 548689776, + 2362791313, + 3372408396, + 3104550113, + 3145860560, + 296247880, + 1970579870, + 3078560182, + 3769228297, + 1714227617, + 3291629107, + 3898220290, + 166772364, + 1251581989, + 493813264, + 448347421, + 195405023, + 2709975567, + 677966185, + 3703036547, + 1463355134, + 2715995803, + 1338867538, + 1343315457, + 2802222074, + 2684532164, + 233230375, + 2599980071, + 2000651841, + 3277868038, + 1638401717, + 4028070440, + 3237316320, + 6314154, + 819756386, + 300326615, + 590932579, + 1405279636, + 3267499572, + 3150704214, + 2428286686, + 3959192993, + 3461946742, + 1862657033, + 1266418056, + 963775037, + 2089974820, + 2263052895, + 1917689273, + 448879540, + 3550394620, + 3981727096, + 150775221, + 3627908307, + 1303187396, + 508620638, + 2975983352, + 2726630617, + 1817252668, + 1876281319, + 1457606340, + 908771278, + 3720792119, + 3617206836, + 2455994898, + 1729034894, + 1080033504 + ]), + new Uint32Array([ + 976866871, + 3556439503, + 2881648439, + 1522871579, + 1555064734, + 1336096578, + 3548522304, + 2579274686, + 3574697629, + 3205460757, + 3593280638, + 3338716283, + 3079412587, + 564236357, + 2993598910, + 1781952180, + 1464380207, + 3163844217, + 3332601554, + 1699332808, + 1393555694, + 1183702653, + 3581086237, + 1288719814, + 691649499, + 2847557200, + 2895455976, + 3193889540, + 2717570544, + 1781354906, + 1676643554, + 2592534050, + 3230253752, + 1126444790, + 2770207658, + 2633158820, + 2210423226, + 2615765581, + 2414155088, + 3127139286, + 673620729, + 2805611233, + 1269405062, + 4015350505, + 3341807571, + 4149409754, + 1057255273, + 2012875353, + 2162469141, + 2276492801, + 2601117357, + 993977747, + 3918593370, + 2654263191, + 753973209, + 36408145, + 2530585658, + 25011837, + 3520020182, + 2088578344, + 530523599, + 2918365339, + 1524020338, + 1518925132, + 3760827505, + 3759777254, + 1202760957, + 3985898139, + 3906192525, + 674977740, + 4174734889, + 2031300136, + 2019492241, + 3983892565, + 4153806404, + 3822280332, + 352677332, + 2297720250, + 60907813, + 90501309, + 3286998549, + 1016092578, + 2535922412, + 2839152426, + 457141659, + 509813237, + 4120667899, + 652014361, + 1966332200, + 2975202805, + 55981186, + 2327461051, + 676427537, + 3255491064, + 2882294119, + 3433927263, + 1307055953, + 942726286, + 933058658, + 2468411793, + 3933900994, + 4215176142, + 1361170020, + 2001714738, + 2830558078, + 3274259782, + 1222529897, + 1679025792, + 2729314320, + 3714953764, + 1770335741, + 151462246, + 3013232138, + 1682292957, + 1483529935, + 471910574, + 1539241949, + 458788160, + 3436315007, + 1807016891, + 3718408830, + 978976581, + 1043663428, + 3165965781, + 1927990952, + 4200891579, + 2372276910, + 3208408903, + 3533431907, + 1412390302, + 2931980059, + 4132332400, + 1947078029, + 3881505623, + 4168226417, + 2941484381, + 1077988104, + 1320477388, + 886195818, + 18198404, + 3786409e3, + 2509781533, + 112762804, + 3463356488, + 1866414978, + 891333506, + 18488651, + 661792760, + 1628790961, + 3885187036, + 3141171499, + 876946877, + 2693282273, + 1372485963, + 791857591, + 2686433993, + 3759982718, + 3167212022, + 3472953795, + 2716379847, + 445679433, + 3561995674, + 3504004811, + 3574258232, + 54117162, + 3331405415, + 2381918588, + 3769707343, + 4154350007, + 1140177722, + 4074052095, + 668550556, + 3214352940, + 367459370, + 261225585, + 2610173221, + 4209349473, + 3468074219, + 3265815641, + 314222801, + 3066103646, + 3808782860, + 282218597, + 3406013506, + 3773591054, + 379116347, + 1285071038, + 846784868, + 2669647154, + 3771962079, + 3550491691, + 2305946142, + 453669953, + 1268987020, + 3317592352, + 3279303384, + 3744833421, + 2610507566, + 3859509063, + 266596637, + 3847019092, + 517658769, + 3462560207, + 3443424879, + 370717030, + 4247526661, + 2224018117, + 4143653529, + 4112773975, + 2788324899, + 2477274417, + 1456262402, + 2901442914, + 1517677493, + 1846949527, + 2295493580, + 3734397586, + 2176403920, + 1280348187, + 1908823572, + 3871786941, + 846861322, + 1172426758, + 3287448474, + 3383383037, + 1655181056, + 3139813346, + 901632758, + 1897031941, + 2986607138, + 3066810236, + 3447102507, + 1393639104, + 373351379, + 950779232, + 625454576, + 3124240540, + 4148612726, + 2007998917, + 544563296, + 2244738638, + 2330496472, + 2058025392, + 1291430526, + 424198748, + 50039436, + 29584100, + 3605783033, + 2429876329, + 2791104160, + 1057563949, + 3255363231, + 3075367218, + 3463963227, + 1469046755, + 985887462 + ]) + ]; + this.P = new Uint32Array([ + 608135816, + 2242054355, + 320440878, + 57701188, + 2752067618, + 698298832, + 137296536, + 3964562569, + 1160258022, + 953160567, + 3193202383, + 887688300, + 3232508343, + 3380367581, + 1065670069, + 3041331479, + 2450970073, + 2306472731 + ]); + }; + function F(S, x8, i2) { + return (S[0][x8[i2 + 3]] + S[1][x8[i2 + 2]] ^ S[2][x8[i2 + 1]]) + S[3][x8[i2]]; + } + Blowfish.prototype.encipher = function(x, x8) { + if (x8 === void 0) { + x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + } + x[0] ^= this.P[0]; + for (var i2 = 1; i2 < 16; i2 += 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i2]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i2 + 1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[17]; + x[1] = t; + }; + Blowfish.prototype.decipher = function(x) { + var x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + x[0] ^= this.P[17]; + for (var i2 = 16; i2 > 0; i2 -= 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i2]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i2 - 1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[0]; + x[1] = t; + }; + function stream2word(data, databytes) { + var i2, temp = 0; + for (i2 = 0; i2 < 4; i2++, BLF_J++) { + if (BLF_J >= databytes) BLF_J = 0; + temp = temp << 8 | data[BLF_J]; + } + return temp; + } + Blowfish.prototype.expand0state = function(key, keybytes) { + var d = new Uint32Array(2), i2, k; + var d8 = new Uint8Array(d.buffer); + for (i2 = 0, BLF_J = 0; i2 < 18; i2++) { + this.P[i2] ^= stream2word(key, keybytes); + } + BLF_J = 0; + for (i2 = 0; i2 < 18; i2 += 2) { + this.encipher(d, d8); + this.P[i2] = d[0]; + this.P[i2 + 1] = d[1]; + } + for (i2 = 0; i2 < 4; i2++) { + for (k = 0; k < 256; k += 2) { + this.encipher(d, d8); + this.S[i2][k] = d[0]; + this.S[i2][k + 1] = d[1]; + } + } + }; + Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { + var d = new Uint32Array(2), i2, k; + for (i2 = 0, BLF_J = 0; i2 < 18; i2++) { + this.P[i2] ^= stream2word(key, keybytes); + } + for (i2 = 0, BLF_J = 0; i2 < 18; i2 += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.P[i2] = d[0]; + this.P[i2 + 1] = d[1]; + } + for (i2 = 0; i2 < 4; i2++) { + for (k = 0; k < 256; k += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.S[i2][k] = d[0]; + this.S[i2][k + 1] = d[1]; + } + } + BLF_J = 0; + }; + Blowfish.prototype.enc = function(data, blocks) { + for (var i2 = 0; i2 < blocks; i2++) { + this.encipher(data.subarray(i2 * 2)); + } + }; + Blowfish.prototype.dec = function(data, blocks) { + for (var i2 = 0; i2 < blocks; i2++) { + this.decipher(data.subarray(i2 * 2)); + } + }; + var BCRYPT_BLOCKS = 8; + var BCRYPT_HASHSIZE = 32; + function bcrypt_hash(sha2pass, sha2salt, out) { + var state = new Blowfish(), cdata = new Uint32Array(BCRYPT_BLOCKS), i2, ciphertext = new Uint8Array([ + 79, + 120, + 121, + 99, + 104, + 114, + 111, + 109, + 97, + 116, + 105, + 99, + 66, + 108, + 111, + 119, + 102, + 105, + 115, + 104, + 83, + 119, + 97, + 116, + 68, + 121, + 110, + 97, + 109, + 105, + 116, + 101 + ]); + state.expandstate(sha2salt, 64, sha2pass, 64); + for (i2 = 0; i2 < 64; i2++) { + state.expand0state(sha2salt, 64); + state.expand0state(sha2pass, 64); + } + for (i2 = 0; i2 < BCRYPT_BLOCKS; i2++) + cdata[i2] = stream2word(ciphertext, ciphertext.byteLength); + for (i2 = 0; i2 < 64; i2++) + state.enc(cdata, cdata.byteLength / 8); + for (i2 = 0; i2 < BCRYPT_BLOCKS; i2++) { + out[4 * i2 + 3] = cdata[i2] >>> 24; + out[4 * i2 + 2] = cdata[i2] >>> 16; + out[4 * i2 + 1] = cdata[i2] >>> 8; + out[4 * i2 + 0] = cdata[i2]; + } + } + function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { + var sha2pass = new Uint8Array(64), sha2salt = new Uint8Array(64), out = new Uint8Array(BCRYPT_HASHSIZE), tmpout = new Uint8Array(BCRYPT_HASHSIZE), countsalt = new Uint8Array(saltlen + 4), i2, j, amt, stride, dest, count, origkeylen = keylen; + if (rounds < 1) + return -1; + if (passlen === 0 || saltlen === 0 || keylen === 0 || keylen > out.byteLength * out.byteLength || saltlen > 1 << 20) + return -1; + stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); + amt = Math.floor((keylen + stride - 1) / stride); + for (i2 = 0; i2 < saltlen; i2++) + countsalt[i2] = salt[i2]; + crypto_hash_sha512(sha2pass, pass, passlen); + for (count = 1; keylen > 0; count++) { + countsalt[saltlen + 0] = count >>> 24; + countsalt[saltlen + 1] = count >>> 16; + countsalt[saltlen + 2] = count >>> 8; + countsalt[saltlen + 3] = count; + crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (i2 = out.byteLength; i2--; ) + out[i2] = tmpout[i2]; + for (i2 = 1; i2 < rounds; i2++) { + crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (j = 0; j < out.byteLength; j++) + out[j] ^= tmpout[j]; + } + amt = Math.min(amt, keylen); + for (i2 = 0; i2 < amt; i2++) { + dest = i2 * stride + (count - 1); + if (dest >= origkeylen) + break; + key[dest] = out[i2]; + } + keylen -= i2; + } + return 0; + } + module2.exports = { + BLOCKS: BCRYPT_BLOCKS, + HASHSIZE: BCRYPT_HASHSIZE, + hash: bcrypt_hash, + pbkdf: bcrypt_pbkdf + }; + } +}); + +// node_modules/sshpk/lib/formats/ssh-private.js +var require_ssh_private = __commonJS({ + "node_modules/sshpk/lib/formats/ssh-private.js"(exports2, module2) { + module2.exports = { + read, + readSSHPrivate, + write + }; + var assert = require_assert(); + var asn1 = require_lib(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var crypto2 = require("crypto"); + var Key = require_key(); + var PrivateKey = require_private_key(); + var pem = require_pem(); + var rfc4253 = require_rfc4253(); + var SSHBuffer = require_ssh_buffer(); + var errors = require_errors(); + var bcrypt; + function read(buf, options) { + return pem.read(buf, options); + } + var MAGIC = "openssh-key-v1"; + function readSSHPrivate(type, buf, options) { + buf = new SSHBuffer({ buffer: buf }); + var magic = buf.readCString(); + assert.strictEqual(magic, MAGIC, "bad magic string"); + var cipher = buf.readString(); + var kdf = buf.readString(); + var kdfOpts = buf.readBuffer(); + var nkeys = buf.readInt(); + if (nkeys !== 1) { + throw new Error("OpenSSH-format key file contains multiple keys: this is unsupported."); + } + var pubKey = buf.readBuffer(); + if (type === "public") { + assert.ok(buf.atEnd(), "excess bytes left after key"); + return rfc4253.read(pubKey); + } + var privKeyBlob = buf.readBuffer(); + assert.ok(buf.atEnd(), "excess bytes left after key"); + var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); + switch (kdf) { + case "none": + if (cipher !== "none") { + throw new Error('OpenSSH-format key uses KDF "none" but specifies a cipher other than "none"'); + } + break; + case "bcrypt": + var salt = kdfOptsBuf.readBuffer(); + var rounds = kdfOptsBuf.readInt(); + var cinf = utils.opensshCipherInfo(cipher); + if (bcrypt === void 0) { + bcrypt = require_bcrypt_pbkdf(); + } + if (typeof options.passphrase === "string") { + options.passphrase = Buffer2.from( + options.passphrase, + "utf-8" + ); + } + if (!Buffer2.isBuffer(options.passphrase)) { + throw new errors.KeyEncryptedError( + options.filename, + "OpenSSH" + ); + } + var pass = new Uint8Array(options.passphrase); + var salti = new Uint8Array(salt); + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf( + pass, + pass.length, + salti, + salti.length, + out, + out.length, + rounds + ); + if (res !== 0) { + throw new Error("bcrypt_pbkdf function returned failure, parameters invalid"); + } + out = Buffer2.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + var cipherStream = crypto2.createDecipheriv( + cinf.opensslName, + ckey, + iv + ); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once("error", function(e) { + if (e.toString().indexOf("bad decrypt") !== -1) { + throw new Error("Incorrect passphrase supplied, could not decrypt key"); + } + throw e; + }); + cipherStream.write(privKeyBlob); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privKeyBlob = Buffer2.concat(chunks); + break; + default: + throw new Error( + 'OpenSSH-format key uses unknown KDF "' + kdf + '"' + ); + } + buf = new SSHBuffer({ buffer: privKeyBlob }); + var checkInt1 = buf.readInt(); + var checkInt2 = buf.readInt(); + if (checkInt1 !== checkInt2) { + throw new Error("Incorrect passphrase supplied, could not decrypt key"); + } + var ret = {}; + var key = rfc4253.readInternal(ret, "private", buf.remainder()); + buf.skip(ret.consumed); + var comment = buf.readString(); + key.comment = comment; + return key; + } + function write(key, options) { + var pubKey; + if (PrivateKey.isPrivateKey(key)) + pubKey = key.toPublic(); + else + pubKey = key; + var cipher = "none"; + var kdf = "none"; + var kdfopts = Buffer2.alloc(0); + var cinf = { blockSize: 8 }; + var passphrase; + if (options !== void 0) { + passphrase = options.passphrase; + if (typeof passphrase === "string") + passphrase = Buffer2.from(passphrase, "utf-8"); + if (passphrase !== void 0) { + assert.buffer(passphrase, "options.passphrase"); + assert.optionalString(options.cipher, "options.cipher"); + cipher = options.cipher; + if (cipher === void 0) + cipher = "aes128-ctr"; + cinf = utils.opensshCipherInfo(cipher); + kdf = "bcrypt"; + } + } + var privBuf; + if (PrivateKey.isPrivateKey(key)) { + privBuf = new SSHBuffer({}); + var checkInt = crypto2.randomBytes(4).readUInt32BE(0); + privBuf.writeInt(checkInt); + privBuf.writeInt(checkInt); + privBuf.write(key.toBuffer("rfc4253")); + privBuf.writeString(key.comment || ""); + var n = 1; + while (privBuf._offset % cinf.blockSize !== 0) + privBuf.writeChar(n++); + privBuf = privBuf.toBuffer(); + } + switch (kdf) { + case "none": + break; + case "bcrypt": + var salt = crypto2.randomBytes(16); + var rounds = 16; + var kdfssh = new SSHBuffer({}); + kdfssh.writeBuffer(salt); + kdfssh.writeInt(rounds); + kdfopts = kdfssh.toBuffer(); + if (bcrypt === void 0) { + bcrypt = require_bcrypt_pbkdf(); + } + var pass = new Uint8Array(passphrase); + var salti = new Uint8Array(salt); + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf( + pass, + pass.length, + salti, + salti.length, + out, + out.length, + rounds + ); + if (res !== 0) { + throw new Error("bcrypt_pbkdf function returned failure, parameters invalid"); + } + out = Buffer2.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + var cipherStream = crypto2.createCipheriv( + cinf.opensslName, + ckey, + iv + ); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once("error", function(e) { + throw e; + }); + cipherStream.write(privBuf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privBuf = Buffer2.concat(chunks); + break; + default: + throw new Error("Unsupported kdf " + kdf); + } + var buf = new SSHBuffer({}); + buf.writeCString(MAGIC); + buf.writeString(cipher); + buf.writeString(kdf); + buf.writeBuffer(kdfopts); + buf.writeInt(1); + buf.writeBuffer(pubKey.toBuffer("rfc4253")); + if (privBuf) + buf.writeBuffer(privBuf); + buf = buf.toBuffer(); + var header; + if (PrivateKey.isPrivateKey(key)) + header = "OPENSSH PRIVATE KEY"; + else + header = "OPENSSH PUBLIC KEY"; + var tmp = buf.toString("base64"); + var len = tmp.length + tmp.length / 70 + 18 + 16 + header.length * 2 + 10; + buf = Buffer2.alloc(len); + var o = 0; + o += buf.write("-----BEGIN " + header + "-----\n", o); + for (var i2 = 0; i2 < tmp.length; ) { + var limit = i2 + 70; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i2, limit), o); + buf[o++] = 10; + i2 = limit; + } + o += buf.write("-----END " + header + "-----\n", o); + return buf.slice(0, o); + } + } +}); + +// node_modules/sshpk/lib/formats/pem.js +var require_pem = __commonJS({ + "node_modules/sshpk/lib/formats/pem.js"(exports2, module2) { + module2.exports = { + read, + write + }; + var assert = require_assert(); + var asn1 = require_lib(); + var crypto2 = require("crypto"); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var pkcs1 = require_pkcs1(); + var pkcs8 = require_pkcs8(); + var sshpriv = require_ssh_private(); + var rfc4253 = require_rfc4253(); + var errors = require_errors(); + var OID_PBES2 = "1.2.840.113549.1.5.13"; + var OID_PBKDF2 = "1.2.840.113549.1.5.12"; + var OID_TO_CIPHER = { + "1.2.840.113549.3.7": "3des-cbc", + "2.16.840.1.101.3.4.1.2": "aes128-cbc", + "2.16.840.1.101.3.4.1.42": "aes256-cbc" + }; + var CIPHER_TO_OID = {}; + Object.keys(OID_TO_CIPHER).forEach(function(k) { + CIPHER_TO_OID[OID_TO_CIPHER[k]] = k; + }); + var OID_TO_HASH = { + "1.2.840.113549.2.7": "sha1", + "1.2.840.113549.2.9": "sha256", + "1.2.840.113549.2.11": "sha512" + }; + var HASH_TO_OID = {}; + Object.keys(OID_TO_HASH).forEach(function(k) { + HASH_TO_OID[OID_TO_HASH[k]] = k; + }); + function read(buf, options, forceType) { + var input = buf; + if (typeof buf !== "string") { + assert.buffer(buf, "buf"); + buf = buf.toString("ascii"); + } + var lines = buf.trim().split(/[\r\n]+/g); + var m; + var si = -1; + while (!m && si < lines.length) { + m = lines[++si].match( + /*JSSTYLED*/ + /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/ + ); + } + assert.ok(m, "invalid PEM header"); + var m2; + var ei = lines.length; + while (!m2 && ei > 0) { + m2 = lines[--ei].match( + /*JSSTYLED*/ + /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/ + ); + } + assert.ok(m2, "invalid PEM footer"); + assert.equal(m[2], m2[2]); + var type = m[2].toLowerCase(); + var alg; + if (m[1]) { + assert.equal(m[1], m2[1], "PEM header and footer mismatch"); + alg = m[1].trim(); + } + lines = lines.slice(si, ei + 1); + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match( + /*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/ + ); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + lines = lines.slice(0, -1).join(""); + buf = Buffer2.from(lines, "base64"); + var cipher, key, iv; + if (headers["proc-type"]) { + var parts = headers["proc-type"].split(","); + if (parts[0] === "4" && parts[1] === "ENCRYPTED") { + if (typeof options.passphrase === "string") { + options.passphrase = Buffer2.from( + options.passphrase, + "utf-8" + ); + } + if (!Buffer2.isBuffer(options.passphrase)) { + throw new errors.KeyEncryptedError( + options.filename, + "PEM" + ); + } else { + parts = headers["dek-info"].split(","); + assert.ok(parts.length === 2); + cipher = parts[0].toLowerCase(); + iv = Buffer2.from(parts[1], "hex"); + key = utils.opensslKeyDeriv( + cipher, + iv, + options.passphrase, + 1 + ).key; + } + } + } + if (alg && alg.toLowerCase() === "encrypted") { + var eder = new asn1.BerReader(buf); + var pbesEnd; + eder.readSequence(); + eder.readSequence(); + pbesEnd = eder.offset + eder.length; + var method = eder.readOID(); + if (method !== OID_PBES2) { + throw new Error("Unsupported PEM/PKCS8 encryption scheme: " + method); + } + eder.readSequence(); + eder.readSequence(); + var kdfEnd = eder.offset + eder.length; + var kdfOid = eder.readOID(); + if (kdfOid !== OID_PBKDF2) + throw new Error("Unsupported PBES2 KDF: " + kdfOid); + eder.readSequence(); + var salt = eder.readString(asn1.Ber.OctetString, true); + var iterations = eder.readInt(); + var hashAlg = "sha1"; + if (eder.offset < kdfEnd) { + eder.readSequence(); + var hashAlgOid = eder.readOID(); + hashAlg = OID_TO_HASH[hashAlgOid]; + if (hashAlg === void 0) { + throw new Error("Unsupported PBKDF2 hash: " + hashAlgOid); + } + } + eder._offset = kdfEnd; + eder.readSequence(); + var cipherOid = eder.readOID(); + cipher = OID_TO_CIPHER[cipherOid]; + if (cipher === void 0) { + throw new Error("Unsupported PBES2 cipher: " + cipherOid); + } + iv = eder.readString(asn1.Ber.OctetString, true); + eder._offset = pbesEnd; + buf = eder.readString(asn1.Ber.OctetString, true); + if (typeof options.passphrase === "string") { + options.passphrase = Buffer2.from( + options.passphrase, + "utf-8" + ); + } + if (!Buffer2.isBuffer(options.passphrase)) { + throw new errors.KeyEncryptedError( + options.filename, + "PEM" + ); + } + var cinfo = utils.opensshCipherInfo(cipher); + cipher = cinfo.opensslName; + key = utils.pbkdf2( + hashAlg, + salt, + iterations, + cinfo.keySize, + options.passphrase + ); + alg = void 0; + } + if (cipher && key && iv) { + var cipherStream = crypto2.createDecipheriv(cipher, key, iv); + var chunk, chunks = []; + cipherStream.once("error", function(e) { + if (e.toString().indexOf("bad decrypt") !== -1) { + throw new Error("Incorrect passphrase supplied, could not decrypt key"); + } + throw e; + }); + cipherStream.write(buf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + buf = Buffer2.concat(chunks); + } + if (alg && alg.toLowerCase() === "openssh") + return sshpriv.readSSHPrivate(type, buf, options); + if (alg && alg.toLowerCase() === "ssh2") + return rfc4253.readType(type, buf, options); + var der = new asn1.BerReader(buf); + der.originalInput = input; + der.readSequence(); + if (alg) { + if (forceType) + assert.strictEqual(forceType, "pkcs1"); + return pkcs1.readPkcs1(alg, type, der); + } else { + if (forceType) + assert.strictEqual(forceType, "pkcs8"); + return pkcs8.readPkcs8(alg, type, der); + } + } + function write(key, options, type) { + assert.object(key); + var alg = { + "ecdsa": "EC", + "rsa": "RSA", + "dsa": "DSA", + "ed25519": "EdDSA" + }[key.type]; + var header; + var der = new asn1.BerWriter(); + if (PrivateKey.isPrivateKey(key)) { + if (type && type === "pkcs8") { + header = "PRIVATE KEY"; + pkcs8.writePkcs8(der, key); + } else { + if (type) + assert.strictEqual(type, "pkcs1"); + header = alg + " PRIVATE KEY"; + pkcs1.writePkcs1(der, key); + } + } else if (Key.isKey(key)) { + if (type && type === "pkcs1") { + header = alg + " PUBLIC KEY"; + pkcs1.writePkcs1(der, key); + } else { + if (type) + assert.strictEqual(type, "pkcs8"); + header = "PUBLIC KEY"; + pkcs8.writePkcs8(der, key); + } + } else { + throw new Error("key is not a Key or PrivateKey"); + } + var tmp = der.buffer.toString("base64"); + var len = tmp.length + tmp.length / 64 + 18 + 16 + header.length * 2 + 10; + var buf = Buffer2.alloc(len); + var o = 0; + o += buf.write("-----BEGIN " + header + "-----\n", o); + for (var i2 = 0; i2 < tmp.length; ) { + var limit = i2 + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i2, limit), o); + buf[o++] = 10; + i2 = limit; + } + o += buf.write("-----END " + header + "-----\n", o); + return buf.slice(0, o); + } + } +}); + +// node_modules/sshpk/lib/formats/ssh.js +var require_ssh = __commonJS({ + "node_modules/sshpk/lib/formats/ssh.js"(exports2, module2) { + module2.exports = { + read, + write + }; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var rfc4253 = require_rfc4253(); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var sshpriv = require_ssh_private(); + var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; + var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/; + function read(buf, options) { + if (typeof buf !== "string") { + assert.buffer(buf, "buf"); + buf = buf.toString("ascii"); + } + var trimmed = buf.trim().replace(/[\\\r]/g, ""); + var m = trimmed.match(SSHKEY_RE); + if (!m) + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, "key must match regex"); + var type = rfc4253.algToKeyType(m[1]); + var kbuf = Buffer2.from(m[2], "base64"); + var key; + var ret = {}; + if (m[4]) { + try { + key = rfc4253.read(kbuf); + } catch (e) { + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, "key must match regex"); + kbuf = Buffer2.from(m[2], "base64"); + key = rfc4253.readInternal(ret, "public", kbuf); + } + } else { + key = rfc4253.readInternal(ret, "public", kbuf); + } + assert.strictEqual(type, key.type); + if (m[4] && m[4].length > 0) { + key.comment = m[4]; + } else if (ret.consumed) { + var data = m[2] + (m[3] ? m[3] : ""); + var realOffset = Math.ceil(ret.consumed / 3) * 4; + data = data.slice(0, realOffset - 2).replace(/[^a-zA-Z0-9+\/=]/g, "") + data.slice(realOffset - 2); + var padding = ret.consumed % 3; + if (padding > 0 && data.slice(realOffset - 1, realOffset) !== "=") + realOffset--; + while (data.slice(realOffset, realOffset + 1) === "=") + realOffset++; + var trailer = data.slice(realOffset); + trailer = trailer.replace(/[\r\n]/g, " ").replace(/^\s+/, ""); + if (trailer.match(/^[a-zA-Z0-9]/)) + key.comment = trailer; + } + return key; + } + function write(key, options) { + assert.object(key); + if (!Key.isKey(key)) + throw new Error("Must be a public key"); + var parts = []; + var alg = rfc4253.keyTypeToAlg(key); + parts.push(alg); + var buf = rfc4253.write(key); + parts.push(buf.toString("base64")); + if (key.comment) + parts.push(key.comment); + return Buffer2.from(parts.join(" ")); + } + } +}); + +// node_modules/sshpk/lib/formats/dnssec.js +var require_dnssec = __commonJS({ + "node_modules/sshpk/lib/formats/dnssec.js"(exports2, module2) { + module2.exports = { + read, + write + }; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var Key = require_key(); + var PrivateKey = require_private_key(); + var utils = require_utils(); + var SSHBuffer = require_ssh_buffer(); + var Dhe = require_dhe(); + var supportedAlgos = { + "rsa-sha1": 5, + "rsa-sha256": 8, + "rsa-sha512": 10, + "ecdsa-p256-sha256": 13, + "ecdsa-p384-sha384": 14 + /* + * ed25519 is hypothetically supported with id 15 + * but the common tools available don't appear to be + * capable of generating/using ed25519 keys + */ + }; + var supportedAlgosById = {}; + Object.keys(supportedAlgos).forEach(function(k) { + supportedAlgosById[supportedAlgos[k]] = k.toUpperCase(); + }); + function read(buf, options) { + if (typeof buf !== "string") { + assert.buffer(buf, "buf"); + buf = buf.toString("ascii"); + } + var lines = buf.split("\n"); + if (lines[0].match(/^Private-key-format\: v1/)) { + var algElems = lines[1].split(" "); + var algoNum = parseInt(algElems[1], 10); + var algoName = algElems[2]; + if (!supportedAlgosById[algoNum]) + throw new Error("Unsupported algorithm: " + algoName); + return readDNSSECPrivateKey(algoNum, lines.slice(2)); + } + var line = 0; + while (lines[line].match(/^\;/)) + line++; + if ((lines[line].match(/\. IN KEY /) || lines[line].match(/\. IN DNSKEY /)) && lines[line + 1].length === 0) { + return readRFC3110(lines[line]); + } + throw new Error("Cannot parse dnssec key"); + } + function readRFC3110(keyString) { + var elems = keyString.split(" "); + var algorithm = parseInt(elems[5], 10); + if (!supportedAlgosById[algorithm]) + throw new Error("Unsupported algorithm: " + algorithm); + var base64key = elems.slice(6, elems.length).join(); + var keyBuffer = Buffer2.from(base64key, "base64"); + if (supportedAlgosById[algorithm].match(/^RSA-/)) { + var publicExponentLen = keyBuffer.readUInt8(0); + if (publicExponentLen != 3 && publicExponentLen != 1) + throw new Error("Cannot parse dnssec key: unsupported exponent length"); + var publicExponent = keyBuffer.slice(1, publicExponentLen + 1); + publicExponent = utils.mpNormalize(publicExponent); + var modulus = keyBuffer.slice(1 + publicExponentLen); + modulus = utils.mpNormalize(modulus); + var rsaKey = { + type: "rsa", + parts: [] + }; + rsaKey.parts.push({ name: "e", data: publicExponent }); + rsaKey.parts.push({ name: "n", data: modulus }); + return new Key(rsaKey); + } + if (supportedAlgosById[algorithm] === "ECDSA-P384-SHA384" || supportedAlgosById[algorithm] === "ECDSA-P256-SHA256") { + var curve = "nistp384"; + var size2 = 384; + if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) { + curve = "nistp256"; + size2 = 256; + } + var ecdsaKey = { + type: "ecdsa", + curve, + size: size2, + parts: [ + { name: "curve", data: Buffer2.from(curve) }, + { name: "Q", data: utils.ecNormalize(keyBuffer) } + ] + }; + return new Key(ecdsaKey); + } + throw new Error("Unsupported algorithm: " + supportedAlgosById[algorithm]); + } + function elementToBuf(e) { + return Buffer2.from(e.split(" ")[1], "base64"); + } + function readDNSSECRSAPrivateKey(elements) { + var rsaParams = {}; + elements.forEach(function(element) { + if (element.split(" ")[0] === "Modulus:") + rsaParams["n"] = elementToBuf(element); + else if (element.split(" ")[0] === "PublicExponent:") + rsaParams["e"] = elementToBuf(element); + else if (element.split(" ")[0] === "PrivateExponent:") + rsaParams["d"] = elementToBuf(element); + else if (element.split(" ")[0] === "Prime1:") + rsaParams["p"] = elementToBuf(element); + else if (element.split(" ")[0] === "Prime2:") + rsaParams["q"] = elementToBuf(element); + else if (element.split(" ")[0] === "Exponent1:") + rsaParams["dmodp"] = elementToBuf(element); + else if (element.split(" ")[0] === "Exponent2:") + rsaParams["dmodq"] = elementToBuf(element); + else if (element.split(" ")[0] === "Coefficient:") + rsaParams["iqmp"] = elementToBuf(element); + }); + var key = { + type: "rsa", + parts: [ + { name: "e", data: utils.mpNormalize(rsaParams["e"]) }, + { name: "n", data: utils.mpNormalize(rsaParams["n"]) }, + { name: "d", data: utils.mpNormalize(rsaParams["d"]) }, + { name: "p", data: utils.mpNormalize(rsaParams["p"]) }, + { name: "q", data: utils.mpNormalize(rsaParams["q"]) }, + { + name: "dmodp", + data: utils.mpNormalize(rsaParams["dmodp"]) + }, + { + name: "dmodq", + data: utils.mpNormalize(rsaParams["dmodq"]) + }, + { + name: "iqmp", + data: utils.mpNormalize(rsaParams["iqmp"]) + } + ] + }; + return new PrivateKey(key); + } + function readDNSSECPrivateKey(alg, elements) { + if (supportedAlgosById[alg].match(/^RSA-/)) { + return readDNSSECRSAPrivateKey(elements); + } + if (supportedAlgosById[alg] === "ECDSA-P384-SHA384" || supportedAlgosById[alg] === "ECDSA-P256-SHA256") { + var d = Buffer2.from(elements[0].split(" ")[1], "base64"); + var curve = "nistp384"; + var size2 = 384; + if (supportedAlgosById[alg] === "ECDSA-P256-SHA256") { + curve = "nistp256"; + size2 = 256; + } + var publicKey = utils.publicFromPrivateECDSA(curve, d); + var Q = publicKey.part["Q"].data; + var ecdsaKey = { + type: "ecdsa", + curve, + size: size2, + parts: [ + { name: "curve", data: Buffer2.from(curve) }, + { name: "d", data: d }, + { name: "Q", data: Q } + ] + }; + return new PrivateKey(ecdsaKey); + } + throw new Error("Unsupported algorithm: " + supportedAlgosById[alg]); + } + function dnssecTimestamp(date) { + var year = date.getFullYear() + ""; + var month = date.getMonth() + 1; + var timestampStr = year + month + date.getUTCDate(); + timestampStr += "" + date.getUTCHours() + date.getUTCMinutes(); + timestampStr += date.getUTCSeconds(); + return timestampStr; + } + function rsaAlgFromOptions(opts) { + if (!opts || !opts.hashAlgo || opts.hashAlgo === "sha1") + return "5 (RSASHA1)"; + else if (opts.hashAlgo === "sha256") + return "8 (RSASHA256)"; + else if (opts.hashAlgo === "sha512") + return "10 (RSASHA512)"; + else + throw new Error("Unknown or unsupported hash: " + opts.hashAlgo); + } + function writeRSA(key, options) { + if (!key.part.dmodp || !key.part.dmodq) { + utils.addRSAMissing(key); + } + var out = ""; + out += "Private-key-format: v1.3\n"; + out += "Algorithm: " + rsaAlgFromOptions(options) + "\n"; + var n = utils.mpDenormalize(key.part["n"].data); + out += "Modulus: " + n.toString("base64") + "\n"; + var e = utils.mpDenormalize(key.part["e"].data); + out += "PublicExponent: " + e.toString("base64") + "\n"; + var d = utils.mpDenormalize(key.part["d"].data); + out += "PrivateExponent: " + d.toString("base64") + "\n"; + var p = utils.mpDenormalize(key.part["p"].data); + out += "Prime1: " + p.toString("base64") + "\n"; + var q2 = utils.mpDenormalize(key.part["q"].data); + out += "Prime2: " + q2.toString("base64") + "\n"; + var dmodp = utils.mpDenormalize(key.part["dmodp"].data); + out += "Exponent1: " + dmodp.toString("base64") + "\n"; + var dmodq = utils.mpDenormalize(key.part["dmodq"].data); + out += "Exponent2: " + dmodq.toString("base64") + "\n"; + var iqmp = utils.mpDenormalize(key.part["iqmp"].data); + out += "Coefficient: " + iqmp.toString("base64") + "\n"; + var timestamp = /* @__PURE__ */ new Date(); + out += "Created: " + dnssecTimestamp(timestamp) + "\n"; + out += "Publish: " + dnssecTimestamp(timestamp) + "\n"; + out += "Activate: " + dnssecTimestamp(timestamp) + "\n"; + return Buffer2.from(out, "ascii"); + } + function writeECDSA(key, options) { + var out = ""; + out += "Private-key-format: v1.3\n"; + if (key.curve === "nistp256") { + out += "Algorithm: 13 (ECDSAP256SHA256)\n"; + } else if (key.curve === "nistp384") { + out += "Algorithm: 14 (ECDSAP384SHA384)\n"; + } else { + throw new Error("Unsupported curve"); + } + var base64Key = key.part["d"].data.toString("base64"); + out += "PrivateKey: " + base64Key + "\n"; + var timestamp = /* @__PURE__ */ new Date(); + out += "Created: " + dnssecTimestamp(timestamp) + "\n"; + out += "Publish: " + dnssecTimestamp(timestamp) + "\n"; + out += "Activate: " + dnssecTimestamp(timestamp) + "\n"; + return Buffer2.from(out, "ascii"); + } + function write(key, options) { + if (PrivateKey.isPrivateKey(key)) { + if (key.type === "rsa") { + return writeRSA(key, options); + } else if (key.type === "ecdsa") { + return writeECDSA(key, options); + } else { + throw new Error("Unsupported algorithm: " + key.type); + } + } else if (Key.isKey(key)) { + throw new Error('Format "dnssec" only supports writing private keys'); + } else { + throw new Error("key is not a Key or PrivateKey"); + } + } + } +}); + +// node_modules/sshpk/lib/formats/putty.js +var require_putty = __commonJS({ + "node_modules/sshpk/lib/formats/putty.js"(exports2, module2) { + module2.exports = { + read, + write + }; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var rfc4253 = require_rfc4253(); + var Key = require_key(); + var SSHBuffer = require_ssh_buffer(); + var crypto2 = require("crypto"); + var PrivateKey = require_private_key(); + var errors = require_errors(); + function read(buf, options) { + var lines = buf.toString("ascii").split(/[\r\n]+/); + var found = false; + var parts; + var si = 0; + var formatVersion; + while (si < lines.length) { + parts = splitHeader(lines[si++]); + if (parts) { + formatVersion = { + "putty-user-key-file-2": 2, + "putty-user-key-file-3": 3 + }[parts[0].toLowerCase()]; + if (formatVersion) { + found = true; + break; + } + } + } + if (!found) { + throw new Error("No PuTTY format first line found"); + } + var alg = parts[1]; + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), "encryption"); + var encryption = parts[1]; + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), "comment"); + var comment = parts[1]; + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), "public-lines"); + var publicLines = parseInt(parts[1], 10); + if (!isFinite(publicLines) || publicLines < 0 || publicLines > lines.length) { + throw new Error("Invalid public-lines count"); + } + var publicBuf = Buffer2.from( + lines.slice(si, si + publicLines).join(""), + "base64" + ); + var keyType = rfc4253.algToKeyType(alg); + var key = rfc4253.read(publicBuf); + if (key.type !== keyType) { + throw new Error("Outer key algorithm mismatch"); + } + si += publicLines; + if (lines[si]) { + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), "private-lines"); + var privateLines = parseInt(parts[1], 10); + if (!isFinite(privateLines) || privateLines < 0 || privateLines > lines.length) { + throw new Error("Invalid private-lines count"); + } + var privateBuf = Buffer2.from( + lines.slice(si, si + privateLines).join(""), + "base64" + ); + if (encryption !== "none" && formatVersion === 3) { + throw new Error("Encrypted keys arenot supported for PuTTY format version 3"); + } + if (encryption === "aes256-cbc") { + if (!options.passphrase) { + throw new errors.KeyEncryptedError( + options.filename, + "PEM" + ); + } + var iv = Buffer2.alloc(16, 0); + var decipher = crypto2.createDecipheriv( + "aes-256-cbc", + derivePPK2EncryptionKey(options.passphrase), + iv + ); + decipher.setAutoPadding(false); + privateBuf = Buffer2.concat([ + decipher.update(privateBuf), + decipher.final() + ]); + } + key = new PrivateKey(key); + if (key.type !== keyType) { + throw new Error("Outer key algorithm mismatch"); + } + var sshbuf = new SSHBuffer({ buffer: privateBuf }); + var privateKeyParts; + if (alg === "ssh-dss") { + privateKeyParts = [{ + name: "x", + data: sshbuf.readBuffer() + }]; + } else if (alg === "ssh-rsa") { + privateKeyParts = [ + { name: "d", data: sshbuf.readBuffer() }, + { name: "p", data: sshbuf.readBuffer() }, + { name: "q", data: sshbuf.readBuffer() }, + { name: "iqmp", data: sshbuf.readBuffer() } + ]; + } else if (alg.match(/^ecdsa-sha2-nistp/)) { + privateKeyParts = [{ + name: "d", + data: sshbuf.readBuffer() + }]; + } else if (alg === "ssh-ed25519") { + privateKeyParts = [{ + name: "k", + data: sshbuf.readBuffer() + }]; + } else { + throw new Error("Unsupported PPK key type: " + alg); + } + key = new PrivateKey({ + type: key.type, + parts: key.parts.concat(privateKeyParts) + }); + } + key.comment = comment; + return key; + } + function derivePPK2EncryptionKey(passphrase) { + var hash1 = crypto2.createHash("sha1").update(Buffer2.concat([ + Buffer2.from([0, 0, 0, 0]), + Buffer2.from(passphrase) + ])).digest(); + var hash2 = crypto2.createHash("sha1").update(Buffer2.concat([ + Buffer2.from([0, 0, 0, 1]), + Buffer2.from(passphrase) + ])).digest(); + return Buffer2.concat([hash1, hash2]).slice(0, 32); + } + function splitHeader(line) { + var idx = line.indexOf(":"); + if (idx === -1) + return null; + var header = line.slice(0, idx); + ++idx; + while (line[idx] === " ") + ++idx; + var rest = line.slice(idx); + return [header, rest]; + } + function write(key, options) { + assert.object(key); + if (!Key.isKey(key)) + throw new Error("Must be a public key"); + var alg = rfc4253.keyTypeToAlg(key); + var buf = rfc4253.write(key); + var comment = key.comment || ""; + var b64 = buf.toString("base64"); + var lines = wrap(b64, 64); + lines.unshift("Public-Lines: " + lines.length); + lines.unshift("Comment: " + comment); + lines.unshift("Encryption: none"); + lines.unshift("PuTTY-User-Key-File-2: " + alg); + return Buffer2.from(lines.join("\n") + "\n"); + } + function wrap(txt, len) { + var lines = []; + var pos = 0; + while (pos < txt.length) { + lines.push(txt.slice(pos, pos + 64)); + pos += 64; + } + return lines; + } + } +}); + +// node_modules/sshpk/lib/formats/auto.js +var require_auto = __commonJS({ + "node_modules/sshpk/lib/formats/auto.js"(exports2, module2) { + module2.exports = { + read, + write + }; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var pem = require_pem(); + var ssh = require_ssh(); + var rfc4253 = require_rfc4253(); + var dnssec = require_dnssec(); + var putty = require_putty(); + var DNSSEC_PRIVKEY_HEADER_PREFIX = "Private-key-format: v1"; + function read(buf, options) { + if (typeof buf === "string") { + if (buf.trim().match(/^[-]+[ ]*BEGIN/)) + return pem.read(buf, options); + if (buf.match(/^\s*ssh-[a-z]/)) + return ssh.read(buf, options); + if (buf.match(/^\s*ecdsa-/)) + return ssh.read(buf, options); + if (buf.match(/^putty-user-key-file-2:/i)) + return putty.read(buf, options); + if (findDNSSECHeader(buf)) + return dnssec.read(buf, options); + buf = Buffer2.from(buf, "binary"); + } else { + assert.buffer(buf); + if (findPEMHeader(buf)) + return pem.read(buf, options); + if (findSSHHeader(buf)) + return ssh.read(buf, options); + if (findPuTTYHeader(buf)) + return putty.read(buf, options); + if (findDNSSECHeader(buf)) + return dnssec.read(buf, options); + } + if (buf.readUInt32BE(0) < buf.length) + return rfc4253.read(buf, options); + throw new Error("Failed to auto-detect format of key"); + } + function findPuTTYHeader(buf) { + var offset2 = 0; + while (offset2 < buf.length && (buf[offset2] === 32 || buf[offset2] === 10 || buf[offset2] === 9)) + ++offset2; + if (offset2 + 22 <= buf.length && buf.slice(offset2, offset2 + 22).toString("ascii").toLowerCase() === "putty-user-key-file-2:") + return true; + return false; + } + function findSSHHeader(buf) { + var offset2 = 0; + while (offset2 < buf.length && (buf[offset2] === 32 || buf[offset2] === 10 || buf[offset2] === 9)) + ++offset2; + if (offset2 + 4 <= buf.length && buf.slice(offset2, offset2 + 4).toString("ascii") === "ssh-") + return true; + if (offset2 + 6 <= buf.length && buf.slice(offset2, offset2 + 6).toString("ascii") === "ecdsa-") + return true; + return false; + } + function findPEMHeader(buf) { + var offset2 = 0; + while (offset2 < buf.length && (buf[offset2] === 32 || buf[offset2] === 10)) + ++offset2; + if (buf[offset2] !== 45) + return false; + while (offset2 < buf.length && buf[offset2] === 45) + ++offset2; + while (offset2 < buf.length && buf[offset2] === 32) + ++offset2; + if (offset2 + 5 > buf.length || buf.slice(offset2, offset2 + 5).toString("ascii") !== "BEGIN") + return false; + return true; + } + function findDNSSECHeader(buf) { + if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length) + return false; + var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length); + if (headerCheck.toString("ascii") === DNSSEC_PRIVKEY_HEADER_PREFIX) + return true; + if (typeof buf !== "string") { + buf = buf.toString("ascii"); + } + var lines = buf.split("\n"); + var line = 0; + while (lines[line].match(/^\;/)) + line++; + if (lines[line].toString("ascii").match(/\. IN KEY /)) + return true; + if (lines[line].toString("ascii").match(/\. IN DNSKEY /)) + return true; + return false; + } + function write(key, options) { + throw new Error('"auto" format cannot be used for writing'); + } + } +}); + +// node_modules/sshpk/lib/private-key.js +var require_private_key = __commonJS({ + "node_modules/sshpk/lib/private-key.js"(exports2, module2) { + module2.exports = PrivateKey; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var crypto2 = require("crypto"); + var Fingerprint = require_fingerprint(); + var Signature = require_signature(); + var errs = require_errors(); + var util2 = require("util"); + var utils = require_utils(); + var dhe = require_dhe(); + var generateECDSA = dhe.generateECDSA; + var generateED25519 = dhe.generateED25519; + var edCompat = require_ed_compat(); + var nacl = require_nacl_fast(); + var Key = require_key(); + var InvalidAlgorithmError = errs.InvalidAlgorithmError; + var KeyParseError = errs.KeyParseError; + var KeyEncryptedError = errs.KeyEncryptedError; + var formats = {}; + formats["auto"] = require_auto(); + formats["pem"] = require_pem(); + formats["pkcs1"] = require_pkcs1(); + formats["pkcs8"] = require_pkcs8(); + formats["rfc4253"] = require_rfc4253(); + formats["ssh-private"] = require_ssh_private(); + formats["openssh"] = formats["ssh-private"]; + formats["ssh"] = formats["ssh-private"]; + formats["dnssec"] = require_dnssec(); + formats["putty"] = require_putty(); + function PrivateKey(opts) { + assert.object(opts, "options"); + Key.call(this, opts); + this._pubCache = void 0; + } + util2.inherits(PrivateKey, Key); + PrivateKey.formats = formats; + PrivateKey.prototype.toBuffer = function(format, options) { + if (format === void 0) + format = "pkcs1"; + assert.string(format, "format"); + assert.object(formats[format], "formats[format]"); + assert.optionalObject(options, "options"); + return formats[format].write(this, options); + }; + PrivateKey.prototype.hash = function(algo, type) { + return this.toPublic().hash(algo, type); + }; + PrivateKey.prototype.fingerprint = function(algo, type) { + return this.toPublic().fingerprint(algo, type); + }; + PrivateKey.prototype.toPublic = function() { + if (this._pubCache) + return this._pubCache; + var algInfo = algs.info[this.type]; + var pubParts = []; + for (var i2 = 0; i2 < algInfo.parts.length; ++i2) { + var p = algInfo.parts[i2]; + pubParts.push(this.part[p]); + } + this._pubCache = new Key({ + type: this.type, + source: this, + parts: pubParts + }); + if (this.comment) + this._pubCache.comment = this.comment; + return this._pubCache; + }; + PrivateKey.prototype.derive = function(newType) { + assert.string(newType, "type"); + var priv, pub, pair; + if (this.type === "ed25519" && newType === "curve25519") { + priv = this.part.k.data; + if (priv[0] === 0) + priv = priv.slice(1); + pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); + pub = Buffer2.from(pair.publicKey); + return new PrivateKey({ + type: "curve25519", + parts: [ + { name: "A", data: utils.mpNormalize(pub) }, + { name: "k", data: utils.mpNormalize(priv) } + ] + }); + } else if (this.type === "curve25519" && newType === "ed25519") { + priv = this.part.k.data; + if (priv[0] === 0) + priv = priv.slice(1); + pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); + pub = Buffer2.from(pair.publicKey); + return new PrivateKey({ + type: "ed25519", + parts: [ + { name: "A", data: utils.mpNormalize(pub) }, + { name: "k", data: utils.mpNormalize(priv) } + ] + }); + } + throw new Error("Key derivation not supported from " + this.type + " to " + newType); + }; + PrivateKey.prototype.createVerify = function(hashAlgo) { + return this.toPublic().createVerify(hashAlgo); + }; + PrivateKey.prototype.createSign = function(hashAlgo) { + if (hashAlgo === void 0) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, "hash algorithm"); + if (this.type === "ed25519" && edCompat !== void 0) + return new edCompat.Signer(this, hashAlgo); + if (this.type === "curve25519") + throw new Error("Curve25519 keys are not suitable for signing or verification"); + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto2.createSign(nm); + } catch (e) { + err = e; + } + if (v === void 0 || err instanceof Error && err.message.match(/Unknown message digest/)) { + nm = "RSA-"; + nm += hashAlgo.toUpperCase(); + v = crypto2.createSign(nm); + } + assert.ok(v, "failed to create verifier"); + var oldSign = v.sign.bind(v); + var key = this.toBuffer("pkcs1"); + var type = this.type; + var curve = this.curve; + v.sign = function() { + var sig = oldSign(key); + if (typeof sig === "string") + sig = Buffer2.from(sig, "binary"); + sig = Signature.parse(sig, type, "asn1"); + sig.hashAlgorithm = hashAlgo; + sig.curve = curve; + return sig; + }; + return v; + }; + PrivateKey.parse = function(data, format, options) { + if (typeof data !== "string") + assert.buffer(data, "data"); + if (format === void 0) + format = "auto"; + assert.string(format, "format"); + if (typeof options === "string") + options = { filename: options }; + assert.optionalObject(options, "options"); + if (options === void 0) + options = {}; + assert.optionalString(options.filename, "options.filename"); + if (options.filename === void 0) + options.filename = "(unnamed)"; + assert.object(formats[format], "formats[format]"); + try { + var k = formats[format].read(data, options); + assert.ok(k instanceof PrivateKey, "key is not a private key"); + if (!k.comment) + k.comment = options.filename; + return k; + } catch (e) { + if (e.name === "KeyEncryptedError") + throw e; + throw new KeyParseError(options.filename, format, e); + } + }; + PrivateKey.isPrivateKey = function(obj, ver) { + return utils.isCompatible(obj, PrivateKey, ver); + }; + PrivateKey.generate = function(type, options) { + if (options === void 0) + options = {}; + assert.object(options, "options"); + switch (type) { + case "ecdsa": + if (options.curve === void 0) + options.curve = "nistp256"; + assert.string(options.curve, "options.curve"); + return generateECDSA(options.curve); + case "ed25519": + return generateED25519(); + default: + throw new Error('Key generation not supported with key type "' + type + '"'); + } + }; + PrivateKey.prototype._sshpkApiVersion = [1, 6]; + PrivateKey._oldVersionDetect = function(obj) { + assert.func(obj.toPublic); + assert.func(obj.createSign); + if (obj.derive) + return [1, 3]; + if (obj.defaultHashAlgorithm) + return [1, 2]; + if (obj.formats["auto"]) + return [1, 1]; + return [1, 0]; + }; + } +}); + +// node_modules/sshpk/lib/identity.js +var require_identity = __commonJS({ + "node_modules/sshpk/lib/identity.js"(exports2, module2) { + module2.exports = Identity; + var assert = require_assert(); + var algs = require_algs(); + var crypto2 = require("crypto"); + var Fingerprint = require_fingerprint(); + var Signature = require_signature(); + var errs = require_errors(); + var util2 = require("util"); + var utils = require_utils(); + var asn1 = require_lib(); + var Buffer2 = require_safer().Buffer; + var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; + var oids = {}; + oids.cn = "2.5.4.3"; + oids.o = "2.5.4.10"; + oids.ou = "2.5.4.11"; + oids.l = "2.5.4.7"; + oids.s = "2.5.4.8"; + oids.c = "2.5.4.6"; + oids.sn = "2.5.4.4"; + oids.postalCode = "2.5.4.17"; + oids.serialNumber = "2.5.4.5"; + oids.street = "2.5.4.9"; + oids.x500UniqueIdentifier = "2.5.4.45"; + oids.role = "2.5.4.72"; + oids.telephoneNumber = "2.5.4.20"; + oids.description = "2.5.4.13"; + oids.dc = "0.9.2342.19200300.100.1.25"; + oids.uid = "0.9.2342.19200300.100.1.1"; + oids.mail = "0.9.2342.19200300.100.1.3"; + oids.title = "2.5.4.12"; + oids.gn = "2.5.4.42"; + oids.initials = "2.5.4.43"; + oids.pseudonym = "2.5.4.65"; + oids.emailAddress = "1.2.840.113549.1.9.1"; + var unoids = {}; + Object.keys(oids).forEach(function(k) { + unoids[oids[k]] = k; + }); + function Identity(opts) { + var self2 = this; + assert.object(opts, "options"); + assert.arrayOfObject(opts.components, "options.components"); + this.components = opts.components; + this.componentLookup = {}; + this.components.forEach(function(c) { + if (c.name && !c.oid) + c.oid = oids[c.name]; + if (c.oid && !c.name) + c.name = unoids[c.oid]; + if (self2.componentLookup[c.name] === void 0) + self2.componentLookup[c.name] = []; + self2.componentLookup[c.name].push(c); + }); + if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { + this.cn = this.componentLookup.cn[0].value; + } + assert.optionalString(opts.type, "options.type"); + if (opts.type === void 0) { + if (this.components.length === 1 && this.componentLookup.cn && this.componentLookup.cn.length === 1 && this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = "host"; + this.hostname = this.componentLookup.cn[0].value; + } else if (this.componentLookup.dc && this.components.length === this.componentLookup.dc.length) { + this.type = "host"; + this.hostname = this.componentLookup.dc.map( + function(c) { + return c.value; + } + ).join("."); + } else if (this.componentLookup.uid && this.components.length === this.componentLookup.uid.length) { + this.type = "user"; + this.uid = this.componentLookup.uid[0].value; + } else if (this.componentLookup.cn && this.componentLookup.cn.length === 1 && this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = "host"; + this.hostname = this.componentLookup.cn[0].value; + } else if (this.componentLookup.uid && this.componentLookup.uid.length === 1) { + this.type = "user"; + this.uid = this.componentLookup.uid[0].value; + } else if (this.componentLookup.mail && this.componentLookup.mail.length === 1) { + this.type = "email"; + this.email = this.componentLookup.mail[0].value; + } else if (this.componentLookup.cn && this.componentLookup.cn.length === 1) { + this.type = "user"; + this.uid = this.componentLookup.cn[0].value; + } else { + this.type = "unknown"; + } + } else { + this.type = opts.type; + if (this.type === "host") + this.hostname = opts.hostname; + else if (this.type === "user") + this.uid = opts.uid; + else if (this.type === "email") + this.email = opts.email; + else + throw new Error("Unknown type " + this.type); + } + } + Identity.prototype.toString = function() { + return this.components.map(function(c) { + var n = c.name.toUpperCase(); + n = n.replace(/=/g, "\\="); + var v = c.value; + v = v.replace(/,/g, "\\,"); + return n + "=" + v; + }).join(", "); + }; + Identity.prototype.get = function(name, asArray) { + assert.string(name, "name"); + var arr2 = this.componentLookup[name]; + if (arr2 === void 0 || arr2.length === 0) + return void 0; + if (!asArray && arr2.length > 1) + throw new Error("Multiple values for attribute " + name); + if (!asArray) + return arr2[0].value; + return arr2.map(function(c) { + return c.value; + }); + }; + Identity.prototype.toArray = function(idx) { + return this.components.map(function(c) { + return { + name: c.name, + value: c.value + }; + }); + }; + var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; + var NOT_IA5 = /[^\x00-\x7f]/; + Identity.prototype.toAsn1 = function(der, tag) { + der.startSequence(tag); + this.components.forEach(function(c) { + der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); + der.startSequence(); + der.writeOID(c.oid); + if (c.asn1type === asn1.Ber.Utf8String || c.value.match(NOT_IA5)) { + var v = Buffer2.from(c.value, "utf8"); + der.writeBuffer(v, asn1.Ber.Utf8String); + } else if (c.asn1type === asn1.Ber.IA5String || c.value.match(NOT_PRINTABLE)) { + der.writeString(c.value, asn1.Ber.IA5String); + } else { + var type = asn1.Ber.PrintableString; + if (c.asn1type !== void 0) + type = c.asn1type; + der.writeString(c.value, type); + } + der.endSequence(); + der.endSequence(); + }); + der.endSequence(); + }; + function globMatch(a, b) { + if (a === "**" || b === "**") + return true; + var aParts = a.split("."); + var bParts = b.split("."); + if (aParts.length !== bParts.length) + return false; + for (var i2 = 0; i2 < aParts.length; ++i2) { + if (aParts[i2] === "*" || bParts[i2] === "*") + continue; + if (aParts[i2] !== bParts[i2]) + return false; + } + return true; + } + Identity.prototype.equals = function(other) { + if (!Identity.isIdentity(other, [1, 0])) + return false; + if (other.components.length !== this.components.length) + return false; + for (var i2 = 0; i2 < this.components.length; ++i2) { + if (this.components[i2].oid !== other.components[i2].oid) + return false; + if (!globMatch( + this.components[i2].value, + other.components[i2].value + )) { + return false; + } + } + return true; + }; + Identity.forHost = function(hostname) { + assert.string(hostname, "hostname"); + return new Identity({ + type: "host", + hostname, + components: [{ name: "cn", value: hostname }] + }); + }; + Identity.forUser = function(uid) { + assert.string(uid, "uid"); + return new Identity({ + type: "user", + uid, + components: [{ name: "uid", value: uid }] + }); + }; + Identity.forEmail = function(email) { + assert.string(email, "email"); + return new Identity({ + type: "email", + email, + components: [{ name: "mail", value: email }] + }); + }; + Identity.parseDN = function(dn) { + assert.string(dn, "dn"); + var parts = [""]; + var idx = 0; + var rem = dn; + while (rem.length > 0) { + var m; + if ((m = /^,/.exec(rem)) !== null) { + parts[++idx] = ""; + rem = rem.slice(m[0].length); + } else if ((m = /^\\,/.exec(rem)) !== null) { + parts[idx] += ","; + rem = rem.slice(m[0].length); + } else if ((m = /^\\./.exec(rem)) !== null) { + parts[idx] += m[0]; + rem = rem.slice(m[0].length); + } else if ((m = /^[^\\,]+/.exec(rem)) !== null) { + parts[idx] += m[0]; + rem = rem.slice(m[0].length); + } else { + throw new Error("Failed to parse DN"); + } + } + var cmps = parts.map(function(c) { + c = c.trim(); + var eqPos = c.indexOf("="); + while (eqPos > 0 && c.charAt(eqPos - 1) === "\\") + eqPos = c.indexOf("=", eqPos + 1); + if (eqPos === -1) { + throw new Error("Failed to parse DN"); + } + var name = c.slice(0, eqPos).toLowerCase().replace(/\\=/g, "="); + var value = c.slice(eqPos + 1); + return { name, value }; + }); + return new Identity({ components: cmps }); + }; + Identity.fromArray = function(components) { + assert.arrayOfObject(components, "components"); + components.forEach(function(cmp) { + assert.object(cmp, "component"); + assert.string(cmp.name, "component.name"); + if (!Buffer2.isBuffer(cmp.value) && !(typeof cmp.value === "string")) { + throw new Error("Invalid component value"); + } + }); + return new Identity({ components }); + }; + Identity.parseAsn1 = function(der, top) { + var components = []; + der.readSequence(top); + var end = der.offset + der.length; + while (der.offset < end) { + der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); + var after = der.offset + der.length; + der.readSequence(); + var oid = der.readOID(); + var type = der.peek(); + var value; + switch (type) { + case asn1.Ber.PrintableString: + case asn1.Ber.IA5String: + case asn1.Ber.OctetString: + case asn1.Ber.T61String: + value = der.readString(type); + break; + case asn1.Ber.Utf8String: + value = der.readString(type, true); + value = value.toString("utf8"); + break; + case asn1.Ber.CharacterString: + case asn1.Ber.BMPString: + value = der.readString(type, true); + value = value.toString("utf16le"); + break; + default: + throw new Error("Unknown asn1 type " + type); + } + components.push({ oid, asn1type: type, value }); + der._offset = after; + } + der._offset = end; + return new Identity({ + components + }); + }; + Identity.isIdentity = function(obj, ver) { + return utils.isCompatible(obj, Identity, ver); + }; + Identity.prototype._sshpkApiVersion = [1, 0]; + Identity._oldVersionDetect = function(obj) { + return [1, 0]; + }; + } +}); + +// node_modules/sshpk/lib/formats/openssh-cert.js +var require_openssh_cert = __commonJS({ + "node_modules/sshpk/lib/formats/openssh-cert.js"(exports2, module2) { + module2.exports = { + read, + verify, + sign, + signAsync, + write, + /* Internal private API */ + fromBuffer, + toBuffer + }; + var assert = require_assert(); + var SSHBuffer = require_ssh_buffer(); + var crypto2 = require("crypto"); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var Identity = require_identity(); + var rfc4253 = require_rfc4253(); + var Signature = require_signature(); + var utils = require_utils(); + var Certificate = require_certificate(); + function verify(cert, key) { + return false; + } + var TYPES = { + "user": 1, + "host": 2 + }; + Object.keys(TYPES).forEach(function(k) { + TYPES[TYPES[k]] = k; + }); + var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/; + function read(buf, options) { + if (Buffer2.isBuffer(buf)) + buf = buf.toString("ascii"); + var parts = buf.trim().split(/[ \t\n]+/g); + if (parts.length < 2 || parts.length > 3) + throw new Error("Not a valid SSH certificate line"); + var algo = parts[0]; + var data = parts[1]; + data = Buffer2.from(data, "base64"); + return fromBuffer(data, algo); + } + function fromBuffer(data, algo, partial) { + var sshbuf = new SSHBuffer({ buffer: data }); + var innerAlgo = sshbuf.readString(); + if (algo !== void 0 && innerAlgo !== algo) + throw new Error("SSH certificate algorithm mismatch"); + if (algo === void 0) + algo = innerAlgo; + var cert = {}; + cert.signatures = {}; + cert.signatures.openssh = {}; + cert.signatures.openssh.nonce = sshbuf.readBuffer(); + var key = {}; + var parts = key.parts = []; + key.type = getAlg(algo); + var partCount = algs.info[key.type].parts.length; + while (parts.length < partCount) + parts.push(sshbuf.readPart()); + assert.ok(parts.length >= 1, "key must have at least one part"); + var algInfo = algs.info[key.type]; + if (key.type === "ecdsa") { + var res = ECDSA_ALGO.exec(algo); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + for (var i2 = 0; i2 < algInfo.parts.length; ++i2) { + parts[i2].name = algInfo.parts[i2]; + if (parts[i2].name !== "curve" && algInfo.normalize !== false) { + var p = parts[i2]; + p.data = utils.mpNormalize(p.data); + } + } + cert.subjectKey = new Key(key); + cert.serial = sshbuf.readInt64(); + var type = TYPES[sshbuf.readInt()]; + assert.string(type, "valid cert type"); + cert.signatures.openssh.keyId = sshbuf.readString(); + var principals = []; + var pbuf = sshbuf.readBuffer(); + var psshbuf = new SSHBuffer({ buffer: pbuf }); + while (!psshbuf.atEnd()) + principals.push(psshbuf.readString()); + if (principals.length === 0) + principals = ["*"]; + cert.subjects = principals.map(function(pr) { + if (type === "user") + return Identity.forUser(pr); + else if (type === "host") + return Identity.forHost(pr); + throw new Error("Unknown identity type " + type); + }); + cert.validFrom = int64ToDate(sshbuf.readInt64()); + cert.validUntil = int64ToDate(sshbuf.readInt64()); + var exts = []; + var extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); + var ext; + while (!extbuf.atEnd()) { + ext = { critical: true }; + ext.name = extbuf.readString(); + ext.data = extbuf.readBuffer(); + exts.push(ext); + } + extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); + while (!extbuf.atEnd()) { + ext = { critical: false }; + ext.name = extbuf.readString(); + ext.data = extbuf.readBuffer(); + exts.push(ext); + } + cert.signatures.openssh.exts = exts; + sshbuf.readBuffer(); + var signingKeyBuf = sshbuf.readBuffer(); + cert.issuerKey = rfc4253.read(signingKeyBuf); + cert.issuer = Identity.forHost("**"); + var sigBuf = sshbuf.readBuffer(); + cert.signatures.openssh.signature = Signature.parse(sigBuf, cert.issuerKey.type, "ssh"); + if (partial !== void 0) { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + return new Certificate(cert); + } + function int64ToDate(buf) { + var i2 = buf.readUInt32BE(0) * 4294967296; + i2 += buf.readUInt32BE(4); + var d = /* @__PURE__ */ new Date(); + d.setTime(i2 * 1e3); + d.sourceInt64 = buf; + return d; + } + function dateToInt64(date) { + if (date.sourceInt64 !== void 0) + return date.sourceInt64; + var i2 = Math.round(date.getTime() / 1e3); + var upper = Math.floor(i2 / 4294967296); + var lower = Math.floor(i2 % 4294967296); + var buf = Buffer2.alloc(8); + buf.writeUInt32BE(upper, 0); + buf.writeUInt32BE(lower, 4); + return buf; + } + function sign(cert, key) { + if (cert.signatures.openssh === void 0) + cert.signatures.openssh = {}; + try { + var blob = toBuffer(cert, true); + } catch (e) { + delete cert.signatures.openssh; + return false; + } + var sig = cert.signatures.openssh; + var hashAlgo = void 0; + if (key.type === "rsa" || key.type === "dsa") + hashAlgo = "sha1"; + var signer = key.createSign(hashAlgo); + signer.write(blob); + sig.signature = signer.sign(); + return true; + } + function signAsync(cert, signer, done) { + if (cert.signatures.openssh === void 0) + cert.signatures.openssh = {}; + try { + var blob = toBuffer(cert, true); + } catch (e) { + delete cert.signatures.openssh; + done(e); + return; + } + var sig = cert.signatures.openssh; + signer(blob, function(err, signature) { + if (err) { + done(err); + return; + } + try { + signature.toBuffer("ssh"); + } catch (e) { + done(e); + return; + } + sig.signature = signature; + done(); + }); + } + function write(cert, options) { + if (options === void 0) + options = {}; + var blob = toBuffer(cert); + var out = getCertType(cert.subjectKey) + " " + blob.toString("base64"); + if (options.comment) + out = out + " " + options.comment; + return out; + } + function toBuffer(cert, noSig) { + assert.object(cert.signatures.openssh, "signature for openssh format"); + var sig = cert.signatures.openssh; + if (sig.nonce === void 0) + sig.nonce = crypto2.randomBytes(16); + var buf = new SSHBuffer({}); + buf.writeString(getCertType(cert.subjectKey)); + buf.writeBuffer(sig.nonce); + var key = cert.subjectKey; + var algInfo = algs.info[key.type]; + algInfo.parts.forEach(function(part) { + buf.writePart(key.part[part]); + }); + buf.writeInt64(cert.serial); + var type = cert.subjects[0].type; + assert.notStrictEqual(type, "unknown"); + cert.subjects.forEach(function(id) { + assert.strictEqual(id.type, type); + }); + type = TYPES[type]; + buf.writeInt(type); + if (sig.keyId === void 0) { + sig.keyId = cert.subjects[0].type + "_" + (cert.subjects[0].uid || cert.subjects[0].hostname); + } + buf.writeString(sig.keyId); + var sub = new SSHBuffer({}); + cert.subjects.forEach(function(id) { + if (type === TYPES.host) + sub.writeString(id.hostname); + else if (type === TYPES.user) + sub.writeString(id.uid); + }); + buf.writeBuffer(sub.toBuffer()); + buf.writeInt64(dateToInt64(cert.validFrom)); + buf.writeInt64(dateToInt64(cert.validUntil)); + var exts = sig.exts; + if (exts === void 0) + exts = []; + var extbuf = new SSHBuffer({}); + exts.forEach(function(ext) { + if (ext.critical !== true) + return; + extbuf.writeString(ext.name); + extbuf.writeBuffer(ext.data); + }); + buf.writeBuffer(extbuf.toBuffer()); + extbuf = new SSHBuffer({}); + exts.forEach(function(ext) { + if (ext.critical === true) + return; + extbuf.writeString(ext.name); + extbuf.writeBuffer(ext.data); + }); + buf.writeBuffer(extbuf.toBuffer()); + buf.writeBuffer(Buffer2.alloc(0)); + sub = rfc4253.write(cert.issuerKey); + buf.writeBuffer(sub); + if (!noSig) + buf.writeBuffer(sig.signature.toBuffer("ssh")); + return buf.toBuffer(); + } + function getAlg(certType) { + if (certType === "ssh-rsa-cert-v01@openssh.com") + return "rsa"; + if (certType === "ssh-dss-cert-v01@openssh.com") + return "dsa"; + if (certType.match(ECDSA_ALGO)) + return "ecdsa"; + if (certType === "ssh-ed25519-cert-v01@openssh.com") + return "ed25519"; + throw new Error("Unsupported cert type " + certType); + } + function getCertType(key) { + if (key.type === "rsa") + return "ssh-rsa-cert-v01@openssh.com"; + if (key.type === "dsa") + return "ssh-dss-cert-v01@openssh.com"; + if (key.type === "ecdsa") + return "ecdsa-sha2-" + key.curve + "-cert-v01@openssh.com"; + if (key.type === "ed25519") + return "ssh-ed25519-cert-v01@openssh.com"; + throw new Error("Unsupported key type " + key.type); + } + } +}); + +// node_modules/sshpk/lib/formats/x509.js +var require_x509 = __commonJS({ + "node_modules/sshpk/lib/formats/x509.js"(exports2, module2) { + module2.exports = { + read, + verify, + sign, + signAsync, + write + }; + var assert = require_assert(); + var asn1 = require_lib(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var pem = require_pem(); + var Identity = require_identity(); + var Signature = require_signature(); + var Certificate = require_certificate(); + var pkcs8 = require_pkcs8(); + function readMPInt(der, nm) { + assert.strictEqual( + der.peek(), + asn1.Ber.Integer, + nm + " is not an Integer" + ); + return utils.mpNormalize(der.readString(asn1.Ber.Integer, true)); + } + function verify(cert, key) { + var sig = cert.signatures.x509; + assert.object(sig, "x509 signature"); + var algParts = sig.algo.split("-"); + if (algParts[0] !== key.type) + return false; + var blob = sig.cache; + if (blob === void 0) { + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + blob = der.buffer; + } + var verifier = key.createVerify(algParts[1]); + verifier.write(blob); + return verifier.verify(sig.signature); + } + function Local(i2) { + return asn1.Ber.Context | asn1.Ber.Constructor | i2; + } + function Context(i2) { + return asn1.Ber.Context | i2; + } + var SIGN_ALGS = { + "rsa-md5": "1.2.840.113549.1.1.4", + "rsa-sha1": "1.2.840.113549.1.1.5", + "rsa-sha256": "1.2.840.113549.1.1.11", + "rsa-sha384": "1.2.840.113549.1.1.12", + "rsa-sha512": "1.2.840.113549.1.1.13", + "dsa-sha1": "1.2.840.10040.4.3", + "dsa-sha256": "2.16.840.1.101.3.4.3.2", + "ecdsa-sha1": "1.2.840.10045.4.1", + "ecdsa-sha256": "1.2.840.10045.4.3.2", + "ecdsa-sha384": "1.2.840.10045.4.3.3", + "ecdsa-sha512": "1.2.840.10045.4.3.4", + "ed25519-sha512": "1.3.101.112" + }; + Object.keys(SIGN_ALGS).forEach(function(k) { + SIGN_ALGS[SIGN_ALGS[k]] = k; + }); + SIGN_ALGS["1.3.14.3.2.3"] = "rsa-md5"; + SIGN_ALGS["1.3.14.3.2.29"] = "rsa-sha1"; + var EXTS = { + "issuerKeyId": "2.5.29.35", + "altName": "2.5.29.17", + "basicConstraints": "2.5.29.19", + "keyUsage": "2.5.29.15", + "extKeyUsage": "2.5.29.37" + }; + function read(buf, options) { + if (typeof buf === "string") { + buf = Buffer2.from(buf, "binary"); + } + assert.buffer(buf, "buf"); + var der = new asn1.BerReader(buf); + der.readSequence(); + if (Math.abs(der.length - der.remain) > 1) { + throw new Error("DER sequence does not contain whole byte stream"); + } + var tbsStart = der.offset; + der.readSequence(); + var sigOffset = der.offset + der.length; + var tbsEnd = sigOffset; + if (der.peek() === Local(0)) { + der.readSequence(Local(0)); + var version = der.readInt(); + assert.ok( + version <= 3, + "only x.509 versions up to v3 supported" + ); + } + var cert = {}; + cert.signatures = {}; + var sig = cert.signatures.x509 = {}; + sig.extras = {}; + cert.serial = readMPInt(der, "serial"); + der.readSequence(); + var after = der.offset + der.length; + var certAlgOid = der.readOID(); + var certAlg = SIGN_ALGS[certAlgOid]; + if (certAlg === void 0) + throw new Error("unknown signature algorithm " + certAlgOid); + der._offset = after; + cert.issuer = Identity.parseAsn1(der); + der.readSequence(); + cert.validFrom = readDate(der); + cert.validUntil = readDate(der); + cert.subjects = [Identity.parseAsn1(der)]; + der.readSequence(); + after = der.offset + der.length; + cert.subjectKey = pkcs8.readPkcs8(void 0, "public", der); + der._offset = after; + if (der.peek() === Local(1)) { + der.readSequence(Local(1)); + sig.extras.issuerUniqueID = buf.slice(der.offset, der.offset + der.length); + der._offset += der.length; + } + if (der.peek() === Local(2)) { + der.readSequence(Local(2)); + sig.extras.subjectUniqueID = buf.slice(der.offset, der.offset + der.length); + der._offset += der.length; + } + if (der.peek() === Local(3)) { + der.readSequence(Local(3)); + var extEnd = der.offset + der.length; + der.readSequence(); + while (der.offset < extEnd) + readExtension(cert, buf, der); + assert.strictEqual(der.offset, extEnd); + } + assert.strictEqual(der.offset, sigOffset); + der.readSequence(); + after = der.offset + der.length; + var sigAlgOid = der.readOID(); + var sigAlg = SIGN_ALGS[sigAlgOid]; + if (sigAlg === void 0) + throw new Error("unknown signature algorithm " + sigAlgOid); + der._offset = after; + var sigData = der.readString(asn1.Ber.BitString, true); + if (sigData[0] === 0) + sigData = sigData.slice(1); + var algParts = sigAlg.split("-"); + sig.signature = Signature.parse(sigData, algParts[0], "asn1"); + sig.signature.hashAlgorithm = algParts[1]; + sig.algo = sigAlg; + sig.cache = buf.slice(tbsStart, tbsEnd); + return new Certificate(cert); + } + function readDate(der) { + if (der.peek() === asn1.Ber.UTCTime) { + return utcTimeToDate(der.readString(asn1.Ber.UTCTime)); + } else if (der.peek() === asn1.Ber.GeneralizedTime) { + return gTimeToDate(der.readString(asn1.Ber.GeneralizedTime)); + } else { + throw new Error("Unsupported date format"); + } + } + function writeDate(der, date) { + if (date.getUTCFullYear() >= 2050 || date.getUTCFullYear() < 1950) { + der.writeString(dateToGTime(date), asn1.Ber.GeneralizedTime); + } else { + der.writeString(dateToUTCTime(date), asn1.Ber.UTCTime); + } + } + var ALTNAME = { + OtherName: Local(0), + RFC822Name: Context(1), + DNSName: Context(2), + X400Address: Local(3), + DirectoryName: Local(4), + EDIPartyName: Local(5), + URI: Context(6), + IPAddress: Context(7), + OID: Context(8) + }; + var EXTPURPOSE = { + "serverAuth": "1.3.6.1.5.5.7.3.1", + "clientAuth": "1.3.6.1.5.5.7.3.2", + "codeSigning": "1.3.6.1.5.5.7.3.3", + /* See https://github.com/joyent/oid-docs/blob/master/root.md */ + "joyentDocker": "1.3.6.1.4.1.38678.1.4.1", + "joyentCmon": "1.3.6.1.4.1.38678.1.4.2" + }; + var EXTPURPOSE_REV = {}; + Object.keys(EXTPURPOSE).forEach(function(k) { + EXTPURPOSE_REV[EXTPURPOSE[k]] = k; + }); + var KEYUSEBITS = [ + "signature", + "identity", + "keyEncryption", + "encryption", + "keyAgreement", + "ca", + "crl" + ]; + function readExtension(cert, buf, der) { + der.readSequence(); + var after = der.offset + der.length; + var extId = der.readOID(); + var id; + var sig = cert.signatures.x509; + if (!sig.extras.exts) + sig.extras.exts = []; + var critical; + if (der.peek() === asn1.Ber.Boolean) + critical = der.readBoolean(); + switch (extId) { + case EXTS.basicConstraints: + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var bcEnd = der.offset + der.length; + var ca = false; + if (der.peek() === asn1.Ber.Boolean) + ca = der.readBoolean(); + if (cert.purposes === void 0) + cert.purposes = []; + if (ca === true) + cert.purposes.push("ca"); + var bc = { oid: extId, critical }; + if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer) + bc.pathLen = der.readInt(); + sig.extras.exts.push(bc); + break; + case EXTS.extKeyUsage: + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + if (cert.purposes === void 0) + cert.purposes = []; + var ekEnd = der.offset + der.length; + while (der.offset < ekEnd) { + var oid = der.readOID(); + cert.purposes.push(EXTPURPOSE_REV[oid] || oid); + } + if (cert.purposes.indexOf("serverAuth") !== -1 && cert.purposes.indexOf("clientAuth") === -1) { + cert.subjects.forEach(function(ide) { + if (ide.type !== "host") { + ide.type = "host"; + ide.hostname = ide.uid || ide.email || ide.components[0].value; + } + }); + } else if (cert.purposes.indexOf("clientAuth") !== -1 && cert.purposes.indexOf("serverAuth") === -1) { + cert.subjects.forEach(function(ide) { + if (ide.type !== "user") { + ide.type = "user"; + ide.uid = ide.hostname || ide.email || ide.components[0].value; + } + }); + } + sig.extras.exts.push({ oid: extId, critical }); + break; + case EXTS.keyUsage: + der.readSequence(asn1.Ber.OctetString); + var bits = der.readString(asn1.Ber.BitString, true); + var setBits = readBitField(bits, KEYUSEBITS); + setBits.forEach(function(bit) { + if (cert.purposes === void 0) + cert.purposes = []; + if (cert.purposes.indexOf(bit) === -1) + cert.purposes.push(bit); + }); + sig.extras.exts.push({ + oid: extId, + critical, + bits + }); + break; + case EXTS.altName: + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var aeEnd = der.offset + der.length; + while (der.offset < aeEnd) { + switch (der.peek()) { + case ALTNAME.OtherName: + case ALTNAME.EDIPartyName: + der.readSequence(); + der._offset += der.length; + break; + case ALTNAME.OID: + der.readOID(ALTNAME.OID); + break; + case ALTNAME.RFC822Name: + var email = der.readString(ALTNAME.RFC822Name); + id = Identity.forEmail(email); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + case ALTNAME.DirectoryName: + der.readSequence(ALTNAME.DirectoryName); + id = Identity.parseAsn1(der); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + case ALTNAME.DNSName: + var host = der.readString( + ALTNAME.DNSName + ); + id = Identity.forHost(host); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + default: + der.readString(der.peek()); + break; + } + } + sig.extras.exts.push({ oid: extId, critical }); + break; + default: + sig.extras.exts.push({ + oid: extId, + critical, + data: der.readString(asn1.Ber.OctetString, true) + }); + break; + } + der._offset = after; + } + var UTCTIME_RE = /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; + function utcTimeToDate(t) { + var m = t.match(UTCTIME_RE); + assert.ok(m, "timestamps must be in UTC"); + var d = /* @__PURE__ */ new Date(); + var thisYear = d.getUTCFullYear(); + var century = Math.floor(thisYear / 100) * 100; + var year = parseInt(m[1], 10); + if (thisYear % 100 < 50 && year >= 60) + year += century - 1; + else + year += century; + d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10)); + d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); + if (m[6] && m[6].length > 0) + d.setUTCSeconds(parseInt(m[6], 10)); + return d; + } + var GTIME_RE = /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; + function gTimeToDate(t) { + var m = t.match(GTIME_RE); + assert.ok(m); + var d = /* @__PURE__ */ new Date(); + d.setUTCFullYear( + parseInt(m[1], 10), + parseInt(m[2], 10) - 1, + parseInt(m[3], 10) + ); + d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); + if (m[6] && m[6].length > 0) + d.setUTCSeconds(parseInt(m[6], 10)); + return d; + } + function zeroPad(n, m) { + if (m === void 0) + m = 2; + var s = "" + n; + while (s.length < m) + s = "0" + s; + return s; + } + function dateToUTCTime(d) { + var s = ""; + s += zeroPad(d.getUTCFullYear() % 100); + s += zeroPad(d.getUTCMonth() + 1); + s += zeroPad(d.getUTCDate()); + s += zeroPad(d.getUTCHours()); + s += zeroPad(d.getUTCMinutes()); + s += zeroPad(d.getUTCSeconds()); + s += "Z"; + return s; + } + function dateToGTime(d) { + var s = ""; + s += zeroPad(d.getUTCFullYear(), 4); + s += zeroPad(d.getUTCMonth() + 1); + s += zeroPad(d.getUTCDate()); + s += zeroPad(d.getUTCHours()); + s += zeroPad(d.getUTCMinutes()); + s += zeroPad(d.getUTCSeconds()); + s += "Z"; + return s; + } + function sign(cert, key) { + if (cert.signatures.x509 === void 0) + cert.signatures.x509 = {}; + var sig = cert.signatures.x509; + sig.algo = key.type + "-" + key.defaultHashAlgorithm(); + if (SIGN_ALGS[sig.algo] === void 0) + return false; + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + var blob = der.buffer; + sig.cache = blob; + var signer = key.createSign(); + signer.write(blob); + cert.signatures.x509.signature = signer.sign(); + return true; + } + function signAsync(cert, signer, done) { + if (cert.signatures.x509 === void 0) + cert.signatures.x509 = {}; + var sig = cert.signatures.x509; + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + var blob = der.buffer; + sig.cache = blob; + signer(blob, function(err, signature) { + if (err) { + done(err); + return; + } + sig.algo = signature.type + "-" + signature.hashAlgorithm; + if (SIGN_ALGS[sig.algo] === void 0) { + done(new Error('Invalid signing algorithm "' + sig.algo + '"')); + return; + } + sig.signature = signature; + done(); + }); + } + function write(cert, options) { + var sig = cert.signatures.x509; + assert.object(sig, "x509 signature"); + var der = new asn1.BerWriter(); + der.startSequence(); + if (sig.cache) { + der._ensure(sig.cache.length); + sig.cache.copy(der._buf, der._offset); + der._offset += sig.cache.length; + } else { + writeTBSCert(cert, der); + } + der.startSequence(); + der.writeOID(SIGN_ALGS[sig.algo]); + if (sig.algo.match(/^rsa-/)) + der.writeNull(); + der.endSequence(); + var sigData = sig.signature.toBuffer("asn1"); + var data = Buffer2.alloc(sigData.length + 1); + data[0] = 0; + sigData.copy(data, 1); + der.writeBuffer(data, asn1.Ber.BitString); + der.endSequence(); + return der.buffer; + } + function writeTBSCert(cert, der) { + var sig = cert.signatures.x509; + assert.object(sig, "x509 signature"); + der.startSequence(); + der.startSequence(Local(0)); + der.writeInt(2); + der.endSequence(); + der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer); + der.startSequence(); + der.writeOID(SIGN_ALGS[sig.algo]); + if (sig.algo.match(/^rsa-/)) + der.writeNull(); + der.endSequence(); + cert.issuer.toAsn1(der); + der.startSequence(); + writeDate(der, cert.validFrom); + writeDate(der, cert.validUntil); + der.endSequence(); + var subject = cert.subjects[0]; + var altNames = cert.subjects.slice(1); + subject.toAsn1(der); + pkcs8.writePkcs8(der, cert.subjectKey); + if (sig.extras && sig.extras.issuerUniqueID) { + der.writeBuffer(sig.extras.issuerUniqueID, Local(1)); + } + if (sig.extras && sig.extras.subjectUniqueID) { + der.writeBuffer(sig.extras.subjectUniqueID, Local(2)); + } + if (altNames.length > 0 || subject.type === "host" || cert.purposes !== void 0 && cert.purposes.length > 0 || sig.extras && sig.extras.exts) { + der.startSequence(Local(3)); + der.startSequence(); + var exts = []; + if (cert.purposes !== void 0 && cert.purposes.length > 0) { + exts.push({ + oid: EXTS.basicConstraints, + critical: true + }); + exts.push({ + oid: EXTS.keyUsage, + critical: true + }); + exts.push({ + oid: EXTS.extKeyUsage, + critical: true + }); + } + exts.push({ oid: EXTS.altName }); + if (sig.extras && sig.extras.exts) + exts = sig.extras.exts; + for (var i2 = 0; i2 < exts.length; ++i2) { + der.startSequence(); + der.writeOID(exts[i2].oid); + if (exts[i2].critical !== void 0) + der.writeBoolean(exts[i2].critical); + if (exts[i2].oid === EXTS.altName) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + if (subject.type === "host") { + der.writeString( + subject.hostname, + Context(2) + ); + } + for (var j = 0; j < altNames.length; ++j) { + if (altNames[j].type === "host") { + der.writeString( + altNames[j].hostname, + ALTNAME.DNSName + ); + } else if (altNames[j].type === "email") { + der.writeString( + altNames[j].email, + ALTNAME.RFC822Name + ); + } else { + der.startSequence( + ALTNAME.DirectoryName + ); + altNames[j].toAsn1(der); + der.endSequence(); + } + } + der.endSequence(); + der.endSequence(); + } else if (exts[i2].oid === EXTS.basicConstraints) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + var ca = cert.purposes.indexOf("ca") !== -1; + var pathLen = exts[i2].pathLen; + der.writeBoolean(ca); + if (pathLen !== void 0) + der.writeInt(pathLen); + der.endSequence(); + der.endSequence(); + } else if (exts[i2].oid === EXTS.extKeyUsage) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + cert.purposes.forEach(function(purpose) { + if (purpose === "ca") + return; + if (KEYUSEBITS.indexOf(purpose) !== -1) + return; + var oid = purpose; + if (EXTPURPOSE[purpose] !== void 0) + oid = EXTPURPOSE[purpose]; + der.writeOID(oid); + }); + der.endSequence(); + der.endSequence(); + } else if (exts[i2].oid === EXTS.keyUsage) { + der.startSequence(asn1.Ber.OctetString); + if (exts[i2].bits !== void 0) { + der.writeBuffer( + exts[i2].bits, + asn1.Ber.BitString + ); + } else { + var bits = writeBitField( + cert.purposes, + KEYUSEBITS + ); + der.writeBuffer( + bits, + asn1.Ber.BitString + ); + } + der.endSequence(); + } else { + der.writeBuffer( + exts[i2].data, + asn1.Ber.OctetString + ); + } + der.endSequence(); + } + der.endSequence(); + der.endSequence(); + } + der.endSequence(); + } + function readBitField(bits, bitIndex) { + var bitLen = 8 * (bits.length - 1) - bits[0]; + var setBits = {}; + for (var i2 = 0; i2 < bitLen; ++i2) { + var byteN = 1 + Math.floor(i2 / 8); + var bit = 7 - i2 % 8; + var mask = 1 << bit; + var bitVal = (bits[byteN] & mask) !== 0; + var name = bitIndex[i2]; + if (bitVal && typeof name === "string") { + setBits[name] = true; + } + } + return Object.keys(setBits); + } + function writeBitField(setBits, bitIndex) { + var bitLen = bitIndex.length; + var blen = Math.ceil(bitLen / 8); + var unused = blen * 8 - bitLen; + var bits = Buffer2.alloc(1 + blen); + bits[0] = unused; + for (var i2 = 0; i2 < bitLen; ++i2) { + var byteN = 1 + Math.floor(i2 / 8); + var bit = 7 - i2 % 8; + var mask = 1 << bit; + var name = bitIndex[i2]; + if (name === void 0) + continue; + var bitVal = setBits.indexOf(name) !== -1; + if (bitVal) { + bits[byteN] |= mask; + } + } + return bits; + } + } +}); + +// node_modules/sshpk/lib/formats/x509-pem.js +var require_x509_pem = __commonJS({ + "node_modules/sshpk/lib/formats/x509-pem.js"(exports2, module2) { + var x509 = require_x509(); + module2.exports = { + read, + verify: x509.verify, + sign: x509.sign, + write + }; + var assert = require_assert(); + var asn1 = require_lib(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var pem = require_pem(); + var Identity = require_identity(); + var Signature = require_signature(); + var Certificate = require_certificate(); + function read(buf, options) { + if (typeof buf !== "string") { + assert.buffer(buf, "buf"); + buf = buf.toString("ascii"); + } + var lines = buf.trim().split(/[\r\n]+/g); + var m; + var si = -1; + while (!m && si < lines.length) { + m = lines[++si].match( + /*JSSTYLED*/ + /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/ + ); + } + assert.ok(m, "invalid PEM header"); + var m2; + var ei = lines.length; + while (!m2 && ei > 0) { + m2 = lines[--ei].match( + /*JSSTYLED*/ + /[-]+[ ]*END CERTIFICATE[ ]*[-]+/ + ); + } + assert.ok(m2, "invalid PEM footer"); + lines = lines.slice(si, ei + 1); + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match( + /*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/ + ); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + lines = lines.slice(0, -1).join(""); + buf = Buffer2.from(lines, "base64"); + return x509.read(buf, options); + } + function write(cert, options) { + var dbuf = x509.write(cert, options); + var header = "CERTIFICATE"; + var tmp = dbuf.toString("base64"); + var len = tmp.length + tmp.length / 64 + 18 + 16 + header.length * 2 + 10; + var buf = Buffer2.alloc(len); + var o = 0; + o += buf.write("-----BEGIN " + header + "-----\n", o); + for (var i2 = 0; i2 < tmp.length; ) { + var limit = i2 + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i2, limit), o); + buf[o++] = 10; + i2 = limit; + } + o += buf.write("-----END " + header + "-----\n", o); + return buf.slice(0, o); + } + } +}); + +// node_modules/sshpk/lib/certificate.js +var require_certificate = __commonJS({ + "node_modules/sshpk/lib/certificate.js"(exports2, module2) { + module2.exports = Certificate; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var crypto2 = require("crypto"); + var Fingerprint = require_fingerprint(); + var Signature = require_signature(); + var errs = require_errors(); + var util2 = require("util"); + var utils = require_utils(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var Identity = require_identity(); + var formats = {}; + formats["openssh"] = require_openssh_cert(); + formats["x509"] = require_x509(); + formats["pem"] = require_x509_pem(); + var CertificateParseError = errs.CertificateParseError; + var InvalidAlgorithmError = errs.InvalidAlgorithmError; + function Certificate(opts) { + assert.object(opts, "options"); + assert.arrayOfObject(opts.subjects, "options.subjects"); + utils.assertCompatible( + opts.subjects[0], + Identity, + [1, 0], + "options.subjects" + ); + utils.assertCompatible( + opts.subjectKey, + Key, + [1, 0], + "options.subjectKey" + ); + utils.assertCompatible(opts.issuer, Identity, [1, 0], "options.issuer"); + if (opts.issuerKey !== void 0) { + utils.assertCompatible( + opts.issuerKey, + Key, + [1, 0], + "options.issuerKey" + ); + } + assert.object(opts.signatures, "options.signatures"); + assert.buffer(opts.serial, "options.serial"); + assert.date(opts.validFrom, "options.validFrom"); + assert.date(opts.validUntil, "optons.validUntil"); + assert.optionalArrayOfString(opts.purposes, "options.purposes"); + this._hashCache = {}; + this.subjects = opts.subjects; + this.issuer = opts.issuer; + this.subjectKey = opts.subjectKey; + this.issuerKey = opts.issuerKey; + this.signatures = opts.signatures; + this.serial = opts.serial; + this.validFrom = opts.validFrom; + this.validUntil = opts.validUntil; + this.purposes = opts.purposes; + } + Certificate.formats = formats; + Certificate.prototype.toBuffer = function(format, options) { + if (format === void 0) + format = "x509"; + assert.string(format, "format"); + assert.object(formats[format], "formats[format]"); + assert.optionalObject(options, "options"); + return formats[format].write(this, options); + }; + Certificate.prototype.toString = function(format, options) { + if (format === void 0) + format = "pem"; + return this.toBuffer(format, options).toString(); + }; + Certificate.prototype.fingerprint = function(algo) { + if (algo === void 0) + algo = "sha256"; + assert.string(algo, "algorithm"); + var opts = { + type: "certificate", + hash: this.hash(algo), + algorithm: algo + }; + return new Fingerprint(opts); + }; + Certificate.prototype.hash = function(algo) { + assert.string(algo, "algorithm"); + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === void 0) + throw new InvalidAlgorithmError(algo); + if (this._hashCache[algo]) + return this._hashCache[algo]; + var hash = crypto2.createHash(algo).update(this.toBuffer("x509")).digest(); + this._hashCache[algo] = hash; + return hash; + }; + Certificate.prototype.isExpired = function(when) { + if (when === void 0) + when = /* @__PURE__ */ new Date(); + return !(when.getTime() >= this.validFrom.getTime() && when.getTime() < this.validUntil.getTime()); + }; + Certificate.prototype.isSignedBy = function(issuerCert) { + utils.assertCompatible(issuerCert, Certificate, [1, 0], "issuer"); + if (!this.issuer.equals(issuerCert.subjects[0])) + return false; + if (this.issuer.purposes && this.issuer.purposes.length > 0 && this.issuer.purposes.indexOf("ca") === -1) { + return false; + } + return this.isSignedByKey(issuerCert.subjectKey); + }; + Certificate.prototype.getExtension = function(keyOrOid) { + assert.string(keyOrOid, "keyOrOid"); + var ext = this.getExtensions().filter(function(maybeExt) { + if (maybeExt.format === "x509") + return maybeExt.oid === keyOrOid; + if (maybeExt.format === "openssh") + return maybeExt.name === keyOrOid; + return false; + })[0]; + return ext; + }; + Certificate.prototype.getExtensions = function() { + var exts = []; + var x509 = this.signatures.x509; + if (x509 && x509.extras && x509.extras.exts) { + x509.extras.exts.forEach(function(ext) { + ext.format = "x509"; + exts.push(ext); + }); + } + var openssh = this.signatures.openssh; + if (openssh && openssh.exts) { + openssh.exts.forEach(function(ext) { + ext.format = "openssh"; + exts.push(ext); + }); + } + return exts; + }; + Certificate.prototype.isSignedByKey = function(issuerKey) { + utils.assertCompatible(issuerKey, Key, [1, 2], "issuerKey"); + if (this.issuerKey !== void 0) { + return this.issuerKey.fingerprint("sha512").matches(issuerKey); + } + var fmt = Object.keys(this.signatures)[0]; + var valid = formats[fmt].verify(this, issuerKey); + if (valid) + this.issuerKey = issuerKey; + return valid; + }; + Certificate.prototype.signWith = function(key) { + utils.assertCompatible(key, PrivateKey, [1, 2], "key"); + var fmts = Object.keys(formats); + var didOne = false; + for (var i2 = 0; i2 < fmts.length; ++i2) { + if (fmts[i2] !== "pem") { + var ret = formats[fmts[i2]].sign(this, key); + if (ret === true) + didOne = true; + } + } + if (!didOne) { + throw new Error("Failed to sign the certificate for any available certificate formats"); + } + }; + Certificate.createSelfSigned = function(subjectOrSubjects, key, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + assert.arrayOfObject(subjects); + subjects.forEach(function(subject) { + utils.assertCompatible(subject, Identity, [1, 0], "subject"); + }); + utils.assertCompatible(key, PrivateKey, [1, 2], "private key"); + assert.optionalObject(options, "options"); + if (options === void 0) + options = {}; + assert.optionalObject(options.validFrom, "options.validFrom"); + assert.optionalObject(options.validUntil, "options.validUntil"); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === void 0) + validFrom = /* @__PURE__ */ new Date(); + if (validUntil === void 0) { + assert.optionalNumber(options.lifetime, "options.lifetime"); + var lifetime = options.lifetime; + if (lifetime === void 0) + lifetime = 10 * 365 * 24 * 3600; + validUntil = /* @__PURE__ */ new Date(); + validUntil.setTime(validUntil.getTime() + lifetime * 1e3); + } + assert.optionalBuffer(options.serial, "options.serial"); + var serial = options.serial; + if (serial === void 0) + serial = Buffer2.from("0000000000000001", "hex"); + var purposes = options.purposes; + if (purposes === void 0) + purposes = []; + if (purposes.indexOf("signature") === -1) + purposes.push("signature"); + if (purposes.indexOf("ca") === -1) + purposes.push("ca"); + if (purposes.indexOf("crl") === -1) + purposes.push("crl"); + if (purposes.length <= 3) { + var hostSubjects = subjects.filter(function(subject) { + return subject.type === "host"; + }); + var userSubjects = subjects.filter(function(subject) { + return subject.type === "user"; + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf("serverAuth") === -1) + purposes.push("serverAuth"); + } + if (userSubjects.length > 0) { + if (purposes.indexOf("clientAuth") === -1) + purposes.push("clientAuth"); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf("keyAgreement") === -1) + purposes.push("keyAgreement"); + if (key.type === "rsa" && purposes.indexOf("encryption") === -1) + purposes.push("encryption"); + } + } + var cert = new Certificate({ + subjects, + issuer: subjects[0], + subjectKey: key.toPublic(), + issuerKey: key.toPublic(), + signatures: {}, + serial, + validFrom, + validUntil, + purposes + }); + cert.signWith(key); + return cert; + }; + Certificate.create = function(subjectOrSubjects, key, issuer, issuerKey, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + assert.arrayOfObject(subjects); + subjects.forEach(function(subject) { + utils.assertCompatible(subject, Identity, [1, 0], "subject"); + }); + utils.assertCompatible(key, Key, [1, 0], "key"); + if (PrivateKey.isPrivateKey(key)) + key = key.toPublic(); + utils.assertCompatible(issuer, Identity, [1, 0], "issuer"); + utils.assertCompatible(issuerKey, PrivateKey, [1, 2], "issuer key"); + assert.optionalObject(options, "options"); + if (options === void 0) + options = {}; + assert.optionalObject(options.validFrom, "options.validFrom"); + assert.optionalObject(options.validUntil, "options.validUntil"); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === void 0) + validFrom = /* @__PURE__ */ new Date(); + if (validUntil === void 0) { + assert.optionalNumber(options.lifetime, "options.lifetime"); + var lifetime = options.lifetime; + if (lifetime === void 0) + lifetime = 10 * 365 * 24 * 3600; + validUntil = /* @__PURE__ */ new Date(); + validUntil.setTime(validUntil.getTime() + lifetime * 1e3); + } + assert.optionalBuffer(options.serial, "options.serial"); + var serial = options.serial; + if (serial === void 0) + serial = Buffer2.from("0000000000000001", "hex"); + var purposes = options.purposes; + if (purposes === void 0) + purposes = []; + if (purposes.indexOf("signature") === -1) + purposes.push("signature"); + if (options.ca === true) { + if (purposes.indexOf("ca") === -1) + purposes.push("ca"); + if (purposes.indexOf("crl") === -1) + purposes.push("crl"); + } + var hostSubjects = subjects.filter(function(subject) { + return subject.type === "host"; + }); + var userSubjects = subjects.filter(function(subject) { + return subject.type === "user"; + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf("serverAuth") === -1) + purposes.push("serverAuth"); + } + if (userSubjects.length > 0) { + if (purposes.indexOf("clientAuth") === -1) + purposes.push("clientAuth"); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf("keyAgreement") === -1) + purposes.push("keyAgreement"); + if (key.type === "rsa" && purposes.indexOf("encryption") === -1) + purposes.push("encryption"); + } + var cert = new Certificate({ + subjects, + issuer, + subjectKey: key, + issuerKey: issuerKey.toPublic(), + signatures: {}, + serial, + validFrom, + validUntil, + purposes + }); + cert.signWith(issuerKey); + return cert; + }; + Certificate.parse = function(data, format, options) { + if (typeof data !== "string") + assert.buffer(data, "data"); + if (format === void 0) + format = "auto"; + assert.string(format, "format"); + if (typeof options === "string") + options = { filename: options }; + assert.optionalObject(options, "options"); + if (options === void 0) + options = {}; + assert.optionalString(options.filename, "options.filename"); + if (options.filename === void 0) + options.filename = "(unnamed)"; + assert.object(formats[format], "formats[format]"); + try { + var k = formats[format].read(data, options); + return k; + } catch (e) { + throw new CertificateParseError(options.filename, format, e); + } + }; + Certificate.isCertificate = function(obj, ver) { + return utils.isCompatible(obj, Certificate, ver); + }; + Certificate.prototype._sshpkApiVersion = [1, 1]; + Certificate._oldVersionDetect = function(obj) { + return [1, 0]; + }; + } +}); + +// node_modules/sshpk/lib/fingerprint.js +var require_fingerprint = __commonJS({ + "node_modules/sshpk/lib/fingerprint.js"(exports2, module2) { + module2.exports = Fingerprint; + var assert = require_assert(); + var Buffer2 = require_safer().Buffer; + var algs = require_algs(); + var crypto2 = require("crypto"); + var errs = require_errors(); + var Key = require_key(); + var PrivateKey = require_private_key(); + var Certificate = require_certificate(); + var utils = require_utils(); + var FingerprintFormatError = errs.FingerprintFormatError; + var InvalidAlgorithmError = errs.InvalidAlgorithmError; + function Fingerprint(opts) { + assert.object(opts, "options"); + assert.string(opts.type, "options.type"); + assert.buffer(opts.hash, "options.hash"); + assert.string(opts.algorithm, "options.algorithm"); + this.algorithm = opts.algorithm.toLowerCase(); + if (algs.hashAlgs[this.algorithm] !== true) + throw new InvalidAlgorithmError(this.algorithm); + this.hash = opts.hash; + this.type = opts.type; + this.hashType = opts.hashType; + } + Fingerprint.prototype.toString = function(format) { + if (format === void 0) { + if (this.algorithm === "md5" || this.hashType === "spki") + format = "hex"; + else + format = "base64"; + } + assert.string(format); + switch (format) { + case "hex": + if (this.hashType === "spki") + return this.hash.toString("hex"); + return addColons(this.hash.toString("hex")); + case "base64": + if (this.hashType === "spki") + return this.hash.toString("base64"); + return sshBase64Format( + this.algorithm, + this.hash.toString("base64") + ); + default: + throw new FingerprintFormatError(void 0, format); + } + }; + Fingerprint.prototype.matches = function(other) { + assert.object(other, "key or certificate"); + if (this.type === "key" && this.hashType !== "ssh") { + utils.assertCompatible(other, Key, [1, 7], "key with spki"); + if (PrivateKey.isPrivateKey(other)) { + utils.assertCompatible( + other, + PrivateKey, + [1, 6], + "privatekey with spki support" + ); + } + } else if (this.type === "key") { + utils.assertCompatible(other, Key, [1, 0], "key"); + } else { + utils.assertCompatible( + other, + Certificate, + [1, 0], + "certificate" + ); + } + var theirHash = other.hash(this.algorithm, this.hashType); + var theirHash2 = crypto2.createHash(this.algorithm).update(theirHash).digest("base64"); + if (this.hash2 === void 0) + this.hash2 = crypto2.createHash(this.algorithm).update(this.hash).digest("base64"); + return this.hash2 === theirHash2; + }; + var base64RE = /^[A-Za-z0-9+\/=]+$/; + var hexRE = /^[a-fA-F0-9]+$/; + Fingerprint.parse = function(fp, options) { + assert.string(fp, "fingerprint"); + var alg, hash, enAlgs; + if (Array.isArray(options)) { + enAlgs = options; + options = {}; + } + assert.optionalObject(options, "options"); + if (options === void 0) + options = {}; + if (options.enAlgs !== void 0) + enAlgs = options.enAlgs; + if (options.algorithms !== void 0) + enAlgs = options.algorithms; + assert.optionalArrayOfString(enAlgs, "algorithms"); + var hashType = "ssh"; + if (options.hashType !== void 0) + hashType = options.hashType; + assert.string(hashType, "options.hashType"); + var parts = fp.split(":"); + if (parts.length == 2) { + alg = parts[0].toLowerCase(); + if (!base64RE.test(parts[1])) + throw new FingerprintFormatError(fp); + try { + hash = Buffer2.from(parts[1], "base64"); + } catch (e) { + throw new FingerprintFormatError(fp); + } + } else if (parts.length > 2) { + alg = "md5"; + if (parts[0].toLowerCase() === "md5") + parts = parts.slice(1); + parts = parts.map(function(p) { + while (p.length < 2) + p = "0" + p; + if (p.length > 2) + throw new FingerprintFormatError(fp); + return p; + }); + parts = parts.join(""); + if (!hexRE.test(parts) || parts.length % 2 !== 0) + throw new FingerprintFormatError(fp); + try { + hash = Buffer2.from(parts, "hex"); + } catch (e) { + throw new FingerprintFormatError(fp); + } + } else { + if (hexRE.test(fp)) { + hash = Buffer2.from(fp, "hex"); + } else if (base64RE.test(fp)) { + hash = Buffer2.from(fp, "base64"); + } else { + throw new FingerprintFormatError(fp); + } + switch (hash.length) { + case 32: + alg = "sha256"; + break; + case 16: + alg = "md5"; + break; + case 20: + alg = "sha1"; + break; + case 64: + alg = "sha512"; + break; + default: + throw new FingerprintFormatError(fp); + } + if (options.hashType === void 0) + hashType = "spki"; + } + if (alg === void 0) + throw new FingerprintFormatError(fp); + if (algs.hashAlgs[alg] === void 0) + throw new InvalidAlgorithmError(alg); + if (enAlgs !== void 0) { + enAlgs = enAlgs.map(function(a) { + return a.toLowerCase(); + }); + if (enAlgs.indexOf(alg) === -1) + throw new InvalidAlgorithmError(alg); + } + return new Fingerprint({ + algorithm: alg, + hash, + type: options.type || "key", + hashType + }); + }; + function addColons(s) { + return s.replace(/(.{2})(?=.)/g, "$1:"); + } + function base64Strip(s) { + return s.replace(/=*$/, ""); + } + function sshBase64Format(alg, h) { + return alg.toUpperCase() + ":" + base64Strip(h); + } + Fingerprint.isFingerprint = function(obj, ver) { + return utils.isCompatible(obj, Fingerprint, ver); + }; + Fingerprint.prototype._sshpkApiVersion = [1, 2]; + Fingerprint._oldVersionDetect = function(obj) { + assert.func(obj.toString); + assert.func(obj.matches); + return [1, 0]; + }; + } +}); + +// node_modules/sshpk/lib/key.js +var require_key = __commonJS({ + "node_modules/sshpk/lib/key.js"(exports2, module2) { + module2.exports = Key; + var assert = require_assert(); + var algs = require_algs(); + var crypto2 = require("crypto"); + var Fingerprint = require_fingerprint(); + var Signature = require_signature(); + var DiffieHellman = require_dhe().DiffieHellman; + var errs = require_errors(); + var utils = require_utils(); + var PrivateKey = require_private_key(); + var edCompat; + try { + edCompat = require_ed_compat(); + } catch (e) { + } + var InvalidAlgorithmError = errs.InvalidAlgorithmError; + var KeyParseError = errs.KeyParseError; + var formats = {}; + formats["auto"] = require_auto(); + formats["pem"] = require_pem(); + formats["pkcs1"] = require_pkcs1(); + formats["pkcs8"] = require_pkcs8(); + formats["rfc4253"] = require_rfc4253(); + formats["ssh"] = require_ssh(); + formats["ssh-private"] = require_ssh_private(); + formats["openssh"] = formats["ssh-private"]; + formats["dnssec"] = require_dnssec(); + formats["putty"] = require_putty(); + formats["ppk"] = formats["putty"]; + function Key(opts) { + assert.object(opts, "options"); + assert.arrayOfObject(opts.parts, "options.parts"); + assert.string(opts.type, "options.type"); + assert.optionalString(opts.comment, "options.comment"); + var algInfo = algs.info[opts.type]; + if (typeof algInfo !== "object") + throw new InvalidAlgorithmError(opts.type); + var partLookup = {}; + for (var i2 = 0; i2 < opts.parts.length; ++i2) { + var part = opts.parts[i2]; + partLookup[part.name] = part; + } + this.type = opts.type; + this.parts = opts.parts; + this.part = partLookup; + this.comment = void 0; + this.source = opts.source; + this._rfc4253Cache = opts._rfc4253Cache; + this._hashCache = {}; + var sz; + this.curve = void 0; + if (this.type === "ecdsa") { + var curve = this.part.curve.data.toString(); + this.curve = curve; + sz = algs.curves[curve].size; + } else if (this.type === "ed25519" || this.type === "curve25519") { + sz = 256; + this.curve = "curve25519"; + } else { + var szPart = this.part[algInfo.sizePart]; + sz = szPart.data.length; + sz = sz * 8 - utils.countZeros(szPart.data); + } + this.size = sz; + } + Key.formats = formats; + Key.prototype.toBuffer = function(format, options) { + if (format === void 0) + format = "ssh"; + assert.string(format, "format"); + assert.object(formats[format], "formats[format]"); + assert.optionalObject(options, "options"); + if (format === "rfc4253") { + if (this._rfc4253Cache === void 0) + this._rfc4253Cache = formats["rfc4253"].write(this); + return this._rfc4253Cache; + } + return formats[format].write(this, options); + }; + Key.prototype.toString = function(format, options) { + return this.toBuffer(format, options).toString(); + }; + Key.prototype.hash = function(algo, type) { + assert.string(algo, "algorithm"); + assert.optionalString(type, "type"); + if (type === void 0) + type = "ssh"; + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === void 0) + throw new InvalidAlgorithmError(algo); + var cacheKey = algo + "||" + type; + if (this._hashCache[cacheKey]) + return this._hashCache[cacheKey]; + var buf; + if (type === "ssh") { + buf = this.toBuffer("rfc4253"); + } else if (type === "spki") { + buf = formats.pkcs8.pkcs8ToBuffer(this); + } else { + throw new Error("Hash type " + type + " not supported"); + } + var hash = crypto2.createHash(algo).update(buf).digest(); + this._hashCache[cacheKey] = hash; + return hash; + }; + Key.prototype.fingerprint = function(algo, type) { + if (algo === void 0) + algo = "sha256"; + if (type === void 0) + type = "ssh"; + assert.string(algo, "algorithm"); + assert.string(type, "type"); + var opts = { + type: "key", + hash: this.hash(algo, type), + algorithm: algo, + hashType: type + }; + return new Fingerprint(opts); + }; + Key.prototype.defaultHashAlgorithm = function() { + var hashAlgo = "sha1"; + if (this.type === "rsa") + hashAlgo = "sha256"; + if (this.type === "dsa" && this.size > 1024) + hashAlgo = "sha256"; + if (this.type === "ed25519") + hashAlgo = "sha512"; + if (this.type === "ecdsa") { + if (this.size <= 256) + hashAlgo = "sha256"; + else if (this.size <= 384) + hashAlgo = "sha384"; + else + hashAlgo = "sha512"; + } + return hashAlgo; + }; + Key.prototype.createVerify = function(hashAlgo) { + if (hashAlgo === void 0) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, "hash algorithm"); + if (this.type === "ed25519" && edCompat !== void 0) + return new edCompat.Verifier(this, hashAlgo); + if (this.type === "curve25519") + throw new Error("Curve25519 keys are not suitable for signing or verification"); + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto2.createVerify(nm); + } catch (e) { + err = e; + } + if (v === void 0 || err instanceof Error && err.message.match(/Unknown message digest/)) { + nm = "RSA-"; + nm += hashAlgo.toUpperCase(); + v = crypto2.createVerify(nm); + } + assert.ok(v, "failed to create verifier"); + var oldVerify = v.verify.bind(v); + var key = this.toBuffer("pkcs8"); + var curve = this.curve; + var self2 = this; + v.verify = function(signature, fmt) { + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== self2.type) + return false; + if (signature.hashAlgorithm && signature.hashAlgorithm !== hashAlgo) + return false; + if (signature.curve && self2.type === "ecdsa" && signature.curve !== curve) + return false; + return oldVerify(key, signature.toBuffer("asn1")); + } else if (typeof signature === "string" || Buffer.isBuffer(signature)) { + return oldVerify(key, signature, fmt); + } else if (Signature.isSignature(signature, [1, 0])) { + throw new Error("signature was created by too old a version of sshpk and cannot be verified"); + } else { + throw new TypeError("signature must be a string, Buffer, or Signature object"); + } + }; + return v; + }; + Key.prototype.createDiffieHellman = function() { + if (this.type === "rsa") + throw new Error("RSA keys do not support Diffie-Hellman"); + return new DiffieHellman(this); + }; + Key.prototype.createDH = Key.prototype.createDiffieHellman; + Key.parse = function(data, format, options) { + if (typeof data !== "string") + assert.buffer(data, "data"); + if (format === void 0) + format = "auto"; + assert.string(format, "format"); + if (typeof options === "string") + options = { filename: options }; + assert.optionalObject(options, "options"); + if (options === void 0) + options = {}; + assert.optionalString(options.filename, "options.filename"); + if (options.filename === void 0) + options.filename = "(unnamed)"; + assert.object(formats[format], "formats[format]"); + try { + var k = formats[format].read(data, options); + if (k instanceof PrivateKey) + k = k.toPublic(); + if (!k.comment) + k.comment = options.filename; + return k; + } catch (e) { + if (e.name === "KeyEncryptedError") + throw e; + throw new KeyParseError(options.filename, format, e); + } + }; + Key.isKey = function(obj, ver) { + return utils.isCompatible(obj, Key, ver); + }; + Key.prototype._sshpkApiVersion = [1, 7]; + Key._oldVersionDetect = function(obj) { + assert.func(obj.toBuffer); + assert.func(obj.fingerprint); + if (obj.createDH) + return [1, 4]; + if (obj.defaultHashAlgorithm) + return [1, 3]; + if (obj.formats["auto"]) + return [1, 2]; + if (obj.formats["pkcs1"]) + return [1, 1]; + return [1, 0]; + }; + } +}); + +// node_modules/sshpk/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/sshpk/lib/index.js"(exports2, module2) { + var Key = require_key(); + var Fingerprint = require_fingerprint(); + var Signature = require_signature(); + var PrivateKey = require_private_key(); + var Certificate = require_certificate(); + var Identity = require_identity(); + var errs = require_errors(); + module2.exports = { + /* top-level classes */ + Key, + parseKey: Key.parse, + Fingerprint, + parseFingerprint: Fingerprint.parse, + Signature, + parseSignature: Signature.parse, + PrivateKey, + parsePrivateKey: PrivateKey.parse, + generatePrivateKey: PrivateKey.generate, + Certificate, + parseCertificate: Certificate.parse, + createSelfSignedCertificate: Certificate.createSelfSigned, + createCertificate: Certificate.create, + Identity, + identityFromDN: Identity.parseDN, + identityForHost: Identity.forHost, + identityForUser: Identity.forUser, + identityForEmail: Identity.forEmail, + identityFromArray: Identity.fromArray, + /* errors */ + FingerprintFormatError: errs.FingerprintFormatError, + InvalidAlgorithmError: errs.InvalidAlgorithmError, + KeyParseError: errs.KeyParseError, + SignatureParseError: errs.SignatureParseError, + KeyEncryptedError: errs.KeyEncryptedError, + CertificateParseError: errs.CertificateParseError + }; + } +}); + +// node_modules/http-signature/lib/utils.js +var require_utils2 = __commonJS({ + "node_modules/http-signature/lib/utils.js"(exports2, module2) { + var assert = require_assert(); + var sshpk = require_lib2(); + var util2 = require("util"); + var HASH_ALGOS = { + "sha1": true, + "sha256": true, + "sha512": true + }; + var PK_ALGOS = { + "rsa": true, + "dsa": true, + "ecdsa": true + }; + function HttpSignatureError(message, caller) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, caller || HttpSignatureError); + this.message = message; + this.name = caller.name; + } + util2.inherits(HttpSignatureError, Error); + function InvalidAlgorithmError(message) { + HttpSignatureError.call(this, message, InvalidAlgorithmError); + } + util2.inherits(InvalidAlgorithmError, HttpSignatureError); + function validateAlgorithm(algorithm) { + var alg = algorithm.toLowerCase().split("-"); + if (alg.length !== 2) { + throw new InvalidAlgorithmError(alg[0].toUpperCase() + " is not a valid algorithm"); + } + if (alg[0] !== "hmac" && !PK_ALGOS[alg[0]]) { + throw new InvalidAlgorithmError(alg[0].toUpperCase() + " type keys are not supported"); + } + if (!HASH_ALGOS[alg[1]]) { + throw new InvalidAlgorithmError(alg[1].toUpperCase() + " is not a supported hash algorithm"); + } + return alg; + } + module2.exports = { + HASH_ALGOS, + PK_ALGOS, + HttpSignatureError, + InvalidAlgorithmError, + validateAlgorithm, + /** + * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. + * + * The intent of this module is to interoperate with OpenSSL only, + * specifically the node crypto module's `verify` method. + * + * @param {String} key an OpenSSH public key. + * @return {String} PEM encoded form of the RSA public key. + * @throws {TypeError} on bad input. + * @throws {Error} on invalid ssh key formatted data. + */ + sshKeyToPEM: function sshKeyToPEM(key) { + assert.string(key, "ssh_key"); + var k = sshpk.parseKey(key, "ssh"); + return k.toString("pem"); + }, + /** + * Generates an OpenSSH fingerprint from an ssh public key. + * + * @param {String} key an OpenSSH public key. + * @return {String} key fingerprint. + * @throws {TypeError} on bad input. + * @throws {Error} if what you passed doesn't look like an ssh public key. + */ + fingerprint: function fingerprint(key) { + assert.string(key, "ssh_key"); + var k = sshpk.parseKey(key, "ssh"); + return k.fingerprint("md5").toString("hex"); + }, + /** + * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa) + * + * The reverse of the above function. + */ + pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) { + assert.equal("string", typeof pem, "typeof pem"); + var k = sshpk.parseKey(pem, "pem"); + k.comment = comment; + return k.toString("ssh"); + } + }; + } +}); + +// node_modules/http-signature/lib/parser.js +var require_parser = __commonJS({ + "node_modules/http-signature/lib/parser.js"(exports2, module2) { + var assert = require_assert(); + var util2 = require("util"); + var utils = require_utils2(); + var HASH_ALGOS = utils.HASH_ALGOS; + var PK_ALGOS = utils.PK_ALGOS; + var HttpSignatureError = utils.HttpSignatureError; + var InvalidAlgorithmError = utils.InvalidAlgorithmError; + var validateAlgorithm = utils.validateAlgorithm; + var State = { + New: 0, + Params: 1 + }; + var ParamsState = { + Name: 0, + Quote: 1, + Value: 2, + Comma: 3 + }; + function ExpiredRequestError(message) { + HttpSignatureError.call(this, message, ExpiredRequestError); + } + util2.inherits(ExpiredRequestError, HttpSignatureError); + function InvalidHeaderError(message) { + HttpSignatureError.call(this, message, InvalidHeaderError); + } + util2.inherits(InvalidHeaderError, HttpSignatureError); + function InvalidParamsError(message) { + HttpSignatureError.call(this, message, InvalidParamsError); + } + util2.inherits(InvalidParamsError, HttpSignatureError); + function MissingHeaderError(message) { + HttpSignatureError.call(this, message, MissingHeaderError); + } + util2.inherits(MissingHeaderError, HttpSignatureError); + function StrictParsingError(message) { + HttpSignatureError.call(this, message, StrictParsingError); + } + util2.inherits(StrictParsingError, HttpSignatureError); + module2.exports = { + /** + * Parses the 'Authorization' header out of an http.ServerRequest object. + * + * Note that this API will fully validate the Authorization header, and throw + * on any error. It will not however check the signature, or the keyId format + * as those are specific to your environment. You can use the options object + * to pass in extra constraints. + * + * As a response object you can expect this: + * + * { + * "scheme": "Signature", + * "params": { + * "keyId": "foo", + * "algorithm": "rsa-sha256", + * "headers": [ + * "date" or "x-date", + * "digest" + * ], + * "signature": "base64" + * }, + * "signingString": "ready to be passed to crypto.verify()" + * } + * + * @param {Object} request an http.ServerRequest. + * @param {Object} options an optional options object with: + * - clockSkew: allowed clock skew in seconds (default 300). + * - headers: required header names (def: date or x-date) + * - algorithms: algorithms to support (default: all). + * - strict: should enforce latest spec parsing + * (default: false). + * @return {Object} parsed out object (see above). + * @throws {TypeError} on invalid input. + * @throws {InvalidHeaderError} on an invalid Authorization header error. + * @throws {InvalidParamsError} if the params in the scheme are invalid. + * @throws {MissingHeaderError} if the params indicate a header not present, + * either in the request headers from the params, + * or not in the params from a required header + * in options. + * @throws {StrictParsingError} if old attributes are used in strict parsing + * mode. + * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew. + */ + parseRequest: function parseRequest(request, options) { + assert.object(request, "request"); + assert.object(request.headers, "request.headers"); + if (options === void 0) { + options = {}; + } + if (options.headers === void 0) { + options.headers = [request.headers["x-date"] ? "x-date" : "date"]; + } + assert.object(options, "options"); + assert.arrayOfString(options.headers, "options.headers"); + assert.optionalFinite(options.clockSkew, "options.clockSkew"); + var authzHeaderName = options.authorizationHeaderName || "authorization"; + if (!request.headers[authzHeaderName]) { + throw new MissingHeaderError("no " + authzHeaderName + " header present in the request"); + } + options.clockSkew = options.clockSkew || 300; + var i2 = 0; + var state = State.New; + var substate = ParamsState.Name; + var tmpName = ""; + var tmpValue = ""; + var parsed = { + scheme: "", + params: {}, + signingString: "" + }; + var authz = request.headers[authzHeaderName]; + for (i2 = 0; i2 < authz.length; i2++) { + var c = authz.charAt(i2); + switch (Number(state)) { + case State.New: + if (c !== " ") parsed.scheme += c; + else state = State.Params; + break; + case State.Params: + switch (Number(substate)) { + case ParamsState.Name: + var code = c.charCodeAt(0); + if (code >= 65 && code <= 90 || // A-Z + code >= 97 && code <= 122) { + tmpName += c; + } else if (c === "=") { + if (tmpName.length === 0) + throw new InvalidHeaderError("bad param format"); + substate = ParamsState.Quote; + } else { + throw new InvalidHeaderError("bad param format"); + } + break; + case ParamsState.Quote: + if (c === '"') { + tmpValue = ""; + substate = ParamsState.Value; + } else { + throw new InvalidHeaderError("bad param format"); + } + break; + case ParamsState.Value: + if (c === '"') { + parsed.params[tmpName] = tmpValue; + substate = ParamsState.Comma; + } else { + tmpValue += c; + } + break; + case ParamsState.Comma: + if (c === ",") { + tmpName = ""; + substate = ParamsState.Name; + } else { + throw new InvalidHeaderError("bad param format"); + } + break; + default: + throw new Error("Invalid substate"); + } + break; + default: + throw new Error("Invalid substate"); + } + } + if (!parsed.params.headers || parsed.params.headers === "") { + if (request.headers["x-date"]) { + parsed.params.headers = ["x-date"]; + } else { + parsed.params.headers = ["date"]; + } + } else { + parsed.params.headers = parsed.params.headers.split(" "); + } + if (!parsed.scheme || parsed.scheme !== "Signature") + throw new InvalidHeaderError('scheme was not "Signature"'); + if (!parsed.params.keyId) + throw new InvalidHeaderError("keyId was not specified"); + if (!parsed.params.algorithm) + throw new InvalidHeaderError("algorithm was not specified"); + if (!parsed.params.signature) + throw new InvalidHeaderError("signature was not specified"); + parsed.params.algorithm = parsed.params.algorithm.toLowerCase(); + try { + validateAlgorithm(parsed.params.algorithm); + } catch (e) { + if (e instanceof InvalidAlgorithmError) + throw new InvalidParamsError(parsed.params.algorithm + " is not supported"); + else + throw e; + } + for (i2 = 0; i2 < parsed.params.headers.length; i2++) { + var h = parsed.params.headers[i2].toLowerCase(); + parsed.params.headers[i2] = h; + if (h === "request-line") { + if (!options.strict) { + parsed.signingString += request.method + " " + request.url + " HTTP/" + request.httpVersion; + } else { + throw new StrictParsingError("request-line is not a valid header with strict parsing enabled."); + } + } else if (h === "(request-target)") { + parsed.signingString += "(request-target): " + request.method.toLowerCase() + " " + request.url; + } else { + var value = request.headers[h]; + if (value === void 0) + throw new MissingHeaderError(h + " was not in the request"); + parsed.signingString += h + ": " + value; + } + if (i2 + 1 < parsed.params.headers.length) + parsed.signingString += "\n"; + } + var date; + if (request.headers.date || request.headers["x-date"]) { + if (request.headers["x-date"]) { + date = new Date(request.headers["x-date"]); + } else { + date = new Date(request.headers.date); + } + var now = /* @__PURE__ */ new Date(); + var skew = Math.abs(now.getTime() - date.getTime()); + if (skew > options.clockSkew * 1e3) { + throw new ExpiredRequestError("clock skew of " + skew / 1e3 + "s was greater than " + options.clockSkew + "s"); + } + } + options.headers.forEach(function(hdr) { + if (parsed.params.headers.indexOf(hdr.toLowerCase()) < 0) + throw new MissingHeaderError(hdr + " was not a signed header"); + }); + if (options.algorithms) { + if (options.algorithms.indexOf(parsed.params.algorithm) === -1) + throw new InvalidParamsError(parsed.params.algorithm + " is not a supported algorithm"); + } + parsed.algorithm = parsed.params.algorithm.toUpperCase(); + parsed.keyId = parsed.params.keyId; + return parsed; + } + }; + } +}); + +// node_modules/extsprintf/lib/extsprintf.js +var require_extsprintf = __commonJS({ + "node_modules/extsprintf/lib/extsprintf.js"(exports2) { + var mod_assert = require("assert"); + var mod_util = require("util"); + exports2.sprintf = jsSprintf; + exports2.printf = jsPrintf; + exports2.fprintf = jsFprintf; + function jsSprintf(fmt) { + var regex = [ + "([^%]*)", + /* normal text */ + "%", + /* start of format */ + "(['\\-+ #0]*?)", + /* flags (optional) */ + "([1-9]\\d*)?", + /* width (optional) */ + "(\\.([1-9]\\d*))?", + /* precision (optional) */ + "[lhjztL]*?", + /* length mods (ignored) */ + "([diouxXfFeEgGaAcCsSp%jr])" + /* conversion */ + ].join(""); + var re = new RegExp(regex); + var args2 = Array.prototype.slice.call(arguments, 1); + var flags, width, precision, conversion; + var left, pad, sign, arg, match; + var ret = ""; + var argn = 1; + mod_assert.equal("string", typeof fmt); + while ((match = re.exec(fmt)) !== null) { + ret += match[1]; + fmt = fmt.substring(match[0].length); + flags = match[2] || ""; + width = match[3] || 0; + precision = match[4] || ""; + conversion = match[6]; + left = false; + sign = false; + pad = " "; + if (conversion == "%") { + ret += "%"; + continue; + } + if (args2.length === 0) + throw new Error("too few args to sprintf"); + arg = args2.shift(); + argn++; + if (flags.match(/[\' #]/)) + throw new Error( + "unsupported flags: " + flags + ); + if (precision.length > 0) + throw new Error( + "non-zero precision not supported" + ); + if (flags.match(/-/)) + left = true; + if (flags.match(/0/)) + pad = "0"; + if (flags.match(/\+/)) + sign = true; + switch (conversion) { + case "s": + if (arg === void 0 || arg === null) + throw new Error("argument " + argn + ": attempted to print undefined or null as a string"); + ret += doPad(pad, width, left, arg.toString()); + break; + case "d": + arg = Math.floor(arg); + /*jsl:fallthru*/ + case "f": + sign = sign && arg > 0 ? "+" : ""; + ret += sign + doPad( + pad, + width, + left, + arg.toString() + ); + break; + case "x": + ret += doPad(pad, width, left, arg.toString(16)); + break; + case "j": + if (width === 0) + width = 10; + ret += mod_util.inspect(arg, false, width); + break; + case "r": + ret += dumpException(arg); + break; + default: + throw new Error("unsupported conversion: " + conversion); + } + } + ret += fmt; + return ret; + } + function jsPrintf() { + var args2 = Array.prototype.slice.call(arguments); + args2.unshift(process.stdout); + jsFprintf.apply(null, args2); + } + function jsFprintf(stream2) { + var args2 = Array.prototype.slice.call(arguments, 1); + return stream2.write(jsSprintf.apply(this, args2)); + } + function doPad(chr, width, left, str) { + var ret = str; + while (ret.length < width) { + if (left) + ret += chr; + else + ret = chr + ret; + } + return ret; + } + function dumpException(ex) { + var ret; + if (!(ex instanceof Error)) + throw new Error(jsSprintf("invalid type for %%r: %j", ex)); + ret = "EXCEPTION: " + ex.constructor.name + ": " + ex.stack; + if (ex.cause && typeof ex.cause === "function") { + var cex = ex.cause(); + if (cex) { + ret += "\nCaused by: " + dumpException(cex); + } + } + return ret; + } + } +}); + +// node_modules/core-util-is/lib/util.js +var require_util = __commonJS({ + "node_modules/core-util-is/lib/util.js"(exports2) { + function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === "[object Array]"; + } + exports2.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; + } + exports2.isBoolean = isBoolean; + function isNull2(arg) { + return arg === null; + } + exports2.isNull = isNull2; + function isNullOrUndefined(arg) { + return arg == null; + } + exports2.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports2.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports2.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports2.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports2.isUndefined = isUndefined; + function isRegExp(re) { + return objectToString(re) === "[object RegExp]"; + } + exports2.isRegExp = isRegExp; + function isObject(arg) { + return typeof arg === "object" && arg !== null; + } + exports2.isObject = isObject; + function isDate(d) { + return objectToString(d) === "[object Date]"; + } + exports2.isDate = isDate; + function isError(e) { + return objectToString(e) === "[object Error]" || e instanceof Error; + } + exports2.isError = isError; + function isFunction(arg) { + return typeof arg === "function"; + } + exports2.isFunction = isFunction; + function isPrimitive(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol + typeof arg === "undefined"; + } + exports2.isPrimitive = isPrimitive; + exports2.isBuffer = Buffer.isBuffer; + function objectToString(o) { + return Object.prototype.toString.call(o); + } + } +}); + +// node_modules/verror/lib/verror.js +var require_verror = __commonJS({ + "node_modules/verror/lib/verror.js"(exports2, module2) { + var mod_assertplus = require_assert(); + var mod_util = require("util"); + var mod_extsprintf = require_extsprintf(); + var mod_isError = require_util().isError; + var sprintf = mod_extsprintf.sprintf; + module2.exports = VError; + VError.VError = VError; + VError.SError = SError; + VError.WError = WError; + VError.MultiError = MultiError; + function parseConstructorArguments(args2) { + var argv, options, sprintf_args, shortmessage, k; + mod_assertplus.object(args2, "args"); + mod_assertplus.bool(args2.strict, "args.strict"); + mod_assertplus.array(args2.argv, "args.argv"); + argv = args2.argv; + if (argv.length === 0) { + options = {}; + sprintf_args = []; + } else if (mod_isError(argv[0])) { + options = { "cause": argv[0] }; + sprintf_args = argv.slice(1); + } else if (typeof argv[0] === "object") { + options = {}; + for (k in argv[0]) { + options[k] = argv[0][k]; + } + sprintf_args = argv.slice(1); + } else { + mod_assertplus.string( + argv[0], + "first argument to VError, SError, or WError constructor must be a string, object, or Error" + ); + options = {}; + sprintf_args = argv; + } + mod_assertplus.object(options); + if (!options.strict && !args2.strict) { + sprintf_args = sprintf_args.map(function(a) { + return a === null ? "null" : a === void 0 ? "undefined" : a; + }); + } + if (sprintf_args.length === 0) { + shortmessage = ""; + } else { + shortmessage = sprintf.apply(null, sprintf_args); + } + return { + "options": options, + "shortmessage": shortmessage + }; + } + function VError() { + var args2, obj, parsed, cause, ctor, message, k; + args2 = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof VError)) { + obj = Object.create(VError.prototype); + VError.apply(obj, arguments); + return obj; + } + parsed = parseConstructorArguments({ + "argv": args2, + "strict": false + }); + if (parsed.options.name) { + mod_assertplus.string( + parsed.options.name, + `error's "name" must be a string` + ); + this.name = parsed.options.name; + } + this.jse_shortmsg = parsed.shortmessage; + message = parsed.shortmessage; + cause = parsed.options.cause; + if (cause) { + mod_assertplus.ok(mod_isError(cause), "cause is not an Error"); + this.jse_cause = cause; + if (!parsed.options.skipCauseMessage) { + message += ": " + cause.message; + } + } + this.jse_info = {}; + if (parsed.options.info) { + for (k in parsed.options.info) { + this.jse_info[k] = parsed.options.info[k]; + } + } + this.message = message; + Error.call(this, message); + if (Error.captureStackTrace) { + ctor = parsed.options.constructorOpt || this.constructor; + Error.captureStackTrace(this, ctor); + } + return this; + } + mod_util.inherits(VError, Error); + VError.prototype.name = "VError"; + VError.prototype.toString = function ve_toString() { + var str = this.hasOwnProperty("name") && this.name || this.constructor.name || this.constructor.prototype.name; + if (this.message) + str += ": " + this.message; + return str; + }; + VError.prototype.cause = function ve_cause() { + var cause = VError.cause(this); + return cause === null ? void 0 : cause; + }; + VError.cause = function(err) { + mod_assertplus.ok(mod_isError(err), "err must be an Error"); + return mod_isError(err.jse_cause) ? err.jse_cause : null; + }; + VError.info = function(err) { + var rv, cause, k; + mod_assertplus.ok(mod_isError(err), "err must be an Error"); + cause = VError.cause(err); + if (cause !== null) { + rv = VError.info(cause); + } else { + rv = {}; + } + if (typeof err.jse_info == "object" && err.jse_info !== null) { + for (k in err.jse_info) { + rv[k] = err.jse_info[k]; + } + } + return rv; + }; + VError.findCauseByName = function(err, name) { + var cause; + mod_assertplus.ok(mod_isError(err), "err must be an Error"); + mod_assertplus.string(name, "name"); + mod_assertplus.ok(name.length > 0, "name cannot be empty"); + for (cause = err; cause !== null; cause = VError.cause(cause)) { + mod_assertplus.ok(mod_isError(cause)); + if (cause.name == name) { + return cause; + } + } + return null; + }; + VError.hasCauseWithName = function(err, name) { + return VError.findCauseByName(err, name) !== null; + }; + VError.fullStack = function(err) { + mod_assertplus.ok(mod_isError(err), "err must be an Error"); + var cause = VError.cause(err); + if (cause) { + return err.stack + "\ncaused by: " + VError.fullStack(cause); + } + return err.stack; + }; + VError.errorFromList = function(errors) { + mod_assertplus.arrayOfObject(errors, "errors"); + if (errors.length === 0) { + return null; + } + errors.forEach(function(e) { + mod_assertplus.ok(mod_isError(e)); + }); + if (errors.length == 1) { + return errors[0]; + } + return new MultiError(errors); + }; + VError.errorForEach = function(err, func) { + mod_assertplus.ok(mod_isError(err), "err must be an Error"); + mod_assertplus.func(func, "func"); + if (err instanceof MultiError) { + err.errors().forEach(function iterError(e) { + func(e); + }); + } else { + func(err); + } + }; + function SError() { + var args2, obj, parsed, options; + args2 = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof SError)) { + obj = Object.create(SError.prototype); + SError.apply(obj, arguments); + return obj; + } + parsed = parseConstructorArguments({ + "argv": args2, + "strict": true + }); + options = parsed.options; + VError.call(this, options, "%s", parsed.shortmessage); + return this; + } + mod_util.inherits(SError, VError); + function MultiError(errors) { + mod_assertplus.array(errors, "list of errors"); + mod_assertplus.ok(errors.length > 0, "must be at least one error"); + this.ase_errors = errors; + VError.call(this, { + "cause": errors[0] + }, "first of %d error%s", errors.length, errors.length == 1 ? "" : "s"); + } + mod_util.inherits(MultiError, VError); + MultiError.prototype.name = "MultiError"; + MultiError.prototype.errors = function me_errors() { + return this.ase_errors.slice(0); + }; + function WError() { + var args2, obj, parsed, options; + args2 = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof WError)) { + obj = Object.create(WError.prototype); + WError.apply(obj, args2); + return obj; + } + parsed = parseConstructorArguments({ + "argv": args2, + "strict": false + }); + options = parsed.options; + options["skipCauseMessage"] = true; + VError.call(this, options, "%s", parsed.shortmessage); + return this; + } + mod_util.inherits(WError, VError); + WError.prototype.name = "WError"; + WError.prototype.toString = function we_toString() { + var str = this.hasOwnProperty("name") && this.name || this.constructor.name || this.constructor.prototype.name; + if (this.message) + str += ": " + this.message; + if (this.jse_cause && this.jse_cause.message) + str += "; caused by " + this.jse_cause.toString(); + return str; + }; + WError.prototype.cause = function we_cause(c) { + if (mod_isError(c)) + this.jse_cause = c; + return this.jse_cause; + }; + } +}); + +// node_modules/json-schema/lib/validate.js +var require_validate = __commonJS({ + "node_modules/json-schema/lib/validate.js"(exports2, module2) { + (function(root, factory) { + if (typeof define === "function" && define.amd) { + define([], function() { + return factory(); + }); + } else if (typeof module2 === "object" && module2.exports) { + module2.exports = factory(); + } else { + root.jsonSchema = factory(); + } + })(exports2, function() { + var exports3 = validate; + exports3.Integer = { type: "integer" }; + var primitiveConstructors = { + String, + Boolean, + Number, + Object, + Array, + Date + }; + exports3.validate = validate; + function validate(instance, schema) { + return validate(instance, schema, { changing: false }); + } + ; + exports3.checkPropertyChange = function(value, schema, property) { + return validate(value, schema, { changing: property || "property" }); + }; + var validate = exports3._validate = function(instance, schema, options) { + if (!options) options = {}; + var _changing = options.changing; + function getType(schema2) { + return schema2.type || primitiveConstructors[schema2.name] == schema2 && schema2.name.toLowerCase(); + } + var errors = []; + function checkProp(value, schema2, path, i2) { + var l; + path += path ? typeof i2 == "number" ? "[" + i2 + "]" : typeof i2 == "undefined" ? "" : "." + i2 : i2; + function addError(message) { + errors.push({ property: path, message }); + } + if ((typeof schema2 != "object" || schema2 instanceof Array) && (path || typeof schema2 != "function") && !(schema2 && getType(schema2))) { + if (typeof schema2 == "function") { + if (!(value instanceof schema2)) { + addError("is not an instance of the class/constructor " + schema2.name); + } + } else if (schema2) { + addError("Invalid schema/property definition " + schema2); + } + return null; + } + if (_changing && schema2.readonly) { + addError("is a readonly field, it can not be changed"); + } + if (schema2["extends"]) { + checkProp(value, schema2["extends"], path, i2); + } + function checkType(type, value2) { + if (type) { + if (typeof type == "string" && type != "any" && (type == "null" ? value2 !== null : typeof value2 != type) && !(value2 instanceof Array && type == "array") && !(value2 instanceof Date && type == "date") && !(type == "integer" && value2 % 1 === 0)) { + return [{ property: path, message: value2 + " - " + typeof value2 + " value found, but a " + type + " is required" }]; + } + if (type instanceof Array) { + var unionErrors = []; + for (var j2 = 0; j2 < type.length; j2++) { + if (!(unionErrors = checkType(type[j2], value2)).length) { + break; + } + } + if (unionErrors.length) { + return unionErrors; + } + } else if (typeof type == "object") { + var priorErrors = errors; + errors = []; + checkProp(value2, type, path); + var theseErrors = errors; + errors = priorErrors; + return theseErrors; + } + } + return []; + } + if (value === void 0) { + if (schema2.required) { + addError("is missing and it is required"); + } + } else { + errors = errors.concat(checkType(getType(schema2), value)); + if (schema2.disallow && !checkType(schema2.disallow, value).length) { + addError(" disallowed value was matched"); + } + if (value !== null) { + if (value instanceof Array) { + if (schema2.items) { + var itemsIsArray = schema2.items instanceof Array; + var propDef = schema2.items; + for (i2 = 0, l = value.length; i2 < l; i2 += 1) { + if (itemsIsArray) + propDef = schema2.items[i2]; + if (options.coerce) + value[i2] = options.coerce(value[i2], propDef); + errors.concat(checkProp(value[i2], propDef, path, i2)); + } + } + if (schema2.minItems && value.length < schema2.minItems) { + addError("There must be a minimum of " + schema2.minItems + " in the array"); + } + if (schema2.maxItems && value.length > schema2.maxItems) { + addError("There must be a maximum of " + schema2.maxItems + " in the array"); + } + } else if (schema2.properties || schema2.additionalProperties) { + errors.concat(checkObj(value, schema2.properties, path, schema2.additionalProperties)); + } + if (schema2.pattern && typeof value == "string" && !value.match(schema2.pattern)) { + addError("does not match the regex pattern " + schema2.pattern); + } + if (schema2.maxLength && typeof value == "string" && value.length > schema2.maxLength) { + addError("may only be " + schema2.maxLength + " characters long"); + } + if (schema2.minLength && typeof value == "string" && value.length < schema2.minLength) { + addError("must be at least " + schema2.minLength + " characters long"); + } + if (typeof schema2.minimum !== "undefined" && typeof value == typeof schema2.minimum && schema2.minimum > value) { + addError("must have a minimum value of " + schema2.minimum); + } + if (typeof schema2.maximum !== "undefined" && typeof value == typeof schema2.maximum && schema2.maximum < value) { + addError("must have a maximum value of " + schema2.maximum); + } + if (schema2["enum"]) { + var enumer = schema2["enum"]; + l = enumer.length; + var found; + for (var j = 0; j < l; j++) { + if (enumer[j] === value) { + found = 1; + break; + } + } + if (!found) { + addError("does not have a value in the enumeration " + enumer.join(", ")); + } + } + if (typeof schema2.maxDecimal == "number" && value.toString().match(new RegExp("\\.[0-9]{" + (schema2.maxDecimal + 1) + ",}"))) { + addError("may only have " + schema2.maxDecimal + " digits of decimal places"); + } + } + } + return null; + } + function checkObj(instance2, objTypeDef, path, additionalProp) { + if (typeof objTypeDef == "object") { + if (typeof instance2 != "object" || instance2 instanceof Array) { + errors.push({ property: path, message: "an object is required" }); + } + for (var i2 in objTypeDef) { + if (objTypeDef.hasOwnProperty(i2) && i2 != "__proto__" && i2 != "constructor") { + var value = instance2.hasOwnProperty(i2) ? instance2[i2] : void 0; + if (value === void 0 && options.existingOnly) continue; + var propDef = objTypeDef[i2]; + if (value === void 0 && propDef["default"]) { + value = instance2[i2] = propDef["default"]; + } + if (options.coerce && i2 in instance2) { + value = instance2[i2] = options.coerce(value, propDef); + } + checkProp(value, propDef, path, i2); + } + } + } + for (i2 in instance2) { + if (instance2.hasOwnProperty(i2) && !(i2.charAt(0) == "_" && i2.charAt(1) == "_") && objTypeDef && !objTypeDef[i2] && additionalProp === false) { + if (options.filter) { + delete instance2[i2]; + continue; + } else { + errors.push({ property: path, message: "The property " + i2 + " is not defined in the schema and the schema does not allow additional properties" }); + } + } + var requires = objTypeDef && objTypeDef[i2] && objTypeDef[i2].requires; + if (requires && !(requires in instance2)) { + errors.push({ property: path, message: "the presence of the property " + i2 + " requires that " + requires + " also be present" }); + } + value = instance2[i2]; + if (additionalProp && (!(objTypeDef && typeof objTypeDef == "object") || !(i2 in objTypeDef))) { + if (options.coerce) { + value = instance2[i2] = options.coerce(value, additionalProp); + } + checkProp(value, additionalProp, path, i2); + } + if (!_changing && value && value.$schema) { + errors = errors.concat(checkProp(value, value.$schema, path, i2)); + } + } + return errors; + } + if (schema) { + checkProp(instance, schema, "", _changing || ""); + } + if (!_changing && instance && instance.$schema) { + checkProp(instance, instance.$schema, "", ""); + } + return { valid: !errors.length, errors }; + }; + exports3.mustBeValid = function(result) { + if (!result.valid) { + throw new TypeError(result.errors.map(function(error) { + return "for property " + error.property + ": " + error.message; + }).join(", \n")); + } + }; + return exports3; + }); + } +}); + +// node_modules/jsprim/lib/jsprim.js +var require_jsprim = __commonJS({ + "node_modules/jsprim/lib/jsprim.js"(exports2) { + var mod_assert = require_assert(); + var mod_util = require("util"); + var mod_extsprintf = require_extsprintf(); + var mod_verror = require_verror(); + var mod_jsonschema = require_validate(); + exports2.deepCopy = deepCopy; + exports2.deepEqual = deepEqual; + exports2.isEmpty = isEmpty; + exports2.hasKey = hasKey; + exports2.forEachKey = forEachKey; + exports2.pluck = pluck; + exports2.flattenObject = flattenObject; + exports2.flattenIter = flattenIter; + exports2.validateJsonObject = validateJsonObjectJS; + exports2.validateJsonObjectJS = validateJsonObjectJS; + exports2.randElt = randElt; + exports2.extraProperties = extraProperties; + exports2.mergeObjects = mergeObjects; + exports2.startsWith = startsWith; + exports2.endsWith = endsWith; + exports2.parseInteger = parseInteger; + exports2.iso8601 = iso8601; + exports2.rfc1123 = rfc1123; + exports2.parseDateTime = parseDateTime; + exports2.hrtimediff = hrtimeDiff; + exports2.hrtimeDiff = hrtimeDiff; + exports2.hrtimeAccum = hrtimeAccum; + exports2.hrtimeAdd = hrtimeAdd; + exports2.hrtimeNanosec = hrtimeNanosec; + exports2.hrtimeMicrosec = hrtimeMicrosec; + exports2.hrtimeMillisec = hrtimeMillisec; + function deepCopy(obj) { + var ret, key; + var marker = "__deepCopy"; + if (obj && obj[marker]) + throw new Error("attempted deep copy of cyclic object"); + if (obj && obj.constructor == Object) { + ret = {}; + obj[marker] = true; + for (key in obj) { + if (key == marker) + continue; + ret[key] = deepCopy(obj[key]); + } + delete obj[marker]; + return ret; + } + if (obj && obj.constructor == Array) { + ret = []; + obj[marker] = true; + for (key = 0; key < obj.length; key++) + ret.push(deepCopy(obj[key])); + delete obj[marker]; + return ret; + } + return obj; + } + function deepEqual(obj1, obj2) { + if (typeof obj1 != typeof obj2) + return false; + if (obj1 === null || obj2 === null || typeof obj1 != "object") + return obj1 === obj2; + if (obj1.constructor != obj2.constructor) + return false; + var k; + for (k in obj1) { + if (!obj2.hasOwnProperty(k)) + return false; + if (!deepEqual(obj1[k], obj2[k])) + return false; + } + for (k in obj2) { + if (!obj1.hasOwnProperty(k)) + return false; + } + return true; + } + function isEmpty(obj) { + var key; + for (key in obj) + return false; + return true; + } + function hasKey(obj, key) { + mod_assert.equal(typeof key, "string"); + return Object.prototype.hasOwnProperty.call(obj, key); + } + function forEachKey(obj, callback) { + for (var key in obj) { + if (hasKey(obj, key)) { + callback(key, obj[key]); + } + } + } + function pluck(obj, key) { + mod_assert.equal(typeof key, "string"); + return pluckv(obj, key); + } + function pluckv(obj, key) { + if (obj === null || typeof obj !== "object") + return void 0; + if (obj.hasOwnProperty(key)) + return obj[key]; + var i2 = key.indexOf("."); + if (i2 == -1) + return void 0; + var key1 = key.substr(0, i2); + if (!obj.hasOwnProperty(key1)) + return void 0; + return pluckv(obj[key1], key.substr(i2 + 1)); + } + function flattenIter(data, depth, callback) { + doFlattenIter(data, depth, [], callback); + } + function doFlattenIter(data, depth, accum, callback) { + var each; + var key; + if (depth === 0) { + each = accum.slice(0); + each.push(data); + callback(each); + return; + } + mod_assert.ok(data !== null); + mod_assert.equal(typeof data, "object"); + mod_assert.equal(typeof depth, "number"); + mod_assert.ok(depth >= 0); + for (key in data) { + each = accum.slice(0); + each.push(key); + doFlattenIter(data[key], depth - 1, each, callback); + } + } + function flattenObject(data, depth) { + if (depth === 0) + return [data]; + mod_assert.ok(data !== null); + mod_assert.equal(typeof data, "object"); + mod_assert.equal(typeof depth, "number"); + mod_assert.ok(depth >= 0); + var rv = []; + var key; + for (key in data) { + flattenObject(data[key], depth - 1).forEach(function(p) { + rv.push([key].concat(p)); + }); + } + return rv; + } + function startsWith(str, prefix) { + return str.substr(0, prefix.length) == prefix; + } + function endsWith(str, suffix) { + return str.substr( + str.length - suffix.length, + suffix.length + ) == suffix; + } + function iso8601(d) { + if (typeof d == "number") + d = new Date(d); + mod_assert.ok(d.constructor === Date); + return mod_extsprintf.sprintf( + "%4d-%02d-%02dT%02d:%02d:%02d.%03dZ", + d.getUTCFullYear(), + d.getUTCMonth() + 1, + d.getUTCDate(), + d.getUTCHours(), + d.getUTCMinutes(), + d.getUTCSeconds(), + d.getUTCMilliseconds() + ); + } + var RFC1123_MONTHS = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + var RFC1123_DAYS = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + function rfc1123(date) { + return mod_extsprintf.sprintf( + "%s, %02d %s %04d %02d:%02d:%02d GMT", + RFC1123_DAYS[date.getUTCDay()], + date.getUTCDate(), + RFC1123_MONTHS[date.getUTCMonth()], + date.getUTCFullYear(), + date.getUTCHours(), + date.getUTCMinutes(), + date.getUTCSeconds() + ); + } + function parseDateTime(str) { + var numeric = +str; + if (!isNaN(numeric)) { + return new Date(numeric); + } else { + return new Date(str); + } + } + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991; + var PI_DEFAULTS = { + base: 10, + allowSign: true, + allowPrefix: false, + allowTrailing: false, + allowImprecise: false, + trimWhitespace: false, + leadingZeroIsOctal: false + }; + var CP_0 = 48; + var CP_9 = 57; + var CP_A = 65; + var CP_B = 66; + var CP_O = 79; + var CP_T = 84; + var CP_X = 88; + var CP_Z = 90; + var CP_a = 97; + var CP_b = 98; + var CP_o = 111; + var CP_t = 116; + var CP_x = 120; + var CP_z = 122; + var PI_CONV_DEC = 48; + var PI_CONV_UC = 55; + var PI_CONV_LC = 87; + function parseInteger(str, uopts) { + mod_assert.string(str, "str"); + mod_assert.optionalObject(uopts, "options"); + var baseOverride = false; + var options = PI_DEFAULTS; + if (uopts) { + baseOverride = hasKey(uopts, "base"); + options = mergeObjects(options, uopts); + mod_assert.number(options.base, "options.base"); + mod_assert.ok(options.base >= 2, "options.base >= 2"); + mod_assert.ok(options.base <= 36, "options.base <= 36"); + mod_assert.bool(options.allowSign, "options.allowSign"); + mod_assert.bool(options.allowPrefix, "options.allowPrefix"); + mod_assert.bool( + options.allowTrailing, + "options.allowTrailing" + ); + mod_assert.bool( + options.allowImprecise, + "options.allowImprecise" + ); + mod_assert.bool( + options.trimWhitespace, + "options.trimWhitespace" + ); + mod_assert.bool( + options.leadingZeroIsOctal, + "options.leadingZeroIsOctal" + ); + if (options.leadingZeroIsOctal) { + mod_assert.ok( + !baseOverride, + '"base" and "leadingZeroIsOctal" are mutually exclusive' + ); + } + } + var c; + var pbase = -1; + var base = options.base; + var start; + var mult = 1; + var value = 0; + var idx = 0; + var len = str.length; + if (options.trimWhitespace) { + while (idx < len && isSpace(str.charCodeAt(idx))) { + ++idx; + } + } + if (options.allowSign) { + if (str[idx] === "-") { + idx += 1; + mult = -1; + } else if (str[idx] === "+") { + idx += 1; + } + } + if (str[idx] === "0") { + if (options.allowPrefix) { + pbase = prefixToBase(str.charCodeAt(idx + 1)); + if (pbase !== -1 && (!baseOverride || pbase === base)) { + base = pbase; + idx += 2; + } + } + if (pbase === -1 && options.leadingZeroIsOctal) { + base = 8; + } + } + for (start = idx; idx < len; ++idx) { + c = translateDigit(str.charCodeAt(idx)); + if (c !== -1 && c < base) { + value *= base; + value += c; + } else { + break; + } + } + if (start === idx) { + return new Error("invalid number: " + JSON.stringify(str)); + } + if (options.trimWhitespace) { + while (idx < len && isSpace(str.charCodeAt(idx))) { + ++idx; + } + } + if (idx < len && !options.allowTrailing) { + return new Error("trailing characters after number: " + JSON.stringify(str.slice(idx))); + } + if (value === 0) { + return 0; + } + var result = value * mult; + if (!options.allowImprecise && (value > MAX_SAFE_INTEGER || result < MIN_SAFE_INTEGER)) { + return new Error("number is outside of the supported range: " + JSON.stringify(str.slice(start, idx))); + } + return result; + } + function translateDigit(d) { + if (d >= CP_0 && d <= CP_9) { + return d - PI_CONV_DEC; + } else if (d >= CP_A && d <= CP_Z) { + return d - PI_CONV_UC; + } else if (d >= CP_a && d <= CP_z) { + return d - PI_CONV_LC; + } else { + return -1; + } + } + function isSpace(c) { + return c === 32 || c >= 9 && c <= 13 || c === 160 || c === 5760 || c === 6158 || c >= 8192 && c <= 8202 || c === 8232 || c === 8233 || c === 8239 || c === 8287 || c === 12288 || c === 65279; + } + function prefixToBase(c) { + if (c === CP_b || c === CP_B) { + return 2; + } else if (c === CP_o || c === CP_O) { + return 8; + } else if (c === CP_t || c === CP_T) { + return 10; + } else if (c === CP_x || c === CP_X) { + return 16; + } else { + return -1; + } + } + function validateJsonObjectJS(schema, input) { + var report = mod_jsonschema.validate(input, schema); + if (report.errors.length === 0) + return null; + var error = report.errors[0]; + var propname = error["property"]; + var reason = error["message"].toLowerCase(); + var i2, j; + if ((i2 = reason.indexOf("the property ")) != -1 && (j = reason.indexOf(" is not defined in the schema and the schema does not allow additional properties")) != -1) { + i2 += "the property ".length; + if (propname === "") + propname = reason.substr(i2, j - i2); + else + propname = propname + "." + reason.substr(i2, j - i2); + reason = "unsupported property"; + } + var rv = new mod_verror.VError('property "%s": %s', propname, reason); + rv.jsv_details = error; + return rv; + } + function randElt(arr2) { + mod_assert.ok( + Array.isArray(arr2) && arr2.length > 0, + "randElt argument must be a non-empty array" + ); + return arr2[Math.floor(Math.random() * arr2.length)]; + } + function assertHrtime(a) { + mod_assert.ok( + a[0] >= 0 && a[1] >= 0, + "negative numbers not allowed in hrtimes" + ); + mod_assert.ok(a[1] < 1e9, "nanoseconds column overflow"); + } + function hrtimeDiff(a, b) { + assertHrtime(a); + assertHrtime(b); + mod_assert.ok( + a[0] > b[0] || a[0] == b[0] && a[1] >= b[1], + "negative differences not allowed" + ); + var rv = [a[0] - b[0], 0]; + if (a[1] >= b[1]) { + rv[1] = a[1] - b[1]; + } else { + rv[0]--; + rv[1] = 1e9 - (b[1] - a[1]); + } + return rv; + } + function hrtimeNanosec(a) { + assertHrtime(a); + return Math.floor(a[0] * 1e9 + a[1]); + } + function hrtimeMicrosec(a) { + assertHrtime(a); + return Math.floor(a[0] * 1e6 + a[1] / 1e3); + } + function hrtimeMillisec(a) { + assertHrtime(a); + return Math.floor(a[0] * 1e3 + a[1] / 1e6); + } + function hrtimeAccum(a, b) { + assertHrtime(a); + assertHrtime(b); + a[1] += b[1]; + if (a[1] >= 1e9) { + a[0]++; + a[1] -= 1e9; + } + a[0] += b[0]; + return a; + } + function hrtimeAdd(a, b) { + assertHrtime(a); + var rv = [a[0], a[1]]; + return hrtimeAccum(rv, b); + } + function extraProperties(obj, allowed) { + mod_assert.ok( + typeof obj === "object" && obj !== null, + "obj argument must be a non-null object" + ); + mod_assert.ok( + Array.isArray(allowed), + "allowed argument must be an array of strings" + ); + for (var i2 = 0; i2 < allowed.length; i2++) { + mod_assert.ok( + typeof allowed[i2] === "string", + "allowed argument must be an array of strings" + ); + } + return Object.keys(obj).filter(function(key) { + return allowed.indexOf(key) === -1; + }); + } + function mergeObjects(provided, overrides, defaults) { + var rv, k; + rv = {}; + if (defaults) { + for (k in defaults) + rv[k] = defaults[k]; + } + if (provided) { + for (k in provided) + rv[k] = provided[k]; + } + if (overrides) { + for (k in overrides) + rv[k] = overrides[k]; + } + return rv; + } + } +}); + +// node_modules/http-signature/lib/signer.js +var require_signer = __commonJS({ + "node_modules/http-signature/lib/signer.js"(exports2, module2) { + var assert = require_assert(); + var crypto2 = require("crypto"); + var http = require("http"); + var util2 = require("util"); + var sshpk = require_lib2(); + var jsprim = require_jsprim(); + var utils = require_utils2(); + var sprintf = require("util").format; + var HASH_ALGOS = utils.HASH_ALGOS; + var PK_ALGOS = utils.PK_ALGOS; + var InvalidAlgorithmError = utils.InvalidAlgorithmError; + var HttpSignatureError = utils.HttpSignatureError; + var validateAlgorithm = utils.validateAlgorithm; + var AUTHZ_FMT = 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"'; + function MissingHeaderError(message) { + HttpSignatureError.call(this, message, MissingHeaderError); + } + util2.inherits(MissingHeaderError, HttpSignatureError); + function StrictParsingError(message) { + HttpSignatureError.call(this, message, StrictParsingError); + } + util2.inherits(StrictParsingError, HttpSignatureError); + function RequestSigner(options) { + assert.object(options, "options"); + var alg = []; + if (options.algorithm !== void 0) { + assert.string(options.algorithm, "options.algorithm"); + alg = validateAlgorithm(options.algorithm); + } + this.rs_alg = alg; + if (options.sign !== void 0) { + assert.func(options.sign, "options.sign"); + this.rs_signFunc = options.sign; + } else if (alg[0] === "hmac" && options.key !== void 0) { + assert.string(options.keyId, "options.keyId"); + this.rs_keyId = options.keyId; + if (typeof options.key !== "string" && !Buffer.isBuffer(options.key)) + throw new TypeError("options.key for HMAC must be a string or Buffer"); + this.rs_signer = crypto2.createHmac(alg[1].toUpperCase(), options.key); + this.rs_signer.sign = function() { + var digest = this.digest("base64"); + return { + hashAlgorithm: alg[1], + toString: function() { + return digest; + } + }; + }; + } else if (options.key !== void 0) { + var key = options.key; + if (typeof key === "string" || Buffer.isBuffer(key)) + key = sshpk.parsePrivateKey(key); + assert.ok( + sshpk.PrivateKey.isPrivateKey(key, [1, 2]), + "options.key must be a sshpk.PrivateKey" + ); + this.rs_key = key; + assert.string(options.keyId, "options.keyId"); + this.rs_keyId = options.keyId; + if (!PK_ALGOS[key.type]) { + throw new InvalidAlgorithmError(key.type.toUpperCase() + " type keys are not supported"); + } + if (alg[0] !== void 0 && key.type !== alg[0]) { + throw new InvalidAlgorithmError("options.key must be a " + alg[0].toUpperCase() + " key, was given a " + key.type.toUpperCase() + " key instead"); + } + this.rs_signer = key.createSign(alg[1]); + } else { + throw new TypeError("options.sign (func) or options.key is required"); + } + this.rs_headers = []; + this.rs_lines = []; + } + RequestSigner.prototype.writeHeader = function(header, value) { + assert.string(header, "header"); + header = header.toLowerCase(); + assert.string(value, "value"); + this.rs_headers.push(header); + if (this.rs_signFunc) { + this.rs_lines.push(header + ": " + value); + } else { + var line = header + ": " + value; + if (this.rs_headers.length > 0) + line = "\n" + line; + this.rs_signer.update(line); + } + return value; + }; + RequestSigner.prototype.writeDateHeader = function() { + return this.writeHeader("date", jsprim.rfc1123(/* @__PURE__ */ new Date())); + }; + RequestSigner.prototype.writeTarget = function(method, path) { + assert.string(method, "method"); + assert.string(path, "path"); + method = method.toLowerCase(); + this.writeHeader("(request-target)", method + " " + path); + }; + RequestSigner.prototype.sign = function(cb) { + assert.func(cb, "callback"); + if (this.rs_headers.length < 1) + throw new Error("At least one header must be signed"); + var alg, authz; + if (this.rs_signFunc) { + var data = this.rs_lines.join("\n"); + var self2 = this; + this.rs_signFunc(data, function(err, sig) { + if (err) { + cb(err); + return; + } + try { + assert.object(sig, "signature"); + assert.string(sig.keyId, "signature.keyId"); + assert.string(sig.algorithm, "signature.algorithm"); + assert.string(sig.signature, "signature.signature"); + alg = validateAlgorithm(sig.algorithm); + authz = sprintf( + AUTHZ_FMT, + sig.keyId, + sig.algorithm, + self2.rs_headers.join(" "), + sig.signature + ); + } catch (e) { + cb(e); + return; + } + cb(null, authz); + }); + } else { + try { + var sigObj = this.rs_signer.sign(); + } catch (e) { + cb(e); + return; + } + alg = (this.rs_alg[0] || this.rs_key.type) + "-" + sigObj.hashAlgorithm; + var signature = sigObj.toString(); + authz = sprintf( + AUTHZ_FMT, + this.rs_keyId, + alg, + this.rs_headers.join(" "), + signature + ); + cb(null, authz); + } + }; + module2.exports = { + /** + * Identifies whether a given object is a request signer or not. + * + * @param {Object} object, the object to identify + * @returns {Boolean} + */ + isSigner: function(obj) { + if (typeof obj === "object" && obj instanceof RequestSigner) + return true; + return false; + }, + /** + * Creates a request signer, used to asynchronously build a signature + * for a request (does not have to be an http.ClientRequest). + * + * @param {Object} options, either: + * - {String} keyId + * - {String|Buffer} key + * - {String} algorithm (optional, required for HMAC) + * or: + * - {Func} sign (data, cb) + * @return {RequestSigner} + */ + createSigner: function createSigner(options) { + return new RequestSigner(options); + }, + /** + * Adds an 'Authorization' header to an http.ClientRequest object. + * + * Note that this API will add a Date header if it's not already set. Any + * other headers in the options.headers array MUST be present, or this + * will throw. + * + * You shouldn't need to check the return type; it's just there if you want + * to be pedantic. + * + * The optional flag indicates whether parsing should use strict enforcement + * of the version draft-cavage-http-signatures-04 of the spec or beyond. + * The default is to be loose and support + * older versions for compatibility. + * + * @param {Object} request an instance of http.ClientRequest. + * @param {Object} options signing parameters object: + * - {String} keyId required. + * - {String} key required (either a PEM or HMAC key). + * - {Array} headers optional; defaults to ['date']. + * - {String} algorithm optional (unless key is HMAC); + * default is the same as the sshpk default + * signing algorithm for the type of key given + * - {String} httpVersion optional; defaults to '1.1'. + * - {Boolean} strict optional; defaults to 'false'. + * @return {Boolean} true if Authorization (and optionally Date) were added. + * @throws {TypeError} on bad parameter types (input). + * @throws {InvalidAlgorithmError} if algorithm was bad or incompatible with + * the given key. + * @throws {sshpk.KeyParseError} if key was bad. + * @throws {MissingHeaderError} if a header to be signed was specified but + * was not present. + */ + signRequest: function signRequest(request, options) { + assert.object(request, "request"); + assert.object(options, "options"); + assert.optionalString(options.algorithm, "options.algorithm"); + assert.string(options.keyId, "options.keyId"); + assert.optionalArrayOfString(options.headers, "options.headers"); + assert.optionalString(options.httpVersion, "options.httpVersion"); + if (!request.getHeader("Date")) + request.setHeader("Date", jsprim.rfc1123(/* @__PURE__ */ new Date())); + if (!options.headers) + options.headers = ["date"]; + if (!options.httpVersion) + options.httpVersion = "1.1"; + var alg = []; + if (options.algorithm) { + options.algorithm = options.algorithm.toLowerCase(); + alg = validateAlgorithm(options.algorithm); + } + var i2; + var stringToSign = ""; + for (i2 = 0; i2 < options.headers.length; i2++) { + if (typeof options.headers[i2] !== "string") + throw new TypeError("options.headers must be an array of Strings"); + var h = options.headers[i2].toLowerCase(); + if (h === "request-line") { + if (!options.strict) { + stringToSign += request.method + " " + request.path + " HTTP/" + options.httpVersion; + } else { + throw new StrictParsingError("request-line is not a valid header with strict parsing enabled."); + } + } else if (h === "(request-target)") { + stringToSign += "(request-target): " + request.method.toLowerCase() + " " + request.path; + } else { + var value = request.getHeader(h); + if (value === void 0 || value === "") { + throw new MissingHeaderError(h + " was not in the request"); + } + stringToSign += h + ": " + value; + } + if (i2 + 1 < options.headers.length) + stringToSign += "\n"; + } + if (request.hasOwnProperty("_stringToSign")) { + request._stringToSign = stringToSign; + } + var signature; + if (alg[0] === "hmac") { + if (typeof options.key !== "string" && !Buffer.isBuffer(options.key)) + throw new TypeError("options.key must be a string or Buffer"); + var hmac = crypto2.createHmac(alg[1].toUpperCase(), options.key); + hmac.update(stringToSign); + signature = hmac.digest("base64"); + } else { + var key = options.key; + if (typeof key === "string" || Buffer.isBuffer(key)) + key = sshpk.parsePrivateKey(options.key); + assert.ok( + sshpk.PrivateKey.isPrivateKey(key, [1, 2]), + "options.key must be a sshpk.PrivateKey" + ); + if (!PK_ALGOS[key.type]) { + throw new InvalidAlgorithmError(key.type.toUpperCase() + " type keys are not supported"); + } + if (alg[0] !== void 0 && key.type !== alg[0]) { + throw new InvalidAlgorithmError("options.key must be a " + alg[0].toUpperCase() + " key, was given a " + key.type.toUpperCase() + " key instead"); + } + var signer = key.createSign(alg[1]); + signer.update(stringToSign); + var sigObj = signer.sign(); + if (!HASH_ALGOS[sigObj.hashAlgorithm]) { + throw new InvalidAlgorithmError(sigObj.hashAlgorithm.toUpperCase() + " is not a supported hash algorithm"); + } + options.algorithm = key.type + "-" + sigObj.hashAlgorithm; + signature = sigObj.toString(); + assert.notStrictEqual(signature, "", "empty signature produced"); + } + var authzHeaderName = options.authorizationHeaderName || "Authorization"; + request.setHeader(authzHeaderName, sprintf( + AUTHZ_FMT, + options.keyId, + options.algorithm, + options.headers.join(" "), + signature + )); + return true; + } + }; + } +}); + +// node_modules/http-signature/lib/verify.js +var require_verify = __commonJS({ + "node_modules/http-signature/lib/verify.js"(exports2, module2) { + var assert = require_assert(); + var crypto2 = require("crypto"); + var sshpk = require_lib2(); + var utils = require_utils2(); + var HASH_ALGOS = utils.HASH_ALGOS; + var PK_ALGOS = utils.PK_ALGOS; + var InvalidAlgorithmError = utils.InvalidAlgorithmError; + var HttpSignatureError = utils.HttpSignatureError; + var validateAlgorithm = utils.validateAlgorithm; + module2.exports = { + /** + * Verify RSA/DSA signature against public key. You are expected to pass in + * an object that was returned from `parse()`. + * + * @param {Object} parsedSignature the object you got from `parse`. + * @param {String} pubkey RSA/DSA private key PEM. + * @return {Boolean} true if valid, false otherwise. + * @throws {TypeError} if you pass in bad arguments. + * @throws {InvalidAlgorithmError} + */ + verifySignature: function verifySignature(parsedSignature, pubkey) { + assert.object(parsedSignature, "parsedSignature"); + if (typeof pubkey === "string" || Buffer.isBuffer(pubkey)) + pubkey = sshpk.parseKey(pubkey); + assert.ok(sshpk.Key.isKey(pubkey, [1, 1]), "pubkey must be a sshpk.Key"); + var alg = validateAlgorithm(parsedSignature.algorithm); + if (alg[0] === "hmac" || alg[0] !== pubkey.type) + return false; + var v = pubkey.createVerify(alg[1]); + v.update(parsedSignature.signingString); + return v.verify(parsedSignature.params.signature, "base64"); + }, + /** + * Verify HMAC against shared secret. You are expected to pass in an object + * that was returned from `parse()`. + * + * @param {Object} parsedSignature the object you got from `parse`. + * @param {String} secret HMAC shared secret. + * @return {Boolean} true if valid, false otherwise. + * @throws {TypeError} if you pass in bad arguments. + * @throws {InvalidAlgorithmError} + */ + verifyHMAC: function verifyHMAC(parsedSignature, secret) { + assert.object(parsedSignature, "parsedHMAC"); + assert.string(secret, "secret"); + var alg = validateAlgorithm(parsedSignature.algorithm); + if (alg[0] !== "hmac") + return false; + var hashAlg = alg[1].toUpperCase(); + var hmac = crypto2.createHmac(hashAlg, secret); + hmac.update(parsedSignature.signingString); + var h1 = crypto2.createHmac(hashAlg, secret); + h1.update(hmac.digest()); + h1 = h1.digest(); + var h2 = crypto2.createHmac(hashAlg, secret); + h2.update(new Buffer(parsedSignature.params.signature, "base64")); + h2 = h2.digest(); + if (typeof h1 === "string") + return h1 === h2; + if (Buffer.isBuffer(h1) && !h1.equals) + return h1.toString("binary") === h2.toString("binary"); + return h1.equals(h2); + } + }; + } +}); + +// node_modules/http-signature/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/http-signature/lib/index.js"(exports2, module2) { + var parser = require_parser(); + var signer = require_signer(); + var verify = require_verify(); + var utils = require_utils2(); + module2.exports = { + parse: parser.parseRequest, + parseRequest: parser.parseRequest, + sign: signer.signRequest, + signRequest: signer.signRequest, + createSigner: signer.createSigner, + isSigner: signer.isSigner, + sshKeyToPEM: utils.sshKeyToPEM, + sshKeyFingerprint: utils.fingerprint, + pemToRsaSSHKey: utils.pemToRsaSSHKey, + verify: verify.verifySignature, + verifySignature: verify.verifySignature, + verifyHMAC: verify.verifyHMAC + }; + } +}); + +// node_modules/mime-db/db.json +var require_db = __commonJS({ + "node_modules/mime-db/db.json"(exports2, module2) { + module2.exports = { + "application/1d-interleaved-parityfec": { + source: "iana" + }, + "application/3gpdash-qoe-report+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/3gpp-ims+xml": { + source: "iana", + compressible: true + }, + "application/3gpphal+json": { + source: "iana", + compressible: true + }, + "application/3gpphalforms+json": { + source: "iana", + compressible: true + }, + "application/a2l": { + source: "iana" + }, + "application/ace+cbor": { + source: "iana" + }, + "application/activemessage": { + source: "iana" + }, + "application/activity+json": { + source: "iana", + compressible: true + }, + "application/alto-costmap+json": { + source: "iana", + compressible: true + }, + "application/alto-costmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-directory+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcost+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcostparams+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointprop+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointpropparams+json": { + source: "iana", + compressible: true + }, + "application/alto-error+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmap+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamcontrol+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamparams+json": { + source: "iana", + compressible: true + }, + "application/aml": { + source: "iana" + }, + "application/andrew-inset": { + source: "iana", + extensions: ["ez"] + }, + "application/applefile": { + source: "iana" + }, + "application/applixware": { + source: "apache", + extensions: ["aw"] + }, + "application/at+jwt": { + source: "iana" + }, + "application/atf": { + source: "iana" + }, + "application/atfx": { + source: "iana" + }, + "application/atom+xml": { + source: "iana", + compressible: true, + extensions: ["atom"] + }, + "application/atomcat+xml": { + source: "iana", + compressible: true, + extensions: ["atomcat"] + }, + "application/atomdeleted+xml": { + source: "iana", + compressible: true, + extensions: ["atomdeleted"] + }, + "application/atomicmail": { + source: "iana" + }, + "application/atomsvc+xml": { + source: "iana", + compressible: true, + extensions: ["atomsvc"] + }, + "application/atsc-dwd+xml": { + source: "iana", + compressible: true, + extensions: ["dwd"] + }, + "application/atsc-dynamic-event-message": { + source: "iana" + }, + "application/atsc-held+xml": { + source: "iana", + compressible: true, + extensions: ["held"] + }, + "application/atsc-rdt+json": { + source: "iana", + compressible: true + }, + "application/atsc-rsat+xml": { + source: "iana", + compressible: true, + extensions: ["rsat"] + }, + "application/atxml": { + source: "iana" + }, + "application/auth-policy+xml": { + source: "iana", + compressible: true + }, + "application/bacnet-xdd+zip": { + source: "iana", + compressible: false + }, + "application/batch-smtp": { + source: "iana" + }, + "application/bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/beep+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/calendar+json": { + source: "iana", + compressible: true + }, + "application/calendar+xml": { + source: "iana", + compressible: true, + extensions: ["xcs"] + }, + "application/call-completion": { + source: "iana" + }, + "application/cals-1840": { + source: "iana" + }, + "application/captive+json": { + source: "iana", + compressible: true + }, + "application/cbor": { + source: "iana" + }, + "application/cbor-seq": { + source: "iana" + }, + "application/cccex": { + source: "iana" + }, + "application/ccmp+xml": { + source: "iana", + compressible: true + }, + "application/ccxml+xml": { + source: "iana", + compressible: true, + extensions: ["ccxml"] + }, + "application/cdfx+xml": { + source: "iana", + compressible: true, + extensions: ["cdfx"] + }, + "application/cdmi-capability": { + source: "iana", + extensions: ["cdmia"] + }, + "application/cdmi-container": { + source: "iana", + extensions: ["cdmic"] + }, + "application/cdmi-domain": { + source: "iana", + extensions: ["cdmid"] + }, + "application/cdmi-object": { + source: "iana", + extensions: ["cdmio"] + }, + "application/cdmi-queue": { + source: "iana", + extensions: ["cdmiq"] + }, + "application/cdni": { + source: "iana" + }, + "application/cea": { + source: "iana" + }, + "application/cea-2018+xml": { + source: "iana", + compressible: true + }, + "application/cellml+xml": { + source: "iana", + compressible: true + }, + "application/cfw": { + source: "iana" + }, + "application/city+json": { + source: "iana", + compressible: true + }, + "application/clr": { + source: "iana" + }, + "application/clue+xml": { + source: "iana", + compressible: true + }, + "application/clue_info+xml": { + source: "iana", + compressible: true + }, + "application/cms": { + source: "iana" + }, + "application/cnrp+xml": { + source: "iana", + compressible: true + }, + "application/coap-group+json": { + source: "iana", + compressible: true + }, + "application/coap-payload": { + source: "iana" + }, + "application/commonground": { + source: "iana" + }, + "application/conference-info+xml": { + source: "iana", + compressible: true + }, + "application/cose": { + source: "iana" + }, + "application/cose-key": { + source: "iana" + }, + "application/cose-key-set": { + source: "iana" + }, + "application/cpl+xml": { + source: "iana", + compressible: true, + extensions: ["cpl"] + }, + "application/csrattrs": { + source: "iana" + }, + "application/csta+xml": { + source: "iana", + compressible: true + }, + "application/cstadata+xml": { + source: "iana", + compressible: true + }, + "application/csvm+json": { + source: "iana", + compressible: true + }, + "application/cu-seeme": { + source: "apache", + extensions: ["cu"] + }, + "application/cwt": { + source: "iana" + }, + "application/cybercash": { + source: "iana" + }, + "application/dart": { + compressible: true + }, + "application/dash+xml": { + source: "iana", + compressible: true, + extensions: ["mpd"] + }, + "application/dash-patch+xml": { + source: "iana", + compressible: true, + extensions: ["mpp"] + }, + "application/dashdelta": { + source: "iana" + }, + "application/davmount+xml": { + source: "iana", + compressible: true, + extensions: ["davmount"] + }, + "application/dca-rft": { + source: "iana" + }, + "application/dcd": { + source: "iana" + }, + "application/dec-dx": { + source: "iana" + }, + "application/dialog-info+xml": { + source: "iana", + compressible: true + }, + "application/dicom": { + source: "iana" + }, + "application/dicom+json": { + source: "iana", + compressible: true + }, + "application/dicom+xml": { + source: "iana", + compressible: true + }, + "application/dii": { + source: "iana" + }, + "application/dit": { + source: "iana" + }, + "application/dns": { + source: "iana" + }, + "application/dns+json": { + source: "iana", + compressible: true + }, + "application/dns-message": { + source: "iana" + }, + "application/docbook+xml": { + source: "apache", + compressible: true, + extensions: ["dbk"] + }, + "application/dots+cbor": { + source: "iana" + }, + "application/dskpp+xml": { + source: "iana", + compressible: true + }, + "application/dssc+der": { + source: "iana", + extensions: ["dssc"] + }, + "application/dssc+xml": { + source: "iana", + compressible: true, + extensions: ["xdssc"] + }, + "application/dvcs": { + source: "iana" + }, + "application/ecmascript": { + source: "iana", + compressible: true, + extensions: ["es", "ecma"] + }, + "application/edi-consent": { + source: "iana" + }, + "application/edi-x12": { + source: "iana", + compressible: false + }, + "application/edifact": { + source: "iana", + compressible: false + }, + "application/efi": { + source: "iana" + }, + "application/elm+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/elm+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.cap+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/emergencycalldata.comment+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.control+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.deviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.ecall.msd": { + source: "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.serviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.subscriberinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.veds+xml": { + source: "iana", + compressible: true + }, + "application/emma+xml": { + source: "iana", + compressible: true, + extensions: ["emma"] + }, + "application/emotionml+xml": { + source: "iana", + compressible: true, + extensions: ["emotionml"] + }, + "application/encaprtp": { + source: "iana" + }, + "application/epp+xml": { + source: "iana", + compressible: true + }, + "application/epub+zip": { + source: "iana", + compressible: false, + extensions: ["epub"] + }, + "application/eshop": { + source: "iana" + }, + "application/exi": { + source: "iana", + extensions: ["exi"] + }, + "application/expect-ct-report+json": { + source: "iana", + compressible: true + }, + "application/express": { + source: "iana", + extensions: ["exp"] + }, + "application/fastinfoset": { + source: "iana" + }, + "application/fastsoap": { + source: "iana" + }, + "application/fdt+xml": { + source: "iana", + compressible: true, + extensions: ["fdt"] + }, + "application/fhir+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fhir+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fido.trusted-apps+json": { + compressible: true + }, + "application/fits": { + source: "iana" + }, + "application/flexfec": { + source: "iana" + }, + "application/font-sfnt": { + source: "iana" + }, + "application/font-tdpfr": { + source: "iana", + extensions: ["pfr"] + }, + "application/font-woff": { + source: "iana", + compressible: false + }, + "application/framework-attributes+xml": { + source: "iana", + compressible: true + }, + "application/geo+json": { + source: "iana", + compressible: true, + extensions: ["geojson"] + }, + "application/geo+json-seq": { + source: "iana" + }, + "application/geopackage+sqlite3": { + source: "iana" + }, + "application/geoxacml+xml": { + source: "iana", + compressible: true + }, + "application/gltf-buffer": { + source: "iana" + }, + "application/gml+xml": { + source: "iana", + compressible: true, + extensions: ["gml"] + }, + "application/gpx+xml": { + source: "apache", + compressible: true, + extensions: ["gpx"] + }, + "application/gxf": { + source: "apache", + extensions: ["gxf"] + }, + "application/gzip": { + source: "iana", + compressible: false, + extensions: ["gz"] + }, + "application/h224": { + source: "iana" + }, + "application/held+xml": { + source: "iana", + compressible: true + }, + "application/hjson": { + extensions: ["hjson"] + }, + "application/http": { + source: "iana" + }, + "application/hyperstudio": { + source: "iana", + extensions: ["stk"] + }, + "application/ibe-key-request+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pkg-reply+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pp-data": { + source: "iana" + }, + "application/iges": { + source: "iana" + }, + "application/im-iscomposing+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/index": { + source: "iana" + }, + "application/index.cmd": { + source: "iana" + }, + "application/index.obj": { + source: "iana" + }, + "application/index.response": { + source: "iana" + }, + "application/index.vnd": { + source: "iana" + }, + "application/inkml+xml": { + source: "iana", + compressible: true, + extensions: ["ink", "inkml"] + }, + "application/iotp": { + source: "iana" + }, + "application/ipfix": { + source: "iana", + extensions: ["ipfix"] + }, + "application/ipp": { + source: "iana" + }, + "application/isup": { + source: "iana" + }, + "application/its+xml": { + source: "iana", + compressible: true, + extensions: ["its"] + }, + "application/java-archive": { + source: "apache", + compressible: false, + extensions: ["jar", "war", "ear"] + }, + "application/java-serialized-object": { + source: "apache", + compressible: false, + extensions: ["ser"] + }, + "application/java-vm": { + source: "apache", + compressible: false, + extensions: ["class"] + }, + "application/javascript": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["js", "mjs"] + }, + "application/jf2feed+json": { + source: "iana", + compressible: true + }, + "application/jose": { + source: "iana" + }, + "application/jose+json": { + source: "iana", + compressible: true + }, + "application/jrd+json": { + source: "iana", + compressible: true + }, + "application/jscalendar+json": { + source: "iana", + compressible: true + }, + "application/json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["json", "map"] + }, + "application/json-patch+json": { + source: "iana", + compressible: true + }, + "application/json-seq": { + source: "iana" + }, + "application/json5": { + extensions: ["json5"] + }, + "application/jsonml+json": { + source: "apache", + compressible: true, + extensions: ["jsonml"] + }, + "application/jwk+json": { + source: "iana", + compressible: true + }, + "application/jwk-set+json": { + source: "iana", + compressible: true + }, + "application/jwt": { + source: "iana" + }, + "application/kpml-request+xml": { + source: "iana", + compressible: true + }, + "application/kpml-response+xml": { + source: "iana", + compressible: true + }, + "application/ld+json": { + source: "iana", + compressible: true, + extensions: ["jsonld"] + }, + "application/lgr+xml": { + source: "iana", + compressible: true, + extensions: ["lgr"] + }, + "application/link-format": { + source: "iana" + }, + "application/load-control+xml": { + source: "iana", + compressible: true + }, + "application/lost+xml": { + source: "iana", + compressible: true, + extensions: ["lostxml"] + }, + "application/lostsync+xml": { + source: "iana", + compressible: true + }, + "application/lpf+zip": { + source: "iana", + compressible: false + }, + "application/lxf": { + source: "iana" + }, + "application/mac-binhex40": { + source: "iana", + extensions: ["hqx"] + }, + "application/mac-compactpro": { + source: "apache", + extensions: ["cpt"] + }, + "application/macwriteii": { + source: "iana" + }, + "application/mads+xml": { + source: "iana", + compressible: true, + extensions: ["mads"] + }, + "application/manifest+json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["webmanifest"] + }, + "application/marc": { + source: "iana", + extensions: ["mrc"] + }, + "application/marcxml+xml": { + source: "iana", + compressible: true, + extensions: ["mrcx"] + }, + "application/mathematica": { + source: "iana", + extensions: ["ma", "nb", "mb"] + }, + "application/mathml+xml": { + source: "iana", + compressible: true, + extensions: ["mathml"] + }, + "application/mathml-content+xml": { + source: "iana", + compressible: true + }, + "application/mathml-presentation+xml": { + source: "iana", + compressible: true + }, + "application/mbms-associated-procedure-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-deregister+xml": { + source: "iana", + compressible: true + }, + "application/mbms-envelope+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-protection-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-reception-report+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-schedule+xml": { + source: "iana", + compressible: true + }, + "application/mbms-user-service-description+xml": { + source: "iana", + compressible: true + }, + "application/mbox": { + source: "iana", + extensions: ["mbox"] + }, + "application/media-policy-dataset+xml": { + source: "iana", + compressible: true, + extensions: ["mpf"] + }, + "application/media_control+xml": { + source: "iana", + compressible: true + }, + "application/mediaservercontrol+xml": { + source: "iana", + compressible: true, + extensions: ["mscml"] + }, + "application/merge-patch+json": { + source: "iana", + compressible: true + }, + "application/metalink+xml": { + source: "apache", + compressible: true, + extensions: ["metalink"] + }, + "application/metalink4+xml": { + source: "iana", + compressible: true, + extensions: ["meta4"] + }, + "application/mets+xml": { + source: "iana", + compressible: true, + extensions: ["mets"] + }, + "application/mf4": { + source: "iana" + }, + "application/mikey": { + source: "iana" + }, + "application/mipc": { + source: "iana" + }, + "application/missing-blocks+cbor-seq": { + source: "iana" + }, + "application/mmt-aei+xml": { + source: "iana", + compressible: true, + extensions: ["maei"] + }, + "application/mmt-usd+xml": { + source: "iana", + compressible: true, + extensions: ["musd"] + }, + "application/mods+xml": { + source: "iana", + compressible: true, + extensions: ["mods"] + }, + "application/moss-keys": { + source: "iana" + }, + "application/moss-signature": { + source: "iana" + }, + "application/mosskey-data": { + source: "iana" + }, + "application/mosskey-request": { + source: "iana" + }, + "application/mp21": { + source: "iana", + extensions: ["m21", "mp21"] + }, + "application/mp4": { + source: "iana", + extensions: ["mp4s", "m4p"] + }, + "application/mpeg4-generic": { + source: "iana" + }, + "application/mpeg4-iod": { + source: "iana" + }, + "application/mpeg4-iod-xmt": { + source: "iana" + }, + "application/mrb-consumer+xml": { + source: "iana", + compressible: true + }, + "application/mrb-publish+xml": { + source: "iana", + compressible: true + }, + "application/msc-ivr+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msc-mixer+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msword": { + source: "iana", + compressible: false, + extensions: ["doc", "dot"] + }, + "application/mud+json": { + source: "iana", + compressible: true + }, + "application/multipart-core": { + source: "iana" + }, + "application/mxf": { + source: "iana", + extensions: ["mxf"] + }, + "application/n-quads": { + source: "iana", + extensions: ["nq"] + }, + "application/n-triples": { + source: "iana", + extensions: ["nt"] + }, + "application/nasdata": { + source: "iana" + }, + "application/news-checkgroups": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-groupinfo": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-transmission": { + source: "iana" + }, + "application/nlsml+xml": { + source: "iana", + compressible: true + }, + "application/node": { + source: "iana", + extensions: ["cjs"] + }, + "application/nss": { + source: "iana" + }, + "application/oauth-authz-req+jwt": { + source: "iana" + }, + "application/oblivious-dns-message": { + source: "iana" + }, + "application/ocsp-request": { + source: "iana" + }, + "application/ocsp-response": { + source: "iana" + }, + "application/octet-stream": { + source: "iana", + compressible: false, + extensions: ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"] + }, + "application/oda": { + source: "iana", + extensions: ["oda"] + }, + "application/odm+xml": { + source: "iana", + compressible: true + }, + "application/odx": { + source: "iana" + }, + "application/oebps-package+xml": { + source: "iana", + compressible: true, + extensions: ["opf"] + }, + "application/ogg": { + source: "iana", + compressible: false, + extensions: ["ogx"] + }, + "application/omdoc+xml": { + source: "apache", + compressible: true, + extensions: ["omdoc"] + }, + "application/onenote": { + source: "apache", + extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"] + }, + "application/opc-nodeset+xml": { + source: "iana", + compressible: true + }, + "application/oscore": { + source: "iana" + }, + "application/oxps": { + source: "iana", + extensions: ["oxps"] + }, + "application/p21": { + source: "iana" + }, + "application/p21+zip": { + source: "iana", + compressible: false + }, + "application/p2p-overlay+xml": { + source: "iana", + compressible: true, + extensions: ["relo"] + }, + "application/parityfec": { + source: "iana" + }, + "application/passport": { + source: "iana" + }, + "application/patch-ops-error+xml": { + source: "iana", + compressible: true, + extensions: ["xer"] + }, + "application/pdf": { + source: "iana", + compressible: false, + extensions: ["pdf"] + }, + "application/pdx": { + source: "iana" + }, + "application/pem-certificate-chain": { + source: "iana" + }, + "application/pgp-encrypted": { + source: "iana", + compressible: false, + extensions: ["pgp"] + }, + "application/pgp-keys": { + source: "iana", + extensions: ["asc"] + }, + "application/pgp-signature": { + source: "iana", + extensions: ["asc", "sig"] + }, + "application/pics-rules": { + source: "apache", + extensions: ["prf"] + }, + "application/pidf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pidf-diff+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pkcs10": { + source: "iana", + extensions: ["p10"] + }, + "application/pkcs12": { + source: "iana" + }, + "application/pkcs7-mime": { + source: "iana", + extensions: ["p7m", "p7c"] + }, + "application/pkcs7-signature": { + source: "iana", + extensions: ["p7s"] + }, + "application/pkcs8": { + source: "iana", + extensions: ["p8"] + }, + "application/pkcs8-encrypted": { + source: "iana" + }, + "application/pkix-attr-cert": { + source: "iana", + extensions: ["ac"] + }, + "application/pkix-cert": { + source: "iana", + extensions: ["cer"] + }, + "application/pkix-crl": { + source: "iana", + extensions: ["crl"] + }, + "application/pkix-pkipath": { + source: "iana", + extensions: ["pkipath"] + }, + "application/pkixcmp": { + source: "iana", + extensions: ["pki"] + }, + "application/pls+xml": { + source: "iana", + compressible: true, + extensions: ["pls"] + }, + "application/poc-settings+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/postscript": { + source: "iana", + compressible: true, + extensions: ["ai", "eps", "ps"] + }, + "application/ppsp-tracker+json": { + source: "iana", + compressible: true + }, + "application/problem+json": { + source: "iana", + compressible: true + }, + "application/problem+xml": { + source: "iana", + compressible: true + }, + "application/provenance+xml": { + source: "iana", + compressible: true, + extensions: ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + source: "iana" + }, + "application/prs.cww": { + source: "iana", + extensions: ["cww"] + }, + "application/prs.cyn": { + source: "iana", + charset: "7-BIT" + }, + "application/prs.hpub+zip": { + source: "iana", + compressible: false + }, + "application/prs.nprend": { + source: "iana" + }, + "application/prs.plucker": { + source: "iana" + }, + "application/prs.rdf-xml-crypt": { + source: "iana" + }, + "application/prs.xsf+xml": { + source: "iana", + compressible: true + }, + "application/pskc+xml": { + source: "iana", + compressible: true, + extensions: ["pskcxml"] + }, + "application/pvd+json": { + source: "iana", + compressible: true + }, + "application/qsig": { + source: "iana" + }, + "application/raml+yaml": { + compressible: true, + extensions: ["raml"] + }, + "application/raptorfec": { + source: "iana" + }, + "application/rdap+json": { + source: "iana", + compressible: true + }, + "application/rdf+xml": { + source: "iana", + compressible: true, + extensions: ["rdf", "owl"] + }, + "application/reginfo+xml": { + source: "iana", + compressible: true, + extensions: ["rif"] + }, + "application/relax-ng-compact-syntax": { + source: "iana", + extensions: ["rnc"] + }, + "application/remote-printing": { + source: "iana" + }, + "application/reputon+json": { + source: "iana", + compressible: true + }, + "application/resource-lists+xml": { + source: "iana", + compressible: true, + extensions: ["rl"] + }, + "application/resource-lists-diff+xml": { + source: "iana", + compressible: true, + extensions: ["rld"] + }, + "application/rfc+xml": { + source: "iana", + compressible: true + }, + "application/riscos": { + source: "iana" + }, + "application/rlmi+xml": { + source: "iana", + compressible: true + }, + "application/rls-services+xml": { + source: "iana", + compressible: true, + extensions: ["rs"] + }, + "application/route-apd+xml": { + source: "iana", + compressible: true, + extensions: ["rapd"] + }, + "application/route-s-tsid+xml": { + source: "iana", + compressible: true, + extensions: ["sls"] + }, + "application/route-usd+xml": { + source: "iana", + compressible: true, + extensions: ["rusd"] + }, + "application/rpki-ghostbusters": { + source: "iana", + extensions: ["gbr"] + }, + "application/rpki-manifest": { + source: "iana", + extensions: ["mft"] + }, + "application/rpki-publication": { + source: "iana" + }, + "application/rpki-roa": { + source: "iana", + extensions: ["roa"] + }, + "application/rpki-updown": { + source: "iana" + }, + "application/rsd+xml": { + source: "apache", + compressible: true, + extensions: ["rsd"] + }, + "application/rss+xml": { + source: "apache", + compressible: true, + extensions: ["rss"] + }, + "application/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "application/rtploopback": { + source: "iana" + }, + "application/rtx": { + source: "iana" + }, + "application/samlassertion+xml": { + source: "iana", + compressible: true + }, + "application/samlmetadata+xml": { + source: "iana", + compressible: true + }, + "application/sarif+json": { + source: "iana", + compressible: true + }, + "application/sarif-external-properties+json": { + source: "iana", + compressible: true + }, + "application/sbe": { + source: "iana" + }, + "application/sbml+xml": { + source: "iana", + compressible: true, + extensions: ["sbml"] + }, + "application/scaip+xml": { + source: "iana", + compressible: true + }, + "application/scim+json": { + source: "iana", + compressible: true + }, + "application/scvp-cv-request": { + source: "iana", + extensions: ["scq"] + }, + "application/scvp-cv-response": { + source: "iana", + extensions: ["scs"] + }, + "application/scvp-vp-request": { + source: "iana", + extensions: ["spq"] + }, + "application/scvp-vp-response": { + source: "iana", + extensions: ["spp"] + }, + "application/sdp": { + source: "iana", + extensions: ["sdp"] + }, + "application/secevent+jwt": { + source: "iana" + }, + "application/senml+cbor": { + source: "iana" + }, + "application/senml+json": { + source: "iana", + compressible: true + }, + "application/senml+xml": { + source: "iana", + compressible: true, + extensions: ["senmlx"] + }, + "application/senml-etch+cbor": { + source: "iana" + }, + "application/senml-etch+json": { + source: "iana", + compressible: true + }, + "application/senml-exi": { + source: "iana" + }, + "application/sensml+cbor": { + source: "iana" + }, + "application/sensml+json": { + source: "iana", + compressible: true + }, + "application/sensml+xml": { + source: "iana", + compressible: true, + extensions: ["sensmlx"] + }, + "application/sensml-exi": { + source: "iana" + }, + "application/sep+xml": { + source: "iana", + compressible: true + }, + "application/sep-exi": { + source: "iana" + }, + "application/session-info": { + source: "iana" + }, + "application/set-payment": { + source: "iana" + }, + "application/set-payment-initiation": { + source: "iana", + extensions: ["setpay"] + }, + "application/set-registration": { + source: "iana" + }, + "application/set-registration-initiation": { + source: "iana", + extensions: ["setreg"] + }, + "application/sgml": { + source: "iana" + }, + "application/sgml-open-catalog": { + source: "iana" + }, + "application/shf+xml": { + source: "iana", + compressible: true, + extensions: ["shf"] + }, + "application/sieve": { + source: "iana", + extensions: ["siv", "sieve"] + }, + "application/simple-filter+xml": { + source: "iana", + compressible: true + }, + "application/simple-message-summary": { + source: "iana" + }, + "application/simplesymbolcontainer": { + source: "iana" + }, + "application/sipc": { + source: "iana" + }, + "application/slate": { + source: "iana" + }, + "application/smil": { + source: "iana" + }, + "application/smil+xml": { + source: "iana", + compressible: true, + extensions: ["smi", "smil"] + }, + "application/smpte336m": { + source: "iana" + }, + "application/soap+fastinfoset": { + source: "iana" + }, + "application/soap+xml": { + source: "iana", + compressible: true + }, + "application/sparql-query": { + source: "iana", + extensions: ["rq"] + }, + "application/sparql-results+xml": { + source: "iana", + compressible: true, + extensions: ["srx"] + }, + "application/spdx+json": { + source: "iana", + compressible: true + }, + "application/spirits-event+xml": { + source: "iana", + compressible: true + }, + "application/sql": { + source: "iana" + }, + "application/srgs": { + source: "iana", + extensions: ["gram"] + }, + "application/srgs+xml": { + source: "iana", + compressible: true, + extensions: ["grxml"] + }, + "application/sru+xml": { + source: "iana", + compressible: true, + extensions: ["sru"] + }, + "application/ssdl+xml": { + source: "apache", + compressible: true, + extensions: ["ssdl"] + }, + "application/ssml+xml": { + source: "iana", + compressible: true, + extensions: ["ssml"] + }, + "application/stix+json": { + source: "iana", + compressible: true + }, + "application/swid+xml": { + source: "iana", + compressible: true, + extensions: ["swidtag"] + }, + "application/tamp-apex-update": { + source: "iana" + }, + "application/tamp-apex-update-confirm": { + source: "iana" + }, + "application/tamp-community-update": { + source: "iana" + }, + "application/tamp-community-update-confirm": { + source: "iana" + }, + "application/tamp-error": { + source: "iana" + }, + "application/tamp-sequence-adjust": { + source: "iana" + }, + "application/tamp-sequence-adjust-confirm": { + source: "iana" + }, + "application/tamp-status-query": { + source: "iana" + }, + "application/tamp-status-response": { + source: "iana" + }, + "application/tamp-update": { + source: "iana" + }, + "application/tamp-update-confirm": { + source: "iana" + }, + "application/tar": { + compressible: true + }, + "application/taxii+json": { + source: "iana", + compressible: true + }, + "application/td+json": { + source: "iana", + compressible: true + }, + "application/tei+xml": { + source: "iana", + compressible: true, + extensions: ["tei", "teicorpus"] + }, + "application/tetra_isi": { + source: "iana" + }, + "application/thraud+xml": { + source: "iana", + compressible: true, + extensions: ["tfi"] + }, + "application/timestamp-query": { + source: "iana" + }, + "application/timestamp-reply": { + source: "iana" + }, + "application/timestamped-data": { + source: "iana", + extensions: ["tsd"] + }, + "application/tlsrpt+gzip": { + source: "iana" + }, + "application/tlsrpt+json": { + source: "iana", + compressible: true + }, + "application/tnauthlist": { + source: "iana" + }, + "application/token-introspection+jwt": { + source: "iana" + }, + "application/toml": { + compressible: true, + extensions: ["toml"] + }, + "application/trickle-ice-sdpfrag": { + source: "iana" + }, + "application/trig": { + source: "iana", + extensions: ["trig"] + }, + "application/ttml+xml": { + source: "iana", + compressible: true, + extensions: ["ttml"] + }, + "application/tve-trigger": { + source: "iana" + }, + "application/tzif": { + source: "iana" + }, + "application/tzif-leap": { + source: "iana" + }, + "application/ubjson": { + compressible: false, + extensions: ["ubj"] + }, + "application/ulpfec": { + source: "iana" + }, + "application/urc-grpsheet+xml": { + source: "iana", + compressible: true + }, + "application/urc-ressheet+xml": { + source: "iana", + compressible: true, + extensions: ["rsheet"] + }, + "application/urc-targetdesc+xml": { + source: "iana", + compressible: true, + extensions: ["td"] + }, + "application/urc-uisocketdesc+xml": { + source: "iana", + compressible: true + }, + "application/vcard+json": { + source: "iana", + compressible: true + }, + "application/vcard+xml": { + source: "iana", + compressible: true + }, + "application/vemmi": { + source: "iana" + }, + "application/vividence.scriptfile": { + source: "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + source: "iana", + compressible: true, + extensions: ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-v2x-local-service-information": { + source: "iana" + }, + "application/vnd.3gpp.5gnas": { + source: "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.bsf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gmop+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gtpc": { + source: "iana" + }, + "application/vnd.3gpp.interworking-data": { + source: "iana" + }, + "application/vnd.3gpp.lpp": { + source: "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-payload": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-signalling": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mid-call+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ngap": { + source: "iana" + }, + "application/vnd.3gpp.pfcp": { + source: "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + source: "iana", + extensions: ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + source: "iana", + extensions: ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + source: "iana", + extensions: ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + source: "iana" + }, + "application/vnd.3gpp.sms": { + source: "iana" + }, + "application/vnd.3gpp.sms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ussd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.sms": { + source: "iana" + }, + "application/vnd.3gpp2.tcap": { + source: "iana", + extensions: ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + source: "iana" + }, + "application/vnd.3m.post-it-notes": { + source: "iana", + extensions: ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + source: "iana", + extensions: ["aso"] + }, + "application/vnd.accpac.simply.imp": { + source: "iana", + extensions: ["imp"] + }, + "application/vnd.acucobol": { + source: "iana", + extensions: ["acu"] + }, + "application/vnd.acucorp": { + source: "iana", + extensions: ["atc", "acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + source: "apache", + compressible: false, + extensions: ["air"] + }, + "application/vnd.adobe.flash.movie": { + source: "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + source: "iana", + extensions: ["fcdt"] + }, + "application/vnd.adobe.fxp": { + source: "iana", + extensions: ["fxp", "fxpl"] + }, + "application/vnd.adobe.partial-upload": { + source: "iana" + }, + "application/vnd.adobe.xdp+xml": { + source: "iana", + compressible: true, + extensions: ["xdp"] + }, + "application/vnd.adobe.xfdf": { + source: "iana", + extensions: ["xfdf"] + }, + "application/vnd.aether.imp": { + source: "iana" + }, + "application/vnd.afpc.afplinedata": { + source: "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + source: "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + source: "iana" + }, + "application/vnd.afpc.foca-charset": { + source: "iana" + }, + "application/vnd.afpc.foca-codedfont": { + source: "iana" + }, + "application/vnd.afpc.foca-codepage": { + source: "iana" + }, + "application/vnd.afpc.modca": { + source: "iana" + }, + "application/vnd.afpc.modca-cmtable": { + source: "iana" + }, + "application/vnd.afpc.modca-formdef": { + source: "iana" + }, + "application/vnd.afpc.modca-mediummap": { + source: "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + source: "iana" + }, + "application/vnd.afpc.modca-overlay": { + source: "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + source: "iana" + }, + "application/vnd.age": { + source: "iana", + extensions: ["age"] + }, + "application/vnd.ah-barcode": { + source: "iana" + }, + "application/vnd.ahead.space": { + source: "iana", + extensions: ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + source: "iana", + extensions: ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + source: "iana", + extensions: ["azs"] + }, + "application/vnd.amadeus+json": { + source: "iana", + compressible: true + }, + "application/vnd.amazon.ebook": { + source: "apache", + extensions: ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + source: "iana" + }, + "application/vnd.americandynamics.acc": { + source: "iana", + extensions: ["acc"] + }, + "application/vnd.amiga.ami": { + source: "iana", + extensions: ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + source: "iana", + compressible: true + }, + "application/vnd.android.ota": { + source: "iana" + }, + "application/vnd.android.package-archive": { + source: "apache", + compressible: false, + extensions: ["apk"] + }, + "application/vnd.anki": { + source: "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + source: "iana", + extensions: ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + source: "apache", + extensions: ["fti"] + }, + "application/vnd.antix.game-component": { + source: "iana", + extensions: ["atx"] + }, + "application/vnd.apache.arrow.file": { + source: "iana" + }, + "application/vnd.apache.arrow.stream": { + source: "iana" + }, + "application/vnd.apache.thrift.binary": { + source: "iana" + }, + "application/vnd.apache.thrift.compact": { + source: "iana" + }, + "application/vnd.apache.thrift.json": { + source: "iana" + }, + "application/vnd.api+json": { + source: "iana", + compressible: true + }, + "application/vnd.aplextor.warrp+json": { + source: "iana", + compressible: true + }, + "application/vnd.apothekende.reservation+json": { + source: "iana", + compressible: true + }, + "application/vnd.apple.installer+xml": { + source: "iana", + compressible: true, + extensions: ["mpkg"] + }, + "application/vnd.apple.keynote": { + source: "iana", + extensions: ["key"] + }, + "application/vnd.apple.mpegurl": { + source: "iana", + extensions: ["m3u8"] + }, + "application/vnd.apple.numbers": { + source: "iana", + extensions: ["numbers"] + }, + "application/vnd.apple.pages": { + source: "iana", + extensions: ["pages"] + }, + "application/vnd.apple.pkpass": { + compressible: false, + extensions: ["pkpass"] + }, + "application/vnd.arastra.swi": { + source: "iana" + }, + "application/vnd.aristanetworks.swi": { + source: "iana", + extensions: ["swi"] + }, + "application/vnd.artisan+json": { + source: "iana", + compressible: true + }, + "application/vnd.artsquare": { + source: "iana" + }, + "application/vnd.astraea-software.iota": { + source: "iana", + extensions: ["iota"] + }, + "application/vnd.audiograph": { + source: "iana", + extensions: ["aep"] + }, + "application/vnd.autopackage": { + source: "iana" + }, + "application/vnd.avalon+json": { + source: "iana", + compressible: true + }, + "application/vnd.avistar+xml": { + source: "iana", + compressible: true + }, + "application/vnd.balsamiq.bmml+xml": { + source: "iana", + compressible: true, + extensions: ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + source: "iana" + }, + "application/vnd.banana-accounting": { + source: "iana" + }, + "application/vnd.bbf.usp.error": { + source: "iana" + }, + "application/vnd.bbf.usp.msg": { + source: "iana" + }, + "application/vnd.bbf.usp.msg+json": { + source: "iana", + compressible: true + }, + "application/vnd.bekitzur-stech+json": { + source: "iana", + compressible: true + }, + "application/vnd.bint.med-content": { + source: "iana" + }, + "application/vnd.biopax.rdf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.blink-idb-value-wrapper": { + source: "iana" + }, + "application/vnd.blueice.multipass": { + source: "iana", + extensions: ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + source: "iana" + }, + "application/vnd.bluetooth.le.oob": { + source: "iana" + }, + "application/vnd.bmi": { + source: "iana", + extensions: ["bmi"] + }, + "application/vnd.bpf": { + source: "iana" + }, + "application/vnd.bpf3": { + source: "iana" + }, + "application/vnd.businessobjects": { + source: "iana", + extensions: ["rep"] + }, + "application/vnd.byu.uapi+json": { + source: "iana", + compressible: true + }, + "application/vnd.cab-jscript": { + source: "iana" + }, + "application/vnd.canon-cpdl": { + source: "iana" + }, + "application/vnd.canon-lips": { + source: "iana" + }, + "application/vnd.capasystems-pg+json": { + source: "iana", + compressible: true + }, + "application/vnd.cendio.thinlinc.clientconf": { + source: "iana" + }, + "application/vnd.century-systems.tcp_stream": { + source: "iana" + }, + "application/vnd.chemdraw+xml": { + source: "iana", + compressible: true, + extensions: ["cdxml"] + }, + "application/vnd.chess-pgn": { + source: "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + source: "iana", + extensions: ["mmd"] + }, + "application/vnd.ciedi": { + source: "iana" + }, + "application/vnd.cinderella": { + source: "iana", + extensions: ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + source: "iana" + }, + "application/vnd.citationstyles.style+xml": { + source: "iana", + compressible: true, + extensions: ["csl"] + }, + "application/vnd.claymore": { + source: "iana", + extensions: ["cla"] + }, + "application/vnd.cloanto.rp9": { + source: "iana", + extensions: ["rp9"] + }, + "application/vnd.clonk.c4group": { + source: "iana", + extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + source: "iana", + extensions: ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + source: "iana", + extensions: ["c11amz"] + }, + "application/vnd.coffeescript": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + source: "iana" + }, + "application/vnd.collection+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.doc+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.next+json": { + source: "iana", + compressible: true + }, + "application/vnd.comicbook+zip": { + source: "iana", + compressible: false + }, + "application/vnd.comicbook-rar": { + source: "iana" + }, + "application/vnd.commerce-battelle": { + source: "iana" + }, + "application/vnd.commonspace": { + source: "iana", + extensions: ["csp"] + }, + "application/vnd.contact.cmsg": { + source: "iana", + extensions: ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + source: "iana", + compressible: true + }, + "application/vnd.cosmocaller": { + source: "iana", + extensions: ["cmc"] + }, + "application/vnd.crick.clicker": { + source: "iana", + extensions: ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + source: "iana", + extensions: ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + source: "iana", + extensions: ["clkp"] + }, + "application/vnd.crick.clicker.template": { + source: "iana", + extensions: ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + source: "iana", + extensions: ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + source: "iana", + compressible: true, + extensions: ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + source: "iana", + compressible: true + }, + "application/vnd.crypto-shade-file": { + source: "iana" + }, + "application/vnd.cryptomator.encrypted": { + source: "iana" + }, + "application/vnd.cryptomator.vault": { + source: "iana" + }, + "application/vnd.ctc-posml": { + source: "iana", + extensions: ["pml"] + }, + "application/vnd.ctct.ws+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cups-pdf": { + source: "iana" + }, + "application/vnd.cups-postscript": { + source: "iana" + }, + "application/vnd.cups-ppd": { + source: "iana", + extensions: ["ppd"] + }, + "application/vnd.cups-raster": { + source: "iana" + }, + "application/vnd.cups-raw": { + source: "iana" + }, + "application/vnd.curl": { + source: "iana" + }, + "application/vnd.curl.car": { + source: "apache", + extensions: ["car"] + }, + "application/vnd.curl.pcurl": { + source: "apache", + extensions: ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cybank": { + source: "iana" + }, + "application/vnd.cyclonedx+json": { + source: "iana", + compressible: true + }, + "application/vnd.cyclonedx+xml": { + source: "iana", + compressible: true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + source: "iana", + compressible: false + }, + "application/vnd.d3m-dataset": { + source: "iana" + }, + "application/vnd.d3m-problem": { + source: "iana" + }, + "application/vnd.dart": { + source: "iana", + compressible: true, + extensions: ["dart"] + }, + "application/vnd.data-vision.rdz": { + source: "iana", + extensions: ["rdz"] + }, + "application/vnd.datapackage+json": { + source: "iana", + compressible: true + }, + "application/vnd.dataresource+json": { + source: "iana", + compressible: true + }, + "application/vnd.dbf": { + source: "iana", + extensions: ["dbf"] + }, + "application/vnd.debian.binary-package": { + source: "iana" + }, + "application/vnd.dece.data": { + source: "iana", + extensions: ["uvf", "uvvf", "uvd", "uvvd"] + }, + "application/vnd.dece.ttml+xml": { + source: "iana", + compressible: true, + extensions: ["uvt", "uvvt"] + }, + "application/vnd.dece.unspecified": { + source: "iana", + extensions: ["uvx", "uvvx"] + }, + "application/vnd.dece.zip": { + source: "iana", + extensions: ["uvz", "uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + source: "iana", + extensions: ["fe_launch"] + }, + "application/vnd.desmume.movie": { + source: "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + source: "iana" + }, + "application/vnd.dm.delegation+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dna": { + source: "iana", + extensions: ["dna"] + }, + "application/vnd.document+json": { + source: "iana", + compressible: true + }, + "application/vnd.dolby.mlp": { + source: "apache", + extensions: ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + source: "iana" + }, + "application/vnd.dolby.mobile.2": { + source: "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + source: "iana" + }, + "application/vnd.dpgraph": { + source: "iana", + extensions: ["dpg"] + }, + "application/vnd.dreamfactory": { + source: "iana", + extensions: ["dfac"] + }, + "application/vnd.drive+json": { + source: "iana", + compressible: true + }, + "application/vnd.ds-keypoint": { + source: "apache", + extensions: ["kpxx"] + }, + "application/vnd.dtg.local": { + source: "iana" + }, + "application/vnd.dtg.local.flash": { + source: "iana" + }, + "application/vnd.dtg.local.html": { + source: "iana" + }, + "application/vnd.dvb.ait": { + source: "iana", + extensions: ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.dvbj": { + source: "iana" + }, + "application/vnd.dvb.esgcontainer": { + source: "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + source: "iana" + }, + "application/vnd.dvb.ipdcroaming": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + source: "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-container+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-generic+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-init+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.pfr": { + source: "iana" + }, + "application/vnd.dvb.service": { + source: "iana", + extensions: ["svc"] + }, + "application/vnd.dxr": { + source: "iana" + }, + "application/vnd.dynageo": { + source: "iana", + extensions: ["geo"] + }, + "application/vnd.dzr": { + source: "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + source: "iana" + }, + "application/vnd.ecdis-update": { + source: "iana" + }, + "application/vnd.ecip.rlp": { + source: "iana" + }, + "application/vnd.eclipse.ditto+json": { + source: "iana", + compressible: true + }, + "application/vnd.ecowin.chart": { + source: "iana", + extensions: ["mag"] + }, + "application/vnd.ecowin.filerequest": { + source: "iana" + }, + "application/vnd.ecowin.fileupdate": { + source: "iana" + }, + "application/vnd.ecowin.series": { + source: "iana" + }, + "application/vnd.ecowin.seriesrequest": { + source: "iana" + }, + "application/vnd.ecowin.seriesupdate": { + source: "iana" + }, + "application/vnd.efi.img": { + source: "iana" + }, + "application/vnd.efi.iso": { + source: "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + source: "iana", + compressible: true + }, + "application/vnd.enliven": { + source: "iana", + extensions: ["nml"] + }, + "application/vnd.enphase.envoy": { + source: "iana" + }, + "application/vnd.eprints.data+xml": { + source: "iana", + compressible: true + }, + "application/vnd.epson.esf": { + source: "iana", + extensions: ["esf"] + }, + "application/vnd.epson.msf": { + source: "iana", + extensions: ["msf"] + }, + "application/vnd.epson.quickanime": { + source: "iana", + extensions: ["qam"] + }, + "application/vnd.epson.salt": { + source: "iana", + extensions: ["slt"] + }, + "application/vnd.epson.ssf": { + source: "iana", + extensions: ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + source: "iana" + }, + "application/vnd.espass-espass+zip": { + source: "iana", + compressible: false + }, + "application/vnd.eszigno3+xml": { + source: "iana", + compressible: true, + extensions: ["es3", "et3"] + }, + "application/vnd.etsi.aoc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.asic-e+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.asic-s+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.cug+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvcommand+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvservice+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsync+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mcid+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mheg5": { + source: "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.pstn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.sci+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.simservs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.timestamp-token": { + source: "iana" + }, + "application/vnd.etsi.tsl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.tsl.der": { + source: "iana" + }, + "application/vnd.eu.kasparian.car+json": { + source: "iana", + compressible: true + }, + "application/vnd.eudora.data": { + source: "iana" + }, + "application/vnd.evolv.ecig.profile": { + source: "iana" + }, + "application/vnd.evolv.ecig.settings": { + source: "iana" + }, + "application/vnd.evolv.ecig.theme": { + source: "iana" + }, + "application/vnd.exstream-empower+zip": { + source: "iana", + compressible: false + }, + "application/vnd.exstream-package": { + source: "iana" + }, + "application/vnd.ezpix-album": { + source: "iana", + extensions: ["ez2"] + }, + "application/vnd.ezpix-package": { + source: "iana", + extensions: ["ez3"] + }, + "application/vnd.f-secure.mobile": { + source: "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + source: "iana", + compressible: false + }, + "application/vnd.fastcopy-disk-image": { + source: "iana" + }, + "application/vnd.fdf": { + source: "iana", + extensions: ["fdf"] + }, + "application/vnd.fdsn.mseed": { + source: "iana", + extensions: ["mseed"] + }, + "application/vnd.fdsn.seed": { + source: "iana", + extensions: ["seed", "dataless"] + }, + "application/vnd.ffsns": { + source: "iana" + }, + "application/vnd.ficlab.flb+zip": { + source: "iana", + compressible: false + }, + "application/vnd.filmit.zfc": { + source: "iana" + }, + "application/vnd.fints": { + source: "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + source: "iana" + }, + "application/vnd.flographit": { + source: "iana", + extensions: ["gph"] + }, + "application/vnd.fluxtime.clip": { + source: "iana", + extensions: ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + source: "iana" + }, + "application/vnd.framemaker": { + source: "iana", + extensions: ["fm", "frame", "maker", "book"] + }, + "application/vnd.frogans.fnc": { + source: "iana", + extensions: ["fnc"] + }, + "application/vnd.frogans.ltf": { + source: "iana", + extensions: ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + source: "iana", + extensions: ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + source: "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.fujitsu.oasys": { + source: "iana", + extensions: ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + source: "iana", + extensions: ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + source: "iana", + extensions: ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + source: "iana", + extensions: ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + source: "iana", + extensions: ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + source: "iana" + }, + "application/vnd.fujixerox.art4": { + source: "iana" + }, + "application/vnd.fujixerox.ddd": { + source: "iana", + extensions: ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + source: "iana", + extensions: ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + source: "iana", + extensions: ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + source: "iana" + }, + "application/vnd.fujixerox.hbpl": { + source: "iana" + }, + "application/vnd.fut-misnet": { + source: "iana" + }, + "application/vnd.futoin+cbor": { + source: "iana" + }, + "application/vnd.futoin+json": { + source: "iana", + compressible: true + }, + "application/vnd.fuzzysheet": { + source: "iana", + extensions: ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + source: "iana", + extensions: ["txd"] + }, + "application/vnd.gentics.grd+json": { + source: "iana", + compressible: true + }, + "application/vnd.geo+json": { + source: "iana", + compressible: true + }, + "application/vnd.geocube+xml": { + source: "iana", + compressible: true + }, + "application/vnd.geogebra.file": { + source: "iana", + extensions: ["ggb"] + }, + "application/vnd.geogebra.slides": { + source: "iana" + }, + "application/vnd.geogebra.tool": { + source: "iana", + extensions: ["ggt"] + }, + "application/vnd.geometry-explorer": { + source: "iana", + extensions: ["gex", "gre"] + }, + "application/vnd.geonext": { + source: "iana", + extensions: ["gxt"] + }, + "application/vnd.geoplan": { + source: "iana", + extensions: ["g2w"] + }, + "application/vnd.geospace": { + source: "iana", + extensions: ["g3w"] + }, + "application/vnd.gerber": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + source: "iana" + }, + "application/vnd.gmx": { + source: "iana", + extensions: ["gmx"] + }, + "application/vnd.google-apps.document": { + compressible: false, + extensions: ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + compressible: false, + extensions: ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + compressible: false, + extensions: ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + source: "iana", + compressible: true, + extensions: ["kml"] + }, + "application/vnd.google-earth.kmz": { + source: "iana", + compressible: false, + extensions: ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + source: "iana", + compressible: true + }, + "application/vnd.gov.sk.e-form+zip": { + source: "iana", + compressible: false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.grafeq": { + source: "iana", + extensions: ["gqf", "gqs"] + }, + "application/vnd.gridmp": { + source: "iana" + }, + "application/vnd.groove-account": { + source: "iana", + extensions: ["gac"] + }, + "application/vnd.groove-help": { + source: "iana", + extensions: ["ghf"] + }, + "application/vnd.groove-identity-message": { + source: "iana", + extensions: ["gim"] + }, + "application/vnd.groove-injector": { + source: "iana", + extensions: ["grv"] + }, + "application/vnd.groove-tool-message": { + source: "iana", + extensions: ["gtm"] + }, + "application/vnd.groove-tool-template": { + source: "iana", + extensions: ["tpl"] + }, + "application/vnd.groove-vcard": { + source: "iana", + extensions: ["vcg"] + }, + "application/vnd.hal+json": { + source: "iana", + compressible: true + }, + "application/vnd.hal+xml": { + source: "iana", + compressible: true, + extensions: ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + source: "iana", + compressible: true, + extensions: ["zmm"] + }, + "application/vnd.hbci": { + source: "iana", + extensions: ["hbci"] + }, + "application/vnd.hc+json": { + source: "iana", + compressible: true + }, + "application/vnd.hcl-bireports": { + source: "iana" + }, + "application/vnd.hdt": { + source: "iana" + }, + "application/vnd.heroku+json": { + source: "iana", + compressible: true + }, + "application/vnd.hhe.lesson-player": { + source: "iana", + extensions: ["les"] + }, + "application/vnd.hl7cda+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hl7v2+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hp-hpgl": { + source: "iana", + extensions: ["hpgl"] + }, + "application/vnd.hp-hpid": { + source: "iana", + extensions: ["hpid"] + }, + "application/vnd.hp-hps": { + source: "iana", + extensions: ["hps"] + }, + "application/vnd.hp-jlyt": { + source: "iana", + extensions: ["jlt"] + }, + "application/vnd.hp-pcl": { + source: "iana", + extensions: ["pcl"] + }, + "application/vnd.hp-pclxl": { + source: "iana", + extensions: ["pclxl"] + }, + "application/vnd.httphone": { + source: "iana" + }, + "application/vnd.hydrostatix.sof-data": { + source: "iana", + extensions: ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyper-item+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyperdrive+json": { + source: "iana", + compressible: true + }, + "application/vnd.hzn-3d-crossword": { + source: "iana" + }, + "application/vnd.ibm.afplinedata": { + source: "iana" + }, + "application/vnd.ibm.electronic-media": { + source: "iana" + }, + "application/vnd.ibm.minipay": { + source: "iana", + extensions: ["mpy"] + }, + "application/vnd.ibm.modcap": { + source: "iana", + extensions: ["afp", "listafp", "list3820"] + }, + "application/vnd.ibm.rights-management": { + source: "iana", + extensions: ["irm"] + }, + "application/vnd.ibm.secure-container": { + source: "iana", + extensions: ["sc"] + }, + "application/vnd.iccprofile": { + source: "iana", + extensions: ["icc", "icm"] + }, + "application/vnd.ieee.1905": { + source: "iana" + }, + "application/vnd.igloader": { + source: "iana", + extensions: ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + source: "iana", + compressible: false + }, + "application/vnd.imagemeter.image+zip": { + source: "iana", + compressible: false + }, + "application/vnd.immervision-ivp": { + source: "iana", + extensions: ["ivp"] + }, + "application/vnd.immervision-ivu": { + source: "iana", + extensions: ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + source: "iana" + }, + "application/vnd.ims.imsccv1p2": { + source: "iana" + }, + "application/vnd.ims.imsccv1p3": { + source: "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + source: "iana", + compressible: true + }, + "application/vnd.informedcontrol.rms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.informix-visionary": { + source: "iana" + }, + "application/vnd.infotech.project": { + source: "iana" + }, + "application/vnd.infotech.project+xml": { + source: "iana", + compressible: true + }, + "application/vnd.innopath.wamp.notification": { + source: "iana" + }, + "application/vnd.insors.igm": { + source: "iana", + extensions: ["igm"] + }, + "application/vnd.intercon.formnet": { + source: "iana", + extensions: ["xpw", "xpx"] + }, + "application/vnd.intergeo": { + source: "iana", + extensions: ["i2g"] + }, + "application/vnd.intertrust.digibox": { + source: "iana" + }, + "application/vnd.intertrust.nncp": { + source: "iana" + }, + "application/vnd.intu.qbo": { + source: "iana", + extensions: ["qbo"] + }, + "application/vnd.intu.qfx": { + source: "iana", + extensions: ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.packageitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.planningitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ipunplugged.rcprofile": { + source: "iana", + extensions: ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + source: "iana", + compressible: true, + extensions: ["irp"] + }, + "application/vnd.is-xpr": { + source: "iana", + extensions: ["xpr"] + }, + "application/vnd.isac.fcs": { + source: "iana", + extensions: ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + source: "iana", + compressible: false + }, + "application/vnd.jam": { + source: "iana", + extensions: ["jam"] + }, + "application/vnd.japannet-directory-service": { + source: "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-payment-wakeup": { + source: "iana" + }, + "application/vnd.japannet-registration": { + source: "iana" + }, + "application/vnd.japannet-registration-wakeup": { + source: "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-verification": { + source: "iana" + }, + "application/vnd.japannet-verification-wakeup": { + source: "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + source: "iana", + extensions: ["rms"] + }, + "application/vnd.jisp": { + source: "iana", + extensions: ["jisp"] + }, + "application/vnd.joost.joda-archive": { + source: "iana", + extensions: ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + source: "iana" + }, + "application/vnd.kahootz": { + source: "iana", + extensions: ["ktz", "ktr"] + }, + "application/vnd.kde.karbon": { + source: "iana", + extensions: ["karbon"] + }, + "application/vnd.kde.kchart": { + source: "iana", + extensions: ["chrt"] + }, + "application/vnd.kde.kformula": { + source: "iana", + extensions: ["kfo"] + }, + "application/vnd.kde.kivio": { + source: "iana", + extensions: ["flw"] + }, + "application/vnd.kde.kontour": { + source: "iana", + extensions: ["kon"] + }, + "application/vnd.kde.kpresenter": { + source: "iana", + extensions: ["kpr", "kpt"] + }, + "application/vnd.kde.kspread": { + source: "iana", + extensions: ["ksp"] + }, + "application/vnd.kde.kword": { + source: "iana", + extensions: ["kwd", "kwt"] + }, + "application/vnd.kenameaapp": { + source: "iana", + extensions: ["htke"] + }, + "application/vnd.kidspiration": { + source: "iana", + extensions: ["kia"] + }, + "application/vnd.kinar": { + source: "iana", + extensions: ["kne", "knp"] + }, + "application/vnd.koan": { + source: "iana", + extensions: ["skp", "skd", "skt", "skm"] + }, + "application/vnd.kodak-descriptor": { + source: "iana", + extensions: ["sse"] + }, + "application/vnd.las": { + source: "iana" + }, + "application/vnd.las.las+json": { + source: "iana", + compressible: true + }, + "application/vnd.las.las+xml": { + source: "iana", + compressible: true, + extensions: ["lasxml"] + }, + "application/vnd.laszip": { + source: "iana" + }, + "application/vnd.leap+json": { + source: "iana", + compressible: true + }, + "application/vnd.liberty-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + source: "iana", + extensions: ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + source: "iana", + compressible: true, + extensions: ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + source: "iana", + compressible: false + }, + "application/vnd.loom": { + source: "iana" + }, + "application/vnd.lotus-1-2-3": { + source: "iana", + extensions: ["123"] + }, + "application/vnd.lotus-approach": { + source: "iana", + extensions: ["apr"] + }, + "application/vnd.lotus-freelance": { + source: "iana", + extensions: ["pre"] + }, + "application/vnd.lotus-notes": { + source: "iana", + extensions: ["nsf"] + }, + "application/vnd.lotus-organizer": { + source: "iana", + extensions: ["org"] + }, + "application/vnd.lotus-screencam": { + source: "iana", + extensions: ["scm"] + }, + "application/vnd.lotus-wordpro": { + source: "iana", + extensions: ["lwp"] + }, + "application/vnd.macports.portpkg": { + source: "iana", + extensions: ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + source: "iana", + extensions: ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.conftoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.license+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.mdcf": { + source: "iana" + }, + "application/vnd.mason+json": { + source: "iana", + compressible: true + }, + "application/vnd.maxar.archive.3tz+zip": { + source: "iana", + compressible: false + }, + "application/vnd.maxmind.maxmind-db": { + source: "iana" + }, + "application/vnd.mcd": { + source: "iana", + extensions: ["mcd"] + }, + "application/vnd.medcalcdata": { + source: "iana", + extensions: ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + source: "iana", + extensions: ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + source: "iana" + }, + "application/vnd.mfer": { + source: "iana", + extensions: ["mwf"] + }, + "application/vnd.mfmp": { + source: "iana", + extensions: ["mfm"] + }, + "application/vnd.micro+json": { + source: "iana", + compressible: true + }, + "application/vnd.micrografx.flo": { + source: "iana", + extensions: ["flo"] + }, + "application/vnd.micrografx.igx": { + source: "iana", + extensions: ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + source: "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + source: "iana" + }, + "application/vnd.miele+json": { + source: "iana", + compressible: true + }, + "application/vnd.mif": { + source: "iana", + extensions: ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + source: "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + source: "iana" + }, + "application/vnd.mobius.daf": { + source: "iana", + extensions: ["daf"] + }, + "application/vnd.mobius.dis": { + source: "iana", + extensions: ["dis"] + }, + "application/vnd.mobius.mbk": { + source: "iana", + extensions: ["mbk"] + }, + "application/vnd.mobius.mqy": { + source: "iana", + extensions: ["mqy"] + }, + "application/vnd.mobius.msl": { + source: "iana", + extensions: ["msl"] + }, + "application/vnd.mobius.plc": { + source: "iana", + extensions: ["plc"] + }, + "application/vnd.mobius.txf": { + source: "iana", + extensions: ["txf"] + }, + "application/vnd.mophun.application": { + source: "iana", + extensions: ["mpn"] + }, + "application/vnd.mophun.certificate": { + source: "iana", + extensions: ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + source: "iana" + }, + "application/vnd.motorola.iprm": { + source: "iana" + }, + "application/vnd.mozilla.xul+xml": { + source: "iana", + compressible: true, + extensions: ["xul"] + }, + "application/vnd.ms-3mfdocument": { + source: "iana" + }, + "application/vnd.ms-artgalry": { + source: "iana", + extensions: ["cil"] + }, + "application/vnd.ms-asf": { + source: "iana" + }, + "application/vnd.ms-cab-compressed": { + source: "iana", + extensions: ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + source: "apache" + }, + "application/vnd.ms-excel": { + source: "iana", + compressible: false, + extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + source: "iana", + extensions: ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + source: "iana", + extensions: ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + source: "iana", + extensions: ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + source: "iana", + extensions: ["xltm"] + }, + "application/vnd.ms-fontobject": { + source: "iana", + compressible: true, + extensions: ["eot"] + }, + "application/vnd.ms-htmlhelp": { + source: "iana", + extensions: ["chm"] + }, + "application/vnd.ms-ims": { + source: "iana", + extensions: ["ims"] + }, + "application/vnd.ms-lrm": { + source: "iana", + extensions: ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-officetheme": { + source: "iana", + extensions: ["thmx"] + }, + "application/vnd.ms-opentype": { + source: "apache", + compressible: true + }, + "application/vnd.ms-outlook": { + compressible: false, + extensions: ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + source: "apache" + }, + "application/vnd.ms-pki.seccat": { + source: "apache", + extensions: ["cat"] + }, + "application/vnd.ms-pki.stl": { + source: "apache", + extensions: ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-powerpoint": { + source: "iana", + compressible: false, + extensions: ["ppt", "pps", "pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + source: "iana", + extensions: ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + source: "iana", + extensions: ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + source: "iana", + extensions: ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + source: "iana", + extensions: ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + source: "iana", + extensions: ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-printing.printticket+xml": { + source: "apache", + compressible: true + }, + "application/vnd.ms-printschematicket+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-project": { + source: "iana", + extensions: ["mpp", "mpt"] + }, + "application/vnd.ms-tnef": { + source: "iana" + }, + "application/vnd.ms-windows.devicepairing": { + source: "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + source: "iana" + }, + "application/vnd.ms-windows.printerpairing": { + source: "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + source: "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + source: "iana", + extensions: ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + source: "iana", + extensions: ["dotm"] + }, + "application/vnd.ms-works": { + source: "iana", + extensions: ["wps", "wks", "wcm", "wdb"] + }, + "application/vnd.ms-wpl": { + source: "iana", + extensions: ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + source: "iana", + compressible: false, + extensions: ["xps"] + }, + "application/vnd.msa-disk-image": { + source: "iana" + }, + "application/vnd.mseq": { + source: "iana", + extensions: ["mseq"] + }, + "application/vnd.msign": { + source: "iana" + }, + "application/vnd.multiad.creator": { + source: "iana" + }, + "application/vnd.multiad.creator.cif": { + source: "iana" + }, + "application/vnd.music-niff": { + source: "iana" + }, + "application/vnd.musician": { + source: "iana", + extensions: ["mus"] + }, + "application/vnd.muvee.style": { + source: "iana", + extensions: ["msty"] + }, + "application/vnd.mynfc": { + source: "iana", + extensions: ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + source: "iana", + compressible: true + }, + "application/vnd.ncd.control": { + source: "iana" + }, + "application/vnd.ncd.reference": { + source: "iana" + }, + "application/vnd.nearst.inv+json": { + source: "iana", + compressible: true + }, + "application/vnd.nebumind.line": { + source: "iana" + }, + "application/vnd.nervana": { + source: "iana" + }, + "application/vnd.netfpx": { + source: "iana" + }, + "application/vnd.neurolanguage.nlu": { + source: "iana", + extensions: ["nlu"] + }, + "application/vnd.nimn": { + source: "iana" + }, + "application/vnd.nintendo.nitro.rom": { + source: "iana" + }, + "application/vnd.nintendo.snes.rom": { + source: "iana" + }, + "application/vnd.nitf": { + source: "iana", + extensions: ["ntf", "nitf"] + }, + "application/vnd.noblenet-directory": { + source: "iana", + extensions: ["nnd"] + }, + "application/vnd.noblenet-sealer": { + source: "iana", + extensions: ["nns"] + }, + "application/vnd.noblenet-web": { + source: "iana", + extensions: ["nnw"] + }, + "application/vnd.nokia.catalogs": { + source: "iana" + }, + "application/vnd.nokia.conml+wbxml": { + source: "iana" + }, + "application/vnd.nokia.conml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.iptv.config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.isds-radio-presets": { + source: "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + source: "iana" + }, + "application/vnd.nokia.landmark+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.landmarkcollection+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.n-gage.ac+xml": { + source: "iana", + compressible: true, + extensions: ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + source: "iana", + extensions: ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + source: "iana", + extensions: ["n-gage"] + }, + "application/vnd.nokia.ncd": { + source: "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + source: "iana" + }, + "application/vnd.nokia.pcd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.radio-preset": { + source: "iana", + extensions: ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + source: "iana", + extensions: ["rpss"] + }, + "application/vnd.novadigm.edm": { + source: "iana", + extensions: ["edm"] + }, + "application/vnd.novadigm.edx": { + source: "iana", + extensions: ["edx"] + }, + "application/vnd.novadigm.ext": { + source: "iana", + extensions: ["ext"] + }, + "application/vnd.ntt-local.content-share": { + source: "iana" + }, + "application/vnd.ntt-local.file-transfer": { + source: "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + source: "iana" + }, + "application/vnd.oasis.opendocument.chart": { + source: "iana", + extensions: ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + source: "iana", + extensions: ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + source: "iana", + extensions: ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + source: "iana", + extensions: ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + source: "iana", + extensions: ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + source: "iana", + compressible: false, + extensions: ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + source: "iana", + extensions: ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + source: "iana", + extensions: ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + source: "iana", + extensions: ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + source: "iana", + compressible: false, + extensions: ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + source: "iana", + extensions: ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + source: "iana", + compressible: false, + extensions: ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + source: "iana", + extensions: ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + source: "iana", + compressible: false, + extensions: ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + source: "iana", + extensions: ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + source: "iana", + extensions: ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + source: "iana", + extensions: ["oth"] + }, + "application/vnd.obn": { + source: "iana" + }, + "application/vnd.ocf+cbor": { + source: "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + source: "iana", + compressible: true + }, + "application/vnd.oftn.l10n+json": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.cspg-hexbinary": { + source: "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.dae.xhtml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.pae.gem": { + source: "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.spdlist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.ueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.userprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.olpc-sugar": { + source: "iana", + extensions: ["xo"] + }, + "application/vnd.oma-scws-config": { + source: "iana" + }, + "application/vnd.oma-scws-http-request": { + source: "iana" + }, + "application/vnd.oma-scws-http-response": { + source: "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.imd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.ltkm": { + source: "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + source: "iana" + }, + "application/vnd.oma.bcast.sgboot": { + source: "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sgdu": { + source: "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + source: "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sprov+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.stkm": { + source: "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-feature-handler+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-pcc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-subs-invite+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-user-prefs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.dcd": { + source: "iana" + }, + "application/vnd.oma.dcdc": { + source: "iana" + }, + "application/vnd.oma.dd2+xml": { + source: "iana", + compressible: true, + extensions: ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.group-usage-list+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+cbor": { + source: "iana" + }, + "application/vnd.oma.lwm2m+json": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+tlv": { + source: "iana" + }, + "application/vnd.oma.pal+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.final-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.groups+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.push": { + source: "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.xcap-directory+xml": { + source: "iana", + compressible: true + }, + "application/vnd.omads-email+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-file+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-folder+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omaloc-supl-init": { + source: "iana" + }, + "application/vnd.onepager": { + source: "iana" + }, + "application/vnd.onepagertamp": { + source: "iana" + }, + "application/vnd.onepagertamx": { + source: "iana" + }, + "application/vnd.onepagertat": { + source: "iana" + }, + "application/vnd.onepagertatp": { + source: "iana" + }, + "application/vnd.onepagertatx": { + source: "iana" + }, + "application/vnd.openblox.game+xml": { + source: "iana", + compressible: true, + extensions: ["obgx"] + }, + "application/vnd.openblox.game-binary": { + source: "iana" + }, + "application/vnd.openeye.oeb": { + source: "iana" + }, + "application/vnd.openofficeorg.extension": { + source: "apache", + extensions: ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + source: "iana", + compressible: true, + extensions: ["osm"] + }, + "application/vnd.opentimestamps.ots": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + source: "iana", + compressible: false, + extensions: ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + source: "iana", + extensions: ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + source: "iana", + extensions: ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + source: "iana", + extensions: ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + source: "iana", + compressible: false, + extensions: ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + source: "iana", + extensions: ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + source: "iana", + compressible: false, + extensions: ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + source: "iana", + extensions: ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oracle.resource+json": { + source: "iana", + compressible: true + }, + "application/vnd.orange.indata": { + source: "iana" + }, + "application/vnd.osa.netdeploy": { + source: "iana" + }, + "application/vnd.osgeo.mapguide.package": { + source: "iana", + extensions: ["mgp"] + }, + "application/vnd.osgi.bundle": { + source: "iana" + }, + "application/vnd.osgi.dp": { + source: "iana", + extensions: ["dp"] + }, + "application/vnd.osgi.subsystem": { + source: "iana", + extensions: ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oxli.countgraph": { + source: "iana" + }, + "application/vnd.pagerduty+json": { + source: "iana", + compressible: true + }, + "application/vnd.palm": { + source: "iana", + extensions: ["pdb", "pqa", "oprc"] + }, + "application/vnd.panoply": { + source: "iana" + }, + "application/vnd.paos.xml": { + source: "iana" + }, + "application/vnd.patentdive": { + source: "iana" + }, + "application/vnd.patientecommsdoc": { + source: "iana" + }, + "application/vnd.pawaafile": { + source: "iana", + extensions: ["paw"] + }, + "application/vnd.pcos": { + source: "iana" + }, + "application/vnd.pg.format": { + source: "iana", + extensions: ["str"] + }, + "application/vnd.pg.osasli": { + source: "iana", + extensions: ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + source: "iana" + }, + "application/vnd.picsel": { + source: "iana", + extensions: ["efif"] + }, + "application/vnd.pmi.widget": { + source: "iana", + extensions: ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + source: "iana", + compressible: true + }, + "application/vnd.pocketlearn": { + source: "iana", + extensions: ["plf"] + }, + "application/vnd.powerbuilder6": { + source: "iana", + extensions: ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + source: "iana" + }, + "application/vnd.powerbuilder7": { + source: "iana" + }, + "application/vnd.powerbuilder7-s": { + source: "iana" + }, + "application/vnd.powerbuilder75": { + source: "iana" + }, + "application/vnd.powerbuilder75-s": { + source: "iana" + }, + "application/vnd.preminet": { + source: "iana" + }, + "application/vnd.previewsystems.box": { + source: "iana", + extensions: ["box"] + }, + "application/vnd.proteus.magazine": { + source: "iana", + extensions: ["mgz"] + }, + "application/vnd.psfs": { + source: "iana" + }, + "application/vnd.publishare-delta-tree": { + source: "iana", + extensions: ["qps"] + }, + "application/vnd.pvi.ptid1": { + source: "iana", + extensions: ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + source: "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + source: "iana", + compressible: true + }, + "application/vnd.qualcomm.brew-app-res": { + source: "iana" + }, + "application/vnd.quarantainenet": { + source: "iana" + }, + "application/vnd.quark.quarkxpress": { + source: "iana", + extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] + }, + "application/vnd.quobject-quoxdocument": { + source: "iana" + }, + "application/vnd.radisys.moml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + source: "iana", + compressible: true + }, + "application/vnd.rainstor.data": { + source: "iana" + }, + "application/vnd.rapid": { + source: "iana" + }, + "application/vnd.rar": { + source: "iana", + extensions: ["rar"] + }, + "application/vnd.realvnc.bed": { + source: "iana", + extensions: ["bed"] + }, + "application/vnd.recordare.musicxml": { + source: "iana", + extensions: ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + source: "iana", + compressible: true, + extensions: ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + source: "iana" + }, + "application/vnd.resilient.logic": { + source: "iana" + }, + "application/vnd.restful+json": { + source: "iana", + compressible: true + }, + "application/vnd.rig.cryptonote": { + source: "iana", + extensions: ["cryptonote"] + }, + "application/vnd.rim.cod": { + source: "apache", + extensions: ["cod"] + }, + "application/vnd.rn-realmedia": { + source: "apache", + extensions: ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + source: "apache", + extensions: ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + source: "iana", + compressible: true, + extensions: ["link66"] + }, + "application/vnd.rs-274x": { + source: "iana" + }, + "application/vnd.ruckus.download": { + source: "iana" + }, + "application/vnd.s3sms": { + source: "iana" + }, + "application/vnd.sailingtracker.track": { + source: "iana", + extensions: ["st"] + }, + "application/vnd.sar": { + source: "iana" + }, + "application/vnd.sbm.cid": { + source: "iana" + }, + "application/vnd.sbm.mid2": { + source: "iana" + }, + "application/vnd.scribus": { + source: "iana" + }, + "application/vnd.sealed.3df": { + source: "iana" + }, + "application/vnd.sealed.csf": { + source: "iana" + }, + "application/vnd.sealed.doc": { + source: "iana" + }, + "application/vnd.sealed.eml": { + source: "iana" + }, + "application/vnd.sealed.mht": { + source: "iana" + }, + "application/vnd.sealed.net": { + source: "iana" + }, + "application/vnd.sealed.ppt": { + source: "iana" + }, + "application/vnd.sealed.tiff": { + source: "iana" + }, + "application/vnd.sealed.xls": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + source: "iana" + }, + "application/vnd.seemail": { + source: "iana", + extensions: ["see"] + }, + "application/vnd.seis+json": { + source: "iana", + compressible: true + }, + "application/vnd.sema": { + source: "iana", + extensions: ["sema"] + }, + "application/vnd.semd": { + source: "iana", + extensions: ["semd"] + }, + "application/vnd.semf": { + source: "iana", + extensions: ["semf"] + }, + "application/vnd.shade-save-file": { + source: "iana" + }, + "application/vnd.shana.informed.formdata": { + source: "iana", + extensions: ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + source: "iana", + extensions: ["itp"] + }, + "application/vnd.shana.informed.interchange": { + source: "iana", + extensions: ["iif"] + }, + "application/vnd.shana.informed.package": { + source: "iana", + extensions: ["ipk"] + }, + "application/vnd.shootproof+json": { + source: "iana", + compressible: true + }, + "application/vnd.shopkick+json": { + source: "iana", + compressible: true + }, + "application/vnd.shp": { + source: "iana" + }, + "application/vnd.shx": { + source: "iana" + }, + "application/vnd.sigrok.session": { + source: "iana" + }, + "application/vnd.simtech-mindmapper": { + source: "iana", + extensions: ["twd", "twds"] + }, + "application/vnd.siren+json": { + source: "iana", + compressible: true + }, + "application/vnd.smaf": { + source: "iana", + extensions: ["mmf"] + }, + "application/vnd.smart.notebook": { + source: "iana" + }, + "application/vnd.smart.teacher": { + source: "iana", + extensions: ["teacher"] + }, + "application/vnd.snesdev-page-table": { + source: "iana" + }, + "application/vnd.software602.filler.form+xml": { + source: "iana", + compressible: true, + extensions: ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + source: "iana" + }, + "application/vnd.solent.sdkm+xml": { + source: "iana", + compressible: true, + extensions: ["sdkm", "sdkd"] + }, + "application/vnd.spotfire.dxp": { + source: "iana", + extensions: ["dxp"] + }, + "application/vnd.spotfire.sfs": { + source: "iana", + extensions: ["sfs"] + }, + "application/vnd.sqlite3": { + source: "iana" + }, + "application/vnd.sss-cod": { + source: "iana" + }, + "application/vnd.sss-dtf": { + source: "iana" + }, + "application/vnd.sss-ntf": { + source: "iana" + }, + "application/vnd.stardivision.calc": { + source: "apache", + extensions: ["sdc"] + }, + "application/vnd.stardivision.draw": { + source: "apache", + extensions: ["sda"] + }, + "application/vnd.stardivision.impress": { + source: "apache", + extensions: ["sdd"] + }, + "application/vnd.stardivision.math": { + source: "apache", + extensions: ["smf"] + }, + "application/vnd.stardivision.writer": { + source: "apache", + extensions: ["sdw", "vor"] + }, + "application/vnd.stardivision.writer-global": { + source: "apache", + extensions: ["sgl"] + }, + "application/vnd.stepmania.package": { + source: "iana", + extensions: ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + source: "iana", + extensions: ["sm"] + }, + "application/vnd.street-stream": { + source: "iana" + }, + "application/vnd.sun.wadl+xml": { + source: "iana", + compressible: true, + extensions: ["wadl"] + }, + "application/vnd.sun.xml.calc": { + source: "apache", + extensions: ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + source: "apache", + extensions: ["stc"] + }, + "application/vnd.sun.xml.draw": { + source: "apache", + extensions: ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + source: "apache", + extensions: ["std"] + }, + "application/vnd.sun.xml.impress": { + source: "apache", + extensions: ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + source: "apache", + extensions: ["sti"] + }, + "application/vnd.sun.xml.math": { + source: "apache", + extensions: ["sxm"] + }, + "application/vnd.sun.xml.writer": { + source: "apache", + extensions: ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + source: "apache", + extensions: ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + source: "apache", + extensions: ["stw"] + }, + "application/vnd.sus-calendar": { + source: "iana", + extensions: ["sus", "susp"] + }, + "application/vnd.svd": { + source: "iana", + extensions: ["svd"] + }, + "application/vnd.swiftview-ics": { + source: "iana" + }, + "application/vnd.sycle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.syft+json": { + source: "iana", + compressible: true + }, + "application/vnd.symbian.install": { + source: "apache", + extensions: ["sis", "sisx"] + }, + "application/vnd.syncml+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + source: "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmddf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.syncml.ds.notification": { + source: "iana" + }, + "application/vnd.tableschema+json": { + source: "iana", + compressible: true + }, + "application/vnd.tao.intent-module-archive": { + source: "iana", + extensions: ["tao"] + }, + "application/vnd.tcpdump.pcap": { + source: "iana", + extensions: ["pcap", "cap", "dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + source: "iana", + compressible: true + }, + "application/vnd.tmd.mediaflex.api+xml": { + source: "iana", + compressible: true + }, + "application/vnd.tml": { + source: "iana" + }, + "application/vnd.tmobile-livetv": { + source: "iana", + extensions: ["tmo"] + }, + "application/vnd.tri.onesource": { + source: "iana" + }, + "application/vnd.trid.tpt": { + source: "iana", + extensions: ["tpt"] + }, + "application/vnd.triscape.mxs": { + source: "iana", + extensions: ["mxs"] + }, + "application/vnd.trueapp": { + source: "iana", + extensions: ["tra"] + }, + "application/vnd.truedoc": { + source: "iana" + }, + "application/vnd.ubisoft.webplayer": { + source: "iana" + }, + "application/vnd.ufdl": { + source: "iana", + extensions: ["ufd", "ufdl"] + }, + "application/vnd.uiq.theme": { + source: "iana", + extensions: ["utz"] + }, + "application/vnd.umajin": { + source: "iana", + extensions: ["umj"] + }, + "application/vnd.unity": { + source: "iana", + extensions: ["unityweb"] + }, + "application/vnd.uoml+xml": { + source: "iana", + compressible: true, + extensions: ["uoml"] + }, + "application/vnd.uplanet.alert": { + source: "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.cacheop": { + source: "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.channel": { + source: "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.list": { + source: "iana" + }, + "application/vnd.uplanet.list-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.listcmd": { + source: "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.signal": { + source: "iana" + }, + "application/vnd.uri-map": { + source: "iana" + }, + "application/vnd.valve.source.material": { + source: "iana" + }, + "application/vnd.vcx": { + source: "iana", + extensions: ["vcx"] + }, + "application/vnd.vd-study": { + source: "iana" + }, + "application/vnd.vectorworks": { + source: "iana" + }, + "application/vnd.vel+json": { + source: "iana", + compressible: true + }, + "application/vnd.verimatrix.vcas": { + source: "iana" + }, + "application/vnd.veritone.aion+json": { + source: "iana", + compressible: true + }, + "application/vnd.veryant.thin": { + source: "iana" + }, + "application/vnd.ves.encrypted": { + source: "iana" + }, + "application/vnd.vidsoft.vidconference": { + source: "iana" + }, + "application/vnd.visio": { + source: "iana", + extensions: ["vsd", "vst", "vss", "vsw"] + }, + "application/vnd.visionary": { + source: "iana", + extensions: ["vis"] + }, + "application/vnd.vividence.scriptfile": { + source: "iana" + }, + "application/vnd.vsf": { + source: "iana", + extensions: ["vsf"] + }, + "application/vnd.wap.sic": { + source: "iana" + }, + "application/vnd.wap.slc": { + source: "iana" + }, + "application/vnd.wap.wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["wbxml"] + }, + "application/vnd.wap.wmlc": { + source: "iana", + extensions: ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + source: "iana", + extensions: ["wmlsc"] + }, + "application/vnd.webturbo": { + source: "iana", + extensions: ["wtb"] + }, + "application/vnd.wfa.dpp": { + source: "iana" + }, + "application/vnd.wfa.p2p": { + source: "iana" + }, + "application/vnd.wfa.wsc": { + source: "iana" + }, + "application/vnd.windows.devicepairing": { + source: "iana" + }, + "application/vnd.wmc": { + source: "iana" + }, + "application/vnd.wmf.bootstrap": { + source: "iana" + }, + "application/vnd.wolfram.mathematica": { + source: "iana" + }, + "application/vnd.wolfram.mathematica.package": { + source: "iana" + }, + "application/vnd.wolfram.player": { + source: "iana", + extensions: ["nbp"] + }, + "application/vnd.wordperfect": { + source: "iana", + extensions: ["wpd"] + }, + "application/vnd.wqd": { + source: "iana", + extensions: ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + source: "iana" + }, + "application/vnd.wt.stf": { + source: "iana", + extensions: ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + source: "iana" + }, + "application/vnd.wv.csp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.wv.ssp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xacml+json": { + source: "iana", + compressible: true + }, + "application/vnd.xara": { + source: "iana", + extensions: ["xar"] + }, + "application/vnd.xfdl": { + source: "iana", + extensions: ["xfdl"] + }, + "application/vnd.xfdl.webform": { + source: "iana" + }, + "application/vnd.xmi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xmpie.cpkg": { + source: "iana" + }, + "application/vnd.xmpie.dpkg": { + source: "iana" + }, + "application/vnd.xmpie.plan": { + source: "iana" + }, + "application/vnd.xmpie.ppkg": { + source: "iana" + }, + "application/vnd.xmpie.xlim": { + source: "iana" + }, + "application/vnd.yamaha.hv-dic": { + source: "iana", + extensions: ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + source: "iana", + extensions: ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + source: "iana", + extensions: ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + source: "iana", + extensions: ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + source: "iana", + compressible: true, + extensions: ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + source: "iana" + }, + "application/vnd.yamaha.smaf-audio": { + source: "iana", + extensions: ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + source: "iana", + extensions: ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + source: "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + source: "iana" + }, + "application/vnd.yaoweme": { + source: "iana" + }, + "application/vnd.yellowriver-custom-menu": { + source: "iana", + extensions: ["cmp"] + }, + "application/vnd.youtube.yt": { + source: "iana" + }, + "application/vnd.zul": { + source: "iana", + extensions: ["zir", "zirz"] + }, + "application/vnd.zzazz.deck+xml": { + source: "iana", + compressible: true, + extensions: ["zaz"] + }, + "application/voicexml+xml": { + source: "iana", + compressible: true, + extensions: ["vxml"] + }, + "application/voucher-cms+json": { + source: "iana", + compressible: true + }, + "application/vq-rtcpxr": { + source: "iana" + }, + "application/wasm": { + source: "iana", + compressible: true, + extensions: ["wasm"] + }, + "application/watcherinfo+xml": { + source: "iana", + compressible: true, + extensions: ["wif"] + }, + "application/webpush-options+json": { + source: "iana", + compressible: true + }, + "application/whoispp-query": { + source: "iana" + }, + "application/whoispp-response": { + source: "iana" + }, + "application/widget": { + source: "iana", + extensions: ["wgt"] + }, + "application/winhlp": { + source: "apache", + extensions: ["hlp"] + }, + "application/wita": { + source: "iana" + }, + "application/wordperfect5.1": { + source: "iana" + }, + "application/wsdl+xml": { + source: "iana", + compressible: true, + extensions: ["wsdl"] + }, + "application/wspolicy+xml": { + source: "iana", + compressible: true, + extensions: ["wspolicy"] + }, + "application/x-7z-compressed": { + source: "apache", + compressible: false, + extensions: ["7z"] + }, + "application/x-abiword": { + source: "apache", + extensions: ["abw"] + }, + "application/x-ace-compressed": { + source: "apache", + extensions: ["ace"] + }, + "application/x-amf": { + source: "apache" + }, + "application/x-apple-diskimage": { + source: "apache", + extensions: ["dmg"] + }, + "application/x-arj": { + compressible: false, + extensions: ["arj"] + }, + "application/x-authorware-bin": { + source: "apache", + extensions: ["aab", "x32", "u32", "vox"] + }, + "application/x-authorware-map": { + source: "apache", + extensions: ["aam"] + }, + "application/x-authorware-seg": { + source: "apache", + extensions: ["aas"] + }, + "application/x-bcpio": { + source: "apache", + extensions: ["bcpio"] + }, + "application/x-bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/x-bittorrent": { + source: "apache", + extensions: ["torrent"] + }, + "application/x-blorb": { + source: "apache", + extensions: ["blb", "blorb"] + }, + "application/x-bzip": { + source: "apache", + compressible: false, + extensions: ["bz"] + }, + "application/x-bzip2": { + source: "apache", + compressible: false, + extensions: ["bz2", "boz"] + }, + "application/x-cbr": { + source: "apache", + extensions: ["cbr", "cba", "cbt", "cbz", "cb7"] + }, + "application/x-cdlink": { + source: "apache", + extensions: ["vcd"] + }, + "application/x-cfs-compressed": { + source: "apache", + extensions: ["cfs"] + }, + "application/x-chat": { + source: "apache", + extensions: ["chat"] + }, + "application/x-chess-pgn": { + source: "apache", + extensions: ["pgn"] + }, + "application/x-chrome-extension": { + extensions: ["crx"] + }, + "application/x-cocoa": { + source: "nginx", + extensions: ["cco"] + }, + "application/x-compress": { + source: "apache" + }, + "application/x-conference": { + source: "apache", + extensions: ["nsc"] + }, + "application/x-cpio": { + source: "apache", + extensions: ["cpio"] + }, + "application/x-csh": { + source: "apache", + extensions: ["csh"] + }, + "application/x-deb": { + compressible: false + }, + "application/x-debian-package": { + source: "apache", + extensions: ["deb", "udeb"] + }, + "application/x-dgc-compressed": { + source: "apache", + extensions: ["dgc"] + }, + "application/x-director": { + source: "apache", + extensions: ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] + }, + "application/x-doom": { + source: "apache", + extensions: ["wad"] + }, + "application/x-dtbncx+xml": { + source: "apache", + compressible: true, + extensions: ["ncx"] + }, + "application/x-dtbook+xml": { + source: "apache", + compressible: true, + extensions: ["dtb"] + }, + "application/x-dtbresource+xml": { + source: "apache", + compressible: true, + extensions: ["res"] + }, + "application/x-dvi": { + source: "apache", + compressible: false, + extensions: ["dvi"] + }, + "application/x-envoy": { + source: "apache", + extensions: ["evy"] + }, + "application/x-eva": { + source: "apache", + extensions: ["eva"] + }, + "application/x-font-bdf": { + source: "apache", + extensions: ["bdf"] + }, + "application/x-font-dos": { + source: "apache" + }, + "application/x-font-framemaker": { + source: "apache" + }, + "application/x-font-ghostscript": { + source: "apache", + extensions: ["gsf"] + }, + "application/x-font-libgrx": { + source: "apache" + }, + "application/x-font-linux-psf": { + source: "apache", + extensions: ["psf"] + }, + "application/x-font-pcf": { + source: "apache", + extensions: ["pcf"] + }, + "application/x-font-snf": { + source: "apache", + extensions: ["snf"] + }, + "application/x-font-speedo": { + source: "apache" + }, + "application/x-font-sunos-news": { + source: "apache" + }, + "application/x-font-type1": { + source: "apache", + extensions: ["pfa", "pfb", "pfm", "afm"] + }, + "application/x-font-vfont": { + source: "apache" + }, + "application/x-freearc": { + source: "apache", + extensions: ["arc"] + }, + "application/x-futuresplash": { + source: "apache", + extensions: ["spl"] + }, + "application/x-gca-compressed": { + source: "apache", + extensions: ["gca"] + }, + "application/x-glulx": { + source: "apache", + extensions: ["ulx"] + }, + "application/x-gnumeric": { + source: "apache", + extensions: ["gnumeric"] + }, + "application/x-gramps-xml": { + source: "apache", + extensions: ["gramps"] + }, + "application/x-gtar": { + source: "apache", + extensions: ["gtar"] + }, + "application/x-gzip": { + source: "apache" + }, + "application/x-hdf": { + source: "apache", + extensions: ["hdf"] + }, + "application/x-httpd-php": { + compressible: true, + extensions: ["php"] + }, + "application/x-install-instructions": { + source: "apache", + extensions: ["install"] + }, + "application/x-iso9660-image": { + source: "apache", + extensions: ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + extensions: ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + extensions: ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + extensions: ["pages"] + }, + "application/x-java-archive-diff": { + source: "nginx", + extensions: ["jardiff"] + }, + "application/x-java-jnlp-file": { + source: "apache", + compressible: false, + extensions: ["jnlp"] + }, + "application/x-javascript": { + compressible: true + }, + "application/x-keepass2": { + extensions: ["kdbx"] + }, + "application/x-latex": { + source: "apache", + compressible: false, + extensions: ["latex"] + }, + "application/x-lua-bytecode": { + extensions: ["luac"] + }, + "application/x-lzh-compressed": { + source: "apache", + extensions: ["lzh", "lha"] + }, + "application/x-makeself": { + source: "nginx", + extensions: ["run"] + }, + "application/x-mie": { + source: "apache", + extensions: ["mie"] + }, + "application/x-mobipocket-ebook": { + source: "apache", + extensions: ["prc", "mobi"] + }, + "application/x-mpegurl": { + compressible: false + }, + "application/x-ms-application": { + source: "apache", + extensions: ["application"] + }, + "application/x-ms-shortcut": { + source: "apache", + extensions: ["lnk"] + }, + "application/x-ms-wmd": { + source: "apache", + extensions: ["wmd"] + }, + "application/x-ms-wmz": { + source: "apache", + extensions: ["wmz"] + }, + "application/x-ms-xbap": { + source: "apache", + extensions: ["xbap"] + }, + "application/x-msaccess": { + source: "apache", + extensions: ["mdb"] + }, + "application/x-msbinder": { + source: "apache", + extensions: ["obd"] + }, + "application/x-mscardfile": { + source: "apache", + extensions: ["crd"] + }, + "application/x-msclip": { + source: "apache", + extensions: ["clp"] + }, + "application/x-msdos-program": { + extensions: ["exe"] + }, + "application/x-msdownload": { + source: "apache", + extensions: ["exe", "dll", "com", "bat", "msi"] + }, + "application/x-msmediaview": { + source: "apache", + extensions: ["mvb", "m13", "m14"] + }, + "application/x-msmetafile": { + source: "apache", + extensions: ["wmf", "wmz", "emf", "emz"] + }, + "application/x-msmoney": { + source: "apache", + extensions: ["mny"] + }, + "application/x-mspublisher": { + source: "apache", + extensions: ["pub"] + }, + "application/x-msschedule": { + source: "apache", + extensions: ["scd"] + }, + "application/x-msterminal": { + source: "apache", + extensions: ["trm"] + }, + "application/x-mswrite": { + source: "apache", + extensions: ["wri"] + }, + "application/x-netcdf": { + source: "apache", + extensions: ["nc", "cdf"] + }, + "application/x-ns-proxy-autoconfig": { + compressible: true, + extensions: ["pac"] + }, + "application/x-nzb": { + source: "apache", + extensions: ["nzb"] + }, + "application/x-perl": { + source: "nginx", + extensions: ["pl", "pm"] + }, + "application/x-pilot": { + source: "nginx", + extensions: ["prc", "pdb"] + }, + "application/x-pkcs12": { + source: "apache", + compressible: false, + extensions: ["p12", "pfx"] + }, + "application/x-pkcs7-certificates": { + source: "apache", + extensions: ["p7b", "spc"] + }, + "application/x-pkcs7-certreqresp": { + source: "apache", + extensions: ["p7r"] + }, + "application/x-pki-message": { + source: "iana" + }, + "application/x-rar-compressed": { + source: "apache", + compressible: false, + extensions: ["rar"] + }, + "application/x-redhat-package-manager": { + source: "nginx", + extensions: ["rpm"] + }, + "application/x-research-info-systems": { + source: "apache", + extensions: ["ris"] + }, + "application/x-sea": { + source: "nginx", + extensions: ["sea"] + }, + "application/x-sh": { + source: "apache", + compressible: true, + extensions: ["sh"] + }, + "application/x-shar": { + source: "apache", + extensions: ["shar"] + }, + "application/x-shockwave-flash": { + source: "apache", + compressible: false, + extensions: ["swf"] + }, + "application/x-silverlight-app": { + source: "apache", + extensions: ["xap"] + }, + "application/x-sql": { + source: "apache", + extensions: ["sql"] + }, + "application/x-stuffit": { + source: "apache", + compressible: false, + extensions: ["sit"] + }, + "application/x-stuffitx": { + source: "apache", + extensions: ["sitx"] + }, + "application/x-subrip": { + source: "apache", + extensions: ["srt"] + }, + "application/x-sv4cpio": { + source: "apache", + extensions: ["sv4cpio"] + }, + "application/x-sv4crc": { + source: "apache", + extensions: ["sv4crc"] + }, + "application/x-t3vm-image": { + source: "apache", + extensions: ["t3"] + }, + "application/x-tads": { + source: "apache", + extensions: ["gam"] + }, + "application/x-tar": { + source: "apache", + compressible: true, + extensions: ["tar"] + }, + "application/x-tcl": { + source: "apache", + extensions: ["tcl", "tk"] + }, + "application/x-tex": { + source: "apache", + extensions: ["tex"] + }, + "application/x-tex-tfm": { + source: "apache", + extensions: ["tfm"] + }, + "application/x-texinfo": { + source: "apache", + extensions: ["texinfo", "texi"] + }, + "application/x-tgif": { + source: "apache", + extensions: ["obj"] + }, + "application/x-ustar": { + source: "apache", + extensions: ["ustar"] + }, + "application/x-virtualbox-hdd": { + compressible: true, + extensions: ["hdd"] + }, + "application/x-virtualbox-ova": { + compressible: true, + extensions: ["ova"] + }, + "application/x-virtualbox-ovf": { + compressible: true, + extensions: ["ovf"] + }, + "application/x-virtualbox-vbox": { + compressible: true, + extensions: ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + compressible: false, + extensions: ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + compressible: true, + extensions: ["vdi"] + }, + "application/x-virtualbox-vhd": { + compressible: true, + extensions: ["vhd"] + }, + "application/x-virtualbox-vmdk": { + compressible: true, + extensions: ["vmdk"] + }, + "application/x-wais-source": { + source: "apache", + extensions: ["src"] + }, + "application/x-web-app-manifest+json": { + compressible: true, + extensions: ["webapp"] + }, + "application/x-www-form-urlencoded": { + source: "iana", + compressible: true + }, + "application/x-x509-ca-cert": { + source: "iana", + extensions: ["der", "crt", "pem"] + }, + "application/x-x509-ca-ra-cert": { + source: "iana" + }, + "application/x-x509-next-ca-cert": { + source: "iana" + }, + "application/x-xfig": { + source: "apache", + extensions: ["fig"] + }, + "application/x-xliff+xml": { + source: "apache", + compressible: true, + extensions: ["xlf"] + }, + "application/x-xpinstall": { + source: "apache", + compressible: false, + extensions: ["xpi"] + }, + "application/x-xz": { + source: "apache", + extensions: ["xz"] + }, + "application/x-zmachine": { + source: "apache", + extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] + }, + "application/x400-bp": { + source: "iana" + }, + "application/xacml+xml": { + source: "iana", + compressible: true + }, + "application/xaml+xml": { + source: "apache", + compressible: true, + extensions: ["xaml"] + }, + "application/xcap-att+xml": { + source: "iana", + compressible: true, + extensions: ["xav"] + }, + "application/xcap-caps+xml": { + source: "iana", + compressible: true, + extensions: ["xca"] + }, + "application/xcap-diff+xml": { + source: "iana", + compressible: true, + extensions: ["xdf"] + }, + "application/xcap-el+xml": { + source: "iana", + compressible: true, + extensions: ["xel"] + }, + "application/xcap-error+xml": { + source: "iana", + compressible: true + }, + "application/xcap-ns+xml": { + source: "iana", + compressible: true, + extensions: ["xns"] + }, + "application/xcon-conference-info+xml": { + source: "iana", + compressible: true + }, + "application/xcon-conference-info-diff+xml": { + source: "iana", + compressible: true + }, + "application/xenc+xml": { + source: "iana", + compressible: true, + extensions: ["xenc"] + }, + "application/xhtml+xml": { + source: "iana", + compressible: true, + extensions: ["xhtml", "xht"] + }, + "application/xhtml-voice+xml": { + source: "apache", + compressible: true + }, + "application/xliff+xml": { + source: "iana", + compressible: true, + extensions: ["xlf"] + }, + "application/xml": { + source: "iana", + compressible: true, + extensions: ["xml", "xsl", "xsd", "rng"] + }, + "application/xml-dtd": { + source: "iana", + compressible: true, + extensions: ["dtd"] + }, + "application/xml-external-parsed-entity": { + source: "iana" + }, + "application/xml-patch+xml": { + source: "iana", + compressible: true + }, + "application/xmpp+xml": { + source: "iana", + compressible: true + }, + "application/xop+xml": { + source: "iana", + compressible: true, + extensions: ["xop"] + }, + "application/xproc+xml": { + source: "apache", + compressible: true, + extensions: ["xpl"] + }, + "application/xslt+xml": { + source: "iana", + compressible: true, + extensions: ["xsl", "xslt"] + }, + "application/xspf+xml": { + source: "apache", + compressible: true, + extensions: ["xspf"] + }, + "application/xv+xml": { + source: "iana", + compressible: true, + extensions: ["mxml", "xhvml", "xvml", "xvm"] + }, + "application/yang": { + source: "iana", + extensions: ["yang"] + }, + "application/yang-data+json": { + source: "iana", + compressible: true + }, + "application/yang-data+xml": { + source: "iana", + compressible: true + }, + "application/yang-patch+json": { + source: "iana", + compressible: true + }, + "application/yang-patch+xml": { + source: "iana", + compressible: true + }, + "application/yin+xml": { + source: "iana", + compressible: true, + extensions: ["yin"] + }, + "application/zip": { + source: "iana", + compressible: false, + extensions: ["zip"] + }, + "application/zlib": { + source: "iana" + }, + "application/zstd": { + source: "iana" + }, + "audio/1d-interleaved-parityfec": { + source: "iana" + }, + "audio/32kadpcm": { + source: "iana" + }, + "audio/3gpp": { + source: "iana", + compressible: false, + extensions: ["3gpp"] + }, + "audio/3gpp2": { + source: "iana" + }, + "audio/aac": { + source: "iana" + }, + "audio/ac3": { + source: "iana" + }, + "audio/adpcm": { + source: "apache", + extensions: ["adp"] + }, + "audio/amr": { + source: "iana", + extensions: ["amr"] + }, + "audio/amr-wb": { + source: "iana" + }, + "audio/amr-wb+": { + source: "iana" + }, + "audio/aptx": { + source: "iana" + }, + "audio/asc": { + source: "iana" + }, + "audio/atrac-advanced-lossless": { + source: "iana" + }, + "audio/atrac-x": { + source: "iana" + }, + "audio/atrac3": { + source: "iana" + }, + "audio/basic": { + source: "iana", + compressible: false, + extensions: ["au", "snd"] + }, + "audio/bv16": { + source: "iana" + }, + "audio/bv32": { + source: "iana" + }, + "audio/clearmode": { + source: "iana" + }, + "audio/cn": { + source: "iana" + }, + "audio/dat12": { + source: "iana" + }, + "audio/dls": { + source: "iana" + }, + "audio/dsr-es201108": { + source: "iana" + }, + "audio/dsr-es202050": { + source: "iana" + }, + "audio/dsr-es202211": { + source: "iana" + }, + "audio/dsr-es202212": { + source: "iana" + }, + "audio/dv": { + source: "iana" + }, + "audio/dvi4": { + source: "iana" + }, + "audio/eac3": { + source: "iana" + }, + "audio/encaprtp": { + source: "iana" + }, + "audio/evrc": { + source: "iana" + }, + "audio/evrc-qcp": { + source: "iana" + }, + "audio/evrc0": { + source: "iana" + }, + "audio/evrc1": { + source: "iana" + }, + "audio/evrcb": { + source: "iana" + }, + "audio/evrcb0": { + source: "iana" + }, + "audio/evrcb1": { + source: "iana" + }, + "audio/evrcnw": { + source: "iana" + }, + "audio/evrcnw0": { + source: "iana" + }, + "audio/evrcnw1": { + source: "iana" + }, + "audio/evrcwb": { + source: "iana" + }, + "audio/evrcwb0": { + source: "iana" + }, + "audio/evrcwb1": { + source: "iana" + }, + "audio/evs": { + source: "iana" + }, + "audio/flexfec": { + source: "iana" + }, + "audio/fwdred": { + source: "iana" + }, + "audio/g711-0": { + source: "iana" + }, + "audio/g719": { + source: "iana" + }, + "audio/g722": { + source: "iana" + }, + "audio/g7221": { + source: "iana" + }, + "audio/g723": { + source: "iana" + }, + "audio/g726-16": { + source: "iana" + }, + "audio/g726-24": { + source: "iana" + }, + "audio/g726-32": { + source: "iana" + }, + "audio/g726-40": { + source: "iana" + }, + "audio/g728": { + source: "iana" + }, + "audio/g729": { + source: "iana" + }, + "audio/g7291": { + source: "iana" + }, + "audio/g729d": { + source: "iana" + }, + "audio/g729e": { + source: "iana" + }, + "audio/gsm": { + source: "iana" + }, + "audio/gsm-efr": { + source: "iana" + }, + "audio/gsm-hr-08": { + source: "iana" + }, + "audio/ilbc": { + source: "iana" + }, + "audio/ip-mr_v2.5": { + source: "iana" + }, + "audio/isac": { + source: "apache" + }, + "audio/l16": { + source: "iana" + }, + "audio/l20": { + source: "iana" + }, + "audio/l24": { + source: "iana", + compressible: false + }, + "audio/l8": { + source: "iana" + }, + "audio/lpc": { + source: "iana" + }, + "audio/melp": { + source: "iana" + }, + "audio/melp1200": { + source: "iana" + }, + "audio/melp2400": { + source: "iana" + }, + "audio/melp600": { + source: "iana" + }, + "audio/mhas": { + source: "iana" + }, + "audio/midi": { + source: "apache", + extensions: ["mid", "midi", "kar", "rmi"] + }, + "audio/mobile-xmf": { + source: "iana", + extensions: ["mxmf"] + }, + "audio/mp3": { + compressible: false, + extensions: ["mp3"] + }, + "audio/mp4": { + source: "iana", + compressible: false, + extensions: ["m4a", "mp4a"] + }, + "audio/mp4a-latm": { + source: "iana" + }, + "audio/mpa": { + source: "iana" + }, + "audio/mpa-robust": { + source: "iana" + }, + "audio/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] + }, + "audio/mpeg4-generic": { + source: "iana" + }, + "audio/musepack": { + source: "apache" + }, + "audio/ogg": { + source: "iana", + compressible: false, + extensions: ["oga", "ogg", "spx", "opus"] + }, + "audio/opus": { + source: "iana" + }, + "audio/parityfec": { + source: "iana" + }, + "audio/pcma": { + source: "iana" + }, + "audio/pcma-wb": { + source: "iana" + }, + "audio/pcmu": { + source: "iana" + }, + "audio/pcmu-wb": { + source: "iana" + }, + "audio/prs.sid": { + source: "iana" + }, + "audio/qcelp": { + source: "iana" + }, + "audio/raptorfec": { + source: "iana" + }, + "audio/red": { + source: "iana" + }, + "audio/rtp-enc-aescm128": { + source: "iana" + }, + "audio/rtp-midi": { + source: "iana" + }, + "audio/rtploopback": { + source: "iana" + }, + "audio/rtx": { + source: "iana" + }, + "audio/s3m": { + source: "apache", + extensions: ["s3m"] + }, + "audio/scip": { + source: "iana" + }, + "audio/silk": { + source: "apache", + extensions: ["sil"] + }, + "audio/smv": { + source: "iana" + }, + "audio/smv-qcp": { + source: "iana" + }, + "audio/smv0": { + source: "iana" + }, + "audio/sofa": { + source: "iana" + }, + "audio/sp-midi": { + source: "iana" + }, + "audio/speex": { + source: "iana" + }, + "audio/t140c": { + source: "iana" + }, + "audio/t38": { + source: "iana" + }, + "audio/telephone-event": { + source: "iana" + }, + "audio/tetra_acelp": { + source: "iana" + }, + "audio/tetra_acelp_bb": { + source: "iana" + }, + "audio/tone": { + source: "iana" + }, + "audio/tsvcis": { + source: "iana" + }, + "audio/uemclip": { + source: "iana" + }, + "audio/ulpfec": { + source: "iana" + }, + "audio/usac": { + source: "iana" + }, + "audio/vdvi": { + source: "iana" + }, + "audio/vmr-wb": { + source: "iana" + }, + "audio/vnd.3gpp.iufp": { + source: "iana" + }, + "audio/vnd.4sb": { + source: "iana" + }, + "audio/vnd.audiokoz": { + source: "iana" + }, + "audio/vnd.celp": { + source: "iana" + }, + "audio/vnd.cisco.nse": { + source: "iana" + }, + "audio/vnd.cmles.radio-events": { + source: "iana" + }, + "audio/vnd.cns.anp1": { + source: "iana" + }, + "audio/vnd.cns.inf1": { + source: "iana" + }, + "audio/vnd.dece.audio": { + source: "iana", + extensions: ["uva", "uvva"] + }, + "audio/vnd.digital-winds": { + source: "iana", + extensions: ["eol"] + }, + "audio/vnd.dlna.adts": { + source: "iana" + }, + "audio/vnd.dolby.heaac.1": { + source: "iana" + }, + "audio/vnd.dolby.heaac.2": { + source: "iana" + }, + "audio/vnd.dolby.mlp": { + source: "iana" + }, + "audio/vnd.dolby.mps": { + source: "iana" + }, + "audio/vnd.dolby.pl2": { + source: "iana" + }, + "audio/vnd.dolby.pl2x": { + source: "iana" + }, + "audio/vnd.dolby.pl2z": { + source: "iana" + }, + "audio/vnd.dolby.pulse.1": { + source: "iana" + }, + "audio/vnd.dra": { + source: "iana", + extensions: ["dra"] + }, + "audio/vnd.dts": { + source: "iana", + extensions: ["dts"] + }, + "audio/vnd.dts.hd": { + source: "iana", + extensions: ["dtshd"] + }, + "audio/vnd.dts.uhd": { + source: "iana" + }, + "audio/vnd.dvb.file": { + source: "iana" + }, + "audio/vnd.everad.plj": { + source: "iana" + }, + "audio/vnd.hns.audio": { + source: "iana" + }, + "audio/vnd.lucent.voice": { + source: "iana", + extensions: ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + source: "iana", + extensions: ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + source: "iana" + }, + "audio/vnd.nortel.vbk": { + source: "iana" + }, + "audio/vnd.nuera.ecelp4800": { + source: "iana", + extensions: ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + source: "iana", + extensions: ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + source: "iana", + extensions: ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + source: "iana" + }, + "audio/vnd.presonus.multitrack": { + source: "iana" + }, + "audio/vnd.qcelp": { + source: "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + source: "iana" + }, + "audio/vnd.rip": { + source: "iana", + extensions: ["rip"] + }, + "audio/vnd.rn-realaudio": { + compressible: false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + source: "iana" + }, + "audio/vnd.vmx.cvsd": { + source: "iana" + }, + "audio/vnd.wave": { + compressible: false + }, + "audio/vorbis": { + source: "iana", + compressible: false + }, + "audio/vorbis-config": { + source: "iana" + }, + "audio/wav": { + compressible: false, + extensions: ["wav"] + }, + "audio/wave": { + compressible: false, + extensions: ["wav"] + }, + "audio/webm": { + source: "apache", + compressible: false, + extensions: ["weba"] + }, + "audio/x-aac": { + source: "apache", + compressible: false, + extensions: ["aac"] + }, + "audio/x-aiff": { + source: "apache", + extensions: ["aif", "aiff", "aifc"] + }, + "audio/x-caf": { + source: "apache", + compressible: false, + extensions: ["caf"] + }, + "audio/x-flac": { + source: "apache", + extensions: ["flac"] + }, + "audio/x-m4a": { + source: "nginx", + extensions: ["m4a"] + }, + "audio/x-matroska": { + source: "apache", + extensions: ["mka"] + }, + "audio/x-mpegurl": { + source: "apache", + extensions: ["m3u"] + }, + "audio/x-ms-wax": { + source: "apache", + extensions: ["wax"] + }, + "audio/x-ms-wma": { + source: "apache", + extensions: ["wma"] + }, + "audio/x-pn-realaudio": { + source: "apache", + extensions: ["ram", "ra"] + }, + "audio/x-pn-realaudio-plugin": { + source: "apache", + extensions: ["rmp"] + }, + "audio/x-realaudio": { + source: "nginx", + extensions: ["ra"] + }, + "audio/x-tta": { + source: "apache" + }, + "audio/x-wav": { + source: "apache", + extensions: ["wav"] + }, + "audio/xm": { + source: "apache", + extensions: ["xm"] + }, + "chemical/x-cdx": { + source: "apache", + extensions: ["cdx"] + }, + "chemical/x-cif": { + source: "apache", + extensions: ["cif"] + }, + "chemical/x-cmdf": { + source: "apache", + extensions: ["cmdf"] + }, + "chemical/x-cml": { + source: "apache", + extensions: ["cml"] + }, + "chemical/x-csml": { + source: "apache", + extensions: ["csml"] + }, + "chemical/x-pdb": { + source: "apache" + }, + "chemical/x-xyz": { + source: "apache", + extensions: ["xyz"] + }, + "font/collection": { + source: "iana", + extensions: ["ttc"] + }, + "font/otf": { + source: "iana", + compressible: true, + extensions: ["otf"] + }, + "font/sfnt": { + source: "iana" + }, + "font/ttf": { + source: "iana", + compressible: true, + extensions: ["ttf"] + }, + "font/woff": { + source: "iana", + extensions: ["woff"] + }, + "font/woff2": { + source: "iana", + extensions: ["woff2"] + }, + "image/aces": { + source: "iana", + extensions: ["exr"] + }, + "image/apng": { + compressible: false, + extensions: ["apng"] + }, + "image/avci": { + source: "iana", + extensions: ["avci"] + }, + "image/avcs": { + source: "iana", + extensions: ["avcs"] + }, + "image/avif": { + source: "iana", + compressible: false, + extensions: ["avif"] + }, + "image/bmp": { + source: "iana", + compressible: true, + extensions: ["bmp"] + }, + "image/cgm": { + source: "iana", + extensions: ["cgm"] + }, + "image/dicom-rle": { + source: "iana", + extensions: ["drle"] + }, + "image/emf": { + source: "iana", + extensions: ["emf"] + }, + "image/fits": { + source: "iana", + extensions: ["fits"] + }, + "image/g3fax": { + source: "iana", + extensions: ["g3"] + }, + "image/gif": { + source: "iana", + compressible: false, + extensions: ["gif"] + }, + "image/heic": { + source: "iana", + extensions: ["heic"] + }, + "image/heic-sequence": { + source: "iana", + extensions: ["heics"] + }, + "image/heif": { + source: "iana", + extensions: ["heif"] + }, + "image/heif-sequence": { + source: "iana", + extensions: ["heifs"] + }, + "image/hej2k": { + source: "iana", + extensions: ["hej2"] + }, + "image/hsj2": { + source: "iana", + extensions: ["hsj2"] + }, + "image/ief": { + source: "iana", + extensions: ["ief"] + }, + "image/jls": { + source: "iana", + extensions: ["jls"] + }, + "image/jp2": { + source: "iana", + compressible: false, + extensions: ["jp2", "jpg2"] + }, + "image/jpeg": { + source: "iana", + compressible: false, + extensions: ["jpeg", "jpg", "jpe"] + }, + "image/jph": { + source: "iana", + extensions: ["jph"] + }, + "image/jphc": { + source: "iana", + extensions: ["jhc"] + }, + "image/jpm": { + source: "iana", + compressible: false, + extensions: ["jpm"] + }, + "image/jpx": { + source: "iana", + compressible: false, + extensions: ["jpx", "jpf"] + }, + "image/jxr": { + source: "iana", + extensions: ["jxr"] + }, + "image/jxra": { + source: "iana", + extensions: ["jxra"] + }, + "image/jxrs": { + source: "iana", + extensions: ["jxrs"] + }, + "image/jxs": { + source: "iana", + extensions: ["jxs"] + }, + "image/jxsc": { + source: "iana", + extensions: ["jxsc"] + }, + "image/jxsi": { + source: "iana", + extensions: ["jxsi"] + }, + "image/jxss": { + source: "iana", + extensions: ["jxss"] + }, + "image/ktx": { + source: "iana", + extensions: ["ktx"] + }, + "image/ktx2": { + source: "iana", + extensions: ["ktx2"] + }, + "image/naplps": { + source: "iana" + }, + "image/pjpeg": { + compressible: false + }, + "image/png": { + source: "iana", + compressible: false, + extensions: ["png"] + }, + "image/prs.btif": { + source: "iana", + extensions: ["btif"] + }, + "image/prs.pti": { + source: "iana", + extensions: ["pti"] + }, + "image/pwg-raster": { + source: "iana" + }, + "image/sgi": { + source: "apache", + extensions: ["sgi"] + }, + "image/svg+xml": { + source: "iana", + compressible: true, + extensions: ["svg", "svgz"] + }, + "image/t38": { + source: "iana", + extensions: ["t38"] + }, + "image/tiff": { + source: "iana", + compressible: false, + extensions: ["tif", "tiff"] + }, + "image/tiff-fx": { + source: "iana", + extensions: ["tfx"] + }, + "image/vnd.adobe.photoshop": { + source: "iana", + compressible: true, + extensions: ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + source: "iana", + extensions: ["azv"] + }, + "image/vnd.cns.inf2": { + source: "iana" + }, + "image/vnd.dece.graphic": { + source: "iana", + extensions: ["uvi", "uvvi", "uvg", "uvvg"] + }, + "image/vnd.djvu": { + source: "iana", + extensions: ["djvu", "djv"] + }, + "image/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "image/vnd.dwg": { + source: "iana", + extensions: ["dwg"] + }, + "image/vnd.dxf": { + source: "iana", + extensions: ["dxf"] + }, + "image/vnd.fastbidsheet": { + source: "iana", + extensions: ["fbs"] + }, + "image/vnd.fpx": { + source: "iana", + extensions: ["fpx"] + }, + "image/vnd.fst": { + source: "iana", + extensions: ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + source: "iana", + extensions: ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + source: "iana", + extensions: ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + source: "iana" + }, + "image/vnd.microsoft.icon": { + source: "iana", + compressible: true, + extensions: ["ico"] + }, + "image/vnd.mix": { + source: "iana" + }, + "image/vnd.mozilla.apng": { + source: "iana" + }, + "image/vnd.ms-dds": { + compressible: true, + extensions: ["dds"] + }, + "image/vnd.ms-modi": { + source: "iana", + extensions: ["mdi"] + }, + "image/vnd.ms-photo": { + source: "apache", + extensions: ["wdp"] + }, + "image/vnd.net-fpx": { + source: "iana", + extensions: ["npx"] + }, + "image/vnd.pco.b16": { + source: "iana", + extensions: ["b16"] + }, + "image/vnd.radiance": { + source: "iana" + }, + "image/vnd.sealed.png": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + source: "iana" + }, + "image/vnd.svf": { + source: "iana" + }, + "image/vnd.tencent.tap": { + source: "iana", + extensions: ["tap"] + }, + "image/vnd.valve.source.texture": { + source: "iana", + extensions: ["vtf"] + }, + "image/vnd.wap.wbmp": { + source: "iana", + extensions: ["wbmp"] + }, + "image/vnd.xiff": { + source: "iana", + extensions: ["xif"] + }, + "image/vnd.zbrush.pcx": { + source: "iana", + extensions: ["pcx"] + }, + "image/webp": { + source: "apache", + extensions: ["webp"] + }, + "image/wmf": { + source: "iana", + extensions: ["wmf"] + }, + "image/x-3ds": { + source: "apache", + extensions: ["3ds"] + }, + "image/x-cmu-raster": { + source: "apache", + extensions: ["ras"] + }, + "image/x-cmx": { + source: "apache", + extensions: ["cmx"] + }, + "image/x-freehand": { + source: "apache", + extensions: ["fh", "fhc", "fh4", "fh5", "fh7"] + }, + "image/x-icon": { + source: "apache", + compressible: true, + extensions: ["ico"] + }, + "image/x-jng": { + source: "nginx", + extensions: ["jng"] + }, + "image/x-mrsid-image": { + source: "apache", + extensions: ["sid"] + }, + "image/x-ms-bmp": { + source: "nginx", + compressible: true, + extensions: ["bmp"] + }, + "image/x-pcx": { + source: "apache", + extensions: ["pcx"] + }, + "image/x-pict": { + source: "apache", + extensions: ["pic", "pct"] + }, + "image/x-portable-anymap": { + source: "apache", + extensions: ["pnm"] + }, + "image/x-portable-bitmap": { + source: "apache", + extensions: ["pbm"] + }, + "image/x-portable-graymap": { + source: "apache", + extensions: ["pgm"] + }, + "image/x-portable-pixmap": { + source: "apache", + extensions: ["ppm"] + }, + "image/x-rgb": { + source: "apache", + extensions: ["rgb"] + }, + "image/x-tga": { + source: "apache", + extensions: ["tga"] + }, + "image/x-xbitmap": { + source: "apache", + extensions: ["xbm"] + }, + "image/x-xcf": { + compressible: false + }, + "image/x-xpixmap": { + source: "apache", + extensions: ["xpm"] + }, + "image/x-xwindowdump": { + source: "apache", + extensions: ["xwd"] + }, + "message/cpim": { + source: "iana" + }, + "message/delivery-status": { + source: "iana" + }, + "message/disposition-notification": { + source: "iana", + extensions: [ + "disposition-notification" + ] + }, + "message/external-body": { + source: "iana" + }, + "message/feedback-report": { + source: "iana" + }, + "message/global": { + source: "iana", + extensions: ["u8msg"] + }, + "message/global-delivery-status": { + source: "iana", + extensions: ["u8dsn"] + }, + "message/global-disposition-notification": { + source: "iana", + extensions: ["u8mdn"] + }, + "message/global-headers": { + source: "iana", + extensions: ["u8hdr"] + }, + "message/http": { + source: "iana", + compressible: false + }, + "message/imdn+xml": { + source: "iana", + compressible: true + }, + "message/news": { + source: "iana" + }, + "message/partial": { + source: "iana", + compressible: false + }, + "message/rfc822": { + source: "iana", + compressible: true, + extensions: ["eml", "mime"] + }, + "message/s-http": { + source: "iana" + }, + "message/sip": { + source: "iana" + }, + "message/sipfrag": { + source: "iana" + }, + "message/tracking-status": { + source: "iana" + }, + "message/vnd.si.simp": { + source: "iana" + }, + "message/vnd.wfa.wsc": { + source: "iana", + extensions: ["wsc"] + }, + "model/3mf": { + source: "iana", + extensions: ["3mf"] + }, + "model/e57": { + source: "iana" + }, + "model/gltf+json": { + source: "iana", + compressible: true, + extensions: ["gltf"] + }, + "model/gltf-binary": { + source: "iana", + compressible: true, + extensions: ["glb"] + }, + "model/iges": { + source: "iana", + compressible: false, + extensions: ["igs", "iges"] + }, + "model/mesh": { + source: "iana", + compressible: false, + extensions: ["msh", "mesh", "silo"] + }, + "model/mtl": { + source: "iana", + extensions: ["mtl"] + }, + "model/obj": { + source: "iana", + extensions: ["obj"] + }, + "model/step": { + source: "iana" + }, + "model/step+xml": { + source: "iana", + compressible: true, + extensions: ["stpx"] + }, + "model/step+zip": { + source: "iana", + compressible: false, + extensions: ["stpz"] + }, + "model/step-xml+zip": { + source: "iana", + compressible: false, + extensions: ["stpxz"] + }, + "model/stl": { + source: "iana", + extensions: ["stl"] + }, + "model/vnd.collada+xml": { + source: "iana", + compressible: true, + extensions: ["dae"] + }, + "model/vnd.dwf": { + source: "iana", + extensions: ["dwf"] + }, + "model/vnd.flatland.3dml": { + source: "iana" + }, + "model/vnd.gdl": { + source: "iana", + extensions: ["gdl"] + }, + "model/vnd.gs-gdl": { + source: "apache" + }, + "model/vnd.gs.gdl": { + source: "iana" + }, + "model/vnd.gtw": { + source: "iana", + extensions: ["gtw"] + }, + "model/vnd.moml+xml": { + source: "iana", + compressible: true + }, + "model/vnd.mts": { + source: "iana", + extensions: ["mts"] + }, + "model/vnd.opengex": { + source: "iana", + extensions: ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + source: "iana", + extensions: ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + source: "iana", + extensions: ["x_t"] + }, + "model/vnd.pytha.pyox": { + source: "iana" + }, + "model/vnd.rosette.annotated-data-model": { + source: "iana" + }, + "model/vnd.sap.vds": { + source: "iana", + extensions: ["vds"] + }, + "model/vnd.usdz+zip": { + source: "iana", + compressible: false, + extensions: ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + source: "iana", + extensions: ["bsp"] + }, + "model/vnd.vtu": { + source: "iana", + extensions: ["vtu"] + }, + "model/vrml": { + source: "iana", + compressible: false, + extensions: ["wrl", "vrml"] + }, + "model/x3d+binary": { + source: "apache", + compressible: false, + extensions: ["x3db", "x3dbz"] + }, + "model/x3d+fastinfoset": { + source: "iana", + extensions: ["x3db"] + }, + "model/x3d+vrml": { + source: "apache", + compressible: false, + extensions: ["x3dv", "x3dvz"] + }, + "model/x3d+xml": { + source: "iana", + compressible: true, + extensions: ["x3d", "x3dz"] + }, + "model/x3d-vrml": { + source: "iana", + extensions: ["x3dv"] + }, + "multipart/alternative": { + source: "iana", + compressible: false + }, + "multipart/appledouble": { + source: "iana" + }, + "multipart/byteranges": { + source: "iana" + }, + "multipart/digest": { + source: "iana" + }, + "multipart/encrypted": { + source: "iana", + compressible: false + }, + "multipart/form-data": { + source: "iana", + compressible: false + }, + "multipart/header-set": { + source: "iana" + }, + "multipart/mixed": { + source: "iana" + }, + "multipart/multilingual": { + source: "iana" + }, + "multipart/parallel": { + source: "iana" + }, + "multipart/related": { + source: "iana", + compressible: false + }, + "multipart/report": { + source: "iana" + }, + "multipart/signed": { + source: "iana", + compressible: false + }, + "multipart/vnd.bint.med-plus": { + source: "iana" + }, + "multipart/voice-message": { + source: "iana" + }, + "multipart/x-mixed-replace": { + source: "iana" + }, + "text/1d-interleaved-parityfec": { + source: "iana" + }, + "text/cache-manifest": { + source: "iana", + compressible: true, + extensions: ["appcache", "manifest"] + }, + "text/calendar": { + source: "iana", + extensions: ["ics", "ifb"] + }, + "text/calender": { + compressible: true + }, + "text/cmd": { + compressible: true + }, + "text/coffeescript": { + extensions: ["coffee", "litcoffee"] + }, + "text/cql": { + source: "iana" + }, + "text/cql-expression": { + source: "iana" + }, + "text/cql-identifier": { + source: "iana" + }, + "text/css": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["css"] + }, + "text/csv": { + source: "iana", + compressible: true, + extensions: ["csv"] + }, + "text/csv-schema": { + source: "iana" + }, + "text/directory": { + source: "iana" + }, + "text/dns": { + source: "iana" + }, + "text/ecmascript": { + source: "iana" + }, + "text/encaprtp": { + source: "iana" + }, + "text/enriched": { + source: "iana" + }, + "text/fhirpath": { + source: "iana" + }, + "text/flexfec": { + source: "iana" + }, + "text/fwdred": { + source: "iana" + }, + "text/gff3": { + source: "iana" + }, + "text/grammar-ref-list": { + source: "iana" + }, + "text/html": { + source: "iana", + compressible: true, + extensions: ["html", "htm", "shtml"] + }, + "text/jade": { + extensions: ["jade"] + }, + "text/javascript": { + source: "iana", + compressible: true + }, + "text/jcr-cnd": { + source: "iana" + }, + "text/jsx": { + compressible: true, + extensions: ["jsx"] + }, + "text/less": { + compressible: true, + extensions: ["less"] + }, + "text/markdown": { + source: "iana", + compressible: true, + extensions: ["markdown", "md"] + }, + "text/mathml": { + source: "nginx", + extensions: ["mml"] + }, + "text/mdx": { + compressible: true, + extensions: ["mdx"] + }, + "text/mizar": { + source: "iana" + }, + "text/n3": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["n3"] + }, + "text/parameters": { + source: "iana", + charset: "UTF-8" + }, + "text/parityfec": { + source: "iana" + }, + "text/plain": { + source: "iana", + compressible: true, + extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"] + }, + "text/provenance-notation": { + source: "iana", + charset: "UTF-8" + }, + "text/prs.fallenstein.rst": { + source: "iana" + }, + "text/prs.lines.tag": { + source: "iana", + extensions: ["dsc"] + }, + "text/prs.prop.logic": { + source: "iana" + }, + "text/raptorfec": { + source: "iana" + }, + "text/red": { + source: "iana" + }, + "text/rfc822-headers": { + source: "iana" + }, + "text/richtext": { + source: "iana", + compressible: true, + extensions: ["rtx"] + }, + "text/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "text/rtp-enc-aescm128": { + source: "iana" + }, + "text/rtploopback": { + source: "iana" + }, + "text/rtx": { + source: "iana" + }, + "text/sgml": { + source: "iana", + extensions: ["sgml", "sgm"] + }, + "text/shaclc": { + source: "iana" + }, + "text/shex": { + source: "iana", + extensions: ["shex"] + }, + "text/slim": { + extensions: ["slim", "slm"] + }, + "text/spdx": { + source: "iana", + extensions: ["spdx"] + }, + "text/strings": { + source: "iana" + }, + "text/stylus": { + extensions: ["stylus", "styl"] + }, + "text/t140": { + source: "iana" + }, + "text/tab-separated-values": { + source: "iana", + compressible: true, + extensions: ["tsv"] + }, + "text/troff": { + source: "iana", + extensions: ["t", "tr", "roff", "man", "me", "ms"] + }, + "text/turtle": { + source: "iana", + charset: "UTF-8", + extensions: ["ttl"] + }, + "text/ulpfec": { + source: "iana" + }, + "text/uri-list": { + source: "iana", + compressible: true, + extensions: ["uri", "uris", "urls"] + }, + "text/vcard": { + source: "iana", + compressible: true, + extensions: ["vcard"] + }, + "text/vnd.a": { + source: "iana" + }, + "text/vnd.abc": { + source: "iana" + }, + "text/vnd.ascii-art": { + source: "iana" + }, + "text/vnd.curl": { + source: "iana", + extensions: ["curl"] + }, + "text/vnd.curl.dcurl": { + source: "apache", + extensions: ["dcurl"] + }, + "text/vnd.curl.mcurl": { + source: "apache", + extensions: ["mcurl"] + }, + "text/vnd.curl.scurl": { + source: "apache", + extensions: ["scurl"] + }, + "text/vnd.debian.copyright": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.dmclientscript": { + source: "iana" + }, + "text/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + source: "iana", + extensions: ["ged"] + }, + "text/vnd.ficlab.flt": { + source: "iana" + }, + "text/vnd.fly": { + source: "iana", + extensions: ["fly"] + }, + "text/vnd.fmi.flexstor": { + source: "iana", + extensions: ["flx"] + }, + "text/vnd.gml": { + source: "iana" + }, + "text/vnd.graphviz": { + source: "iana", + extensions: ["gv"] + }, + "text/vnd.hans": { + source: "iana" + }, + "text/vnd.hgl": { + source: "iana" + }, + "text/vnd.in3d.3dml": { + source: "iana", + extensions: ["3dml"] + }, + "text/vnd.in3d.spot": { + source: "iana", + extensions: ["spot"] + }, + "text/vnd.iptc.newsml": { + source: "iana" + }, + "text/vnd.iptc.nitf": { + source: "iana" + }, + "text/vnd.latex-z": { + source: "iana" + }, + "text/vnd.motorola.reflex": { + source: "iana" + }, + "text/vnd.ms-mediapackage": { + source: "iana" + }, + "text/vnd.net2phone.commcenter.command": { + source: "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + source: "iana" + }, + "text/vnd.senx.warpscript": { + source: "iana" + }, + "text/vnd.si.uricatalogue": { + source: "iana" + }, + "text/vnd.sosi": { + source: "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + source: "iana", + charset: "UTF-8", + extensions: ["jad"] + }, + "text/vnd.trolltech.linguist": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.wap.si": { + source: "iana" + }, + "text/vnd.wap.sl": { + source: "iana" + }, + "text/vnd.wap.wml": { + source: "iana", + extensions: ["wml"] + }, + "text/vnd.wap.wmlscript": { + source: "iana", + extensions: ["wmls"] + }, + "text/vtt": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["vtt"] + }, + "text/x-asm": { + source: "apache", + extensions: ["s", "asm"] + }, + "text/x-c": { + source: "apache", + extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] + }, + "text/x-component": { + source: "nginx", + extensions: ["htc"] + }, + "text/x-fortran": { + source: "apache", + extensions: ["f", "for", "f77", "f90"] + }, + "text/x-gwt-rpc": { + compressible: true + }, + "text/x-handlebars-template": { + extensions: ["hbs"] + }, + "text/x-java-source": { + source: "apache", + extensions: ["java"] + }, + "text/x-jquery-tmpl": { + compressible: true + }, + "text/x-lua": { + extensions: ["lua"] + }, + "text/x-markdown": { + compressible: true, + extensions: ["mkd"] + }, + "text/x-nfo": { + source: "apache", + extensions: ["nfo"] + }, + "text/x-opml": { + source: "apache", + extensions: ["opml"] + }, + "text/x-org": { + compressible: true, + extensions: ["org"] + }, + "text/x-pascal": { + source: "apache", + extensions: ["p", "pas"] + }, + "text/x-processing": { + compressible: true, + extensions: ["pde"] + }, + "text/x-sass": { + extensions: ["sass"] + }, + "text/x-scss": { + extensions: ["scss"] + }, + "text/x-setext": { + source: "apache", + extensions: ["etx"] + }, + "text/x-sfv": { + source: "apache", + extensions: ["sfv"] + }, + "text/x-suse-ymp": { + compressible: true, + extensions: ["ymp"] + }, + "text/x-uuencode": { + source: "apache", + extensions: ["uu"] + }, + "text/x-vcalendar": { + source: "apache", + extensions: ["vcs"] + }, + "text/x-vcard": { + source: "apache", + extensions: ["vcf"] + }, + "text/xml": { + source: "iana", + compressible: true, + extensions: ["xml"] + }, + "text/xml-external-parsed-entity": { + source: "iana" + }, + "text/yaml": { + compressible: true, + extensions: ["yaml", "yml"] + }, + "video/1d-interleaved-parityfec": { + source: "iana" + }, + "video/3gpp": { + source: "iana", + extensions: ["3gp", "3gpp"] + }, + "video/3gpp-tt": { + source: "iana" + }, + "video/3gpp2": { + source: "iana", + extensions: ["3g2"] + }, + "video/av1": { + source: "iana" + }, + "video/bmpeg": { + source: "iana" + }, + "video/bt656": { + source: "iana" + }, + "video/celb": { + source: "iana" + }, + "video/dv": { + source: "iana" + }, + "video/encaprtp": { + source: "iana" + }, + "video/ffv1": { + source: "iana" + }, + "video/flexfec": { + source: "iana" + }, + "video/h261": { + source: "iana", + extensions: ["h261"] + }, + "video/h263": { + source: "iana", + extensions: ["h263"] + }, + "video/h263-1998": { + source: "iana" + }, + "video/h263-2000": { + source: "iana" + }, + "video/h264": { + source: "iana", + extensions: ["h264"] + }, + "video/h264-rcdo": { + source: "iana" + }, + "video/h264-svc": { + source: "iana" + }, + "video/h265": { + source: "iana" + }, + "video/iso.segment": { + source: "iana", + extensions: ["m4s"] + }, + "video/jpeg": { + source: "iana", + extensions: ["jpgv"] + }, + "video/jpeg2000": { + source: "iana" + }, + "video/jpm": { + source: "apache", + extensions: ["jpm", "jpgm"] + }, + "video/jxsv": { + source: "iana" + }, + "video/mj2": { + source: "iana", + extensions: ["mj2", "mjp2"] + }, + "video/mp1s": { + source: "iana" + }, + "video/mp2p": { + source: "iana" + }, + "video/mp2t": { + source: "iana", + extensions: ["ts"] + }, + "video/mp4": { + source: "iana", + compressible: false, + extensions: ["mp4", "mp4v", "mpg4"] + }, + "video/mp4v-es": { + source: "iana" + }, + "video/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"] + }, + "video/mpeg4-generic": { + source: "iana" + }, + "video/mpv": { + source: "iana" + }, + "video/nv": { + source: "iana" + }, + "video/ogg": { + source: "iana", + compressible: false, + extensions: ["ogv"] + }, + "video/parityfec": { + source: "iana" + }, + "video/pointer": { + source: "iana" + }, + "video/quicktime": { + source: "iana", + compressible: false, + extensions: ["qt", "mov"] + }, + "video/raptorfec": { + source: "iana" + }, + "video/raw": { + source: "iana" + }, + "video/rtp-enc-aescm128": { + source: "iana" + }, + "video/rtploopback": { + source: "iana" + }, + "video/rtx": { + source: "iana" + }, + "video/scip": { + source: "iana" + }, + "video/smpte291": { + source: "iana" + }, + "video/smpte292m": { + source: "iana" + }, + "video/ulpfec": { + source: "iana" + }, + "video/vc1": { + source: "iana" + }, + "video/vc2": { + source: "iana" + }, + "video/vnd.cctv": { + source: "iana" + }, + "video/vnd.dece.hd": { + source: "iana", + extensions: ["uvh", "uvvh"] + }, + "video/vnd.dece.mobile": { + source: "iana", + extensions: ["uvm", "uvvm"] + }, + "video/vnd.dece.mp4": { + source: "iana" + }, + "video/vnd.dece.pd": { + source: "iana", + extensions: ["uvp", "uvvp"] + }, + "video/vnd.dece.sd": { + source: "iana", + extensions: ["uvs", "uvvs"] + }, + "video/vnd.dece.video": { + source: "iana", + extensions: ["uvv", "uvvv"] + }, + "video/vnd.directv.mpeg": { + source: "iana" + }, + "video/vnd.directv.mpeg-tts": { + source: "iana" + }, + "video/vnd.dlna.mpeg-tts": { + source: "iana" + }, + "video/vnd.dvb.file": { + source: "iana", + extensions: ["dvb"] + }, + "video/vnd.fvt": { + source: "iana", + extensions: ["fvt"] + }, + "video/vnd.hns.video": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.ttsavc": { + source: "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + source: "iana" + }, + "video/vnd.motorola.video": { + source: "iana" + }, + "video/vnd.motorola.videop": { + source: "iana" + }, + "video/vnd.mpegurl": { + source: "iana", + extensions: ["mxu", "m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + source: "iana", + extensions: ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + source: "iana" + }, + "video/vnd.nokia.mp4vr": { + source: "iana" + }, + "video/vnd.nokia.videovoip": { + source: "iana" + }, + "video/vnd.objectvideo": { + source: "iana" + }, + "video/vnd.radgamettools.bink": { + source: "iana" + }, + "video/vnd.radgamettools.smacker": { + source: "iana" + }, + "video/vnd.sealed.mpeg1": { + source: "iana" + }, + "video/vnd.sealed.mpeg4": { + source: "iana" + }, + "video/vnd.sealed.swf": { + source: "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + source: "iana" + }, + "video/vnd.uvvu.mp4": { + source: "iana", + extensions: ["uvu", "uvvu"] + }, + "video/vnd.vivo": { + source: "iana", + extensions: ["viv"] + }, + "video/vnd.youtube.yt": { + source: "iana" + }, + "video/vp8": { + source: "iana" + }, + "video/vp9": { + source: "iana" + }, + "video/webm": { + source: "apache", + compressible: false, + extensions: ["webm"] + }, + "video/x-f4v": { + source: "apache", + extensions: ["f4v"] + }, + "video/x-fli": { + source: "apache", + extensions: ["fli"] + }, + "video/x-flv": { + source: "apache", + compressible: false, + extensions: ["flv"] + }, + "video/x-m4v": { + source: "apache", + extensions: ["m4v"] + }, + "video/x-matroska": { + source: "apache", + compressible: false, + extensions: ["mkv", "mk3d", "mks"] + }, + "video/x-mng": { + source: "apache", + extensions: ["mng"] + }, + "video/x-ms-asf": { + source: "apache", + extensions: ["asf", "asx"] + }, + "video/x-ms-vob": { + source: "apache", + extensions: ["vob"] + }, + "video/x-ms-wm": { + source: "apache", + extensions: ["wm"] + }, + "video/x-ms-wmv": { + source: "apache", + compressible: false, + extensions: ["wmv"] + }, + "video/x-ms-wmx": { + source: "apache", + extensions: ["wmx"] + }, + "video/x-ms-wvx": { + source: "apache", + extensions: ["wvx"] + }, + "video/x-msvideo": { + source: "apache", + extensions: ["avi"] + }, + "video/x-sgi-movie": { + source: "apache", + extensions: ["movie"] + }, + "video/x-smv": { + source: "apache", + extensions: ["smv"] + }, + "x-conference/x-cooltalk": { + source: "apache", + extensions: ["ice"] + }, + "x-shader/x-fragment": { + compressible: true + }, + "x-shader/x-vertex": { + compressible: true + } + }; + } +}); + +// node_modules/mime-db/index.js +var require_mime_db = __commonJS({ + "node_modules/mime-db/index.js"(exports2, module2) { + module2.exports = require_db(); + } +}); + +// node_modules/mime-types/index.js +var require_mime_types = __commonJS({ + "node_modules/mime-types/index.js"(exports2) { + "use strict"; + var db = require_mime_db(); + var extname = require("path").extname; + var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; + var TEXT_TYPE_REGEXP = /^text\//i; + exports2.charset = charset; + exports2.charsets = { lookup: charset }; + exports2.contentType = contentType; + exports2.extension = extension; + exports2.extensions = /* @__PURE__ */ Object.create(null); + exports2.lookup = lookup; + exports2.types = /* @__PURE__ */ Object.create(null); + populateMaps(exports2.extensions, exports2.types); + function charset(type) { + if (!type || typeof type !== "string") { + return false; + } + var match = EXTRACT_TYPE_REGEXP.exec(type); + var mime = match && db[match[1].toLowerCase()]; + if (mime && mime.charset) { + return mime.charset; + } + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return "UTF-8"; + } + return false; + } + function contentType(str) { + if (!str || typeof str !== "string") { + return false; + } + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; + if (!mime) { + return false; + } + if (mime.indexOf("charset") === -1) { + var charset2 = exports2.charset(mime); + if (charset2) mime += "; charset=" + charset2.toLowerCase(); + } + return mime; + } + function extension(type) { + if (!type || typeof type !== "string") { + return false; + } + var match = EXTRACT_TYPE_REGEXP.exec(type); + var exts = match && exports2.extensions[match[1].toLowerCase()]; + if (!exts || !exts.length) { + return false; + } + return exts[0]; + } + function lookup(path) { + if (!path || typeof path !== "string") { + return false; + } + var extension2 = extname("x." + path).toLowerCase().substr(1); + if (!extension2) { + return false; + } + return exports2.types[extension2] || false; + } + function populateMaps(extensions, types) { + var preference = ["nginx", "apache", void 0, "iana"]; + Object.keys(db).forEach(function forEachMimeType(type) { + var mime = db[type]; + var exts = mime.extensions; + if (!exts || !exts.length) { + return; + } + extensions[type] = exts; + for (var i2 = 0; i2 < exts.length; i2++) { + var extension2 = exts[i2]; + if (types[extension2]) { + var from = preference.indexOf(db[types[extension2]].source); + var to = preference.indexOf(mime.source); + if (types[extension2] !== "application/octet-stream" && (from > to || from === to && types[extension2].substr(0, 12) === "application/")) { + continue; + } + } + types[extension2] = type; + } + }); + } + } +}); + +// node_modules/caseless/index.js +var require_caseless = __commonJS({ + "node_modules/caseless/index.js"(exports2, module2) { + function Caseless(dict) { + this.dict = dict || {}; + } + Caseless.prototype.set = function(name, value, clobber) { + if (typeof name === "object") { + for (var i2 in name) { + this.set(i2, name[i2], value); + } + } else { + if (typeof clobber === "undefined") clobber = true; + var has = this.has(name); + if (!clobber && has) this.dict[has] = this.dict[has] + "," + value; + else this.dict[has || name] = value; + return has; + } + }; + Caseless.prototype.has = function(name) { + var keys = Object.keys(this.dict), name = name.toLowerCase(); + for (var i2 = 0; i2 < keys.length; i2++) { + if (keys[i2].toLowerCase() === name) return keys[i2]; + } + return false; + }; + Caseless.prototype.get = function(name) { + name = name.toLowerCase(); + var result, _key; + var headers = this.dict; + Object.keys(headers).forEach(function(key) { + _key = key.toLowerCase(); + if (name === _key) result = headers[key]; + }); + return result; + }; + Caseless.prototype.swap = function(name) { + var has = this.has(name); + if (has === name) return; + if (!has) throw new Error('There is no header than matches "' + name + '"'); + this.dict[name] = this.dict[has]; + delete this.dict[has]; + }; + Caseless.prototype.del = function(name) { + var has = this.has(name); + return delete this.dict[has || name]; + }; + module2.exports = function(dict) { + return new Caseless(dict); + }; + module2.exports.httpify = function(resp, headers) { + var c = new Caseless(headers); + resp.setHeader = function(key, value, clobber) { + if (typeof value === "undefined") return; + return c.set(key, value, clobber); + }; + resp.hasHeader = function(key) { + return c.has(key); + }; + resp.getHeader = function(key) { + return c.get(key); + }; + resp.removeHeader = function(key) { + return c.del(key); + }; + resp.headers = c.dict; + return c; + }; + } +}); + +// node_modules/forever-agent/index.js +var require_forever_agent = __commonJS({ + "node_modules/forever-agent/index.js"(exports2, module2) { + module2.exports = ForeverAgent; + ForeverAgent.SSL = ForeverAgentSSL; + var util2 = require("util"); + var Agent = require("http").Agent; + var net = require("net"); + var tls = require("tls"); + var AgentSSL = require("https").Agent; + function getConnectionName(host, port) { + var name = ""; + if (typeof host === "string") { + name = host + ":" + port; + } else { + name = host.host + ":" + host.port + ":" + (host.localAddress ? host.localAddress + ":" : ":"); + } + return name; + } + function ForeverAgent(options) { + var self2 = this; + self2.options = options || {}; + self2.requests = {}; + self2.sockets = {}; + self2.freeSockets = {}; + self2.maxSockets = self2.options.maxSockets || Agent.defaultMaxSockets; + self2.minSockets = self2.options.minSockets || ForeverAgent.defaultMinSockets; + self2.on("free", function(socket, host, port) { + var name = getConnectionName(host, port); + if (self2.requests[name] && self2.requests[name].length) { + self2.requests[name].shift().onSocket(socket); + } else if (self2.sockets[name].length < self2.minSockets) { + if (!self2.freeSockets[name]) self2.freeSockets[name] = []; + self2.freeSockets[name].push(socket); + var onIdleError = function() { + socket.destroy(); + }; + socket._onIdleError = onIdleError; + socket.on("error", onIdleError); + } else { + socket.destroy(); + } + }); + } + util2.inherits(ForeverAgent, Agent); + ForeverAgent.defaultMinSockets = 5; + ForeverAgent.prototype.createConnection = net.createConnection; + ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest; + ForeverAgent.prototype.addRequest = function(req, host, port) { + var name = getConnectionName(host, port); + if (typeof host !== "string") { + var options = host; + port = options.port; + host = options.host; + } + if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) { + var idleSocket = this.freeSockets[name].pop(); + idleSocket.removeListener("error", idleSocket._onIdleError); + delete idleSocket._onIdleError; + req._reusedSocket = true; + req.onSocket(idleSocket); + } else { + this.addRequestNoreuse(req, host, port); + } + }; + ForeverAgent.prototype.removeSocket = function(s, name, host, port) { + if (this.sockets[name]) { + var index2 = this.sockets[name].indexOf(s); + if (index2 !== -1) { + this.sockets[name].splice(index2, 1); + } + } else if (this.sockets[name] && this.sockets[name].length === 0) { + delete this.sockets[name]; + delete this.requests[name]; + } + if (this.freeSockets[name]) { + var index2 = this.freeSockets[name].indexOf(s); + if (index2 !== -1) { + this.freeSockets[name].splice(index2, 1); + if (this.freeSockets[name].length === 0) { + delete this.freeSockets[name]; + } + } + } + if (this.requests[name] && this.requests[name].length) { + this.createSocket(name, host, port).emit("free"); + } + }; + function ForeverAgentSSL(options) { + ForeverAgent.call(this, options); + } + util2.inherits(ForeverAgentSSL, ForeverAgent); + ForeverAgentSSL.prototype.createConnection = createConnectionSSL; + ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest; + function createConnectionSSL(port, host, options) { + if (typeof port === "object") { + options = port; + } else if (typeof host === "object") { + options = host; + } else if (typeof options === "object") { + options = options; + } else { + options = {}; + } + if (typeof port === "number") { + options.port = port; + } + if (typeof host === "string") { + options.host = host; + } + return tls.connect(options); + } + } +}); + +// node_modules/delayed-stream/lib/delayed_stream.js +var require_delayed_stream = __commonJS({ + "node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) { + var Stream = require("stream").Stream; + var util2 = require("util"); + module2.exports = DelayedStream; + function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; + } + util2.inherits(DelayedStream, Stream); + DelayedStream.create = function(source, options) { + var delayedStream = new this(); + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + delayedStream.source = source; + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + source.on("error", function() { + }); + if (delayedStream.pauseStream) { + source.pause(); + } + return delayedStream; + }; + Object.defineProperty(DelayedStream.prototype, "readable", { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } + }); + DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); + }; + DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + this.source.resume(); + }; + DelayedStream.prototype.pause = function() { + this.source.pause(); + }; + DelayedStream.prototype.release = function() { + this._released = true; + this._bufferedEvents.forEach(function(args2) { + this.emit.apply(this, args2); + }.bind(this)); + this._bufferedEvents = []; + }; + DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; + }; + DelayedStream.prototype._handleEmit = function(args2) { + if (this._released) { + this.emit.apply(this, args2); + return; + } + if (args2[0] === "data") { + this.dataSize += args2[1].length; + this._checkIfMaxDataSizeExceeded(); + } + this._bufferedEvents.push(args2); + }; + DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + if (this.dataSize <= this.maxDataSize) { + return; + } + this._maxDataSizeExceeded = true; + var message = "DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded."; + this.emit("error", new Error(message)); + }; + } +}); + +// node_modules/combined-stream/lib/combined_stream.js +var require_combined_stream = __commonJS({ + "node_modules/combined-stream/lib/combined_stream.js"(exports2, module2) { + var util2 = require("util"); + var Stream = require("stream").Stream; + var DelayedStream = require_delayed_stream(); + module2.exports = CombinedStream; + function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; + } + util2.inherits(CombinedStream, Stream); + CombinedStream.create = function(options) { + var combinedStream = new this(); + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + return combinedStream; + }; + CombinedStream.isStreamLike = function(stream2) { + return typeof stream2 !== "function" && typeof stream2 !== "string" && typeof stream2 !== "boolean" && typeof stream2 !== "number" && !Buffer.isBuffer(stream2); + }; + CombinedStream.prototype.append = function(stream2) { + var isStreamLike = CombinedStream.isStreamLike(stream2); + if (isStreamLike) { + if (!(stream2 instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream2, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams + }); + stream2.on("data", this._checkDataSize.bind(this)); + stream2 = newStream; + } + this._handleErrors(stream2); + if (this.pauseStreams) { + stream2.pause(); + } + } + this._streams.push(stream2); + return this; + }; + CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; + }; + CombinedStream.prototype._getNext = function() { + this._currentStream = null; + if (this._insideLoop) { + this._pendingNext = true; + return; + } + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } + }; + CombinedStream.prototype._realGetNext = function() { + var stream2 = this._streams.shift(); + if (typeof stream2 == "undefined") { + this.end(); + return; + } + if (typeof stream2 !== "function") { + this._pipeNext(stream2); + return; + } + var getStream = stream2; + getStream(function(stream3) { + var isStreamLike = CombinedStream.isStreamLike(stream3); + if (isStreamLike) { + stream3.on("data", this._checkDataSize.bind(this)); + this._handleErrors(stream3); + } + this._pipeNext(stream3); + }.bind(this)); + }; + CombinedStream.prototype._pipeNext = function(stream2) { + this._currentStream = stream2; + var isStreamLike = CombinedStream.isStreamLike(stream2); + if (isStreamLike) { + stream2.on("end", this._getNext.bind(this)); + stream2.pipe(this, { end: false }); + return; + } + var value = stream2; + this.write(value); + this._getNext(); + }; + CombinedStream.prototype._handleErrors = function(stream2) { + var self2 = this; + stream2.on("error", function(err) { + self2._emitError(err); + }); + }; + CombinedStream.prototype.write = function(data) { + this.emit("data", data); + }; + CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") this._currentStream.pause(); + this.emit("pause"); + }; + CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") this._currentStream.resume(); + this.emit("resume"); + }; + CombinedStream.prototype.end = function() { + this._reset(); + this.emit("end"); + }; + CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit("close"); + }; + CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; + }; + CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + var message = "DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded."; + this._emitError(new Error(message)); + }; + CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + var self2 = this; + this._streams.forEach(function(stream2) { + if (!stream2.dataSize) { + return; + } + self2.dataSize += stream2.dataSize; + }); + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } + }; + CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit("error", err); + }; + } +}); + +// node_modules/asynckit/lib/defer.js +var require_defer = __commonJS({ + "node_modules/asynckit/lib/defer.js"(exports2, module2) { + module2.exports = defer; + function defer(fn) { + var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null; + if (nextTick) { + nextTick(fn); + } else { + setTimeout(fn, 0); + } + } + } +}); + +// node_modules/asynckit/lib/async.js +var require_async = __commonJS({ + "node_modules/asynckit/lib/async.js"(exports2, module2) { + var defer = require_defer(); + module2.exports = async; + function async(callback) { + var isAsync = false; + defer(function() { + isAsync = true; + }); + return function async_callback(err, result) { + if (isAsync) { + callback(err, result); + } else { + defer(function nextTick_callback() { + callback(err, result); + }); + } + }; + } + } +}); + +// node_modules/asynckit/lib/abort.js +var require_abort = __commonJS({ + "node_modules/asynckit/lib/abort.js"(exports2, module2) { + module2.exports = abort; + function abort(state) { + Object.keys(state.jobs).forEach(clean.bind(state)); + state.jobs = {}; + } + function clean(key) { + if (typeof this.jobs[key] == "function") { + this.jobs[key](); + } + } + } +}); + +// node_modules/asynckit/lib/iterate.js +var require_iterate = __commonJS({ + "node_modules/asynckit/lib/iterate.js"(exports2, module2) { + var async = require_async(); + var abort = require_abort(); + module2.exports = iterate; + function iterate(list, iterator, state, callback) { + var key = state["keyedList"] ? state["keyedList"][state.index] : state.index; + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) { + if (!(key in state.jobs)) { + return; + } + delete state.jobs[key]; + if (error) { + abort(state); + } else { + state.results[key] = output; + } + callback(error, state.results); + }); + } + function runJob(iterator, key, item, callback) { + var aborter; + if (iterator.length == 2) { + aborter = iterator(item, async(callback)); + } else { + aborter = iterator(item, key, async(callback)); + } + return aborter; + } + } +}); + +// node_modules/asynckit/lib/state.js +var require_state = __commonJS({ + "node_modules/asynckit/lib/state.js"(exports2, module2) { + module2.exports = state; + function state(list, sortMethod) { + var isNamedList = !Array.isArray(list), initState = { + index: 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs: {}, + results: isNamedList ? {} : [], + size: isNamedList ? Object.keys(list).length : list.length + }; + if (sortMethod) { + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) { + return sortMethod(list[a], list[b]); + }); + } + return initState; + } + } +}); + +// node_modules/asynckit/lib/terminator.js +var require_terminator = __commonJS({ + "node_modules/asynckit/lib/terminator.js"(exports2, module2) { + var abort = require_abort(); + var async = require_async(); + module2.exports = terminator; + function terminator(callback) { + if (!Object.keys(this.jobs).length) { + return; + } + this.index = this.size; + abort(this); + async(callback)(null, this.results); + } + } +}); + +// node_modules/asynckit/parallel.js +var require_parallel = __commonJS({ + "node_modules/asynckit/parallel.js"(exports2, module2) { + var iterate = require_iterate(); + var initState = require_state(); + var terminator = require_terminator(); + module2.exports = parallel; + function parallel(list, iterator, callback) { + var state = initState(list); + while (state.index < (state["keyedList"] || list).length) { + iterate(list, iterator, state, function(error, result) { + if (error) { + callback(error, result); + return; + } + if (Object.keys(state.jobs).length === 0) { + callback(null, state.results); + return; + } + }); + state.index++; + } + return terminator.bind(state, callback); + } + } +}); + +// node_modules/asynckit/serialOrdered.js +var require_serialOrdered = __commonJS({ + "node_modules/asynckit/serialOrdered.js"(exports2, module2) { + var iterate = require_iterate(); + var initState = require_state(); + var terminator = require_terminator(); + module2.exports = serialOrdered; + module2.exports.ascending = ascending; + module2.exports.descending = descending; + function serialOrdered(list, iterator, sortMethod, callback) { + var state = initState(list, sortMethod); + iterate(list, iterator, state, function iteratorHandler(error, result) { + if (error) { + callback(error, result); + return; + } + state.index++; + if (state.index < (state["keyedList"] || list).length) { + iterate(list, iterator, state, iteratorHandler); + return; + } + callback(null, state.results); + }); + return terminator.bind(state, callback); + } + function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : 0; + } + function descending(a, b) { + return -1 * ascending(a, b); + } + } +}); + +// node_modules/asynckit/serial.js +var require_serial = __commonJS({ + "node_modules/asynckit/serial.js"(exports2, module2) { + var serialOrdered = require_serialOrdered(); + module2.exports = serial; + function serial(list, iterator, callback) { + return serialOrdered(list, iterator, null, callback); + } + } +}); + +// node_modules/asynckit/index.js +var require_asynckit = __commonJS({ + "node_modules/asynckit/index.js"(exports2, module2) { + module2.exports = { + parallel: require_parallel(), + serial: require_serial(), + serialOrdered: require_serialOrdered() + }; + } +}); + +// node_modules/request/node_modules/form-data/lib/populate.js +var require_populate = __commonJS({ + "node_modules/request/node_modules/form-data/lib/populate.js"(exports2, module2) { + module2.exports = function(dst, src) { + Object.keys(src).forEach(function(prop) { + dst[prop] = dst[prop] || src[prop]; + }); + return dst; + }; + } +}); + +// node_modules/request/node_modules/form-data/lib/form_data.js +var require_form_data = __commonJS({ + "node_modules/request/node_modules/form-data/lib/form_data.js"(exports2, module2) { + var CombinedStream = require_combined_stream(); + var util2 = require("util"); + var path = require("path"); + var http = require("http"); + var https = require("https"); + var parseUrl = require("url").parse; + var fs = require("fs"); + var mime = require_mime_types(); + var asynckit = require_asynckit(); + var populate = require_populate(); + module2.exports = FormData; + util2.inherits(FormData, CombinedStream); + function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(); + } + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + CombinedStream.call(this); + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } + } + FormData.LINE_BREAK = "\r\n"; + FormData.DEFAULT_CONTENT_TYPE = "application/octet-stream"; + FormData.prototype.append = function(field, value, options) { + options = options || {}; + if (typeof options == "string") { + options = { filename: options }; + } + var append = CombinedStream.prototype.append.bind(this); + if (typeof value == "number") { + value = "" + value; + } + if (util2.isArray(value)) { + this._error(new Error("Arrays are not supported.")); + return; + } + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + append(header); + append(value); + append(footer); + this._trackLength(header, value, options); + }; + FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === "string") { + valueLength = Buffer.byteLength(value); + } + this._valueLength += valueLength; + this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; + if (!value || !value.path && !(value.readable && value.hasOwnProperty("httpVersion"))) { + return; + } + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } + }; + FormData.prototype._lengthRetriever = function(value, callback) { + if (value.hasOwnProperty("fd")) { + if (value.end != void 0 && value.end != Infinity && value.start != void 0) { + callback(null, value.end + 1 - (value.start ? value.start : 0)); + } else { + fs.stat(value.path, function(err, stat) { + var fileSize; + if (err) { + callback(err); + return; + } + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + } else if (value.hasOwnProperty("httpVersion")) { + callback(null, +value.headers["content-length"]); + } else if (value.hasOwnProperty("httpModule")) { + value.on("response", function(response) { + value.pause(); + callback(null, +response.headers["content-length"]); + }); + value.resume(); + } else { + callback("Unknown stream"); + } + }; + FormData.prototype._multiPartHeader = function(field, value, options) { + if (typeof options.header == "string") { + return options.header; + } + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + var contents = ""; + var headers = { + // add custom disposition as third element or keep it two elements if not + "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + "Content-Type": [].concat(contentType || []) + }; + if (typeof options.header == "object") { + populate(headers, options.header); + } + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; + if (header == null) { + continue; + } + if (!Array.isArray(header)) { + header = [header]; + } + if (header.length) { + contents += prop + ": " + header.join("; ") + FormData.LINE_BREAK; + } + } + return "--" + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; + }; + FormData.prototype._getContentDisposition = function(value, options) { + var filename, contentDisposition; + if (typeof options.filepath === "string") { + filename = path.normalize(options.filepath).replace(/\\/g, "/"); + } else if (options.filename || value.name || value.path) { + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty("httpVersion")) { + filename = path.basename(value.client._httpMessage.path); + } + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } + return contentDisposition; + }; + FormData.prototype._getContentType = function(value, options) { + var contentType = options.contentType; + if (!contentType && value.name) { + contentType = mime.lookup(value.name); + } + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + if (!contentType && value.readable && value.hasOwnProperty("httpVersion")) { + contentType = value.headers["content-type"]; + } + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + if (!contentType && typeof value == "object") { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + return contentType; + }; + FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + var lastPart = this._streams.length === 0; + if (lastPart) { + footer += this._lastBoundary(); + } + next(footer); + }.bind(this); + }; + FormData.prototype._lastBoundary = function() { + return "--" + this.getBoundary() + "--" + FormData.LINE_BREAK; + }; + FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + "content-type": "multipart/form-data; boundary=" + this.getBoundary() + }; + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + return formHeaders; + }; + FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + return this._boundary; + }; + FormData.prototype._generateBoundary = function() { + var boundary = "--------------------------"; + for (var i2 = 0; i2 < 24; i2++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + this._boundary = boundary; + }; + FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + if (!this.hasKnownLength()) { + this._error(new Error("Cannot calculate proper length in synchronous way.")); + } + return knownLength; + }; + FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + return hasKnownLength; + }; + FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + values.forEach(function(length) { + knownLength += length; + }); + cb(null, knownLength); + }); + }; + FormData.prototype.submit = function(params, cb) { + var request, options, defaults = { method: "post" }; + if (typeof params == "string") { + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + } else { + options = populate(params, defaults); + if (!options.port) { + options.port = options.protocol == "https:" ? 443 : 80; + } + } + options.headers = this.getHeaders(params.headers); + if (options.protocol == "https:") { + request = https.request(options); + } else { + request = http.request(options); + } + this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + request.setHeader("Content-Length", length); + this.pipe(request); + if (cb) { + request.on("error", cb); + request.on("response", cb.bind(this, null)); + } + }.bind(this)); + return request; + }; + FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit("error", err); + } + }; + FormData.prototype.toString = function() { + return "[object FormData]"; + }; + } +}); + +// node_modules/isstream/isstream.js +var require_isstream = __commonJS({ + "node_modules/isstream/isstream.js"(exports2, module2) { + var stream2 = require("stream"); + function isStream(obj) { + return obj instanceof stream2.Stream; + } + function isReadable(obj) { + return isStream(obj) && typeof obj._read == "function" && typeof obj._readableState == "object"; + } + function isWritable(obj) { + return isStream(obj) && typeof obj._write == "function" && typeof obj._writableState == "object"; + } + function isDuplex(obj) { + return isReadable(obj) && isWritable(obj); + } + module2.exports = isStream; + module2.exports.isReadable = isReadable; + module2.exports.isWritable = isWritable; + module2.exports.isDuplex = isDuplex; + } +}); + +// node_modules/is-typedarray/index.js +var require_is_typedarray = __commonJS({ + "node_modules/is-typedarray/index.js"(exports2, module2) { + module2.exports = isTypedArray; + isTypedArray.strict = isStrictTypedArray; + isTypedArray.loose = isLooseTypedArray; + var toString = Object.prototype.toString; + var names = { + "[object Int8Array]": true, + "[object Int16Array]": true, + "[object Int32Array]": true, + "[object Uint8Array]": true, + "[object Uint8ClampedArray]": true, + "[object Uint16Array]": true, + "[object Uint32Array]": true, + "[object Float32Array]": true, + "[object Float64Array]": true + }; + function isTypedArray(arr2) { + return isStrictTypedArray(arr2) || isLooseTypedArray(arr2); + } + function isStrictTypedArray(arr2) { + return arr2 instanceof Int8Array || arr2 instanceof Int16Array || arr2 instanceof Int32Array || arr2 instanceof Uint8Array || arr2 instanceof Uint8ClampedArray || arr2 instanceof Uint16Array || arr2 instanceof Uint32Array || arr2 instanceof Float32Array || arr2 instanceof Float64Array; + } + function isLooseTypedArray(arr2) { + return names[toString.call(arr2)]; + } + } +}); + +// node_modules/request/lib/getProxyFromURI.js +var require_getProxyFromURI = __commonJS({ + "node_modules/request/lib/getProxyFromURI.js"(exports2, module2) { + "use strict"; + function formatHostname(hostname) { + return hostname.replace(/^\.*/, ".").toLowerCase(); + } + function parseNoProxyZone(zone) { + zone = zone.trim().toLowerCase(); + var zoneParts = zone.split(":", 2); + var zoneHost = formatHostname(zoneParts[0]); + var zonePort = zoneParts[1]; + var hasPort = zone.indexOf(":") > -1; + return { hostname: zoneHost, port: zonePort, hasPort }; + } + function uriInNoProxy(uri, noProxy) { + var port = uri.port || (uri.protocol === "https:" ? "443" : "80"); + var hostname = formatHostname(uri.hostname); + var noProxyList = noProxy.split(","); + return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) { + var isMatchedAt = hostname.indexOf(noProxyZone.hostname); + var hostnameMatched = isMatchedAt > -1 && isMatchedAt === hostname.length - noProxyZone.hostname.length; + if (noProxyZone.hasPort) { + return port === noProxyZone.port && hostnameMatched; + } + return hostnameMatched; + }); + } + function getProxyFromURI(uri) { + var noProxy = process.env.NO_PROXY || process.env.no_proxy || ""; + if (noProxy === "*") { + return null; + } + if (noProxy !== "" && uriInNoProxy(uri, noProxy)) { + return null; + } + if (uri.protocol === "http:") { + return process.env.HTTP_PROXY || process.env.http_proxy || null; + } + if (uri.protocol === "https:") { + return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null; + } + return null; + } + module2.exports = getProxyFromURI; + } +}); + +// node_modules/qs/lib/utils.js +var require_utils3 = __commonJS({ + "node_modules/qs/lib/utils.js"(exports2, module2) { + "use strict"; + var has = Object.prototype.hasOwnProperty; + var hexTable = function() { + var array = []; + for (var i2 = 0; i2 < 256; ++i2) { + array.push("%" + ((i2 < 16 ? "0" : "") + i2.toString(16)).toUpperCase()); + } + return array; + }(); + var compactQueue = function compactQueue2(queue) { + var obj; + while (queue.length) { + var item = queue.pop(); + obj = item.obj[item.prop]; + if (Array.isArray(obj)) { + var compacted = []; + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== "undefined") { + compacted.push(obj[j]); + } + } + item.obj[item.prop] = compacted; + } + } + return obj; + }; + var arrayToObject = function arrayToObject2(source, options) { + var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + for (var i2 = 0; i2 < source.length; ++i2) { + if (typeof source[i2] !== "undefined") { + obj[i2] = source[i2]; + } + } + return obj; + }; + var merge = function merge2(target, source, options) { + if (!source) { + return target; + } + if (typeof source !== "object") { + if (Array.isArray(target)) { + target.push(source); + } else if (target && typeof target === "object") { + if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + return target; + } + if (!target || typeof target !== "object") { + return [target].concat(source); + } + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + if (Array.isArray(target) && Array.isArray(source)) { + source.forEach(function(item, i2) { + if (has.call(target, i2)) { + var targetItem = target[i2]; + if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { + target[i2] = merge2(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i2] = item; + } + }); + return target; + } + return Object.keys(source).reduce(function(acc, key) { + var value = source[key]; + if (has.call(acc, key)) { + acc[key] = merge2(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); + }; + var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function(acc, key) { + acc[key] = source[key]; + return acc; + }, target); + }; + var decode = function(str) { + try { + return decodeURIComponent(str.replace(/\+/g, " ")); + } catch (e) { + return str; + } + }; + var encode2 = function encode3(str) { + if (str.length === 0) { + return str; + } + var string = typeof str === "string" ? str : String(str); + var out = ""; + for (var i2 = 0; i2 < string.length; ++i2) { + var c = string.charCodeAt(i2); + if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) { + out += string.charAt(i2); + continue; + } + if (c < 128) { + out = out + hexTable[c]; + continue; + } + if (c < 2048) { + out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]); + continue; + } + if (c < 55296 || c >= 57344) { + out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]); + continue; + } + i2 += 1; + c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i2) & 1023); + out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + } + return out; + }; + var compact = function compact2(value) { + var queue = [{ obj: { o: value }, prop: "o" }]; + var refs = []; + for (var i2 = 0; i2 < queue.length; ++i2) { + var item = queue[i2]; + var obj = item.obj[item.prop]; + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj, prop: key }); + refs.push(val); + } + } + } + return compactQueue(queue); + }; + var isRegExp = function isRegExp2(obj) { + return Object.prototype.toString.call(obj) === "[object RegExp]"; + }; + var isBuffer = function isBuffer2(obj) { + if (obj === null || typeof obj === "undefined") { + return false; + } + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); + }; + module2.exports = { + arrayToObject, + assign, + compact, + decode, + encode: encode2, + isBuffer, + isRegExp, + merge + }; + } +}); + +// node_modules/qs/lib/formats.js +var require_formats = __commonJS({ + "node_modules/qs/lib/formats.js"(exports2, module2) { + "use strict"; + var replace = String.prototype.replace; + var percentTwenties = /%20/g; + module2.exports = { + "default": "RFC3986", + formatters: { + RFC1738: function(value) { + return replace.call(value, percentTwenties, "+"); + }, + RFC3986: function(value) { + return String(value); + } + }, + RFC1738: "RFC1738", + RFC3986: "RFC3986" + }; + } +}); + +// node_modules/qs/lib/stringify.js +var require_stringify2 = __commonJS({ + "node_modules/qs/lib/stringify.js"(exports2, module2) { + "use strict"; + var utils = require_utils3(); + var formats = require_formats(); + var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + "[]"; + }, + indices: function indices(prefix, key) { + return prefix + "[" + key + "]"; + }, + repeat: function repeat(prefix) { + return prefix; + } + }; + var isArray = Array.isArray; + var push = Array.prototype.push; + var pushToArray = function(arr2, valueOrArray) { + push.apply(arr2, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); + }; + var toISO = Date.prototype.toISOString; + var defaults = { + delimiter: "&", + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false + }; + var stringify = function stringify2(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder2, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly) { + var obj = object; + if (typeof filter === "function") { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } + if (obj === null) { + if (strictNullHandling) { + return encoder2 && !encodeValuesOnly ? encoder2(prefix, defaults.encoder) : prefix; + } + obj = ""; + } + if (typeof obj === "string" || typeof obj === "number" || typeof obj === "boolean" || utils.isBuffer(obj)) { + if (encoder2) { + var keyValue = encodeValuesOnly ? prefix : encoder2(prefix, defaults.encoder); + return [formatter(keyValue) + "=" + formatter(encoder2(obj, defaults.encoder))]; + } + return [formatter(prefix) + "=" + formatter(String(obj))]; + } + var values = []; + if (typeof obj === "undefined") { + return values; + } + var objKeys; + if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + for (var i2 = 0; i2 < objKeys.length; ++i2) { + var key = objKeys[i2]; + if (skipNulls && obj[key] === null) { + continue; + } + if (isArray(obj)) { + pushToArray(values, stringify2( + obj[key], + generateArrayPrefix(prefix, key), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder2, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } else { + pushToArray(values, stringify2( + obj[key], + prefix + (allowDots ? "." + key : "[" + key + "]"), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder2, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + } + return values; + }; + module2.exports = function(object, opts) { + var obj = object; + var options = opts ? utils.assign({}, opts) : {}; + if (options.encoder !== null && typeof options.encoder !== "undefined" && typeof options.encoder !== "function") { + throw new TypeError("Encoder has to be a function."); + } + var delimiter = typeof options.delimiter === "undefined" ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === "boolean" ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === "boolean" ? options.skipNulls : defaults.skipNulls; + var encode2 = typeof options.encode === "boolean" ? options.encode : defaults.encode; + var encoder2 = typeof options.encoder === "function" ? options.encoder : defaults.encoder; + var sort = typeof options.sort === "function" ? options.sort : null; + var allowDots = typeof options.allowDots === "undefined" ? false : options.allowDots; + var serializeDate = typeof options.serializeDate === "function" ? options.serializeDate : defaults.serializeDate; + var encodeValuesOnly = typeof options.encodeValuesOnly === "boolean" ? options.encodeValuesOnly : defaults.encodeValuesOnly; + if (typeof options.format === "undefined") { + options.format = formats["default"]; + } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { + throw new TypeError("Unknown format option provided."); + } + var formatter = formats.formatters[options.format]; + var objKeys; + var filter; + if (typeof options.filter === "function") { + filter = options.filter; + obj = filter("", obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + var keys = []; + if (typeof obj !== "object" || obj === null) { + return ""; + } + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ("indices" in options) { + arrayFormat = options.indices ? "indices" : "repeat"; + } else { + arrayFormat = "indices"; + } + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + if (!objKeys) { + objKeys = Object.keys(obj); + } + if (sort) { + objKeys.sort(sort); + } + for (var i2 = 0; i2 < objKeys.length; ++i2) { + var key = objKeys[i2]; + if (skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encode2 ? encoder2 : null, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + var joined = keys.join(delimiter); + var prefix = options.addQueryPrefix === true ? "?" : ""; + return joined.length > 0 ? prefix + joined : ""; + }; + } +}); + +// node_modules/qs/lib/parse.js +var require_parse = __commonJS({ + "node_modules/qs/lib/parse.js"(exports2, module2) { + "use strict"; + var utils = require_utils3(); + var has = Object.prototype.hasOwnProperty; + var defaults = { + allowDots: false, + allowPrototypes: false, + arrayLimit: 20, + decoder: utils.decode, + delimiter: "&", + depth: 5, + parameterLimit: 1e3, + plainObjects: false, + strictNullHandling: false + }; + var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str; + var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + for (var i2 = 0; i2 < parts.length; ++i2) { + var part = parts[i2]; + var bracketEqualsPos = part.indexOf("]="); + var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1; + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder); + val = options.strictNullHandling ? null : ""; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder); + val = options.decoder(part.slice(pos + 1), defaults.decoder); + } + if (has.call(obj, key)) { + obj[key] = [].concat(obj[key]).concat(val); + } else { + obj[key] = val; + } + } + return obj; + }; + var parseObject = function(chain, val, options) { + var leaf = val; + for (var i2 = chain.length - 1; i2 >= 0; --i2) { + var obj; + var root = chain[i2]; + if (root === "[]" && options.parseArrays) { + obj = [].concat(leaf); + } else { + obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root; + var index2 = parseInt(cleanRoot, 10); + if (!options.parseArrays && cleanRoot === "") { + obj = { 0: leaf }; + } else if (!isNaN(index2) && root !== cleanRoot && String(index2) === cleanRoot && index2 >= 0 && (options.parseArrays && index2 <= options.arrayLimit)) { + obj = []; + obj[index2] = leaf; + } else if (cleanRoot !== "__proto__") { + obj[cleanRoot] = leaf; + } + } + leaf = obj; + } + return leaf; + }; + var parseKeys = function parseQueryStringKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey; + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + var segment = brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + var keys = []; + if (parent) { + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(parent); + } + var i2 = 0; + while ((segment = child.exec(key)) !== null && i2 < options.depth) { + i2 += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + if (segment) { + keys.push("[" + key.slice(segment.index) + "]"); + } + return parseObject(keys, val, options); + }; + module2.exports = function(str, opts) { + var options = opts ? utils.assign({}, opts) : {}; + if (options.decoder !== null && options.decoder !== void 0 && typeof options.decoder !== "function") { + throw new TypeError("Decoder has to be a function."); + } + options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; + options.delimiter = typeof options.delimiter === "string" || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === "number" ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === "number" ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === "function" ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === "boolean" ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === "boolean" ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === "boolean" ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === "number" ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === "boolean" ? options.strictNullHandling : defaults.strictNullHandling; + if (str === "" || str === null || typeof str === "undefined") { + return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + } + var tempObj = typeof str === "string" ? parseValues(str, options) : str; + var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + var keys = Object.keys(tempObj); + for (var i2 = 0; i2 < keys.length; ++i2) { + var key = keys[i2]; + var newObj = parseKeys(key, tempObj[key], options); + obj = utils.merge(obj, newObj, options); + } + return utils.compact(obj); + }; + } +}); + +// node_modules/qs/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/qs/lib/index.js"(exports2, module2) { + "use strict"; + var stringify = require_stringify2(); + var parse2 = require_parse(); + var formats = require_formats(); + module2.exports = { + formats, + parse: parse2, + stringify + }; + } +}); + +// node_modules/request/lib/querystring.js +var require_querystring = __commonJS({ + "node_modules/request/lib/querystring.js"(exports2) { + "use strict"; + var qs = require_lib4(); + var querystring = require("querystring"); + function Querystring(request) { + this.request = request; + this.lib = null; + this.useQuerystring = null; + this.parseOptions = null; + this.stringifyOptions = null; + } + Querystring.prototype.init = function(options) { + if (this.lib) { + return; + } + this.useQuerystring = options.useQuerystring; + this.lib = this.useQuerystring ? querystring : qs; + this.parseOptions = options.qsParseOptions || {}; + this.stringifyOptions = options.qsStringifyOptions || {}; + }; + Querystring.prototype.stringify = function(obj) { + return this.useQuerystring ? this.rfc3986(this.lib.stringify( + obj, + this.stringifyOptions.sep || null, + this.stringifyOptions.eq || null, + this.stringifyOptions + )) : this.lib.stringify(obj, this.stringifyOptions); + }; + Querystring.prototype.parse = function(str) { + return this.useQuerystring ? this.lib.parse( + str, + this.parseOptions.sep || null, + this.parseOptions.eq || null, + this.parseOptions + ) : this.lib.parse(str, this.parseOptions); + }; + Querystring.prototype.rfc3986 = function(str) { + return str.replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + Querystring.prototype.unescape = querystring.unescape; + exports2.Querystring = Querystring; + } +}); + +// node_modules/uri-js/dist/es5/uri.all.js +var require_uri_all = __commonJS({ + "node_modules/uri-js/dist/es5/uri.all.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.URI = global2.URI || {}); + })(exports2, function(exports3) { + "use strict"; + function merge() { + for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { + sets[_key] = arguments[_key]; + } + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(""); + } else { + return sets[0]; + } + } + function subexp(str) { + return "(?:" + str + ")"; + } + function typeOf(o) { + return o === void 0 ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); + } + function toUpperCase(str) { + return str.toUpperCase(); + } + function toArray(obj) { + return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; + } + function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; + } + function buildExps(isIRI2) { + var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$2, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") + //RFC 6874, with relaxed parsing rules + }; + } + var URI_PROTOCOL = buildExps(false); + var IRI_PROTOCOL = buildExps(true); + var slicedToArray = /* @__PURE__ */ function() { + function sliceIterator(arr2, i2) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr2[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i2 && _arr.length === i2) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function(arr2, i2) { + if (Array.isArray(arr2)) { + return arr2; + } else if (Symbol.iterator in Object(arr2)) { + return sliceIterator(arr2, i2); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); + var toConsumableArray = function(arr2) { + if (Array.isArray(arr2)) { + for (var i2 = 0, arr22 = Array(arr2.length); i2 < arr2.length; i2++) arr22[i2] = arr2[i2]; + return arr22; + } else { + return Array.from(arr2); + } + }; + var maxInt = 2147483647; + var base = 36; + var tMin = 1; + var tMax = 26; + var skew = 38; + var damp = 700; + var initialBias = 72; + var initialN = 128; + var delimiter = "-"; + var regexPunycode = /^xn--/; + var regexNonASCII = /[^\0-\x7E]/; + var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; + var errors = { + "overflow": "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }; + var baseMinusTMin = base - tMin; + var floor = Math.floor; + var stringFromCharCode = String.fromCharCode; + function error$1(type) { + throw new RangeError(errors[type]); + } + function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + function mapDomain(string, fn) { + var parts = string.split("@"); + var result = ""; + if (parts.length > 1) { + result = parts[0] + "@"; + string = parts[1]; + } + string = string.replace(regexSeparators, "."); + var labels = string.split("."); + var encoded = map(labels, fn).join("."); + return result + encoded; + } + function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 55296 && value <= 56319 && counter < length) { + var extra = string.charCodeAt(counter++); + if ((extra & 64512) == 56320) { + output.push(((value & 1023) << 10) + (extra & 1023) + 65536); + } else { + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + var ucs2encode = function ucs2encode2(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); + }; + var basicToDigit = function basicToDigit2(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + }; + var digitToBasic = function digitToBasic2(digit, flag) { + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + }; + var adapt = function adapt2(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for ( + ; + /* no initialization */ + delta > baseMinusTMin * tMax >> 1; + k += base + ) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + }; + var decode = function decode2(input) { + var output = []; + var inputLength = input.length; + var i2 = 0; + var n = initialN; + var bias = initialBias; + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + for (var j = 0; j < basic; ++j) { + if (input.charCodeAt(j) >= 128) { + error$1("not-basic"); + } + output.push(input.charCodeAt(j)); + } + for (var index2 = basic > 0 ? basic + 1 : 0; index2 < inputLength; ) { + var oldi = i2; + for ( + var w = 1, k = base; + ; + /* no condition */ + k += base + ) { + if (index2 >= inputLength) { + error$1("invalid-input"); + } + var digit = basicToDigit(input.charCodeAt(index2++)); + if (digit >= base || digit > floor((maxInt - i2) / w)) { + error$1("overflow"); + } + i2 += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (digit < t) { + break; + } + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1("overflow"); + } + w *= baseMinusT; + } + var out = output.length + 1; + bias = adapt(i2 - oldi, out, oldi == 0); + if (floor(i2 / out) > maxInt - n) { + error$1("overflow"); + } + n += floor(i2 / out); + i2 %= out; + output.splice(i2++, 0, n); + } + return String.fromCodePoint.apply(String, output); + }; + var encode2 = function encode3(input) { + var output = []; + input = ucs2decode(input); + var inputLength = input.length; + var n = initialN; + var delta = 0; + var bias = initialBias; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = void 0; + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + if (_currentValue2 < 128) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + var basicLength = output.length; + var handledCPCount = basicLength; + if (basicLength) { + output.push(delimiter); + } + while (handledCPCount < inputLength) { + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = void 0; + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1("overflow"); + } + delta += (m - n) * handledCPCountPlusOne; + n = m; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = void 0; + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + if (_currentValue < n && ++delta > maxInt) { + error$1("overflow"); + } + if (_currentValue == n) { + var q2 = delta; + for ( + var k = base; + ; + /* no condition */ + k += base + ) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q2 < t) { + break; + } + var qMinusT = q2 - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q2 = floor(qMinusT / baseMinusT); + } + output.push(stringFromCharCode(digitToBasic(q2, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + ++delta; + ++n; + } + return output.join(""); + }; + var toUnicode = function toUnicode2(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); + }; + var toASCII = function toASCII2(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) ? "xn--" + encode2(string) : string; + }); + }; + var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + "version": "2.1.0", + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + "ucs2": { + "decode": ucs2decode, + "encode": ucs2encode + }, + "decode": decode, + "encode": encode2, + "toASCII": toASCII, + "toUnicode": toUnicode + }; + var SCHEMES = {}; + function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase(); + else if (c < 128) e = "%" + c.toString(16).toUpperCase(); + else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; + } + function pctDecChars(str) { + var newStr = ""; + var i2 = 0; + var il = str.length; + while (i2 < il) { + var c = parseInt(str.substr(i2 + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i2 += 3; + } else if (c >= 194 && c < 224) { + if (il - i2 >= 6) { + var c2 = parseInt(str.substr(i2 + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i2, 6); + } + i2 += 6; + } else if (c >= 224) { + if (il - i2 >= 9) { + var _c = parseInt(str.substr(i2 + 4, 2), 16); + var c3 = parseInt(str.substr(i2 + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i2, 9); + } + i2 += 9; + } else { + newStr += str.substr(i2, 3); + i2 += 3; + } + } + return newStr; + } + function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved2(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== void 0) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== void 0) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== void 0) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== void 0) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== void 0) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; + } + function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; + } + function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + var _matches = slicedToArray(matches, 2), address = _matches[1]; + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } + } + function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ""; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function(acc, field, index2) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index2) { + lastLongest.length++; + } else { + acc.push({ index: index2, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function(a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } + } + var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; + var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; + function parse2(uriString) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + components.scheme = matches[1] || void 0; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : void 0; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : void 0; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : void 0; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : void 0; + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0; + } + } + if (components.host) { + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) { + components.reference = "same-document"; + } else if (components.scheme === void 0) { + components.reference = "relative"; + } else if (components.fragment === void 0) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + _normalizeComponentEncoding(components, protocol); + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; + } + function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== void 0) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== void 0) { + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + var RDS1 = /^\.\.?\//; + var RDS2 = /^\/\.(\/|$)/; + var RDS3 = /^\/\.\.(\/|$)/; + var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; + function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); + } + function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + if (protocol.IPV6ADDRESS.test(components.host)) { + } else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== void 0) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== void 0) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === void 0) { + s = s.replace(/^\/\//, "/%2F"); + } + uriTokens.push(s); + } + if (components.query !== void 0) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== void 0) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); + } + function resolveComponents(base2, relative) { + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var skipNormalization = arguments[3]; + var target = {}; + if (!skipNormalization) { + base2 = parse2(serialize(base2, options), options); + relative = parse2(serialize(relative, options), options); + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base2.path; + if (relative.query !== void 0) { + target.query = relative.query; + } else { + target.query = base2.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) { + target.path = "/" + relative.path; + } else if (!base2.path) { + target.path = relative.path; + } else { + target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + target.userinfo = base2.userinfo; + target.host = base2.host; + target.port = base2.port; + } + target.scheme = base2.scheme; + } + target.fragment = relative.fragment; + return target; + } + function resolve2(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: "null" }, options); + return serialize(resolveComponents(parse2(baseURI, schemelessOptions), parse2(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + } + function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse2(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse2(serialize(uri, options), options); + } + return uri; + } + function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse2(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse2(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; + } + function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); + } + function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); + } + var handler = { + scheme: "http", + domainHost: true, + parse: function parse3(components, options) { + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize2(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = void 0; + } + if (!components.path) { + components.path = "/"; + } + return components; + } + }; + var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize + }; + function isSecure(wsComponents) { + return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; + } + var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse3(components, options) { + var wsComponents = components; + wsComponents.secure = isSecure(wsComponents); + wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); + wsComponents.path = void 0; + wsComponents.query = void 0; + return wsComponents; + }, + serialize: function serialize2(wsComponents, options) { + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = void 0; + } + if (typeof wsComponents.secure === "boolean") { + wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; + wsComponents.secure = void 0; + } + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1]; + wsComponents.path = path && path !== "/" ? path : void 0; + wsComponents.query = query; + wsComponents.resourceName = void 0; + } + wsComponents.fragment = void 0; + return wsComponents; + } + }; + var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize + }; + var O = {}; + var isIRI = true; + var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; + var HEXDIG$$ = "[0-9A-Fa-f]"; + var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); + var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; + var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; + var VCHAR$$ = merge(QTEXT$$, '[\\"\\\\]'); + var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; + var UNRESERVED = new RegExp(UNRESERVED$$, "g"); + var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); + var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); + var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); + var NOT_HFVALUE = NOT_HFNAME; + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; + } + var handler$4 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = void 0; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = void 0; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } + }; + var URN_PARSE = /^([^\:]+)\:(.*)/; + var handler$5 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = void 0; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } + }; + var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; + var handler$6 = { + scheme: "urn:uuid", + parse: function parse3(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = void 0; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize2(uuidComponents, options) { + var urnComponents = uuidComponents; + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } + }; + SCHEMES[handler.scheme] = handler; + SCHEMES[handler$1.scheme] = handler$1; + SCHEMES[handler$2.scheme] = handler$2; + SCHEMES[handler$3.scheme] = handler$3; + SCHEMES[handler$4.scheme] = handler$4; + SCHEMES[handler$5.scheme] = handler$5; + SCHEMES[handler$6.scheme] = handler$6; + exports3.SCHEMES = SCHEMES; + exports3.pctEncChar = pctEncChar; + exports3.pctDecChars = pctDecChars; + exports3.parse = parse2; + exports3.removeDotSegments = removeDotSegments; + exports3.serialize = serialize; + exports3.resolveComponents = resolveComponents; + exports3.resolve = resolve2; + exports3.normalize = normalize; + exports3.equal = equal; + exports3.escapeComponent = escapeComponent; + exports3.unescapeComponent = unescapeComponent; + Object.defineProperty(exports3, "__esModule", { value: true }); + }); + } +}); + +// node_modules/fast-deep-equal/index.js +var require_fast_deep_equal = __commonJS({ + "node_modules/fast-deep-equal/index.js"(exports2, module2) { + "use strict"; + module2.exports = function equal(a, b) { + if (a === b) return true; + if (a && b && typeof a == "object" && typeof b == "object") { + if (a.constructor !== b.constructor) return false; + var length, i2, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i2 = length; i2-- !== 0; ) + if (!equal(a[i2], b[i2])) return false; + return true; + } + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + for (i2 = length; i2-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b, keys[i2])) return false; + for (i2 = length; i2-- !== 0; ) { + var key = keys[i2]; + if (!equal(a[key], b[key])) return false; + } + return true; + } + return a !== a && b !== b; + }; + } +}); + +// node_modules/ajv/lib/compile/ucs2length.js +var require_ucs2length = __commonJS({ + "node_modules/ajv/lib/compile/ucs2length.js"(exports2, module2) { + "use strict"; + module2.exports = function ucs2length(str) { + var length = 0, len = str.length, pos = 0, value; + while (pos < len) { + length++; + value = str.charCodeAt(pos++); + if (value >= 55296 && value <= 56319 && pos < len) { + value = str.charCodeAt(pos); + if ((value & 64512) == 56320) pos++; + } + } + return length; + }; + } +}); + +// node_modules/ajv/lib/compile/util.js +var require_util2 = __commonJS({ + "node_modules/ajv/lib/compile/util.js"(exports2, module2) { + "use strict"; + module2.exports = { + copy, + checkDataType, + checkDataTypes, + coerceToTypes, + toHash, + getProperty, + escapeQuotes, + equal: require_fast_deep_equal(), + ucs2length: require_ucs2length(), + varOccurences, + varReplace, + schemaHasRules, + schemaHasRulesExcept, + schemaUnknownRules, + toQuotedString, + getPathExpr, + getPath, + getData, + unescapeFragment, + unescapeJsonPointer, + escapeFragment, + escapeJsonPointer + }; + function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; + } + function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? " !== " : " === ", AND = negate ? " || " : " && ", OK = negate ? "!" : "", NOT = negate ? "" : "!"; + switch (dataType) { + case "null": + return data + EQUAL + "null"; + case "array": + return OK + "Array.isArray(" + data + ")"; + case "object": + return "(" + OK + data + AND + "typeof " + data + EQUAL + '"object"' + AND + NOT + "Array.isArray(" + data + "))"; + case "integer": + return "(typeof " + data + EQUAL + '"number"' + AND + NOT + "(" + data + " % 1)" + AND + data + EQUAL + data + (strictNumbers ? AND + OK + "isFinite(" + data + ")" : "") + ")"; + case "number": + return "(typeof " + data + EQUAL + '"' + dataType + '"' + (strictNumbers ? AND + OK + "isFinite(" + data + ")" : "") + ")"; + default: + return "typeof " + data + EQUAL + '"' + dataType + '"'; + } + } + function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: + return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ""; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? "(" : "(!" + data + " || "; + code += "typeof " + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? " && " : "") + checkDataType(t, data, strictNumbers, true); + return code; + } + } + var COERCE_TO_TYPES = toHash(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i2 = 0; i2 < dataTypes.length; i2++) { + var t = dataTypes[i2]; + if (COERCE_TO_TYPES[t]) types[types.length] = t; + else if (optionCoerceTypes === "array" && t === "array") types[types.length] = t; + } + if (types.length) return types; + } else if (COERCE_TO_TYPES[dataTypes]) { + return [dataTypes]; + } else if (optionCoerceTypes === "array" && dataTypes === "array") { + return ["array"]; + } + } + function toHash(arr2) { + var hash = {}; + for (var i2 = 0; i2 < arr2.length; i2++) hash[arr2[i2]] = true; + return hash; + } + var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var SINGLE_QUOTE = /'|\\/g; + function getProperty(key) { + return typeof key == "number" ? "[" + key + "]" : IDENTIFIER.test(key) ? "." + key : "['" + escapeQuotes(key) + "']"; + } + function escapeQuotes(str) { + return str.replace(SINGLE_QUOTE, "\\$&").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\f/g, "\\f").replace(/\t/g, "\\t"); + } + function varOccurences(str, dataVar) { + dataVar += "[^0-9]"; + var matches = str.match(new RegExp(dataVar, "g")); + return matches ? matches.length : 0; + } + function varReplace(str, dataVar, expr) { + dataVar += "([^0-9])"; + expr = expr.replace(/\$/g, "$$$$"); + return str.replace(new RegExp(dataVar, "g"), expr + "$1"); + } + function schemaHasRules(schema, rules) { + if (typeof schema == "boolean") return !schema; + for (var key in schema) if (rules[key]) return true; + } + function schemaHasRulesExcept(schema, rules, exceptKeyword) { + if (typeof schema == "boolean") return !schema && exceptKeyword != "not"; + for (var key in schema) if (key != exceptKeyword && rules[key]) return true; + } + function schemaUnknownRules(schema, rules) { + if (typeof schema == "boolean") return; + for (var key in schema) if (!rules[key]) return key; + } + function toQuotedString(str) { + return "'" + escapeQuotes(str) + "'"; + } + function getPathExpr(currentPath, expr, jsonPointers, isNumber) { + var path = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'"; + return joinPaths(currentPath, path); + } + function getPath(currentPath, prop, jsonPointers) { + var path = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop)); + return joinPaths(currentPath, path); + } + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, lvl, paths) { + var up, jsonPointer, data, matches; + if ($data === "") return "rootData"; + if ($data[0] == "/") { + if (!JSON_POINTER.test($data)) throw new Error("Invalid JSON-pointer: " + $data); + jsonPointer = $data; + data = "rootData"; + } else { + matches = $data.match(RELATIVE_JSON_POINTER); + if (!matches) throw new Error("Invalid JSON-pointer: " + $data); + up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer == "#") { + if (up >= lvl) throw new Error("Cannot access property/index " + up + " levels up, current level is " + lvl); + return paths[lvl - up]; + } + if (up > lvl) throw new Error("Cannot access data " + up + " levels up, current level is " + lvl); + data = "data" + (lvl - up || ""); + if (!jsonPointer) return data; + } + var expr = data; + var segments = jsonPointer.split("/"); + for (var i2 = 0; i2 < segments.length; i2++) { + var segment = segments[i2]; + if (segment) { + data += getProperty(unescapeJsonPointer(segment)); + expr += " && " + data; + } + } + return expr; + } + function joinPaths(a, b) { + if (a == '""') return b; + return (a + " + " + b).replace(/([^\\])' \+ '/g, "$1"); + } + function unescapeFragment(str) { + return unescapeJsonPointer(decodeURIComponent(str)); + } + function escapeFragment(str) { + return encodeURIComponent(escapeJsonPointer(str)); + } + function escapeJsonPointer(str) { + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + function unescapeJsonPointer(str) { + return str.replace(/~1/g, "/").replace(/~0/g, "~"); + } + } +}); + +// node_modules/ajv/lib/compile/schema_obj.js +var require_schema_obj = __commonJS({ + "node_modules/ajv/lib/compile/schema_obj.js"(exports2, module2) { + "use strict"; + var util2 = require_util2(); + module2.exports = SchemaObject; + function SchemaObject(obj) { + util2.copy(obj, this); + } + } +}); + +// node_modules/json-schema-traverse/index.js +var require_json_schema_traverse = __commonJS({ + "node_modules/json-schema-traverse/index.js"(exports2, module2) { + "use strict"; + var traverse = module2.exports = function(schema, opts, cb) { + if (typeof opts == "function") { + cb = opts; + opts = {}; + } + cb = opts.cb || cb; + var pre = typeof cb == "function" ? cb : cb.pre || function() { + }; + var post = cb.post || function() { + }; + _traverse(opts, pre, post, schema, "", schema); + }; + traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true + }; + traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true + }; + traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true + }; + traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true + }; + function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == "object" && !Array.isArray(schema)) { + pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i2 = 0; i2 < sch.length; i2++) + _traverse(opts, pre, post, sch[i2], jsonPtr + "/" + key + "/" + i2, rootSchema, jsonPtr, key, schema, i2); + } + } else if (key in traverse.propsKeywords) { + if (sch && typeof sch == "object") { + for (var prop in sch) + _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop); + } + } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) { + _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema); + } + } + post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + } + } + function escapeJsonPtr(str) { + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + } +}); + +// node_modules/ajv/lib/compile/resolve.js +var require_resolve = __commonJS({ + "node_modules/ajv/lib/compile/resolve.js"(exports2, module2) { + "use strict"; + var URI = require_uri_all(); + var equal = require_fast_deep_equal(); + var util2 = require_util2(); + var SchemaObject = require_schema_obj(); + var traverse = require_json_schema_traverse(); + module2.exports = resolve2; + resolve2.normalizeId = normalizeId; + resolve2.fullPath = getFullPath; + resolve2.url = resolveUrl; + resolve2.ids = resolveIds; + resolve2.inlineRef = inlineRef; + resolve2.schema = resolveSchema; + function resolve2(compile, root, ref) { + var refVal = this._refs[ref]; + if (typeof refVal == "string") { + if (this._refs[refVal]) refVal = this._refs[refVal]; + else return resolve2.call(this, compile, root, refVal); + } + refVal = refVal || this._schemas[ref]; + if (refVal instanceof SchemaObject) { + return inlineRef(refVal.schema, this._opts.inlineRefs) ? refVal.schema : refVal.validate || this._compile(refVal); + } + var res = resolveSchema.call(this, root, ref); + var schema, v, baseId; + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + if (schema instanceof SchemaObject) { + v = schema.validate || compile.call(this, schema.schema, root, void 0, baseId); + } else if (schema !== void 0) { + v = inlineRef(schema, this._opts.inlineRefs) ? schema : compile.call(this, schema, root, void 0, baseId); + } + return v; + } + function resolveSchema(root, ref) { + var p = URI.parse(ref), refPath = _getFullPath(p), baseId = getFullPath(this._getId(root.schema)); + if (Object.keys(root.schema).length === 0 || refPath !== baseId) { + var id = normalizeId(refPath); + var refVal = this._refs[id]; + if (typeof refVal == "string") { + return resolveRecursive.call(this, root, refVal, p); + } else if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + root = refVal; + } else { + refVal = this._schemas[id]; + if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + if (id == normalizeId(ref)) + return { schema: refVal, root, baseId }; + root = refVal; + } else { + return; + } + } + if (!root.schema) return; + baseId = getFullPath(this._getId(root.schema)); + } + return getJsonPointer.call(this, p, baseId, root.schema, root); + } + function resolveRecursive(root, ref, parsedRef) { + var res = resolveSchema.call(this, root, ref); + if (res) { + var schema = res.schema; + var baseId = res.baseId; + root = res.root; + var id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + return getJsonPointer.call(this, parsedRef, baseId, schema, root); + } + } + var PREVENT_SCOPE_CHANGE = util2.toHash(["properties", "patternProperties", "enum", "dependencies", "definitions"]); + function getJsonPointer(parsedRef, baseId, schema, root) { + parsedRef.fragment = parsedRef.fragment || ""; + if (parsedRef.fragment.slice(0, 1) != "/") return; + var parts = parsedRef.fragment.split("/"); + for (var i2 = 1; i2 < parts.length; i2++) { + var part = parts[i2]; + if (part) { + part = util2.unescapeFragment(part); + schema = schema[part]; + if (schema === void 0) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + if (schema.$ref) { + var $ref = resolveUrl(baseId, schema.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + } + } + } + } + if (schema !== void 0 && schema !== root.schema) + return { schema, root, baseId }; + } + var SIMPLE_INLINED = util2.toHash([ + "type", + "format", + "pattern", + "maxLength", + "minLength", + "maxProperties", + "minProperties", + "maxItems", + "minItems", + "maximum", + "minimum", + "uniqueItems", + "multipleOf", + "required", + "enum" + ]); + function inlineRef(schema, limit) { + if (limit === false) return false; + if (limit === void 0 || limit === true) return checkNoRef(schema); + else if (limit) return countKeys(schema) <= limit; + } + function checkNoRef(schema) { + var item; + if (Array.isArray(schema)) { + for (var i2 = 0; i2 < schema.length; i2++) { + item = schema[i2]; + if (typeof item == "object" && !checkNoRef(item)) return false; + } + } else { + for (var key in schema) { + if (key == "$ref") return false; + item = schema[key]; + if (typeof item == "object" && !checkNoRef(item)) return false; + } + } + return true; + } + function countKeys(schema) { + var count = 0, item; + if (Array.isArray(schema)) { + for (var i2 = 0; i2 < schema.length; i2++) { + item = schema[i2]; + if (typeof item == "object") count += countKeys(item); + if (count == Infinity) return Infinity; + } + } else { + for (var key in schema) { + if (key == "$ref") return Infinity; + if (SIMPLE_INLINED[key]) { + count++; + } else { + item = schema[key]; + if (typeof item == "object") count += countKeys(item) + 1; + if (count == Infinity) return Infinity; + } + } + } + return count; + } + function getFullPath(id, normalize) { + if (normalize !== false) id = normalizeId(id); + var p = URI.parse(id); + return _getFullPath(p); + } + function _getFullPath(p) { + return URI.serialize(p).split("#")[0] + "#"; + } + var TRAILING_SLASH_HASH = /#\/?$/; + function normalizeId(id) { + return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; + } + function resolveUrl(baseId, id) { + id = normalizeId(id); + return URI.resolve(baseId, id); + } + function resolveIds(schema) { + var schemaId = normalizeId(this._getId(schema)); + var baseIds = { "": schemaId }; + var fullPaths = { "": getFullPath(schemaId, false) }; + var localRefs = {}; + var self2 = this; + traverse(schema, { allKeys: true }, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (jsonPtr === "") return; + var id = self2._getId(sch); + var baseId = baseIds[parentJsonPtr]; + var fullPath = fullPaths[parentJsonPtr] + "/" + parentKeyword; + if (keyIndex !== void 0) + fullPath += "/" + (typeof keyIndex == "number" ? keyIndex : util2.escapeFragment(keyIndex)); + if (typeof id == "string") { + id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id); + var refVal = self2._refs[id]; + if (typeof refVal == "string") refVal = self2._refs[refVal]; + if (refVal && refVal.schema) { + if (!equal(sch, refVal.schema)) + throw new Error('id "' + id + '" resolves to more than one schema'); + } else if (id != normalizeId(fullPath)) { + if (id[0] == "#") { + if (localRefs[id] && !equal(sch, localRefs[id])) + throw new Error('id "' + id + '" resolves to more than one schema'); + localRefs[id] = sch; + } else { + self2._refs[id] = fullPath; + } + } + } + baseIds[jsonPtr] = baseId; + fullPaths[jsonPtr] = fullPath; + }); + return localRefs; + } + } +}); + +// node_modules/ajv/lib/compile/error_classes.js +var require_error_classes = __commonJS({ + "node_modules/ajv/lib/compile/error_classes.js"(exports2, module2) { + "use strict"; + var resolve2 = require_resolve(); + module2.exports = { + Validation: errorSubclass(ValidationError), + MissingRef: errorSubclass(MissingRefError) + }; + function ValidationError(errors) { + this.message = "validation failed"; + this.errors = errors; + this.ajv = this.validation = true; + } + MissingRefError.message = function(baseId, ref) { + return "can't resolve reference " + ref + " from id " + baseId; + }; + function MissingRefError(baseId, ref, message) { + this.message = message || MissingRefError.message(baseId, ref); + this.missingRef = resolve2.url(baseId, ref); + this.missingSchema = resolve2.normalizeId(resolve2.fullPath(this.missingRef)); + } + function errorSubclass(Subclass) { + Subclass.prototype = Object.create(Error.prototype); + Subclass.prototype.constructor = Subclass; + return Subclass; + } + } +}); + +// node_modules/fast-json-stable-stringify/index.js +var require_fast_json_stable_stringify = __commonJS({ + "node_modules/fast-json-stable-stringify/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(data, opts) { + if (!opts) opts = {}; + if (typeof opts === "function") opts = { cmp: opts }; + var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; + var cmp = opts.cmp && /* @__PURE__ */ function(f) { + return function(node) { + return function(a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + }(opts.cmp); + var seen = []; + return function stringify(node) { + if (node && node.toJSON && typeof node.toJSON === "function") { + node = node.toJSON(); + } + if (node === void 0) return; + if (typeof node == "number") return isFinite(node) ? "" + node : "null"; + if (typeof node !== "object") return JSON.stringify(node); + var i2, out; + if (Array.isArray(node)) { + out = "["; + for (i2 = 0; i2 < node.length; i2++) { + if (i2) out += ","; + out += stringify(node[i2]) || "null"; + } + return out + "]"; + } + if (node === null) return "null"; + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify("__cycle__"); + throw new TypeError("Converting circular structure to JSON"); + } + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ""; + for (i2 = 0; i2 < keys.length; i2++) { + var key = keys[i2]; + var value = stringify(node[key]); + if (!value) continue; + if (out) out += ","; + out += JSON.stringify(key) + ":" + value; + } + seen.splice(seenIndex, 1); + return "{" + out + "}"; + }(data); + }; + } +}); + +// node_modules/ajv/lib/dotjs/validate.js +var require_validate2 = __commonJS({ + "node_modules/ajv/lib/dotjs/validate.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ""; + var $async = it.schema.$async === true, $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, "$ref"), $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = "unknown keyword: " + $unknownKwd; + if (it.opts.strictKeywords === "log") it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += " var validate = "; + if ($async) { + it.async = true; + out += "async "; + } + out += "function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; "; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += " " + ("/*# sourceURL=" + $id + " */") + " "; + } + } + if (typeof it.schema == "boolean" || !($refKeywords || it.schema.$ref)) { + var $keyword = "false schema"; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += " var " + $valid + " = false; "; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "false schema") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'boolean schema is false' "; + } + if (it.opts.verbose) { + out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + } else { + if (it.isTop) { + if ($async) { + out += " return data; "; + } else { + out += " validate.errors = null; return true; "; + } + } else { + out += " var " + $valid + " = true; "; + } + } + if (it.isTop) { + out += " }; return validate; "; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, $lvl = it.level = 0, $dataLvl = it.dataLevel = 0, $data = "data"; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== void 0 && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = "default is ignored in the schema root"; + if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += " var vErrors = null; "; + out += " var errors = 0; "; + out += " if (rootData === undefined) rootData = data; "; + } else { + var $lvl = it.level, $dataLvl = it.dataLevel, $data = "data" + ($dataLvl || ""); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error("async schema in sync schema"); + out += " var errs_" + $lvl + " = errors;"; + } + var $valid = "valid" + $lvl, $breakOnError = !it.opts.allErrors, $closingBraces1 = "", $closingBraces2 = ""; + var $errorKeyword; + var $typeSchema = it.schema.type, $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf("null") == -1) $typeSchema = $typeSchema.concat("null"); + } else if ($typeSchema != "null") { + $typeSchema = [$typeSchema, "null"]; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == "fail") { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += " " + it.RULES.all.$comment.code(it, "$comment"); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || $rulesGroup && !$shouldUseGroup($rulesGroup)) { + var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; + var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $method = $typeIsArray ? "checkDataTypes" : "checkDataType"; + out += " if (" + it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) + ") { "; + if ($coerceToTypes) { + var $dataType = "dataType" + $lvl, $coerced = "coerced" + $lvl; + out += " var " + $dataType + " = typeof " + $data + "; var " + $coerced + " = undefined; "; + if (it.opts.coerceTypes == "array") { + out += " if (" + $dataType + " == 'object' && Array.isArray(" + $data + ") && " + $data + ".length == 1) { " + $data + " = " + $data + "[0]; " + $dataType + " = typeof " + $data + "; if (" + it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers) + ") " + $coerced + " = " + $data + "; } "; + } + out += " if (" + $coerced + " !== undefined) ; "; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == "string") { + out += " else if (" + $dataType + " == 'number' || " + $dataType + " == 'boolean') " + $coerced + " = '' + " + $data + "; else if (" + $data + " === null) " + $coerced + " = ''; "; + } else if ($type == "number" || $type == "integer") { + out += " else if (" + $dataType + " == 'boolean' || " + $data + " === null || (" + $dataType + " == 'string' && " + $data + " && " + $data + " == +" + $data + " "; + if ($type == "integer") { + out += " && !(" + $data + " % 1)"; + } + out += ")) " + $coerced + " = +" + $data + "; "; + } else if ($type == "boolean") { + out += " else if (" + $data + " === 'false' || " + $data + " === 0 || " + $data + " === null) " + $coerced + " = false; else if (" + $data + " === 'true' || " + $data + " === 1) " + $coerced + " = true; "; + } else if ($type == "null") { + out += " else if (" + $data + " === '' || " + $data + " === 0 || " + $data + " === false) " + $coerced + " = null; "; + } else if (it.opts.coerceTypes == "array" && $type == "array") { + out += " else if (" + $dataType + " == 'string' || " + $dataType + " == 'number' || " + $dataType + " == 'boolean' || " + $data + " == null) " + $coerced + " = [" + $data + "]; "; + } + } + } + out += " else { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should be "; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } if (" + $coerced + " !== undefined) { "; + var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; + out += " " + $data + " = " + $coerced + "; "; + if (!$dataLvl) { + out += "if (" + $parentData + " !== undefined)"; + } + out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } "; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should be "; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + } + out += " } "; + } + } + if (it.schema.$ref && !$refKeywords) { + out += " " + it.RULES.all.$ref.code(it, "$ref") + " "; + if ($breakOnError) { + out += " } if (errors === "; + if ($top) { + out += "0"; + } else { + out += "errs_" + $lvl; + } + out += ") { "; + $closingBraces2 += "}"; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += " if (" + it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) + ") { "; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == "object" && it.schema.properties) { + var $schema = it.schema.properties, $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== void 0) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = "default is ignored for: " + $passData; + if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += " if (" + $passData + " === undefined "; + if (it.opts.useDefaults == "empty") { + out += " || " + $passData + " === null || " + $passData + " === '' "; + } + out += " ) " + $passData + " = "; + if (it.opts.useDefaults == "shared") { + out += " " + it.useDefault($sch.default) + " "; + } else { + out += " " + JSON.stringify($sch.default) + " "; + } + out += "; "; + } + } + } + } + } else if ($rulesGroup.type == "array" && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== void 0) { + var $passData = $data + "[" + $i + "]"; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = "default is ignored for: " + $passData; + if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += " if (" + $passData + " === undefined "; + if (it.opts.useDefaults == "empty") { + out += " || " + $passData + " === null || " + $passData + " === '' "; + } + out += " ) " + $passData + " = "; + if (it.opts.useDefaults == "shared") { + out += " " + it.useDefault($sch.default) + " "; + } else { + out += " " + JSON.stringify($sch.default) + " "; + } + out += "; "; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += " " + $code + " "; + if ($breakOnError) { + $closingBraces1 += "}"; + } + } + } + } + } + if ($breakOnError) { + out += " " + $closingBraces1 + " "; + $closingBraces1 = ""; + } + if ($rulesGroup.type) { + out += " } "; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += " else { "; + var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should be "; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + } + } + if ($breakOnError) { + out += " if (errors === "; + if ($top) { + out += "0"; + } else { + out += "errs_" + $lvl; + } + out += ") { "; + $closingBraces2 += "}"; + } + } + } + } + } + if ($breakOnError) { + out += " " + $closingBraces2 + " "; + } + if ($top) { + if ($async) { + out += " if (errors === 0) return data; "; + out += " else throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; "; + out += " return errors === 0; "; + } + out += " }; return validate;"; + } else { + out += " var " + $valid + " = errors === errs_" + $lvl + ";"; + } + function $shouldUseGroup($rulesGroup2) { + var rules = $rulesGroup2.rules; + for (var i4 = 0; i4 < rules.length; i4++) + if ($shouldUseRule(rules[i4])) return true; + } + function $shouldUseRule($rule2) { + return it.schema[$rule2.keyword] !== void 0 || $rule2.implements && $ruleImplementsSomeKeyword($rule2); + } + function $ruleImplementsSomeKeyword($rule2) { + var impl = $rule2.implements; + for (var i4 = 0; i4 < impl.length; i4++) + if (it.schema[impl[i4]] !== void 0) return true; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/compile/index.js +var require_compile = __commonJS({ + "node_modules/ajv/lib/compile/index.js"(exports2, module2) { + "use strict"; + var resolve2 = require_resolve(); + var util2 = require_util2(); + var errorClasses = require_error_classes(); + var stableStringify = require_fast_json_stable_stringify(); + var validateGenerator = require_validate2(); + var ucs2length = util2.ucs2length; + var equal = require_fast_deep_equal(); + var ValidationError = errorClasses.Validation; + module2.exports = compile; + function compile(schema, root, localRefs, baseId) { + var self2 = this, opts = this._opts, refVal = [void 0], refs = {}, patterns = [], patternsHash = {}, defaults = [], defaultsHash = {}, customRules = []; + root = root || { schema, refVal, refs }; + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return compilation.callValidate = callValidate; + var formats = this._formats; + var RULES = this.RULES; + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + function callValidate() { + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + function localCompile(_schema, _root, localRefs2, baseId2) { + var isRoot = !_root || _root && _root.schema == _schema; + if (_root.schema != root.schema) + return compile.call(self2, _schema, _root, localRefs2, baseId2); + var $async = _schema.$async === true; + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot, + baseId: baseId2, + root: _root, + schemaPath: "", + errSchemaPath: "#", + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES, + validate: validateGenerator, + util: util2, + resolve: resolve2, + resolveRef, + usePattern, + useDefault, + useCustomRule, + opts, + formats, + logger: self2.logger, + self: self2 + }); + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + var validate; + try { + var makeValidate = new Function( + "self", + "RULES", + "formats", + "root", + "refVal", + "defaults", + "customRules", + "equal", + "ucs2length", + "ValidationError", + sourceCode + ); + validate = makeValidate( + self2, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + refVal[0] = validate; + } catch (e) { + self2.logger.error("Error compiling schema, function code:", sourceCode); + throw e; + } + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns, + defaults + }; + } + return validate; + } + function resolveRef(baseId2, ref, isRoot) { + ref = resolve2.url(baseId2, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== void 0) { + _refVal = refVal[refIndex]; + refCode = "refVal[" + refIndex + "]"; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== void 0) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + refCode = addLocalRef(ref); + var v2 = resolve2.call(self2, localCompile, root, ref); + if (v2 === void 0) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v2 = resolve2.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root, localRefs, baseId2); + } + } + if (v2 === void 0) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v2); + return resolvedRef(v2, refCode); + } + } + function addLocalRef(ref, v2) { + var refId = refVal.length; + refVal[refId] = v2; + refs[ref] = refId; + return "refVal" + refId; + } + function removeLocalRef(ref) { + delete refs[ref]; + } + function replaceLocalRef(ref, v2) { + var refId = refs[ref]; + refVal[refId] = v2; + } + function resolvedRef(refVal2, code) { + return typeof refVal2 == "object" || typeof refVal2 == "boolean" ? { code, schema: refVal2, inline: true } : { code, $async: refVal2 && !!refVal2.$async }; + } + function usePattern(regexStr) { + var index2 = patternsHash[regexStr]; + if (index2 === void 0) { + index2 = patternsHash[regexStr] = patterns.length; + patterns[index2] = regexStr; + } + return "pattern" + index2; + } + function useDefault(value) { + switch (typeof value) { + case "boolean": + case "number": + return "" + value; + case "string": + return util2.toQuotedString(value); + case "object": + if (value === null) return "null"; + var valueStr = stableStringify(value); + var index2 = defaultsHash[valueStr]; + if (index2 === void 0) { + index2 = defaultsHash[valueStr] = defaults.length; + defaults[index2] = value; + } + return "default" + index2; + } + } + function useCustomRule(rule, schema2, parentSchema, it) { + if (self2._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error("parent schema must have all required keywords: " + deps.join(",")); + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema2); + if (!valid) { + var message = "keyword schema is invalid: " + self2.errorsText(validateSchema.errors); + if (self2._opts.validateSchema == "log") self2.logger.error(message); + else throw new Error(message); + } + } + } + var compile2 = rule.definition.compile, inline = rule.definition.inline, macro = rule.definition.macro; + var validate; + if (compile2) { + validate = compile2.call(self2, schema2, parentSchema, it); + } else if (macro) { + validate = macro.call(self2, schema2, parentSchema, it); + if (opts.validateSchema !== false) self2.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self2, it, rule.keyword, schema2, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + if (validate === void 0) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + var index2 = customRules.length; + customRules[index2] = validate; + return { + code: "customRule" + index2, + validate + }; + } + } + function checkCompiling(schema, root, baseId) { + var index2 = compIndex.call(this, schema, root, baseId); + if (index2 >= 0) return { index: index2, compiling: true }; + index2 = this._compilations.length; + this._compilations[index2] = { + schema, + root, + baseId + }; + return { index: index2, compiling: false }; + } + function endCompiling(schema, root, baseId) { + var i2 = compIndex.call(this, schema, root, baseId); + if (i2 >= 0) this._compilations.splice(i2, 1); + } + function compIndex(schema, root, baseId) { + for (var i2 = 0; i2 < this._compilations.length; i2++) { + var c = this._compilations[i2]; + if (c.schema == schema && c.root == root && c.baseId == baseId) return i2; + } + return -1; + } + function patternCode(i2, patterns) { + return "var pattern" + i2 + " = new RegExp(" + util2.toQuotedString(patterns[i2]) + ");"; + } + function defaultCode(i2) { + return "var default" + i2 + " = defaults[" + i2 + "];"; + } + function refValCode(i2, refVal) { + return refVal[i2] === void 0 ? "" : "var refVal" + i2 + " = refVal[" + i2 + "];"; + } + function customRuleCode(i2) { + return "var customRule" + i2 + " = customRules[" + i2 + "];"; + } + function vars(arr2, statement) { + if (!arr2.length) return ""; + var code = ""; + for (var i2 = 0; i2 < arr2.length; i2++) + code += statement(i2, arr2); + return code; + } + } +}); + +// node_modules/ajv/lib/cache.js +var require_cache = __commonJS({ + "node_modules/ajv/lib/cache.js"(exports2, module2) { + "use strict"; + var Cache = module2.exports = function Cache2() { + this._cache = {}; + }; + Cache.prototype.put = function Cache_put(key, value) { + this._cache[key] = value; + }; + Cache.prototype.get = function Cache_get(key) { + return this._cache[key]; + }; + Cache.prototype.del = function Cache_del(key) { + delete this._cache[key]; + }; + Cache.prototype.clear = function Cache_clear() { + this._cache = {}; + }; + } +}); + +// node_modules/ajv/lib/compile/formats.js +var require_formats2 = __commonJS({ + "node_modules/ajv/lib/compile/formats.js"(exports2, module2) { + "use strict"; + var util2 = require_util2(); + var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; + var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; + var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; + var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; + var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; + var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; + var URL2 = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; + var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; + var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; + var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; + var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + module2.exports = formats; + function formats(mode) { + mode = mode == "full" ? "full" : "fast"; + return util2.copy(formats[mode]); + } + formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + "date-time": /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + "uri-template": URITEMPLATE, + url: URL2, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + "json-pointer": JSON_POINTER, + "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + "relative-json-pointer": RELATIVE_JSON_POINTER + }; + formats.full = { + date, + time, + "date-time": date_time, + uri, + "uri-reference": URIREF, + "uri-template": URITEMPLATE, + url: URL2, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex, + uuid: UUID, + "json-pointer": JSON_POINTER, + "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, + "relative-json-pointer": RELATIVE_JSON_POINTER + }; + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + function date(str) { + var matches = str.match(DATE); + if (!matches) return false; + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); + } + function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); + } + var DATE_TIME_SEPARATOR = /t|\s/i; + function date_time(str) { + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); + } + var NOT_URI_FRAGMENT = /\/|:/; + function uri(str) { + return NOT_URI_FRAGMENT.test(str) && URI.test(str); + } + var Z_ANCHOR = /[^\\]\\Z/; + function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch (e) { + return false; + } + } + } +}); + +// node_modules/ajv/lib/dotjs/ref.js +var require_ref = __commonJS({ + "node_modules/ajv/lib/dotjs/ref.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_ref(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $async, $refCode; + if ($schema == "#" || $schema == "#/") { + if (it.isRoot) { + $async = it.async; + $refCode = "validate"; + } else { + $async = it.root.schema.$async === true; + $refCode = "root.refVal[0]"; + } + } else { + var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); + if ($refVal === void 0) { + var $message = it.MissingRefError.message(it.baseId, $schema); + if (it.opts.missingRefs == "fail") { + it.logger.error($message); + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '$ref' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { ref: '" + it.util.escapeQuotes($schema) + "' } "; + if (it.opts.messages !== false) { + out += " , message: 'can\\'t resolve reference " + it.util.escapeQuotes($schema) + "' "; + } + if (it.opts.verbose) { + out += " , schema: " + it.util.toQuotedString($schema) + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + if ($breakOnError) { + out += " if (false) { "; + } + } else if (it.opts.missingRefs == "ignore") { + it.logger.warn($message); + if ($breakOnError) { + out += " if (true) { "; + } + } else { + throw new it.MissingRefError(it.baseId, $schema, $message); + } + } else if ($refVal.inline) { + var $it = it.util.copy(it); + $it.level++; + var $nextValid = "valid" + $it.level; + $it.schema = $refVal.schema; + $it.schemaPath = ""; + $it.errSchemaPath = $schema; + var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); + out += " " + $code + " "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + } + } else { + $async = $refVal.$async === true || it.async && $refVal.$async !== false; + $refCode = $refVal.code; + } + } + if ($refCode) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.opts.passContext) { + out += " " + $refCode + ".call(this, "; + } else { + out += " " + $refCode + "( "; + } + out += " " + $data + ", (dataPath || '')"; + if (it.errorPath != '""') { + out += " + " + it.errorPath; + } + var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; + out += " , " + $parentData + " , " + $parentDataProperty + ", rootData) "; + var __callValidate = out; + out = $$outStack.pop(); + if ($async) { + if (!it.async) throw new Error("async schema referenced by sync schema"); + if ($breakOnError) { + out += " var " + $valid + "; "; + } + out += " try { await " + __callValidate + "; "; + if ($breakOnError) { + out += " " + $valid + " = true; "; + } + out += " } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; "; + if ($breakOnError) { + out += " " + $valid + " = false; "; + } + out += " } "; + if ($breakOnError) { + out += " if (" + $valid + ") { "; + } + } else { + out += " if (!" + __callValidate + ") { if (vErrors === null) vErrors = " + $refCode + ".errors; else vErrors = vErrors.concat(" + $refCode + ".errors); errors = vErrors.length; } "; + if ($breakOnError) { + out += " else { "; + } + } + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/allOf.js +var require_allOf = __commonJS({ + "node_modules/ajv/lib/dotjs/allOf.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = " "; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $currentBaseId = $it.baseId, $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += " if (true) { "; + } else { + out += " " + $closingBraces.slice(0, -1) + " "; + } + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/anyOf.js +var require_anyOf = __commonJS({ + "node_modules/ajv/lib/dotjs/anyOf.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $noEmptySchema = $schema.every(function($sch2) { + return it.opts.strictKeywords ? typeof $sch2 == "object" && Object.keys($sch2).length > 0 || $sch2 === false : it.util.schemaHasRules($sch2, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += " var " + $errs + " = errors; var " + $valid + " = false; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " " + $valid + " = " + $valid + " || " + $nextValid + "; if (!" + $valid + ") { "; + $closingBraces += "}"; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += " " + $closingBraces + " if (!" + $valid + ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should match some schema in anyOf' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; return false; "; + } + } + out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + if (it.opts.allErrors) { + out += " } "; + } + } else { + if ($breakOnError) { + out += " if (true) { "; + } + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/comment.js +var require_comment = __commonJS({ + "node_modules/ajv/lib/dotjs/comment.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_comment(it, $keyword, $ruleType) { + var out = " "; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += " console.log(" + $comment + ");"; + } else if (typeof it.opts.$comment == "function") { + out += " self._opts.$comment(" + $comment + ", " + it.util.toQuotedString($errSchemaPath) + ", validate.root.schema);"; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/const.js +var require_const = __commonJS({ + "node_modules/ajv/lib/dotjs/const.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_const(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += " var schema" + $lvl + " = validate.schema" + $schemaPath + ";"; + } + out += "var " + $valid + " = equal(" + $data + ", schema" + $lvl + "); if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'const' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValue: schema" + $lvl + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be equal to constant' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " }"; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/contains.js +var require_contains = __commonJS({ + "node_modules/ajv/lib/dotjs/contains.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_contains(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId, $nonEmptySchema = it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all); + out += "var " + $errs + " = errors;var " + $valid + ";"; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " var " + $nextValid + " = false; for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + "[" + $idx + "]"; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + out += " if (" + $nextValid + ") break; } "; + it.compositeRule = $it.compositeRule = $wasComposite; + out += " " + $closingBraces + " if (!" + $nextValid + ") {"; + } else { + out += " if (" + $data + ".length == 0) {"; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'contains' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should contain a valid item' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { "; + if ($nonEmptySchema) { + out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + } + if (it.opts.allErrors) { + out += " } "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/dependencies.js +var require_dependencies = __commonJS({ + "node_modules/ajv/lib/dotjs/dependencies.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_dependencies(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $schemaDeps = {}, $propertyDeps = {}, $ownProperties = it.opts.ownProperties; + for ($property in $schema) { + if ($property == "__proto__") continue; + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } + out += "var " + $errs + " = errors;"; + var $currentErrorPath = it.errorPath; + out += "var missing" + $lvl + ";"; + for (var $property in $propertyDeps) { + $deps = $propertyDeps[$property]; + if ($deps.length) { + out += " if ( " + $data + it.util.getProperty($property) + " !== undefined "; + if ($ownProperties) { + out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; + } + if ($breakOnError) { + out += " && ( "; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += " || "; + } + var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; + out += " ( ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; + } + } + out += ")) { "; + var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should have "; + if ($deps.length == 1) { + out += "property " + it.util.escapeQuotes($deps[0]); + } else { + out += "properties " + it.util.escapeQuotes($deps.join(", ")); + } + out += " when property " + it.util.escapeQuotes($property) + " is present' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + } else { + out += " ) { "; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += " if ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should have "; + if ($deps.length == 1) { + out += "property " + it.util.escapeQuotes($deps[0]); + } else { + out += "properties " + it.util.escapeQuotes($deps.join(", ")); + } + out += " when property " + it.util.escapeQuotes($property) + " is present' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; + } + } + } + out += " } "; + if ($breakOnError) { + $closingBraces += "}"; + out += " else { "; + } + } + } + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; + for (var $property in $schemaDeps) { + var $sch = $schemaDeps[$property]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + out += " " + $nextValid + " = true; if ( " + $data + it.util.getProperty($property) + " !== undefined "; + if ($ownProperties) { + out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; + } + out += ") { "; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($property); + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + if ($breakOnError) { + out += " " + $closingBraces + " if (" + $errs + " == errors) {"; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/enum.js +var require_enum = __commonJS({ + "node_modules/ajv/lib/dotjs/enum.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_enum(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $i = "i" + $lvl, $vSchema = "schema" + $lvl; + if (!$isData) { + out += " var " + $vSchema + " = validate.schema" + $schemaPath + ";"; + } + out += "var " + $valid + ";"; + if ($isData) { + out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; + } + out += "" + $valid + " = false;for (var " + $i + "=0; " + $i + "<" + $vSchema + ".length; " + $i + "++) if (equal(" + $data + ", " + $vSchema + "[" + $i + "])) { " + $valid + " = true; break; }"; + if ($isData) { + out += " } "; + } + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'enum' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValues: schema" + $lvl + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be equal to one of the allowed values' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " }"; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/format.js +var require_format = __commonJS({ + "node_modules/ajv/lib/dotjs/format.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_format(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + if (it.opts.format === false) { + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = "format" + $lvl, $isObject = "isObject" + $lvl, $formatType = "formatType" + $lvl; + out += " var " + $format + " = formats[" + $schemaValue + "]; var " + $isObject + " = typeof " + $format + " == 'object' && !(" + $format + " instanceof RegExp) && " + $format + ".validate; var " + $formatType + " = " + $isObject + " && " + $format + ".type || 'string'; if (" + $isObject + ") { "; + if (it.async) { + out += " var async" + $lvl + " = " + $format + ".async; "; + } + out += " " + $format + " = " + $format + ".validate; } if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; + } + out += " ("; + if ($unknownFormats != "ignore") { + out += " (" + $schemaValue + " && !" + $format + " "; + if ($allowUnknown) { + out += " && self._opts.unknownFormats.indexOf(" + $schemaValue + ") == -1 "; + } + out += ") || "; + } + out += " (" + $format + " && " + $formatType + " == '" + $ruleType + "' && !(typeof " + $format + " == 'function' ? "; + if (it.async) { + out += " (async" + $lvl + " ? await " + $format + "(" + $data + ") : " + $format + "(" + $data + ")) "; + } else { + out += " " + $format + "(" + $data + ") "; + } + out += " : " + $format + ".test(" + $data + "))))) {"; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == "ignore") { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == "object" && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || "string"; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } + if ($async) { + if (!it.async) throw new Error("async format in sync schema"); + var $formatRef = "formats" + it.util.getProperty($schema) + ".validate"; + out += " if (!(await " + $formatRef + "(" + $data + "))) { "; + } else { + out += " if (! "; + var $formatRef = "formats" + it.util.getProperty($schema); + if ($isObject) $formatRef += ".validate"; + if (typeof $format == "function") { + out += " " + $formatRef + "(" + $data + ") "; + } else { + out += " " + $formatRef + ".test(" + $data + ") "; + } + out += ") { "; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: "; + if ($isData) { + out += "" + $schemaValue; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " } "; + if (it.opts.messages !== false) { + out += ` , message: 'should match format "`; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + it.util.escapeQuotes($schema); + } + out += `"' `; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/if.js +var require_if = __commonJS({ + "node_modules/ajv/lib/dotjs/if.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_if(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = "valid" + $it.level; + var $thenSch = it.schema["then"], $elseSch = it.schema["else"], $thenPresent = $thenSch !== void 0 && (it.opts.strictKeywords ? typeof $thenSch == "object" && Object.keys($thenSch).length > 0 || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), $elsePresent = $elseSch !== void 0 && (it.opts.strictKeywords ? typeof $elseSch == "object" && Object.keys($elseSch).length > 0 || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " var " + $errs + " = errors; var " + $valid + " = true; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += " if (" + $nextValid + ") { "; + $it.schema = it.schema["then"]; + $it.schemaPath = it.schemaPath + ".then"; + $it.errSchemaPath = it.errSchemaPath + "/then"; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " " + $valid + " = " + $nextValid + "; "; + if ($thenPresent && $elsePresent) { + $ifClause = "ifClause" + $lvl; + out += " var " + $ifClause + " = 'then'; "; + } else { + $ifClause = "'then'"; + } + out += " } "; + if ($elsePresent) { + out += " else { "; + } + } else { + out += " if (!" + $nextValid + ") { "; + } + if ($elsePresent) { + $it.schema = it.schema["else"]; + $it.schemaPath = it.schemaPath + ".else"; + $it.errSchemaPath = it.errSchemaPath + "/else"; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " " + $valid + " = " + $nextValid + "; "; + if ($thenPresent && $elsePresent) { + $ifClause = "ifClause" + $lvl; + out += " var " + $ifClause + " = 'else'; "; + } else { + $ifClause = "'else'"; + } + out += " } "; + } + out += " if (!" + $valid + ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } "; + if (it.opts.messages !== false) { + out += ` , message: 'should match "' + ` + $ifClause + ` + '" schema' `; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; return false; "; + } + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + } else { + if ($breakOnError) { + out += " if (true) { "; + } + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/items.js +var require_items = __commonJS({ + "node_modules/ajv/lib/dotjs/items.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_items(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId; + out += "var " + $errs + " = errors;var " + $valid + ";"; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += " " + $valid + " = " + $data + ".length <= " + $schema.length + "; "; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + "/additionalItems"; + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schema.length + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have more than " + $schema.length + " items' "; + } + if (it.opts.verbose) { + out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += "}"; + out += " else { "; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + out += " " + $nextValid + " = true; if (" + $data + ".length > " + $i + ") { "; + var $passData = $data + "[" + $i + "]"; + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + if (typeof $additionalItems == "object" && (it.opts.strictKeywords ? typeof $additionalItems == "object" && Object.keys($additionalItems).length > 0 || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + ".additionalItems"; + $it.errSchemaPath = it.errSchemaPath + "/additionalItems"; + out += " " + $nextValid + " = true; if (" + $data + ".length > " + $schema.length + ") { for (var " + $idx + " = " + $schema.length + "; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + "[" + $idx + "]"; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + out += " } } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } else if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + "[" + $idx + "]"; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + out += " }"; + } + if ($breakOnError) { + out += " " + $closingBraces + " if (" + $errs + " == errors) {"; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/_limit.js +var require_limit = __commonJS({ + "node_modules/ajv/lib/dotjs/_limit.js"(exports2, module2) { + "use strict"; + module2.exports = function generate__limit(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == "maximum", $exclusiveKeyword = $isMax ? "exclusiveMaximum" : "exclusiveMinimum", $schemaExcl = it.schema[$exclusiveKeyword], $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, $op = $isMax ? "<" : ">", $notOp = $isMax ? ">" : "<", $errorKeyword = void 0; + if (!($isData || typeof $schema == "number" || $schema === void 0)) { + throw new Error($keyword + " must be number"); + } + if (!($isDataExcl || $schemaExcl === void 0 || typeof $schemaExcl == "number" || typeof $schemaExcl == "boolean")) { + throw new Error($exclusiveKeyword + " must be number or boolean"); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = "exclusive" + $lvl, $exclType = "exclType" + $lvl, $exclIsNumber = "exclIsNumber" + $lvl, $opExpr = "op" + $lvl, $opStr = "' + " + $opExpr + " + '"; + out += " var schemaExcl" + $lvl + " = " + $schemaValueExcl + "; "; + $schemaValueExcl = "schemaExcl" + $lvl; + out += " var " + $exclusive + "; var " + $exclType + " = typeof " + $schemaValueExcl + "; if (" + $exclType + " != 'boolean' && " + $exclType + " != 'undefined' && " + $exclType + " != 'number') { "; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: '" + $exclusiveKeyword + " should be boolean' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; "; + if ($schema === void 0) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = "'" + $opStr + "'"; + out += " if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " ( " + $schemaValue + " === undefined || " + $schemaExcl + " " + $op + "= " + $schemaValue + " ? " + $data + " " + $notOp + "= " + $schemaExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { "; + } else { + if ($exclIsNumber && $schema === void 0) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += "="; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; + $notOp += "="; + } else { + $exclusive = false; + $opStr += "="; + } + } + var $opExpr = "'" + $opStr + "'"; + out += " if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " " + $data + " " + $notOp + " " + $schemaValue + " || " + $data + " !== " + $data + ") { "; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be " + $opStr + " "; + if ($isData) { + out += "' + " + $schemaValue; + } else { + out += "" + $schemaValue + "'"; + } + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/_limitItems.js +var require_limitItems = __commonJS({ + "node_modules/ajv/lib/dotjs/_limitItems.js"(exports2, module2) { + "use strict"; + module2.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + var $op = $keyword == "maxItems" ? ">" : "<"; + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " " + $data + ".length " + $op + " " + $schemaValue + ") { "; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have "; + if ($keyword == "maxItems") { + out += "more"; + } else { + out += "fewer"; + } + out += " than "; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + $schema; + } + out += " items' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/_limitLength.js +var require_limitLength = __commonJS({ + "node_modules/ajv/lib/dotjs/_limitLength.js"(exports2, module2) { + "use strict"; + module2.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + var $op = $keyword == "maxLength" ? ">" : "<"; + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + if (it.opts.unicode === false) { + out += " " + $data + ".length "; + } else { + out += " ucs2length(" + $data + ") "; + } + out += " " + $op + " " + $schemaValue + ") { "; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT be "; + if ($keyword == "maxLength") { + out += "longer"; + } else { + out += "shorter"; + } + out += " than "; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + $schema; + } + out += " characters' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/_limitProperties.js +var require_limitProperties = __commonJS({ + "node_modules/ajv/lib/dotjs/_limitProperties.js"(exports2, module2) { + "use strict"; + module2.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + var $op = $keyword == "maxProperties" ? ">" : "<"; + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { "; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have "; + if ($keyword == "maxProperties") { + out += "more"; + } else { + out += "fewer"; + } + out += " than "; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + $schema; + } + out += " properties' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/multipleOf.js +var require_multipleOf = __commonJS({ + "node_modules/ajv/lib/dotjs/multipleOf.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + out += "var division" + $lvl + ";if ("; + if ($isData) { + out += " " + $schemaValue + " !== undefined && ( typeof " + $schemaValue + " != 'number' || "; + } + out += " (division" + $lvl + " = " + $data + " / " + $schemaValue + ", "; + if (it.opts.multipleOfPrecision) { + out += " Math.abs(Math.round(division" + $lvl + ") - division" + $lvl + ") > 1e-" + it.opts.multipleOfPrecision + " "; + } else { + out += " division" + $lvl + " !== parseInt(division" + $lvl + ") "; + } + out += " ) "; + if ($isData) { + out += " ) "; + } + out += " ) { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be multiple of "; + if ($isData) { + out += "' + " + $schemaValue; + } else { + out += "" + $schemaValue + "'"; + } + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/not.js +var require_not = __commonJS({ + "node_modules/ajv/lib/dotjs/not.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_not(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = "valid" + $it.level; + if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " var " + $errs + " = errors; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += " " + it.validate($it) + " "; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += " if (" + $nextValid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT be valid' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + if (it.opts.allErrors) { + out += " } "; + } + } else { + out += " var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT be valid' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if ($breakOnError) { + out += " if (false) { "; + } + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/oneOf.js +var require_oneOf = __commonJS({ + "node_modules/ajv/lib/dotjs/oneOf.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $currentBaseId = $it.baseId, $prevValid = "prevValid" + $lvl, $passingSchemas = "passingSchemas" + $lvl; + out += "var " + $errs + " = errors , " + $prevValid + " = false , " + $valid + " = false , " + $passingSchemas + " = null; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + } else { + out += " var " + $nextValid + " = true; "; + } + if ($i) { + out += " if (" + $nextValid + " && " + $prevValid + ") { " + $valid + " = false; " + $passingSchemas + " = [" + $passingSchemas + ", " + $i + "]; } else { "; + $closingBraces += "}"; + } + out += " if (" + $nextValid + ") { " + $valid + " = " + $prevValid + " = true; " + $passingSchemas + " = " + $i + "; }"; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += "" + $closingBraces + "if (!" + $valid + ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should match exactly one schema in oneOf' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; return false; "; + } + } + out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }"; + if (it.opts.allErrors) { + out += " } "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/pattern.js +var require_pattern = __commonJS({ + "node_modules/ajv/lib/dotjs/pattern.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? "(new RegExp(" + $schemaValue + "))" : it.usePattern($schema); + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; + } + out += " !" + $regexp + ".test(" + $data + ") ) { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: "; + if ($isData) { + out += "" + $schemaValue; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " } "; + if (it.opts.messages !== false) { + out += ` , message: 'should match pattern "`; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + it.util.escapeQuotes($schema); + } + out += `"' `; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/properties.js +var require_properties = __commonJS({ + "node_modules/ajv/lib/dotjs/properties.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_properties(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $key = "key" + $lvl, $idx = "idx" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties).filter(notProto), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, $additionalIsSchema = typeof $aProperties == "object" && Object.keys($aProperties).length, $removeAdditional = it.opts.removeAdditional, $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + function notProto(p) { + return p !== "__proto__"; + } + out += "var " + $errs + " = errors;var " + $nextValid + " = true;"; + if ($ownProperties) { + out += " var " + $dataProperties + " = undefined;"; + } + if ($checkAdditional) { + if ($ownProperties) { + out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; + } else { + out += " for (var " + $key + " in " + $data + ") { "; + } + if ($someProperties) { + out += " var isAdditional" + $lvl + " = !(false "; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") "; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += " || " + $key + " == " + it.util.toQuotedString($propertyKey) + " "; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += " || " + it.usePattern($pProperty) + ".test(" + $key + ") "; + } + } + } + out += " ); if (isAdditional" + $lvl + ") { "; + } + if ($removeAdditional == "all") { + out += " delete " + $data + "[" + $key + "]; "; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = "' + " + $key + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += " delete " + $data + "[" + $key + "]; "; + } else { + out += " " + $nextValid + " = false; "; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + "/additionalProperties"; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { additionalProperty: '" + $additionalProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is an invalid additional property"; + } else { + out += "should NOT have additional properties"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += " break; "; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == "failing") { + out += " var " + $errs + " = errors; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + ".additionalProperties"; + $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + "[" + $key + "]"; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + out += " if (!" + $nextValid + ") { errors = " + $errs + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + $data + "[" + $key + "]; } "; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + ".additionalProperties"; + $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + "[" + $key + "]"; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += " } "; + } + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== void 0; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += " var " + $nextData + " = " + $passData + "; "; + } + if ($hasDefault) { + out += " " + $code + " "; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += " if ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") { " + $nextValid + " = false; "; + var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + "/required"; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += " } else { "; + } else { + if ($breakOnError) { + out += " if ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") { " + $nextValid + " = true; } else { "; + } else { + out += " if (" + $useData + " !== undefined "; + if ($ownProperties) { + out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += " ) { "; + } + } + out += " " + $code + " } "; + } + } + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; + } else { + out += " for (var " + $key + " in " + $data + ") { "; + } + out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + "[" + $key + "]"; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + out += " } "; + if ($breakOnError) { + out += " else " + $nextValid + " = true; "; + } + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + } + if ($breakOnError) { + out += " " + $closingBraces + " if (" + $errs + " == errors) {"; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/propertyNames.js +var require_propertyNames = __commonJS({ + "node_modules/ajv/lib/dotjs/propertyNames.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + out += "var " + $errs + " = errors;"; + if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = "key" + $lvl, $idx = "idx" + $lvl, $i = "i" + $lvl, $invalidName = "' + " + $key + " + '", $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; + if ($ownProperties) { + out += " var " + $dataProperties + " = undefined; "; + } + if ($ownProperties) { + out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; + } else { + out += " for (var " + $key + " in " + $data + ") { "; + } + out += " var startErrs" + $lvl + " = errors; "; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + " 0 || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, $loopRequired = $isData || $required.length >= it.opts.loopRequired, $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += " var missing" + $lvl + "; "; + if ($loopRequired) { + if (!$isData) { + out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; + } + var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += " var " + $valid + " = true; "; + if ($isData) { + out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; + } + out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { " + $valid + " = " + $data + "[" + $vSchema + "[" + $i + "]] !== undefined "; + if ($ownProperties) { + out += " && Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; + } + out += "; if (!" + $valid + ") break; } "; + if ($isData) { + out += " } "; + } + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { "; + } else { + out += " if ( "; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += " || "; + } + var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; + out += " ( ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; + } + } + out += ") { "; + var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { "; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; + } + var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += " if (" + $vSchema + " && !Array.isArray(" + $vSchema + ")) { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + $vSchema + " !== undefined) { "; + } + out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { if (" + $data + "[" + $vSchema + "[" + $i + "]] === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; + } + out += ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } "; + if ($isData) { + out += " } "; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += " if ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += " if (true) {"; + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/uniqueItems.js +var require_uniqueItems = __commonJS({ + "node_modules/ajv/lib/dotjs/uniqueItems.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += " var " + $valid + "; if (" + $schemaValue + " === false || " + $schemaValue + " === undefined) " + $valid + " = true; else if (typeof " + $schemaValue + " != 'boolean') " + $valid + " = false; else { "; + } + out += " var i = " + $data + ".length , " + $valid + " = true , j; if (i > 1) { "; + var $itemType = it.schema.items && it.schema.items.type, $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == "object" || $itemType == "array" || $typeIsArray && ($itemType.indexOf("object") >= 0 || $itemType.indexOf("array") >= 0)) { + out += " outer: for (;i--;) { for (j = i; j--;) { if (equal(" + $data + "[i], " + $data + "[j])) { " + $valid + " = false; break outer; } } } "; + } else { + out += " var itemIndices = {}, item; for (;i--;) { var item = " + $data + "[i]; "; + var $method = "checkDataType" + ($typeIsArray ? "s" : ""); + out += " if (" + it.util[$method]($itemType, "item", it.opts.strictNumbers, true) + ") continue; "; + if ($typeIsArray) { + out += ` if (typeof item == 'string') item = '"' + item; `; + } + out += " if (typeof itemIndices[item] == 'number') { " + $valid + " = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "; + } + out += " } "; + if ($isData) { + out += " } "; + } + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + } else { + if ($breakOnError) { + out += " if (true) { "; + } + } + return out; + }; + } +}); + +// node_modules/ajv/lib/dotjs/index.js +var require_dotjs = __commonJS({ + "node_modules/ajv/lib/dotjs/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + "$ref": require_ref(), + allOf: require_allOf(), + anyOf: require_anyOf(), + "$comment": require_comment(), + const: require_const(), + contains: require_contains(), + dependencies: require_dependencies(), + "enum": require_enum(), + format: require_format(), + "if": require_if(), + items: require_items(), + maximum: require_limit(), + minimum: require_limit(), + maxItems: require_limitItems(), + minItems: require_limitItems(), + maxLength: require_limitLength(), + minLength: require_limitLength(), + maxProperties: require_limitProperties(), + minProperties: require_limitProperties(), + multipleOf: require_multipleOf(), + not: require_not(), + oneOf: require_oneOf(), + pattern: require_pattern(), + properties: require_properties(), + propertyNames: require_propertyNames(), + required: require_required(), + uniqueItems: require_uniqueItems(), + validate: require_validate2() + }; + } +}); + +// node_modules/ajv/lib/compile/rules.js +var require_rules = __commonJS({ + "node_modules/ajv/lib/compile/rules.js"(exports2, module2) { + "use strict"; + var ruleModules = require_dotjs(); + var toHash = require_util2().toHash; + module2.exports = function rules() { + var RULES = [ + { + type: "number", + rules: [ + { "maximum": ["exclusiveMaximum"] }, + { "minimum": ["exclusiveMinimum"] }, + "multipleOf", + "format" + ] + }, + { + type: "string", + rules: ["maxLength", "minLength", "pattern", "format"] + }, + { + type: "array", + rules: ["maxItems", "minItems", "items", "contains", "uniqueItems"] + }, + { + type: "object", + rules: [ + "maxProperties", + "minProperties", + "required", + "dependencies", + "propertyNames", + { "properties": ["additionalProperties", "patternProperties"] } + ] + }, + { rules: ["$ref", "const", "enum", "not", "anyOf", "oneOf", "allOf", "if"] } + ]; + var ALL = ["type", "$comment"]; + var KEYWORDS = [ + "$schema", + "$id", + "id", + "$data", + "$async", + "title", + "description", + "default", + "definitions", + "examples", + "readOnly", + "writeOnly", + "contentMediaType", + "contentEncoding", + "additionalItems", + "then", + "else" + ]; + var TYPES = ["number", "integer", "string", "array", "object", "boolean", "null"]; + RULES.all = toHash(ALL); + RULES.types = toHash(TYPES); + RULES.forEach(function(group) { + group.rules = group.rules.map(function(keyword) { + var implKeywords; + if (typeof keyword == "object") { + var key = Object.keys(keyword)[0]; + implKeywords = keyword[key]; + keyword = key; + implKeywords.forEach(function(k) { + ALL.push(k); + RULES.all[k] = true; + }); + } + ALL.push(keyword); + var rule = RULES.all[keyword] = { + keyword, + code: ruleModules[keyword], + implements: implKeywords + }; + return rule; + }); + RULES.all.$comment = { + keyword: "$comment", + code: ruleModules.$comment + }; + if (group.type) RULES.types[group.type] = group; + }); + RULES.keywords = toHash(ALL.concat(KEYWORDS)); + RULES.custom = {}; + return RULES; + }; + } +}); + +// node_modules/ajv/lib/data.js +var require_data = __commonJS({ + "node_modules/ajv/lib/data.js"(exports2, module2) { + "use strict"; + var KEYWORDS = [ + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "additionalItems", + "maxItems", + "minItems", + "uniqueItems", + "maxProperties", + "minProperties", + "required", + "additionalProperties", + "enum", + "format", + "const" + ]; + module2.exports = function(metaSchema, keywordsJsonPointers) { + for (var i2 = 0; i2 < keywordsJsonPointers.length; i2++) { + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + var segments = keywordsJsonPointers[i2].split("/"); + var keywords = metaSchema; + var j; + for (j = 1; j < segments.length; j++) + keywords = keywords[segments[j]]; + for (j = 0; j < KEYWORDS.length; j++) { + var key = KEYWORDS[j]; + var schema = keywords[key]; + if (schema) { + keywords[key] = { + anyOf: [ + schema, + { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" } + ] + }; + } + } + } + return metaSchema; + }; + } +}); + +// node_modules/ajv/lib/compile/async.js +var require_async2 = __commonJS({ + "node_modules/ajv/lib/compile/async.js"(exports2, module2) { + "use strict"; + var MissingRefError = require_error_classes().MissingRef; + module2.exports = compileAsync; + function compileAsync(schema, meta2, callback) { + var self2 = this; + if (typeof this._opts.loadSchema != "function") + throw new Error("options.loadSchema should be a function"); + if (typeof meta2 == "function") { + callback = meta2; + meta2 = void 0; + } + var p = loadMetaSchemaOf(schema).then(function() { + var schemaObj = self2._addSchema(schema, void 0, meta2); + return schemaObj.validate || _compileAsync(schemaObj); + }); + if (callback) { + p.then( + function(v) { + callback(null, v); + }, + callback + ); + } + return p; + function loadMetaSchemaOf(sch) { + var $schema = sch.$schema; + return $schema && !self2.getSchema($schema) ? compileAsync.call(self2, { $ref: $schema }, true) : Promise.resolve(); + } + function _compileAsync(schemaObj) { + try { + return self2._compile(schemaObj); + } catch (e) { + if (e instanceof MissingRefError) return loadMissingSchema(e); + throw e; + } + function loadMissingSchema(e) { + var ref = e.missingSchema; + if (added(ref)) throw new Error("Schema " + ref + " is loaded but " + e.missingRef + " cannot be resolved"); + var schemaPromise = self2._loadingSchemas[ref]; + if (!schemaPromise) { + schemaPromise = self2._loadingSchemas[ref] = self2._opts.loadSchema(ref); + schemaPromise.then(removePromise, removePromise); + } + return schemaPromise.then(function(sch) { + if (!added(ref)) { + return loadMetaSchemaOf(sch).then(function() { + if (!added(ref)) self2.addSchema(sch, ref, void 0, meta2); + }); + } + }).then(function() { + return _compileAsync(schemaObj); + }); + function removePromise() { + delete self2._loadingSchemas[ref]; + } + function added(ref2) { + return self2._refs[ref2] || self2._schemas[ref2]; + } + } + } + } + } +}); + +// node_modules/ajv/lib/dotjs/custom.js +var require_custom = __commonJS({ + "node_modules/ajv/lib/dotjs/custom.js"(exports2, module2) { + "use strict"; + module2.exports = function generate_custom(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, $definition = "definition" + $lvl, $rDef = $rule.definition, $closingBraces = ""; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = "keywordValidate" + $lvl; + var $validateSchema = $rDef.validateSchema; + out += " var " + $definition + " = RULES.custom['" + $keyword + "'].definition; var " + $validateCode + " = " + $definition + ".validate;"; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = "validate.schema" + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + ".errors", $i = "i" + $lvl, $ruleErr = "ruleErr" + $lvl, $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error("async keyword in sync schema"); + if (!($inline || $macro)) { + out += "" + $ruleErrs + " = null;"; + } + out += "var " + $errs + " = errors;var " + $valid + ";"; + if ($isData && $rDef.$data) { + $closingBraces += "}"; + out += " if (" + $schemaValue + " === undefined) { " + $valid + " = true; } else { "; + if ($validateSchema) { + $closingBraces += "}"; + out += " " + $valid + " = " + $definition + ".validateSchema(" + $schemaValue + "); if (" + $valid + ") { "; + } + } + if ($inline) { + if ($rDef.statements) { + out += " " + $ruleValidate.validate + " "; + } else { + out += " " + $valid + " = " + $ruleValidate.validate + "; "; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ""; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += " " + $code; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + out += " " + $validateCode + ".call( "; + if (it.opts.passContext) { + out += "this"; + } else { + out += "self"; + } + if ($compile || $rDef.schema === false) { + out += " , " + $data + " "; + } else { + out += " , " + $schemaValue + " , " + $data + " , validate.schema" + it.schemaPath + " "; + } + out += " , (dataPath || '')"; + if (it.errorPath != '""') { + out += " + " + it.errorPath; + } + var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; + out += " , " + $parentData + " , " + $parentDataProperty + " , rootData ) "; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += " " + $valid + " = "; + if ($asyncKeyword) { + out += "await "; + } + out += "" + def_callRuleValidate + "; "; + } else { + if ($asyncKeyword) { + $ruleErrs = "customErrors" + $lvl; + out += " var " + $ruleErrs + " = null; try { " + $valid + " = await " + def_callRuleValidate + "; } catch (e) { " + $valid + " = false; if (e instanceof ValidationError) " + $ruleErrs + " = e.errors; else throw e; } "; + } else { + out += " " + $ruleErrs + " = null; " + $valid + " = " + def_callRuleValidate + "; "; + } + } + } + if ($rDef.modifying) { + out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"; + } + out += "" + $closingBraces; + if ($rDef.valid) { + if ($breakOnError) { + out += " if (true) { "; + } + } else { + out += " if ( "; + if ($rDef.valid === void 0) { + out += " !"; + if ($macro) { + out += "" + $nextValid; + } else { + out += "" + $valid; + } + } else { + out += " " + !$rDef.valid + " "; + } + out += ") { "; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } "; + if (it.opts.messages !== false) { + out += ` , message: 'should pass "` + $rule.keyword + `" keyword validation' `; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != "full") { + out += " for (var " + $i + "=" + $errs + "; " + $i + " b ? 1 : a < b ? -1 : 0; + } + function generateBase(httpMethod, base_uri, params) { + var normalized = map(params).map(function(p) { + return [rfc3986(p[0]), rfc3986(p[1] || "")]; + }).sort(function(a, b) { + return compare(a[0], b[0]) || compare(a[1], b[1]); + }).map(function(p) { + return p.join("="); + }).join("&"); + var base = [ + rfc3986(httpMethod ? httpMethod.toUpperCase() : "GET"), + rfc3986(base_uri), + rfc3986(normalized) + ].join("&"); + return base; + } + function hmacsign(httpMethod, base_uri, params, consumer_secret, token_secret) { + var base = generateBase(httpMethod, base_uri, params); + var key = [ + consumer_secret || "", + token_secret || "" + ].map(rfc3986).join("&"); + return sha(key, base, "sha1"); + } + function hmacsign256(httpMethod, base_uri, params, consumer_secret, token_secret) { + var base = generateBase(httpMethod, base_uri, params); + var key = [ + consumer_secret || "", + token_secret || "" + ].map(rfc3986).join("&"); + return sha(key, base, "sha256"); + } + function rsasign(httpMethod, base_uri, params, private_key, token_secret) { + var base = generateBase(httpMethod, base_uri, params); + var key = private_key || ""; + return rsa(key, base); + } + function plaintext(consumer_secret, token_secret) { + var key = [ + consumer_secret || "", + token_secret || "" + ].map(rfc3986).join("&"); + return key; + } + function sign(signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { + var method; + var skipArgs = 1; + switch (signMethod) { + case "RSA-SHA1": + method = rsasign; + break; + case "HMAC-SHA1": + method = hmacsign; + break; + case "HMAC-SHA256": + method = hmacsign256; + break; + case "PLAINTEXT": + method = plaintext; + skipArgs = 4; + break; + default: + throw new Error("Signature method not supported: " + signMethod); + } + return method.apply(null, [].slice.call(arguments, skipArgs)); + } + exports2.hmacsign = hmacsign; + exports2.hmacsign256 = hmacsign256; + exports2.rsasign = rsasign; + exports2.plaintext = plaintext; + exports2.sign = sign; + exports2.rfc3986 = rfc3986; + exports2.generateBase = generateBase; + } +}); + +// node_modules/request/lib/oauth.js +var require_oauth = __commonJS({ + "node_modules/request/lib/oauth.js"(exports2) { + "use strict"; + var url = require("url"); + var qs = require_lib4(); + var caseless = require_caseless(); + var uuid = require_v4(); + var oauth = require_oauth_sign(); + var crypto2 = require("crypto"); + var Buffer2 = require_safe_buffer().Buffer; + function OAuth(request) { + this.request = request; + this.params = null; + } + OAuth.prototype.buildParams = function(_oauth, uri, method, query, form, qsLib) { + var oa = {}; + for (var i2 in _oauth) { + oa["oauth_" + i2] = _oauth[i2]; + } + if (!oa.oauth_version) { + oa.oauth_version = "1.0"; + } + if (!oa.oauth_timestamp) { + oa.oauth_timestamp = Math.floor(Date.now() / 1e3).toString(); + } + if (!oa.oauth_nonce) { + oa.oauth_nonce = uuid().replace(/-/g, ""); + } + if (!oa.oauth_signature_method) { + oa.oauth_signature_method = "HMAC-SHA1"; + } + var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key; + delete oa.oauth_consumer_secret; + delete oa.oauth_private_key; + var token_secret = oa.oauth_token_secret; + delete oa.oauth_token_secret; + var realm = oa.oauth_realm; + delete oa.oauth_realm; + delete oa.oauth_transport_method; + var baseurl = uri.protocol + "//" + uri.host + uri.pathname; + var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join("&")); + oa.oauth_signature = oauth.sign( + oa.oauth_signature_method, + method, + baseurl, + params, + consumer_secret_or_private_key, + // eslint-disable-line camelcase + token_secret + // eslint-disable-line camelcase + ); + if (realm) { + oa.realm = realm; + } + return oa; + }; + OAuth.prototype.buildBodyHash = function(_oauth, body) { + if (["HMAC-SHA1", "RSA-SHA1"].indexOf(_oauth.signature_method || "HMAC-SHA1") < 0) { + this.request.emit("error", new Error("oauth: " + _oauth.signature_method + " signature_method not supported with body_hash signing.")); + } + var shasum = crypto2.createHash("sha1"); + shasum.update(body || ""); + var sha1 = shasum.digest("hex"); + return Buffer2.from(sha1, "hex").toString("base64"); + }; + OAuth.prototype.concatParams = function(oa, sep, wrap) { + wrap = wrap || ""; + var params = Object.keys(oa).filter(function(i2) { + return i2 !== "realm" && i2 !== "oauth_signature"; + }).sort(); + if (oa.realm) { + params.splice(0, 0, "realm"); + } + params.push("oauth_signature"); + return params.map(function(i2) { + return i2 + "=" + wrap + oauth.rfc3986(oa[i2]) + wrap; + }).join(sep); + }; + OAuth.prototype.onRequest = function(_oauth) { + var self2 = this; + self2.params = _oauth; + var uri = self2.request.uri || {}; + var method = self2.request.method || ""; + var headers = caseless(self2.request.headers); + var body = self2.request.body || ""; + var qsLib = self2.request.qsLib || qs; + var form; + var query; + var contentType = headers.get("content-type") || ""; + var formContentType = "application/x-www-form-urlencoded"; + var transport = _oauth.transport_method || "header"; + if (contentType.slice(0, formContentType.length) === formContentType) { + contentType = formContentType; + form = body; + } + if (uri.query) { + query = uri.query; + } + if (transport === "body" && (method !== "POST" || contentType !== formContentType)) { + self2.request.emit("error", new Error("oauth: transport_method of body requires POST and content-type " + formContentType)); + } + if (!form && typeof _oauth.body_hash === "boolean") { + _oauth.body_hash = self2.buildBodyHash(_oauth, self2.request.body.toString()); + } + var oa = self2.buildParams(_oauth, uri, method, query, form, qsLib); + switch (transport) { + case "header": + self2.request.setHeader("Authorization", "OAuth " + self2.concatParams(oa, ",", '"')); + break; + case "query": + var href = self2.request.uri.href += (query ? "&" : "?") + self2.concatParams(oa, "&"); + self2.request.uri = url.parse(href); + self2.request.path = self2.request.uri.path; + break; + case "body": + self2.request.body = (form ? form + "&" : "") + self2.concatParams(oa, "&"); + break; + default: + self2.request.emit("error", new Error("oauth: transport_method invalid")); + } + }; + exports2.OAuth = OAuth; + } +}); + +// node_modules/request/lib/hawk.js +var require_hawk = __commonJS({ + "node_modules/request/lib/hawk.js"(exports2) { + "use strict"; + var crypto2 = require("crypto"); + function randomString(size2) { + var bits = (size2 + 1) * 6; + var buffer = crypto2.randomBytes(Math.ceil(bits / 8)); + var string = buffer.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + return string.slice(0, size2); + } + function calculatePayloadHash(payload, algorithm, contentType) { + var hash = crypto2.createHash(algorithm); + hash.update("hawk.1.payload\n"); + hash.update((contentType ? contentType.split(";")[0].trim().toLowerCase() : "") + "\n"); + hash.update(payload || ""); + hash.update("\n"); + return hash.digest("base64"); + } + exports2.calculateMac = function(credentials, opts) { + var normalized = "hawk.1.header\n" + opts.ts + "\n" + opts.nonce + "\n" + (opts.method || "").toUpperCase() + "\n" + opts.resource + "\n" + opts.host.toLowerCase() + "\n" + opts.port + "\n" + (opts.hash || "") + "\n"; + if (opts.ext) { + normalized = normalized + opts.ext.replace("\\", "\\\\").replace("\n", "\\n"); + } + normalized = normalized + "\n"; + if (opts.app) { + normalized = normalized + opts.app + "\n" + (opts.dlg || "") + "\n"; + } + var hmac = crypto2.createHmac(credentials.algorithm, credentials.key).update(normalized); + var digest = hmac.digest("base64"); + return digest; + }; + exports2.header = function(uri, method, opts) { + var timestamp = opts.timestamp || Math.floor((Date.now() + (opts.localtimeOffsetMsec || 0)) / 1e3); + var credentials = opts.credentials; + if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { + return ""; + } + if (["sha1", "sha256"].indexOf(credentials.algorithm) === -1) { + return ""; + } + var artifacts = { + ts: timestamp, + nonce: opts.nonce || randomString(6), + method, + resource: uri.pathname + (uri.search || ""), + host: uri.hostname, + port: uri.port || (uri.protocol === "http:" ? 80 : 443), + hash: opts.hash, + ext: opts.ext, + app: opts.app, + dlg: opts.dlg + }; + if (!artifacts.hash && (opts.payload || opts.payload === "")) { + artifacts.hash = calculatePayloadHash(opts.payload, credentials.algorithm, opts.contentType); + } + var mac = exports2.calculateMac(credentials, artifacts); + var hasExt = artifacts.ext !== null && artifacts.ext !== void 0 && artifacts.ext !== ""; + var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : "") + (hasExt ? '", ext="' + artifacts.ext.replace(/\\/g, "\\\\").replace(/"/g, '\\"') : "") + '", mac="' + mac + '"'; + if (artifacts.app) { + header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : "") + '"'; + } + return header; + }; + } +}); + +// node_modules/request/lib/multipart.js +var require_multipart = __commonJS({ + "node_modules/request/lib/multipart.js"(exports2) { + "use strict"; + var uuid = require_v4(); + var CombinedStream = require_combined_stream(); + var isstream = require_isstream(); + var Buffer2 = require_safe_buffer().Buffer; + function Multipart(request) { + this.request = request; + this.boundary = uuid(); + this.chunked = false; + this.body = null; + } + Multipart.prototype.isChunked = function(options) { + var self2 = this; + var chunked = false; + var parts = options.data || options; + if (!parts.forEach) { + self2.request.emit("error", new Error("Argument error, options.multipart.")); + } + if (options.chunked !== void 0) { + chunked = options.chunked; + } + if (self2.request.getHeader("transfer-encoding") === "chunked") { + chunked = true; + } + if (!chunked) { + parts.forEach(function(part) { + if (typeof part.body === "undefined") { + self2.request.emit("error", new Error("Body attribute missing in multipart.")); + } + if (isstream(part.body)) { + chunked = true; + } + }); + } + return chunked; + }; + Multipart.prototype.setHeaders = function(chunked) { + var self2 = this; + if (chunked && !self2.request.hasHeader("transfer-encoding")) { + self2.request.setHeader("transfer-encoding", "chunked"); + } + var header = self2.request.getHeader("content-type"); + if (!header || header.indexOf("multipart") === -1) { + self2.request.setHeader("content-type", "multipart/related; boundary=" + self2.boundary); + } else { + if (header.indexOf("boundary") !== -1) { + self2.boundary = header.replace(/.*boundary=([^\s;]+).*/, "$1"); + } else { + self2.request.setHeader("content-type", header + "; boundary=" + self2.boundary); + } + } + }; + Multipart.prototype.build = function(parts, chunked) { + var self2 = this; + var body = chunked ? new CombinedStream() : []; + function add(part) { + if (typeof part === "number") { + part = part.toString(); + } + return chunked ? body.append(part) : body.push(Buffer2.from(part)); + } + if (self2.request.preambleCRLF) { + add("\r\n"); + } + parts.forEach(function(part) { + var preamble = "--" + self2.boundary + "\r\n"; + Object.keys(part).forEach(function(key) { + if (key === "body") { + return; + } + preamble += key + ": " + part[key] + "\r\n"; + }); + preamble += "\r\n"; + add(preamble); + add(part.body); + add("\r\n"); + }); + add("--" + self2.boundary + "--"); + if (self2.request.postambleCRLF) { + add("\r\n"); + } + return body; + }; + Multipart.prototype.onRequest = function(options) { + var self2 = this; + var chunked = self2.isChunked(options); + var parts = options.data || options; + self2.setHeaders(chunked); + self2.chunked = chunked; + self2.body = self2.build(parts, chunked); + }; + exports2.Multipart = Multipart; + } +}); + +// node_modules/request/lib/redirect.js +var require_redirect = __commonJS({ + "node_modules/request/lib/redirect.js"(exports2) { + "use strict"; + var url = require("url"); + var isUrl = /^https?:/; + function Redirect(request) { + this.request = request; + this.followRedirect = true; + this.followRedirects = true; + this.followAllRedirects = false; + this.followOriginalHttpMethod = false; + this.allowRedirect = function() { + return true; + }; + this.maxRedirects = 10; + this.redirects = []; + this.redirectsFollowed = 0; + this.removeRefererHeader = false; + } + Redirect.prototype.onRequest = function(options) { + var self2 = this; + if (options.maxRedirects !== void 0) { + self2.maxRedirects = options.maxRedirects; + } + if (typeof options.followRedirect === "function") { + self2.allowRedirect = options.followRedirect; + } + if (options.followRedirect !== void 0) { + self2.followRedirects = !!options.followRedirect; + } + if (options.followAllRedirects !== void 0) { + self2.followAllRedirects = options.followAllRedirects; + } + if (self2.followRedirects || self2.followAllRedirects) { + self2.redirects = self2.redirects || []; + } + if (options.removeRefererHeader !== void 0) { + self2.removeRefererHeader = options.removeRefererHeader; + } + if (options.followOriginalHttpMethod !== void 0) { + self2.followOriginalHttpMethod = options.followOriginalHttpMethod; + } + }; + Redirect.prototype.redirectTo = function(response) { + var self2 = this; + var request = self2.request; + var redirectTo = null; + if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has("location")) { + var location = response.caseless.get("location"); + request.debug("redirect", location); + if (self2.followAllRedirects) { + redirectTo = location; + } else if (self2.followRedirects) { + switch (request.method) { + case "PATCH": + case "PUT": + case "POST": + case "DELETE": + break; + default: + redirectTo = location; + break; + } + } + } else if (response.statusCode === 401) { + var authHeader = request._auth.onResponse(response); + if (authHeader) { + request.setHeader("authorization", authHeader); + redirectTo = request.uri; + } + } + return redirectTo; + }; + Redirect.prototype.onResponse = function(response) { + var self2 = this; + var request = self2.request; + var redirectTo = self2.redirectTo(response); + if (!redirectTo || !self2.allowRedirect.call(request, response)) { + return false; + } + request.debug("redirect to", redirectTo); + if (response.resume) { + response.resume(); + } + if (self2.redirectsFollowed >= self2.maxRedirects) { + request.emit("error", new Error("Exceeded maxRedirects. Probably stuck in a redirect loop " + request.uri.href)); + return false; + } + self2.redirectsFollowed += 1; + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(request.uri.href, redirectTo); + } + var uriPrev = request.uri; + request.uri = url.parse(redirectTo); + if (request.uri.protocol !== uriPrev.protocol) { + delete request.agent; + } + self2.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo }); + if (self2.followAllRedirects && request.method !== "HEAD" && response.statusCode !== 401 && response.statusCode !== 307) { + request.method = self2.followOriginalHttpMethod ? request.method : "GET"; + } + delete request.src; + delete request.req; + delete request._started; + if (response.statusCode !== 401 && response.statusCode !== 307) { + delete request.body; + delete request._form; + if (request.headers) { + request.removeHeader("host"); + request.removeHeader("content-type"); + request.removeHeader("content-length"); + if (request.uri.hostname !== request.originalHost.split(":")[0]) { + request.removeHeader("authorization"); + } + } + } + if (!self2.removeRefererHeader) { + request.setHeader("referer", uriPrev.href); + } + request.emit("redirect"); + request.init(); + return true; + }; + exports2.Redirect = Redirect; + } +}); + +// node_modules/tunnel-agent/index.js +var require_tunnel_agent = __commonJS({ + "node_modules/tunnel-agent/index.js"(exports2) { + "use strict"; + var net = require("net"); + var tls = require("tls"); + var http = require("http"); + var https = require("https"); + var events = require("events"); + var assert = require("assert"); + var util2 = require("util"); + var Buffer2 = require_safe_buffer().Buffer; + exports2.httpOverHttp = httpOverHttp; + exports2.httpsOverHttp = httpsOverHttp; + exports2.httpOverHttps = httpOverHttps; + exports2.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; + } + function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; + } + function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options) { + var self2 = this; + self2.options = options || {}; + self2.proxyOptions = self2.options.proxy || {}; + self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; + self2.requests = []; + self2.sockets = []; + self2.on("free", function onFree(socket, host, port) { + for (var i2 = 0, len = self2.requests.length; i2 < len; ++i2) { + var pending = self2.requests[i2]; + if (pending.host === host && pending.port === port) { + self2.requests.splice(i2, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self2.removeSocket(socket); + }); + } + util2.inherits(TunnelingAgent, events.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, options) { + var self2 = this; + if (typeof options === "string") { + options = { + host: options, + port: arguments[2], + path: arguments[3] + }; + } + if (self2.sockets.length >= this.maxSockets) { + self2.requests.push({ host: options.host, port: options.port, request: req }); + return; + } + self2.createConnection({ host: options.host, port: options.port, request: req }); + }; + TunnelingAgent.prototype.createConnection = function createConnection(pending) { + var self2 = this; + self2.createSocket(pending, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + pending.request.onSocket(socket); + function onFree() { + self2.emit("free", socket, pending.host, pending.port); + } + function onCloseOrRemove(err) { + self2.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self2 = this; + var placeholder = {}; + self2.sockets.push(placeholder); + var connectOptions = mergeOptions( + {}, + self2.proxyOptions, + { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false + } + ); + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + Buffer2.from(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self2.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode === 200) { + assert.equal(head.length, 0); + debug("tunneling connection has established"); + self2.sockets[self2.sockets.indexOf(placeholder)] = socket; + cb(socket); + } else { + debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self2.removeSocket(placeholder); + } + } + function onError(cause) { + connectReq.removeAllListeners(); + debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error = new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self2.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) { + this.createConnection(pending); + } + }; + function createSecureSocket(options, cb) { + var self2 = this; + TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) { + var secureSocket = tls.connect(0, mergeOptions( + {}, + self2.options, + { + servername: options.host, + socket + } + )); + self2.sockets[self2.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); + } + function mergeOptions(target) { + for (var i2 = 1, len = arguments.length; i2 < len; ++i2) { + var overrides = arguments[i2]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) { + target[k] = overrides[k]; + } + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args2 = Array.prototype.slice.call(arguments); + if (typeof args2[0] === "string") { + args2[0] = "TUNNEL: " + args2[0]; + } else { + args2.unshift("TUNNEL:"); + } + console.error.apply(console, args2); + }; + } else { + debug = function() { + }; + } + exports2.debug = debug; + } +}); + +// node_modules/request/lib/tunnel.js +var require_tunnel = __commonJS({ + "node_modules/request/lib/tunnel.js"(exports2) { + "use strict"; + var url = require("url"); + var tunnel = require_tunnel_agent(); + var defaultProxyHeaderWhiteList = [ + "accept", + "accept-charset", + "accept-encoding", + "accept-language", + "accept-ranges", + "cache-control", + "content-encoding", + "content-language", + "content-location", + "content-md5", + "content-range", + "content-type", + "connection", + "date", + "expect", + "max-forwards", + "pragma", + "referer", + "te", + "user-agent", + "via" + ]; + var defaultProxyHeaderExclusiveList = [ + "proxy-authorization" + ]; + function constructProxyHost(uriObject) { + var port = uriObject.port; + var protocol = uriObject.protocol; + var proxyHost = uriObject.hostname + ":"; + if (port) { + proxyHost += port; + } else if (protocol === "https:") { + proxyHost += "443"; + } else { + proxyHost += "80"; + } + return proxyHost; + } + function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) { + var whiteList = proxyHeaderWhiteList.reduce(function(set, header) { + set[header.toLowerCase()] = true; + return set; + }, {}); + return Object.keys(headers).filter(function(header) { + return whiteList[header.toLowerCase()]; + }).reduce(function(set, header) { + set[header] = headers[header]; + return set; + }, {}); + } + function constructTunnelOptions(request, proxyHeaders) { + var proxy = request.proxy; + var tunnelOptions = { + proxy: { + host: proxy.hostname, + port: +proxy.port, + proxyAuth: proxy.auth, + headers: proxyHeaders + }, + headers: request.headers, + ca: request.ca, + cert: request.cert, + key: request.key, + passphrase: request.passphrase, + pfx: request.pfx, + ciphers: request.ciphers, + rejectUnauthorized: request.rejectUnauthorized, + secureOptions: request.secureOptions, + secureProtocol: request.secureProtocol + }; + return tunnelOptions; + } + function constructTunnelFnName(uri, proxy) { + var uriProtocol = uri.protocol === "https:" ? "https" : "http"; + var proxyProtocol = proxy.protocol === "https:" ? "Https" : "Http"; + return [uriProtocol, proxyProtocol].join("Over"); + } + function getTunnelFn(request) { + var uri = request.uri; + var proxy = request.proxy; + var tunnelFnName = constructTunnelFnName(uri, proxy); + return tunnel[tunnelFnName]; + } + function Tunnel(request) { + this.request = request; + this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList; + this.proxyHeaderExclusiveList = []; + if (typeof request.tunnel !== "undefined") { + this.tunnelOverride = request.tunnel; + } + } + Tunnel.prototype.isEnabled = function() { + var self2 = this; + var request = self2.request; + if (typeof self2.tunnelOverride !== "undefined") { + return self2.tunnelOverride; + } + if (request.uri.protocol === "https:") { + return true; + } + return false; + }; + Tunnel.prototype.setup = function(options) { + var self2 = this; + var request = self2.request; + options = options || {}; + if (typeof request.proxy === "string") { + request.proxy = url.parse(request.proxy); + } + if (!request.proxy || !request.tunnel) { + return false; + } + if (options.proxyHeaderWhiteList) { + self2.proxyHeaderWhiteList = options.proxyHeaderWhiteList; + } + if (options.proxyHeaderExclusiveList) { + self2.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList; + } + var proxyHeaderExclusiveList = self2.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList); + var proxyHeaderWhiteList = self2.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList); + var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList); + proxyHeaders.host = constructProxyHost(request.uri); + proxyHeaderExclusiveList.forEach(request.removeHeader, request); + var tunnelFn = getTunnelFn(request); + var tunnelOptions = constructTunnelOptions(request, proxyHeaders); + request.agent = tunnelFn(tunnelOptions); + return true; + }; + Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList; + Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList; + exports2.Tunnel = Tunnel; + } +}); + +// node_modules/performance-now/lib/performance-now.js +var require_performance_now = __commonJS({ + "node_modules/performance-now/lib/performance-now.js"(exports2, module2) { + (function() { + var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; + if (typeof performance !== "undefined" && performance !== null && performance.now) { + module2.exports = function() { + return performance.now(); + }; + } else if (typeof process !== "undefined" && process !== null && process.hrtime) { + module2.exports = function() { + return (getNanoSeconds() - nodeLoadTime) / 1e6; + }; + hrtime = process.hrtime; + getNanoSeconds = function() { + var hr; + hr = hrtime(); + return hr[0] * 1e9 + hr[1]; + }; + moduleLoadTime = getNanoSeconds(); + upTime = process.uptime() * 1e9; + nodeLoadTime = moduleLoadTime - upTime; + } else if (Date.now) { + module2.exports = function() { + return Date.now() - loadTime; + }; + loadTime = Date.now(); + } else { + module2.exports = function() { + return (/* @__PURE__ */ new Date()).getTime() - loadTime; + }; + loadTime = (/* @__PURE__ */ new Date()).getTime(); + } + }).call(exports2); + } +}); + +// node_modules/request/request.js +var require_request2 = __commonJS({ + "node_modules/request/request.js"(exports2, module2) { + "use strict"; + var http = require("http"); + var https = require("https"); + var url = require("url"); + var util2 = require("util"); + var stream2 = require("stream"); + var zlib = require("zlib"); + var aws2 = require_aws_sign2(); + var aws4 = require_aws4(); + var httpSignature = require_lib3(); + var mime = require_mime_types(); + var caseless = require_caseless(); + var ForeverAgent = require_forever_agent(); + var FormData = require_form_data(); + var extend = require_extend(); + var isstream = require_isstream(); + var isTypedArray = require_is_typedarray().strict; + var helpers = require_helpers(); + var cookies = require_cookies(); + var getProxyFromURI = require_getProxyFromURI(); + var Querystring = require_querystring().Querystring; + var Har = require_har2().Har; + var Auth = require_auth().Auth; + var OAuth = require_oauth().OAuth; + var hawk = require_hawk(); + var Multipart = require_multipart().Multipart; + var Redirect = require_redirect().Redirect; + var Tunnel = require_tunnel().Tunnel; + var now = require_performance_now(); + var Buffer2 = require_safe_buffer().Buffer; + var safeStringify = helpers.safeStringify; + var isReadStream = helpers.isReadStream; + var toBase64 = helpers.toBase64; + var defer = helpers.defer; + var copy = helpers.copy; + var version = helpers.version; + var globalCookieJar = cookies.jar(); + var globalPool = {}; + function filterForNonReserved(reserved, options) { + var object = {}; + for (var i2 in options) { + var notReserved = reserved.indexOf(i2) === -1; + if (notReserved) { + object[i2] = options[i2]; + } + } + return object; + } + function filterOutReservedFunctions(reserved, options) { + var object = {}; + for (var i2 in options) { + var isReserved = !(reserved.indexOf(i2) === -1); + var isFunction = typeof options[i2] === "function"; + if (!(isReserved && isFunction)) { + object[i2] = options[i2]; + } + } + return object; + } + function requestToJSON() { + var self2 = this; + return { + uri: self2.uri, + method: self2.method, + headers: self2.headers + }; + } + function responseToJSON() { + var self2 = this; + return { + statusCode: self2.statusCode, + body: self2.body, + headers: self2.headers, + request: requestToJSON.call(self2.request) + }; + } + function Request(options) { + var self2 = this; + if (options.har) { + self2._har = new Har(self2); + options = self2._har.options(options); + } + stream2.Stream.call(self2); + var reserved = Object.keys(Request.prototype); + var nonReserved = filterForNonReserved(reserved, options); + extend(self2, nonReserved); + options = filterOutReservedFunctions(reserved, options); + self2.readable = true; + self2.writable = true; + if (options.method) { + self2.explicitMethod = true; + } + self2._qs = new Querystring(self2); + self2._auth = new Auth(self2); + self2._oauth = new OAuth(self2); + self2._multipart = new Multipart(self2); + self2._redirect = new Redirect(self2); + self2._tunnel = new Tunnel(self2); + self2.init(options); + } + util2.inherits(Request, stream2.Stream); + Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG); + function debug() { + if (Request.debug) { + console.error("REQUEST %s", util2.format.apply(util2, arguments)); + } + } + Request.prototype.debug = debug; + Request.prototype.init = function(options) { + var self2 = this; + if (!options) { + options = {}; + } + self2.headers = self2.headers ? copy(self2.headers) : {}; + for (var headerName in self2.headers) { + if (typeof self2.headers[headerName] === "undefined") { + delete self2.headers[headerName]; + } + } + caseless.httpify(self2, self2.headers); + if (!self2.method) { + self2.method = options.method || "GET"; + } + if (!self2.localAddress) { + self2.localAddress = options.localAddress; + } + self2._qs.init(options); + debug(options); + if (!self2.pool && self2.pool !== false) { + self2.pool = globalPool; + } + self2.dests = self2.dests || []; + self2.__isRequestRequest = true; + if (!self2._callback && self2.callback) { + self2._callback = self2.callback; + self2.callback = function() { + if (self2._callbackCalled) { + return; + } + self2._callbackCalled = true; + self2._callback.apply(self2, arguments); + }; + self2.on("error", self2.callback.bind()); + self2.on("complete", self2.callback.bind(self2, null)); + } + if (!self2.uri && self2.url) { + self2.uri = self2.url; + delete self2.url; + } + if (self2.baseUrl) { + if (typeof self2.baseUrl !== "string") { + return self2.emit("error", new Error("options.baseUrl must be a string")); + } + if (typeof self2.uri !== "string") { + return self2.emit("error", new Error("options.uri must be a string when using options.baseUrl")); + } + if (self2.uri.indexOf("//") === 0 || self2.uri.indexOf("://") !== -1) { + return self2.emit("error", new Error("options.uri must be a path when using options.baseUrl")); + } + var baseUrlEndsWithSlash = self2.baseUrl.lastIndexOf("/") === self2.baseUrl.length - 1; + var uriStartsWithSlash = self2.uri.indexOf("/") === 0; + if (baseUrlEndsWithSlash && uriStartsWithSlash) { + self2.uri = self2.baseUrl + self2.uri.slice(1); + } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { + self2.uri = self2.baseUrl + self2.uri; + } else if (self2.uri === "") { + self2.uri = self2.baseUrl; + } else { + self2.uri = self2.baseUrl + "/" + self2.uri; + } + delete self2.baseUrl; + } + if (!self2.uri) { + return self2.emit("error", new Error("options.uri is a required argument")); + } + if (typeof self2.uri === "string") { + self2.uri = url.parse(self2.uri); + } + if (!self2.uri.href) { + self2.uri.href = url.format(self2.uri); + } + if (self2.uri.protocol === "unix:") { + return self2.emit("error", new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`")); + } + if (self2.uri.host === "unix") { + self2.enableUnixSocket(); + } + if (self2.strictSSL === false) { + self2.rejectUnauthorized = false; + } + if (!self2.uri.pathname) { + self2.uri.pathname = "/"; + } + if (!(self2.uri.host || self2.uri.hostname && self2.uri.port) && !self2.uri.isUnix) { + var faultyUri = url.format(self2.uri); + var message = 'Invalid URI "' + faultyUri + '"'; + if (Object.keys(options).length === 0) { + message += ". This can be caused by a crappy redirection."; + } + self2.abort(); + return self2.emit("error", new Error(message)); + } + if (!self2.hasOwnProperty("proxy")) { + self2.proxy = getProxyFromURI(self2.uri); + } + self2.tunnel = self2._tunnel.isEnabled(); + if (self2.proxy) { + self2._tunnel.setup(options); + } + self2._redirect.onRequest(options); + self2.setHost = false; + if (!self2.hasHeader("host")) { + var hostHeaderName = self2.originalHostHeaderName || "host"; + self2.setHeader(hostHeaderName, self2.uri.host); + if (self2.uri.port) { + if (self2.uri.port === "80" && self2.uri.protocol === "http:" || self2.uri.port === "443" && self2.uri.protocol === "https:") { + self2.setHeader(hostHeaderName, self2.uri.hostname); + } + } + self2.setHost = true; + } + self2.jar(self2._jar || options.jar); + if (!self2.uri.port) { + if (self2.uri.protocol === "http:") { + self2.uri.port = 80; + } else if (self2.uri.protocol === "https:") { + self2.uri.port = 443; + } + } + if (self2.proxy && !self2.tunnel) { + self2.port = self2.proxy.port; + self2.host = self2.proxy.hostname; + } else { + self2.port = self2.uri.port; + self2.host = self2.uri.hostname; + } + if (options.form) { + self2.form(options.form); + } + if (options.formData) { + var formData = options.formData; + var requestForm = self2.form(); + var appendFormValue = function(key, value) { + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm.append(key, value.value, value.options); + } else { + requestForm.append(key, value); + } + }; + for (var formKey in formData) { + if (formData.hasOwnProperty(formKey)) { + var formValue = formData[formKey]; + if (formValue instanceof Array) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } else { + appendFormValue(formKey, formValue); + } + } + } + } + if (options.qs) { + self2.qs(options.qs); + } + if (self2.uri.path) { + self2.path = self2.uri.path; + } else { + self2.path = self2.uri.pathname + (self2.uri.search || ""); + } + if (self2.path.length === 0) { + self2.path = "/"; + } + if (options.aws) { + self2.aws(options.aws); + } + if (options.hawk) { + self2.hawk(options.hawk); + } + if (options.httpSignature) { + self2.httpSignature(options.httpSignature); + } + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, "username")) { + options.auth.user = options.auth.username; + } + if (Object.prototype.hasOwnProperty.call(options.auth, "password")) { + options.auth.pass = options.auth.password; + } + self2.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately, + options.auth.bearer + ); + } + if (self2.gzip && !self2.hasHeader("accept-encoding")) { + self2.setHeader("accept-encoding", "gzip, deflate"); + } + if (self2.uri.auth && !self2.hasHeader("authorization")) { + var uriAuthPieces = self2.uri.auth.split(":").map(function(item) { + return self2._qs.unescape(item); + }); + self2.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(":"), true); + } + if (!self2.tunnel && self2.proxy && self2.proxy.auth && !self2.hasHeader("proxy-authorization")) { + var proxyAuthPieces = self2.proxy.auth.split(":").map(function(item) { + return self2._qs.unescape(item); + }); + var authHeader = "Basic " + toBase64(proxyAuthPieces.join(":")); + self2.setHeader("proxy-authorization", authHeader); + } + if (self2.proxy && !self2.tunnel) { + self2.path = self2.uri.protocol + "//" + self2.uri.host + self2.path; + } + if (options.json) { + self2.json(options.json); + } + if (options.multipart) { + self2.multipart(options.multipart); + } + if (options.time) { + self2.timing = true; + self2.elapsedTime = self2.elapsedTime || 0; + } + function setContentLength() { + if (isTypedArray(self2.body)) { + self2.body = Buffer2.from(self2.body); + } + if (!self2.hasHeader("content-length")) { + var length; + if (typeof self2.body === "string") { + length = Buffer2.byteLength(self2.body); + } else if (Array.isArray(self2.body)) { + length = self2.body.reduce(function(a, b) { + return a + b.length; + }, 0); + } else { + length = self2.body.length; + } + if (length) { + self2.setHeader("content-length", length); + } else { + self2.emit("error", new Error("Argument error, options.body.")); + } + } + } + if (self2.body && !isstream(self2.body)) { + setContentLength(); + } + if (options.oauth) { + self2.oauth(options.oauth); + } else if (self2._oauth.params && self2.hasHeader("authorization")) { + self2.oauth(self2._oauth.params); + } + var protocol = self2.proxy && !self2.tunnel ? self2.proxy.protocol : self2.uri.protocol; + var defaultModules = { "http:": http, "https:": https }; + var httpModules = self2.httpModules || {}; + self2.httpModule = httpModules[protocol] || defaultModules[protocol]; + if (!self2.httpModule) { + return self2.emit("error", new Error("Invalid protocol: " + protocol)); + } + if (options.ca) { + self2.ca = options.ca; + } + if (!self2.agent) { + if (options.agentOptions) { + self2.agentOptions = options.agentOptions; + } + if (options.agentClass) { + self2.agentClass = options.agentClass; + } else if (options.forever) { + var v = version(); + if (v.major === 0 && v.minor <= 10) { + self2.agentClass = protocol === "http:" ? ForeverAgent : ForeverAgent.SSL; + } else { + self2.agentClass = self2.httpModule.Agent; + self2.agentOptions = self2.agentOptions || {}; + self2.agentOptions.keepAlive = true; + } + } else { + self2.agentClass = self2.httpModule.Agent; + } + } + if (self2.pool === false) { + self2.agent = false; + } else { + self2.agent = self2.agent || self2.getNewAgent(); + } + self2.on("pipe", function(src) { + if (self2.ntick && self2._started) { + self2.emit("error", new Error("You cannot pipe to this stream after the outbound request has started.")); + } + self2.src = src; + if (isReadStream(src)) { + if (!self2.hasHeader("content-type")) { + self2.setHeader("content-type", mime.lookup(src.path)); + } + } else { + if (src.headers) { + for (var i2 in src.headers) { + if (!self2.hasHeader(i2)) { + self2.setHeader(i2, src.headers[i2]); + } + } + } + if (self2._json && !self2.hasHeader("content-type")) { + self2.setHeader("content-type", "application/json"); + } + if (src.method && !self2.explicitMethod) { + self2.method = src.method; + } + } + }); + defer(function() { + if (self2._aborted) { + return; + } + var end = function() { + if (self2._form) { + if (!self2._auth.hasAuth) { + self2._form.pipe(self2); + } else if (self2._auth.hasAuth && self2._auth.sentAuth) { + self2._form.pipe(self2); + } + } + if (self2._multipart && self2._multipart.chunked) { + self2._multipart.body.pipe(self2); + } + if (self2.body) { + if (isstream(self2.body)) { + self2.body.pipe(self2); + } else { + setContentLength(); + if (Array.isArray(self2.body)) { + self2.body.forEach(function(part) { + self2.write(part); + }); + } else { + self2.write(self2.body); + } + self2.end(); + } + } else if (self2.requestBodyStream) { + console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."); + self2.requestBodyStream.pipe(self2); + } else if (!self2.src) { + if (self2._auth.hasAuth && !self2._auth.sentAuth) { + self2.end(); + return; + } + if (self2.method !== "GET" && typeof self2.method !== "undefined") { + self2.setHeader("content-length", 0); + } + self2.end(); + } + }; + if (self2._form && !self2.hasHeader("content-length")) { + self2.setHeader(self2._form.getHeaders(), true); + self2._form.getLength(function(err, length) { + if (!err && !isNaN(length)) { + self2.setHeader("content-length", length); + } + end(); + }); + } else { + end(); + } + self2.ntick = true; + }); + }; + Request.prototype.getNewAgent = function() { + var self2 = this; + var Agent = self2.agentClass; + var options = {}; + if (self2.agentOptions) { + for (var i2 in self2.agentOptions) { + options[i2] = self2.agentOptions[i2]; + } + } + if (self2.ca) { + options.ca = self2.ca; + } + if (self2.ciphers) { + options.ciphers = self2.ciphers; + } + if (self2.secureProtocol) { + options.secureProtocol = self2.secureProtocol; + } + if (self2.secureOptions) { + options.secureOptions = self2.secureOptions; + } + if (typeof self2.rejectUnauthorized !== "undefined") { + options.rejectUnauthorized = self2.rejectUnauthorized; + } + if (self2.cert && self2.key) { + options.key = self2.key; + options.cert = self2.cert; + } + if (self2.pfx) { + options.pfx = self2.pfx; + } + if (self2.passphrase) { + options.passphrase = self2.passphrase; + } + var poolKey = ""; + if (Agent !== self2.httpModule.Agent) { + poolKey += Agent.name; + } + var proxy = self2.proxy; + if (typeof proxy === "string") { + proxy = url.parse(proxy); + } + var isHttps = proxy && proxy.protocol === "https:" || this.uri.protocol === "https:"; + if (isHttps) { + if (options.ca) { + if (poolKey) { + poolKey += ":"; + } + poolKey += options.ca; + } + if (typeof options.rejectUnauthorized !== "undefined") { + if (poolKey) { + poolKey += ":"; + } + poolKey += options.rejectUnauthorized; + } + if (options.cert) { + if (poolKey) { + poolKey += ":"; + } + poolKey += options.cert.toString("ascii") + options.key.toString("ascii"); + } + if (options.pfx) { + if (poolKey) { + poolKey += ":"; + } + poolKey += options.pfx.toString("ascii"); + } + if (options.ciphers) { + if (poolKey) { + poolKey += ":"; + } + poolKey += options.ciphers; + } + if (options.secureProtocol) { + if (poolKey) { + poolKey += ":"; + } + poolKey += options.secureProtocol; + } + if (options.secureOptions) { + if (poolKey) { + poolKey += ":"; + } + poolKey += options.secureOptions; + } + } + if (self2.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self2.httpModule.globalAgent) { + return self2.httpModule.globalAgent; + } + poolKey = self2.uri.protocol + poolKey; + if (!self2.pool[poolKey]) { + self2.pool[poolKey] = new Agent(options); + if (self2.pool.maxSockets) { + self2.pool[poolKey].maxSockets = self2.pool.maxSockets; + } + } + return self2.pool[poolKey]; + }; + Request.prototype.start = function() { + var self2 = this; + if (self2.timing) { + var startTime = (/* @__PURE__ */ new Date()).getTime(); + var startTimeNow = now(); + } + if (self2._aborted) { + return; + } + self2._started = true; + self2.method = self2.method || "GET"; + self2.href = self2.uri.href; + if (self2.src && self2.src.stat && self2.src.stat.size && !self2.hasHeader("content-length")) { + self2.setHeader("content-length", self2.src.stat.size); + } + if (self2._aws) { + self2.aws(self2._aws, true); + } + var reqOptions = copy(self2); + delete reqOptions.auth; + debug("make request", self2.uri.href); + delete reqOptions.timeout; + try { + self2.req = self2.httpModule.request(reqOptions); + } catch (err) { + self2.emit("error", err); + return; + } + if (self2.timing) { + self2.startTime = startTime; + self2.startTimeNow = startTimeNow; + self2.timings = {}; + } + var timeout; + if (self2.timeout && !self2.timeoutTimer) { + if (self2.timeout < 0) { + timeout = 0; + } else if (typeof self2.timeout === "number" && isFinite(self2.timeout)) { + timeout = self2.timeout; + } + } + self2.req.on("response", self2.onRequestResponse.bind(self2)); + self2.req.on("error", self2.onRequestError.bind(self2)); + self2.req.on("drain", function() { + self2.emit("drain"); + }); + self2.req.on("socket", function(socket) { + var isConnecting = socket._connecting || socket.connecting; + if (self2.timing) { + self2.timings.socket = now() - self2.startTimeNow; + if (isConnecting) { + var onLookupTiming = function() { + self2.timings.lookup = now() - self2.startTimeNow; + }; + var onConnectTiming = function() { + self2.timings.connect = now() - self2.startTimeNow; + }; + socket.once("lookup", onLookupTiming); + socket.once("connect", onConnectTiming); + self2.req.once("error", function() { + socket.removeListener("lookup", onLookupTiming); + socket.removeListener("connect", onConnectTiming); + }); + } + } + var setReqTimeout = function() { + self2.req.setTimeout(timeout, function() { + if (self2.req) { + self2.abort(); + var e = new Error("ESOCKETTIMEDOUT"); + e.code = "ESOCKETTIMEDOUT"; + e.connect = false; + self2.emit("error", e); + } + }); + }; + if (timeout !== void 0) { + if (isConnecting) { + var onReqSockConnect = function() { + socket.removeListener("connect", onReqSockConnect); + self2.clearTimeout(); + setReqTimeout(); + }; + socket.on("connect", onReqSockConnect); + self2.req.on("error", function(err) { + socket.removeListener("connect", onReqSockConnect); + }); + self2.timeoutTimer = setTimeout(function() { + socket.removeListener("connect", onReqSockConnect); + self2.abort(); + var e = new Error("ETIMEDOUT"); + e.code = "ETIMEDOUT"; + e.connect = true; + self2.emit("error", e); + }, timeout); + } else { + setReqTimeout(); + } + } + self2.emit("socket", socket); + }); + self2.emit("request", self2.req); + }; + Request.prototype.onRequestError = function(error) { + var self2 = this; + if (self2._aborted) { + return; + } + if (self2.req && self2.req._reusedSocket && error.code === "ECONNRESET" && self2.agent.addRequestNoreuse) { + self2.agent = { addRequest: self2.agent.addRequestNoreuse.bind(self2.agent) }; + self2.start(); + self2.req.end(); + return; + } + self2.clearTimeout(); + self2.emit("error", error); + }; + Request.prototype.onRequestResponse = function(response) { + var self2 = this; + if (self2.timing) { + self2.timings.response = now() - self2.startTimeNow; + } + debug("onRequestResponse", self2.uri.href, response.statusCode, response.headers); + response.on("end", function() { + if (self2.timing) { + self2.timings.end = now() - self2.startTimeNow; + response.timingStart = self2.startTime; + if (!self2.timings.socket) { + self2.timings.socket = 0; + } + if (!self2.timings.lookup) { + self2.timings.lookup = self2.timings.socket; + } + if (!self2.timings.connect) { + self2.timings.connect = self2.timings.lookup; + } + if (!self2.timings.response) { + self2.timings.response = self2.timings.connect; + } + debug("elapsed time", self2.timings.end); + self2.elapsedTime += Math.round(self2.timings.end); + response.elapsedTime = self2.elapsedTime; + response.timings = self2.timings; + response.timingPhases = { + wait: self2.timings.socket, + dns: self2.timings.lookup - self2.timings.socket, + tcp: self2.timings.connect - self2.timings.lookup, + firstByte: self2.timings.response - self2.timings.connect, + download: self2.timings.end - self2.timings.response, + total: self2.timings.end + }; + } + debug("response end", self2.uri.href, response.statusCode, response.headers); + }); + if (self2._aborted) { + debug("aborted", self2.uri.href); + response.resume(); + return; + } + self2.response = response; + response.request = self2; + response.toJSON = responseToJSON; + if (self2.httpModule === https && self2.strictSSL && (!response.hasOwnProperty("socket") || !response.socket.authorized)) { + debug("strict ssl error", self2.uri.href); + var sslErr = response.hasOwnProperty("socket") ? response.socket.authorizationError : self2.uri.href + " does not support SSL"; + self2.emit("error", new Error("SSL Error: " + sslErr)); + return; + } + self2.originalHost = self2.getHeader("host"); + if (!self2.originalHostHeaderName) { + self2.originalHostHeaderName = self2.hasHeader("host"); + } + if (self2.setHost) { + self2.removeHeader("host"); + } + self2.clearTimeout(); + var targetCookieJar = self2._jar && self2._jar.setCookie ? self2._jar : globalCookieJar; + var addCookie = function(cookie) { + try { + targetCookieJar.setCookie(cookie, self2.uri.href, { ignoreError: true }); + } catch (e) { + self2.emit("error", e); + } + }; + response.caseless = caseless(response.headers); + if (response.caseless.has("set-cookie") && !self2._disableCookies) { + var headerName = response.caseless.has("set-cookie"); + if (Array.isArray(response.headers[headerName])) { + response.headers[headerName].forEach(addCookie); + } else { + addCookie(response.headers[headerName]); + } + } + if (self2._redirect.onResponse(response)) { + return; + } else { + response.on("close", function() { + if (!self2._ended) { + self2.response.emit("end"); + } + }); + response.once("end", function() { + self2._ended = true; + }); + var noBody = function(code) { + return self2.method === "HEAD" || // Informational + code >= 100 && code < 200 || // No Content + code === 204 || // Not Modified + code === 304; + }; + var responseContent; + if (self2.gzip && !noBody(response.statusCode)) { + var contentEncoding = response.headers["content-encoding"] || "identity"; + contentEncoding = contentEncoding.trim().toLowerCase(); + var zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + if (contentEncoding === "gzip") { + responseContent = zlib.createGunzip(zlibOptions); + response.pipe(responseContent); + } else if (contentEncoding === "deflate") { + responseContent = zlib.createInflate(zlibOptions); + response.pipe(responseContent); + } else { + if (contentEncoding !== "identity") { + debug("ignoring unrecognized Content-Encoding " + contentEncoding); + } + responseContent = response; + } + } else { + responseContent = response; + } + if (self2.encoding) { + if (self2.dests.length !== 0) { + console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."); + } else { + responseContent.setEncoding(self2.encoding); + } + } + if (self2._paused) { + responseContent.pause(); + } + self2.responseContent = responseContent; + self2.emit("response", response); + self2.dests.forEach(function(dest) { + self2.pipeDest(dest); + }); + responseContent.on("data", function(chunk) { + if (self2.timing && !self2.responseStarted) { + self2.responseStartTime = (/* @__PURE__ */ new Date()).getTime(); + response.responseStartTime = self2.responseStartTime; + } + self2._destdata = true; + self2.emit("data", chunk); + }); + responseContent.once("end", function(chunk) { + self2.emit("end", chunk); + }); + responseContent.on("error", function(error) { + self2.emit("error", error); + }); + responseContent.on("close", function() { + self2.emit("close"); + }); + if (self2.callback) { + self2.readResponseBody(response); + } else { + self2.on("end", function() { + if (self2._aborted) { + debug("aborted", self2.uri.href); + return; + } + self2.emit("complete", response); + }); + } + } + debug("finish init function", self2.uri.href); + }; + Request.prototype.readResponseBody = function(response) { + var self2 = this; + debug("reading response's body"); + var buffers = []; + var bufferLength = 0; + var strings = []; + self2.on("data", function(chunk) { + if (!Buffer2.isBuffer(chunk)) { + strings.push(chunk); + } else if (chunk.length) { + bufferLength += chunk.length; + buffers.push(chunk); + } + }); + self2.on("end", function() { + debug("end event", self2.uri.href); + if (self2._aborted) { + debug("aborted", self2.uri.href); + buffers = []; + bufferLength = 0; + return; + } + if (bufferLength) { + debug("has body", self2.uri.href, bufferLength); + response.body = Buffer2.concat(buffers, bufferLength); + if (self2.encoding !== null) { + response.body = response.body.toString(self2.encoding); + } + buffers = []; + bufferLength = 0; + } else if (strings.length) { + if (self2.encoding === "utf8" && strings[0].length > 0 && strings[0][0] === "\uFEFF") { + strings[0] = strings[0].substring(1); + } + response.body = strings.join(""); + } + if (self2._json) { + try { + response.body = JSON.parse(response.body, self2._jsonReviver); + } catch (e) { + debug("invalid JSON received", self2.uri.href); + } + } + debug("emitting complete", self2.uri.href); + if (typeof response.body === "undefined" && !self2._json) { + response.body = self2.encoding === null ? Buffer2.alloc(0) : ""; + } + self2.emit("complete", response, response.body); + }); + }; + Request.prototype.abort = function() { + var self2 = this; + self2._aborted = true; + if (self2.req) { + self2.req.abort(); + } else if (self2.response) { + self2.response.destroy(); + } + self2.clearTimeout(); + self2.emit("abort"); + }; + Request.prototype.pipeDest = function(dest) { + var self2 = this; + var response = self2.response; + if (dest.headers && !dest.headersSent) { + if (response.caseless.has("content-type")) { + var ctname = response.caseless.has("content-type"); + if (dest.setHeader) { + dest.setHeader(ctname, response.headers[ctname]); + } else { + dest.headers[ctname] = response.headers[ctname]; + } + } + if (response.caseless.has("content-length")) { + var clname = response.caseless.has("content-length"); + if (dest.setHeader) { + dest.setHeader(clname, response.headers[clname]); + } else { + dest.headers[clname] = response.headers[clname]; + } + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i2 in response.headers) { + if (!self2.gzip || i2 !== "content-encoding") { + dest.setHeader(i2, response.headers[i2]); + } + } + dest.statusCode = response.statusCode; + } + if (self2.pipefilter) { + self2.pipefilter(response, dest); + } + }; + Request.prototype.qs = function(q2, clobber) { + var self2 = this; + var base; + if (!clobber && self2.uri.query) { + base = self2._qs.parse(self2.uri.query); + } else { + base = {}; + } + for (var i2 in q2) { + base[i2] = q2[i2]; + } + var qs = self2._qs.stringify(base); + if (qs === "") { + return self2; + } + self2.uri = url.parse(self2.uri.href.split("?")[0] + "?" + qs); + self2.url = self2.uri; + self2.path = self2.uri.path; + if (self2.uri.host === "unix") { + self2.enableUnixSocket(); + } + return self2; + }; + Request.prototype.form = function(form) { + var self2 = this; + if (form) { + if (!/^application\/x-www-form-urlencoded\b/.test(self2.getHeader("content-type"))) { + self2.setHeader("content-type", "application/x-www-form-urlencoded"); + } + self2.body = typeof form === "string" ? self2._qs.rfc3986(form.toString("utf8")) : self2._qs.stringify(form).toString("utf8"); + return self2; + } + self2._form = new FormData(); + self2._form.on("error", function(err) { + err.message = "form-data: " + err.message; + self2.emit("error", err); + self2.abort(); + }); + return self2._form; + }; + Request.prototype.multipart = function(multipart) { + var self2 = this; + self2._multipart.onRequest(multipart); + if (!self2._multipart.chunked) { + self2.body = self2._multipart.body; + } + return self2; + }; + Request.prototype.json = function(val) { + var self2 = this; + if (!self2.hasHeader("accept")) { + self2.setHeader("accept", "application/json"); + } + if (typeof self2.jsonReplacer === "function") { + self2._jsonReplacer = self2.jsonReplacer; + } + self2._json = true; + if (typeof val === "boolean") { + if (self2.body !== void 0) { + if (!/^application\/x-www-form-urlencoded\b/.test(self2.getHeader("content-type"))) { + self2.body = safeStringify(self2.body, self2._jsonReplacer); + } else { + self2.body = self2._qs.rfc3986(self2.body); + } + if (!self2.hasHeader("content-type")) { + self2.setHeader("content-type", "application/json"); + } + } + } else { + self2.body = safeStringify(val, self2._jsonReplacer); + if (!self2.hasHeader("content-type")) { + self2.setHeader("content-type", "application/json"); + } + } + if (typeof self2.jsonReviver === "function") { + self2._jsonReviver = self2.jsonReviver; + } + return self2; + }; + Request.prototype.getHeader = function(name, headers) { + var self2 = this; + var result, re, match; + if (!headers) { + headers = self2.headers; + } + Object.keys(headers).forEach(function(key) { + if (key.length !== name.length) { + return; + } + re = new RegExp(name, "i"); + match = key.match(re); + if (match) { + result = headers[key]; + } + }); + return result; + }; + Request.prototype.enableUnixSocket = function() { + var unixParts = this.uri.path.split(":"); + var host = unixParts[0]; + var path = unixParts[1]; + this.socketPath = host; + this.uri.pathname = path; + this.uri.path = path; + this.uri.host = host; + this.uri.hostname = host; + this.uri.isUnix = true; + }; + Request.prototype.auth = function(user, pass, sendImmediately, bearer) { + var self2 = this; + self2._auth.onRequest(user, pass, sendImmediately, bearer); + return self2; + }; + Request.prototype.aws = function(opts, now2) { + var self2 = this; + if (!now2) { + self2._aws = opts; + return self2; + } + if (opts.sign_version === 4 || opts.sign_version === "4") { + var options = { + host: self2.uri.host, + path: self2.uri.path, + method: self2.method, + headers: self2.headers, + body: self2.body + }; + if (opts.service) { + options.service = opts.service; + } + var signRes = aws4.sign(options, { + accessKeyId: opts.key, + secretAccessKey: opts.secret, + sessionToken: opts.session + }); + self2.setHeader("authorization", signRes.headers.Authorization); + self2.setHeader("x-amz-date", signRes.headers["X-Amz-Date"]); + if (signRes.headers["X-Amz-Security-Token"]) { + self2.setHeader("x-amz-security-token", signRes.headers["X-Amz-Security-Token"]); + } + } else { + var date = /* @__PURE__ */ new Date(); + self2.setHeader("date", date.toUTCString()); + var auth = { + key: opts.key, + secret: opts.secret, + verb: self2.method.toUpperCase(), + date, + contentType: self2.getHeader("content-type") || "", + md5: self2.getHeader("content-md5") || "", + amazonHeaders: aws2.canonicalizeHeaders(self2.headers) + }; + var path = self2.uri.path; + if (opts.bucket && path) { + auth.resource = "/" + opts.bucket + path; + } else if (opts.bucket && !path) { + auth.resource = "/" + opts.bucket; + } else if (!opts.bucket && path) { + auth.resource = path; + } else if (!opts.bucket && !path) { + auth.resource = "/"; + } + auth.resource = aws2.canonicalizeResource(auth.resource); + self2.setHeader("authorization", aws2.authorization(auth)); + } + return self2; + }; + Request.prototype.httpSignature = function(opts) { + var self2 = this; + httpSignature.signRequest({ + getHeader: function(header) { + return self2.getHeader(header, self2.headers); + }, + setHeader: function(header, value) { + self2.setHeader(header, value); + }, + method: self2.method, + path: self2.path + }, opts); + debug("httpSignature authorization", self2.getHeader("authorization")); + return self2; + }; + Request.prototype.hawk = function(opts) { + var self2 = this; + self2.setHeader("Authorization", hawk.header(self2.uri, self2.method, opts)); + }; + Request.prototype.oauth = function(_oauth) { + var self2 = this; + self2._oauth.onRequest(_oauth); + return self2; + }; + Request.prototype.jar = function(jar) { + var self2 = this; + var cookies2; + if (self2._redirect.redirectsFollowed === 0) { + self2.originalCookieHeader = self2.getHeader("cookie"); + } + if (!jar) { + cookies2 = false; + self2._disableCookies = true; + } else { + var targetCookieJar = jar.getCookieString ? jar : globalCookieJar; + var urihref = self2.uri.href; + if (targetCookieJar) { + cookies2 = targetCookieJar.getCookieString(urihref); + } + } + if (cookies2 && cookies2.length) { + if (self2.originalCookieHeader) { + self2.setHeader("cookie", self2.originalCookieHeader + "; " + cookies2); + } else { + self2.setHeader("cookie", cookies2); + } + } + self2._jar = jar; + return self2; + }; + Request.prototype.pipe = function(dest, opts) { + var self2 = this; + if (self2.response) { + if (self2._destdata) { + self2.emit("error", new Error("You cannot pipe after data has been emitted from the response.")); + } else if (self2._ended) { + self2.emit("error", new Error("You cannot pipe after the response has been ended.")); + } else { + stream2.Stream.prototype.pipe.call(self2, dest, opts); + self2.pipeDest(dest); + return dest; + } + } else { + self2.dests.push(dest); + stream2.Stream.prototype.pipe.call(self2, dest, opts); + return dest; + } + }; + Request.prototype.write = function() { + var self2 = this; + if (self2._aborted) { + return; + } + if (!self2._started) { + self2.start(); + } + if (self2.req) { + return self2.req.write.apply(self2.req, arguments); + } + }; + Request.prototype.end = function(chunk) { + var self2 = this; + if (self2._aborted) { + return; + } + if (chunk) { + self2.write(chunk); + } + if (!self2._started) { + self2.start(); + } + if (self2.req) { + self2.req.end(); + } + }; + Request.prototype.pause = function() { + var self2 = this; + if (!self2.responseContent) { + self2._paused = true; + } else { + self2.responseContent.pause.apply(self2.responseContent, arguments); + } + }; + Request.prototype.resume = function() { + var self2 = this; + if (!self2.responseContent) { + self2._paused = false; + } else { + self2.responseContent.resume.apply(self2.responseContent, arguments); + } + }; + Request.prototype.destroy = function() { + var self2 = this; + this.clearTimeout(); + if (!self2._ended) { + self2.end(); + } else if (self2.response) { + self2.response.destroy(); + } + }; + Request.prototype.clearTimeout = function() { + if (this.timeoutTimer) { + clearTimeout(this.timeoutTimer); + this.timeoutTimer = null; + } + }; + Request.defaultProxyHeaderWhiteList = Tunnel.defaultProxyHeaderWhiteList.slice(); + Request.defaultProxyHeaderExclusiveList = Tunnel.defaultProxyHeaderExclusiveList.slice(); + Request.prototype.toJSON = requestToJSON; + module2.exports = Request; + } +}); + +// node_modules/request/index.js +var require_request3 = __commonJS({ + "node_modules/request/index.js"(exports2, module2) { + "use strict"; + var extend = require_extend(); + var cookies = require_cookies(); + var helpers = require_helpers(); + var paramsHaveRequestBody = helpers.paramsHaveRequestBody; + function initParams(uri, options, callback) { + if (typeof options === "function") { + callback = options; + } + var params = {}; + if (options !== null && typeof options === "object") { + extend(params, options, { uri }); + } else if (typeof uri === "string") { + extend(params, { uri }); + } else { + extend(params, uri); + } + params.callback = callback || params.callback; + return params; + } + function request(uri, options, callback) { + if (typeof uri === "undefined") { + throw new Error("undefined is not a valid uri or options object."); + } + var params = initParams(uri, options, callback); + if (params.method === "HEAD" && paramsHaveRequestBody(params)) { + throw new Error("HTTP HEAD requests MUST NOT include a request body."); + } + return new request.Request(params); + } + function verbFunc(verb) { + var method = verb.toUpperCase(); + return function(uri, options, callback) { + var params = initParams(uri, options, callback); + params.method = method; + return request(params, params.callback); + }; + } + request.get = verbFunc("get"); + request.head = verbFunc("head"); + request.options = verbFunc("options"); + request.post = verbFunc("post"); + request.put = verbFunc("put"); + request.patch = verbFunc("patch"); + request.del = verbFunc("delete"); + request["delete"] = verbFunc("delete"); + request.jar = function(store) { + return cookies.jar(store); + }; + request.cookie = function(str) { + return cookies.parse(str); + }; + function wrapRequestMethod(method, options, requester, verb) { + return function(uri, opts, callback) { + var params = initParams(uri, opts, callback); + var target = {}; + extend(true, target, options, params); + target.pool = params.pool || options.pool; + if (verb) { + target.method = verb.toUpperCase(); + } + if (typeof requester === "function") { + method = requester; + } + return method(target, target.callback); + }; + } + request.defaults = function(options, requester) { + var self2 = this; + options = options || {}; + if (typeof options === "function") { + requester = options; + options = {}; + } + var defaults = wrapRequestMethod(self2, options, requester); + var verbs = ["get", "head", "post", "put", "patch", "del", "delete"]; + verbs.forEach(function(verb) { + defaults[verb] = wrapRequestMethod(self2[verb], options, requester, verb); + }); + defaults.cookie = wrapRequestMethod(self2.cookie, options, requester); + defaults.jar = self2.jar; + defaults.defaults = self2.defaults; + return defaults; + }; + request.forever = function(agentOptions, optionsArg) { + var options = {}; + if (optionsArg) { + extend(options, optionsArg); + } + if (agentOptions) { + options.agentOptions = agentOptions; + } + options.forever = true; + return request.defaults(options); + }; + module2.exports = request; + request.Request = require_request2(); + request.initParams = initParams; + Object.defineProperty(request, "debug", { + enumerable: true, + get: function() { + return request.Request.debug; + }, + set: function(debug) { + request.Request.debug = debug; + } + }); + } +}); + +// node_modules/is-url/index.js +var require_is_url = __commonJS({ + "node_modules/is-url/index.js"(exports2, module2) { + module2.exports = isUrl; + var protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/; + var localhostDomainRE = /^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/; + var nonLocalhostDomainRE = /^[^\s\.]+\.\S{2,}$/; + function isUrl(string) { + if (typeof string !== "string") { + return false; + } + var match = string.match(protocolAndDomainRE); + if (!match) { + return false; + } + var everythingAfterProtocol = match[1]; + if (!everythingAfterProtocol) { + return false; + } + if (localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol)) { + return true; + } + return false; + } + } +}); + +// node_modules/atob-lite/atob-node.js +var require_atob_node = __commonJS({ + "node_modules/atob-lite/atob-node.js"(exports2, module2) { + module2.exports = function atob(str) { + return Buffer.from(str, "base64").toString("binary"); + }; + } +}); + +// node_modules/string-to-arraybuffer/index.js +var require_string_to_arraybuffer = __commonJS({ + "node_modules/string-to-arraybuffer/index.js"(exports2, module2) { + "use strict"; + var atob = require_atob_node(); + var isBase64 = require_is_base64(); + module2.exports = function stringToArrayBuffer(arg) { + if (typeof arg !== "string") throw Error("Argument should be a string"); + if (/^data\:/i.test(arg)) return decode(arg); + if (isBase64(arg)) arg = atob(arg); + return str2ab(arg); + }; + function str2ab(str) { + var array = new Uint8Array(str.length); + for (var i2 = 0; i2 < str.length; i2++) { + array[i2] = str.charCodeAt(i2); + } + return array.buffer; + } + function decode(uri) { + uri = uri.replace(/\r?\n/g, ""); + var firstComma = uri.indexOf(","); + if (-1 === firstComma || firstComma <= 4) throw new TypeError("malformed data-URI"); + var meta2 = uri.substring(5, firstComma).split(";"); + var base64 = false; + var charset = "US-ASCII"; + for (var i2 = 0; i2 < meta2.length; i2++) { + if ("base64" == meta2[i2]) { + base64 = true; + } else if (0 == meta2[i2].indexOf("charset=")) { + charset = meta2[i2].substring(8); + } + } + var data = unescape(uri.substring(firstComma + 1)); + if (base64) data = atob(data); + var abuf = str2ab(data); + abuf.type = meta2[0] || "text/plain"; + abuf.charset = charset; + return abuf; + } + } +}); + +// node_modules/dtype/index.js +var require_dtype = __commonJS({ + "node_modules/dtype/index.js"(exports2, module2) { + module2.exports = function(dtype) { + switch (dtype) { + case "int8": + return Int8Array; + case "int16": + return Int16Array; + case "int32": + return Int32Array; + case "uint8": + return Uint8Array; + case "uint16": + return Uint16Array; + case "uint32": + return Uint32Array; + case "float32": + return Float32Array; + case "float64": + return Float64Array; + case "array": + return Array; + case "uint8_clamped": + return Uint8ClampedArray; + } + }; + } +}); + +// node_modules/flatten-vertex-data/index.js +var require_flatten_vertex_data = __commonJS({ + "node_modules/flatten-vertex-data/index.js"(exports2, module2) { + var dtype = require_dtype(); + module2.exports = flattenVertexData; + function flattenVertexData(data, output, offset2) { + if (!data) throw new TypeError("must specify data as first parameter"); + offset2 = +(offset2 || 0) | 0; + if (Array.isArray(data) && (data[0] && typeof data[0][0] === "number")) { + var dim = data[0].length; + var length = data.length * dim; + var i2, j, k, l; + if (!output || typeof output === "string") { + output = new (dtype(output || "float32"))(length + offset2); + } + var dstLength = output.length - offset2; + if (length !== dstLength) { + throw new Error("source length " + length + " (" + dim + "x" + data.length + ") does not match destination length " + dstLength); + } + for (i2 = 0, k = offset2; i2 < data.length; i2++) { + for (j = 0; j < dim; j++) { + output[k++] = data[i2][j] === null ? NaN : data[i2][j]; + } + } + } else { + if (!output || typeof output === "string") { + var Ctor = dtype(output || "float32"); + if (Array.isArray(data) || output === "array") { + output = new Ctor(data.length + offset2); + for (i2 = 0, k = offset2, l = output.length; k < l; k++, i2++) { + output[k] = data[i2] === null ? NaN : data[i2]; + } + } else { + if (offset2 === 0) { + output = new Ctor(data); + } else { + output = new Ctor(data.length + offset2); + output.set(data, offset2); + } + } + } else { + output.set(data, offset2); + } + } + return output; + } + } +}); + +// node_modules/to-array-buffer/index.js +var require_to_array_buffer = __commonJS({ + "node_modules/to-array-buffer/index.js"(exports2, module2) { + "use strict"; + var str2ab = require_string_to_arraybuffer(); + var flat = require_flatten_vertex_data(); + module2.exports = function toArrayBuffer(arg) { + if (!arg) return null; + if (arg instanceof ArrayBuffer) return arg; + if (typeof arg === "string") { + return str2ab(arg); + } + if (ArrayBuffer.isView(arg)) { + if (arg.byteOffset) { + return arg.buffer.slice(arg.byteOffset, arg.byteOffset + arg.byteLength); + } + return arg.buffer; + } + if (arg.buffer || arg.data || arg._data) { + var result = toArrayBuffer(arg.buffer || arg.data || arg._data); + return result; + } + if (Array.isArray(arg)) { + for (var i2 = 0; i2 < arg.length; i2++) { + if (arg[i2].length != null) { + arg = flat(arg); + break; + } + } + } + var result = new Uint8Array(arg); + if (!result.length) return null; + return result.buffer; + }; + } +}); + +// node_modules/image-pixels/lib/url.js +var require_url = __commonJS({ + "node_modules/image-pixels/lib/url.js"(exports2, module2) { + "use strict"; + var request = require_request3(); + var fs = require("fs"); + var isUrl = require_is_url(); + var URL2 = require("url"); + var isDataUrl = require_is_base64(); + var toab = require_to_array_buffer(); + module2.exports = function load(str, clip) { + return isDataUrl(str, { mime: true }) ? loadDataUrl(str) : isUrl(str) ? loadUrl(str) : loadPath(str); + }; + function loadDataUrl(url) { + var ab = toab(url); + return Promise.resolve(ab); + } + function loadUrl(url) { + url = URL2.parse(url); + if (!url.protocol) url.protocol = "https"; + url = URL2.format(url); + return new Promise(function(yes, no) { + request({ + url, + // arraybuffer + encoding: null + }, function(err, resp, body) { + if (err) return no(err); + if (resp.statusCode !== 200) return no(new Error("Status code: " + resp.statusCode)); + yes(body); + }); + }); + } + function loadPath(filename) { + return new Promise(function(yes, no) { + fs.readFile(filename, function(err, buffer) { + if (err) { + no(err); + return; + } + yes(buffer); + }); + }); + } + } +}); + +// node_modules/primitive-pool/index.js +var require_primitive_pool = __commonJS({ + "node_modules/primitive-pool/index.js"(exports2, module2) { + "use strict"; + module2.exports = getKey; + var cache = {}; + var nullObj = {}; + var undefinedObj = {}; + function getKey(key) { + if (Array.isArray(key) && key.raw) key = String.raw.apply(this, arguments); + if (key === null) { + return nullObj; + } + if (key === void 0) { + return undefinedObj; + } + var obj; + if (typeof key === "number" || key instanceof Number) { + if (cache[key]) return cache[key]; + obj = new Number(key); + cache[key] = obj; + return obj; + } + if (typeof key === "string" || key instanceof String) { + if (cache[key]) return cache[key]; + obj = new String(key); + cache[key] = obj; + return obj; + } + if (typeof key === "boolean" || key instanceof Boolean) { + if (cache[key]) return cache[key]; + obj = new Boolean(key); + cache[key] = obj; + return obj; + } + return key; + } + } +}); + +// node_modules/weak-map/weak-map.js +var require_weak_map = __commonJS({ + "node_modules/weak-map/weak-map.js"(exports2, module2) { + (function WeakMapModule() { + "use strict"; + if (typeof ses !== "undefined" && ses.ok && !ses.ok()) { + return; + } + function weakMapPermitHostObjects(map) { + if (map.permitHostObjects___) { + map.permitHostObjects___(weakMapPermitHostObjects); + } + } + if (typeof ses !== "undefined") { + ses.weakMapPermitHostObjects = weakMapPermitHostObjects; + } + var doubleWeakMapCheckSilentFailure = false; + if (typeof WeakMap === "function") { + var HostWeakMap = WeakMap; + if (typeof navigator !== "undefined" && /Firefox/.test(navigator.userAgent)) { + } else { + var testMap = new HostWeakMap(); + var testObject = Object.freeze({}); + testMap.set(testObject, 1); + if (testMap.get(testObject) !== 1) { + doubleWeakMapCheckSilentFailure = true; + } else { + module2.exports = WeakMap; + return; + } + } + } + var hop = Object.prototype.hasOwnProperty; + var gopn = Object.getOwnPropertyNames; + var defProp = Object.defineProperty; + var isExtensible = Object.isExtensible; + var HIDDEN_NAME_PREFIX = "weakmap:"; + var HIDDEN_NAME = HIDDEN_NAME_PREFIX + "ident:" + Math.random() + "___"; + if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function" && typeof ArrayBuffer === "function" && typeof Uint8Array === "function") { + var ab = new ArrayBuffer(25); + var u8s = new Uint8Array(ab); + crypto.getRandomValues(u8s); + HIDDEN_NAME = HIDDEN_NAME_PREFIX + "rand:" + Array.prototype.map.call(u8s, function(u8) { + return (u8 % 36).toString(36); + }).join("") + "___"; + } + function isNotHiddenName(name) { + return !(name.substr(0, HIDDEN_NAME_PREFIX.length) == HIDDEN_NAME_PREFIX && name.substr(name.length - 3) === "___"); + } + defProp(Object, "getOwnPropertyNames", { + value: function fakeGetOwnPropertyNames(obj) { + return gopn(obj).filter(isNotHiddenName); + } + }); + if ("getPropertyNames" in Object) { + var originalGetPropertyNames = Object.getPropertyNames; + defProp(Object, "getPropertyNames", { + value: function fakeGetPropertyNames(obj) { + return originalGetPropertyNames(obj).filter(isNotHiddenName); + } + }); + } + function getHiddenRecord(key) { + if (key !== Object(key)) { + throw new TypeError("Not an object: " + key); + } + var hiddenRecord = key[HIDDEN_NAME]; + if (hiddenRecord && hiddenRecord.key === key) { + return hiddenRecord; + } + if (!isExtensible(key)) { + return void 0; + } + hiddenRecord = { key }; + try { + defProp(key, HIDDEN_NAME, { + value: hiddenRecord, + writable: false, + enumerable: false, + configurable: false + }); + return hiddenRecord; + } catch (error) { + return void 0; + } + } + (function() { + var oldFreeze = Object.freeze; + defProp(Object, "freeze", { + value: function identifyingFreeze(obj) { + getHiddenRecord(obj); + return oldFreeze(obj); + } + }); + var oldSeal = Object.seal; + defProp(Object, "seal", { + value: function identifyingSeal(obj) { + getHiddenRecord(obj); + return oldSeal(obj); + } + }); + var oldPreventExtensions = Object.preventExtensions; + defProp(Object, "preventExtensions", { + value: function identifyingPreventExtensions(obj) { + getHiddenRecord(obj); + return oldPreventExtensions(obj); + } + }); + })(); + function constFunc(func) { + func.prototype = null; + return Object.freeze(func); + } + var calledAsFunctionWarningDone = false; + function calledAsFunctionWarning() { + if (!calledAsFunctionWarningDone && typeof console !== "undefined") { + calledAsFunctionWarningDone = true; + console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."); + } + } + var nextId = 0; + var OurWeakMap = function() { + if (!(this instanceof OurWeakMap)) { + calledAsFunctionWarning(); + } + var keys = []; + var values = []; + var id = nextId++; + function get___(key, opt_default) { + var index2; + var hiddenRecord = getHiddenRecord(key); + if (hiddenRecord) { + return id in hiddenRecord ? hiddenRecord[id] : opt_default; + } else { + index2 = keys.indexOf(key); + return index2 >= 0 ? values[index2] : opt_default; + } + } + function has___(key) { + var hiddenRecord = getHiddenRecord(key); + if (hiddenRecord) { + return id in hiddenRecord; + } else { + return keys.indexOf(key) >= 0; + } + } + function set___(key, value) { + var index2; + var hiddenRecord = getHiddenRecord(key); + if (hiddenRecord) { + hiddenRecord[id] = value; + } else { + index2 = keys.indexOf(key); + if (index2 >= 0) { + values[index2] = value; + } else { + index2 = keys.length; + values[index2] = value; + keys[index2] = key; + } + } + return this; + } + function delete___(key) { + var hiddenRecord = getHiddenRecord(key); + var index2, lastIndex; + if (hiddenRecord) { + return id in hiddenRecord && delete hiddenRecord[id]; + } else { + index2 = keys.indexOf(key); + if (index2 < 0) { + return false; + } + lastIndex = keys.length - 1; + keys[index2] = void 0; + values[index2] = values[lastIndex]; + keys[index2] = keys[lastIndex]; + keys.length = lastIndex; + values.length = lastIndex; + return true; + } + } + return Object.create(OurWeakMap.prototype, { + get___: { value: constFunc(get___) }, + has___: { value: constFunc(has___) }, + set___: { value: constFunc(set___) }, + delete___: { value: constFunc(delete___) } + }); + }; + OurWeakMap.prototype = Object.create(Object.prototype, { + get: { + /** + * Return the value most recently associated with key, or + * opt_default if none. + */ + value: function get2(key, opt_default) { + return this.get___(key, opt_default); + }, + writable: true, + configurable: true + }, + has: { + /** + * Is there a value associated with key in this WeakMap? + */ + value: function has(key) { + return this.has___(key); + }, + writable: true, + configurable: true + }, + set: { + /** + * Associate value with key in this WeakMap, overwriting any + * previous association if present. + */ + value: function set(key, value) { + return this.set___(key, value); + }, + writable: true, + configurable: true + }, + "delete": { + /** + * Remove any association for key in this WeakMap, returning + * whether there was one. + * + *

Note that the boolean return here does not work like the + * {@code delete} operator. The {@code delete} operator returns + * whether the deletion succeeds at bringing about a state in + * which the deleted property is absent. The {@code delete} + * operator therefore returns true if the property was already + * absent, whereas this {@code delete} method returns false if + * the association was already absent. + */ + value: function remove(key) { + return this.delete___(key); + }, + writable: true, + configurable: true + } + }); + if (typeof HostWeakMap === "function") { + (function() { + if (doubleWeakMapCheckSilentFailure && typeof Proxy !== "undefined") { + Proxy = void 0; + } + function DoubleWeakMap() { + if (!(this instanceof OurWeakMap)) { + calledAsFunctionWarning(); + } + var hmap = new HostWeakMap(); + var omap = void 0; + var enableSwitching = false; + function dget(key, opt_default) { + if (omap) { + return hmap.has(key) ? hmap.get(key) : omap.get___(key, opt_default); + } else { + return hmap.get(key, opt_default); + } + } + function dhas(key) { + return hmap.has(key) || (omap ? omap.has___(key) : false); + } + var dset; + if (doubleWeakMapCheckSilentFailure) { + dset = function(key, value) { + hmap.set(key, value); + if (!hmap.has(key)) { + if (!omap) { + omap = new OurWeakMap(); + } + omap.set(key, value); + } + return this; + }; + } else { + dset = function(key, value) { + if (enableSwitching) { + try { + hmap.set(key, value); + } catch (e) { + if (!omap) { + omap = new OurWeakMap(); + } + omap.set___(key, value); + } + } else { + hmap.set(key, value); + } + return this; + }; + } + function ddelete(key) { + var result = !!hmap["delete"](key); + if (omap) { + return omap.delete___(key) || result; + } + return result; + } + return Object.create(OurWeakMap.prototype, { + get___: { value: constFunc(dget) }, + has___: { value: constFunc(dhas) }, + set___: { value: constFunc(dset) }, + delete___: { value: constFunc(ddelete) }, + permitHostObjects___: { value: constFunc(function(token) { + if (token === weakMapPermitHostObjects) { + enableSwitching = true; + } else { + throw new Error("bogus call to permitHostObjects___"); + } + }) } + }); + } + DoubleWeakMap.prototype = OurWeakMap.prototype; + module2.exports = DoubleWeakMap; + Object.defineProperty(WeakMap.prototype, "constructor", { + value: WeakMap, + enumerable: false, + // as default .constructor is + configurable: true, + writable: true + }); + })(); + } else { + if (typeof Proxy !== "undefined") { + Proxy = void 0; + } + module2.exports = OurWeakMap; + } + })(); + } +}); + +// node_modules/image-pixels/lib/cache.js +var require_cache3 = __commonJS({ + "node_modules/image-pixels/lib/cache.js"(exports2, module2) { + "use strict"; + var p = require_primitive_pool(); + var WeakMap2 = require_weak_map(); + var cache = new WeakMap2(); + module2.exports = { + get: function(key) { + return cache.get(p(key)); + }, + set: function(key, value) { + if (!Array.isArray(key)) key = [key]; + key.forEach(function(key2) { + if (!key2) return; + if (!cache.get(p(key2))) cache.set(p(key2), value); + }); + return value; + } + }; + } +}); + +// node_modules/file-type/index.js +var require_file_type = __commonJS({ + "node_modules/file-type/index.js"(exports, module) { + "use strict"; + var toBytes = (s) => [...s].map((c) => c.charCodeAt(0)); + var xpiZipFilename = toBytes("META-INF/mozilla.rsa"); + var oxmlContentTypes = toBytes("[Content_Types].xml"); + var oxmlRels = toBytes("_rels/.rels"); + function readUInt64LE(buf, offset2 = 0) { + let n = buf[offset2]; + let mul = 1; + let i2 = 0; + while (++i2 < 8) { + mul *= 256; + n += buf[offset2 + i2] * mul; + } + return n; + } + var fileType = (input) => { + if (!(input instanceof Uint8Array || input instanceof ArrayBuffer || Buffer.isBuffer(input))) { + throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof input}\``); + } + const buf = input instanceof Uint8Array ? input : new Uint8Array(input); + if (!(buf && buf.length > 1)) { + return null; + } + const check = (header, options) => { + options = Object.assign({ + offset: 0 + }, options); + for (let i2 = 0; i2 < header.length; i2++) { + if (options.mask) { + if (header[i2] !== (options.mask[i2] & buf[i2 + options.offset])) { + return false; + } + } else if (header[i2] !== buf[i2 + options.offset]) { + return false; + } + } + return true; + }; + const checkString = (header, options) => check(toBytes(header), options); + if (check([255, 216, 255])) { + return { + ext: "jpg", + mime: "image/jpeg" + }; + } + if (check([137, 80, 78, 71, 13, 10, 26, 10])) { + return { + ext: "png", + mime: "image/png" + }; + } + if (check([71, 73, 70])) { + return { + ext: "gif", + mime: "image/gif" + }; + } + if (check([87, 69, 66, 80], { offset: 8 })) { + return { + ext: "webp", + mime: "image/webp" + }; + } + if (check([70, 76, 73, 70])) { + return { + ext: "flif", + mime: "image/flif" + }; + } + if ((check([73, 73, 42, 0]) || check([77, 77, 0, 42])) && check([67, 82], { offset: 8 })) { + return { + ext: "cr2", + mime: "image/x-canon-cr2" + }; + } + if (check([73, 73, 42, 0]) || check([77, 77, 0, 42])) { + return { + ext: "tif", + mime: "image/tiff" + }; + } + if (check([66, 77])) { + return { + ext: "bmp", + mime: "image/bmp" + }; + } + if (check([73, 73, 188])) { + return { + ext: "jxr", + mime: "image/vnd.ms-photo" + }; + } + if (check([56, 66, 80, 83])) { + return { + ext: "psd", + mime: "image/vnd.adobe.photoshop" + }; + } + if (check([80, 75, 3, 4])) { + if (check([109, 105, 109, 101, 116, 121, 112, 101, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 101, 112, 117, 98, 43, 122, 105, 112], { offset: 30 })) { + return { + ext: "epub", + mime: "application/epub+zip" + }; + } + if (check(xpiZipFilename, { offset: 30 })) { + return { + ext: "xpi", + mime: "application/x-xpinstall" + }; + } + if (checkString("mimetypeapplication/vnd.oasis.opendocument.text", { offset: 30 })) { + return { + ext: "odt", + mime: "application/vnd.oasis.opendocument.text" + }; + } + if (checkString("mimetypeapplication/vnd.oasis.opendocument.spreadsheet", { offset: 30 })) { + return { + ext: "ods", + mime: "application/vnd.oasis.opendocument.spreadsheet" + }; + } + if (checkString("mimetypeapplication/vnd.oasis.opendocument.presentation", { offset: 30 })) { + return { + ext: "odp", + mime: "application/vnd.oasis.opendocument.presentation" + }; + } + const findNextZipHeaderIndex = (arr2, startAt = 0) => arr2.findIndex((el, i2, arr3) => i2 >= startAt && arr3[i2] === 80 && arr3[i2 + 1] === 75 && arr3[i2 + 2] === 3 && arr3[i2 + 3] === 4); + let zipHeaderIndex = 0; + let oxmlFound = false; + let type = null; + do { + const offset2 = zipHeaderIndex + 30; + if (!oxmlFound) { + oxmlFound = check(oxmlContentTypes, { offset: offset2 }) || check(oxmlRels, { offset: offset2 }); + } + if (!type) { + if (checkString("word/", { offset: offset2 })) { + type = { + ext: "docx", + mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + }; + } else if (checkString("ppt/", { offset: offset2 })) { + type = { + ext: "pptx", + mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation" + }; + } else if (checkString("xl/", { offset: offset2 })) { + type = { + ext: "xlsx", + mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + }; + } + } + if (oxmlFound && type) { + return type; + } + zipHeaderIndex = findNextZipHeaderIndex(buf, offset2); + } while (zipHeaderIndex >= 0); + if (type) { + return type; + } + } + if (check([80, 75]) && (buf[2] === 3 || buf[2] === 5 || buf[2] === 7) && (buf[3] === 4 || buf[3] === 6 || buf[3] === 8)) { + return { + ext: "zip", + mime: "application/zip" + }; + } + if (check([117, 115, 116, 97, 114], { offset: 257 })) { + return { + ext: "tar", + mime: "application/x-tar" + }; + } + if (check([82, 97, 114, 33, 26, 7]) && (buf[6] === 0 || buf[6] === 1)) { + return { + ext: "rar", + mime: "application/x-rar-compressed" + }; + } + if (check([31, 139, 8])) { + return { + ext: "gz", + mime: "application/gzip" + }; + } + if (check([66, 90, 104])) { + return { + ext: "bz2", + mime: "application/x-bzip2" + }; + } + if (check([55, 122, 188, 175, 39, 28])) { + return { + ext: "7z", + mime: "application/x-7z-compressed" + }; + } + if (check([120, 1])) { + return { + ext: "dmg", + mime: "application/x-apple-diskimage" + }; + } + if (check([51, 103, 112, 53]) || // 3gp5 + check([0, 0, 0]) && check([102, 116, 121, 112], { offset: 4 }) && (check([109, 112, 52, 49], { offset: 8 }) || // MP41 + check([109, 112, 52, 50], { offset: 8 }) || // MP42 + check([105, 115, 111, 109], { offset: 8 }) || // ISOM + check([105, 115, 111, 50], { offset: 8 }) || // ISO2 + check([109, 109, 112, 52], { offset: 8 }) || // MMP4 + check([77, 52, 86], { offset: 8 }) || // M4V + check([100, 97, 115, 104], { offset: 8 }))) { + return { + ext: "mp4", + mime: "video/mp4" + }; + } + if (check([77, 84, 104, 100])) { + return { + ext: "mid", + mime: "audio/midi" + }; + } + if (check([26, 69, 223, 163])) { + const sliced = buf.subarray(4, 4 + 4096); + const idPos = sliced.findIndex((el, i2, arr2) => arr2[i2] === 66 && arr2[i2 + 1] === 130); + if (idPos !== -1) { + const docTypePos = idPos + 3; + const findDocType = (type) => [...type].every((c, i2) => sliced[docTypePos + i2] === c.charCodeAt(0)); + if (findDocType("matroska")) { + return { + ext: "mkv", + mime: "video/x-matroska" + }; + } + if (findDocType("webm")) { + return { + ext: "webm", + mime: "video/webm" + }; + } + } + } + if (check([0, 0, 0, 20, 102, 116, 121, 112, 113, 116, 32, 32]) || check([102, 114, 101, 101], { offset: 4 }) || // Type: `free` + check([102, 116, 121, 112, 113, 116, 32, 32], { offset: 4 }) || check([109, 100, 97, 116], { offset: 4 }) || // MJPEG + check([109, 111, 111, 118], { offset: 4 }) || // Type: `moov` + check([119, 105, 100, 101], { offset: 4 })) { + return { + ext: "mov", + mime: "video/quicktime" + }; + } + if (check([82, 73, 70, 70])) { + if (check([65, 86, 73], { offset: 8 })) { + return { + ext: "avi", + mime: "video/vnd.avi" + }; + } + if (check([87, 65, 86, 69], { offset: 8 })) { + return { + ext: "wav", + mime: "audio/vnd.wave" + }; + } + if (check([81, 76, 67, 77], { offset: 8 })) { + return { + ext: "qcp", + mime: "audio/qcelp" + }; + } + } + if (check([48, 38, 178, 117, 142, 102, 207, 17, 166, 217])) { + let offset2 = 30; + do { + const objectSize = readUInt64LE(buf, offset2 + 16); + if (check([145, 7, 220, 183, 183, 169, 207, 17, 142, 230, 0, 192, 12, 32, 83, 101], { offset: offset2 })) { + if (check([64, 158, 105, 248, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43], { offset: offset2 + 24 })) { + return { + ext: "wma", + mime: "audio/x-ms-wma" + }; + } + if (check([192, 239, 25, 188, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43], { offset: offset2 + 24 })) { + return { + ext: "wmv", + mime: "video/x-ms-asf" + }; + } + break; + } + offset2 += objectSize; + } while (offset2 + 24 <= buf.length); + return { + ext: "asf", + mime: "application/vnd.ms-asf" + }; + } + if (check([0, 0, 1, 186]) || check([0, 0, 1, 179])) { + return { + ext: "mpg", + mime: "video/mpeg" + }; + } + if (check([102, 116, 121, 112, 51, 103], { offset: 4 })) { + return { + ext: "3gp", + mime: "video/3gpp" + }; + } + for (let start = 0; start < 2 && start < buf.length - 16; start++) { + if (check([73, 68, 51], { offset: start }) || // ID3 header + check([255, 226], { offset: start, mask: [255, 226] })) { + return { + ext: "mp3", + mime: "audio/mpeg" + }; + } + if (check([255, 228], { offset: start, mask: [255, 228] })) { + return { + ext: "mp2", + mime: "audio/mpeg" + }; + } + if (check([255, 248], { offset: start, mask: [255, 252] })) { + return { + ext: "mp2", + mime: "audio/mpeg" + }; + } + if (check([255, 240], { offset: start, mask: [255, 252] })) { + return { + ext: "mp4", + mime: "audio/mpeg" + }; + } + } + if (check([102, 116, 121, 112, 77, 52, 65], { offset: 4 })) { + return { + // MPEG-4 layer 3 (audio) + ext: "m4a", + mime: "audio/mp4" + // RFC 4337 + }; + } + if (check([79, 112, 117, 115, 72, 101, 97, 100], { offset: 28 })) { + return { + ext: "opus", + mime: "audio/opus" + }; + } + if (check([79, 103, 103, 83])) { + if (check([128, 116, 104, 101, 111, 114, 97], { offset: 28 })) { + return { + ext: "ogv", + mime: "video/ogg" + }; + } + if (check([1, 118, 105, 100, 101, 111, 0], { offset: 28 })) { + return { + ext: "ogm", + mime: "video/ogg" + }; + } + if (check([127, 70, 76, 65, 67], { offset: 28 })) { + return { + ext: "oga", + mime: "audio/ogg" + }; + } + if (check([83, 112, 101, 101, 120, 32, 32], { offset: 28 })) { + return { + ext: "spx", + mime: "audio/ogg" + }; + } + if (check([1, 118, 111, 114, 98, 105, 115], { offset: 28 })) { + return { + ext: "ogg", + mime: "audio/ogg" + }; + } + return { + ext: "ogx", + mime: "application/ogg" + }; + } + if (check([102, 76, 97, 67])) { + return { + ext: "flac", + mime: "audio/x-flac" + }; + } + if (check([77, 65, 67, 32])) { + return { + ext: "ape", + mime: "audio/ape" + }; + } + if (check([119, 118, 112, 107])) { + return { + ext: "wv", + mime: "audio/wavpack" + }; + } + if (check([35, 33, 65, 77, 82, 10])) { + return { + ext: "amr", + mime: "audio/amr" + }; + } + if (check([37, 80, 68, 70])) { + return { + ext: "pdf", + mime: "application/pdf" + }; + } + if (check([77, 90])) { + return { + ext: "exe", + mime: "application/x-msdownload" + }; + } + if ((buf[0] === 67 || buf[0] === 70) && check([87, 83], { offset: 1 })) { + return { + ext: "swf", + mime: "application/x-shockwave-flash" + }; + } + if (check([123, 92, 114, 116, 102])) { + return { + ext: "rtf", + mime: "application/rtf" + }; + } + if (check([0, 97, 115, 109])) { + return { + ext: "wasm", + mime: "application/wasm" + }; + } + if (check([119, 79, 70, 70]) && (check([0, 1, 0, 0], { offset: 4 }) || check([79, 84, 84, 79], { offset: 4 }))) { + return { + ext: "woff", + mime: "font/woff" + }; + } + if (check([119, 79, 70, 50]) && (check([0, 1, 0, 0], { offset: 4 }) || check([79, 84, 84, 79], { offset: 4 }))) { + return { + ext: "woff2", + mime: "font/woff2" + }; + } + if (check([76, 80], { offset: 34 }) && (check([0, 0, 1], { offset: 8 }) || check([1, 0, 2], { offset: 8 }) || check([2, 0, 2], { offset: 8 }))) { + return { + ext: "eot", + mime: "application/vnd.ms-fontobject" + }; + } + if (check([0, 1, 0, 0, 0])) { + return { + ext: "ttf", + mime: "font/ttf" + }; + } + if (check([79, 84, 84, 79, 0])) { + return { + ext: "otf", + mime: "font/otf" + }; + } + if (check([0, 0, 1, 0])) { + return { + ext: "ico", + mime: "image/x-icon" + }; + } + if (check([0, 0, 2, 0])) { + return { + ext: "cur", + mime: "image/x-icon" + }; + } + if (check([70, 76, 86, 1])) { + return { + ext: "flv", + mime: "video/x-flv" + }; + } + if (check([37, 33])) { + return { + ext: "ps", + mime: "application/postscript" + }; + } + if (check([253, 55, 122, 88, 90, 0])) { + return { + ext: "xz", + mime: "application/x-xz" + }; + } + if (check([83, 81, 76, 105])) { + return { + ext: "sqlite", + mime: "application/x-sqlite3" + }; + } + if (check([78, 69, 83, 26])) { + return { + ext: "nes", + mime: "application/x-nintendo-nes-rom" + }; + } + if (check([67, 114, 50, 52])) { + return { + ext: "crx", + mime: "application/x-google-chrome-extension" + }; + } + if (check([77, 83, 67, 70]) || check([73, 83, 99, 40])) { + return { + ext: "cab", + mime: "application/vnd.ms-cab-compressed" + }; + } + if (check([33, 60, 97, 114, 99, 104, 62, 10, 100, 101, 98, 105, 97, 110, 45, 98, 105, 110, 97, 114, 121])) { + return { + ext: "deb", + mime: "application/x-deb" + }; + } + if (check([33, 60, 97, 114, 99, 104, 62])) { + return { + ext: "ar", + mime: "application/x-unix-archive" + }; + } + if (check([237, 171, 238, 219])) { + return { + ext: "rpm", + mime: "application/x-rpm" + }; + } + if (check([31, 160]) || check([31, 157])) { + return { + ext: "Z", + mime: "application/x-compress" + }; + } + if (check([76, 90, 73, 80])) { + return { + ext: "lz", + mime: "application/x-lzip" + }; + } + if (check([208, 207, 17, 224, 161, 177, 26, 225])) { + return { + ext: "msi", + mime: "application/x-msi" + }; + } + if (check([6, 14, 43, 52, 2, 5, 1, 1, 13, 1, 2, 1, 1, 2])) { + return { + ext: "mxf", + mime: "application/mxf" + }; + } + if (check([71], { offset: 4 }) && (check([71], { offset: 192 }) || check([71], { offset: 196 }))) { + return { + ext: "mts", + mime: "video/mp2t" + }; + } + if (check([66, 76, 69, 78, 68, 69, 82])) { + return { + ext: "blend", + mime: "application/x-blender" + }; + } + if (check([66, 80, 71, 251])) { + return { + ext: "bpg", + mime: "image/bpg" + }; + } + if (check([0, 0, 0, 12, 106, 80, 32, 32, 13, 10, 135, 10])) { + if (check([106, 112, 50, 32], { offset: 20 })) { + return { + ext: "jp2", + mime: "image/jp2" + }; + } + if (check([106, 112, 120, 32], { offset: 20 })) { + return { + ext: "jpx", + mime: "image/jpx" + }; + } + if (check([106, 112, 109, 32], { offset: 20 })) { + return { + ext: "jpm", + mime: "image/jpm" + }; + } + if (check([109, 106, 112, 50], { offset: 20 })) { + return { + ext: "mj2", + mime: "image/mj2" + }; + } + } + if (check([70, 79, 82, 77])) { + return { + ext: "aif", + mime: "audio/aiff" + }; + } + if (checkString(" new Promise((resolve, reject) => { + const stream = eval("require")("stream"); + readableStream.once("readable", () => { + const pass = new stream.PassThrough(); + const chunk = readableStream.read(module.exports.minimumBytes) || readableStream.read(); + try { + pass.fileType = fileType(chunk); + } catch (error) { + reject(error); + } + readableStream.unshift(chunk); + if (stream.pipeline) { + resolve(stream.pipeline(readableStream, pass, () => { + })); + } else { + resolve(readableStream.pipe(pass)); + } + }); + }); + } +}); + +// node_modules/image-type/index.js +var require_image_type = __commonJS({ + "node_modules/image-type/index.js"(exports2, module2) { + "use strict"; + var fileType2 = require_file_type(); + var imageExts = /* @__PURE__ */ new Set([ + "jpg", + "png", + "gif", + "webp", + "flif", + "cr2", + "tif", + "bmp", + "jxr", + "psd", + "ico", + "bpg", + "jp2", + "jpm", + "jpx", + "heic", + "cur", + "dcm" + ]); + var imageType = (input) => { + const ret = fileType2(input); + return imageExts.has(ret && ret.ext) ? ret : null; + }; + module2.exports = imageType; + module2.exports.default = imageType; + Object.defineProperty(imageType, "minimumBytes", { value: fileType2.minimumBytes }); + } +}); + +// node_modules/pngjs/lib/chunkstream.js +var require_chunkstream = __commonJS({ + "node_modules/pngjs/lib/chunkstream.js"(exports2, module2) { + "use strict"; + var util2 = require("util"); + var Stream = require("stream"); + var ChunkStream = module2.exports = function() { + Stream.call(this); + this._buffers = []; + this._buffered = 0; + this._reads = []; + this._paused = false; + this._encoding = "utf8"; + this.writable = true; + }; + util2.inherits(ChunkStream, Stream); + ChunkStream.prototype.read = function(length, callback) { + this._reads.push({ + length: Math.abs(length), + // if length < 0 then at most this length + allowLess: length < 0, + func: callback + }); + process.nextTick(function() { + this._process(); + if (this._paused && this._reads.length > 0) { + this._paused = false; + this.emit("drain"); + } + }.bind(this)); + }; + ChunkStream.prototype.write = function(data, encoding) { + if (!this.writable) { + this.emit("error", new Error("Stream not writable")); + return false; + } + var dataBuffer; + if (Buffer.isBuffer(data)) { + dataBuffer = data; + } else { + dataBuffer = new Buffer(data, encoding || this._encoding); + } + this._buffers.push(dataBuffer); + this._buffered += dataBuffer.length; + this._process(); + if (this._reads && this._reads.length === 0) { + this._paused = true; + } + return this.writable && !this._paused; + }; + ChunkStream.prototype.end = function(data, encoding) { + if (data) { + this.write(data, encoding); + } + this.writable = false; + if (!this._buffers) { + return; + } + if (this._buffers.length === 0) { + this._end(); + } else { + this._buffers.push(null); + this._process(); + } + }; + ChunkStream.prototype.destroySoon = ChunkStream.prototype.end; + ChunkStream.prototype._end = function() { + if (this._reads.length > 0) { + this.emit( + "error", + new Error("Unexpected end of input") + ); + } + this.destroy(); + }; + ChunkStream.prototype.destroy = function() { + if (!this._buffers) { + return; + } + this.writable = false; + this._reads = null; + this._buffers = null; + this.emit("close"); + }; + ChunkStream.prototype._processReadAllowingLess = function(read) { + this._reads.shift(); + var smallerBuf = this._buffers[0]; + if (smallerBuf.length > read.length) { + this._buffered -= read.length; + this._buffers[0] = smallerBuf.slice(read.length); + read.func.call(this, smallerBuf.slice(0, read.length)); + } else { + this._buffered -= smallerBuf.length; + this._buffers.shift(); + read.func.call(this, smallerBuf); + } + }; + ChunkStream.prototype._processRead = function(read) { + this._reads.shift(); + var pos = 0; + var count = 0; + var data = new Buffer(read.length); + while (pos < read.length) { + var buf = this._buffers[count++]; + var len = Math.min(buf.length, read.length - pos); + buf.copy(data, pos, 0, len); + pos += len; + if (len !== buf.length) { + this._buffers[--count] = buf.slice(len); + } + } + if (count > 0) { + this._buffers.splice(0, count); + } + this._buffered -= read.length; + read.func.call(this, data); + }; + ChunkStream.prototype._process = function() { + try { + while (this._buffered > 0 && this._reads && this._reads.length > 0) { + var read = this._reads[0]; + if (read.allowLess) { + this._processReadAllowingLess(read); + } else if (this._buffered >= read.length) { + this._processRead(read); + } else { + break; + } + } + if (this._buffers && !this.writable) { + this._end(); + } + } catch (ex) { + this.emit("error", ex); + } + }; + } +}); + +// node_modules/pngjs/lib/interlace.js +var require_interlace = __commonJS({ + "node_modules/pngjs/lib/interlace.js"(exports2) { + "use strict"; + var imagePasses = [ + { + // pass 1 - 1px + x: [0], + y: [0] + }, + { + // pass 2 - 1px + x: [4], + y: [0] + }, + { + // pass 3 - 2px + x: [0, 4], + y: [4] + }, + { + // pass 4 - 4px + x: [2, 6], + y: [0, 4] + }, + { + // pass 5 - 8px + x: [0, 2, 4, 6], + y: [2, 6] + }, + { + // pass 6 - 16px + x: [1, 3, 5, 7], + y: [0, 2, 4, 6] + }, + { + // pass 7 - 32px + x: [0, 1, 2, 3, 4, 5, 6, 7], + y: [1, 3, 5, 7] + } + ]; + exports2.getImagePasses = function(width, height) { + var images = []; + var xLeftOver = width % 8; + var yLeftOver = height % 8; + var xRepeats = (width - xLeftOver) / 8; + var yRepeats = (height - yLeftOver) / 8; + for (var i2 = 0; i2 < imagePasses.length; i2++) { + var pass = imagePasses[i2]; + var passWidth = xRepeats * pass.x.length; + var passHeight = yRepeats * pass.y.length; + for (var j = 0; j < pass.x.length; j++) { + if (pass.x[j] < xLeftOver) { + passWidth++; + } else { + break; + } + } + for (j = 0; j < pass.y.length; j++) { + if (pass.y[j] < yLeftOver) { + passHeight++; + } else { + break; + } + } + if (passWidth > 0 && passHeight > 0) { + images.push({ width: passWidth, height: passHeight, index: i2 }); + } + } + return images; + }; + exports2.getInterlaceIterator = function(width) { + return function(x, y, pass) { + var outerXLeftOver = x % imagePasses[pass].x.length; + var outerX = (x - outerXLeftOver) / imagePasses[pass].x.length * 8 + imagePasses[pass].x[outerXLeftOver]; + var outerYLeftOver = y % imagePasses[pass].y.length; + var outerY = (y - outerYLeftOver) / imagePasses[pass].y.length * 8 + imagePasses[pass].y[outerYLeftOver]; + return outerX * 4 + outerY * width * 4; + }; + }; + } +}); + +// node_modules/pngjs/lib/paeth-predictor.js +var require_paeth_predictor = __commonJS({ + "node_modules/pngjs/lib/paeth-predictor.js"(exports2, module2) { + "use strict"; + module2.exports = function paethPredictor(left, above, upLeft) { + var paeth = left + above - upLeft; + var pLeft = Math.abs(paeth - left); + var pAbove = Math.abs(paeth - above); + var pUpLeft = Math.abs(paeth - upLeft); + if (pLeft <= pAbove && pLeft <= pUpLeft) { + return left; + } + if (pAbove <= pUpLeft) { + return above; + } + return upLeft; + }; + } +}); + +// node_modules/pngjs/lib/filter-parse.js +var require_filter_parse = __commonJS({ + "node_modules/pngjs/lib/filter-parse.js"(exports2, module2) { + "use strict"; + var interlaceUtils = require_interlace(); + var paethPredictor = require_paeth_predictor(); + function getByteWidth(width, bpp, depth) { + var byteWidth = width * bpp; + if (depth !== 8) { + byteWidth = Math.ceil(byteWidth / (8 / depth)); + } + return byteWidth; + } + var Filter = module2.exports = function(bitmapInfo, dependencies) { + var width = bitmapInfo.width; + var height = bitmapInfo.height; + var interlace = bitmapInfo.interlace; + var bpp = bitmapInfo.bpp; + var depth = bitmapInfo.depth; + this.read = dependencies.read; + this.write = dependencies.write; + this.complete = dependencies.complete; + this._imageIndex = 0; + this._images = []; + if (interlace) { + var passes = interlaceUtils.getImagePasses(width, height); + for (var i2 = 0; i2 < passes.length; i2++) { + this._images.push({ + byteWidth: getByteWidth(passes[i2].width, bpp, depth), + height: passes[i2].height, + lineIndex: 0 + }); + } + } else { + this._images.push({ + byteWidth: getByteWidth(width, bpp, depth), + height, + lineIndex: 0 + }); + } + if (depth === 8) { + this._xComparison = bpp; + } else if (depth === 16) { + this._xComparison = bpp * 2; + } else { + this._xComparison = 1; + } + }; + Filter.prototype.start = function() { + this.read(this._images[this._imageIndex].byteWidth + 1, this._reverseFilterLine.bind(this)); + }; + Filter.prototype._unFilterType1 = function(rawData, unfilteredLine, byteWidth) { + var xComparison = this._xComparison; + var xBiggerThan = xComparison - 1; + for (var x = 0; x < byteWidth; x++) { + var rawByte = rawData[1 + x]; + var f1Left = x > xBiggerThan ? unfilteredLine[x - xComparison] : 0; + unfilteredLine[x] = rawByte + f1Left; + } + }; + Filter.prototype._unFilterType2 = function(rawData, unfilteredLine, byteWidth) { + var lastLine = this._lastLine; + for (var x = 0; x < byteWidth; x++) { + var rawByte = rawData[1 + x]; + var f2Up = lastLine ? lastLine[x] : 0; + unfilteredLine[x] = rawByte + f2Up; + } + }; + Filter.prototype._unFilterType3 = function(rawData, unfilteredLine, byteWidth) { + var xComparison = this._xComparison; + var xBiggerThan = xComparison - 1; + var lastLine = this._lastLine; + for (var x = 0; x < byteWidth; x++) { + var rawByte = rawData[1 + x]; + var f3Up = lastLine ? lastLine[x] : 0; + var f3Left = x > xBiggerThan ? unfilteredLine[x - xComparison] : 0; + var f3Add = Math.floor((f3Left + f3Up) / 2); + unfilteredLine[x] = rawByte + f3Add; + } + }; + Filter.prototype._unFilterType4 = function(rawData, unfilteredLine, byteWidth) { + var xComparison = this._xComparison; + var xBiggerThan = xComparison - 1; + var lastLine = this._lastLine; + for (var x = 0; x < byteWidth; x++) { + var rawByte = rawData[1 + x]; + var f4Up = lastLine ? lastLine[x] : 0; + var f4Left = x > xBiggerThan ? unfilteredLine[x - xComparison] : 0; + var f4UpLeft = x > xBiggerThan && lastLine ? lastLine[x - xComparison] : 0; + var f4Add = paethPredictor(f4Left, f4Up, f4UpLeft); + unfilteredLine[x] = rawByte + f4Add; + } + }; + Filter.prototype._reverseFilterLine = function(rawData) { + var filter = rawData[0]; + var unfilteredLine; + var currentImage = this._images[this._imageIndex]; + var byteWidth = currentImage.byteWidth; + if (filter === 0) { + unfilteredLine = rawData.slice(1, byteWidth + 1); + } else { + unfilteredLine = new Buffer(byteWidth); + switch (filter) { + case 1: + this._unFilterType1(rawData, unfilteredLine, byteWidth); + break; + case 2: + this._unFilterType2(rawData, unfilteredLine, byteWidth); + break; + case 3: + this._unFilterType3(rawData, unfilteredLine, byteWidth); + break; + case 4: + this._unFilterType4(rawData, unfilteredLine, byteWidth); + break; + default: + throw new Error("Unrecognised filter type - " + filter); + } + } + this.write(unfilteredLine); + currentImage.lineIndex++; + if (currentImage.lineIndex >= currentImage.height) { + this._lastLine = null; + this._imageIndex++; + currentImage = this._images[this._imageIndex]; + } else { + this._lastLine = unfilteredLine; + } + if (currentImage) { + this.read(currentImage.byteWidth + 1, this._reverseFilterLine.bind(this)); + } else { + this._lastLine = null; + this.complete(); + } + }; + } +}); + +// node_modules/pngjs/lib/filter-parse-async.js +var require_filter_parse_async = __commonJS({ + "node_modules/pngjs/lib/filter-parse-async.js"(exports2, module2) { + "use strict"; + var util2 = require("util"); + var ChunkStream = require_chunkstream(); + var Filter = require_filter_parse(); + var FilterAsync = module2.exports = function(bitmapInfo) { + ChunkStream.call(this); + var buffers = []; + var that = this; + this._filter = new Filter(bitmapInfo, { + read: this.read.bind(this), + write: function(buffer) { + buffers.push(buffer); + }, + complete: function() { + that.emit("complete", Buffer.concat(buffers)); + } + }); + this._filter.start(); + }; + util2.inherits(FilterAsync, ChunkStream); + } +}); + +// node_modules/pngjs/lib/constants.js +var require_constants = __commonJS({ + "node_modules/pngjs/lib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + PNG_SIGNATURE: [137, 80, 78, 71, 13, 10, 26, 10], + TYPE_IHDR: 1229472850, + TYPE_IEND: 1229278788, + TYPE_IDAT: 1229209940, + TYPE_PLTE: 1347179589, + TYPE_tRNS: 1951551059, + // eslint-disable-line camelcase + TYPE_gAMA: 1732332865, + // eslint-disable-line camelcase + // color-type bits + COLORTYPE_GRAYSCALE: 0, + COLORTYPE_PALETTE: 1, + COLORTYPE_COLOR: 2, + COLORTYPE_ALPHA: 4, + // e.g. grayscale and alpha + // color-type combinations + COLORTYPE_PALETTE_COLOR: 3, + COLORTYPE_COLOR_ALPHA: 6, + COLORTYPE_TO_BPP_MAP: { + 0: 1, + 2: 3, + 3: 1, + 4: 2, + 6: 4 + }, + GAMMA_DIVISION: 1e5 + }; + } +}); + +// node_modules/pngjs/lib/crc.js +var require_crc = __commonJS({ + "node_modules/pngjs/lib/crc.js"(exports2, module2) { + "use strict"; + var crcTable = []; + (function() { + for (var i2 = 0; i2 < 256; i2++) { + var currentCrc = i2; + for (var j = 0; j < 8; j++) { + if (currentCrc & 1) { + currentCrc = 3988292384 ^ currentCrc >>> 1; + } else { + currentCrc = currentCrc >>> 1; + } + } + crcTable[i2] = currentCrc; + } + })(); + var CrcCalculator = module2.exports = function() { + this._crc = -1; + }; + CrcCalculator.prototype.write = function(data) { + for (var i2 = 0; i2 < data.length; i2++) { + this._crc = crcTable[(this._crc ^ data[i2]) & 255] ^ this._crc >>> 8; + } + return true; + }; + CrcCalculator.prototype.crc32 = function() { + return this._crc ^ -1; + }; + CrcCalculator.crc32 = function(buf) { + var crc = -1; + for (var i2 = 0; i2 < buf.length; i2++) { + crc = crcTable[(crc ^ buf[i2]) & 255] ^ crc >>> 8; + } + return crc ^ -1; + }; + } +}); + +// node_modules/pngjs/lib/parser.js +var require_parser2 = __commonJS({ + "node_modules/pngjs/lib/parser.js"(exports2, module2) { + "use strict"; + var constants = require_constants(); + var CrcCalculator = require_crc(); + var Parser = module2.exports = function(options, dependencies) { + this._options = options; + options.checkCRC = options.checkCRC !== false; + this._hasIHDR = false; + this._hasIEND = false; + this._emittedHeadersFinished = false; + this._palette = []; + this._colorType = 0; + this._chunks = {}; + this._chunks[constants.TYPE_IHDR] = this._handleIHDR.bind(this); + this._chunks[constants.TYPE_IEND] = this._handleIEND.bind(this); + this._chunks[constants.TYPE_IDAT] = this._handleIDAT.bind(this); + this._chunks[constants.TYPE_PLTE] = this._handlePLTE.bind(this); + this._chunks[constants.TYPE_tRNS] = this._handleTRNS.bind(this); + this._chunks[constants.TYPE_gAMA] = this._handleGAMA.bind(this); + this.read = dependencies.read; + this.error = dependencies.error; + this.metadata = dependencies.metadata; + this.gamma = dependencies.gamma; + this.transColor = dependencies.transColor; + this.palette = dependencies.palette; + this.parsed = dependencies.parsed; + this.inflateData = dependencies.inflateData; + this.finished = dependencies.finished; + this.simpleTransparency = dependencies.simpleTransparency; + this.headersFinished = dependencies.headersFinished || function() { + }; + }; + Parser.prototype.start = function() { + this.read( + constants.PNG_SIGNATURE.length, + this._parseSignature.bind(this) + ); + }; + Parser.prototype._parseSignature = function(data) { + var signature = constants.PNG_SIGNATURE; + for (var i2 = 0; i2 < signature.length; i2++) { + if (data[i2] !== signature[i2]) { + this.error(new Error("Invalid file signature")); + return; + } + } + this.read(8, this._parseChunkBegin.bind(this)); + }; + Parser.prototype._parseChunkBegin = function(data) { + var length = data.readUInt32BE(0); + var type = data.readUInt32BE(4); + var name = ""; + for (var i2 = 4; i2 < 8; i2++) { + name += String.fromCharCode(data[i2]); + } + var ancillary = Boolean(data[4] & 32); + if (!this._hasIHDR && type !== constants.TYPE_IHDR) { + this.error(new Error("Expected IHDR on beggining")); + return; + } + this._crc = new CrcCalculator(); + this._crc.write(new Buffer(name)); + if (this._chunks[type]) { + return this._chunks[type](length); + } + if (!ancillary) { + this.error(new Error("Unsupported critical chunk type " + name)); + return; + } + this.read(length + 4, this._skipChunk.bind(this)); + }; + Parser.prototype._skipChunk = function() { + this.read(8, this._parseChunkBegin.bind(this)); + }; + Parser.prototype._handleChunkEnd = function() { + this.read(4, this._parseChunkEnd.bind(this)); + }; + Parser.prototype._parseChunkEnd = function(data) { + var fileCrc = data.readInt32BE(0); + var calcCrc = this._crc.crc32(); + if (this._options.checkCRC && calcCrc !== fileCrc) { + this.error(new Error("Crc error - " + fileCrc + " - " + calcCrc)); + return; + } + if (!this._hasIEND) { + this.read(8, this._parseChunkBegin.bind(this)); + } + }; + Parser.prototype._handleIHDR = function(length) { + this.read(length, this._parseIHDR.bind(this)); + }; + Parser.prototype._parseIHDR = function(data) { + this._crc.write(data); + var width = data.readUInt32BE(0); + var height = data.readUInt32BE(4); + var depth = data[8]; + var colorType = data[9]; + var compr = data[10]; + var filter = data[11]; + var interlace = data[12]; + if (depth !== 8 && depth !== 4 && depth !== 2 && depth !== 1 && depth !== 16) { + this.error(new Error("Unsupported bit depth " + depth)); + return; + } + if (!(colorType in constants.COLORTYPE_TO_BPP_MAP)) { + this.error(new Error("Unsupported color type")); + return; + } + if (compr !== 0) { + this.error(new Error("Unsupported compression method")); + return; + } + if (filter !== 0) { + this.error(new Error("Unsupported filter method")); + return; + } + if (interlace !== 0 && interlace !== 1) { + this.error(new Error("Unsupported interlace method")); + return; + } + this._colorType = colorType; + var bpp = constants.COLORTYPE_TO_BPP_MAP[this._colorType]; + this._hasIHDR = true; + this.metadata({ + width, + height, + depth, + interlace: Boolean(interlace), + palette: Boolean(colorType & constants.COLORTYPE_PALETTE), + color: Boolean(colorType & constants.COLORTYPE_COLOR), + alpha: Boolean(colorType & constants.COLORTYPE_ALPHA), + bpp, + colorType + }); + this._handleChunkEnd(); + }; + Parser.prototype._handlePLTE = function(length) { + this.read(length, this._parsePLTE.bind(this)); + }; + Parser.prototype._parsePLTE = function(data) { + this._crc.write(data); + var entries = Math.floor(data.length / 3); + for (var i2 = 0; i2 < entries; i2++) { + this._palette.push([ + data[i2 * 3], + data[i2 * 3 + 1], + data[i2 * 3 + 2], + 255 + ]); + } + this.palette(this._palette); + this._handleChunkEnd(); + }; + Parser.prototype._handleTRNS = function(length) { + this.simpleTransparency(); + this.read(length, this._parseTRNS.bind(this)); + }; + Parser.prototype._parseTRNS = function(data) { + this._crc.write(data); + if (this._colorType === constants.COLORTYPE_PALETTE_COLOR) { + if (this._palette.length === 0) { + this.error(new Error("Transparency chunk must be after palette")); + return; + } + if (data.length > this._palette.length) { + this.error(new Error("More transparent colors than palette size")); + return; + } + for (var i2 = 0; i2 < data.length; i2++) { + this._palette[i2][3] = data[i2]; + } + this.palette(this._palette); + } + if (this._colorType === constants.COLORTYPE_GRAYSCALE) { + this.transColor([data.readUInt16BE(0)]); + } + if (this._colorType === constants.COLORTYPE_COLOR) { + this.transColor([data.readUInt16BE(0), data.readUInt16BE(2), data.readUInt16BE(4)]); + } + this._handleChunkEnd(); + }; + Parser.prototype._handleGAMA = function(length) { + this.read(length, this._parseGAMA.bind(this)); + }; + Parser.prototype._parseGAMA = function(data) { + this._crc.write(data); + this.gamma(data.readUInt32BE(0) / constants.GAMMA_DIVISION); + this._handleChunkEnd(); + }; + Parser.prototype._handleIDAT = function(length) { + if (!this._emittedHeadersFinished) { + this._emittedHeadersFinished = true; + this.headersFinished(); + } + this.read(-length, this._parseIDAT.bind(this, length)); + }; + Parser.prototype._parseIDAT = function(length, data) { + this._crc.write(data); + if (this._colorType === constants.COLORTYPE_PALETTE_COLOR && this._palette.length === 0) { + throw new Error("Expected palette not found"); + } + this.inflateData(data); + var leftOverLength = length - data.length; + if (leftOverLength > 0) { + this._handleIDAT(leftOverLength); + } else { + this._handleChunkEnd(); + } + }; + Parser.prototype._handleIEND = function(length) { + this.read(length, this._parseIEND.bind(this)); + }; + Parser.prototype._parseIEND = function(data) { + this._crc.write(data); + this._hasIEND = true; + this._handleChunkEnd(); + if (this.finished) { + this.finished(); + } + }; + } +}); + +// node_modules/pngjs/lib/bitmapper.js +var require_bitmapper = __commonJS({ + "node_modules/pngjs/lib/bitmapper.js"(exports2) { + "use strict"; + var interlaceUtils = require_interlace(); + var pixelBppMapper = [ + // 0 - dummy entry + function() { + }, + // 1 - L + // 0: 0, 1: 0, 2: 0, 3: 0xff + function(pxData, data, pxPos, rawPos) { + if (rawPos === data.length) { + throw new Error("Ran out of data"); + } + var pixel = data[rawPos]; + pxData[pxPos] = pixel; + pxData[pxPos + 1] = pixel; + pxData[pxPos + 2] = pixel; + pxData[pxPos + 3] = 255; + }, + // 2 - LA + // 0: 0, 1: 0, 2: 0, 3: 1 + function(pxData, data, pxPos, rawPos) { + if (rawPos + 1 >= data.length) { + throw new Error("Ran out of data"); + } + var pixel = data[rawPos]; + pxData[pxPos] = pixel; + pxData[pxPos + 1] = pixel; + pxData[pxPos + 2] = pixel; + pxData[pxPos + 3] = data[rawPos + 1]; + }, + // 3 - RGB + // 0: 0, 1: 1, 2: 2, 3: 0xff + function(pxData, data, pxPos, rawPos) { + if (rawPos + 2 >= data.length) { + throw new Error("Ran out of data"); + } + pxData[pxPos] = data[rawPos]; + pxData[pxPos + 1] = data[rawPos + 1]; + pxData[pxPos + 2] = data[rawPos + 2]; + pxData[pxPos + 3] = 255; + }, + // 4 - RGBA + // 0: 0, 1: 1, 2: 2, 3: 3 + function(pxData, data, pxPos, rawPos) { + if (rawPos + 3 >= data.length) { + throw new Error("Ran out of data"); + } + pxData[pxPos] = data[rawPos]; + pxData[pxPos + 1] = data[rawPos + 1]; + pxData[pxPos + 2] = data[rawPos + 2]; + pxData[pxPos + 3] = data[rawPos + 3]; + } + ]; + var pixelBppCustomMapper = [ + // 0 - dummy entry + function() { + }, + // 1 - L + // 0: 0, 1: 0, 2: 0, 3: 0xff + function(pxData, pixelData, pxPos, maxBit) { + var pixel = pixelData[0]; + pxData[pxPos] = pixel; + pxData[pxPos + 1] = pixel; + pxData[pxPos + 2] = pixel; + pxData[pxPos + 3] = maxBit; + }, + // 2 - LA + // 0: 0, 1: 0, 2: 0, 3: 1 + function(pxData, pixelData, pxPos) { + var pixel = pixelData[0]; + pxData[pxPos] = pixel; + pxData[pxPos + 1] = pixel; + pxData[pxPos + 2] = pixel; + pxData[pxPos + 3] = pixelData[1]; + }, + // 3 - RGB + // 0: 0, 1: 1, 2: 2, 3: 0xff + function(pxData, pixelData, pxPos, maxBit) { + pxData[pxPos] = pixelData[0]; + pxData[pxPos + 1] = pixelData[1]; + pxData[pxPos + 2] = pixelData[2]; + pxData[pxPos + 3] = maxBit; + }, + // 4 - RGBA + // 0: 0, 1: 1, 2: 2, 3: 3 + function(pxData, pixelData, pxPos) { + pxData[pxPos] = pixelData[0]; + pxData[pxPos + 1] = pixelData[1]; + pxData[pxPos + 2] = pixelData[2]; + pxData[pxPos + 3] = pixelData[3]; + } + ]; + function bitRetriever(data, depth) { + var leftOver = []; + var i2 = 0; + function split() { + if (i2 === data.length) { + throw new Error("Ran out of data"); + } + var byte = data[i2]; + i2++; + var byte8, byte7, byte6, byte5, byte4, byte3, byte2, byte1; + switch (depth) { + default: + throw new Error("unrecognised depth"); + case 16: + byte2 = data[i2]; + i2++; + leftOver.push((byte << 8) + byte2); + break; + case 4: + byte2 = byte & 15; + byte1 = byte >> 4; + leftOver.push(byte1, byte2); + break; + case 2: + byte4 = byte & 3; + byte3 = byte >> 2 & 3; + byte2 = byte >> 4 & 3; + byte1 = byte >> 6 & 3; + leftOver.push(byte1, byte2, byte3, byte4); + break; + case 1: + byte8 = byte & 1; + byte7 = byte >> 1 & 1; + byte6 = byte >> 2 & 1; + byte5 = byte >> 3 & 1; + byte4 = byte >> 4 & 1; + byte3 = byte >> 5 & 1; + byte2 = byte >> 6 & 1; + byte1 = byte >> 7 & 1; + leftOver.push(byte1, byte2, byte3, byte4, byte5, byte6, byte7, byte8); + break; + } + } + return { + get: function(count) { + while (leftOver.length < count) { + split(); + } + var returner = leftOver.slice(0, count); + leftOver = leftOver.slice(count); + return returner; + }, + resetAfterLine: function() { + leftOver.length = 0; + }, + end: function() { + if (i2 !== data.length) { + throw new Error("extra data found"); + } + } + }; + } + function mapImage8Bit(image, pxData, getPxPos, bpp, data, rawPos) { + var imageWidth = image.width; + var imageHeight = image.height; + var imagePass = image.index; + for (var y = 0; y < imageHeight; y++) { + for (var x = 0; x < imageWidth; x++) { + var pxPos = getPxPos(x, y, imagePass); + pixelBppMapper[bpp](pxData, data, pxPos, rawPos); + rawPos += bpp; + } + } + return rawPos; + } + function mapImageCustomBit(image, pxData, getPxPos, bpp, bits, maxBit) { + var imageWidth = image.width; + var imageHeight = image.height; + var imagePass = image.index; + for (var y = 0; y < imageHeight; y++) { + for (var x = 0; x < imageWidth; x++) { + var pixelData = bits.get(bpp); + var pxPos = getPxPos(x, y, imagePass); + pixelBppCustomMapper[bpp](pxData, pixelData, pxPos, maxBit); + } + bits.resetAfterLine(); + } + } + exports2.dataToBitMap = function(data, bitmapInfo) { + var width = bitmapInfo.width; + var height = bitmapInfo.height; + var depth = bitmapInfo.depth; + var bpp = bitmapInfo.bpp; + var interlace = bitmapInfo.interlace; + if (depth !== 8) { + var bits = bitRetriever(data, depth); + } + var pxData; + if (depth <= 8) { + pxData = new Buffer(width * height * 4); + } else { + pxData = new Uint16Array(width * height * 4); + } + var maxBit = Math.pow(2, depth) - 1; + var rawPos = 0; + var images; + var getPxPos; + if (interlace) { + images = interlaceUtils.getImagePasses(width, height); + getPxPos = interlaceUtils.getInterlaceIterator(width, height); + } else { + var nonInterlacedPxPos = 0; + getPxPos = function() { + var returner = nonInterlacedPxPos; + nonInterlacedPxPos += 4; + return returner; + }; + images = [{ width, height }]; + } + for (var imageIndex = 0; imageIndex < images.length; imageIndex++) { + if (depth === 8) { + rawPos = mapImage8Bit(images[imageIndex], pxData, getPxPos, bpp, data, rawPos); + } else { + mapImageCustomBit(images[imageIndex], pxData, getPxPos, bpp, bits, maxBit); + } + } + if (depth === 8) { + if (rawPos !== data.length) { + throw new Error("extra data found"); + } + } else { + bits.end(); + } + return pxData; + }; + } +}); + +// node_modules/pngjs/lib/format-normaliser.js +var require_format_normaliser = __commonJS({ + "node_modules/pngjs/lib/format-normaliser.js"(exports2, module2) { + "use strict"; + function dePalette(indata, outdata, width, height, palette) { + var pxPos = 0; + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var color = palette[indata[pxPos]]; + if (!color) { + throw new Error("index " + indata[pxPos] + " not in palette"); + } + for (var i2 = 0; i2 < 4; i2++) { + outdata[pxPos + i2] = color[i2]; + } + pxPos += 4; + } + } + } + function replaceTransparentColor(indata, outdata, width, height, transColor) { + var pxPos = 0; + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var makeTrans = false; + if (transColor.length === 1) { + if (transColor[0] === indata[pxPos]) { + makeTrans = true; + } + } else if (transColor[0] === indata[pxPos] && transColor[1] === indata[pxPos + 1] && transColor[2] === indata[pxPos + 2]) { + makeTrans = true; + } + if (makeTrans) { + for (var i2 = 0; i2 < 4; i2++) { + outdata[pxPos + i2] = 0; + } + } + pxPos += 4; + } + } + } + function scaleDepth(indata, outdata, width, height, depth) { + var maxOutSample = 255; + var maxInSample = Math.pow(2, depth) - 1; + var pxPos = 0; + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + for (var i2 = 0; i2 < 4; i2++) { + outdata[pxPos + i2] = Math.floor(indata[pxPos + i2] * maxOutSample / maxInSample + 0.5); + } + pxPos += 4; + } + } + } + module2.exports = function(indata, imageData) { + var depth = imageData.depth; + var width = imageData.width; + var height = imageData.height; + var colorType = imageData.colorType; + var transColor = imageData.transColor; + var palette = imageData.palette; + var outdata = indata; + if (colorType === 3) { + dePalette(indata, outdata, width, height, palette); + } else { + if (transColor) { + replaceTransparentColor(indata, outdata, width, height, transColor); + } + if (depth !== 8) { + if (depth === 16) { + outdata = new Buffer(width * height * 4); + } + scaleDepth(indata, outdata, width, height, depth); + } + } + return outdata; + }; + } +}); + +// node_modules/pngjs/lib/parser-async.js +var require_parser_async = __commonJS({ + "node_modules/pngjs/lib/parser-async.js"(exports2, module2) { + "use strict"; + var util2 = require("util"); + var zlib = require("zlib"); + var ChunkStream = require_chunkstream(); + var FilterAsync = require_filter_parse_async(); + var Parser = require_parser2(); + var bitmapper = require_bitmapper(); + var formatNormaliser = require_format_normaliser(); + var ParserAsync = module2.exports = function(options) { + ChunkStream.call(this); + this._parser = new Parser(options, { + read: this.read.bind(this), + error: this._handleError.bind(this), + metadata: this._handleMetaData.bind(this), + gamma: this.emit.bind(this, "gamma"), + palette: this._handlePalette.bind(this), + transColor: this._handleTransColor.bind(this), + finished: this._finished.bind(this), + inflateData: this._inflateData.bind(this), + simpleTransparency: this._simpleTransparency.bind(this), + headersFinished: this._headersFinished.bind(this) + }); + this._options = options; + this.writable = true; + this._parser.start(); + }; + util2.inherits(ParserAsync, ChunkStream); + ParserAsync.prototype._handleError = function(err) { + this.emit("error", err); + this.writable = false; + this.destroy(); + if (this._inflate && this._inflate.destroy) { + this._inflate.destroy(); + } + if (this._filter) { + this._filter.destroy(); + this._filter.on("error", function() { + }); + } + this.errord = true; + }; + ParserAsync.prototype._inflateData = function(data) { + if (!this._inflate) { + if (this._bitmapInfo.interlace) { + this._inflate = zlib.createInflate(); + this._inflate.on("error", this.emit.bind(this, "error")); + this._filter.on("complete", this._complete.bind(this)); + this._inflate.pipe(this._filter); + } else { + var rowSize = (this._bitmapInfo.width * this._bitmapInfo.bpp * this._bitmapInfo.depth + 7 >> 3) + 1; + var imageSize = rowSize * this._bitmapInfo.height; + var chunkSize = Math.max(imageSize, zlib.Z_MIN_CHUNK); + this._inflate = zlib.createInflate({ chunkSize }); + var leftToInflate = imageSize; + var emitError = this.emit.bind(this, "error"); + this._inflate.on("error", function(err) { + if (!leftToInflate) { + return; + } + emitError(err); + }); + this._filter.on("complete", this._complete.bind(this)); + var filterWrite = this._filter.write.bind(this._filter); + this._inflate.on("data", function(chunk) { + if (!leftToInflate) { + return; + } + if (chunk.length > leftToInflate) { + chunk = chunk.slice(0, leftToInflate); + } + leftToInflate -= chunk.length; + filterWrite(chunk); + }); + this._inflate.on("end", this._filter.end.bind(this._filter)); + } + } + this._inflate.write(data); + }; + ParserAsync.prototype._handleMetaData = function(metaData) { + this._metaData = metaData; + this._bitmapInfo = Object.create(metaData); + this._filter = new FilterAsync(this._bitmapInfo); + }; + ParserAsync.prototype._handleTransColor = function(transColor) { + this._bitmapInfo.transColor = transColor; + }; + ParserAsync.prototype._handlePalette = function(palette) { + this._bitmapInfo.palette = palette; + }; + ParserAsync.prototype._simpleTransparency = function() { + this._metaData.alpha = true; + }; + ParserAsync.prototype._headersFinished = function() { + this.emit("metadata", this._metaData); + }; + ParserAsync.prototype._finished = function() { + if (this.errord) { + return; + } + if (!this._inflate) { + this.emit("error", "No Inflate block"); + } else { + this._inflate.end(); + } + this.destroySoon(); + }; + ParserAsync.prototype._complete = function(filteredData) { + if (this.errord) { + return; + } + try { + var bitmapData = bitmapper.dataToBitMap(filteredData, this._bitmapInfo); + var normalisedBitmapData = formatNormaliser(bitmapData, this._bitmapInfo); + bitmapData = null; + } catch (ex) { + this._handleError(ex); + return; + } + this.emit("parsed", normalisedBitmapData); + }; + } +}); + +// node_modules/pngjs/lib/bitpacker.js +var require_bitpacker = __commonJS({ + "node_modules/pngjs/lib/bitpacker.js"(exports2, module2) { + "use strict"; + var constants = require_constants(); + module2.exports = function(dataIn, width, height, options) { + var outHasAlpha = [constants.COLORTYPE_COLOR_ALPHA, constants.COLORTYPE_ALPHA].indexOf(options.colorType) !== -1; + if (options.colorType === options.inputColorType) { + var bigEndian = function() { + var buffer = new ArrayBuffer(2); + new DataView(buffer).setInt16( + 0, + 256, + true + /* littleEndian */ + ); + return new Int16Array(buffer)[0] !== 256; + }(); + if (options.bitDepth === 8 || options.bitDepth === 16 && bigEndian) { + return dataIn; + } + } + var data = options.bitDepth !== 16 ? dataIn : new Uint16Array(dataIn.buffer); + var maxValue = 255; + var inBpp = constants.COLORTYPE_TO_BPP_MAP[options.inputColorType]; + if (inBpp === 4 && !options.inputHasAlpha) { + inBpp = 3; + } + var outBpp = constants.COLORTYPE_TO_BPP_MAP[options.colorType]; + if (options.bitDepth === 16) { + maxValue = 65535; + outBpp *= 2; + } + var outData = new Buffer(width * height * outBpp); + var inIndex = 0; + var outIndex = 0; + var bgColor = options.bgColor || {}; + if (bgColor.red === void 0) { + bgColor.red = maxValue; + } + if (bgColor.green === void 0) { + bgColor.green = maxValue; + } + if (bgColor.blue === void 0) { + bgColor.blue = maxValue; + } + function getRGBA() { + var red; + var green; + var blue; + var alpha = maxValue; + switch (options.inputColorType) { + case constants.COLORTYPE_COLOR_ALPHA: + alpha = data[inIndex + 3]; + red = data[inIndex]; + green = data[inIndex + 1]; + blue = data[inIndex + 2]; + break; + case constants.COLORTYPE_COLOR: + red = data[inIndex]; + green = data[inIndex + 1]; + blue = data[inIndex + 2]; + break; + case constants.COLORTYPE_ALPHA: + alpha = data[inIndex + 1]; + red = data[inIndex]; + green = red; + blue = red; + break; + case constants.COLORTYPE_GRAYSCALE: + red = data[inIndex]; + green = red; + blue = red; + break; + default: + throw new Error("input color type:" + options.inputColorType + " is not supported at present"); + } + if (options.inputHasAlpha) { + if (!outHasAlpha) { + alpha /= maxValue; + red = Math.min(Math.max(Math.round((1 - alpha) * bgColor.red + alpha * red), 0), maxValue); + green = Math.min(Math.max(Math.round((1 - alpha) * bgColor.green + alpha * green), 0), maxValue); + blue = Math.min(Math.max(Math.round((1 - alpha) * bgColor.blue + alpha * blue), 0), maxValue); + } + } + return { red, green, blue, alpha }; + } + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var rgba = getRGBA(data, inIndex); + switch (options.colorType) { + case constants.COLORTYPE_COLOR_ALPHA: + case constants.COLORTYPE_COLOR: + if (options.bitDepth === 8) { + outData[outIndex] = rgba.red; + outData[outIndex + 1] = rgba.green; + outData[outIndex + 2] = rgba.blue; + if (outHasAlpha) { + outData[outIndex + 3] = rgba.alpha; + } + } else { + outData.writeUInt16BE(rgba.red, outIndex); + outData.writeUInt16BE(rgba.green, outIndex + 2); + outData.writeUInt16BE(rgba.blue, outIndex + 4); + if (outHasAlpha) { + outData.writeUInt16BE(rgba.alpha, outIndex + 6); + } + } + break; + case constants.COLORTYPE_ALPHA: + case constants.COLORTYPE_GRAYSCALE: + var grayscale = (rgba.red + rgba.green + rgba.blue) / 3; + if (options.bitDepth === 8) { + outData[outIndex] = grayscale; + if (outHasAlpha) { + outData[outIndex + 1] = rgba.alpha; + } + } else { + outData.writeUInt16BE(grayscale, outIndex); + if (outHasAlpha) { + outData.writeUInt16BE(rgba.alpha, outIndex + 2); + } + } + break; + default: + throw new Error("unrecognised color Type " + options.colorType); + } + inIndex += inBpp; + outIndex += outBpp; + } + } + return outData; + }; + } +}); + +// node_modules/pngjs/lib/filter-pack.js +var require_filter_pack = __commonJS({ + "node_modules/pngjs/lib/filter-pack.js"(exports2, module2) { + "use strict"; + var paethPredictor = require_paeth_predictor(); + function filterNone(pxData, pxPos, byteWidth, rawData, rawPos) { + for (var x = 0; x < byteWidth; x++) { + rawData[rawPos + x] = pxData[pxPos + x]; + } + } + function filterSumNone(pxData, pxPos, byteWidth) { + var sum = 0; + var length = pxPos + byteWidth; + for (var i2 = pxPos; i2 < length; i2++) { + sum += Math.abs(pxData[i2]); + } + return sum; + } + function filterSub(pxData, pxPos, byteWidth, rawData, rawPos, bpp) { + for (var x = 0; x < byteWidth; x++) { + var left = x >= bpp ? pxData[pxPos + x - bpp] : 0; + var val = pxData[pxPos + x] - left; + rawData[rawPos + x] = val; + } + } + function filterSumSub(pxData, pxPos, byteWidth, bpp) { + var sum = 0; + for (var x = 0; x < byteWidth; x++) { + var left = x >= bpp ? pxData[pxPos + x - bpp] : 0; + var val = pxData[pxPos + x] - left; + sum += Math.abs(val); + } + return sum; + } + function filterUp(pxData, pxPos, byteWidth, rawData, rawPos) { + for (var x = 0; x < byteWidth; x++) { + var up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0; + var val = pxData[pxPos + x] - up; + rawData[rawPos + x] = val; + } + } + function filterSumUp(pxData, pxPos, byteWidth) { + var sum = 0; + var length = pxPos + byteWidth; + for (var x = pxPos; x < length; x++) { + var up = pxPos > 0 ? pxData[x - byteWidth] : 0; + var val = pxData[x] - up; + sum += Math.abs(val); + } + return sum; + } + function filterAvg(pxData, pxPos, byteWidth, rawData, rawPos, bpp) { + for (var x = 0; x < byteWidth; x++) { + var left = x >= bpp ? pxData[pxPos + x - bpp] : 0; + var up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0; + var val = pxData[pxPos + x] - (left + up >> 1); + rawData[rawPos + x] = val; + } + } + function filterSumAvg(pxData, pxPos, byteWidth, bpp) { + var sum = 0; + for (var x = 0; x < byteWidth; x++) { + var left = x >= bpp ? pxData[pxPos + x - bpp] : 0; + var up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0; + var val = pxData[pxPos + x] - (left + up >> 1); + sum += Math.abs(val); + } + return sum; + } + function filterPaeth(pxData, pxPos, byteWidth, rawData, rawPos, bpp) { + for (var x = 0; x < byteWidth; x++) { + var left = x >= bpp ? pxData[pxPos + x - bpp] : 0; + var up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0; + var upleft = pxPos > 0 && x >= bpp ? pxData[pxPos + x - (byteWidth + bpp)] : 0; + var val = pxData[pxPos + x] - paethPredictor(left, up, upleft); + rawData[rawPos + x] = val; + } + } + function filterSumPaeth(pxData, pxPos, byteWidth, bpp) { + var sum = 0; + for (var x = 0; x < byteWidth; x++) { + var left = x >= bpp ? pxData[pxPos + x - bpp] : 0; + var up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0; + var upleft = pxPos > 0 && x >= bpp ? pxData[pxPos + x - (byteWidth + bpp)] : 0; + var val = pxData[pxPos + x] - paethPredictor(left, up, upleft); + sum += Math.abs(val); + } + return sum; + } + var filters = { + 0: filterNone, + 1: filterSub, + 2: filterUp, + 3: filterAvg, + 4: filterPaeth + }; + var filterSums = { + 0: filterSumNone, + 1: filterSumSub, + 2: filterSumUp, + 3: filterSumAvg, + 4: filterSumPaeth + }; + module2.exports = function(pxData, width, height, options, bpp) { + var filterTypes; + if (!("filterType" in options) || options.filterType === -1) { + filterTypes = [0, 1, 2, 3, 4]; + } else if (typeof options.filterType === "number") { + filterTypes = [options.filterType]; + } else { + throw new Error("unrecognised filter types"); + } + if (options.bitDepth === 16) { + bpp *= 2; + } + var byteWidth = width * bpp; + var rawPos = 0; + var pxPos = 0; + var rawData = new Buffer((byteWidth + 1) * height); + var sel = filterTypes[0]; + for (var y = 0; y < height; y++) { + if (filterTypes.length > 1) { + var min = Infinity; + for (var i2 = 0; i2 < filterTypes.length; i2++) { + var sum = filterSums[filterTypes[i2]](pxData, pxPos, byteWidth, bpp); + if (sum < min) { + sel = filterTypes[i2]; + min = sum; + } + } + } + rawData[rawPos] = sel; + rawPos++; + filters[sel](pxData, pxPos, byteWidth, rawData, rawPos, bpp); + rawPos += byteWidth; + pxPos += byteWidth; + } + return rawData; + }; + } +}); + +// node_modules/pngjs/lib/packer.js +var require_packer = __commonJS({ + "node_modules/pngjs/lib/packer.js"(exports2, module2) { + "use strict"; + var constants = require_constants(); + var CrcStream = require_crc(); + var bitPacker = require_bitpacker(); + var filter = require_filter_pack(); + var zlib = require("zlib"); + var Packer = module2.exports = function(options) { + this._options = options; + options.deflateChunkSize = options.deflateChunkSize || 32 * 1024; + options.deflateLevel = options.deflateLevel != null ? options.deflateLevel : 9; + options.deflateStrategy = options.deflateStrategy != null ? options.deflateStrategy : 3; + options.inputHasAlpha = options.inputHasAlpha != null ? options.inputHasAlpha : true; + options.deflateFactory = options.deflateFactory || zlib.createDeflate; + options.bitDepth = options.bitDepth || 8; + options.colorType = typeof options.colorType === "number" ? options.colorType : constants.COLORTYPE_COLOR_ALPHA; + options.inputColorType = typeof options.inputColorType === "number" ? options.inputColorType : constants.COLORTYPE_COLOR_ALPHA; + if ([ + constants.COLORTYPE_GRAYSCALE, + constants.COLORTYPE_COLOR, + constants.COLORTYPE_COLOR_ALPHA, + constants.COLORTYPE_ALPHA + ].indexOf(options.colorType) === -1) { + throw new Error("option color type:" + options.colorType + " is not supported at present"); + } + if ([ + constants.COLORTYPE_GRAYSCALE, + constants.COLORTYPE_COLOR, + constants.COLORTYPE_COLOR_ALPHA, + constants.COLORTYPE_ALPHA + ].indexOf(options.inputColorType) === -1) { + throw new Error("option input color type:" + options.inputColorType + " is not supported at present"); + } + if (options.bitDepth !== 8 && options.bitDepth !== 16) { + throw new Error("option bit depth:" + options.bitDepth + " is not supported at present"); + } + }; + Packer.prototype.getDeflateOptions = function() { + return { + chunkSize: this._options.deflateChunkSize, + level: this._options.deflateLevel, + strategy: this._options.deflateStrategy + }; + }; + Packer.prototype.createDeflate = function() { + return this._options.deflateFactory(this.getDeflateOptions()); + }; + Packer.prototype.filterData = function(data, width, height) { + var packedData = bitPacker(data, width, height, this._options); + var bpp = constants.COLORTYPE_TO_BPP_MAP[this._options.colorType]; + var filteredData = filter(packedData, width, height, this._options, bpp); + return filteredData; + }; + Packer.prototype._packChunk = function(type, data) { + var len = data ? data.length : 0; + var buf = new Buffer(len + 12); + buf.writeUInt32BE(len, 0); + buf.writeUInt32BE(type, 4); + if (data) { + data.copy(buf, 8); + } + buf.writeInt32BE(CrcStream.crc32(buf.slice(4, buf.length - 4)), buf.length - 4); + return buf; + }; + Packer.prototype.packGAMA = function(gamma) { + var buf = new Buffer(4); + buf.writeUInt32BE(Math.floor(gamma * constants.GAMMA_DIVISION), 0); + return this._packChunk(constants.TYPE_gAMA, buf); + }; + Packer.prototype.packIHDR = function(width, height) { + var buf = new Buffer(13); + buf.writeUInt32BE(width, 0); + buf.writeUInt32BE(height, 4); + buf[8] = this._options.bitDepth; + buf[9] = this._options.colorType; + buf[10] = 0; + buf[11] = 0; + buf[12] = 0; + return this._packChunk(constants.TYPE_IHDR, buf); + }; + Packer.prototype.packIDAT = function(data) { + return this._packChunk(constants.TYPE_IDAT, data); + }; + Packer.prototype.packIEND = function() { + return this._packChunk(constants.TYPE_IEND, null); + }; + } +}); + +// node_modules/pngjs/lib/packer-async.js +var require_packer_async = __commonJS({ + "node_modules/pngjs/lib/packer-async.js"(exports2, module2) { + "use strict"; + var util2 = require("util"); + var Stream = require("stream"); + var constants = require_constants(); + var Packer = require_packer(); + var PackerAsync = module2.exports = function(opt) { + Stream.call(this); + var options = opt || {}; + this._packer = new Packer(options); + this._deflate = this._packer.createDeflate(); + this.readable = true; + }; + util2.inherits(PackerAsync, Stream); + PackerAsync.prototype.pack = function(data, width, height, gamma) { + this.emit("data", new Buffer(constants.PNG_SIGNATURE)); + this.emit("data", this._packer.packIHDR(width, height)); + if (gamma) { + this.emit("data", this._packer.packGAMA(gamma)); + } + var filteredData = this._packer.filterData(data, width, height); + this._deflate.on("error", this.emit.bind(this, "error")); + this._deflate.on("data", function(compressedData) { + this.emit("data", this._packer.packIDAT(compressedData)); + }.bind(this)); + this._deflate.on("end", function() { + this.emit("data", this._packer.packIEND()); + this.emit("end"); + }.bind(this)); + this._deflate.end(filteredData); + }; + } +}); + +// node_modules/pngjs/lib/sync-inflate.js +var require_sync_inflate = __commonJS({ + "node_modules/pngjs/lib/sync-inflate.js"(exports2, module2) { + "use strict"; + var assert = require("assert").ok; + var zlib = require("zlib"); + var util2 = require("util"); + var kMaxLength = require("buffer").kMaxLength; + function Inflate(opts) { + if (!(this instanceof Inflate)) { + return new Inflate(opts); + } + if (opts && opts.chunkSize < zlib.Z_MIN_CHUNK) { + opts.chunkSize = zlib.Z_MIN_CHUNK; + } + zlib.Inflate.call(this, opts); + this._offset = this._offset === void 0 ? this._outOffset : this._offset; + this._buffer = this._buffer || this._outBuffer; + if (opts && opts.maxLength != null) { + this._maxLength = opts.maxLength; + } + } + function createInflate(opts) { + return new Inflate(opts); + } + function _close(engine, callback) { + if (callback) { + process.nextTick(callback); + } + if (!engine._handle) { + return; + } + engine._handle.close(); + engine._handle = null; + } + Inflate.prototype._processChunk = function(chunk, flushFlag, asyncCb) { + if (typeof asyncCb === "function") { + return zlib.Inflate._processChunk.call(this, chunk, flushFlag, asyncCb); + } + var self2 = this; + var availInBefore = chunk && chunk.length; + var availOutBefore = this._chunkSize - this._offset; + var leftToInflate = this._maxLength; + var inOff = 0; + var buffers = []; + var nread = 0; + var error; + this.on("error", function(err) { + error = err; + }); + function handleChunk(availInAfter, availOutAfter) { + if (self2._hadError) { + return; + } + var have = availOutBefore - availOutAfter; + assert(have >= 0, "have should not go down"); + if (have > 0) { + var out = self2._buffer.slice(self2._offset, self2._offset + have); + self2._offset += have; + if (out.length > leftToInflate) { + out = out.slice(0, leftToInflate); + } + buffers.push(out); + nread += out.length; + leftToInflate -= out.length; + if (leftToInflate === 0) { + return false; + } + } + if (availOutAfter === 0 || self2._offset >= self2._chunkSize) { + availOutBefore = self2._chunkSize; + self2._offset = 0; + self2._buffer = Buffer.allocUnsafe(self2._chunkSize); + } + if (availOutAfter === 0) { + inOff += availInBefore - availInAfter; + availInBefore = availInAfter; + return true; + } + return false; + } + assert(this._handle, "zlib binding closed"); + do { + var res = this._handle.writeSync( + flushFlag, + chunk, + // in + inOff, + // in_off + availInBefore, + // in_len + this._buffer, + // out + this._offset, + //out_off + availOutBefore + ); + res = res || this._writeState; + } while (!this._hadError && handleChunk(res[0], res[1])); + if (this._hadError) { + throw error; + } + if (nread >= kMaxLength) { + _close(this); + throw new RangeError("Cannot create final Buffer. It would be larger than 0x" + kMaxLength.toString(16) + " bytes"); + } + var buf = Buffer.concat(buffers, nread); + _close(this); + return buf; + }; + util2.inherits(Inflate, zlib.Inflate); + function zlibBufferSync(engine, buffer) { + if (typeof buffer === "string") { + buffer = Buffer.from(buffer); + } + if (!(buffer instanceof Buffer)) { + throw new TypeError("Not a string or buffer"); + } + var flushFlag = engine._finishFlushFlag; + if (flushFlag == null) { + flushFlag = zlib.Z_FINISH; + } + return engine._processChunk(buffer, flushFlag); + } + function inflateSync(buffer, opts) { + return zlibBufferSync(new Inflate(opts), buffer); + } + module2.exports = exports2 = inflateSync; + exports2.Inflate = Inflate; + exports2.createInflate = createInflate; + exports2.inflateSync = inflateSync; + } +}); + +// node_modules/pngjs/lib/sync-reader.js +var require_sync_reader = __commonJS({ + "node_modules/pngjs/lib/sync-reader.js"(exports2, module2) { + "use strict"; + var SyncReader = module2.exports = function(buffer) { + this._buffer = buffer; + this._reads = []; + }; + SyncReader.prototype.read = function(length, callback) { + this._reads.push({ + length: Math.abs(length), + // if length < 0 then at most this length + allowLess: length < 0, + func: callback + }); + }; + SyncReader.prototype.process = function() { + while (this._reads.length > 0 && this._buffer.length) { + var read = this._reads[0]; + if (this._buffer.length && (this._buffer.length >= read.length || read.allowLess)) { + this._reads.shift(); + var buf = this._buffer; + this._buffer = buf.slice(read.length); + read.func.call(this, buf.slice(0, read.length)); + } else { + break; + } + } + if (this._reads.length > 0) { + return new Error("There are some read requests waitng on finished stream"); + } + if (this._buffer.length > 0) { + return new Error("unrecognised content at end of stream"); + } + }; + } +}); + +// node_modules/pngjs/lib/filter-parse-sync.js +var require_filter_parse_sync = __commonJS({ + "node_modules/pngjs/lib/filter-parse-sync.js"(exports2) { + "use strict"; + var SyncReader = require_sync_reader(); + var Filter = require_filter_parse(); + exports2.process = function(inBuffer, bitmapInfo) { + var outBuffers = []; + var reader = new SyncReader(inBuffer); + var filter = new Filter(bitmapInfo, { + read: reader.read.bind(reader), + write: function(bufferPart) { + outBuffers.push(bufferPart); + }, + complete: function() { + } + }); + filter.start(); + reader.process(); + return Buffer.concat(outBuffers); + }; + } +}); + +// node_modules/pngjs/lib/parser-sync.js +var require_parser_sync = __commonJS({ + "node_modules/pngjs/lib/parser-sync.js"(exports2, module2) { + "use strict"; + var hasSyncZlib = true; + var zlib = require("zlib"); + var inflateSync = require_sync_inflate(); + if (!zlib.deflateSync) { + hasSyncZlib = false; + } + var SyncReader = require_sync_reader(); + var FilterSync = require_filter_parse_sync(); + var Parser = require_parser2(); + var bitmapper = require_bitmapper(); + var formatNormaliser = require_format_normaliser(); + module2.exports = function(buffer, options) { + if (!hasSyncZlib) { + throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0"); + } + var err; + function handleError(_err_) { + err = _err_; + } + var metaData; + function handleMetaData(_metaData_) { + metaData = _metaData_; + } + function handleTransColor(transColor) { + metaData.transColor = transColor; + } + function handlePalette(palette) { + metaData.palette = palette; + } + function handleSimpleTransparency() { + metaData.alpha = true; + } + var gamma; + function handleGamma(_gamma_) { + gamma = _gamma_; + } + var inflateDataList = []; + function handleInflateData(inflatedData2) { + inflateDataList.push(inflatedData2); + } + var reader = new SyncReader(buffer); + var parser = new Parser(options, { + read: reader.read.bind(reader), + error: handleError, + metadata: handleMetaData, + gamma: handleGamma, + palette: handlePalette, + transColor: handleTransColor, + inflateData: handleInflateData, + simpleTransparency: handleSimpleTransparency + }); + parser.start(); + reader.process(); + if (err) { + throw err; + } + var inflateData = Buffer.concat(inflateDataList); + inflateDataList.length = 0; + var inflatedData; + if (metaData.interlace) { + inflatedData = zlib.inflateSync(inflateData); + } else { + var rowSize = (metaData.width * metaData.bpp * metaData.depth + 7 >> 3) + 1; + var imageSize = rowSize * metaData.height; + inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize }); + } + inflateData = null; + if (!inflatedData || !inflatedData.length) { + throw new Error("bad png - invalid inflate data response"); + } + var unfilteredData = FilterSync.process(inflatedData, metaData); + inflateData = null; + var bitmapData = bitmapper.dataToBitMap(unfilteredData, metaData); + unfilteredData = null; + var normalisedBitmapData = formatNormaliser(bitmapData, metaData); + metaData.data = normalisedBitmapData; + metaData.gamma = gamma || 0; + return metaData; + }; + } +}); + +// node_modules/pngjs/lib/packer-sync.js +var require_packer_sync = __commonJS({ + "node_modules/pngjs/lib/packer-sync.js"(exports2, module2) { + "use strict"; + var hasSyncZlib = true; + var zlib = require("zlib"); + if (!zlib.deflateSync) { + hasSyncZlib = false; + } + var constants = require_constants(); + var Packer = require_packer(); + module2.exports = function(metaData, opt) { + if (!hasSyncZlib) { + throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0"); + } + var options = opt || {}; + var packer = new Packer(options); + var chunks = []; + chunks.push(new Buffer(constants.PNG_SIGNATURE)); + chunks.push(packer.packIHDR(metaData.width, metaData.height)); + if (metaData.gamma) { + chunks.push(packer.packGAMA(metaData.gamma)); + } + var filteredData = packer.filterData(metaData.data, metaData.width, metaData.height); + var compressedData = zlib.deflateSync(filteredData, packer.getDeflateOptions()); + filteredData = null; + if (!compressedData || !compressedData.length) { + throw new Error("bad png - invalid compressed data response"); + } + chunks.push(packer.packIDAT(compressedData)); + chunks.push(packer.packIEND()); + return Buffer.concat(chunks); + }; + } +}); + +// node_modules/pngjs/lib/png-sync.js +var require_png_sync = __commonJS({ + "node_modules/pngjs/lib/png-sync.js"(exports2) { + "use strict"; + var parse2 = require_parser_sync(); + var pack = require_packer_sync(); + exports2.read = function(buffer, options) { + return parse2(buffer, options || {}); + }; + exports2.write = function(png, options) { + return pack(png, options); + }; + } +}); + +// node_modules/pngjs/lib/png.js +var require_png = __commonJS({ + "node_modules/pngjs/lib/png.js"(exports2) { + "use strict"; + var util2 = require("util"); + var Stream = require("stream"); + var Parser = require_parser_async(); + var Packer = require_packer_async(); + var PNGSync = require_png_sync(); + var PNG = exports2.PNG = function(options) { + Stream.call(this); + options = options || {}; + this.width = options.width | 0; + this.height = options.height | 0; + this.data = this.width > 0 && this.height > 0 ? new Buffer(4 * this.width * this.height) : null; + if (options.fill && this.data) { + this.data.fill(0); + } + this.gamma = 0; + this.readable = this.writable = true; + this._parser = new Parser(options); + this._parser.on("error", this.emit.bind(this, "error")); + this._parser.on("close", this._handleClose.bind(this)); + this._parser.on("metadata", this._metadata.bind(this)); + this._parser.on("gamma", this._gamma.bind(this)); + this._parser.on("parsed", function(data) { + this.data = data; + this.emit("parsed", data); + }.bind(this)); + this._packer = new Packer(options); + this._packer.on("data", this.emit.bind(this, "data")); + this._packer.on("end", this.emit.bind(this, "end")); + this._parser.on("close", this._handleClose.bind(this)); + this._packer.on("error", this.emit.bind(this, "error")); + }; + util2.inherits(PNG, Stream); + PNG.sync = PNGSync; + PNG.prototype.pack = function() { + if (!this.data || !this.data.length) { + this.emit("error", "No data provided"); + return this; + } + process.nextTick(function() { + this._packer.pack(this.data, this.width, this.height, this.gamma); + }.bind(this)); + return this; + }; + PNG.prototype.parse = function(data, callback) { + if (callback) { + var onParsed, onError; + onParsed = function(parsedData) { + this.removeListener("error", onError); + this.data = parsedData; + callback(null, this); + }.bind(this); + onError = function(err) { + this.removeListener("parsed", onParsed); + callback(err, null); + }.bind(this); + this.once("parsed", onParsed); + this.once("error", onError); + } + this.end(data); + return this; + }; + PNG.prototype.write = function(data) { + this._parser.write(data); + return true; + }; + PNG.prototype.end = function(data) { + this._parser.end(data); + }; + PNG.prototype._metadata = function(metadata) { + this.width = metadata.width; + this.height = metadata.height; + this.emit("metadata", metadata); + }; + PNG.prototype._gamma = function(gamma) { + this.gamma = gamma; + }; + PNG.prototype._handleClose = function() { + if (!this._parser.writable && !this._packer.readable) { + this.emit("close"); + } + }; + PNG.bitblt = function(src, dst, srcX, srcY, width, height, deltaX, deltaY) { + srcX |= 0; + srcY |= 0; + width |= 0; + height |= 0; + deltaX |= 0; + deltaY |= 0; + if (srcX > src.width || srcY > src.height || srcX + width > src.width || srcY + height > src.height) { + throw new Error("bitblt reading outside image"); + } + if (deltaX > dst.width || deltaY > dst.height || deltaX + width > dst.width || deltaY + height > dst.height) { + throw new Error("bitblt writing outside image"); + } + for (var y = 0; y < height; y++) { + src.data.copy( + dst.data, + (deltaY + y) * dst.width + deltaX << 2, + (srcY + y) * src.width + srcX << 2, + (srcY + y) * src.width + srcX + width << 2 + ); + } + }; + PNG.prototype.bitblt = function(dst, srcX, srcY, width, height, deltaX, deltaY) { + PNG.bitblt(this, dst, srcX, srcY, width, height, deltaX, deltaY); + return this; + }; + PNG.adjustGamma = function(src) { + if (src.gamma) { + for (var y = 0; y < src.height; y++) { + for (var x = 0; x < src.width; x++) { + var idx = src.width * y + x << 2; + for (var i2 = 0; i2 < 3; i2++) { + var sample = src.data[idx + i2] / 255; + sample = Math.pow(sample, 1 / 2.2 / src.gamma); + src.data[idx + i2] = Math.round(sample * 255); + } + } + } + src.gamma = 0; + } + }; + PNG.prototype.adjustGamma = function() { + PNG.adjustGamma(this); + }; + } +}); + +// node_modules/image-decode/png.js +var require_png2 = __commonJS({ + "node_modules/image-decode/png.js"(exports2, module2) { + "use strict"; + var PNG = require_png().PNG; + var toab = require_to_array_buffer(); + module2.exports = function read(data, o) { + var imgData = PNG.sync.read(Buffer.from(data)); + var pixels2 = new Uint8Array(toab(imgData.data)); + return { + data: pixels2, + width: imgData.width | 0, + height: imgData.height | 0 + }; + }; + } +}); + +// node_modules/omggif/omggif.js +var require_omggif = __commonJS({ + "node_modules/omggif/omggif.js"(exports2) { + "use strict"; + function GifWriter(buf, width, height, gopts) { + var p = 0; + var gopts = gopts === void 0 ? {} : gopts; + var loop_count = gopts.loop === void 0 ? null : gopts.loop; + var global_palette = gopts.palette === void 0 ? null : gopts.palette; + if (width <= 0 || height <= 0 || width > 65535 || height > 65535) + throw new Error("Width/Height invalid."); + function check_palette_and_num_colors(palette) { + var num_colors = palette.length; + if (num_colors < 2 || num_colors > 256 || num_colors & num_colors - 1) { + throw new Error( + "Invalid code/color length, must be power of 2 and 2 .. 256." + ); + } + return num_colors; + } + buf[p++] = 71; + buf[p++] = 73; + buf[p++] = 70; + buf[p++] = 56; + buf[p++] = 57; + buf[p++] = 97; + var gp_num_colors_pow2 = 0; + var background = 0; + if (global_palette !== null) { + var gp_num_colors = check_palette_and_num_colors(global_palette); + while (gp_num_colors >>= 1) ++gp_num_colors_pow2; + gp_num_colors = 1 << gp_num_colors_pow2; + --gp_num_colors_pow2; + if (gopts.background !== void 0) { + background = gopts.background; + if (background >= gp_num_colors) + throw new Error("Background index out of range."); + if (background === 0) + throw new Error("Background index explicitly passed as 0."); + } + } + buf[p++] = width & 255; + buf[p++] = width >> 8 & 255; + buf[p++] = height & 255; + buf[p++] = height >> 8 & 255; + buf[p++] = (global_palette !== null ? 128 : 0) | // Global Color Table Flag. + gp_num_colors_pow2; + buf[p++] = background; + buf[p++] = 0; + if (global_palette !== null) { + for (var i2 = 0, il = global_palette.length; i2 < il; ++i2) { + var rgb = global_palette[i2]; + buf[p++] = rgb >> 16 & 255; + buf[p++] = rgb >> 8 & 255; + buf[p++] = rgb & 255; + } + } + if (loop_count !== null) { + if (loop_count < 0 || loop_count > 65535) + throw new Error("Loop count invalid."); + buf[p++] = 33; + buf[p++] = 255; + buf[p++] = 11; + buf[p++] = 78; + buf[p++] = 69; + buf[p++] = 84; + buf[p++] = 83; + buf[p++] = 67; + buf[p++] = 65; + buf[p++] = 80; + buf[p++] = 69; + buf[p++] = 50; + buf[p++] = 46; + buf[p++] = 48; + buf[p++] = 3; + buf[p++] = 1; + buf[p++] = loop_count & 255; + buf[p++] = loop_count >> 8 & 255; + buf[p++] = 0; + } + var ended = false; + this.addFrame = function(x, y, w, h, indexed_pixels, opts) { + if (ended === true) { + --p; + ended = false; + } + opts = opts === void 0 ? {} : opts; + if (x < 0 || y < 0 || x > 65535 || y > 65535) + throw new Error("x/y invalid."); + if (w <= 0 || h <= 0 || w > 65535 || h > 65535) + throw new Error("Width/Height invalid."); + if (indexed_pixels.length < w * h) + throw new Error("Not enough pixels for the frame size."); + var using_local_palette = true; + var palette = opts.palette; + if (palette === void 0 || palette === null) { + using_local_palette = false; + palette = global_palette; + } + if (palette === void 0 || palette === null) + throw new Error("Must supply either a local or global palette."); + var num_colors = check_palette_and_num_colors(palette); + var min_code_size = 0; + while (num_colors >>= 1) ++min_code_size; + num_colors = 1 << min_code_size; + var delay = opts.delay === void 0 ? 0 : opts.delay; + var disposal = opts.disposal === void 0 ? 0 : opts.disposal; + if (disposal < 0 || disposal > 3) + throw new Error("Disposal out of range."); + var use_transparency = false; + var transparent_index = 0; + if (opts.transparent !== void 0 && opts.transparent !== null) { + use_transparency = true; + transparent_index = opts.transparent; + if (transparent_index < 0 || transparent_index >= num_colors) + throw new Error("Transparent color index."); + } + if (disposal !== 0 || use_transparency || delay !== 0) { + buf[p++] = 33; + buf[p++] = 249; + buf[p++] = 4; + buf[p++] = disposal << 2 | (use_transparency === true ? 1 : 0); + buf[p++] = delay & 255; + buf[p++] = delay >> 8 & 255; + buf[p++] = transparent_index; + buf[p++] = 0; + } + buf[p++] = 44; + buf[p++] = x & 255; + buf[p++] = x >> 8 & 255; + buf[p++] = y & 255; + buf[p++] = y >> 8 & 255; + buf[p++] = w & 255; + buf[p++] = w >> 8 & 255; + buf[p++] = h & 255; + buf[p++] = h >> 8 & 255; + buf[p++] = using_local_palette === true ? 128 | min_code_size - 1 : 0; + if (using_local_palette === true) { + for (var i3 = 0, il2 = palette.length; i3 < il2; ++i3) { + var rgb2 = palette[i3]; + buf[p++] = rgb2 >> 16 & 255; + buf[p++] = rgb2 >> 8 & 255; + buf[p++] = rgb2 & 255; + } + } + p = GifWriterOutputLZWCodeStream( + buf, + p, + min_code_size < 2 ? 2 : min_code_size, + indexed_pixels + ); + return p; + }; + this.end = function() { + if (ended === false) { + buf[p++] = 59; + ended = true; + } + return p; + }; + this.getOutputBuffer = function() { + return buf; + }; + this.setOutputBuffer = function(v) { + buf = v; + }; + this.getOutputBufferPosition = function() { + return p; + }; + this.setOutputBufferPosition = function(v) { + p = v; + }; + } + function GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) { + buf[p++] = min_code_size; + var cur_subblock = p++; + var clear_code = 1 << min_code_size; + var code_mask = clear_code - 1; + var eoi_code = clear_code + 1; + var next_code = eoi_code + 1; + var cur_code_size = min_code_size + 1; + var cur_shift = 0; + var cur = 0; + function emit_bytes_to_buffer(bit_block_size) { + while (cur_shift >= bit_block_size) { + buf[p++] = cur & 255; + cur >>= 8; + cur_shift -= 8; + if (p === cur_subblock + 256) { + buf[cur_subblock] = 255; + cur_subblock = p++; + } + } + } + function emit_code(c) { + cur |= c << cur_shift; + cur_shift += cur_code_size; + emit_bytes_to_buffer(8); + } + var ib_code = index_stream[0] & code_mask; + var code_table = {}; + emit_code(clear_code); + for (var i2 = 1, il = index_stream.length; i2 < il; ++i2) { + var k = index_stream[i2] & code_mask; + var cur_key = ib_code << 8 | k; + var cur_code = code_table[cur_key]; + if (cur_code === void 0) { + cur |= ib_code << cur_shift; + cur_shift += cur_code_size; + while (cur_shift >= 8) { + buf[p++] = cur & 255; + cur >>= 8; + cur_shift -= 8; + if (p === cur_subblock + 256) { + buf[cur_subblock] = 255; + cur_subblock = p++; + } + } + if (next_code === 4096) { + emit_code(clear_code); + next_code = eoi_code + 1; + cur_code_size = min_code_size + 1; + code_table = {}; + } else { + if (next_code >= 1 << cur_code_size) ++cur_code_size; + code_table[cur_key] = next_code++; + } + ib_code = k; + } else { + ib_code = cur_code; + } + } + emit_code(ib_code); + emit_code(eoi_code); + emit_bytes_to_buffer(1); + if (cur_subblock + 1 === p) { + buf[cur_subblock] = 0; + } else { + buf[cur_subblock] = p - cur_subblock - 1; + buf[p++] = 0; + } + return p; + } + function GifReader(buf) { + var p = 0; + if (buf[p++] !== 71 || buf[p++] !== 73 || buf[p++] !== 70 || buf[p++] !== 56 || (buf[p++] + 1 & 253) !== 56 || buf[p++] !== 97) { + throw new Error("Invalid GIF 87a/89a header."); + } + var width = buf[p++] | buf[p++] << 8; + var height = buf[p++] | buf[p++] << 8; + var pf0 = buf[p++]; + var global_palette_flag = pf0 >> 7; + var num_global_colors_pow2 = pf0 & 7; + var num_global_colors = 1 << num_global_colors_pow2 + 1; + var background = buf[p++]; + buf[p++]; + var global_palette_offset = null; + var global_palette_size = null; + if (global_palette_flag) { + global_palette_offset = p; + global_palette_size = num_global_colors; + p += num_global_colors * 3; + } + var no_eof = true; + var frames = []; + var delay = 0; + var transparent_index = null; + var disposal = 0; + var loop_count = null; + this.width = width; + this.height = height; + while (no_eof && p < buf.length) { + switch (buf[p++]) { + case 33: + switch (buf[p++]) { + case 255: + if (buf[p] !== 11 || // 21 FF already read, check block size. + // NETSCAPE2.0 + buf[p + 1] == 78 && buf[p + 2] == 69 && buf[p + 3] == 84 && buf[p + 4] == 83 && buf[p + 5] == 67 && buf[p + 6] == 65 && buf[p + 7] == 80 && buf[p + 8] == 69 && buf[p + 9] == 50 && buf[p + 10] == 46 && buf[p + 11] == 48 && // Sub-block + buf[p + 12] == 3 && buf[p + 13] == 1 && buf[p + 16] == 0) { + p += 14; + loop_count = buf[p++] | buf[p++] << 8; + p++; + } else { + p += 12; + while (true) { + var block_size = buf[p++]; + if (!(block_size >= 0)) throw Error("Invalid block size"); + if (block_size === 0) break; + p += block_size; + } + } + break; + case 249: + if (buf[p++] !== 4 || buf[p + 4] !== 0) + throw new Error("Invalid graphics extension block."); + var pf1 = buf[p++]; + delay = buf[p++] | buf[p++] << 8; + transparent_index = buf[p++]; + if ((pf1 & 1) === 0) transparent_index = null; + disposal = pf1 >> 2 & 7; + p++; + break; + case 254: + while (true) { + var block_size = buf[p++]; + if (!(block_size >= 0)) throw Error("Invalid block size"); + if (block_size === 0) break; + p += block_size; + } + break; + default: + throw new Error( + "Unknown graphic control label: 0x" + buf[p - 1].toString(16) + ); + } + break; + case 44: + var x = buf[p++] | buf[p++] << 8; + var y = buf[p++] | buf[p++] << 8; + var w = buf[p++] | buf[p++] << 8; + var h = buf[p++] | buf[p++] << 8; + var pf2 = buf[p++]; + var local_palette_flag = pf2 >> 7; + var interlace_flag = pf2 >> 6 & 1; + var num_local_colors_pow2 = pf2 & 7; + var num_local_colors = 1 << num_local_colors_pow2 + 1; + var palette_offset = global_palette_offset; + var palette_size = global_palette_size; + var has_local_palette = false; + if (local_palette_flag) { + var has_local_palette = true; + palette_offset = p; + palette_size = num_local_colors; + p += num_local_colors * 3; + } + var data_offset = p; + p++; + while (true) { + var block_size = buf[p++]; + if (!(block_size >= 0)) throw Error("Invalid block size"); + if (block_size === 0) break; + p += block_size; + } + frames.push({ + x, + y, + width: w, + height: h, + has_local_palette, + palette_offset, + palette_size, + data_offset, + data_length: p - data_offset, + transparent_index, + interlaced: !!interlace_flag, + delay, + disposal + }); + break; + case 59: + no_eof = false; + break; + default: + throw new Error("Unknown gif block: 0x" + buf[p - 1].toString(16)); + break; + } + } + this.numFrames = function() { + return frames.length; + }; + this.loopCount = function() { + return loop_count; + }; + this.frameInfo = function(frame_num) { + if (frame_num < 0 || frame_num >= frames.length) + throw new Error("Frame index out of range."); + return frames[frame_num]; + }; + this.decodeAndBlitFrameBGRA = function(frame_num, pixels2) { + var frame = this.frameInfo(frame_num); + var num_pixels = frame.width * frame.height; + var index_stream = new Uint8Array(num_pixels); + GifReaderLZWOutputIndexStream( + buf, + frame.data_offset, + index_stream, + num_pixels + ); + var palette_offset2 = frame.palette_offset; + var trans = frame.transparent_index; + if (trans === null) trans = 256; + var framewidth = frame.width; + var framestride = width - framewidth; + var xleft = framewidth; + var opbeg = (frame.y * width + frame.x) * 4; + var opend = ((frame.y + frame.height) * width + frame.x) * 4; + var op = opbeg; + var scanstride = framestride * 4; + if (frame.interlaced === true) { + scanstride += width * 4 * 7; + } + var interlaceskip = 8; + for (var i2 = 0, il = index_stream.length; i2 < il; ++i2) { + var index2 = index_stream[i2]; + if (xleft === 0) { + op += scanstride; + xleft = framewidth; + if (op >= opend) { + scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); + op = opbeg + (framewidth + framestride) * (interlaceskip << 1); + interlaceskip >>= 1; + } + } + if (index2 === trans) { + op += 4; + } else { + var r = buf[palette_offset2 + index2 * 3]; + var g = buf[palette_offset2 + index2 * 3 + 1]; + var b = buf[palette_offset2 + index2 * 3 + 2]; + pixels2[op++] = b; + pixels2[op++] = g; + pixels2[op++] = r; + pixels2[op++] = 255; + } + --xleft; + } + }; + this.decodeAndBlitFrameRGBA = function(frame_num, pixels2) { + var frame = this.frameInfo(frame_num); + var num_pixels = frame.width * frame.height; + var index_stream = new Uint8Array(num_pixels); + GifReaderLZWOutputIndexStream( + buf, + frame.data_offset, + index_stream, + num_pixels + ); + var palette_offset2 = frame.palette_offset; + var trans = frame.transparent_index; + if (trans === null) trans = 256; + var framewidth = frame.width; + var framestride = width - framewidth; + var xleft = framewidth; + var opbeg = (frame.y * width + frame.x) * 4; + var opend = ((frame.y + frame.height) * width + frame.x) * 4; + var op = opbeg; + var scanstride = framestride * 4; + if (frame.interlaced === true) { + scanstride += width * 4 * 7; + } + var interlaceskip = 8; + for (var i2 = 0, il = index_stream.length; i2 < il; ++i2) { + var index2 = index_stream[i2]; + if (xleft === 0) { + op += scanstride; + xleft = framewidth; + if (op >= opend) { + scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); + op = opbeg + (framewidth + framestride) * (interlaceskip << 1); + interlaceskip >>= 1; + } + } + if (index2 === trans) { + op += 4; + } else { + var r = buf[palette_offset2 + index2 * 3]; + var g = buf[palette_offset2 + index2 * 3 + 1]; + var b = buf[palette_offset2 + index2 * 3 + 2]; + pixels2[op++] = r; + pixels2[op++] = g; + pixels2[op++] = b; + pixels2[op++] = 255; + } + --xleft; + } + }; + } + function GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) { + var min_code_size = code_stream[p++]; + var clear_code = 1 << min_code_size; + var eoi_code = clear_code + 1; + var next_code = eoi_code + 1; + var cur_code_size = min_code_size + 1; + var code_mask = (1 << cur_code_size) - 1; + var cur_shift = 0; + var cur = 0; + var op = 0; + var subblock_size = code_stream[p++]; + var code_table = new Int32Array(4096); + var prev_code = null; + while (true) { + while (cur_shift < 16) { + if (subblock_size === 0) break; + cur |= code_stream[p++] << cur_shift; + cur_shift += 8; + if (subblock_size === 1) { + subblock_size = code_stream[p++]; + } else { + --subblock_size; + } + } + if (cur_shift < cur_code_size) + break; + var code = cur & code_mask; + cur >>= cur_code_size; + cur_shift -= cur_code_size; + if (code === clear_code) { + next_code = eoi_code + 1; + cur_code_size = min_code_size + 1; + code_mask = (1 << cur_code_size) - 1; + prev_code = null; + continue; + } else if (code === eoi_code) { + break; + } + var chase_code = code < next_code ? code : prev_code; + var chase_length = 0; + var chase = chase_code; + while (chase > clear_code) { + chase = code_table[chase] >> 8; + ++chase_length; + } + var k = chase; + var op_end = op + chase_length + (chase_code !== code ? 1 : 0); + if (op_end > output_length) { + console.log("Warning, gif stream longer than expected."); + return; + } + output[op++] = k; + op += chase_length; + var b = op; + if (chase_code !== code) + output[op++] = k; + chase = chase_code; + while (chase_length--) { + chase = code_table[chase]; + output[--b] = chase & 255; + chase >>= 8; + } + if (prev_code !== null && next_code < 4096) { + code_table[next_code++] = prev_code << 8 | k; + if (next_code >= code_mask + 1 && cur_code_size < 12) { + ++cur_code_size; + code_mask = code_mask << 1 | 1; + } + } + prev_code = code; + } + if (op !== output_length) { + console.log("Warning, gif stream shorter than expected."); + } + return output; + } + try { + exports2.GifWriter = GifWriter; + exports2.GifReader = GifReader; + } catch (e) { + } + } +}); + +// node_modules/image-decode/gif.js +var require_gif = __commonJS({ + "node_modules/image-decode/gif.js"(exports2, module2) { + "use strict"; + var GifReader = require_omggif().GifReader; + module2.exports = function read(data, o) { + var reader = new GifReader(Buffer.from(data)); + var pixels2 = new Uint8Array(reader.width * reader.height * 4); + reader.decodeAndBlitFrameRGBA(0, pixels2); + return { + data: pixels2, + width: reader.width, + height: reader.height + }; + }; + } +}); + +// node_modules/jpeg-js/lib/encoder.js +var require_encoder = __commonJS({ + "node_modules/jpeg-js/lib/encoder.js"(exports2, module2) { + var btoa2 = btoa2 || function(buf) { + return new Buffer(buf).toString("base64"); + }; + function JPEGEncoder(quality) { + var self2 = this; + var fround = Math.round; + var ffloor = Math.floor; + var YTable = new Array(64); + var UVTable = new Array(64); + var fdtbl_Y = new Array(64); + var fdtbl_UV = new Array(64); + var YDC_HT; + var UVDC_HT; + var YAC_HT; + var UVAC_HT; + var bitcode = new Array(65535); + var category = new Array(65535); + var outputfDCTQuant = new Array(64); + var DU = new Array(64); + var byteout = []; + var bytenew = 0; + var bytepos = 7; + var YDU = new Array(64); + var UDU = new Array(64); + var VDU = new Array(64); + var clt = new Array(256); + var RGB_YUV_TABLE = new Array(2048); + var currentQuality; + var ZigZag = [ + 0, + 1, + 5, + 6, + 14, + 15, + 27, + 28, + 2, + 4, + 7, + 13, + 16, + 26, + 29, + 42, + 3, + 8, + 12, + 17, + 25, + 30, + 41, + 43, + 9, + 11, + 18, + 24, + 31, + 40, + 44, + 53, + 10, + 19, + 23, + 32, + 39, + 45, + 52, + 54, + 20, + 22, + 33, + 38, + 46, + 51, + 55, + 60, + 21, + 34, + 37, + 47, + 50, + 56, + 59, + 61, + 35, + 36, + 48, + 49, + 57, + 58, + 62, + 63 + ]; + var std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; + var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; + var std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125]; + var std_ac_luminance_values = [ + 1, + 2, + 3, + 0, + 4, + 17, + 5, + 18, + 33, + 49, + 65, + 6, + 19, + 81, + 97, + 7, + 34, + 113, + 20, + 50, + 129, + 145, + 161, + 8, + 35, + 66, + 177, + 193, + 21, + 82, + 209, + 240, + 36, + 51, + 98, + 114, + 130, + 9, + 10, + 22, + 23, + 24, + 25, + 26, + 37, + 38, + 39, + 40, + 41, + 42, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250 + ]; + var std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]; + var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; + var std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119]; + var std_ac_chrominance_values = [ + 0, + 1, + 2, + 3, + 17, + 4, + 5, + 33, + 49, + 6, + 18, + 65, + 81, + 7, + 97, + 113, + 19, + 34, + 50, + 129, + 8, + 20, + 66, + 145, + 161, + 177, + 193, + 9, + 35, + 51, + 82, + 240, + 21, + 98, + 114, + 209, + 10, + 22, + 36, + 52, + 225, + 37, + 241, + 23, + 24, + 25, + 26, + 38, + 39, + 40, + 41, + 42, + 53, + 54, + 55, + 56, + 57, + 58, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250 + ]; + function initQuantTables(sf) { + var YQT = [ + 16, + 11, + 10, + 16, + 24, + 40, + 51, + 61, + 12, + 12, + 14, + 19, + 26, + 58, + 60, + 55, + 14, + 13, + 16, + 24, + 40, + 57, + 69, + 56, + 14, + 17, + 22, + 29, + 51, + 87, + 80, + 62, + 18, + 22, + 37, + 56, + 68, + 109, + 103, + 77, + 24, + 35, + 55, + 64, + 81, + 104, + 113, + 92, + 49, + 64, + 78, + 87, + 103, + 121, + 120, + 101, + 72, + 92, + 95, + 98, + 112, + 100, + 103, + 99 + ]; + for (var i2 = 0; i2 < 64; i2++) { + var t = ffloor((YQT[i2] * sf + 50) / 100); + if (t < 1) { + t = 1; + } else if (t > 255) { + t = 255; + } + YTable[ZigZag[i2]] = t; + } + var UVQT = [ + 17, + 18, + 24, + 47, + 99, + 99, + 99, + 99, + 18, + 21, + 26, + 66, + 99, + 99, + 99, + 99, + 24, + 26, + 56, + 99, + 99, + 99, + 99, + 99, + 47, + 66, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99 + ]; + for (var j = 0; j < 64; j++) { + var u = ffloor((UVQT[j] * sf + 50) / 100); + if (u < 1) { + u = 1; + } else if (u > 255) { + u = 255; + } + UVTable[ZigZag[j]] = u; + } + var aasf = [ + 1, + 1.387039845, + 1.306562965, + 1.175875602, + 1, + 0.785694958, + 0.5411961, + 0.275899379 + ]; + var k = 0; + for (var row = 0; row < 8; row++) { + for (var col = 0; col < 8; col++) { + fdtbl_Y[k] = 1 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8); + fdtbl_UV[k] = 1 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8); + k++; + } + } + } + function computeHuffmanTbl(nrcodes, std_table) { + var codevalue = 0; + var pos_in_table = 0; + var HT = new Array(); + for (var k = 1; k <= 16; k++) { + for (var j = 1; j <= nrcodes[k]; j++) { + HT[std_table[pos_in_table]] = []; + HT[std_table[pos_in_table]][0] = codevalue; + HT[std_table[pos_in_table]][1] = k; + pos_in_table++; + codevalue++; + } + codevalue *= 2; + } + return HT; + } + function initHuffmanTbl() { + YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes, std_dc_luminance_values); + UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes, std_dc_chrominance_values); + YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes, std_ac_luminance_values); + UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes, std_ac_chrominance_values); + } + function initCategoryNumber() { + var nrlower = 1; + var nrupper = 2; + for (var cat = 1; cat <= 15; cat++) { + for (var nr = nrlower; nr < nrupper; nr++) { + category[32767 + nr] = cat; + bitcode[32767 + nr] = []; + bitcode[32767 + nr][1] = cat; + bitcode[32767 + nr][0] = nr; + } + for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) { + category[32767 + nrneg] = cat; + bitcode[32767 + nrneg] = []; + bitcode[32767 + nrneg][1] = cat; + bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg; + } + nrlower <<= 1; + nrupper <<= 1; + } + } + function initRGBYUVTable() { + for (var i2 = 0; i2 < 256; i2++) { + RGB_YUV_TABLE[i2] = 19595 * i2; + RGB_YUV_TABLE[i2 + 256 >> 0] = 38470 * i2; + RGB_YUV_TABLE[i2 + 512 >> 0] = 7471 * i2 + 32768; + RGB_YUV_TABLE[i2 + 768 >> 0] = -11059 * i2; + RGB_YUV_TABLE[i2 + 1024 >> 0] = -21709 * i2; + RGB_YUV_TABLE[i2 + 1280 >> 0] = 32768 * i2 + 8421375; + RGB_YUV_TABLE[i2 + 1536 >> 0] = -27439 * i2; + RGB_YUV_TABLE[i2 + 1792 >> 0] = -5329 * i2; + } + } + function writeBits(bs) { + var value = bs[0]; + var posval = bs[1] - 1; + while (posval >= 0) { + if (value & 1 << posval) { + bytenew |= 1 << bytepos; + } + posval--; + bytepos--; + if (bytepos < 0) { + if (bytenew == 255) { + writeByte(255); + writeByte(0); + } else { + writeByte(bytenew); + } + bytepos = 7; + bytenew = 0; + } + } + } + function writeByte(value) { + byteout.push(value); + } + function writeWord(value) { + writeByte(value >> 8 & 255); + writeByte(value & 255); + } + function fDCTQuant(data, fdtbl) { + var d0, d1, d2, d3, d4, d5, d6, d7; + var dataOff = 0; + var i2; + var I8 = 8; + var I64 = 64; + for (i2 = 0; i2 < I8; ++i2) { + d0 = data[dataOff]; + d1 = data[dataOff + 1]; + d2 = data[dataOff + 2]; + d3 = data[dataOff + 3]; + d4 = data[dataOff + 4]; + d5 = data[dataOff + 5]; + d6 = data[dataOff + 6]; + d7 = data[dataOff + 7]; + var tmp0 = d0 + d7; + var tmp7 = d0 - d7; + var tmp1 = d1 + d6; + var tmp6 = d1 - d6; + var tmp2 = d2 + d5; + var tmp5 = d2 - d5; + var tmp3 = d3 + d4; + var tmp4 = d3 - d4; + var tmp10 = tmp0 + tmp3; + var tmp13 = tmp0 - tmp3; + var tmp11 = tmp1 + tmp2; + var tmp12 = tmp1 - tmp2; + data[dataOff] = tmp10 + tmp11; + data[dataOff + 4] = tmp10 - tmp11; + var z1 = (tmp12 + tmp13) * 0.707106781; + data[dataOff + 2] = tmp13 + z1; + data[dataOff + 6] = tmp13 - z1; + tmp10 = tmp4 + tmp5; + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + var z5 = (tmp10 - tmp12) * 0.382683433; + var z2 = 0.5411961 * tmp10 + z5; + var z4 = 1.306562965 * tmp12 + z5; + var z3 = tmp11 * 0.707106781; + var z11 = tmp7 + z3; + var z13 = tmp7 - z3; + data[dataOff + 5] = z13 + z2; + data[dataOff + 3] = z13 - z2; + data[dataOff + 1] = z11 + z4; + data[dataOff + 7] = z11 - z4; + dataOff += 8; + } + dataOff = 0; + for (i2 = 0; i2 < I8; ++i2) { + d0 = data[dataOff]; + d1 = data[dataOff + 8]; + d2 = data[dataOff + 16]; + d3 = data[dataOff + 24]; + d4 = data[dataOff + 32]; + d5 = data[dataOff + 40]; + d6 = data[dataOff + 48]; + d7 = data[dataOff + 56]; + var tmp0p2 = d0 + d7; + var tmp7p2 = d0 - d7; + var tmp1p2 = d1 + d6; + var tmp6p2 = d1 - d6; + var tmp2p2 = d2 + d5; + var tmp5p2 = d2 - d5; + var tmp3p2 = d3 + d4; + var tmp4p2 = d3 - d4; + var tmp10p2 = tmp0p2 + tmp3p2; + var tmp13p2 = tmp0p2 - tmp3p2; + var tmp11p2 = tmp1p2 + tmp2p2; + var tmp12p2 = tmp1p2 - tmp2p2; + data[dataOff] = tmp10p2 + tmp11p2; + data[dataOff + 32] = tmp10p2 - tmp11p2; + var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; + data[dataOff + 16] = tmp13p2 + z1p2; + data[dataOff + 48] = tmp13p2 - z1p2; + tmp10p2 = tmp4p2 + tmp5p2; + tmp11p2 = tmp5p2 + tmp6p2; + tmp12p2 = tmp6p2 + tmp7p2; + var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; + var z2p2 = 0.5411961 * tmp10p2 + z5p2; + var z4p2 = 1.306562965 * tmp12p2 + z5p2; + var z3p2 = tmp11p2 * 0.707106781; + var z11p2 = tmp7p2 + z3p2; + var z13p2 = tmp7p2 - z3p2; + data[dataOff + 40] = z13p2 + z2p2; + data[dataOff + 24] = z13p2 - z2p2; + data[dataOff + 8] = z11p2 + z4p2; + data[dataOff + 56] = z11p2 - z4p2; + dataOff++; + } + var fDCTQuant2; + for (i2 = 0; i2 < I64; ++i2) { + fDCTQuant2 = data[i2] * fdtbl[i2]; + outputfDCTQuant[i2] = fDCTQuant2 > 0 ? fDCTQuant2 + 0.5 | 0 : fDCTQuant2 - 0.5 | 0; + } + return outputfDCTQuant; + } + function writeAPP0() { + writeWord(65504); + writeWord(16); + writeByte(74); + writeByte(70); + writeByte(73); + writeByte(70); + writeByte(0); + writeByte(1); + writeByte(1); + writeByte(0); + writeWord(1); + writeWord(1); + writeByte(0); + writeByte(0); + } + function writeSOF0(width, height) { + writeWord(65472); + writeWord(17); + writeByte(8); + writeWord(height); + writeWord(width); + writeByte(3); + writeByte(1); + writeByte(17); + writeByte(0); + writeByte(2); + writeByte(17); + writeByte(1); + writeByte(3); + writeByte(17); + writeByte(1); + } + function writeDQT() { + writeWord(65499); + writeWord(132); + writeByte(0); + for (var i2 = 0; i2 < 64; i2++) { + writeByte(YTable[i2]); + } + writeByte(1); + for (var j = 0; j < 64; j++) { + writeByte(UVTable[j]); + } + } + function writeDHT() { + writeWord(65476); + writeWord(418); + writeByte(0); + for (var i2 = 0; i2 < 16; i2++) { + writeByte(std_dc_luminance_nrcodes[i2 + 1]); + } + for (var j = 0; j <= 11; j++) { + writeByte(std_dc_luminance_values[j]); + } + writeByte(16); + for (var k = 0; k < 16; k++) { + writeByte(std_ac_luminance_nrcodes[k + 1]); + } + for (var l = 0; l <= 161; l++) { + writeByte(std_ac_luminance_values[l]); + } + writeByte(1); + for (var m = 0; m < 16; m++) { + writeByte(std_dc_chrominance_nrcodes[m + 1]); + } + for (var n = 0; n <= 11; n++) { + writeByte(std_dc_chrominance_values[n]); + } + writeByte(17); + for (var o = 0; o < 16; o++) { + writeByte(std_ac_chrominance_nrcodes[o + 1]); + } + for (var p = 0; p <= 161; p++) { + writeByte(std_ac_chrominance_values[p]); + } + } + function writeSOS() { + writeWord(65498); + writeWord(12); + writeByte(3); + writeByte(1); + writeByte(0); + writeByte(2); + writeByte(17); + writeByte(3); + writeByte(17); + writeByte(0); + writeByte(63); + writeByte(0); + } + function processDU(CDU, fdtbl, DC, HTDC, HTAC) { + var EOB = HTAC[0]; + var M16zeroes = HTAC[240]; + var pos; + var I16 = 16; + var I63 = 63; + var I64 = 64; + var DU_DCT = fDCTQuant(CDU, fdtbl); + for (var j = 0; j < I64; ++j) { + DU[ZigZag[j]] = DU_DCT[j]; + } + var Diff = DU[0] - DC; + DC = DU[0]; + if (Diff == 0) { + writeBits(HTDC[0]); + } else { + pos = 32767 + Diff; + writeBits(HTDC[category[pos]]); + writeBits(bitcode[pos]); + } + var end0pos = 63; + for (; end0pos > 0 && DU[end0pos] == 0; end0pos--) { + } + ; + if (end0pos == 0) { + writeBits(EOB); + return DC; + } + var i2 = 1; + var lng; + while (i2 <= end0pos) { + var startpos = i2; + for (; DU[i2] == 0 && i2 <= end0pos; ++i2) { + } + var nrzeroes = i2 - startpos; + if (nrzeroes >= I16) { + lng = nrzeroes >> 4; + for (var nrmarker = 1; nrmarker <= lng; ++nrmarker) + writeBits(M16zeroes); + nrzeroes = nrzeroes & 15; + } + pos = 32767 + DU[i2]; + writeBits(HTAC[(nrzeroes << 4) + category[pos]]); + writeBits(bitcode[pos]); + i2++; + } + if (end0pos != I63) { + writeBits(EOB); + } + return DC; + } + function initCharLookupTable() { + var sfcc = String.fromCharCode; + for (var i2 = 0; i2 < 256; i2++) { + clt[i2] = sfcc(i2); + } + } + this.encode = function(image, quality2) { + var time_start = (/* @__PURE__ */ new Date()).getTime(); + if (quality2) setQuality(quality2); + byteout = new Array(); + bytenew = 0; + bytepos = 7; + writeWord(65496); + writeAPP0(); + writeDQT(); + writeSOF0(image.width, image.height); + writeDHT(); + writeSOS(); + var DCY = 0; + var DCU = 0; + var DCV = 0; + bytenew = 0; + bytepos = 7; + this.encode.displayName = "_encode_"; + var imageData = image.data; + var width = image.width; + var height = image.height; + var quadWidth = width * 4; + var tripleWidth = width * 3; + var x, y = 0; + var r, g, b; + var start, p, col, row, pos; + while (y < height) { + x = 0; + while (x < quadWidth) { + start = quadWidth * y + x; + p = start; + col = -1; + row = 0; + for (pos = 0; pos < 64; pos++) { + row = pos >> 3; + col = (pos & 7) * 4; + p = start + row * quadWidth + col; + if (y + row >= height) { + p -= quadWidth * (y + 1 + row - height); + } + if (x + col >= quadWidth) { + p -= x + col - quadWidth + 4; + } + r = imageData[p++]; + g = imageData[p++]; + b = imageData[p++]; + YDU[pos] = (RGB_YUV_TABLE[r] + RGB_YUV_TABLE[g + 256 >> 0] + RGB_YUV_TABLE[b + 512 >> 0] >> 16) - 128; + UDU[pos] = (RGB_YUV_TABLE[r + 768 >> 0] + RGB_YUV_TABLE[g + 1024 >> 0] + RGB_YUV_TABLE[b + 1280 >> 0] >> 16) - 128; + VDU[pos] = (RGB_YUV_TABLE[r + 1280 >> 0] + RGB_YUV_TABLE[g + 1536 >> 0] + RGB_YUV_TABLE[b + 1792 >> 0] >> 16) - 128; + } + DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT); + DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); + DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); + x += 32; + } + y += 8; + } + if (bytepos >= 0) { + var fillbits = []; + fillbits[1] = bytepos + 1; + fillbits[0] = (1 << bytepos + 1) - 1; + writeBits(fillbits); + } + writeWord(65497); + return new Buffer(byteout); + var jpegDataUri = "data:image/jpeg;base64," + btoa2(byteout.join("")); + byteout = []; + var duration = (/* @__PURE__ */ new Date()).getTime() - time_start; + return jpegDataUri; + }; + function setQuality(quality2) { + if (quality2 <= 0) { + quality2 = 1; + } + if (quality2 > 100) { + quality2 = 100; + } + if (currentQuality == quality2) return; + var sf = 0; + if (quality2 < 50) { + sf = Math.floor(5e3 / quality2); + } else { + sf = Math.floor(200 - quality2 * 2); + } + initQuantTables(sf); + currentQuality = quality2; + } + function init() { + var time_start = (/* @__PURE__ */ new Date()).getTime(); + if (!quality) quality = 50; + initCharLookupTable(); + initHuffmanTbl(); + initCategoryNumber(); + initRGBYUVTable(); + setQuality(quality); + var duration = (/* @__PURE__ */ new Date()).getTime() - time_start; + } + init(); + } + if (typeof module2 !== void 0) { + module2.exports = encode2; + } + function encode2(imgData, qu) { + if (typeof qu === "undefined") qu = 50; + var encoder2 = new JPEGEncoder(qu); + var data = encoder2.encode(imgData, qu); + return { + data, + width: imgData.width, + height: imgData.height + }; + } + } +}); + +// node_modules/jpeg-js/lib/decoder.js +var require_decoder = __commonJS({ + "node_modules/jpeg-js/lib/decoder.js"(exports2, module2) { + var JpegImage = function jpegImage() { + "use strict"; + var dctZigZag = new Int32Array([ + 0, + 1, + 8, + 16, + 9, + 2, + 3, + 10, + 17, + 24, + 32, + 25, + 18, + 11, + 4, + 5, + 12, + 19, + 26, + 33, + 40, + 48, + 41, + 34, + 27, + 20, + 13, + 6, + 7, + 14, + 21, + 28, + 35, + 42, + 49, + 56, + 57, + 50, + 43, + 36, + 29, + 22, + 15, + 23, + 30, + 37, + 44, + 51, + 58, + 59, + 52, + 45, + 38, + 31, + 39, + 46, + 53, + 60, + 61, + 54, + 47, + 55, + 62, + 63 + ]); + var dctCos1 = 4017; + var dctSin1 = 799; + var dctCos3 = 3406; + var dctSin3 = 2276; + var dctCos6 = 1567; + var dctSin6 = 3784; + var dctSqrt2 = 5793; + var dctSqrt1d2 = 2896; + function constructor() { + } + function buildHuffmanTable(codeLengths, values) { + var k = 0, code = [], i2, j, length = 16; + while (length > 0 && !codeLengths[length - 1]) + length--; + code.push({ children: [], index: 0 }); + var p = code[0], q2; + for (i2 = 0; i2 < length; i2++) { + for (j = 0; j < codeLengths[i2]; j++) { + p = code.pop(); + p.children[p.index] = values[k]; + while (p.index > 0) { + if (code.length === 0) + throw new Error("Could not recreate Huffman Table"); + p = code.pop(); + } + p.index++; + code.push(p); + while (code.length <= i2) { + code.push(q2 = { children: [], index: 0 }); + p.children[p.index] = q2.children; + p = q2; + } + k++; + } + if (i2 + 1 < length) { + code.push(q2 = { children: [], index: 0 }); + p.children[p.index] = q2.children; + p = q2; + } + } + return code[0].children; + } + function decodeScan(data, offset2, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) { + var precision = frame.precision; + var samplesPerLine = frame.samplesPerLine; + var scanLines = frame.scanLines; + var mcusPerLine = frame.mcusPerLine; + var progressive = frame.progressive; + var maxH = frame.maxH, maxV = frame.maxV; + var startOffset = offset2, bitsData = 0, bitsCount = 0; + function readBit() { + if (bitsCount > 0) { + bitsCount--; + return bitsData >> bitsCount & 1; + } + bitsData = data[offset2++]; + if (bitsData == 255) { + var nextByte = data[offset2++]; + if (nextByte) { + throw new Error("unexpected marker: " + (bitsData << 8 | nextByte).toString(16)); + } + } + bitsCount = 7; + return bitsData >>> 7; + } + function decodeHuffman(tree) { + var node = tree, bit; + while ((bit = readBit()) !== null) { + node = node[bit]; + if (typeof node === "number") + return node; + if (typeof node !== "object") + throw new Error("invalid huffman sequence"); + } + return null; + } + function receive(length) { + var n2 = 0; + while (length > 0) { + var bit = readBit(); + if (bit === null) return; + n2 = n2 << 1 | bit; + length--; + } + return n2; + } + function receiveAndExtend(length) { + var n2 = receive(length); + if (n2 >= 1 << length - 1) + return n2; + return n2 + (-1 << length) + 1; + } + function decodeBaseline(component2, zz) { + var t = decodeHuffman(component2.huffmanTableDC); + var diff = t === 0 ? 0 : receiveAndExtend(t); + zz[0] = component2.pred += diff; + var k2 = 1; + while (k2 < 64) { + var rs = decodeHuffman(component2.huffmanTableAC); + var s = rs & 15, r = rs >> 4; + if (s === 0) { + if (r < 15) + break; + k2 += 16; + continue; + } + k2 += r; + var z2 = dctZigZag[k2]; + zz[z2] = receiveAndExtend(s); + k2++; + } + } + function decodeDCFirst(component2, zz) { + var t = decodeHuffman(component2.huffmanTableDC); + var diff = t === 0 ? 0 : receiveAndExtend(t) << successive; + zz[0] = component2.pred += diff; + } + function decodeDCSuccessive(component2, zz) { + zz[0] |= readBit() << successive; + } + var eobrun = 0; + function decodeACFirst(component2, zz) { + if (eobrun > 0) { + eobrun--; + return; + } + var k2 = spectralStart, e = spectralEnd; + while (k2 <= e) { + var rs = decodeHuffman(component2.huffmanTableAC); + var s = rs & 15, r = rs >> 4; + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r) - 1; + break; + } + k2 += 16; + continue; + } + k2 += r; + var z2 = dctZigZag[k2]; + zz[z2] = receiveAndExtend(s) * (1 << successive); + k2++; + } + } + var successiveACState = 0, successiveACNextValue; + function decodeACSuccessive(component2, zz) { + var k2 = spectralStart, e = spectralEnd, r = 0; + while (k2 <= e) { + var z2 = dctZigZag[k2]; + var direction = zz[z2] < 0 ? -1 : 1; + switch (successiveACState) { + case 0: + var rs = decodeHuffman(component2.huffmanTableAC); + var s = rs & 15, r = rs >> 4; + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r); + successiveACState = 4; + } else { + r = 16; + successiveACState = 1; + } + } else { + if (s !== 1) + throw new Error("invalid ACn encoding"); + successiveACNextValue = receiveAndExtend(s); + successiveACState = r ? 2 : 3; + } + continue; + case 1: + // skipping r zero items + case 2: + if (zz[z2]) + zz[z2] += (readBit() << successive) * direction; + else { + r--; + if (r === 0) + successiveACState = successiveACState == 2 ? 3 : 0; + } + break; + case 3: + if (zz[z2]) + zz[z2] += (readBit() << successive) * direction; + else { + zz[z2] = successiveACNextValue << successive; + successiveACState = 0; + } + break; + case 4: + if (zz[z2]) + zz[z2] += (readBit() << successive) * direction; + break; + } + k2++; + } + if (successiveACState === 4) { + eobrun--; + if (eobrun === 0) + successiveACState = 0; + } + } + function decodeMcu(component2, decode2, mcu2, row, col) { + var mcuRow = mcu2 / mcusPerLine | 0; + var mcuCol = mcu2 % mcusPerLine; + var blockRow = mcuRow * component2.v + row; + var blockCol = mcuCol * component2.h + col; + decode2(component2, component2.blocks[blockRow][blockCol]); + } + function decodeBlock(component2, decode2, mcu2) { + var blockRow = mcu2 / component2.blocksPerLine | 0; + var blockCol = mcu2 % component2.blocksPerLine; + decode2(component2, component2.blocks[blockRow][blockCol]); + } + var componentsLength = components.length; + var component, i2, j, k, n; + var decodeFn; + if (progressive) { + if (spectralStart === 0) + decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; + else + decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; + } else { + decodeFn = decodeBaseline; + } + var mcu = 0, marker; + var mcuExpected; + if (componentsLength == 1) { + mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; + } else { + mcuExpected = mcusPerLine * frame.mcusPerColumn; + } + if (!resetInterval) resetInterval = mcuExpected; + var h, v; + while (mcu < mcuExpected) { + for (i2 = 0; i2 < componentsLength; i2++) + components[i2].pred = 0; + eobrun = 0; + if (componentsLength == 1) { + component = components[0]; + for (n = 0; n < resetInterval; n++) { + decodeBlock(component, decodeFn, mcu); + mcu++; + } + } else { + for (n = 0; n < resetInterval; n++) { + for (i2 = 0; i2 < componentsLength; i2++) { + component = components[i2]; + h = component.h; + v = component.v; + for (j = 0; j < v; j++) { + for (k = 0; k < h; k++) { + decodeMcu(component, decodeFn, mcu, j, k); + } + } + } + mcu++; + if (mcu === mcuExpected) break; + } + } + bitsCount = 0; + marker = data[offset2] << 8 | data[offset2 + 1]; + if (marker < 65280) { + throw new Error("marker was not found"); + } + if (marker >= 65488 && marker <= 65495) { + offset2 += 2; + } else + break; + } + return offset2 - startOffset; + } + function buildComponentData(frame, component) { + var lines = []; + var blocksPerLine = component.blocksPerLine; + var blocksPerColumn = component.blocksPerColumn; + var samplesPerLine = blocksPerLine << 3; + var R = new Int32Array(64), r = new Uint8Array(64); + function quantizeAndInverse(zz, dataOut, dataIn) { + var qt = component.quantizationTable; + var v0, v1, v2, v3, v4, v5, v6, v7, t; + var p = dataIn; + var i3; + for (i3 = 0; i3 < 64; i3++) + p[i3] = zz[i3] * qt[i3]; + for (i3 = 0; i3 < 8; ++i3) { + var row = 8 * i3; + if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 && p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 && p[7 + row] == 0) { + t = dctSqrt2 * p[0 + row] + 512 >> 10; + p[0 + row] = t; + p[1 + row] = t; + p[2 + row] = t; + p[3 + row] = t; + p[4 + row] = t; + p[5 + row] = t; + p[6 + row] = t; + p[7 + row] = t; + continue; + } + v0 = dctSqrt2 * p[0 + row] + 128 >> 8; + v1 = dctSqrt2 * p[4 + row] + 128 >> 8; + v2 = p[2 + row]; + v3 = p[6 + row]; + v4 = dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128 >> 8; + v7 = dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128 >> 8; + v5 = p[3 + row] << 4; + v6 = p[5 + row] << 4; + t = v0 - v1 + 1 >> 1; + v0 = v0 + v1 + 1 >> 1; + v1 = t; + t = v2 * dctSin6 + v3 * dctCos6 + 128 >> 8; + v2 = v2 * dctCos6 - v3 * dctSin6 + 128 >> 8; + v3 = t; + t = v4 - v6 + 1 >> 1; + v4 = v4 + v6 + 1 >> 1; + v6 = t; + t = v7 + v5 + 1 >> 1; + v5 = v7 - v5 + 1 >> 1; + v7 = t; + t = v0 - v3 + 1 >> 1; + v0 = v0 + v3 + 1 >> 1; + v3 = t; + t = v1 - v2 + 1 >> 1; + v1 = v1 + v2 + 1 >> 1; + v2 = t; + t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; + v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; + v7 = t; + t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; + v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; + v6 = t; + p[0 + row] = v0 + v7; + p[7 + row] = v0 - v7; + p[1 + row] = v1 + v6; + p[6 + row] = v1 - v6; + p[2 + row] = v2 + v5; + p[5 + row] = v2 - v5; + p[3 + row] = v3 + v4; + p[4 + row] = v3 - v4; + } + for (i3 = 0; i3 < 8; ++i3) { + var col = i3; + if (p[1 * 8 + col] == 0 && p[2 * 8 + col] == 0 && p[3 * 8 + col] == 0 && p[4 * 8 + col] == 0 && p[5 * 8 + col] == 0 && p[6 * 8 + col] == 0 && p[7 * 8 + col] == 0) { + t = dctSqrt2 * dataIn[i3 + 0] + 8192 >> 14; + p[0 * 8 + col] = t; + p[1 * 8 + col] = t; + p[2 * 8 + col] = t; + p[3 * 8 + col] = t; + p[4 * 8 + col] = t; + p[5 * 8 + col] = t; + p[6 * 8 + col] = t; + p[7 * 8 + col] = t; + continue; + } + v0 = dctSqrt2 * p[0 * 8 + col] + 2048 >> 12; + v1 = dctSqrt2 * p[4 * 8 + col] + 2048 >> 12; + v2 = p[2 * 8 + col]; + v3 = p[6 * 8 + col]; + v4 = dctSqrt1d2 * (p[1 * 8 + col] - p[7 * 8 + col]) + 2048 >> 12; + v7 = dctSqrt1d2 * (p[1 * 8 + col] + p[7 * 8 + col]) + 2048 >> 12; + v5 = p[3 * 8 + col]; + v6 = p[5 * 8 + col]; + t = v0 - v1 + 1 >> 1; + v0 = v0 + v1 + 1 >> 1; + v1 = t; + t = v2 * dctSin6 + v3 * dctCos6 + 2048 >> 12; + v2 = v2 * dctCos6 - v3 * dctSin6 + 2048 >> 12; + v3 = t; + t = v4 - v6 + 1 >> 1; + v4 = v4 + v6 + 1 >> 1; + v6 = t; + t = v7 + v5 + 1 >> 1; + v5 = v7 - v5 + 1 >> 1; + v7 = t; + t = v0 - v3 + 1 >> 1; + v0 = v0 + v3 + 1 >> 1; + v3 = t; + t = v1 - v2 + 1 >> 1; + v1 = v1 + v2 + 1 >> 1; + v2 = t; + t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; + v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; + v7 = t; + t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; + v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; + v6 = t; + p[0 * 8 + col] = v0 + v7; + p[7 * 8 + col] = v0 - v7; + p[1 * 8 + col] = v1 + v6; + p[6 * 8 + col] = v1 - v6; + p[2 * 8 + col] = v2 + v5; + p[5 * 8 + col] = v2 - v5; + p[3 * 8 + col] = v3 + v4; + p[4 * 8 + col] = v3 - v4; + } + for (i3 = 0; i3 < 64; ++i3) { + var sample2 = 128 + (p[i3] + 8 >> 4); + dataOut[i3] = sample2 < 0 ? 0 : sample2 > 255 ? 255 : sample2; + } + } + var i2, j; + for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { + var scanLine = blockRow << 3; + for (i2 = 0; i2 < 8; i2++) + lines.push(new Uint8Array(samplesPerLine)); + for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { + quantizeAndInverse(component.blocks[blockRow][blockCol], r, R); + var offset2 = 0, sample = blockCol << 3; + for (j = 0; j < 8; j++) { + var line = lines[scanLine + j]; + for (i2 = 0; i2 < 8; i2++) + line[sample + i2] = r[offset2++]; + } + } + } + return lines; + } + function clampTo8bit(a) { + return a < 0 ? 0 : a > 255 ? 255 : a; + } + constructor.prototype = { + load: function load(path) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", path, true); + xhr.responseType = "arraybuffer"; + xhr.onload = function() { + var data = new Uint8Array(xhr.response || xhr.mozResponseArrayBuffer); + this.parse(data); + if (this.onload) + this.onload(); + }.bind(this); + xhr.send(null); + }, + parse: function parse2(data) { + var offset2 = 0, length = data.length; + function readUint16() { + var value = data[offset2] << 8 | data[offset2 + 1]; + offset2 += 2; + return value; + } + function readDataBlock() { + var length2 = readUint16(); + var array = data.subarray(offset2, offset2 + length2 - 2); + offset2 += array.length; + return array; + } + function prepareComponents(frame2) { + var maxH2 = 0, maxV2 = 0; + var component2, componentId2; + for (componentId2 in frame2.components) { + if (frame2.components.hasOwnProperty(componentId2)) { + component2 = frame2.components[componentId2]; + if (maxH2 < component2.h) maxH2 = component2.h; + if (maxV2 < component2.v) maxV2 = component2.v; + } + } + var mcusPerLine = Math.ceil(frame2.samplesPerLine / 8 / maxH2); + var mcusPerColumn = Math.ceil(frame2.scanLines / 8 / maxV2); + for (componentId2 in frame2.components) { + if (frame2.components.hasOwnProperty(componentId2)) { + component2 = frame2.components[componentId2]; + var blocksPerLine = Math.ceil(Math.ceil(frame2.samplesPerLine / 8) * component2.h / maxH2); + var blocksPerColumn = Math.ceil(Math.ceil(frame2.scanLines / 8) * component2.v / maxV2); + var blocksPerLineForMcu = mcusPerLine * component2.h; + var blocksPerColumnForMcu = mcusPerColumn * component2.v; + var blocks = []; + for (var i3 = 0; i3 < blocksPerColumnForMcu; i3++) { + var row = []; + for (var j2 = 0; j2 < blocksPerLineForMcu; j2++) + row.push(new Int32Array(64)); + blocks.push(row); + } + component2.blocksPerLine = blocksPerLine; + component2.blocksPerColumn = blocksPerColumn; + component2.blocks = blocks; + } + } + frame2.maxH = maxH2; + frame2.maxV = maxV2; + frame2.mcusPerLine = mcusPerLine; + frame2.mcusPerColumn = mcusPerColumn; + } + var jfif = null; + var adobe = null; + var pixels2 = null; + var frame, resetInterval; + var quantizationTables = [], frames = []; + var huffmanTablesAC = [], huffmanTablesDC = []; + var fileMarker = readUint16(); + if (fileMarker != 65496) { + throw new Error("SOI not found"); + } + fileMarker = readUint16(); + while (fileMarker != 65497) { + var i2, j, l; + switch (fileMarker) { + case 65280: + break; + case 65504: + // APP0 (Application Specific) + case 65505: + // APP1 + case 65506: + // APP2 + case 65507: + // APP3 + case 65508: + // APP4 + case 65509: + // APP5 + case 65510: + // APP6 + case 65511: + // APP7 + case 65512: + // APP8 + case 65513: + // APP9 + case 65514: + // APP10 + case 65515: + // APP11 + case 65516: + // APP12 + case 65517: + // APP13 + case 65518: + // APP14 + case 65519: + // APP15 + case 65534: + var appData = readDataBlock(); + if (fileMarker === 65504) { + if (appData[0] === 74 && appData[1] === 70 && appData[2] === 73 && appData[3] === 70 && appData[4] === 0) { + jfif = { + version: { major: appData[5], minor: appData[6] }, + densityUnits: appData[7], + xDensity: appData[8] << 8 | appData[9], + yDensity: appData[10] << 8 | appData[11], + thumbWidth: appData[12], + thumbHeight: appData[13], + thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) + }; + } + } + if (fileMarker === 65518) { + if (appData[0] === 65 && appData[1] === 100 && appData[2] === 111 && appData[3] === 98 && appData[4] === 101 && appData[5] === 0) { + adobe = { + version: appData[6], + flags0: appData[7] << 8 | appData[8], + flags1: appData[9] << 8 | appData[10], + transformCode: appData[11] + }; + } + } + break; + case 65499: + var quantizationTablesLength = readUint16(); + var quantizationTablesEnd = quantizationTablesLength + offset2 - 2; + while (offset2 < quantizationTablesEnd) { + var quantizationTableSpec = data[offset2++]; + var tableData = new Int32Array(64); + if (quantizationTableSpec >> 4 === 0) { + for (j = 0; j < 64; j++) { + var z2 = dctZigZag[j]; + tableData[z2] = data[offset2++]; + } + } else if (quantizationTableSpec >> 4 === 1) { + for (j = 0; j < 64; j++) { + var z2 = dctZigZag[j]; + tableData[z2] = readUint16(); + } + } else + throw new Error("DQT: invalid table spec"); + quantizationTables[quantizationTableSpec & 15] = tableData; + } + break; + case 65472: + // SOF0 (Start of Frame, Baseline DCT) + case 65473: + // SOF1 (Start of Frame, Extended DCT) + case 65474: + readUint16(); + frame = {}; + frame.extended = fileMarker === 65473; + frame.progressive = fileMarker === 65474; + frame.precision = data[offset2++]; + frame.scanLines = readUint16(); + frame.samplesPerLine = readUint16(); + frame.components = {}; + frame.componentsOrder = []; + var componentsCount = data[offset2++], componentId; + var maxH = 0, maxV = 0; + for (i2 = 0; i2 < componentsCount; i2++) { + componentId = data[offset2]; + var h = data[offset2 + 1] >> 4; + var v = data[offset2 + 1] & 15; + var qId = data[offset2 + 2]; + frame.componentsOrder.push(componentId); + frame.components[componentId] = { + h, + v, + quantizationIdx: qId + }; + offset2 += 3; + } + prepareComponents(frame); + frames.push(frame); + break; + case 65476: + var huffmanLength = readUint16(); + for (i2 = 2; i2 < huffmanLength; ) { + var huffmanTableSpec = data[offset2++]; + var codeLengths = new Uint8Array(16); + var codeLengthSum = 0; + for (j = 0; j < 16; j++, offset2++) + codeLengthSum += codeLengths[j] = data[offset2]; + var huffmanValues = new Uint8Array(codeLengthSum); + for (j = 0; j < codeLengthSum; j++, offset2++) + huffmanValues[j] = data[offset2]; + i2 += 17 + codeLengthSum; + (huffmanTableSpec >> 4 === 0 ? huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues); + } + break; + case 65501: + readUint16(); + resetInterval = readUint16(); + break; + case 65498: + var scanLength = readUint16(); + var selectorsCount = data[offset2++]; + var components = [], component; + for (i2 = 0; i2 < selectorsCount; i2++) { + component = frame.components[data[offset2++]]; + var tableSpec = data[offset2++]; + component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; + component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; + components.push(component); + } + var spectralStart = data[offset2++]; + var spectralEnd = data[offset2++]; + var successiveApproximation = data[offset2++]; + var processed = decodeScan( + data, + offset2, + frame, + components, + resetInterval, + spectralStart, + spectralEnd, + successiveApproximation >> 4, + successiveApproximation & 15 + ); + offset2 += processed; + break; + case 65535: + if (data[offset2] !== 255) { + offset2--; + } + break; + default: + if (data[offset2 - 3] == 255 && data[offset2 - 2] >= 192 && data[offset2 - 2] <= 254) { + offset2 -= 3; + break; + } + throw new Error("unknown JPEG marker " + fileMarker.toString(16)); + } + fileMarker = readUint16(); + } + if (frames.length != 1) + throw new Error("only single frame JPEGs supported"); + for (var i2 = 0; i2 < frames.length; i2++) { + var cp = frames[i2].components; + for (var j in cp) { + cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx]; + delete cp[j].quantizationIdx; + } + } + this.width = frame.samplesPerLine; + this.height = frame.scanLines; + this.jfif = jfif; + this.adobe = adobe; + this.components = []; + for (var i2 = 0; i2 < frame.componentsOrder.length; i2++) { + var component = frame.components[frame.componentsOrder[i2]]; + this.components.push({ + lines: buildComponentData(frame, component), + scaleX: component.h / frame.maxH, + scaleY: component.v / frame.maxV + }); + } + }, + getData: function getData(width, height) { + var scaleX = this.width / width, scaleY = this.height / height; + var component1, component2, component3, component4; + var component1Line, component2Line, component3Line, component4Line; + var x, y; + var offset2 = 0; + var Y, Cb, Cr, K, C, M2, Ye, R, G, B; + var colorTransform; + var dataLength = width * height * this.components.length; + var data = new Uint8Array(dataLength); + switch (this.components.length) { + case 1: + component1 = this.components[0]; + for (y = 0; y < height; y++) { + component1Line = component1.lines[0 | y * component1.scaleY * scaleY]; + for (x = 0; x < width; x++) { + Y = component1Line[0 | x * component1.scaleX * scaleX]; + data[offset2++] = Y; + } + } + break; + case 2: + component1 = this.components[0]; + component2 = this.components[1]; + for (y = 0; y < height; y++) { + component1Line = component1.lines[0 | y * component1.scaleY * scaleY]; + component2Line = component2.lines[0 | y * component2.scaleY * scaleY]; + for (x = 0; x < width; x++) { + Y = component1Line[0 | x * component1.scaleX * scaleX]; + data[offset2++] = Y; + Y = component2Line[0 | x * component2.scaleX * scaleX]; + data[offset2++] = Y; + } + } + break; + case 3: + colorTransform = true; + if (this.adobe && this.adobe.transformCode) + colorTransform = true; + else if (typeof this.colorTransform !== "undefined") + colorTransform = !!this.colorTransform; + component1 = this.components[0]; + component2 = this.components[1]; + component3 = this.components[2]; + for (y = 0; y < height; y++) { + component1Line = component1.lines[0 | y * component1.scaleY * scaleY]; + component2Line = component2.lines[0 | y * component2.scaleY * scaleY]; + component3Line = component3.lines[0 | y * component3.scaleY * scaleY]; + for (x = 0; x < width; x++) { + if (!colorTransform) { + R = component1Line[0 | x * component1.scaleX * scaleX]; + G = component2Line[0 | x * component2.scaleX * scaleX]; + B = component3Line[0 | x * component3.scaleX * scaleX]; + } else { + Y = component1Line[0 | x * component1.scaleX * scaleX]; + Cb = component2Line[0 | x * component2.scaleX * scaleX]; + Cr = component3Line[0 | x * component3.scaleX * scaleX]; + R = clampTo8bit(Y + 1.402 * (Cr - 128)); + G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); + B = clampTo8bit(Y + 1.772 * (Cb - 128)); + } + data[offset2++] = R; + data[offset2++] = G; + data[offset2++] = B; + } + } + break; + case 4: + if (!this.adobe) + throw new Error("Unsupported color mode (4 components)"); + colorTransform = false; + if (this.adobe && this.adobe.transformCode) + colorTransform = true; + else if (typeof this.colorTransform !== "undefined") + colorTransform = !!this.colorTransform; + component1 = this.components[0]; + component2 = this.components[1]; + component3 = this.components[2]; + component4 = this.components[3]; + for (y = 0; y < height; y++) { + component1Line = component1.lines[0 | y * component1.scaleY * scaleY]; + component2Line = component2.lines[0 | y * component2.scaleY * scaleY]; + component3Line = component3.lines[0 | y * component3.scaleY * scaleY]; + component4Line = component4.lines[0 | y * component4.scaleY * scaleY]; + for (x = 0; x < width; x++) { + if (!colorTransform) { + C = component1Line[0 | x * component1.scaleX * scaleX]; + M2 = component2Line[0 | x * component2.scaleX * scaleX]; + Ye = component3Line[0 | x * component3.scaleX * scaleX]; + K = component4Line[0 | x * component4.scaleX * scaleX]; + } else { + Y = component1Line[0 | x * component1.scaleX * scaleX]; + Cb = component2Line[0 | x * component2.scaleX * scaleX]; + Cr = component3Line[0 | x * component3.scaleX * scaleX]; + K = component4Line[0 | x * component4.scaleX * scaleX]; + C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128)); + M2 = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); + Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128)); + } + data[offset2++] = 255 - C; + data[offset2++] = 255 - M2; + data[offset2++] = 255 - Ye; + data[offset2++] = 255 - K; + } + } + break; + default: + throw new Error("Unsupported color mode"); + } + return data; + }, + copyToImageData: function copyToImageData(imageData, formatAsRGBA) { + var width = imageData.width, height = imageData.height; + var imageDataArray = imageData.data; + var data = this.getData(width, height); + var i2 = 0, j = 0, x, y; + var Y, K, C, M2, R, G, B; + switch (this.components.length) { + case 1: + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + Y = data[i2++]; + imageDataArray[j++] = Y; + imageDataArray[j++] = Y; + imageDataArray[j++] = Y; + if (formatAsRGBA) { + imageDataArray[j++] = 255; + } + } + } + break; + case 3: + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + R = data[i2++]; + G = data[i2++]; + B = data[i2++]; + imageDataArray[j++] = R; + imageDataArray[j++] = G; + imageDataArray[j++] = B; + if (formatAsRGBA) { + imageDataArray[j++] = 255; + } + } + } + break; + case 4: + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + C = data[i2++]; + M2 = data[i2++]; + Y = data[i2++]; + K = data[i2++]; + R = 255 - clampTo8bit(C * (1 - K / 255) + K); + G = 255 - clampTo8bit(M2 * (1 - K / 255) + K); + B = 255 - clampTo8bit(Y * (1 - K / 255) + K); + imageDataArray[j++] = R; + imageDataArray[j++] = G; + imageDataArray[j++] = B; + if (formatAsRGBA) { + imageDataArray[j++] = 255; + } + } + } + break; + default: + throw new Error("Unsupported color mode"); + } + } + }; + return constructor; + }(); + module2.exports = decode; + function decode(jpegData, opts) { + var defaultOpts = { + useTArray: false, + // "undefined" means "Choose whether to transform colors based on the image’s color model." + colorTransform: void 0, + formatAsRGBA: true + }; + if (opts) { + if (typeof opts === "object") { + opts = { + useTArray: typeof opts.useTArray === "undefined" ? defaultOpts.useTArray : opts.useTArray, + colorTransform: typeof opts.colorTransform === "undefined" ? defaultOpts.colorTransform : opts.colorTransform, + formatAsRGBA: typeof opts.formatAsRGBA === "undefined" ? defaultOpts.formatAsRGBA : opts.formatAsRGBA + }; + } else { + opts = defaultOpts; + opts.useTArray = true; + } + } else { + opts = defaultOpts; + } + var arr2 = new Uint8Array(jpegData); + var decoder2 = new JpegImage(); + decoder2.parse(arr2); + decoder2.colorTransform = opts.colorTransform; + var channels = opts.formatAsRGBA ? 4 : 3; + var bytesNeeded = decoder2.width * decoder2.height * channels; + try { + var image = { + width: decoder2.width, + height: decoder2.height, + data: opts.useTArray ? new Uint8Array(bytesNeeded) : new Buffer(bytesNeeded) + }; + } catch (err) { + if (err instanceof RangeError) { + throw new Error("Could not allocate enough memory for the image. Required: " + bytesNeeded); + } else { + throw err; + } + } + decoder2.copyToImageData(image, opts.formatAsRGBA); + return image; + } + } +}); + +// node_modules/jpeg-js/index.js +var require_jpeg_js = __commonJS({ + "node_modules/jpeg-js/index.js"(exports2, module2) { + var encode2 = require_encoder(); + var decode = require_decoder(); + module2.exports = { + encode: encode2, + decode + }; + } +}); + +// node_modules/buffer-to-uint8array/index.js +var require_buffer_to_uint8array = __commonJS({ + "node_modules/buffer-to-uint8array/index.js"(exports2, module2) { + module2.exports = function(buf) { + if (!buf) return void 0; + if (buf.constructor.name === "Uint8Array" || buf.constructor === Uint8Array) { + return buf; + } + if (typeof buf === "string") buf = Buffer(buf); + var a = new Uint8Array(buf.length); + for (var i2 = 0; i2 < buf.length; i2++) a[i2] = buf[i2]; + return a; + }; + } +}); + +// node_modules/image-decode/jpg.js +var require_jpg = __commonJS({ + "node_modules/image-decode/jpg.js"(exports2, module2) { + "use strict"; + var jpeg = require_jpeg_js(); + var b2u8 = require_buffer_to_uint8array(); + module2.exports = read; + function read(data, o) { + var jpegData = jpeg.decode(data); + if (!jpegData) { + throw new Error("Error decoding jpeg"); + } + return { + data: b2u8(jpegData.data), + height: jpegData.height, + width: jpegData.width + }; + } + } +}); + +// node_modules/bmp-js/lib/encoder.js +var require_encoder2 = __commonJS({ + "node_modules/bmp-js/lib/encoder.js"(exports2, module2) { + function BmpEncoder(imgData) { + this.buffer = imgData.data; + this.width = imgData.width; + this.height = imgData.height; + this.extraBytes = this.width % 4; + this.rgbSize = this.height * (3 * this.width + this.extraBytes); + this.headerInfoSize = 40; + this.data = []; + this.flag = "BM"; + this.reserved = 0; + this.offset = 54; + this.fileSize = this.rgbSize + this.offset; + this.planes = 1; + this.bitPP = 24; + this.compress = 0; + this.hr = 0; + this.vr = 0; + this.colors = 0; + this.importantColors = 0; + } + BmpEncoder.prototype.encode = function() { + var tempBuffer = new Buffer(this.offset + this.rgbSize); + this.pos = 0; + tempBuffer.write(this.flag, this.pos, 2); + this.pos += 2; + tempBuffer.writeUInt32LE(this.fileSize, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.reserved, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.offset, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.headerInfoSize, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.width, this.pos); + this.pos += 4; + tempBuffer.writeInt32LE(-this.height, this.pos); + this.pos += 4; + tempBuffer.writeUInt16LE(this.planes, this.pos); + this.pos += 2; + tempBuffer.writeUInt16LE(this.bitPP, this.pos); + this.pos += 2; + tempBuffer.writeUInt32LE(this.compress, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.rgbSize, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.hr, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.vr, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.colors, this.pos); + this.pos += 4; + tempBuffer.writeUInt32LE(this.importantColors, this.pos); + this.pos += 4; + var i2 = 0; + var rowBytes = 3 * this.width + this.extraBytes; + for (var y = 0; y < this.height; y++) { + for (var x = 0; x < this.width; x++) { + var p = this.pos + y * rowBytes + x * 3; + i2++; + tempBuffer[p] = this.buffer[i2++]; + tempBuffer[p + 1] = this.buffer[i2++]; + tempBuffer[p + 2] = this.buffer[i2++]; + } + if (this.extraBytes > 0) { + var fillOffset = this.pos + y * rowBytes + this.width * 3; + tempBuffer.fill(0, fillOffset, fillOffset + this.extraBytes); + } + } + return tempBuffer; + }; + module2.exports = function(imgData, quality) { + if (typeof quality === "undefined") quality = 100; + var encoder2 = new BmpEncoder(imgData); + var data = encoder2.encode(); + return { + data, + width: imgData.width, + height: imgData.height + }; + }; + } +}); + +// node_modules/bmp-js/lib/decoder.js +var require_decoder2 = __commonJS({ + "node_modules/bmp-js/lib/decoder.js"(exports2, module2) { + function BmpDecoder(buffer, is_with_alpha) { + this.pos = 0; + this.buffer = buffer; + this.is_with_alpha = !!is_with_alpha; + this.bottom_up = true; + this.flag = this.buffer.toString("utf-8", 0, this.pos += 2); + if (this.flag != "BM") throw new Error("Invalid BMP File"); + this.parseHeader(); + this.parseRGBA(); + } + BmpDecoder.prototype.parseHeader = function() { + this.fileSize = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.reserved = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.offset = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.headerSize = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.width = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.height = this.buffer.readInt32LE(this.pos); + this.pos += 4; + this.planes = this.buffer.readUInt16LE(this.pos); + this.pos += 2; + this.bitPP = this.buffer.readUInt16LE(this.pos); + this.pos += 2; + this.compress = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.rawSize = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.hr = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.vr = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.colors = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.importantColors = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + if (this.bitPP === 16 && this.is_with_alpha) { + this.bitPP = 15; + } + if (this.bitPP < 15) { + var len = this.colors === 0 ? 1 << this.bitPP : this.colors; + this.palette = new Array(len); + for (var i2 = 0; i2 < len; i2++) { + var blue = this.buffer.readUInt8(this.pos++); + var green = this.buffer.readUInt8(this.pos++); + var red = this.buffer.readUInt8(this.pos++); + var quad = this.buffer.readUInt8(this.pos++); + this.palette[i2] = { + red, + green, + blue, + quad + }; + } + } + if (this.height < 0) { + this.height *= -1; + this.bottom_up = false; + } + }; + BmpDecoder.prototype.parseRGBA = function() { + var bitn = "bit" + this.bitPP; + var len = this.width * this.height * 4; + this.data = new Buffer(len); + this[bitn](); + }; + BmpDecoder.prototype.bit1 = function() { + var xlen = Math.ceil(this.width / 8); + var mode = xlen % 4; + var y = this.height >= 0 ? this.height - 1 : -this.height; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < xlen; x++) { + var b = this.buffer.readUInt8(this.pos++); + var location = line * this.width * 4 + x * 8 * 4; + for (var i2 = 0; i2 < 8; i2++) { + if (x * 8 + i2 < this.width) { + var rgb = this.palette[b >> 7 - i2 & 1]; + this.data[location + i2 * 4] = 0; + this.data[location + i2 * 4 + 1] = rgb.blue; + this.data[location + i2 * 4 + 2] = rgb.green; + this.data[location + i2 * 4 + 3] = rgb.red; + } else { + break; + } + } + } + if (mode != 0) { + this.pos += 4 - mode; + } + } + }; + BmpDecoder.prototype.bit4 = function() { + if (this.compress == 2) { + let setPixelData2 = function(rgbIndex) { + var rgb2 = this.palette[rgbIndex]; + this.data[location] = 0; + this.data[location + 1] = rgb2.blue; + this.data[location + 2] = rgb2.green; + this.data[location + 3] = rgb2.red; + location += 4; + }; + var setPixelData = setPixelData2; + this.data.fill(255); + var location = 0; + var lines = this.bottom_up ? this.height - 1 : 0; + var low_nibble = false; + while (location < this.data.length) { + var a = this.buffer.readUInt8(this.pos++); + var b = this.buffer.readUInt8(this.pos++); + if (a == 0) { + if (b == 0) { + if (this.bottom_up) { + lines--; + } else { + lines++; + } + location = lines * this.width * 4; + low_nibble = false; + continue; + } else if (b == 1) { + break; + } else if (b == 2) { + var x = this.buffer.readUInt8(this.pos++); + var y = this.buffer.readUInt8(this.pos++); + if (this.bottom_up) { + lines -= y; + } else { + lines += y; + } + location += y * this.width * 4 + x * 4; + } else { + var c = this.buffer.readUInt8(this.pos++); + for (var i2 = 0; i2 < b; i2++) { + if (low_nibble) { + setPixelData2.call(this, c & 15); + } else { + setPixelData2.call(this, (c & 240) >> 4); + } + if (i2 & 1 && i2 + 1 < b) { + c = this.buffer.readUInt8(this.pos++); + } + low_nibble = !low_nibble; + } + if ((b + 1 >> 1 & 1) == 1) { + this.pos++; + } + } + } else { + for (var i2 = 0; i2 < a; i2++) { + if (low_nibble) { + setPixelData2.call(this, b & 15); + } else { + setPixelData2.call(this, (b & 240) >> 4); + } + low_nibble = !low_nibble; + } + } + } + } else { + var xlen = Math.ceil(this.width / 2); + var mode = xlen % 4; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < xlen; x++) { + var b = this.buffer.readUInt8(this.pos++); + var location = line * this.width * 4 + x * 2 * 4; + var before = b >> 4; + var after = b & 15; + var rgb = this.palette[before]; + this.data[location] = 0; + this.data[location + 1] = rgb.blue; + this.data[location + 2] = rgb.green; + this.data[location + 3] = rgb.red; + if (x * 2 + 1 >= this.width) break; + rgb = this.palette[after]; + this.data[location + 4] = 0; + this.data[location + 4 + 1] = rgb.blue; + this.data[location + 4 + 2] = rgb.green; + this.data[location + 4 + 3] = rgb.red; + } + if (mode != 0) { + this.pos += 4 - mode; + } + } + } + }; + BmpDecoder.prototype.bit8 = function() { + if (this.compress == 1) { + let setPixelData2 = function(rgbIndex) { + var rgb2 = this.palette[rgbIndex]; + this.data[location] = 0; + this.data[location + 1] = rgb2.blue; + this.data[location + 2] = rgb2.green; + this.data[location + 3] = rgb2.red; + location += 4; + }; + var setPixelData = setPixelData2; + this.data.fill(255); + var location = 0; + var lines = this.bottom_up ? this.height - 1 : 0; + while (location < this.data.length) { + var a = this.buffer.readUInt8(this.pos++); + var b = this.buffer.readUInt8(this.pos++); + if (a == 0) { + if (b == 0) { + if (this.bottom_up) { + lines--; + } else { + lines++; + } + location = lines * this.width * 4; + continue; + } else if (b == 1) { + break; + } else if (b == 2) { + var x = this.buffer.readUInt8(this.pos++); + var y = this.buffer.readUInt8(this.pos++); + if (this.bottom_up) { + lines -= y; + } else { + lines += y; + } + location += y * this.width * 4 + x * 4; + } else { + for (var i2 = 0; i2 < b; i2++) { + var c = this.buffer.readUInt8(this.pos++); + setPixelData2.call(this, c); + } + if (b & true) { + this.pos++; + } + } + } else { + for (var i2 = 0; i2 < a; i2++) { + setPixelData2.call(this, b); + } + } + } + } else { + var mode = this.width % 4; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var b = this.buffer.readUInt8(this.pos++); + var location = line * this.width * 4 + x * 4; + if (b < this.palette.length) { + var rgb = this.palette[b]; + this.data[location] = 0; + this.data[location + 1] = rgb.blue; + this.data[location + 2] = rgb.green; + this.data[location + 3] = rgb.red; + } else { + this.data[location] = 0; + this.data[location + 1] = 255; + this.data[location + 2] = 255; + this.data[location + 3] = 255; + } + } + if (mode != 0) { + this.pos += 4 - mode; + } + } + } + }; + BmpDecoder.prototype.bit15 = function() { + var dif_w = this.width % 3; + var _11111 = parseInt("11111", 2), _1_5 = _11111; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var B = this.buffer.readUInt16LE(this.pos); + this.pos += 2; + var blue = (B & _1_5) / _1_5 * 255 | 0; + var green = (B >> 5 & _1_5) / _1_5 * 255 | 0; + var red = (B >> 10 & _1_5) / _1_5 * 255 | 0; + var alpha = B >> 15 ? 255 : 0; + var location = line * this.width * 4 + x * 4; + this.data[location] = alpha; + this.data[location + 1] = blue; + this.data[location + 2] = green; + this.data[location + 3] = red; + } + this.pos += dif_w; + } + }; + BmpDecoder.prototype.bit16 = function() { + var dif_w = this.width % 2 * 2; + this.maskRed = 31744; + this.maskGreen = 992; + this.maskBlue = 31; + this.mask0 = 0; + if (this.compress == 3) { + this.maskRed = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.maskGreen = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.maskBlue = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.mask0 = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + } + var ns = [0, 0, 0]; + for (var i2 = 0; i2 < 16; i2++) { + if (this.maskRed >> i2 & 1) ns[0]++; + if (this.maskGreen >> i2 & 1) ns[1]++; + if (this.maskBlue >> i2 & 1) ns[2]++; + } + ns[1] += ns[0]; + ns[2] += ns[1]; + ns[0] = 8 - ns[0]; + ns[1] -= 8; + ns[2] -= 8; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var B = this.buffer.readUInt16LE(this.pos); + this.pos += 2; + var blue = (B & this.maskBlue) << ns[0]; + var green = (B & this.maskGreen) >> ns[1]; + var red = (B & this.maskRed) >> ns[2]; + var location = line * this.width * 4 + x * 4; + this.data[location] = 0; + this.data[location + 1] = blue; + this.data[location + 2] = green; + this.data[location + 3] = red; + } + this.pos += dif_w; + } + }; + BmpDecoder.prototype.bit24 = function() { + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var blue = this.buffer.readUInt8(this.pos++); + var green = this.buffer.readUInt8(this.pos++); + var red = this.buffer.readUInt8(this.pos++); + var location = line * this.width * 4 + x * 4; + this.data[location] = 0; + this.data[location + 1] = blue; + this.data[location + 2] = green; + this.data[location + 3] = red; + } + this.pos += this.width % 4; + } + }; + BmpDecoder.prototype.bit32 = function() { + if (this.compress == 3) { + this.maskRed = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.maskGreen = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.maskBlue = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + this.mask0 = this.buffer.readUInt32LE(this.pos); + this.pos += 4; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var alpha = this.buffer.readUInt8(this.pos++); + var blue = this.buffer.readUInt8(this.pos++); + var green = this.buffer.readUInt8(this.pos++); + var red = this.buffer.readUInt8(this.pos++); + var location = line * this.width * 4 + x * 4; + this.data[location] = alpha; + this.data[location + 1] = blue; + this.data[location + 2] = green; + this.data[location + 3] = red; + } + } + } else { + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var blue = this.buffer.readUInt8(this.pos++); + var green = this.buffer.readUInt8(this.pos++); + var red = this.buffer.readUInt8(this.pos++); + var alpha = this.buffer.readUInt8(this.pos++); + var location = line * this.width * 4 + x * 4; + this.data[location] = alpha; + this.data[location + 1] = blue; + this.data[location + 2] = green; + this.data[location + 3] = red; + } + } + } + }; + BmpDecoder.prototype.getData = function() { + return this.data; + }; + module2.exports = function(bmpData) { + var decoder2 = new BmpDecoder(bmpData); + return decoder2; + }; + } +}); + +// node_modules/bmp-js/index.js +var require_bmp_js = __commonJS({ + "node_modules/bmp-js/index.js"(exports2, module2) { + var encode2 = require_encoder2(); + var decode = require_decoder2(); + module2.exports = { + encode: encode2, + decode + }; + } +}); + +// node_modules/image-decode/bmp.js +var require_bmp = __commonJS({ + "node_modules/image-decode/bmp.js"(exports2, module2) { + "use strict"; + var bmp = require_bmp_js(); + module2.exports = function read(data, o) { + var bmpData = bmp.decode(Buffer.from(data)); + var width = bmpData.width; + var height = bmpData.height; + var pixels2 = new Uint8Array(width * height * 4); + for (var i2 = 0; i2 < pixels2.length; i2 += 4) { + var alpha = bmpData.data[i2 + 0]; + var blue = bmpData.data[i2 + 1]; + var green = bmpData.data[i2 + 2]; + var red = bmpData.data[i2 + 3]; + pixels2[i2 + 0] = red; + pixels2[i2 + 1] = green; + pixels2[i2 + 2] = blue; + pixels2[i2 + 3] = bmpData.is_with_alpha ? alpha : 255; + } + return { + data: pixels2, + width: bmpData.width, + height: bmpData.height + }; + }; + } +}); + +// node_modules/pako/lib/utils/common.js +var require_common = __commonJS({ + "node_modules/pako/lib/utils/common.js"(exports2) { + "use strict"; + var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; + function _has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); + } + exports2.assign = function(obj) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { + continue; + } + if (typeof source !== "object") { + throw new TypeError(source + "must be non-object"); + } + for (var p in source) { + if (_has(source, p)) { + obj[p] = source[p]; + } + } + } + return obj; + }; + exports2.shrinkBuf = function(buf, size2) { + if (buf.length === size2) { + return buf; + } + if (buf.subarray) { + return buf.subarray(0, size2); + } + buf.length = size2; + return buf; + }; + var fnTyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + for (var i2 = 0; i2 < len; i2++) { + dest[dest_offs + i2] = src[src_offs + i2]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + var i2, l, len, pos, chunk, result; + len = 0; + for (i2 = 0, l = chunks.length; i2 < l; i2++) { + len += chunks[i2].length; + } + result = new Uint8Array(len); + pos = 0; + for (i2 = 0, l = chunks.length; i2 < l; i2++) { + chunk = chunks[i2]; + result.set(chunk, pos); + pos += chunk.length; + } + return result; + } + }; + var fnUntyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + for (var i2 = 0; i2 < len; i2++) { + dest[dest_offs + i2] = src[src_offs + i2]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + return [].concat.apply([], chunks); + } + }; + exports2.setTyped = function(on) { + if (on) { + exports2.Buf8 = Uint8Array; + exports2.Buf16 = Uint16Array; + exports2.Buf32 = Int32Array; + exports2.assign(exports2, fnTyped); + } else { + exports2.Buf8 = Array; + exports2.Buf16 = Array; + exports2.Buf32 = Array; + exports2.assign(exports2, fnUntyped); + } + }; + exports2.setTyped(TYPED_OK); + } +}); + +// node_modules/pako/lib/zlib/trees.js +var require_trees = __commonJS({ + "node_modules/pako/lib/zlib/trees.js"(exports2) { + "use strict"; + var utils = require_common(); + var Z_FIXED = 4; + var Z_BINARY = 0; + var Z_TEXT = 1; + var Z_UNKNOWN = 2; + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + var STORED_BLOCK = 0; + var STATIC_TREES = 1; + var DYN_TREES = 2; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var Buf_size = 16; + var MAX_BL_BITS = 7; + var END_BLOCK = 256; + var REP_3_6 = 16; + var REPZ_3_10 = 17; + var REPZ_11_138 = 18; + var extra_lbits = ( + /* extra bits for each length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0] + ); + var extra_dbits = ( + /* extra bits for each distance code */ + [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13] + ); + var extra_blbits = ( + /* extra bits for each bit length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7] + ); + var bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; + var DIST_CODE_LEN = 512; + var static_ltree = new Array((L_CODES + 2) * 2); + zero(static_ltree); + var static_dtree = new Array(D_CODES * 2); + zero(static_dtree); + var _dist_code = new Array(DIST_CODE_LEN); + zero(_dist_code); + var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); + zero(_length_code); + var base_length = new Array(LENGTH_CODES); + zero(base_length); + var base_dist = new Array(D_CODES); + zero(base_dist); + function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + this.static_tree = static_tree; + this.extra_bits = extra_bits; + this.extra_base = extra_base; + this.elems = elems; + this.max_length = max_length; + this.has_stree = static_tree && static_tree.length; + } + var static_l_desc; + var static_d_desc; + var static_bl_desc; + function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; + this.max_code = 0; + this.stat_desc = stat_desc; + } + function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; + } + function put_short(s, w) { + s.pending_buf[s.pending++] = w & 255; + s.pending_buf[s.pending++] = w >>> 8 & 255; + } + function send_bits(s, value, length) { + if (s.bi_valid > Buf_size - length) { + s.bi_buf |= value << s.bi_valid & 65535; + put_short(s, s.bi_buf); + s.bi_buf = value >> Buf_size - s.bi_valid; + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= value << s.bi_valid & 65535; + s.bi_valid += length; + } + } + function send_code(s, c, tree) { + send_bits( + s, + tree[c * 2], + tree[c * 2 + 1] + /*.Len*/ + ); + } + function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; + } + function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 255; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } + } + function gen_bitlen(s, desc) { + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; + var n, m; + var bits; + var xbits; + var f; + var overflow = 0; + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + tree[s.heap[s.heap_max] * 2 + 1] = 0; + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1] = bits; + if (n > max_code) { + continue; + } + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1] + xbits); + } + } + if (overflow === 0) { + return; + } + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { + bits--; + } + s.bl_count[bits]--; + s.bl_count[bits + 1] += 2; + s.bl_count[max_length]--; + overflow -= 2; + } while (overflow > 0); + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { + continue; + } + if (tree[m * 2 + 1] !== bits) { + s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; + tree[m * 2 + 1] = bits; + } + n--; + } + } + } + function gen_codes(tree, max_code, bl_count) { + var next_code = new Array(MAX_BITS + 1); + var code = 0; + var bits; + var n; + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = code + bl_count[bits - 1] << 1; + } + for (n = 0; n <= max_code; n++) { + var len = tree[n * 2 + 1]; + if (len === 0) { + continue; + } + tree[n * 2] = bi_reverse(next_code[len]++, len); + } + } + function tr_static_init() { + var n; + var bits; + var length; + var code; + var dist; + var bl_count = new Array(MAX_BITS + 1); + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < 1 << extra_lbits[code]; n++) { + _length_code[length++] = code; + } + } + _length_code[length - 1] = code; + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < 1 << extra_dbits[code]; n++) { + _dist_code[dist++] = code; + } + } + dist >>= 7; + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < 1 << extra_dbits[code] - 7; n++) { + _dist_code[256 + dist++] = code; + } + } + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1] = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1] = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + gen_codes(static_ltree, L_CODES + 1, bl_count); + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1] = 5; + static_dtree[n * 2] = bi_reverse(n, 5); + } + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + } + function init_block(s) { + var n; + for (n = 0; n < L_CODES; n++) { + s.dyn_ltree[n * 2] = 0; + } + for (n = 0; n < D_CODES; n++) { + s.dyn_dtree[n * 2] = 0; + } + for (n = 0; n < BL_CODES; n++) { + s.bl_tree[n * 2] = 0; + } + s.dyn_ltree[END_BLOCK * 2] = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; + } + function bi_windup(s) { + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; + } + function copy_block(s, buf, len, header) { + bi_windup(s); + if (header) { + put_short(s, len); + put_short(s, ~len); + } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; + } + function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m]; + } + function pqdownheap(s, tree, k) { + var v = s.heap[k]; + var j = k << 1; + while (j <= s.heap_len) { + if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + if (smaller(tree, v, s.heap[j], s.depth)) { + break; + } + s.heap[k] = s.heap[j]; + k = j; + j <<= 1; + } + s.heap[k] = v; + } + function compress_block(s, ltree, dtree) { + var dist; + var lc; + var lx = 0; + var code; + var extra; + if (s.last_lit !== 0) { + do { + dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1]; + lc = s.pending_buf[s.l_buf + lx]; + lx++; + if (dist === 0) { + send_code(s, lc, ltree); + } else { + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); + } + dist--; + code = d_code(dist); + send_code(s, code, dtree); + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); + } + } + } while (lx < s.last_lit); + } + send_code(s, END_BLOCK, ltree); + } + function build_tree(s, desc) { + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; + var max_code = -1; + var node; + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + for (n = 0; n < elems; n++) { + if (tree[n * 2] !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + } else { + tree[n * 2 + 1] = 0; + } + } + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = max_code < 2 ? ++max_code : 0; + tree[node * 2] = 1; + s.depth[node] = 0; + s.opt_len--; + if (has_stree) { + s.static_len -= stree[node * 2 + 1]; + } + } + desc.max_code = max_code; + for (n = s.heap_len >> 1; n >= 1; n--) { + pqdownheap(s, tree, n); + } + node = elems; + do { + n = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[ + 1 + /*SMALLEST*/ + ] = s.heap[s.heap_len--]; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + m = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[--s.heap_max] = n; + s.heap[--s.heap_max] = m; + tree[node * 2] = tree[n * 2] + tree[m * 2]; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1] = tree[m * 2 + 1] = node; + s.heap[ + 1 + /*SMALLEST*/ + ] = node++; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + } while (s.heap_len >= 2); + s.heap[--s.heap_max] = s.heap[ + 1 + /*SMALLEST*/ + ]; + gen_bitlen(s, desc); + gen_codes(tree, max_code, s.bl_count); + } + function scan_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1] = 65535; + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + s.bl_tree[curlen * 2] += count; + } else if (curlen !== 0) { + if (curlen !== prevlen) { + s.bl_tree[curlen * 2]++; + } + s.bl_tree[REP_3_6 * 2]++; + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]++; + } else { + s.bl_tree[REPZ_11_138 * 2]++; + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function send_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + do { + send_code(s, curlen, s.bl_tree); + } while (--count !== 0); + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function build_bl_tree(s) { + var max_blindex; + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + build_tree(s, s.bl_desc); + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0) { + break; + } + } + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + return max_blindex; + } + function send_all_trees(s, lcodes, dcodes, blcodes) { + var rank; + send_bits(s, lcodes - 257, 5); + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); + for (rank = 0; rank < blcodes; rank++) { + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3); + } + send_tree(s, s.dyn_ltree, lcodes - 1); + send_tree(s, s.dyn_dtree, dcodes - 1); + } + function detect_data_type(s) { + var black_mask = 4093624447; + var n; + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0) { + return Z_BINARY; + } + } + if (s.dyn_ltree[9 * 2] !== 0 || s.dyn_ltree[10 * 2] !== 0 || s.dyn_ltree[13 * 2] !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2] !== 0) { + return Z_TEXT; + } + } + return Z_BINARY; + } + var static_init_done = false; + function _tr_init(s) { + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + s.bi_buf = 0; + s.bi_valid = 0; + init_block(s); + } + function _tr_stored_block(s, buf, stored_len, last) { + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); + copy_block(s, buf, stored_len, true); + } + function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); + } + function _tr_flush_block(s, buf, stored_len, last) { + var opt_lenb, static_lenb; + var max_blindex = 0; + if (s.level > 0) { + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + build_tree(s, s.l_desc); + build_tree(s, s.d_desc); + max_blindex = build_bl_tree(s); + opt_lenb = s.opt_len + 3 + 7 >>> 3; + static_lenb = s.static_len + 3 + 7 >>> 3; + if (static_lenb <= opt_lenb) { + opt_lenb = static_lenb; + } + } else { + opt_lenb = static_lenb = stored_len + 5; + } + if (stored_len + 4 <= opt_lenb && buf !== -1) { + _tr_stored_block(s, buf, stored_len, last); + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + init_block(s); + if (last) { + bi_windup(s); + } + } + function _tr_tally(s, dist, lc) { + s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255; + s.pending_buf[s.l_buf + s.last_lit] = lc & 255; + s.last_lit++; + if (dist === 0) { + s.dyn_ltree[lc * 2]++; + } else { + s.matches++; + dist--; + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++; + s.dyn_dtree[d_code(dist) * 2]++; + } + return s.last_lit === s.lit_bufsize - 1; + } + exports2._tr_init = _tr_init; + exports2._tr_stored_block = _tr_stored_block; + exports2._tr_flush_block = _tr_flush_block; + exports2._tr_tally = _tr_tally; + exports2._tr_align = _tr_align; + } +}); + +// node_modules/pako/lib/zlib/adler32.js +var require_adler32 = __commonJS({ + "node_modules/pako/lib/zlib/adler32.js"(exports2, module2) { + "use strict"; + function adler32(adler, buf, len, pos) { + var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0; + while (len !== 0) { + n = len > 2e3 ? 2e3 : len; + len -= n; + do { + s1 = s1 + buf[pos++] | 0; + s2 = s2 + s1 | 0; + } while (--n); + s1 %= 65521; + s2 %= 65521; + } + return s1 | s2 << 16 | 0; + } + module2.exports = adler32; + } +}); + +// node_modules/pako/lib/zlib/crc32.js +var require_crc32 = __commonJS({ + "node_modules/pako/lib/zlib/crc32.js"(exports2, module2) { + "use strict"; + function makeTable() { + var c, table = []; + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + table[n] = c; + } + return table; + } + var crcTable = makeTable(); + function crc32(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + crc ^= -1; + for (var i2 = pos; i2 < end; i2++) { + crc = crc >>> 8 ^ t[(crc ^ buf[i2]) & 255]; + } + return crc ^ -1; + } + module2.exports = crc32; + } +}); + +// node_modules/pako/lib/zlib/messages.js +var require_messages = __commonJS({ + "node_modules/pako/lib/zlib/messages.js"(exports2, module2) { + "use strict"; + module2.exports = { + 2: "need dictionary", + /* Z_NEED_DICT 2 */ + 1: "stream end", + /* Z_STREAM_END 1 */ + 0: "", + /* Z_OK 0 */ + "-1": "file error", + /* Z_ERRNO (-1) */ + "-2": "stream error", + /* Z_STREAM_ERROR (-2) */ + "-3": "data error", + /* Z_DATA_ERROR (-3) */ + "-4": "insufficient memory", + /* Z_MEM_ERROR (-4) */ + "-5": "buffer error", + /* Z_BUF_ERROR (-5) */ + "-6": "incompatible version" + /* Z_VERSION_ERROR (-6) */ + }; + } +}); + +// node_modules/pako/lib/zlib/deflate.js +var require_deflate = __commonJS({ + "node_modules/pako/lib/zlib/deflate.js"(exports2) { + "use strict"; + var utils = require_common(); + var trees = require_trees(); + var adler32 = require_adler32(); + var crc32 = require_crc32(); + var msg = require_messages(); + var Z_NO_FLUSH = 0; + var Z_PARTIAL_FLUSH = 1; + var Z_FULL_FLUSH = 3; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_BUF_ERROR = -5; + var Z_DEFAULT_COMPRESSION = -1; + var Z_FILTERED = 1; + var Z_HUFFMAN_ONLY = 2; + var Z_RLE = 3; + var Z_FIXED = 4; + var Z_DEFAULT_STRATEGY = 0; + var Z_UNKNOWN = 2; + var Z_DEFLATED = 8; + var MAX_MEM_LEVEL = 9; + var MAX_WBITS = 15; + var DEF_MEM_LEVEL = 8; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1; + var PRESET_DICT = 32; + var INIT_STATE = 42; + var EXTRA_STATE = 69; + var NAME_STATE = 73; + var COMMENT_STATE = 91; + var HCRC_STATE = 103; + var BUSY_STATE = 113; + var FINISH_STATE = 666; + var BS_NEED_MORE = 1; + var BS_BLOCK_DONE = 2; + var BS_FINISH_STARTED = 3; + var BS_FINISH_DONE = 4; + var OS_CODE = 3; + function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; + } + function rank(f) { + return (f << 1) - (f > 4 ? 9 : 0); + } + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + function flush_pending(strm) { + var s = strm.state; + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { + return; + } + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } + } + function flush_block_only(s, last) { + trees._tr_flush_block(s, s.block_start >= 0 ? s.block_start : -1, s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); + } + function put_byte(s, b) { + s.pending_buf[s.pending++] = b; + } + function putShortMSB(s, b) { + s.pending_buf[s.pending++] = b >>> 8 & 255; + s.pending_buf[s.pending++] = b & 255; + } + function read_buf(strm, buf, start, size2) { + var len = strm.avail_in; + if (len > size2) { + len = size2; + } + if (len === 0) { + return 0; + } + strm.avail_in -= len; + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + strm.next_in += len; + strm.total_in += len; + return len; + } + function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; + var scan = s.strstart; + var match; + var len; + var best_len = s.prev_length; + var nice_match = s.nice_match; + var limit = s.strstart > s.w_size - MIN_LOOKAHEAD ? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0; + var _win = s.window; + var wmask = s.w_mask; + var prev = s.prev; + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + if (nice_match > s.lookahead) { + nice_match = s.lookahead; + } + do { + match = cur_match; + if (_win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1]) { + continue; + } + scan += 2; + match++; + do { + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend); + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; + } + function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + do { + more = s.window_size - s.lookahead - s.strstart; + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + s.block_start -= _w_size; + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask; + while (s.insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + } + function deflate_stored(s, flush) { + var max_block_size = 65535; + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + for (; ; ) { + if (s.lookahead <= 1) { + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.strstart += s.lookahead; + s.lookahead = 0; + var max_start = s.block_start + max_block_size; + if (s.strstart === 0 || s.strstart >= max_start) { + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.strstart > s.block_start) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_NEED_MORE; + } + function deflate_fast(s, flush) { + var hash_head; + var bflush; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + if (s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) { + s.match_length--; + do { + s.strstart++; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } while (--s.match_length !== 0); + s.strstart++; + } else { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask; + } + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_slow(s, flush) { + var hash_head; + var bflush; + var max_insert; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + if (hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096)) { + s.match_length = MIN_MATCH - 1; + } + } + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } else if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + if (bflush) { + flush_block_only(s, false); + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_rle(s, flush) { + var bflush; + var prev; + var scan, strend; + var _win = s.window; + for (; ; ) { + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + } while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_huff(s, flush) { + var bflush; + for (; ; ) { + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; + } + } + s.match_length = 0; + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; + } + var configuration_table; + configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), + /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), + /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), + /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), + /* 3 */ + new Config(4, 4, 16, 16, deflate_slow), + /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), + /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), + /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), + /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), + /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) + /* 9 max compression */ + ]; + function lm_init(s) { + s.window_size = 2 * s.w_size; + zero(s.head); + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; + } + function DeflateState() { + this.strm = null; + this.status = 0; + this.pending_buf = null; + this.pending_buf_size = 0; + this.pending_out = 0; + this.pending = 0; + this.wrap = 0; + this.gzhead = null; + this.gzindex = 0; + this.method = Z_DEFLATED; + this.last_flush = -1; + this.w_size = 0; + this.w_bits = 0; + this.w_mask = 0; + this.window = null; + this.window_size = 0; + this.prev = null; + this.head = null; + this.ins_h = 0; + this.hash_size = 0; + this.hash_bits = 0; + this.hash_mask = 0; + this.hash_shift = 0; + this.block_start = 0; + this.match_length = 0; + this.prev_match = 0; + this.match_available = 0; + this.strstart = 0; + this.match_start = 0; + this.lookahead = 0; + this.prev_length = 0; + this.max_chain_length = 0; + this.max_lazy_match = 0; + this.level = 0; + this.strategy = 0; + this.good_match = 0; + this.nice_match = 0; + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + this.l_desc = null; + this.d_desc = null; + this.bl_desc = null; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + this.heap = new utils.Buf16(2 * L_CODES + 1); + zero(this.heap); + this.heap_len = 0; + this.heap_max = 0; + this.depth = new utils.Buf16(2 * L_CODES + 1); + zero(this.depth); + this.l_buf = 0; + this.lit_bufsize = 0; + this.last_lit = 0; + this.d_buf = 0; + this.opt_len = 0; + this.static_len = 0; + this.matches = 0; + this.insert = 0; + this.bi_buf = 0; + this.bi_valid = 0; + } + function deflateResetKeep(strm) { + var s; + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + s = strm.state; + s.pending = 0; + s.pending_out = 0; + if (s.wrap < 0) { + s.wrap = -s.wrap; + } + s.status = s.wrap ? INIT_STATE : BUSY_STATE; + strm.adler = s.wrap === 2 ? 0 : 1; + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; + } + function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; + } + function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + if (strm.state.wrap !== 2) { + return Z_STREAM_ERROR; + } + strm.state.gzhead = head; + return Z_OK; + } + function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { + return Z_STREAM_ERROR; + } + var wrap = 1; + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else if (windowBits > 15) { + wrap = 2; + windowBits -= 16; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + if (windowBits === 8) { + windowBits = 9; + } + var s = new DeflateState(); + strm.state = s; + s.strm = strm; + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + s.lit_bufsize = 1 << memLevel + 6; + s.pending_buf_size = s.lit_bufsize * 4; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + s.d_buf = 1 * s.lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + s.level = level; + s.strategy = strategy; + s.method = method; + return deflateReset(strm); + } + function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } + function deflate(strm, flush) { + var old_flush, s; + var beg, val; + if (!strm || !strm.state || flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + s = strm.state; + if (!strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH) { + return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + s.strm = strm; + old_flush = s.last_flush; + s.last_flush = flush; + if (s.status === INIT_STATE) { + if (s.wrap === 2) { + strm.adler = 0; + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } else { + put_byte( + s, + (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 255); + put_byte(s, s.gzhead.time >> 8 & 255); + put_byte(s, s.gzhead.time >> 16 & 255); + put_byte(s, s.gzhead.time >> 24 & 255); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, s.gzhead.os & 255); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 255); + put_byte(s, s.gzhead.extra.length >> 8 & 255); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } else { + var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8; + var level_flags = -1; + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= level_flags << 6; + if (s.strstart !== 0) { + header |= PRESET_DICT; + } + header += 31 - header % 31; + s.status = BUSY_STATE; + putShortMSB(s, header); + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + strm.adler = 1; + } + } + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra) { + beg = s.pending; + while (s.gzindex < (s.gzhead.extra.length & 65535)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 255); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + strm.adler = 0; + s.status = BUSY_STATE; + } + } else { + s.status = BUSY_STATE; + } + } + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) { + var bstate = s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : s.strategy === Z_RLE ? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush); + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + } + return Z_OK; + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } else if (flush !== Z_BLOCK) { + trees._tr_stored_block(s, 0, 0, false); + if (flush === Z_FULL_FLUSH) { + zero(s.head); + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } + } + if (flush !== Z_FINISH) { + return Z_OK; + } + if (s.wrap <= 0) { + return Z_STREAM_END; + } + if (s.wrap === 2) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + put_byte(s, strm.adler >> 16 & 255); + put_byte(s, strm.adler >> 24 & 255); + put_byte(s, strm.total_in & 255); + put_byte(s, strm.total_in >> 8 & 255); + put_byte(s, strm.total_in >> 16 & 255); + put_byte(s, strm.total_in >> 24 & 255); + } else { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + flush_pending(strm); + if (s.wrap > 0) { + s.wrap = -s.wrap; + } + return s.pending !== 0 ? Z_OK : Z_STREAM_END; + } + function deflateEnd(strm) { + var status; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + status = strm.state.status; + if (status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE) { + return err(strm, Z_STREAM_ERROR); + } + strm.state = null; + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; + } + function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + s = strm.state; + wrap = s.wrap; + if (wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead) { + return Z_STREAM_ERROR; + } + if (wrap === 1) { + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + s.wrap = 0; + if (dictLength >= s.w_size) { + if (wrap === 0) { + zero(s.head); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; + } + exports2.deflateInit = deflateInit; + exports2.deflateInit2 = deflateInit2; + exports2.deflateReset = deflateReset; + exports2.deflateResetKeep = deflateResetKeep; + exports2.deflateSetHeader = deflateSetHeader; + exports2.deflate = deflate; + exports2.deflateEnd = deflateEnd; + exports2.deflateSetDictionary = deflateSetDictionary; + exports2.deflateInfo = "pako deflate (from Nodeca project)"; + } +}); + +// node_modules/pako/lib/utils/strings.js +var require_strings = __commonJS({ + "node_modules/pako/lib/utils/strings.js"(exports2) { + "use strict"; + var utils = require_common(); + var STR_APPLY_OK = true; + var STR_APPLY_UIA_OK = true; + try { + String.fromCharCode.apply(null, [0]); + } catch (__) { + STR_APPLY_OK = false; + } + try { + String.fromCharCode.apply(null, new Uint8Array(1)); + } catch (__) { + STR_APPLY_UIA_OK = false; + } + var _utf8len = new utils.Buf8(256); + for (q2 = 0; q2 < 256; q2++) { + _utf8len[q2] = q2 >= 252 ? 6 : q2 >= 248 ? 5 : q2 >= 240 ? 4 : q2 >= 224 ? 3 : q2 >= 192 ? 2 : 1; + } + var q2; + _utf8len[254] = _utf8len[254] = 1; + exports2.string2buf = function(str) { + var buf, c, c2, m_pos, i2, str_len = str.length, buf_len = 0; + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + buf_len += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4; + } + buf = new utils.Buf8(buf_len); + for (i2 = 0, m_pos = 0; i2 < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + if (c < 128) { + buf[i2++] = c; + } else if (c < 2048) { + buf[i2++] = 192 | c >>> 6; + buf[i2++] = 128 | c & 63; + } else if (c < 65536) { + buf[i2++] = 224 | c >>> 12; + buf[i2++] = 128 | c >>> 6 & 63; + buf[i2++] = 128 | c & 63; + } else { + buf[i2++] = 240 | c >>> 18; + buf[i2++] = 128 | c >>> 12 & 63; + buf[i2++] = 128 | c >>> 6 & 63; + buf[i2++] = 128 | c & 63; + } + } + return buf; + }; + function buf2binstring(buf, len) { + if (len < 65534) { + if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + var result = ""; + for (var i2 = 0; i2 < len; i2++) { + result += String.fromCharCode(buf[i2]); + } + return result; + } + exports2.buf2binstring = function(buf) { + return buf2binstring(buf, buf.length); + }; + exports2.binstring2buf = function(str) { + var buf = new utils.Buf8(str.length); + for (var i2 = 0, len = buf.length; i2 < len; i2++) { + buf[i2] = str.charCodeAt(i2); + } + return buf; + }; + exports2.buf2string = function(buf, max) { + var i2, out, c, c_len; + var len = max || buf.length; + var utf16buf = new Array(len * 2); + for (out = 0, i2 = 0; i2 < len; ) { + c = buf[i2++]; + if (c < 128) { + utf16buf[out++] = c; + continue; + } + c_len = _utf8len[c]; + if (c_len > 4) { + utf16buf[out++] = 65533; + i2 += c_len - 1; + continue; + } + c &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; + while (c_len > 1 && i2 < len) { + c = c << 6 | buf[i2++] & 63; + c_len--; + } + if (c_len > 1) { + utf16buf[out++] = 65533; + continue; + } + if (c < 65536) { + utf16buf[out++] = c; + } else { + c -= 65536; + utf16buf[out++] = 55296 | c >> 10 & 1023; + utf16buf[out++] = 56320 | c & 1023; + } + } + return buf2binstring(utf16buf, out); + }; + exports2.utf8border = function(buf, max) { + var pos; + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + pos = max - 1; + while (pos >= 0 && (buf[pos] & 192) === 128) { + pos--; + } + if (pos < 0) { + return max; + } + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + } +}); + +// node_modules/pako/lib/zlib/zstream.js +var require_zstream = __commonJS({ + "node_modules/pako/lib/zlib/zstream.js"(exports2, module2) { + "use strict"; + function ZStream() { + this.input = null; + this.next_in = 0; + this.avail_in = 0; + this.total_in = 0; + this.output = null; + this.next_out = 0; + this.avail_out = 0; + this.total_out = 0; + this.msg = ""; + this.state = null; + this.data_type = 2; + this.adler = 0; + } + module2.exports = ZStream; + } +}); + +// node_modules/pako/lib/deflate.js +var require_deflate2 = __commonJS({ + "node_modules/pako/lib/deflate.js"(exports2) { + "use strict"; + var zlib_deflate = require_deflate(); + var utils = require_common(); + var strings = require_strings(); + var msg = require_messages(); + var ZStream = require_zstream(); + var toString = Object.prototype.toString; + var Z_NO_FLUSH = 0; + var Z_FINISH = 4; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_SYNC_FLUSH = 2; + var Z_DEFAULT_COMPRESSION = -1; + var Z_DEFAULT_STRATEGY = 0; + var Z_DEFLATED = 8; + function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits > 0) { + opt.windowBits = -opt.windowBits; + } else if (opt.gzip && opt.windowBits > 0 && opt.windowBits < 16) { + opt.windowBits += 16; + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + if (status !== Z_OK) { + throw new Error(msg[status]); + } + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + if (opt.dictionary) { + var dict; + if (typeof opt.dictionary === "string") { + dict = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + if (status !== Z_OK) { + throw new Error(msg[status]); + } + this._dict_set = true; + } + } + Deflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? Z_FINISH : Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.string2buf(data); + } else if (toString.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Deflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Deflate.prototype.onEnd = function(status) { + if (status === Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + function deflate(input, options) { + var deflator = new Deflate(options); + deflator.push(input, true); + if (deflator.err) { + throw deflator.msg || msg[deflator.err]; + } + return deflator.result; + } + function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); + } + function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); + } + exports2.Deflate = Deflate; + exports2.deflate = deflate; + exports2.deflateRaw = deflateRaw; + exports2.gzip = gzip; + } +}); + +// node_modules/pako/lib/zlib/inffast.js +var require_inffast = __commonJS({ + "node_modules/pako/lib/zlib/inffast.js"(exports2, module2) { + "use strict"; + var BAD = 30; + var TYPE = 12; + module2.exports = function inflate_fast(strm, start) { + var state; + var _in; + var last; + var _out; + var beg; + var end; + var dmax; + var wsize; + var whave; + var wnext; + var s_window; + var hold; + var bits; + var lcode; + var dcode; + var lmask; + var dmask; + var here; + var op; + var len; + var dist; + var from; + var from_source; + var input, output; + state = strm.state; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); + dmax = state.dmax; + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = lcode[hold & lmask]; + dolen: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op === 0) { + output[_out++] = here & 65535; + } else if (op & 16) { + len = here & 65535; + op &= 15; + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & (1 << op) - 1; + hold >>>= op; + bits -= op; + } + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + dodist: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op & 16) { + dist = here & 65535; + op &= 15; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & (1 << op) - 1; + if (dist > dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + hold >>>= op; + bits -= op; + op = _out - beg; + if (dist > op) { + op = dist - op; + if (op > whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + } + from = 0; + from_source = s_window; + if (wnext === 0) { + from += wsize - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } else if (wnext < op) { + from += wsize + wnext - op; + op -= wnext; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + } else { + from += wnext - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } else { + from = _out - dist; + do { + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } else if ((op & 64) === 0) { + here = dcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dodist; + } else { + strm.msg = "invalid distance code"; + state.mode = BAD; + break top; + } + break; + } + } else if ((op & 64) === 0) { + here = lcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dolen; + } else if (op & 32) { + state.mode = TYPE; + break top; + } else { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break top; + } + break; + } + } while (_in < last && _out < end); + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last); + strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); + state.hold = hold; + state.bits = bits; + return; + }; + } +}); + +// node_modules/pako/lib/zlib/inftrees.js +var require_inftrees = __commonJS({ + "node_modules/pako/lib/zlib/inftrees.js"(exports2, module2) { + "use strict"; + var utils = require_common(); + var MAXBITS = 15; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var lbase = [ + /* Length codes 257..285 base */ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 15, + 17, + 19, + 23, + 27, + 31, + 35, + 43, + 51, + 59, + 67, + 83, + 99, + 115, + 131, + 163, + 195, + 227, + 258, + 0, + 0 + ]; + var lext = [ + /* Length codes 257..285 extra */ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 17, + 18, + 18, + 18, + 18, + 19, + 19, + 19, + 19, + 20, + 20, + 20, + 20, + 21, + 21, + 21, + 21, + 16, + 72, + 78 + ]; + var dbase = [ + /* Distance codes 0..29 base */ + 1, + 2, + 3, + 4, + 5, + 7, + 9, + 13, + 17, + 25, + 33, + 49, + 65, + 97, + 129, + 193, + 257, + 385, + 513, + 769, + 1025, + 1537, + 2049, + 3073, + 4097, + 6145, + 8193, + 12289, + 16385, + 24577, + 0, + 0 + ]; + var dext = [ + /* Distance codes 0..29 extra */ + 16, + 16, + 16, + 16, + 17, + 17, + 18, + 18, + 19, + 19, + 20, + 20, + 21, + 21, + 22, + 22, + 23, + 23, + 24, + 24, + 25, + 25, + 26, + 26, + 27, + 27, + 28, + 28, + 29, + 29, + 64, + 64 + ]; + module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { + var bits = opts.bits; + var len = 0; + var sym = 0; + var min = 0, max = 0; + var root = 0; + var curr = 0; + var drop = 0; + var left = 0; + var used = 0; + var huff = 0; + var incr; + var fill; + var low; + var mask; + var next; + var base = null; + var base_index = 0; + var end; + var count = new utils.Buf16(MAXBITS + 1); + var offs = new utils.Buf16(MAXBITS + 1); + var extra = null; + var extra_index = 0; + var here_bits, here_op, here_val; + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { + break; + } + } + if (root > max) { + root = max; + } + if (max === 0) { + table[table_index++] = 1 << 24 | 64 << 16 | 0; + table[table_index++] = 1 << 24 | 64 << 16 | 0; + opts.bits = 1; + return 0; + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { + break; + } + } + if (root < min) { + root = min; + } + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; + } + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + if (type === CODES) { + base = extra = work; + end = 19; + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + } else { + base = dbase; + extra = dext; + end = -1; + } + huff = 0; + sym = 0; + len = min; + next = table_index; + curr = root; + drop = 0; + low = -1; + used = 1 << root; + mask = used - 1; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + for (; ; ) { + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } else { + here_op = 32 + 64; + here_val = 0; + } + incr = 1 << len - drop; + fill = 1 << curr; + min = fill; + do { + fill -= incr; + table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0; + } while (fill !== 0); + incr = 1 << len - 1; + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + sym++; + if (--count[len] === 0) { + if (len === max) { + break; + } + len = lens[lens_index + work[sym]]; + } + if (len > root && (huff & mask) !== low) { + if (drop === 0) { + drop = root; + } + next += min; + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { + break; + } + curr++; + left <<= 1; + } + used += 1 << curr; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + low = huff & mask; + table[low] = root << 24 | curr << 16 | next - table_index | 0; + } + } + if (huff !== 0) { + table[next + huff] = len - drop << 24 | 64 << 16 | 0; + } + opts.bits = root; + return 0; + }; + } +}); + +// node_modules/pako/lib/zlib/inflate.js +var require_inflate = __commonJS({ + "node_modules/pako/lib/zlib/inflate.js"(exports2) { + "use strict"; + var utils = require_common(); + var adler32 = require_adler32(); + var crc32 = require_crc32(); + var inflate_fast = require_inffast(); + var inflate_table = require_inftrees(); + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_TREES = 6; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_NEED_DICT = 2; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_MEM_ERROR = -4; + var Z_BUF_ERROR = -5; + var Z_DEFLATED = 8; + var HEAD = 1; + var FLAGS = 2; + var TIME = 3; + var OS = 4; + var EXLEN = 5; + var EXTRA = 6; + var NAME = 7; + var COMMENT = 8; + var HCRC = 9; + var DICTID = 10; + var DICT = 11; + var TYPE = 12; + var TYPEDO = 13; + var STORED = 14; + var COPY_ = 15; + var COPY = 16; + var TABLE = 17; + var LENLENS = 18; + var CODELENS = 19; + var LEN_ = 20; + var LEN = 21; + var LENEXT = 22; + var DIST = 23; + var DISTEXT = 24; + var MATCH = 25; + var LIT = 26; + var CHECK = 27; + var LENGTH = 28; + var DONE = 29; + var BAD = 30; + var MEM = 31; + var SYNC = 32; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var MAX_WBITS = 15; + var DEF_WBITS = MAX_WBITS; + function zswap32(q2) { + return (q2 >>> 24 & 255) + (q2 >>> 8 & 65280) + ((q2 & 65280) << 8) + ((q2 & 255) << 24); + } + function InflateState() { + this.mode = 0; + this.last = false; + this.wrap = 0; + this.havedict = false; + this.flags = 0; + this.dmax = 0; + this.check = 0; + this.total = 0; + this.head = null; + this.wbits = 0; + this.wsize = 0; + this.whave = 0; + this.wnext = 0; + this.window = null; + this.hold = 0; + this.bits = 0; + this.length = 0; + this.offset = 0; + this.extra = 0; + this.lencode = null; + this.distcode = null; + this.lenbits = 0; + this.distbits = 0; + this.ncode = 0; + this.nlen = 0; + this.ndist = 0; + this.have = 0; + this.next = null; + this.lens = new utils.Buf16(320); + this.work = new utils.Buf16(288); + this.lendyn = null; + this.distdyn = null; + this.sane = 0; + this.back = 0; + this.was = 0; + } + function inflateResetKeep(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ""; + if (state.wrap) { + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null; + state.hold = 0; + state.bits = 0; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + state.sane = 1; + state.back = -1; + return Z_OK; + } + function inflateReset(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + } + function inflateReset2(strm, windowBits) { + var wrap; + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); + } + function inflateInit2(strm, windowBits) { + var ret; + var state; + if (!strm) { + return Z_STREAM_ERROR; + } + state = new InflateState(); + strm.state = state; + state.window = null; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null; + } + return ret; + } + function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); + } + var virgin = true; + var lenfix; + var distfix; + function fixedtables(state) { + if (virgin) { + var sym; + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + sym = 0; + while (sym < 144) { + state.lens[sym++] = 8; + } + while (sym < 256) { + state.lens[sym++] = 9; + } + while (sym < 280) { + state.lens[sym++] = 7; + } + while (sym < 288) { + state.lens[sym++] = 8; + } + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + sym = 0; + while (sym < 32) { + state.lens[sym++] = 5; + } + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + virgin = false; + } + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; + } + function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + state.window = new utils.Buf8(state.wsize); + } + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } else { + state.wnext += dist; + if (state.wnext === state.wsize) { + state.wnext = 0; + } + if (state.whave < state.wsize) { + state.whave += dist; + } + } + } + return 0; + } + function inflate(strm, flush) { + var state; + var input, output; + var next; + var put; + var have, left; + var hold; + var bits; + var _in, _out; + var copy; + var from; + var from_source; + var here = 0; + var here_bits, here_op, here_val; + var last_bits, last_op, last_val; + var len; + var ret; + var hbuf = new utils.Buf8(4); + var opts; + var n; + var order = ( + /* permutation of code lengths */ + [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15] + ); + if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.mode === TYPE) { + state.mode = TYPEDO; + } + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + _in = have; + _out = left; + ret = Z_OK; + inf_leave: + for (; ; ) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.wrap & 2 && hold === 35615) { + state.check = 0; + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + hold = 0; + bits = 0; + state.mode = FLAGS; + break; + } + state.flags = 0; + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 255) << 8) + (hold >> 8)) % 31) { + strm.msg = "incorrect header check"; + state.mode = BAD; + break; + } + if ((hold & 15) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + hold >>>= 4; + bits -= 4; + len = (hold & 15) + 8; + if (state.wbits === 0) { + state.wbits = len; + } else if (len > state.wbits) { + strm.msg = "invalid window size"; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + strm.adler = state.check = 1; + state.mode = hold & 512 ? DICTID : TYPE; + hold = 0; + bits = 0; + break; + case FLAGS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.flags = hold; + if ((state.flags & 255) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + if (state.flags & 57344) { + strm.msg = "unknown header flags set"; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = hold >> 8 & 1; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = TIME; + /* falls through */ + case TIME: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.time = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + hbuf[2] = hold >>> 16 & 255; + hbuf[3] = hold >>> 24 & 255; + state.check = crc32(state.check, hbuf, 4, 0); + } + hold = 0; + bits = 0; + state.mode = OS; + /* falls through */ + case OS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.xflags = hold & 255; + state.head.os = hold >> 8; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 1024) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + } else if (state.head) { + state.head.extra = null; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 1024) { + copy = state.length; + if (copy > have) { + copy = have; + } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + } + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { + break inf_leave; + } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 2048) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 4096) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 512) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.check & 65535)) { + strm.msg = "header crc mismatch"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + if (state.head) { + state.head.hcrc = state.flags >> 9 & 1; + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + strm.adler = state.check = zswap32(hold); + hold = 0; + bits = 0; + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + return Z_NEED_DICT; + } + strm.adler = state.check = 1; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case TYPEDO: + if (state.last) { + hold >>>= bits & 7; + bits -= bits & 7; + state.mode = CHECK; + break; + } + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.last = hold & 1; + hold >>>= 1; + bits -= 1; + switch (hold & 3) { + case 0: + state.mode = STORED; + break; + case 1: + fixedtables(state); + state.mode = LEN_; + if (flush === Z_TREES) { + hold >>>= 2; + bits -= 2; + break inf_leave; + } + break; + case 2: + state.mode = TABLE; + break; + case 3: + strm.msg = "invalid block type"; + state.mode = BAD; + } + hold >>>= 2; + bits -= 2; + break; + case STORED: + hold >>>= bits & 7; + bits -= bits & 7; + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((hold & 65535) !== (hold >>> 16 ^ 65535)) { + strm.msg = "invalid stored block lengths"; + state.mode = BAD; + break; + } + state.length = hold & 65535; + hold = 0; + bits = 0; + state.mode = COPY_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { + copy = have; + } + if (copy > left) { + copy = left; + } + if (copy === 0) { + break inf_leave; + } + utils.arraySet(output, input, next, copy, put); + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + state.mode = TYPE; + break; + case TABLE: + while (bits < 14) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.nlen = (hold & 31) + 257; + hold >>>= 5; + bits -= 5; + state.ndist = (hold & 31) + 1; + hold >>>= 5; + bits -= 5; + state.ncode = (hold & 15) + 4; + hold >>>= 4; + bits -= 4; + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = "too many length or distance symbols"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.lens[order[state.have++]] = hold & 7; + hold >>>= 3; + bits -= 3; + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + state.lencode = state.lendyn; + state.lenbits = 7; + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret) { + strm.msg = "invalid code lengths set"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_val < 16) { + hold >>>= here_bits; + bits -= here_bits; + state.lens[state.have++] = here_val; + } else { + if (here_val === 16) { + n = here_bits + 2; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + if (state.have === 0) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 3); + hold >>>= 2; + bits -= 2; + } else if (here_val === 17) { + n = here_bits + 3; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 3 + (hold & 7); + hold >>>= 3; + bits -= 3; + } else { + n = here_bits + 7; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 11 + (hold & 127); + hold >>>= 7; + bits -= 7; + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + if (state.mode === BAD) { + break; + } + if (state.lens[256] === 0) { + strm.msg = "invalid code -- missing end-of-block"; + state.mode = BAD; + break; + } + state.lenbits = 9; + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret) { + strm.msg = "invalid literal/lengths set"; + state.mode = BAD; + break; + } + state.distbits = 6; + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + state.distbits = opts.bits; + if (ret) { + strm.msg = "invalid distances set"; + state.mode = BAD; + break; + } + state.mode = LEN_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + inflate_fast(strm, _out); + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_op && (here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + state.mode = LIT; + break; + } + if (here_op & 32) { + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (; ; ) { + here = state.distcode[hold & (1 << state.distbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + if (here_op & 64) { + strm.msg = "invalid distance code"; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = here_op & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.offset += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + if (state.offset > state.dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { + break inf_leave; + } + copy = _out - left; + if (state.offset > copy) { + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } else { + from = state.wnext - copy; + } + if (copy > state.length) { + copy = state.length; + } + from_source = state.window; + } else { + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { + copy = left; + } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { + state.mode = LEN; + } + break; + case LIT: + if (left === 0) { + break inf_leave; + } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold |= input[next++] << bits; + bits += 8; + } + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/ + state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out); + } + _out = left; + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = "incorrect data check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.total & 4294967295)) { + strm.msg = "incorrect length check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; + } + function inflateEnd(strm) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; + } + function inflateGetHeader(strm, head) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if ((state.wrap & 2) === 0) { + return Z_STREAM_ERROR; + } + state.head = head; + head.done = false; + return Z_OK; + } + function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var state; + var dictid; + var ret; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + if (state.mode === DICT) { + dictid = 1; + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + return Z_OK; + } + exports2.inflateReset = inflateReset; + exports2.inflateReset2 = inflateReset2; + exports2.inflateResetKeep = inflateResetKeep; + exports2.inflateInit = inflateInit; + exports2.inflateInit2 = inflateInit2; + exports2.inflate = inflate; + exports2.inflateEnd = inflateEnd; + exports2.inflateGetHeader = inflateGetHeader; + exports2.inflateSetDictionary = inflateSetDictionary; + exports2.inflateInfo = "pako inflate (from Nodeca project)"; + } +}); + +// node_modules/pako/lib/zlib/constants.js +var require_constants2 = __commonJS({ + "node_modules/pako/lib/zlib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type + }; + } +}); + +// node_modules/pako/lib/zlib/gzheader.js +var require_gzheader = __commonJS({ + "node_modules/pako/lib/zlib/gzheader.js"(exports2, module2) { + "use strict"; + function GZheader() { + this.text = 0; + this.time = 0; + this.xflags = 0; + this.os = 0; + this.extra = null; + this.extra_len = 0; + this.name = ""; + this.comment = ""; + this.hcrc = 0; + this.done = false; + } + module2.exports = GZheader; + } +}); + +// node_modules/pako/lib/inflate.js +var require_inflate2 = __commonJS({ + "node_modules/pako/lib/inflate.js"(exports2) { + "use strict"; + var zlib_inflate = require_inflate(); + var utils = require_common(); + var strings = require_strings(); + var c = require_constants2(); + var msg = require_messages(); + var ZStream = require_zstream(); + var GZheader = require_gzheader(); + var toString = Object.prototype.toString; + function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { + opt.windowBits = -15; + } + } + if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { + opt.windowBits += 32; + } + if (opt.windowBits > 15 && opt.windowBits < 48) { + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + this.header = new GZheader(); + zlib_inflate.inflateGetHeader(this.strm, this.header); + if (opt.dictionary) { + if (typeof opt.dictionary === "string") { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } + } + Inflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + var allowBufError = false; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? c.Z_FINISH : c.Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { + utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); + } + this.onData(utf8str); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Inflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Inflate.prototype.onEnd = function(status) { + if (status === c.Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + function inflate(input, options) { + var inflator = new Inflate(options); + inflator.push(input, true); + if (inflator.err) { + throw inflator.msg || msg[inflator.err]; + } + return inflator.result; + } + function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); + } + exports2.Inflate = Inflate; + exports2.inflate = inflate; + exports2.inflateRaw = inflateRaw; + exports2.ungzip = inflate; + } +}); + +// node_modules/pako/index.js +var require_pako = __commonJS({ + "node_modules/pako/index.js"(exports2, module2) { + "use strict"; + var assign = require_common().assign; + var deflate = require_deflate2(); + var inflate = require_inflate2(); + var constants = require_constants2(); + var pako = {}; + assign(pako, deflate, inflate, constants); + module2.exports = pako; + } +}); + +// node_modules/utif/UTIF.js +var require_UTIF = __commonJS({ + "node_modules/utif/UTIF.js"(exports2, module2) { + (function() { + var UTIF = {}; + if (typeof module2 == "object") { + module2.exports = UTIF; + } else { + self.UTIF = UTIF; + } + var pako; + if (typeof require == "function") { + pako = require_pako(); + } else { + pako = self.pako; + } + function log() { + if (typeof process == "undefined" || process.env.NODE_ENV == "development") console.log.apply(console, arguments); + } + (function(UTIF2, pako2) { + (function() { + var V2 = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function(g) { + return typeof g; + } : function(g) { + return g && "function" === typeof Symbol && g.constructor === Symbol && g !== Symbol.prototype ? "symbol" : typeof g; + }, D = function() { + function g(g2) { + this.message = "JPEG error: " + g2; + } + g.prototype = Error(); + g.prototype.name = "JpegError"; + return g.constructor = g; + }(), P = function() { + function g(g2, D2) { + this.message = g2; + this.g = D2; + } + g.prototype = Error(); + g.prototype.name = "DNLMarkerError"; + return g.constructor = g; + }(); + (function() { + function g() { + this.M = null; + this.B = -1; + } + function W(a, d) { + for (var f = 0, e = [], b, B, k = 16; 0 < k && !a[k - 1]; ) k--; + e.push({ children: [], index: 0 }); + var l = e[0], r; + for (b = 0; b < k; b++) { + for (B = 0; B < a[b]; B++) { + l = e.pop(); + for (l.children[l.index] = d[f]; 0 < l.index; ) l = e.pop(); + l.index++; + for (e.push(l); e.length <= b; ) e.push(r = { children: [], index: 0 }), l.children[l.index] = r.children, l = r; + f++; + } + b + 1 < k && (e.push(r = { children: [], index: 0 }), l.children[l.index] = r.children, l = r); + } + return e[0].children; + } + function X(a, d, f, e, b, B, k, l, r) { + function n() { + if (0 < x) return x--, z2 >> x & 1; + z2 = a[d++]; + if (255 === z2) { + var c2 = a[d++]; + if (c2) { + if (220 === c2 && g2) { + d += 2; + var b2 = a[d++] << 8 | a[d++]; + if (0 < b2 && b2 !== f.g) throw new P("Found DNL marker (0xFFDC) while parsing scan data", b2); + } + throw new D("unexpected marker " + (z2 << 8 | c2).toString(16)); + } + } + x = 7; + return z2 >>> 7; + } + function q2(a2) { + for (; ; ) { + a2 = a2[n()]; + if ("number" === typeof a2) return a2; + if ("object" !== ("undefined" === typeof a2 ? "undefined" : V2(a2))) throw new D("invalid huffman sequence"); + } + } + function h(a2) { + for (var c2 = 0; 0 < a2; ) c2 = c2 << 1 | n(), a2--; + return c2; + } + function c(a2) { + if (1 === a2) return 1 === n() ? 1 : -1; + var c2 = h(a2); + return c2 >= 1 << a2 - 1 ? c2 : c2 + (-1 << a2) + 1; + } + function C(a2, b2) { + var d2 = q2(a2.D); + d2 = 0 === d2 ? 0 : c(d2); + a2.a[b2] = a2.m += d2; + for (d2 = 1; 64 > d2; ) { + var h2 = q2(a2.o), k2 = h2 & 15; + h2 >>= 4; + if (0 === k2) { + if (15 > h2) break; + d2 += 16; + } else d2 += h2, a2.a[b2 + J[d2]] = c(k2), d2++; + } + } + function w(a2, d2) { + var b2 = q2(a2.D); + b2 = 0 === b2 ? 0 : c(b2) << r; + a2.a[d2] = a2.m += b2; + } + function p(a2, c2) { + a2.a[c2] |= n() << r; + } + function m(a2, b2) { + if (0 < A) A--; + else for (var d2 = B; d2 <= k; ) { + var e2 = q2(a2.o), f2 = e2 & 15; + e2 >>= 4; + if (0 === f2) { + if (15 > e2) { + A = h(e2) + (1 << e2) - 1; + break; + } + d2 += 16; + } else d2 += e2, a2.a[b2 + J[d2]] = c(f2) * (1 << r), d2++; + } + } + function t(a2, d2) { + for (var b2 = B, e2 = 0, f2; b2 <= k; ) { + f2 = d2 + J[b2]; + var l2 = 0 > a2.a[f2] ? -1 : 1; + switch (E) { + case 0: + e2 = q2(a2.o); + f2 = e2 & 15; + e2 >>= 4; + if (0 === f2) 15 > e2 ? (A = h(e2) + (1 << e2), E = 4) : (e2 = 16, E = 1); + else { + if (1 !== f2) throw new D("invalid ACn encoding"); + Q = c(f2); + E = e2 ? 2 : 3; + } + continue; + case 1: + case 2: + a2.a[f2] ? a2.a[f2] += l2 * (n() << r) : (e2--, 0 === e2 && (E = 2 === E ? 3 : 0)); + break; + case 3: + a2.a[f2] ? a2.a[f2] += l2 * (n() << r) : (a2.a[f2] = Q << r, E = 0); + break; + case 4: + a2.a[f2] && (a2.a[f2] += l2 * (n() << r)); + } + b2++; + } + 4 === E && (A--, 0 === A && (E = 0)); + } + var g2 = 9 < arguments.length && void 0 !== arguments[9] ? arguments[9] : false, u = f.P, v = d, z2 = 0, x = 0, A = 0, E = 0, Q, K = e.length, F, L, M2, I; + var R = f.S ? 0 === B ? 0 === l ? w : p : 0 === l ? m : t : C; + var G = 0; + var O = 1 === K ? e[0].c * e[0].l : u * f.O; + for (var S, T; G < O; ) { + var U = b ? Math.min(O - G, b) : O; + for (F = 0; F < K; F++) e[F].m = 0; + A = 0; + if (1 === K) { + var y = e[0]; + for (I = 0; I < U; I++) R(y, 64 * ((y.c + 1) * (G / y.c | 0) + G % y.c)), G++; + } else for (I = 0; I < U; I++) { + for (F = 0; F < K; F++) for (y = e[F], S = y.h, T = y.j, L = 0; L < T; L++) for (M2 = 0; M2 < S; M2++) R(y, 64 * ((y.c + 1) * ((G / u | 0) * y.j + L) + (G % u * y.h + M2))); + G++; + } + x = 0; + (y = N(a, d)) && y.f && ((0, _util.warn)("decodeScan - unexpected MCU data, current marker is: " + y.f), d = y.offset); + y = y && y.F; + if (!y || 65280 >= y) throw new D("marker was not found"); + if (65488 <= y && 65495 >= y) d += 2; + else break; + } + (y = N(a, d)) && y.f && ((0, _util.warn)("decodeScan - unexpected Scan data, current marker is: " + y.f), d = y.offset); + return d - v; + } + function Y(a, d) { + for (var f = d.c, e = d.l, b = new Int16Array(64), B = 0; B < e; B++) for (var k = 0; k < f; k++) { + var l = 64 * ((d.c + 1) * B + k), r = b, n = d.G, q2 = d.a; + if (!n) throw new D("missing required Quantization Table."); + for (var h = 0; 64 > h; h += 8) { + var c = q2[l + h]; + var C = q2[l + h + 1]; + var w = q2[l + h + 2]; + var p = q2[l + h + 3]; + var m = q2[l + h + 4]; + var t = q2[l + h + 5]; + var g2 = q2[l + h + 6]; + var u = q2[l + h + 7]; + c *= n[h]; + if (0 === (C | w | p | m | t | g2 | u)) c = 5793 * c + 512 >> 10, r[h] = c, r[h + 1] = c, r[h + 2] = c, r[h + 3] = c, r[h + 4] = c, r[h + 5] = c, r[h + 6] = c, r[h + 7] = c; + else { + C *= n[h + 1]; + w *= n[h + 2]; + p *= n[h + 3]; + m *= n[h + 4]; + t *= n[h + 5]; + g2 *= n[h + 6]; + u *= n[h + 7]; + var v = 5793 * c + 128 >> 8; + var z2 = 5793 * m + 128 >> 8; + var x = w; + var A = g2; + m = 2896 * (C - u) + 128 >> 8; + u = 2896 * (C + u) + 128 >> 8; + p <<= 4; + t <<= 4; + v = v + z2 + 1 >> 1; + z2 = v - z2; + c = 3784 * x + 1567 * A + 128 >> 8; + x = 1567 * x - 3784 * A + 128 >> 8; + A = c; + m = m + t + 1 >> 1; + t = m - t; + u = u + p + 1 >> 1; + p = u - p; + v = v + A + 1 >> 1; + A = v - A; + z2 = z2 + x + 1 >> 1; + x = z2 - x; + c = 2276 * m + 3406 * u + 2048 >> 12; + m = 3406 * m - 2276 * u + 2048 >> 12; + u = c; + c = 799 * p + 4017 * t + 2048 >> 12; + p = 4017 * p - 799 * t + 2048 >> 12; + t = c; + r[h] = v + u; + r[h + 7] = v - u; + r[h + 1] = z2 + t; + r[h + 6] = z2 - t; + r[h + 2] = x + p; + r[h + 5] = x - p; + r[h + 3] = A + m; + r[h + 4] = A - m; + } + } + for (n = 0; 8 > n; ++n) c = r[n], C = r[n + 8], w = r[n + 16], p = r[n + 24], m = r[n + 32], t = r[n + 40], g2 = r[n + 48], u = r[n + 56], 0 === (C | w | p | m | t | g2 | u) ? (c = 5793 * c + 8192 >> 14, c = -2040 > c ? 0 : 2024 <= c ? 255 : c + 2056 >> 4, q2[l + n] = c, q2[l + n + 8] = c, q2[l + n + 16] = c, q2[l + n + 24] = c, q2[l + n + 32] = c, q2[l + n + 40] = c, q2[l + n + 48] = c, q2[l + n + 56] = c) : (v = 5793 * c + 2048 >> 12, z2 = 5793 * m + 2048 >> 12, x = w, A = g2, m = 2896 * (C - u) + 2048 >> 12, u = 2896 * (C + u) + 2048 >> 12, v = (v + z2 + 1 >> 1) + 4112, z2 = v - z2, c = 3784 * x + 1567 * A + 2048 >> 12, x = 1567 * x - 3784 * A + 2048 >> 12, A = c, m = m + t + 1 >> 1, t = m - t, u = u + p + 1 >> 1, p = u - p, v = v + A + 1 >> 1, A = v - A, z2 = z2 + x + 1 >> 1, x = z2 - x, c = 2276 * m + 3406 * u + 2048 >> 12, m = 3406 * m - 2276 * u + 2048 >> 12, u = c, c = 799 * p + 4017 * t + 2048 >> 12, p = 4017 * p - 799 * t + 2048 >> 12, t = c, c = v + u, u = v - u, C = z2 + t, g2 = z2 - t, w = x + p, t = x - p, p = A + m, m = A - m, c = 16 > c ? 0 : 4080 <= c ? 255 : c >> 4, C = 16 > C ? 0 : 4080 <= C ? 255 : C >> 4, w = 16 > w ? 0 : 4080 <= w ? 255 : w >> 4, p = 16 > p ? 0 : 4080 <= p ? 255 : p >> 4, m = 16 > m ? 0 : 4080 <= m ? 255 : m >> 4, t = 16 > t ? 0 : 4080 <= t ? 255 : t >> 4, g2 = 16 > g2 ? 0 : 4080 <= g2 ? 255 : g2 >> 4, u = 16 > u ? 0 : 4080 <= u ? 255 : u >> 4, q2[l + n] = c, q2[l + n + 8] = C, q2[l + n + 16] = w, q2[l + n + 24] = p, q2[l + n + 32] = m, q2[l + n + 40] = t, q2[l + n + 48] = g2, q2[l + n + 56] = u); + } + return d.a; + } + function N(a, d) { + var f = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : d, e = a.length - 1; + f = f < d ? f : d; + if (d >= e) return null; + var b = a[d] << 8 | a[d + 1]; + if (65472 <= b && 65534 >= b) return { f: null, F: b, offset: d }; + for (var B = a[f] << 8 | a[f + 1]; !(65472 <= B && 65534 >= B); ) { + if (++f >= e) return null; + B = a[f] << 8 | a[f + 1]; + } + return { f: b.toString(16), F: B, offset: f }; + } + var J = new Uint8Array([ + 0, + 1, + 8, + 16, + 9, + 2, + 3, + 10, + 17, + 24, + 32, + 25, + 18, + 11, + 4, + 5, + 12, + 19, + 26, + 33, + 40, + 48, + 41, + 34, + 27, + 20, + 13, + 6, + 7, + 14, + 21, + 28, + 35, + 42, + 49, + 56, + 57, + 50, + 43, + 36, + 29, + 22, + 15, + 23, + 30, + 37, + 44, + 51, + 58, + 59, + 52, + 45, + 38, + 31, + 39, + 46, + 53, + 60, + 61, + 54, + 47, + 55, + 62, + 63 + ]); + g.prototype = { parse: function(a) { + function d() { + var d2 = a[k] << 8 | a[k + 1]; + k += 2; + return d2; + } + function f() { + var b2 = d(); + b2 = k + b2 - 2; + var c2 = N(a, b2, k); + c2 && c2.f && ((0, _util.warn)("readDataBlock - incorrect length, current marker is: " + c2.f), b2 = c2.offset); + b2 = a.subarray(k, b2); + k += b2.length; + return b2; + } + function e(a2) { + for (var b2 = Math.ceil(a2.v / 8 / a2.s), c2 = Math.ceil(a2.g / 8 / a2.u), d2 = 0; d2 < a2.b.length; d2++) { + v = a2.b[d2]; + var e2 = Math.ceil(Math.ceil(a2.v / 8) * v.h / a2.s), f2 = Math.ceil(Math.ceil(a2.g / 8) * v.j / a2.u); + v.a = new Int16Array(64 * c2 * v.j * (b2 * v.h + 1)); + v.c = e2; + v.l = f2; + } + a2.P = b2; + a2.O = c2; + } + var b = (1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}).N, B = void 0 === b ? null : b, k = 0, l = null, r = 0; + b = []; + var n = [], q2 = [], h = d(); + if (65496 !== h) throw new D("SOI not found"); + for (h = d(); 65497 !== h; ) { + switch (h) { + case 65504: + case 65505: + case 65506: + case 65507: + case 65508: + case 65509: + case 65510: + case 65511: + case 65512: + case 65513: + case 65514: + case 65515: + case 65516: + case 65517: + case 65518: + case 65519: + case 65534: + var c = f(); + 65518 === h && 65 === c[0] && 100 === c[1] && 111 === c[2] && 98 === c[3] && 101 === c[4] && (l = { version: c[5] << 8 | c[6], Y: c[7] << 8 | c[8], Z: c[9] << 8 | c[10], W: c[11] }); + break; + case 65499: + h = d() + k - 2; + for (var g2; k < h; ) { + var w = a[k++], p = new Uint16Array(64); + if (0 === w >> 4) for (c = 0; 64 > c; c++) g2 = J[c], p[g2] = a[k++]; + else if (1 === w >> 4) for (c = 0; 64 > c; c++) g2 = J[c], p[g2] = d(); + else throw new D("DQT - invalid table spec"); + b[w & 15] = p; + } + break; + case 65472: + case 65473: + case 65474: + if (m) throw new D("Only single frame JPEGs supported"); + d(); + var m = {}; + m.X = 65473 === h; + m.S = 65474 === h; + m.precision = a[k++]; + h = d(); + m.g = B || h; + m.v = d(); + m.b = []; + m.C = {}; + c = a[k++]; + for (h = p = w = 0; h < c; h++) { + g2 = a[k]; + var t = a[k + 1] >> 4; + var H = a[k + 1] & 15; + w < t && (w = t); + p < H && (p = H); + t = m.b.push({ h: t, j: H, T: a[k + 2], G: null }); + m.C[g2] = t - 1; + k += 3; + } + m.s = w; + m.u = p; + e(m); + break; + case 65476: + g2 = d(); + for (h = 2; h < g2; ) { + w = a[k++]; + p = new Uint8Array(16); + for (c = t = 0; 16 > c; c++, k++) t += p[c] = a[k]; + H = new Uint8Array(t); + for (c = 0; c < t; c++, k++) H[c] = a[k]; + h += 17 + t; + (0 === w >> 4 ? q2 : n)[w & 15] = W(p, H); + } + break; + case 65501: + d(); + var u = d(); + break; + case 65498: + c = 1 === ++r && !B; + d(); + w = a[k++]; + g2 = []; + for (h = 0; h < w; h++) { + p = m.C[a[k++]]; + var v = m.b[p]; + p = a[k++]; + v.D = q2[p >> 4]; + v.o = n[p & 15]; + g2.push(v); + } + h = a[k++]; + w = a[k++]; + p = a[k++]; + try { + var z2 = X(a, k, m, g2, u, h, w, p >> 4, p & 15, c); + k += z2; + } catch (x) { + if (x instanceof P) return (0, _util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'), this.parse(a, { N: x.g }); + throw x; + } + break; + case 65500: + k += 4; + break; + case 65535: + 255 !== a[k] && k--; + break; + default: + if (255 === a[k - 3] && 192 <= a[k - 2] && 254 >= a[k - 2]) k -= 3; + else if ((c = N(a, k - 2)) && c.f) (0, _util.warn)("JpegImage.parse - unexpected data, current marker is: " + c.f), k = c.offset; + else throw new D("unknown marker " + h.toString(16)); + } + h = d(); + } + this.width = m.v; + this.height = m.g; + this.A = l; + this.b = []; + for (h = 0; h < m.b.length; h++) { + v = m.b[h]; + if (u = b[v.T]) v.G = u; + this.b.push({ R: Y(m, v), U: v.h / m.s, V: v.j / m.u, c: v.c, l: v.l }); + } + this.i = this.b.length; + }, L: function(a, d) { + var f = this.width / a, e = this.height / d, b, g2, k = this.b.length, l = a * d * k, r = new Uint8ClampedArray(l), n = new Uint32Array(a); + for (g2 = 0; g2 < k; g2++) { + var q2 = this.b[g2]; + var h = q2.U * f; + var c = q2.V * e; + var C = g2; + var w = q2.R; + var p = q2.c + 1 << 3; + for (b = 0; b < a; b++) q2 = 0 | b * h, n[b] = (q2 & 4294967288) << 3 | q2 & 7; + for (h = 0; h < d; h++) for (q2 = 0 | h * c, q2 = p * (q2 & 4294967288) | (q2 & 7) << 3, b = 0; b < a; b++) r[C] = w[q2 + n[b]], C += k; + } + if (e = this.M) for (g2 = 0; g2 < l; ) for (f = q2 = 0; q2 < k; q2++, g2++, f += 2) r[g2] = (r[g2] * e[f] >> 8) + e[f + 1]; + return r; + }, w: function() { + return this.A ? !!this.A.W : 3 === this.i ? 0 === this.B ? false : true : 1 === this.B ? true : false; + }, I: function(a) { + for (var d, f, e, b = 0, g2 = a.length; b < g2; b += 3) d = a[b], f = a[b + 1], e = a[b + 2], a[b] = d - 179.456 + 1.402 * e, a[b + 1] = d + 135.459 - 0.344 * f - 0.714 * e, a[b + 2] = d - 226.816 + 1.772 * f; + return a; + }, K: function(a) { + for (var d, f, e, b, g2 = 0, k = 0, l = a.length; k < l; k += 4) d = a[k], f = a[k + 1], e = a[k + 2], b = a[k + 3], a[g2++] = -122.67195406894 + f * (-660635669420364e-19 * f + 437130475926232e-18 * e - 54080610064599e-18 * d + 48449797120281e-17 * b - 0.154362151871126) + e * (-957964378445773e-18 * e + 817076911346625e-18 * d - 0.00477271405408747 * b + 1.53380253221734) + d * (961250184130688e-18 * d - 0.00266257332283933 * b + 0.48357088451265) + b * (-336197177618394e-18 * b + 0.484791561490776), a[g2++] = 107.268039397724 + f * (219927104525741e-19 * f - 640992018297945e-18 * e + 659397001245577e-18 * d + 426105652938837e-18 * b - 0.176491792462875) + e * (-778269941513683e-18 * e + 0.00130872261408275 * d + 770482631801132e-18 * b - 0.151051492775562) + d * (0.00126935368114843 * d - 0.00265090189010898 * b + 0.25802910206845) + b * (-318913117588328e-18 * b - 0.213742400323665), a[g2++] = -20.810012546947 + f * (-570115196973677e-18 * f - 263409051004589e-19 * e + 0.0020741088115012 * d - 0.00288260236853442 * b + 0.814272968359295) + e * (-153496057440975e-19 * e - 132689043961446e-18 * d + 560833691242812e-18 * b - 0.195152027534049) + d * (0.00174418132927582 * d - 0.00255243321439347 * b + 0.116935020465145) + b * (-343531996510555e-18 * b + 0.24165260232407); + return a.subarray( + 0, + g2 + ); + }, J: function(a) { + for (var d, f, e, b = 0, g2 = a.length; b < g2; b += 4) d = a[b], f = a[b + 1], e = a[b + 2], a[b] = 434.456 - d - 1.402 * e, a[b + 1] = 119.541 - d + 0.344 * f + 0.714 * e, a[b + 2] = 481.816 - d - 1.772 * f; + return a; + }, H: function(a) { + for (var d, f, e, b, g2 = 0, k = 1 / 255, l = 0, r = a.length; l < r; l += 4) d = a[l] * k, f = a[l + 1] * k, e = a[l + 2] * k, b = a[l + 3] * k, a[g2++] = 255 + d * (-4.387332384609988 * d + 54.48615194189176 * f + 18.82290502165302 * e + 212.25662451639585 * b - 285.2331026137004) + f * (1.7149763477362134 * f - 5.6096736904047315 * e - 17.873870861415444 * b - 5.497006427196366) + e * (-2.5217340131683033 * e - 21.248923337353073 * b + 17.5119270841813) - b * (21.86122147463605 * b + 189.48180835922747), a[g2++] = 255 + d * (8.841041422036149 * d + 60.118027045597366 * f + 6.871425592049007 * e + 31.159100130055922 * b - 79.2970844816548) + f * (-15.310361306967817 * f + 17.575251261109482 * e + 131.35250912493976 * b - 190.9453302588951) + e * (4.444339102852739 * e + 9.8632861493405 * b - 24.86741582555878) - b * (20.737325471181034 * b + 187.80453709719578), a[g2++] = 255 + d * (0.8842522430003296 * d + 8.078677503112928 * f + 30.89978309703729 * e - 0.23883238689178934 * b - 14.183576799673286) + f * (10.49593273432072 * f + 63.02378494754052 * e + 50.606957656360734 * b - 112.23884253719248) + e * (0.03296041114873217 * e + 115.60384449646641 * b - 193.58209356861505) - b * (22.33816807309886 * b + 180.12613974708367); + return a.subarray(0, g2); + }, getData: function(a, d, f) { + if (4 < this.i) throw new D("Unsupported color mode"); + a = this.L(a, d); + if (1 === this.i && f) { + f = a.length; + d = new Uint8ClampedArray(3 * f); + for (var e = 0, b = 0; b < f; b++) { + var g2 = a[b]; + d[e++] = g2; + d[e++] = g2; + d[e++] = g2; + } + return d; + } + if (3 === this.i && this.w()) return this.I(a); + if (4 === this.i) { + if (this.w()) return f ? this.K(a) : this.J(a); + if (f) return this.H(a); + } + return a; + } }; + UTIF2.JpegDecoder = g; + })(); + })(); + UTIF2.encodeImage = function(rgba, w, h, metadata) { + var idf = { + "t256": [w], + "t257": [h], + "t258": [8, 8, 8, 8], + "t259": [1], + "t262": [2], + "t273": [1e3], + // strips offset + "t277": [4], + "t278": [h], + /* rows per strip */ + "t279": [w * h * 4], + // strip byte counts + "t282": [1], + "t283": [1], + "t284": [1], + "t286": [0], + "t287": [0], + "t296": [1], + "t305": ["Photopea (UTIF.js)"], + "t338": [1] + }; + if (metadata) for (var i2 in metadata) idf[i2] = metadata[i2]; + var prfx = new Uint8Array(UTIF2.encode([idf])); + var img = new Uint8Array(rgba); + var data = new Uint8Array(1e3 + w * h * 4); + for (var i2 = 0; i2 < prfx.length; i2++) data[i2] = prfx[i2]; + for (var i2 = 0; i2 < img.length; i2++) data[1e3 + i2] = img[i2]; + return data.buffer; + }; + UTIF2.encode = function(ifds) { + var data = new Uint8Array(2e4), offset2 = 4, bin = UTIF2._binBE; + data[0] = 77; + data[1] = 77; + data[3] = 42; + var ifdo = 8; + bin.writeUint(data, offset2, ifdo); + offset2 += 4; + for (var i2 = 0; i2 < ifds.length; i2++) { + var noffs = UTIF2._writeIFD(bin, data, ifdo, ifds[i2]); + ifdo = noffs[1]; + if (i2 < ifds.length - 1) bin.writeUint(data, noffs[0], ifdo); + } + return data.slice(0, ifdo).buffer; + }; + UTIF2.decode = function(buff) { + UTIF2.decode._decodeG3.allow2D = null; + var data = new Uint8Array(buff), offset2 = 0; + var id = UTIF2._binBE.readASCII(data, offset2, 2); + offset2 += 2; + var bin = id == "II" ? UTIF2._binLE : UTIF2._binBE; + var num = bin.readUshort(data, offset2); + offset2 += 2; + var ifdo = bin.readUint(data, offset2); + offset2 += 4; + var ifds = []; + while (true) { + var noff = UTIF2._readIFD(bin, data, ifdo, ifds); + ifdo = bin.readUint(data, noff); + if (ifdo == 0) break; + } + return ifds; + }; + UTIF2.decodeImages = function(buff, ifds) { + var data = new Uint8Array(buff); + var id = UTIF2._binBE.readASCII(data, 0, 2); + for (var ii = 0; ii < ifds.length; ii++) { + var img = ifds[ii]; + if (img["t256"] == null) continue; + img.isLE = id == "II"; + img.width = img["t256"][0]; + img.height = img["t257"][0]; + var cmpr = img["t259"] ? img["t259"][0] : 1; + var fo = img["t266"] ? img["t266"][0] : 1; + if (img["t284"] && img["t284"][0] == 2) log("PlanarConfiguration 2 should not be used!"); + var bipp = (img["t258"] ? Math.min(32, img["t258"][0]) : 1) * (img["t277"] ? img["t277"][0] : 1); + var bipl = Math.ceil(img.width * bipp / 8) * 8; + var soff = img["t273"]; + if (soff == null) soff = img["t324"]; + var bcnt = img["t279"]; + if (cmpr == 1 && soff.length == 1) bcnt = [img.height * (bipl >>> 3)]; + if (bcnt == null) bcnt = img["t325"]; + var bytes = new Uint8Array(img.height * (bipl >>> 3)), bilen = 0; + if (img["t322"] != null) { + var tw = img["t322"][0], th = img["t323"][0]; + var tx = Math.floor((img.width + tw - 1) / tw); + var ty = Math.floor((img.height + th - 1) / th); + var tbuff = new Uint8Array(Math.ceil(tw * th * bipp / 8) | 0); + for (var y = 0; y < ty; y++) + for (var x = 0; x < tx; x++) { + var i2 = y * tx + x; + for (var j = 0; j < tbuff.length; j++) tbuff[j] = 0; + UTIF2.decode._decompress(img, data, soff[i2], bcnt[i2], cmpr, tbuff, 0, fo); + if (cmpr == 6) bytes = tbuff; + else UTIF2._copyTile(tbuff, Math.ceil(tw * bipp / 8) | 0, th, bytes, Math.ceil(img.width * bipp / 8) | 0, img.height, Math.ceil(x * tw * bipp / 8) | 0, y * th); + } + bilen = bytes.length * 8; + } else { + var rps = img["t278"] ? img["t278"][0] : img.height; + rps = Math.min(rps, img.height); + for (var i2 = 0; i2 < soff.length; i2++) { + UTIF2.decode._decompress(img, data, soff[i2], bcnt[i2], cmpr, bytes, Math.ceil(bilen / 8) | 0, fo); + bilen += bipl * rps; + } + bilen = Math.min(bilen, bytes.length * 8); + } + img.data = new Uint8Array(bytes.buffer, 0, Math.ceil(bilen / 8) | 0); + } + }; + UTIF2.decode._decompress = function(img, data, off, len, cmpr, tgt, toff, fo) { + if (false) { + } else if (cmpr == 1) for (var j = 0; j < len; j++) tgt[toff + j] = data[off + j]; + else if (cmpr == 3) UTIF2.decode._decodeG3(data, off, len, tgt, toff, img.width, fo); + else if (cmpr == 4) UTIF2.decode._decodeG4(data, off, len, tgt, toff, img.width, fo); + else if (cmpr == 5) UTIF2.decode._decodeLZW(data, off, tgt, toff); + else if (cmpr == 6) UTIF2.decode._decodeOldJPEG(img, data, off, len, tgt, toff); + else if (cmpr == 7) UTIF2.decode._decodeNewJPEG(img, data, off, len, tgt, toff); + else if (cmpr == 8) { + var src = new Uint8Array(data.buffer, off, len); + var bin = pako2["inflate"](src); + for (var i2 = 0; i2 < bin.length; i2++) tgt[toff + i2] = bin[i2]; + } else if (cmpr == 32773) UTIF2.decode._decodePackBits(data, off, len, tgt, toff); + else if (cmpr == 32809) UTIF2.decode._decodeThunder(data, off, len, tgt, toff); + else log("Unknown compression", cmpr); + if (img["t317"] && img["t317"][0] == 2) { + var noc = img["t277"] ? img["t277"][0] : 1, h = img["t278"] ? img["t278"][0] : img.height, bpr = img.width * noc; + for (var y = 0; y < h; y++) { + var ntoff = toff + y * bpr; + if (noc == 3) for (var j = 3; j < bpr; j += 3) { + tgt[ntoff + j] = tgt[ntoff + j] + tgt[ntoff + j - 3] & 255; + tgt[ntoff + j + 1] = tgt[ntoff + j + 1] + tgt[ntoff + j - 2] & 255; + tgt[ntoff + j + 2] = tgt[ntoff + j + 2] + tgt[ntoff + j - 1] & 255; + } + else for (var j = noc; j < bpr; j++) tgt[ntoff + j] = tgt[ntoff + j] + tgt[ntoff + j - noc] & 255; + } + } + }; + UTIF2.decode._decodeNikon = function(data, off, len, tgt, toff) { + var nikon_tree = [ + [ + 0, + 1, + 5, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + /* 12-bit lossy */ + 5, + 4, + 3, + 6, + 2, + 7, + 1, + 0, + 8, + 9, + 11, + 10, + 12 + ], + [ + 0, + 1, + 5, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + /* 12-bit lossy after split */ + 57, + 90, + 56, + 39, + 22, + 5, + 4, + 3, + 2, + 1, + 0, + 11, + 12, + 12 + ], + [ + 0, + 1, + 4, + 2, + 3, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + /* 12-bit lossless */ + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, + 11, + 12 + ], + [ + 0, + 1, + 4, + 3, + 1, + 1, + 1, + 1, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + /* 14-bit lossy */ + 5, + 6, + 4, + 7, + 8, + 3, + 9, + 2, + 1, + 0, + 10, + 11, + 12, + 13, + 14 + ], + [ + 0, + 1, + 5, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + /* 14-bit lossy after split */ + 8, + 92, + 75, + 58, + 41, + 7, + 6, + 5, + 4, + 3, + 2, + 1, + 0, + 13, + 14 + ], + [ + 0, + 1, + 4, + 2, + 2, + 3, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + /* 14-bit lossless */ + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 12, + 2, + 0, + 1, + 13, + 14 + ] + ]; + var ver0, ver1, vpred, hpred, csize; + var i2, min, max, step = 0, huff = 0, split = 0, row, col, len, shl, diff; + log(data.slice(off, off + 100)); + ver0 = data[off]; + off++; + ver1 = data[off]; + off++; + log(ver0.toString(16), ver1.toString(16), len); + }; + UTIF2.decode._decodeNewJPEG = function(img, data, off, len, tgt, toff) { + var tables = img["t347"], tlen = tables ? tables.length : 0, buff = new Uint8Array(tlen + len); + if (tables) { + var SOI = 216, EOI2 = 217, boff = 0; + for (var i2 = 0; i2 < tlen - 1; i2++) { + if (tables[i2] == 255 && tables[i2 + 1] == EOI2) break; + buff[boff++] = tables[i2]; + } + var byte1 = data[off], byte2 = data[off + 1]; + if (byte1 != 255 || byte2 != SOI) { + buff[boff++] = byte1; + buff[boff++] = byte2; + } + for (var i2 = 2; i2 < len; i2++) buff[boff++] = data[off + i2]; + } else for (var i2 = 0; i2 < len; i2++) buff[i2] = data[off + i2]; + if (img["t262"] == 32803) { + var bps = img["t258"][0], dcdr = new LosslessJpegDecoder(); + var out = dcdr.decode(buff), olen = out.length; + if (false) { + } else if (bps == 16) for (var i2 = 0; i2 < olen; i2++) { + tgt[toff++] = out[i2] & 255; + tgt[toff++] = out[i2] >>> 8; + } + else if (bps == 12) for (var i2 = 0; i2 < olen; i2 += 2) { + tgt[toff++] = out[i2] >>> 4; + tgt[toff++] = (out[i2] << 4 | out[i2 + 1] >>> 8) & 255; + tgt[toff++] = out[i2 + 1] & 255; + } + else throw new Error("unsupported bit depth " + bps); + } else { + var parser = new UTIF2.JpegDecoder(); + parser.parse(buff); + var decoded = parser.getData(parser.width, parser.height); + for (var i2 = 0; i2 < decoded.length; i2++) tgt[toff + i2] = decoded[i2]; + } + if (img["t262"][0] == 6) img["t262"][0] = 2; + }; + UTIF2.decode._decodeOldJPEGInit = function(img, data, off, len) { + var SOI = 216, EOI2 = 217, DQT = 219, DHT = 196, DRI = 221, SOF0 = 192, SOS2 = 218; + var joff = 0, soff = 0, tables, sosMarker2, isTiled = false, i2, j, k; + var jpgIchgFmt = img["t513"], jifoff = jpgIchgFmt ? jpgIchgFmt[0] : 0; + var jpgIchgFmtLen = img["t514"], jiflen = jpgIchgFmtLen ? jpgIchgFmtLen[0] : 0; + var soffTag = img["t324"] || img["t273"] || jpgIchgFmt; + var ycbcrss = img["t530"], ssx = 0, ssy = 0; + var spp = img["t277"] ? img["t277"][0] : 1; + var jpgresint = img["t515"]; + if (soffTag) { + soff = soffTag[0]; + isTiled = soffTag.length > 1; + } + if (!isTiled) { + if (data[off] == 255 && data[off + 1] == SOI) return { jpegOffset: off }; + if (jpgIchgFmt != null) { + if (data[off + jifoff] == 255 && data[off + jifoff + 1] == SOI) joff = off + jifoff; + else log("JPEGInterchangeFormat does not point to SOI"); + if (jpgIchgFmtLen == null) log("JPEGInterchangeFormatLength field is missing"); + else if (jifoff >= soff || jifoff + jiflen <= soff) log("JPEGInterchangeFormatLength field value is invalid"); + if (joff != null) return { jpegOffset: joff }; + } + } + if (ycbcrss != null) { + ssx = ycbcrss[0]; + ssy = ycbcrss[1]; + } + if (jpgIchgFmt != null) { + if (jpgIchgFmtLen != null) + if (jiflen >= 2 && jifoff + jiflen <= soff) { + if (data[off + jifoff + jiflen - 2] == 255 && data[off + jifoff + jiflen - 1] == SOI) tables = new Uint8Array(jiflen - 2); + else tables = new Uint8Array(jiflen); + for (i2 = 0; i2 < tables.length; i2++) tables[i2] = data[off + jifoff + i2]; + log("Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables"); + } else log("JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile"); + } + if (tables == null) { + var ooff = 0, out = []; + out[ooff++] = 255; + out[ooff++] = SOI; + var qtables = img["t519"]; + if (qtables == null) throw new Error("JPEGQTables tag is missing"); + for (i2 = 0; i2 < qtables.length; i2++) { + out[ooff++] = 255; + out[ooff++] = DQT; + out[ooff++] = 0; + out[ooff++] = 67; + out[ooff++] = i2; + for (j = 0; j < 64; j++) out[ooff++] = data[off + qtables[i2] + j]; + } + for (k = 0; k < 2; k++) { + var htables = img[k == 0 ? "t520" : "t521"]; + if (htables == null) throw new Error((k == 0 ? "JPEGDCTables" : "JPEGACTables") + " tag is missing"); + for (i2 = 0; i2 < htables.length; i2++) { + out[ooff++] = 255; + out[ooff++] = DHT; + var nc = 19; + for (j = 0; j < 16; j++) nc += data[off + htables[i2] + j]; + out[ooff++] = nc >>> 8; + out[ooff++] = nc & 255; + out[ooff++] = i2 | k << 4; + for (j = 0; j < 16; j++) out[ooff++] = data[off + htables[i2] + j]; + for (j = 0; j < nc; j++) out[ooff++] = data[off + htables[i2] + 16 + j]; + } + } + out[ooff++] = 255; + out[ooff++] = SOF0; + out[ooff++] = 0; + out[ooff++] = 8 + 3 * spp; + out[ooff++] = 8; + out[ooff++] = img.height >>> 8 & 255; + out[ooff++] = img.height & 255; + out[ooff++] = img.width >>> 8 & 255; + out[ooff++] = img.width & 255; + out[ooff++] = spp; + if (spp == 1) { + out[ooff++] = 1; + out[ooff++] = 17; + out[ooff++] = 0; + } else for (i2 = 0; i2 < 3; i2++) { + out[ooff++] = i2 + 1; + out[ooff++] = i2 != 0 ? 17 : (ssx & 15) << 4 | ssy & 15; + out[ooff++] = i2; + } + if (jpgresint != null && jpgresint[0] != 0) { + out[ooff++] = 255; + out[ooff++] = DRI; + out[ooff++] = 0; + out[ooff++] = 4; + out[ooff++] = jpgresint[0] >>> 8 & 255; + out[ooff++] = jpgresint[0] & 255; + } + tables = new Uint8Array(out); + } + var sofpos = -1; + i2 = 0; + while (i2 < tables.length - 1) { + if (tables[i2] == 255 && tables[i2 + 1] == SOF0) { + sofpos = i2; + break; + } + i2++; + } + if (sofpos == -1) { + var tmptab = new Uint8Array(tables.length + 10 + 3 * spp); + tmptab.set(tables); + var tmpoff = tables.length; + sofpos = tables.length; + tables = tmptab; + tables[tmpoff++] = 255; + tables[tmpoff++] = SOF0; + tables[tmpoff++] = 0; + tables[tmpoff++] = 8 + 3 * spp; + tables[tmpoff++] = 8; + tables[tmpoff++] = img.height >>> 8 & 255; + tables[tmpoff++] = img.height & 255; + tables[tmpoff++] = img.width >>> 8 & 255; + tables[tmpoff++] = img.width & 255; + tables[tmpoff++] = spp; + if (spp == 1) { + tables[tmpoff++] = 1; + tables[tmpoff++] = 17; + tables[tmpoff++] = 0; + } else for (i2 = 0; i2 < 3; i2++) { + tables[tmpoff++] = i2 + 1; + tables[tmpoff++] = i2 != 0 ? 17 : (ssx & 15) << 4 | ssy & 15; + tables[tmpoff++] = i2; + } + } + if (data[soff] == 255 && data[soff + 1] == SOS2) { + var soslen = data[soff + 2] << 8 | data[soff + 3]; + sosMarker2 = new Uint8Array(soslen + 2); + sosMarker2[0] = data[soff]; + sosMarker2[1] = data[soff + 1]; + sosMarker2[2] = data[soff + 2]; + sosMarker2[3] = data[soff + 3]; + for (i2 = 0; i2 < soslen - 2; i2++) sosMarker2[i2 + 4] = data[soff + i2 + 4]; + } else { + sosMarker2 = new Uint8Array(2 + 6 + 2 * spp); + var sosoff = 0; + sosMarker2[sosoff++] = 255; + sosMarker2[sosoff++] = SOS2; + sosMarker2[sosoff++] = 0; + sosMarker2[sosoff++] = 6 + 2 * spp; + sosMarker2[sosoff++] = spp; + if (spp == 1) { + sosMarker2[sosoff++] = 1; + sosMarker2[sosoff++] = 0; + } else for (i2 = 0; i2 < 3; i2++) { + sosMarker2[sosoff++] = i2 + 1; + sosMarker2[sosoff++] = i2 << 4 | i2; + } + sosMarker2[sosoff++] = 0; + sosMarker2[sosoff++] = 63; + sosMarker2[sosoff++] = 0; + } + return { jpegOffset: off, tables, sosMarker: sosMarker2, sofPosition: sofpos }; + }; + UTIF2.decode._decodeOldJPEG = function(img, data, off, len, tgt, toff) { + var i2, dlen, tlen, buff, buffoff; + var jpegData = UTIF2.decode._decodeOldJPEGInit(img, data, off, len); + if (jpegData.jpegOffset != null) { + dlen = off + len - jpegData.jpegOffset; + buff = new Uint8Array(dlen); + for (i2 = 0; i2 < dlen; i2++) buff[i2] = data[jpegData.jpegOffset + i2]; + } else { + tlen = jpegData.tables.length; + buff = new Uint8Array(tlen + jpegData.sosMarker.length + len + 2); + buff.set(jpegData.tables); + buffoff = tlen; + buff[jpegData.sofPosition + 5] = img.height >>> 8 & 255; + buff[jpegData.sofPosition + 6] = img.height & 255; + buff[jpegData.sofPosition + 7] = img.width >>> 8 & 255; + buff[jpegData.sofPosition + 8] = img.width & 255; + if (data[off] != 255 || data[off + 1] != SOS) { + buff.set(jpegData.sosMarker, bufoff); + bufoff += sosMarker.length; + } + for (i2 = 0; i2 < len; i2++) buff[bufoff++] = data[off + i2]; + buff[bufoff++] = 255; + buff[bufoff++] = EOI; + } + var parser = new UTIF2.JpegDecoder(); + parser.parse(buff); + var decoded = parser.getData(parser.width, parser.height); + for (var i2 = 0; i2 < decoded.length; i2++) tgt[toff + i2] = decoded[i2]; + if (img["t262"][0] == 6) img["t262"][0] = 2; + }; + UTIF2.decode._decodePackBits = function(data, off, len, tgt, toff) { + var sa = new Int8Array(data.buffer), ta = new Int8Array(tgt.buffer), lim = off + len; + while (off < lim) { + var n = sa[off]; + off++; + if (n >= 0 && n < 128) for (var i2 = 0; i2 < n + 1; i2++) { + ta[toff] = sa[off]; + toff++; + off++; + } + if (n >= -127 && n < 0) { + for (var i2 = 0; i2 < -n + 1; i2++) { + ta[toff] = sa[off]; + toff++; + } + off++; + } + } + }; + UTIF2.decode._decodeThunder = function(data, off, len, tgt, toff) { + var d2 = [0, 1, 0, -1], d3 = [0, 1, 2, 3, 0, -3, -2, -1]; + var lim = off + len, qoff = toff * 2, px = 0; + while (off < lim) { + var b = data[off], msk = b >>> 6, n = b & 63; + off++; + if (msk == 3) { + px = n & 15; + tgt[qoff >>> 1] |= px << 4 * (1 - qoff & 1); + qoff++; + } + if (msk == 0) for (var i2 = 0; i2 < n; i2++) { + tgt[qoff >>> 1] |= px << 4 * (1 - qoff & 1); + qoff++; + } + if (msk == 2) for (var i2 = 0; i2 < 2; i2++) { + var d = n >>> 3 * (1 - i2) & 7; + if (d != 4) { + px += d3[d]; + tgt[qoff >>> 1] |= px << 4 * (1 - qoff & 1); + qoff++; + } + } + if (msk == 1) for (var i2 = 0; i2 < 3; i2++) { + var d = n >>> 2 * (2 - i2) & 3; + if (d != 2) { + px += d2[d]; + tgt[qoff >>> 1] |= px << 4 * (1 - qoff & 1); + qoff++; + } + } + } + }; + UTIF2.decode._dmap = { "1": 0, "011": 1, "000011": 2, "0000011": 3, "010": -1, "000010": -2, "0000010": -3 }; + UTIF2.decode._lens = function() { + var addKeys = function(lens, arr2, i0, inc) { + for (var i2 = 0; i2 < arr2.length; i2++) lens[arr2[i2]] = i0 + i2 * inc; + }; + var termW = "00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100"; + var termB = "0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111"; + var makeW = "11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011"; + var makeB = "0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101"; + var makeA = "00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111"; + termW = termW.split(","); + termB = termB.split(","); + makeW = makeW.split(","); + makeB = makeB.split(","); + makeA = makeA.split(","); + var lensW = {}, lensB = {}; + addKeys(lensW, termW, 0, 1); + addKeys(lensW, makeW, 64, 64); + addKeys(lensW, makeA, 1792, 64); + addKeys(lensB, termB, 0, 1); + addKeys(lensB, makeB, 64, 64); + addKeys(lensB, makeA, 1792, 64); + return [lensW, lensB]; + }(); + UTIF2.decode._decodeG4 = function(data, off, slen, tgt, toff, w, fo) { + var U = UTIF2.decode, boff = off << 3, len = 0, wrd = ""; + var line = [], pline = []; + for (var i2 = 0; i2 < w; i2++) pline.push(0); + pline = U._makeDiff(pline); + var a0 = 0, a1 = 0, a2 = 0, b1 = 0, b2 = 0, clr = 0; + var y = 0, mode = "", toRead = 0; + var bipl = Math.ceil(w / 8) * 8; + while (boff >>> 3 < off + slen) { + b1 = U._findDiff(pline, a0 + (a0 == 0 ? 0 : 1), 1 - clr), b2 = U._findDiff(pline, b1, clr); + var bit = 0; + if (fo == 1) bit = data[boff >>> 3] >>> 7 - (boff & 7) & 1; + if (fo == 2) bit = data[boff >>> 3] >>> (boff & 7) & 1; + boff++; + wrd += bit; + if (mode == "H") { + if (U._lens[clr][wrd] != null) { + var dl = U._lens[clr][wrd]; + wrd = ""; + len += dl; + if (dl < 64) { + U._addNtimes(line, len, clr); + a0 += len; + clr = 1 - clr; + len = 0; + toRead--; + if (toRead == 0) mode = ""; + } + } + } else { + if (wrd == "0001") { + wrd = ""; + U._addNtimes(line, b2 - a0, clr); + a0 = b2; + } + if (wrd == "001") { + wrd = ""; + mode = "H"; + toRead = 2; + } + if (U._dmap[wrd] != null) { + a1 = b1 + U._dmap[wrd]; + U._addNtimes(line, a1 - a0, clr); + a0 = a1; + wrd = ""; + clr = 1 - clr; + } + } + if (line.length == w && mode == "") { + U._writeBits(line, tgt, toff * 8 + y * bipl); + clr = 0; + y++; + a0 = 0; + pline = U._makeDiff(line); + line = []; + } + } + }; + UTIF2.decode._findDiff = function(line, x, clr) { + for (var i2 = 0; i2 < line.length; i2 += 2) if (line[i2] >= x && line[i2 + 1] == clr) return line[i2]; + }; + UTIF2.decode._makeDiff = function(line) { + var out = []; + if (line[0] == 1) out.push(0, 1); + for (var i2 = 1; i2 < line.length; i2++) if (line[i2 - 1] != line[i2]) out.push(i2, line[i2]); + out.push(line.length, 0, line.length, 1); + return out; + }; + UTIF2.decode._decodeG3 = function(data, off, slen, tgt, toff, w, fo) { + var U = UTIF2.decode, boff = off << 3, len = 0, wrd = ""; + var line = [], pline = []; + for (var i2 = 0; i2 < w; i2++) line.push(0); + var a0 = 0, a1 = 0, a2 = 0, b1 = 0, b2 = 0, clr = 0; + var y = -1, mode = "", toRead = 0, is1D = false; + var bipl = Math.ceil(w / 8) * 8; + while (boff >>> 3 < off + slen) { + b1 = U._findDiff(pline, a0 + (a0 == 0 ? 0 : 1), 1 - clr), b2 = U._findDiff(pline, b1, clr); + var bit = 0; + if (fo == 1) bit = data[boff >>> 3] >>> 7 - (boff & 7) & 1; + if (fo == 2) bit = data[boff >>> 3] >>> (boff & 7) & 1; + boff++; + wrd += bit; + if (is1D) { + if (U._lens[clr][wrd] != null) { + var dl = U._lens[clr][wrd]; + wrd = ""; + len += dl; + if (dl < 64) { + U._addNtimes(line, len, clr); + clr = 1 - clr; + len = 0; + } + } + } else { + if (mode == "H") { + if (U._lens[clr][wrd] != null) { + var dl = U._lens[clr][wrd]; + wrd = ""; + len += dl; + if (dl < 64) { + U._addNtimes(line, len, clr); + a0 += len; + clr = 1 - clr; + len = 0; + toRead--; + if (toRead == 0) mode = ""; + } + } + } else { + if (wrd == "0001") { + wrd = ""; + U._addNtimes(line, b2 - a0, clr); + a0 = b2; + } + if (wrd == "001") { + wrd = ""; + mode = "H"; + toRead = 2; + } + if (U._dmap[wrd] != null) { + a1 = b1 + U._dmap[wrd]; + U._addNtimes(line, a1 - a0, clr); + a0 = a1; + wrd = ""; + clr = 1 - clr; + } + } + } + if (wrd.endsWith("000000000001")) { + if (y >= 0) U._writeBits(line, tgt, toff * 8 + y * bipl); + if (fo == 1) is1D = (data[boff >>> 3] >>> 7 - (boff & 7) & 1) == 1; + if (fo == 2) is1D = (data[boff >>> 3] >>> (boff & 7) & 1) == 1; + boff++; + if (U._decodeG3.allow2D == null) U._decodeG3.allow2D = is1D; + if (!U._decodeG3.allow2D) { + is1D = true; + boff--; + } + wrd = ""; + clr = 0; + y++; + a0 = 0; + pline = U._makeDiff(line); + line = []; + } + } + if (line.length == w) U._writeBits(line, tgt, toff * 8 + y * bipl); + }; + UTIF2.decode._addNtimes = function(arr2, n, val) { + for (var i2 = 0; i2 < n; i2++) arr2.push(val); + }; + UTIF2.decode._writeBits = function(bits, tgt, boff) { + for (var i2 = 0; i2 < bits.length; i2++) tgt[boff + i2 >>> 3] |= bits[i2] << 7 - (boff + i2 & 7); + }; + UTIF2.decode._decodeLZW = function(data, off, tgt, toff) { + if (UTIF2.decode._lzwTab == null) { + var tb = new Uint32Array(65535), tn = new Uint16Array(65535), chr = new Uint8Array(2e6); + for (var i2 = 0; i2 < 256; i2++) { + chr[i2 << 2] = i2; + tb[i2] = i2 << 2; + tn[i2] = 1; + } + UTIF2.decode._lzwTab = [tb, tn, chr]; + } + var copy = UTIF2.decode._copyData; + var tab = UTIF2.decode._lzwTab[0], tln = UTIF2.decode._lzwTab[1], chr = UTIF2.decode._lzwTab[2], totl = 258, chrl = 258 << 2; + var bits = 9, boff = off << 3; + var ClearCode = 256, EoiCode = 257; + var v = 0, Code = 0, OldCode = 0; + while (true) { + v = data[boff >>> 3] << 16 | data[boff + 8 >>> 3] << 8 | data[boff + 16 >>> 3]; + Code = v >> 24 - (boff & 7) - bits & (1 << bits) - 1; + boff += bits; + if (Code == EoiCode) break; + if (Code == ClearCode) { + bits = 9; + totl = 258; + chrl = 258 << 2; + v = data[boff >>> 3] << 16 | data[boff + 8 >>> 3] << 8 | data[boff + 16 >>> 3]; + Code = v >> 24 - (boff & 7) - bits & (1 << bits) - 1; + boff += bits; + if (Code == EoiCode) break; + tgt[toff] = Code; + toff++; + } else if (Code < totl) { + var cd = tab[Code], cl = tln[Code]; + copy(chr, cd, tgt, toff, cl); + toff += cl; + if (OldCode >= totl) { + tab[totl] = chrl; + chr[tab[totl]] = cd[0]; + tln[totl] = 1; + chrl = chrl + 1 + 3 & ~3; + totl++; + } else { + tab[totl] = chrl; + var nit = tab[OldCode], nil = tln[OldCode]; + copy(chr, nit, chr, chrl, nil); + chr[chrl + nil] = chr[cd]; + nil++; + tln[totl] = nil; + totl++; + chrl = chrl + nil + 3 & ~3; + } + if (totl + 1 == 1 << bits) bits++; + } else { + if (OldCode >= totl) { + tab[totl] = chrl; + tln[totl] = 0; + totl++; + } else { + tab[totl] = chrl; + var nit = tab[OldCode], nil = tln[OldCode]; + copy(chr, nit, chr, chrl, nil); + chr[chrl + nil] = chr[chrl]; + nil++; + tln[totl] = nil; + totl++; + copy(chr, chrl, tgt, toff, nil); + toff += nil; + chrl = chrl + nil + 3 & ~3; + } + if (totl + 1 == 1 << bits) bits++; + } + OldCode = Code; + } + }; + UTIF2.decode._copyData = function(s, so, t, to, l) { + for (var i2 = 0; i2 < l; i2 += 4) { + t[to + i2] = s[so + i2]; + t[to + i2 + 1] = s[so + i2 + 1]; + t[to + i2 + 2] = s[so + i2 + 2]; + t[to + i2 + 3] = s[so + i2 + 3]; + } + }; + UTIF2.tags = { + 254: "NewSubfileType", + 255: "SubfileType", + 256: "ImageWidth", + 257: "ImageLength", + 258: "BitsPerSample", + 259: "Compression", + 262: "PhotometricInterpretation", + 266: "FillOrder", + 269: "DocumentName", + 270: "ImageDescription", + 271: "Make", + 272: "Model", + 273: "StripOffset", + 274: "Orientation", + 277: "SamplesPerPixel", + 278: "RowsPerStrip", + 279: "StripByteCounts", + 280: "MinSampleValue", + 281: "MaxSampleValue", + 282: "XResolution", + 283: "YResolution", + 284: "PlanarConfiguration", + 285: "PageName", + 286: "XPosition", + 287: "YPosition", + 292: "T4Options", + 296: "ResolutionUnit", + 297: "PageNumber", + 305: "Software", + 306: "DateTime", + 315: "Artist", + 316: "HostComputer", + 317: "Predictor", + 318: "WhitePoint", + 319: "PrimaryChromaticities", + 320: "ColorMap", + 321: "HalftoneHints", + 322: "TileWidth", + 323: "TileLength", + 324: "TileOffset", + 325: "TileByteCounts", + 330: "SubIFDs", + 336: "DotRange", + 338: "ExtraSample", + 339: "SampleFormat", + 347: "JPEGTables", + 512: "JPEGProc", + 513: "JPEGInterchangeFormat", + 514: "JPEGInterchangeFormatLength", + 519: "JPEGQTables", + 520: "JPEGDCTables", + 521: "JPEGACTables", + 529: "YCbCrCoefficients", + 530: "YCbCrSubSampling", + 531: "YCbCrPositioning", + 532: "ReferenceBlackWhite", + 700: "XMP", + 33421: "CFARepeatPatternDim", + 33422: "CFAPattern", + 33432: "Copyright", + 33434: "ExposureTime", + 33437: "FNumber", + 33723: "IPTC/NAA", + 34377: "Photoshop", + 34665: "ExifIFD", + 34675: "ICC Profile", + 34850: "ExposureProgram", + 34853: "GPSInfo", + 34855: "ISOSpeedRatings", + 34858: "TimeZoneOffset", + 34859: "SelfTimeMode", + 36867: "DateTimeOriginal", + 36868: "DateTimeDigitized", + 37377: "ShutterSpeedValue", + 37378: "ApertureValue", + 37380: "ExposureBiasValue", + 37383: "MeteringMode", + 37385: "Flash", + 37386: "FocalLength", + 37390: "FocalPlaneXResolution", + 37391: "FocalPlaneYResolution", + 37392: "FocalPlaneResolutionUnit", + 37393: "ImageNumber", + 37398: "TIFF/EPStandardID", + 37399: "SensingMethod", + 37500: "MakerNote", + 37510: "UserComment", + 37724: "ImageSourceData", + 40092: "XPComment", + 40094: "XPKeywords", + 40961: "ColorSpace", + 40962: "PixelXDimension", + 40963: "PixelXDimension", + 41486: "FocalPlaneXResolution", + 41487: "FocalPlaneYResolution", + 41488: "FocalPlaneResolutionUnit", + 41985: "CustomRendered", + 41986: "ExposureMode", + 41987: "WhiteBalance", + 41990: "SceneCaptureType", + 50706: "DNGVersion", + 50707: "DNGBackwardVersion", + 50708: "UniqueCameraModel", + 50709: "LocalizedCameraModel", + 50710: "CFAPlaneColor", + 50711: "CFALayout", + 50712: "LinearizationTable", + 50713: "BlackLevelRepeatDim", + 50714: "BlackLevel", + 50716: "BlackLevelDeltaV", + 50717: "WhiteLevel", + 50718: "DefaultScale", + 50719: "DefaultCropOrigin", + 50720: "DefaultCropSize", + 50733: "BayerGreenSplit", + 50738: "AntiAliasStrength", + 50721: "ColorMatrix1", + 50722: "ColorMatrix2", + 50723: "CameraCalibration1", + 50724: "CameraCalibration2", + 50727: "AnalogBalance", + 50728: "AsShotNeutral", + 50730: "BaselineExposure", + 50731: "BaselineNoise", + 50732: "BaselineSharpness", + 50734: "LinearResponseLimit", + 50735: "CameraSerialNumber", + 50736: "LensInfo", + 50739: "ShadowScale", + 50740: "DNGPrivateData", + 50741: "MakerNoteSafety", + 50778: "CalibrationIlluminant1", + 50779: "CalibrationIlluminant2", + 50780: "BestQualityScale", + 50781: "RawDataUniqueID", + 50827: "OriginalRawFileName", + 50829: "ActiveArea", + 50830: "MaskedAreas", + 50931: "CameraCalibrationSignature", + 50932: "ProfileCalibrationSignature", + 50935: "NoiseReductionApplied", + 50936: "ProfileName", + 50937: "ProfileHueSatMapDims", + 50938: "ProfileHueSatMapData1", + 50939: "ProfileHueSatMapData2", + 50940: "ProfileToneCurve", + 50941: "ProfileEmbedPolicy", + 50942: "ProfileCopyright", + 50964: "ForwardMatrix1", + 50965: "ForwardMatrix2", + 50966: "PreviewApplicationName", + 50967: "PreviewApplicationVersion", + 50969: "PreviewSettingsDigest", + 50970: "PreviewColorSpace", + 50971: "PreviewDateTime", + 50972: "RawImageDigest", + 51008: "OpcodeList1", + 51009: "OpcodeList2", + 51022: "OpcodeList3", + 51041: "NoiseProfile", + 51089: "OriginalDefaultFinalSize", + 51090: "OriginalBestQualityFinalSize", + 51091: "OriginalDefaultCropSize", + 51125: "DefaultUserCrop" + }; + UTIF2.ttypes = { 256: 3, 257: 3, 258: 3, 259: 3, 262: 3, 273: 4, 274: 3, 277: 3, 278: 4, 279: 4, 282: 5, 283: 5, 284: 3, 286: 5, 287: 5, 296: 3, 305: 2, 306: 2, 338: 3, 513: 4, 514: 4, 34665: 4 }; + UTIF2._readIFD = function(bin, data, offset2, ifds) { + var cnt = bin.readUshort(data, offset2); + offset2 += 2; + var ifd = {}; + ifds.push(ifd); + for (var i2 = 0; i2 < cnt; i2++) { + var tag = bin.readUshort(data, offset2); + offset2 += 2; + var type = bin.readUshort(data, offset2); + offset2 += 2; + var num = bin.readUint(data, offset2); + offset2 += 4; + var voff = bin.readUint(data, offset2); + offset2 += 4; + var arr2 = []; + ifd["t" + tag] = arr2; + if (type == 1 || type == 7) { + for (var j = 0; j < num; j++) arr2.push(data[(num < 5 ? offset2 - 4 : voff) + j]); + } + if (type == 2) { + arr2.push(bin.readASCII(data, num < 5 ? offset2 - 4 : voff, num - 1)); + } + if (type == 3) { + for (var j = 0; j < num; j++) arr2.push(bin.readUshort(data, (num < 3 ? offset2 - 4 : voff) + 2 * j)); + } + if (type == 4) { + for (var j = 0; j < num; j++) arr2.push(bin.readUint(data, (num < 2 ? offset2 - 4 : voff) + 4 * j)); + } + if (type == 5) { + for (var j = 0; j < num; j++) arr2.push(bin.readUint(data, voff + j * 8) / bin.readUint(data, voff + j * 8 + 4)); + } + if (type == 8) { + for (var j = 0; j < num; j++) arr2.push(bin.readShort(data, (num < 3 ? offset2 - 4 : voff) + 2 * j)); + } + if (type == 9) { + for (var j = 0; j < num; j++) arr2.push(bin.readInt(data, (num < 2 ? offset2 - 4 : voff) + 4 * j)); + } + if (type == 10) { + for (var j = 0; j < num; j++) arr2.push(bin.readInt(data, voff + j * 8) / bin.readInt(data, voff + j * 8 + 4)); + } + if (type == 11) { + for (var j = 0; j < num; j++) arr2.push(bin.readFloat(data, voff + j * 4)); + } + if (type == 12) { + for (var j = 0; j < num; j++) arr2.push(bin.readDouble(data, voff + j * 8)); + } + if (num != 0 && arr2.length == 0) log("unknown TIFF tag type: ", type, "num:", num); + if (tag == 330) for (var j = 0; j < num; j++) UTIF2._readIFD(bin, data, arr2[j], ifds); + } + return offset2; + }; + UTIF2._writeIFD = function(bin, data, offset2, ifd) { + var keys = Object.keys(ifd); + bin.writeUshort(data, offset2, keys.length); + offset2 += 2; + var eoff = offset2 + keys.length * 12 + 4; + for (var ki = 0; ki < keys.length; ki++) { + var key = keys[ki]; + var tag = parseInt(key.slice(1)), type = UTIF2.ttypes[tag]; + if (type == null) throw new Error("unknown type of tag: " + tag); + var val = ifd[key]; + if (type == 2) val = val[0] + "\0"; + var num = val.length; + bin.writeUshort(data, offset2, tag); + offset2 += 2; + bin.writeUshort(data, offset2, type); + offset2 += 2; + bin.writeUint(data, offset2, num); + offset2 += 4; + var dlen = [-1, 1, 1, 2, 4, 8, 0, 0, 0, 0, 0, 0, 8][type] * num; + var toff = offset2; + if (dlen > 4) { + bin.writeUint(data, offset2, eoff); + toff = eoff; + } + if (type == 2) { + bin.writeASCII(data, toff, val); + } + if (type == 3) { + for (var i2 = 0; i2 < num; i2++) bin.writeUshort(data, toff + 2 * i2, val[i2]); + } + if (type == 4) { + for (var i2 = 0; i2 < num; i2++) bin.writeUint(data, toff + 4 * i2, val[i2]); + } + if (type == 5) { + for (var i2 = 0; i2 < num; i2++) { + bin.writeUint(data, toff + 8 * i2, Math.round(val[i2] * 1e4)); + bin.writeUint(data, toff + 8 * i2 + 4, 1e4); + } + } + if (type == 12) { + for (var i2 = 0; i2 < num; i2++) bin.writeDouble(data, toff + 8 * i2, val[i2]); + } + if (dlen > 4) { + dlen += dlen & 1; + eoff += dlen; + } + offset2 += 4; + } + return [offset2, eoff]; + }; + UTIF2.toRGBA8 = function(out) { + var w = out.width, h = out.height, area = w * h, qarea = area * 4, data = out.data; + var img = new Uint8Array(area * 4); + var intp = out["t262"][0], bps = out["t258"] ? Math.min(32, out["t258"][0]) : 1, isLE = out.isLE ? 1 : 0; + if (false) { + } else if (intp == 0) { + var bpl = Math.ceil(bps * w / 8); + for (var y = 0; y < h; y++) { + var off = y * bpl, io = y * w; + if (bps == 1) for (var i2 = 0; i2 < w; i2++) { + var qi = io + i2 << 2, px = data[off + (i2 >> 3)] >> 7 - (i2 & 7) & 1; + img[qi] = img[qi + 1] = img[qi + 2] = (1 - px) * 255; + img[qi + 3] = 255; + } + if (bps == 4) for (var i2 = 0; i2 < w; i2++) { + var qi = io + i2 << 2, px = data[off + (i2 >> 1)] >> 4 - 4 * (i2 & 1) & 15; + img[qi] = img[qi + 1] = img[qi + 2] = (15 - px) * 17; + img[qi + 3] = 255; + } + if (bps == 8) for (var i2 = 0; i2 < w; i2++) { + var qi = io + i2 << 2, px = data[off + i2]; + img[qi] = img[qi + 1] = img[qi + 2] = 255 - px; + img[qi + 3] = 255; + } + } + } else if (intp == 1) { + var bpl = Math.ceil(bps * w / 8); + for (var y = 0; y < h; y++) { + var off = y * bpl, io = y * w; + if (bps == 1) for (var i2 = 0; i2 < w; i2++) { + var qi = io + i2 << 2, px = data[off + (i2 >> 3)] >> 7 - (i2 & 7) & 1; + img[qi] = img[qi + 1] = img[qi + 2] = px * 255; + img[qi + 3] = 255; + } + if (bps == 2) for (var i2 = 0; i2 < w; i2++) { + var qi = io + i2 << 2, px = data[off + (i2 >> 2)] >> 6 - 2 * (i2 & 3) & 3; + img[qi] = img[qi + 1] = img[qi + 2] = px * 85; + img[qi + 3] = 255; + } + if (bps == 8) for (var i2 = 0; i2 < w; i2++) { + var qi = io + i2 << 2, px = data[off + i2]; + img[qi] = img[qi + 1] = img[qi + 2] = px; + img[qi + 3] = 255; + } + if (bps == 16) for (var i2 = 0; i2 < w; i2++) { + var qi = io + i2 << 2, px = data[off + (2 * i2 + isLE)]; + img[qi] = img[qi + 1] = img[qi + 2] = Math.min(255, px); + img[qi + 3] = 255; + } + } + } else if (intp == 2) { + if (bps == 8) { + if (out["t338"]) { + if (out["t338"][0] > 0) for (var i2 = 0; i2 < qarea; i2++) img[i2] = data[i2]; + else for (var i2 = 0; i2 < qarea; i2 += 4) { + img[i2] = data[i2]; + img[i2 + 1] = data[i2 + 1]; + img[i2 + 2] = data[i2 + 2]; + img[i2 + 3] = 255; + } + } else { + var smpls = out["t258"] ? out["t258"].length : 3; + if (smpls == 4) for (var i2 = 0; i2 < qarea; i2++) img[i2] = data[i2]; + if (smpls == 3) for (var i2 = 0; i2 < area; i2++) { + var qi = i2 << 2, ti = i2 * 3; + img[qi] = data[ti]; + img[qi + 1] = data[ti + 1]; + img[qi + 2] = data[ti + 2]; + img[qi + 3] = 255; + } + } + } else + for (var i2 = 0; i2 < area; i2++) { + var qi = i2 << 2, ti = i2 * 6; + img[qi] = data[ti]; + img[qi + 1] = data[ti + 2]; + img[qi + 2] = data[ti + 4]; + img[qi + 3] = 255; + } + } else if (intp == 3) { + var map = out["t320"]; + for (var i2 = 0; i2 < area; i2++) { + var qi = i2 << 2, mi = data[i2]; + img[qi] = map[mi] >> 8; + img[qi + 1] = map[256 + mi] >> 8; + img[qi + 2] = map[512 + mi] >> 8; + img[qi + 3] = 255; + } + } else if (intp == 5) { + var smpls = out["t258"] ? out["t258"].length : 4; + var gotAlpha = smpls > 4 ? 1 : 0; + for (var i2 = 0; i2 < area; i2++) { + var qi = i2 << 2, si = i2 * smpls; + var C = 255 - data[si], M2 = 255 - data[si + 1], Y = 255 - data[si + 2], K = (255 - data[si + 3]) * (1 / 255); + img[qi] = ~~(C * K + 0.5); + img[qi + 1] = ~~(M2 * K + 0.5); + img[qi + 2] = ~~(Y * K + 0.5); + img[qi + 3] = 255 * (1 - gotAlpha) + data[si + 4] * gotAlpha; + } + } else log("Unknown Photometric interpretation: " + intp); + return img; + }; + UTIF2.replaceIMG = function() { + var imgs = document.getElementsByTagName("img"); + for (var i2 = 0; i2 < imgs.length; i2++) { + var img = imgs[i2], src = img.getAttribute("src"); + if (src == null) continue; + var suff = src.split(".").pop().toLowerCase(); + if (suff != "tif" && suff != "tiff") continue; + var xhr = new XMLHttpRequest(); + UTIF2._xhrs.push(xhr); + UTIF2._imgs.push(img); + xhr.open("GET", src); + xhr.responseType = "arraybuffer"; + xhr.onload = UTIF2._imgLoaded; + xhr.send(); + } + }; + UTIF2._xhrs = []; + UTIF2._imgs = []; + UTIF2._imgLoaded = function(e) { + var buff = e.target.response; + var ifds = UTIF2.decode(buff), page = ifds[0]; + UTIF2.decodeImages(buff, ifds); + var rgba = UTIF2.toRGBA8(page), w = page.width, h = page.height; + var ind = UTIF2._xhrs.indexOf(e.target), img = UTIF2._imgs[ind]; + UTIF2._xhrs.splice(ind, 1); + UTIF2._imgs.splice(ind, 1); + var cnv = document.createElement("canvas"); + cnv.width = w; + cnv.height = h; + var ctx = cnv.getContext("2d"), imgd = ctx.createImageData(w, h); + for (var i2 = 0; i2 < rgba.length; i2++) imgd.data[i2] = rgba[i2]; + ctx.putImageData(imgd, 0, 0); + var attr = ["style", "class", "id"]; + for (var i2 = 0; i2 < attr.length; i2++) cnv.setAttribute(attr[i2], img.getAttribute(attr[i2])); + img.parentNode.replaceChild(cnv, img); + }; + UTIF2._binBE = { + nextZero: function(data, o) { + while (data[o] != 0) o++; + return o; + }, + readUshort: function(buff, p) { + return buff[p] << 8 | buff[p + 1]; + }, + readShort: function(buff, p) { + var a = UTIF2._binBE.ui8; + a[0] = buff[p + 1]; + a[1] = buff[p + 0]; + return UTIF2._binBE.i16[0]; + }, + readInt: function(buff, p) { + var a = UTIF2._binBE.ui8; + a[0] = buff[p + 3]; + a[1] = buff[p + 2]; + a[2] = buff[p + 1]; + a[3] = buff[p + 0]; + return UTIF2._binBE.i32[0]; + }, + readUint: function(buff, p) { + var a = UTIF2._binBE.ui8; + a[0] = buff[p + 3]; + a[1] = buff[p + 2]; + a[2] = buff[p + 1]; + a[3] = buff[p + 0]; + return UTIF2._binBE.ui32[0]; + }, + readASCII: function(buff, p, l) { + var s = ""; + for (var i2 = 0; i2 < l; i2++) s += String.fromCharCode(buff[p + i2]); + return s; + }, + readFloat: function(buff, p) { + var a = UTIF2._binBE.ui8; + for (var i2 = 0; i2 < 4; i2++) a[i2] = buff[p + 3 - i2]; + return UTIF2._binBE.fl32[0]; + }, + readDouble: function(buff, p) { + var a = UTIF2._binBE.ui8; + for (var i2 = 0; i2 < 8; i2++) a[i2] = buff[p + 7 - i2]; + return UTIF2._binBE.fl64[0]; + }, + writeUshort: function(buff, p, n) { + buff[p] = n >> 8 & 255; + buff[p + 1] = n & 255; + }, + writeUint: function(buff, p, n) { + buff[p] = n >> 24 & 255; + buff[p + 1] = n >> 16 & 255; + buff[p + 2] = n >> 8 & 255; + buff[p + 3] = n >> 0 & 255; + }, + writeASCII: function(buff, p, s) { + for (var i2 = 0; i2 < s.length; i2++) buff[p + i2] = s.charCodeAt(i2); + }, + writeDouble: function(buff, p, n) { + UTIF2._binBE.fl64[0] = n; + for (var i2 = 0; i2 < 8; i2++) buff[p + i2] = UTIF2._binBE.ui8[7 - i2]; + } + }; + UTIF2._binBE.ui8 = new Uint8Array(8); + UTIF2._binBE.i16 = new Int16Array(UTIF2._binBE.ui8.buffer); + UTIF2._binBE.i32 = new Int32Array(UTIF2._binBE.ui8.buffer); + UTIF2._binBE.ui32 = new Uint32Array(UTIF2._binBE.ui8.buffer); + UTIF2._binBE.fl32 = new Float32Array(UTIF2._binBE.ui8.buffer); + UTIF2._binBE.fl64 = new Float64Array(UTIF2._binBE.ui8.buffer); + UTIF2._binLE = { + nextZero: UTIF2._binBE.nextZero, + readUshort: function(buff, p) { + return buff[p + 1] << 8 | buff[p]; + }, + readShort: function(buff, p) { + var a = UTIF2._binBE.ui8; + a[0] = buff[p + 0]; + a[1] = buff[p + 1]; + return UTIF2._binBE.i16[0]; + }, + readInt: function(buff, p) { + var a = UTIF2._binBE.ui8; + a[0] = buff[p + 0]; + a[1] = buff[p + 1]; + a[2] = buff[p + 2]; + a[3] = buff[p + 3]; + return UTIF2._binBE.i32[0]; + }, + readUint: function(buff, p) { + var a = UTIF2._binBE.ui8; + a[0] = buff[p + 0]; + a[1] = buff[p + 1]; + a[2] = buff[p + 2]; + a[3] = buff[p + 3]; + return UTIF2._binBE.ui32[0]; + }, + readASCII: UTIF2._binBE.readASCII, + readFloat: function(buff, p) { + var a = UTIF2._binBE.ui8; + for (var i2 = 0; i2 < 4; i2++) a[i2] = buff[p + i2]; + return UTIF2._binBE.fl32[0]; + }, + readDouble: function(buff, p) { + var a = UTIF2._binBE.ui8; + for (var i2 = 0; i2 < 8; i2++) a[i2] = buff[p + i2]; + return UTIF2._binBE.fl64[0]; + } + }; + UTIF2._copyTile = function(tb, tw, th, b, w, h, xoff, yoff) { + var xlim = Math.min(tw, w - xoff); + var ylim = Math.min(th, h - yoff); + for (var y = 0; y < ylim; y++) { + var tof = (yoff + y) * w + xoff; + var sof = y * tw; + for (var x = 0; x < xlim; x++) b[tof + x] = tb[sof + x]; + } + }; + })(UTIF, pako); + })(); + } +}); + +// node_modules/image-decode/tiff.js +var require_tiff = __commonJS({ + "node_modules/image-decode/tiff.js"(exports2, module2) { + "use strict"; + var UTIF = require_UTIF(); + module2.exports = function decode(data, o) { + var ifds = UTIF.decode(data); + UTIF.decodeImages(data, ifds); + var rgba = UTIF.toRGBA8(ifds[0]); + return { + data: rgba, + height: ifds[0].height, + width: ifds[0].width + }; + }; + } +}); + +// node_modules/image-decode/webp.js +var require_webp = __commonJS({ + "node_modules/image-decode/webp.js"(exports2, module2) { + "use strict"; + module2.exports = function decode(data, o) { + }; + } +}); + +// node_modules/image-decode/index.js +var require_image_decode = __commonJS({ + "node_modules/image-decode/index.js"(exports2, module2) { + "use strict"; + var detectType = require_image_type(); + var toab = require_to_array_buffer(); + module2.exports = decode; + function decode(data, o) { + data = toab(data); + if (!data) return null; + if (!o) o = {}; + else if (typeof o === "string") o = { type: o }; + var type = o.type; + if (!type) { + type = detectType(new Uint8Array(data)); + if (!type) return null; + type = type.mime; + if (!decode[type]) throw Error("Type `" + type + "` does not seem to be supported"); + } + return decode[type](data, o); + } + decode["png"] = decode["image/png"] = require_png2(); + decode["gif"] = decode["image/gif"] = require_gif(), decode["image/jpeg"] = decode["image/jpg"] = decode["jpg"] = decode["jpeg"] = require_jpg(); + decode["bmp"] = decode["image/bmp"] = decode["image/bitmap"] = require_bmp(); + decode["tiff"] = decode["image/tiff"] = require_tiff(); + decode["webp"] = decode["image/webp"] = require_webp(); + } +}); + +// node_modules/image-pixels/lib/raw.js +var require_raw = __commonJS({ + "node_modules/image-pixels/lib/raw.js"(exports2, module2) { + "use strict"; + var clipPixels = require_clip_pixels(); + var cache = require_cache3(); + var decode = require_image_decode(); + module2.exports = loadRaw; + function loadRaw(data, o) { + var width = o.shape[0], height = o.shape[1]; + var clip = o.clip; + var type = o.type; + var decodedData = decode(data, type); + if (!decodedData) { + if (!width || !height) throw new Error("Raw data requires options.width and options.height"); + } else { + data = decodedData.data; + width = decodedData.width; + height = decodedData.height; + } + var pixels2 = { + // in order to avoid copying + data: data.slice(), + width, + height + }; + if (clip.x || clip.y || clip.width && clip.width !== pixels2.width || clip.height && clip.height !== pixels2.height) { + pixels2.data = new Uint8Array(clipPixels(data, [width, height], [clip.x, clip.y, clip.width, clip.height])); + pixels2.width = clip.width || width; + pixels2.height = clip.height || height; + } + if (o.cache) cache.set(o.cache, pixels2); + return Promise.resolve(pixels2); + } + } +}); + +// node_modules/flip-pixels/index.js +var require_flip_pixels = __commonJS({ + "node_modules/flip-pixels/index.js"(exports2, module2) { + "use strict"; + module2.exports = function flip(pixels2, w, h, c) { + if (Array.isArray(pixels2)) { + var result = flip(new Float64Array(pixels2), w, h, c); + for (var i2 = 0; i2 < pixels2.length; i2++) { + pixels2[i2] = result[i2]; + } + return pixels2; + } + if (!w || !h) throw Error("Bad dimensions"); + if (!c) c = pixels2.length / (w * h); + var h2 = h >> 1; + var row = w * c; + var Ctor = pixels2.constructor; + var temp = new Ctor(w * c); + for (var y = 0; y < h2; ++y) { + var topOffset = y * row; + var bottomOffset = (h - y - 1) * row; + temp.set(pixels2.subarray(topOffset, topOffset + row)); + pixels2.copyWithin(topOffset, bottomOffset, bottomOffset + row); + pixels2.set(temp, bottomOffset); + } + return pixels2; + }; + } +}); + +// node_modules/image-pixels/lib/gl.js +var require_gl = __commonJS({ + "node_modules/image-pixels/lib/gl.js"(exports2, module2) { + "use strict"; + var isBrowser = require_server(); + var flipData = require_flip_pixels(); + var clipData = require_clip_pixels(); + var canvas2; + var ctx; + module2.exports = function read(gl, o) { + var width = o.shape[0], height = o.shape[1]; + var clip = o.clip; + if (isBrowser && gl.canvas) { + if (!ctx) { + canvas2 = document.createElement("canvas"); + ctx = canvas2.getContext("2d"); + } + canvas2.width = gl.drawingBufferWidth; + canvas2.height = gl.drawingBufferHeight; + ctx.drawImage(gl.canvas, 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + var result = ctx.getImageData(clip.x, clip.y, clip.width || width, clip.height || height); + return result; + } + var pixels2 = new Uint8Array(gl.drawingBufferWidth * gl.drawingBufferHeight * 4); + gl.readPixels(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight, gl.RGBA, gl.UNSIGNED_BYTE, pixels2); + var result = {}; + result.width = gl.drawingBufferWidth; + result.height = gl.drawingBufferHeight; + pixels2 = flipData(pixels2, result.width, result.height); + result.data = pixels2; + if (clip.x || clip.y || clip.width && clip.width !== result.width || clip.height && clip.height !== result.height) { + pixels2 = new Uint8Array(clipData(pixels2, [result.width, result.height], [clip.x, clip.y, clip.width, clip.height])); + result.data = pixels2; + result.width = clip.width; + result.height = clip.height; + } + return Promise.resolve(result); + }; + } +}); + +// node_modules/is-float-array/index.js +var require_is_float_array = __commonJS({ + "node_modules/is-float-array/index.js"(exports2, module2) { + "use strict"; + module2.exports = function isFloatArray(arr2) { + if (!arr2 || arr2.length == null) return false; + if (Array.isArray(arr2) || arr2 instanceof Float64Array || arr2 instanceof Float32Array) return true; + return false; + }; + } +}); + +// node_modules/clamp/index.js +var require_clamp = __commonJS({ + "node_modules/clamp/index.js"(exports2, module2) { + module2.exports = clamp; + function clamp(value, min, max) { + return min < max ? value < min ? min : value > max ? max : value : value < max ? max : value > min ? min : value; + } + } +}); + +// node_modules/arr-flatten/index.js +var require_arr_flatten = __commonJS({ + "node_modules/arr-flatten/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(arr2) { + return flat(arr2, []); + }; + function flat(arr2, res) { + var i2 = 0, cur; + var len = arr2.length; + for (; i2 < len; i2++) { + cur = arr2[i2]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; + } + } +}); + +// node_modules/to-uint8/index.js +var require_to_uint8 = __commonJS({ + "node_modules/to-uint8/index.js"(exports2, module2) { + "use strict"; + var toab = require_to_array_buffer(); + var isFloat = require_is_float_array(); + var clamp = require_clamp(); + var flat = require_arr_flatten(); + var isBase64 = require_is_base64(); + module2.exports = function tou8(src, detectFloat) { + if (!src) return null; + if (src.data) src = src.data; + if (src instanceof Uint8Array) return src; + if (src instanceof Uint8ClampedArray) return new Uint8Array(src.buffer); + if (detectFloat == null) detectFloat = true; + if (Array.isArray(src)) { + for (var i2 = 0; i2 < src.length; i2++) { + if (src[i2] && src[i2].length != null) { + src = flat(src); + break; + } + } + } + if (isFloat(src)) { + if (detectFloat) { + for (var i2 = 0; i2 < src.length; i2++) { + if (src[i2] > 1 || src[i2] < 0) { + return uninfinite(new Uint8Array(src), src); + } + } + } + var pixels2 = new Uint8Array(src.length); + for (var i2 = 0; i2 < src.length; i2++) { + pixels2[i2] = clamp(src[i2], 0, 1) * 255; + } + return uninfinite(pixels2, src); + } + if (src.length != null && typeof src !== "string") { + return uninfinite(new Uint8Array(src), src); + } + var buf = toab(src); + if (!buf) return null; + return uninfinite(new Uint8Array(buf), src); + }; + function uninfinite(u, src) { + for (var i2 = 0; i2 < src.length; i2++) { + if (src[i2] === Infinity) u[i2] = 255; + } + return u; + } + } +}); + +// node_modules/validate.io-number/lib/index.js +var require_lib6 = __commonJS({ + "node_modules/validate.io-number/lib/index.js"(exports2, module2) { + "use strict"; + function isNumber(value) { + return (typeof value === "number" || Object.prototype.toString.call(value) === "[object Number]") && value.valueOf() === value.valueOf(); + } + module2.exports = isNumber; + } +}); + +// node_modules/validate.io-integer/lib/index.js +var require_lib7 = __commonJS({ + "node_modules/validate.io-integer/lib/index.js"(exports2, module2) { + "use strict"; + var isNumber = require_lib6(); + function isInteger(value) { + return isNumber(value) && value % 1 === 0; + } + module2.exports = isInteger; + } +}); + +// node_modules/validate.io-positive-integer/lib/index.js +var require_lib8 = __commonJS({ + "node_modules/validate.io-positive-integer/lib/index.js"(exports2, module2) { + "use strict"; + var isInteger = require_lib7(); + function isPositiveInteger(value) { + return isInteger(value) && value > 0; + } + module2.exports = isPositiveInteger; + } +}); + +// node_modules/validate.io-array/lib/index.js +var require_lib9 = __commonJS({ + "node_modules/validate.io-array/lib/index.js"(exports2, module2) { + "use strict"; + function isArray(value) { + return Object.prototype.toString.call(value) === "[object Array]"; + } + module2.exports = Array.isArray || isArray; + } +}); + +// node_modules/validate.io-ndarray-like/lib/index.js +var require_lib10 = __commonJS({ + "node_modules/validate.io-ndarray-like/lib/index.js"(exports2, module2) { + "use strict"; + function ndarrayLike(v) { + return v !== null && typeof v === "object" && typeof v.data === "object" && typeof v.shape === "object" && typeof v.strides === "object" && typeof v.offset === "number" && typeof v.dtype === "string" && typeof v.length === "number"; + } + module2.exports = ndarrayLike; + } +}); + +// node_modules/validate.io-nonnegative-integer/lib/index.js +var require_lib11 = __commonJS({ + "node_modules/validate.io-nonnegative-integer/lib/index.js"(exports2, module2) { + "use strict"; + var isInteger = require_lib7(); + function isNonNegativeInteger(value) { + return isInteger(value) && value >= 0; + } + module2.exports = isNonNegativeInteger; + } +}); + +// node_modules/const-pinf-float64/lib/index.js +var require_lib12 = __commonJS({ + "node_modules/const-pinf-float64/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = Number.POSITIVE_INFINITY; + } +}); + +// node_modules/validate.io-buffer/lib/index.js +var require_lib13 = __commonJS({ + "node_modules/validate.io-buffer/lib/index.js"(exports2, module2) { + "use strict"; + function isBuffer(val) { + return typeof val === "object" && val !== null && (val._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7) + val.constructor && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val)); + } + module2.exports = isBuffer; + } +}); + +// node_modules/type-name/index.js +var require_type_name = __commonJS({ + "node_modules/type-name/index.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + function funcName(f) { + if (f.name) { + return f.name; + } + var match = /^\s*function\s*([^\(]*)/im.exec(f.toString()); + return match ? match[1] : ""; + } + function ctorName(obj) { + var strName = toStr.call(obj).slice(8, -1); + if ((strName === "Object" || strName === "Error") && obj.constructor) { + return funcName(obj.constructor); + } + return strName; + } + function typeName(val) { + var type; + if (val === null) { + return "null"; + } + type = typeof val; + if (type === "object") { + return ctorName(val); + } + return type; + } + module2.exports = typeName; + } +}); + +// node_modules/validate.io-string-primitive/lib/index.js +var require_lib14 = __commonJS({ + "node_modules/validate.io-string-primitive/lib/index.js"(exports2, module2) { + "use strict"; + function isString(value) { + return typeof value === "string"; + } + module2.exports = isString; + } +}); + +// node_modules/regex-regex/lib/index.js +var require_lib15 = __commonJS({ + "node_modules/regex-regex/lib/index.js"(exports2, module2) { + "use strict"; + var re = /^\/((?:\\\/|[^\/])+)\/([imgy]*)$/; + module2.exports = re; + } +}); + +// node_modules/utils-regex-from-string/lib/index.js +var require_lib16 = __commonJS({ + "node_modules/utils-regex-from-string/lib/index.js"(exports2, module2) { + "use strict"; + var isString = require_lib14(); + var RE = require_lib15(); + function regex(str) { + if (!isString(str)) { + throw new TypeError("invalid input argument. Must provide a regular expression string. Value: `" + str + "`."); + } + str = RE.exec(str); + return str ? new RegExp(str[1], str[2]) : null; + } + module2.exports = regex; + } +}); + +// node_modules/object-keys/isArguments.js +var require_isArguments = __commonJS({ + "node_modules/object-keys/isArguments.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + module2.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === "[object Arguments]"; + if (!isArgs) { + isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]"; + } + return isArgs; + }; + } +}); + +// node_modules/object-keys/implementation.js +var require_implementation = __commonJS({ + "node_modules/object-keys/implementation.js"(exports2, module2) { + "use strict"; + var keysShim; + if (!Object.keys) { + has = Object.prototype.hasOwnProperty; + toStr = Object.prototype.toString; + isArgs = require_isArguments(); + isEnumerable = Object.prototype.propertyIsEnumerable; + hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString"); + hasProtoEnumBug = isEnumerable.call(function() { + }, "prototype"); + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ]; + equalsConstructorPrototype = function(o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + hasAutomationEqualityBug = function() { + if (typeof window === "undefined") { + return false; + } + for (var k in window) { + try { + if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }(); + equalsConstructorPrototypeIfNotBuggy = function(o) { + if (typeof window === "undefined" || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + keysShim = function keys(object) { + var isObject = object !== null && typeof object === "object"; + var isFunction = toStr.call(object) === "[object Function]"; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === "[object String]"; + var theKeys = []; + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i2 = 0; i2 < object.length; ++i2) { + theKeys.push(String(i2)); + } + } + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === "prototype") && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; + } + var has; + var toStr; + var isArgs; + var isEnumerable; + var hasDontEnumBug; + var hasProtoEnumBug; + var dontEnums; + var equalsConstructorPrototype; + var excludedKeys; + var hasAutomationEqualityBug; + var equalsConstructorPrototypeIfNotBuggy; + module2.exports = keysShim; + } +}); + +// node_modules/object-keys/index.js +var require_object_keys = __commonJS({ + "node_modules/object-keys/index.js"(exports2, module2) { + "use strict"; + var slice = Array.prototype.slice; + var isArgs = require_isArguments(); + var origKeys = Object.keys; + var keysShim = origKeys ? function keys(o) { + return origKeys(o); + } : require_implementation(); + var originalKeys = Object.keys; + keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = function() { + var args2 = Object.keys(arguments); + return args2 && args2.length === arguments.length; + }(1, 2); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; + }; + module2.exports = keysShim; + } +}); + +// node_modules/utils-copy-error/lib/copy.js +var require_copy = __commonJS({ + "node_modules/utils-copy-error/lib/copy.js"(exports2, module2) { + "use strict"; + var deepCopy = require_lib23(); + var getKeys = require_object_keys().shim(); + function copy(error) { + var keys; + var desc; + var key; + var err; + var i2; + if (!(error instanceof Error)) { + throw new TypeError("invalid input argument. Must provide an error object. Value: `" + error + "`."); + } + err = new error.constructor(error.message); + if (error.stack) { + err.stack = error.stack; + } + if (error.code) { + err.code = error.code; + } + if (error.errno) { + err.errno = error.errno; + } + if (error.syscall) { + err.syscall = error.syscall; + } + keys = getKeys(error); + for (i2 = 0; i2 < keys.length; i2++) { + key = keys[i2]; + desc = Object.getOwnPropertyDescriptor(error, key); + if (desc.hasOwnProperty("value")) { + desc.value = deepCopy(error[key]); + } + Object.defineProperty(err, key, desc); + } + return err; + } + module2.exports = copy; + } +}); + +// node_modules/utils-copy-error/lib/index.js +var require_lib17 = __commonJS({ + "node_modules/utils-copy-error/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_copy(); + } +}); + +// node_modules/validate.io-number-primitive/lib/index.js +var require_lib18 = __commonJS({ + "node_modules/validate.io-number-primitive/lib/index.js"(exports2, module2) { + "use strict"; + function isNumber(value) { + return typeof value === "number" && value === value; + } + module2.exports = isNumber; + } +}); + +// node_modules/validate.io-integer-primitive/lib/index.js +var require_lib19 = __commonJS({ + "node_modules/validate.io-integer-primitive/lib/index.js"(exports2, module2) { + "use strict"; + var isNumber = require_lib18(); + function isInteger(value) { + return isNumber(value) && value % 1 === 0; + } + module2.exports = isInteger; + } +}); + +// node_modules/const-max-uint32/lib/index.js +var require_lib20 = __commonJS({ + "node_modules/const-max-uint32/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = 4294967295; + } +}); + +// node_modules/validate.io-array-like/lib/index.js +var require_lib21 = __commonJS({ + "node_modules/validate.io-array-like/lib/index.js"(exports2, module2) { + "use strict"; + var isInteger = require_lib19(); + var MAX = require_lib20(); + function isArrayLike(value) { + return value !== void 0 && value !== null && typeof value !== "function" && isInteger(value.length) && value.length >= 0 && value.length <= MAX; + } + module2.exports = isArrayLike; + } +}); + +// node_modules/utils-indexof/lib/index.js +var require_lib22 = __commonJS({ + "node_modules/utils-indexof/lib/index.js"(exports2, module2) { + "use strict"; + var isArrayLike = require_lib21(); + var isInteger = require_lib19(); + function indexOf(arr2, searchElement, fromIndex) { + var len; + var i2; + if (!isArrayLike(arr2)) { + throw new TypeError("invalid input argument. First argument must be an array-like object. Value: `" + arr2 + "`."); + } + len = arr2.length; + if (len === 0) { + return -1; + } + if (arguments.length === 3) { + if (!isInteger(fromIndex)) { + throw new TypeError("invalid input argument. `fromIndex` must be an integer. Value: `" + fromIndex + "`."); + } + if (fromIndex >= 0) { + if (fromIndex >= len) { + return -1; + } + i2 = fromIndex; + } else { + i2 = len + fromIndex; + if (i2 < 0) { + i2 = 0; + } + } + } else { + i2 = 0; + } + if (searchElement !== searchElement) { + for (; i2 < len; i2++) { + if (arr2[i2] !== arr2[i2]) { + return i2; + } + } + } else { + for (; i2 < len; i2++) { + if (arr2[i2] === searchElement) { + return i2; + } + } + } + return -1; + } + module2.exports = indexOf; + } +}); + +// node_modules/utils-copy/lib/typedarrays.js +var require_typedarrays = __commonJS({ + "node_modules/utils-copy/lib/typedarrays.js"(exports2, module2) { + "use strict"; + var objectKeys = require_object_keys(); + var typedArrays = { + "Int8Array": null, + "Uint8Array": null, + "Uint8ClampedArray": null, + "Int16Array": null, + "Uint16Array": null, + "Int32Array": null, + "Uint32Array": null, + "Float32Array": null, + "Float64Array": null + }; + (function createTypedArrayFcns() { + var keys = objectKeys(typedArrays); + var len = keys.length; + var key; + var i2; + for (i2 = 0; i2 < len; i2++) { + key = keys[i2]; + typedArrays[key] = new Function("arr", "return new " + key + "( arr );"); + } + })(); + module2.exports = typedArrays; + } +}); + +// node_modules/utils-copy/lib/deepcopy.js +var require_deepcopy = __commonJS({ + "node_modules/utils-copy/lib/deepcopy.js"(exports2, module2) { + "use strict"; + var isArray = require_lib9(); + var isBuffer = require_lib13(); + var typeName = require_type_name(); + var regex = require_lib16(); + var copyError = require_lib17(); + var indexOf = require_lib22(); + var objectKeys = require_object_keys(); + var typedArrays = require_typedarrays(); + function cloneInstance(val) { + var cache = []; + var refs = []; + var names; + var name; + var desc; + var tmp; + var ref; + var i2; + ref = Object.create(Object.getPrototypeOf(val)); + cache.push(val); + refs.push(ref); + names = Object.getOwnPropertyNames(val); + for (i2 = 0; i2 < names.length; i2++) { + name = names[i2]; + desc = Object.getOwnPropertyDescriptor(val, name); + if (desc.hasOwnProperty("value")) { + tmp = isArray(val[name]) ? [] : {}; + desc.value = deepCopy(val[name], tmp, cache, refs, -1); + } + Object.defineProperty(ref, name, desc); + } + if (!Object.isExtensible(val)) { + Object.preventExtensions(ref); + } + if (Object.isSealed(val)) { + Object.seal(ref); + } + if (Object.isFrozen(val)) { + Object.freeze(ref); + } + return ref; + } + function deepCopy(val, copy, cache, refs, level) { + var parent; + var keys; + var name; + var desc; + var ctor; + var key; + var ref; + var x; + var i2; + var j; + level = level - 1; + if (typeof val !== "object" || val === null) { + return val; + } + if (isBuffer(val)) { + return new Buffer(val); + } + if (val instanceof Error) { + return copyError(val); + } + name = typeName(val); + if (name === "Date") { + return /* @__PURE__ */ new Date(+val); + } + if (name === "RegExp") { + return regex(val.toString()); + } + if (name === "Set") { + return new Set(val); + } + if (name === "Map") { + return new Map(val); + } + if (name === "String" || name === "Boolean" || name === "Number") { + return val.valueOf(); + } + ctor = typedArrays[name]; + if (ctor) { + return ctor(val); + } + if (name !== "Array" && name !== "Object") { + if (typeof Object.freeze === "function") { + return cloneInstance(val); + } + return {}; + } + keys = objectKeys(val); + if (level > 0) { + parent = name; + for (j = 0; j < keys.length; j++) { + key = keys[j]; + x = val[key]; + name = typeName(x); + if (typeof x !== "object" || x === null || name !== "Array" && name !== "Object" || isBuffer(x)) { + if (parent === "Object") { + desc = Object.getOwnPropertyDescriptor(val, key); + if (desc.hasOwnProperty("value")) { + desc.value = deepCopy(x); + } + Object.defineProperty(copy, key, desc); + } else { + copy[key] = deepCopy(x); + } + continue; + } + i2 = indexOf(cache, x); + if (i2 !== -1) { + copy[key] = refs[i2]; + continue; + } + ref = isArray(x) ? [] : {}; + cache.push(x); + refs.push(ref); + if (parent === "Array") { + copy[key] = deepCopy(x, ref, cache, refs, level); + } else { + desc = Object.getOwnPropertyDescriptor(val, key); + if (desc.hasOwnProperty("value")) { + desc.value = deepCopy(x, ref, cache, refs, level); + } + Object.defineProperty(copy, key, desc); + } + } + } else { + if (name === "Array") { + for (j = 0; j < keys.length; j++) { + key = keys[j]; + copy[key] = val[key]; + } + } else { + for (j = 0; j < keys.length; j++) { + key = keys[j]; + desc = Object.getOwnPropertyDescriptor(val, key); + Object.defineProperty(copy, key, desc); + } + } + } + if (!Object.isExtensible(val)) { + Object.preventExtensions(copy); + } + if (Object.isSealed(val)) { + Object.seal(copy); + } + if (Object.isFrozen(val)) { + Object.freeze(copy); + } + return copy; + } + module2.exports = deepCopy; + } +}); + +// node_modules/utils-copy/lib/index.js +var require_lib23 = __commonJS({ + "node_modules/utils-copy/lib/index.js"(exports2, module2) { + "use strict"; + var isArray = require_lib9(); + var isNonNegativeInteger = require_lib11(); + var PINF = require_lib12(); + var deepCopy = require_deepcopy(); + function createCopy(val, level) { + var copy; + if (arguments.length > 1) { + if (!isNonNegativeInteger(level)) { + throw new TypeError("invalid input argument. Level must be a nonnegative integer. Value: `" + level + "`."); + } + if (level === 0) { + return val; + } + } else { + level = PINF; + } + copy = isArray(val) ? [] : {}; + return deepCopy(val, copy, [val], [copy], level); + } + module2.exports = createCopy; + } +}); + +// node_modules/compute-dims/lib/index.js +var require_lib24 = __commonJS({ + "node_modules/compute-dims/lib/index.js"(exports2, module2) { + "use strict"; + var isPositiveInteger = require_lib8(); + var isArray = require_lib9(); + var ndarrayLike = require_lib10(); + var createCopy = require_lib23(); + function dims(arr2, d, max) { + if (max && d.length === max) { + return; + } + if (!isArray(arr2[0])) { + return; + } + d.push(arr2[0].length); + dims(arr2[0], d, max); + } + function check(arr2, d) { + var len = arr2.length, dim = d.shift(), nDims = d.length, val, flg; + for (var i2 = 0; i2 < len; i2++) { + val = arr2[i2]; + if (!isArray(val) || val.length !== dim) { + return false; + } + if (nDims) { + flg = check(val, d.slice()); + if (!flg) { + return false; + } + } + } + return true; + } + function compute(x, max) { + var d, flg; + if (arguments.length > 1) { + if (!isPositiveInteger(max)) { + throw new TypeError("dims()::invalid input argument. `max` option must be a positive integer."); + } + } + if (ndarrayLike(x) === true) { + d = createCopy(x.shape); + if (max && max <= d.length) { + d.length = max; + } + return d; + } + if (isArray(x)) { + d = [x.length]; + dims(x, d, max); + if (d.length > 1) { + flg = check(x, d.slice(1)); + if (!flg) { + return null; + } + } + return d; + } + throw new TypeError("dims()::invalid input argument. Must provide an array, matrix or ndarray."); + } + module2.exports = compute; + } +}); + +// node_modules/is-buffer/index.js +var require_is_buffer = __commonJS({ + "node_modules/is-buffer/index.js"(exports2, module2) { + module2.exports = function isBuffer(obj) { + return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj); + }; + } +}); + +// node_modules/pxls/index.js +var require_pxls = __commonJS({ + "node_modules/pxls/index.js"(exports2, module2) { + "use strict"; + var u8 = require_to_uint8(); + var dims = require_lib24(); + var flat = require_arr_flatten(); + var isBuffer = require_is_buffer(); + var isBrowser = require_server(); + var flip = require_flip_pixels(); + module2.exports = pxls; + var context; + function pxls(data, step) { + if (!data) return data; + if (isNdarray(data)) { + var i2 = 0; + if (data.shape[2] === 3) { + var len = data.shape[0] * data.shape[1]; + var out = Array(len << 2); + var hasInt = false; + for (var x = 0; x < data.shape[0]; x++) { + for (var y = 0; y < data.shape[1]; y++) { + var r = data.get(y, x, 0); + var g = data.get(y, x, 1); + var b = data.get(y, x, 2); + out[i2 << 2] = r; + out[(i2 << 2) + 1] = g; + out[(i2 << 2) + 2] = b; + if (!hasInt && (r > 1 || g > 1 || b > 1)) hasInt = true; + i2++; + } + } + var a = hasInt ? 255 : 1; + for (var i2 = 0; i2 < len; i2++) { + out[(i2 << 2) + 3] = a; + } + data = out; + } else if (data.shape[2] === 1 || !data.shape[2]) { + var len = data.shape[0] * data.shape[1]; + var out = Array(len << 2); + var hasInt = false; + for (var x = 0; x < data.shape[0]; x++) { + for (var y = 0; y < data.shape[1]; y++) { + var r = data.get(y, x, 0); + out[i2 << 2] = r; + out[(i2 << 2) + 1] = r; + out[(i2 << 2) + 2] = r; + if (!hasInt && r > 1) hasInt = true; + i2++; + } + } + var a = hasInt ? 255 : 1; + for (var i2 = 0; i2 < len; i2++) { + out[(i2 << 2) + 3] = a; + } + data = out; + } else { + data = data.data; + } + return u8(data); + } + var width, height; + if (Array.isArray(step)) { + width = step[0]; + height = step[1]; + step = step[2]; + } + if (!width) width = data.shape ? data.shape[0] : data.width; + if (!height) height = data.shape ? data.shape[1] : data.height; + if (data.gl || data._gl || data.regl) data = data.regl ? data.regl._gl : data.gl || data._gl; + if (data.readPixels) { + var gl = data; + var pixels2 = new Uint8Array(gl.drawingBufferWidth * gl.drawingBufferHeight * 4); + gl.readPixels(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight, gl.RGBA, gl.UNSIGNED_BYTE, pixels2); + return flip(pixels2, gl.drawingBufferWidth, gl.drawingBufferHeight); + } + if (isBrowser) { + if (data.canvas) data = data.canvas; + if (data.tagName || typeof ImageBitmap !== "undefined" && data instanceof ImageBitmap) { + if (!context) context = document.createElement("canvas").getContext("2d"); + context.canvas.width = data.width || width; + context.canvas.height = data.height || height; + context.drawImage(data, 0, 0); + data = context.getImageData(0, 0, context.canvas.width, context.canvas.height); + } + } + if (data.data) data = data.data; + if (Array.isArray(data)) { + var shape = dims(data, 3); + if (shape) { + if (shape[2]) step = shape[2]; + else if (shape[1] && shape[1] <= 4) step = shape[1]; + } + data = flat(data); + } + if (step == null && width && height) { + step = Math.floor(data.length / (width * height)); + } + if (data instanceof ArrayBuffer || isBuffer(data)) data = new Uint8Array(data); + if (data.length == null) return null; + if (step === 3) { + var len = Math.floor(data.length / 3); + var out = Array(len << 2); + var hasInt = false; + for (var i2 = 0; i2 < len; i2++) { + var r = data[i2 * 3]; + var g = data[i2 * 3 + 1]; + var b = data[i2 * 3 + 2]; + out[i2 << 2] = r; + out[(i2 << 2) + 1] = g; + out[(i2 << 2) + 2] = b; + if (!hasInt && (r > 1 || g > 1 || b > 1)) hasInt = true; + } + var a = hasInt ? 255 : 1; + for (var i2 = 0; i2 < len; i2++) { + out[(i2 << 2) + 3] = a; + } + data = out; + } else if (step === 1) { + var len = data.length; + var out = Array(len << 2); + var hasInt = false; + for (var i2 = 0; i2 < len; i2++) { + var r = data[i2]; + out[i2 << 2] = r; + out[(i2 << 2) + 1] = r; + out[(i2 << 2) + 2] = r; + if (!hasInt && r > 1) hasInt = true; + } + var a = hasInt ? 255 : 1; + for (var i2 = 0; i2 < len; i2++) { + out[(i2 << 2) + 3] = a; + } + data = out; + } + return u8(data); + } + function isNdarray(v) { + return v && v.shape && v.stride && v.offset != null && v.dtype; + } + } +}); + +// node_modules/image-pixels/index.js +var require_image_pixels = __commonJS({ + "node_modules/image-pixels/index.js"(exports2, module2) { + "use strict"; + var isObj = require_is_plain_obj(); + var isBase64 = require_is_base64(); + var rect = require_parse_rect(); + var extend = require_object_assign(); + var isBlob = require_is_blob(); + var clipPixels = require_clip_pixels(); + var isBrowser = require_server(); + var loadUrl = require_url(); + var loadRaw = require_raw(); + var loadGl = require_gl(); + var cache = require_cache3(); + var pxls = require_pxls(); + module2.exports = function(src, o, cb) { + if (Array.isArray(src) && src.raw) src = String.raw.apply(this, arguments); + if (typeof o === "function") { + cb = o; + o = isObj(src) ? src : null; + } + return getPixels(src, o).then(function(data) { + if (!cache.get(data)) { + cache.set(data, data); + } + if (cb) cb(null, data); + return data; + }, function(err) { + if (cb) cb(err); + throw err; + }); + }; + module2.exports.cache = cache; + module2.exports.all = function getPixelsAll(src, o, cb) { + if (!src) return null; + if (typeof o === "function") { + cb = o; + o = null; + } + if (Array.isArray(src)) { + var list = src.map(function(source) { + return getPixels(source, o); + }); + return Promise.all(list).then(function(list2) { + cb && cb(null, list2); + return list2; + }, function(err) { + cb && cb(err); + return Promise.reject(err); + }); + } + var handlers = {}; + var list = []; + for (var name in src) { + handlers[name] = list.push(getPixels(src[name], o)) - 1; + } + return Promise.all(list).then(function(list2) { + var result = {}; + for (var name2 in handlers) { + result[name2] = list2[handlers[name2]]; + } + cb && cb(null, result); + return result; + }, function(err) { + cb && cb(err); + return Promise.reject(err); + }); + }; + function getPixels(src, o) { + if (typeof o === "string") o = { type: o }; + else if (!o) o = {}; + else if (Array.isArray(o)) o = { shape: o }; + else o = extend({}, o); + var cached; + if (isObj(src)) o = extend(src, o); + if (o.src || o.source) src = o.src || o.source; + if (isObj(src) && (src.src || src.source)) src = src.src || src.source; + if (!src) src = {}; + if (o.cache == null) o.cache = true; + var width, height; + var clip = o.clip && rect(o.clip) || { x: 0, y: 0 }; + var type = o.type || o.mime; + if (cached = checkCached(src, clip)) return cached; + var cacheAs = []; + captureShape(o); + captureShape(src); + if (isBrowser && (isBlob(src) || src instanceof File)) { + src = URL.createObjectURL(src); + cacheAs.push(src); + if (cached = checkCached(src, clip)) return cached; + } + if (typeof src === "string") { + if (!src) return Promise.reject(new Error("Bad URL")); + cacheAs.push(src); + if (isBase64(src, { mime: false })) { + src = pxls(src); + return loadRaw(src, { type, cache: o.cache && cacheAs, shape: [width, height], clip }); + } + return loadUrl(src, clip).then(function(src2) { + if (cached = checkCached(src2, clip)) { + return cached; + } + captureShape(src2); + return loadRaw(src2, { type, cache: o.cache && cacheAs, shape: [width, height], clip }); + }); + } + if (src.tagName) { + if (src.tagName.toLowerCase() === "image") { + var url = src.getAttribute("xlink:href"); + src = new Image(); + src.src = url; + if (cached = checkCached(url, clip)) return cached; + } + if (src.tagName.toLowerCase() === "picture") { + src = src.querySelector("img"); + if (cached = checkCached(src, clip)) return cached; + } + if (src.tagName.toLowerCase() === "img") { + if (cached = checkCached(src.src, clip)) return cached; + cacheAs.push(src.src); + if (src.complete) { + captureShape(src); + return loadRaw(src, { type, cache: o.cache && cacheAs, shape: [width, height], clip }); + } + return new Promise(function(ok, nok) { + src.addEventListener("load", function() { + captureShape(src); + ok(src); + }); + src.addEventListener("error", function(err) { + nok(err); + }); + }).then(function(src2) { + return loadRaw(src2, { type, cache: o.cache && cacheAs, shape: [width, height], clip }); + }); + } + if (global.HTMLMediaElement && src instanceof HTMLMediaElement) { + if (cached = checkCached(src.src, clip)) return cached; + cacheAs.push(src.src); + if (src.readyState) { + captureShape({ w: src.videoWidth, h: src.videoHeight }); + return loadRaw(src, { type, cache: o.cache && cacheAs, shape: [width, height], clip }); + } + return new Promise(function(ok, nok) { + src.addEventListener("loadeddata", function() { + captureShape({ w: src.videoWidth, h: src.videoHeight }); + ok(src); + }); + src.addEventListener("error", function(err) { + nok(new Error("Bad video src `" + src.src + "`")); + }); + }).then(function(src2) { + return loadRaw(src2, { type, cache: o.cache && cacheAs, shape: [width, height], clip }); + }); + } + } + return Promise.resolve(src).then(function(src2) { + if (cached = checkCached(src2, clip)) return cached; + var ctx = src2.readPixels || src2.getImageData ? src2 : src2._gl || src2.gl || src2.context || src2.ctx || src2.getContext && (src2.getContext("2d") || src2.getContext("webgl")); + if (ctx) { + captureShape(ctx); + if (ctx.readPixels) { + var result = loadGl(ctx, { type, shape: [width, height], clip }); + return result; + } + captureShape(ctx.canvas); + return loadRaw(ctx.canvas, { type, shape: [width, height], clip }); + } + captureShape(src2); + src2 = pxls(src2) || src2; + cacheAs.push(src2); + return loadRaw(src2, { type, cache: o.cache && cacheAs, shape: [width, height], clip }); + }); + function captureShape(container) { + if (!width || typeof width !== "number") width = container && container.shape && container.shape[0] || container.width || container.w || container.drawingBufferWidth; + if (!height || typeof height !== "number") height = container && container.shape && container.shape[1] || container.height || container.h || container.drawingBufferHeight; + } + } + function checkCached(src, clip) { + var result = cache.get(src); + if (result) { + if (clip.x || clip.y || clip.width && clip.width !== result.width || clip.height && clip.height !== result.height) { + result = { + data: new Uint8Array(clipPixels(result.data, [result.width, result.height], [clip.x, clip.y, clip.width, clip.height])), + width: clip.width, + height: clip.height + }; + } + return Promise.resolve(result); + } + } + } +}); + +// node_modules/crypto-js/core.js +var require_core = __commonJS({ + "node_modules/crypto-js/core.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(); + } else if (typeof define === "function" && define.amd) { + define([], factory); + } else { + root.CryptoJS = factory(); + } + })(exports2, function() { + var CryptoJS = CryptoJS || function(Math2, undefined2) { + var crypto2; + if (typeof window !== "undefined" && window.crypto) { + crypto2 = window.crypto; + } + if (typeof self !== "undefined" && self.crypto) { + crypto2 = self.crypto; + } + if (typeof globalThis !== "undefined" && globalThis.crypto) { + crypto2 = globalThis.crypto; + } + if (!crypto2 && typeof window !== "undefined" && window.msCrypto) { + crypto2 = window.msCrypto; + } + if (!crypto2 && typeof global !== "undefined" && global.crypto) { + crypto2 = global.crypto; + } + if (!crypto2 && typeof require === "function") { + try { + crypto2 = require("crypto"); + } catch (err) { + } + } + var cryptoSecureRandomInt = function() { + if (crypto2) { + if (typeof crypto2.getRandomValues === "function") { + try { + return crypto2.getRandomValues(new Uint32Array(1))[0]; + } catch (err) { + } + } + if (typeof crypto2.randomBytes === "function") { + try { + return crypto2.randomBytes(4).readInt32LE(); + } catch (err) { + } + } + } + throw new Error("Native crypto module could not be used to get secure random number."); + }; + var create = Object.create || /* @__PURE__ */ function() { + function F() { + } + return function(obj) { + var subtype; + F.prototype = obj; + subtype = new F(); + F.prototype = null; + return subtype; + }; + }(); + var C = {}; + var C_lib = C.lib = {}; + var Base = C_lib.Base = /* @__PURE__ */ function() { + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function(overrides) { + var subtype = create(this); + if (overrides) { + subtype.mixIn(overrides); + } + if (!subtype.hasOwnProperty("init") || this.init === subtype.init) { + subtype.init = function() { + subtype.$super.init.apply(this, arguments); + }; + } + subtype.init.prototype = subtype; + subtype.$super = this; + return subtype; + }, + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function() { + var instance = this.extend(); + instance.init.apply(instance, arguments); + return instance; + }, + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function() { + }, + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function(properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + if (properties.hasOwnProperty("toString")) { + this.toString = properties.toString; + } + }, + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function() { + return this.init.prototype.extend(this); + } + }; + }(); + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function(words, sigBytes) { + words = this.words = words || []; + if (sigBytes != undefined2) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function(encoder2) { + return (encoder2 || Hex).stringify(this); + }, + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function(wordArray) { + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + this.clamp(); + if (thisSigBytes % 4) { + for (var i2 = 0; i2 < thatSigBytes; i2++) { + var thatByte = thatWords[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255; + thisWords[thisSigBytes + i2 >>> 2] |= thatByte << 24 - (thisSigBytes + i2) % 4 * 8; + } + } else { + for (var j = 0; j < thatSigBytes; j += 4) { + thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2]; + } + } + this.sigBytes += thatSigBytes; + return this; + }, + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function() { + var words = this.words; + var sigBytes = this.sigBytes; + words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8; + words.length = Math2.ceil(sigBytes / 4); + }, + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function() { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + return clone; + }, + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function(nBytes) { + var words = []; + for (var i2 = 0; i2 < nBytes; i2 += 4) { + words.push(cryptoSecureRandomInt()); + } + return new WordArray.init(words, nBytes); + } + }); + var C_enc = C.enc = {}; + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function(wordArray) { + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var hexChars = []; + for (var i2 = 0; i2 < sigBytes; i2++) { + var bite = words[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 15).toString(16)); + } + return hexChars.join(""); + }, + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function(hexStr) { + var hexStrLength = hexStr.length; + var words = []; + for (var i2 = 0; i2 < hexStrLength; i2 += 2) { + words[i2 >>> 3] |= parseInt(hexStr.substr(i2, 2), 16) << 24 - i2 % 8 * 4; + } + return new WordArray.init(words, hexStrLength / 2); + } + }; + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function(wordArray) { + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var latin1Chars = []; + for (var i2 = 0; i2 < sigBytes; i2++) { + var bite = words[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255; + latin1Chars.push(String.fromCharCode(bite)); + } + return latin1Chars.join(""); + }, + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function(latin1Str) { + var latin1StrLength = latin1Str.length; + var words = []; + for (var i2 = 0; i2 < latin1StrLength; i2++) { + words[i2 >>> 2] |= (latin1Str.charCodeAt(i2) & 255) << 24 - i2 % 4 * 8; + } + return new WordArray.init(words, latin1StrLength); + } + }; + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function(wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error("Malformed UTF-8 data"); + } + }, + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function(utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function() { + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function(data) { + if (typeof data == "string") { + data = Utf8.parse(data); + } + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function(doFlush) { + var processedWords; + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + nBlocksReady = Math2.ceil(nBlocksReady); + } else { + nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + var nWordsReady = nBlocksReady * blockSize; + var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes); + if (nWordsReady) { + for (var offset2 = 0; offset2 < nWordsReady; offset2 += blockSize) { + this._doProcessBlock(dataWords, offset2); + } + processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + return new WordArray.init(processedWords, nBytesReady); + }, + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function() { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + return clone; + }, + _minBufferSize: 0 + }); + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function(cfg) { + this.cfg = this.cfg.extend(cfg); + this.reset(); + }, + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function() { + BufferedBlockAlgorithm.reset.call(this); + this._doReset(); + }, + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function(messageUpdate) { + this._append(messageUpdate); + this._process(); + return this; + }, + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function(messageUpdate) { + if (messageUpdate) { + this._append(messageUpdate); + } + var hash = this._doFinalize(); + return hash; + }, + blockSize: 512 / 32, + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function(hasher) { + return function(message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function(hasher) { + return function(message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + var C_algo = C.algo = {}; + return C; + }(Math); + return CryptoJS; + }); + } +}); + +// node_modules/crypto-js/x64-core.js +var require_x64_core = __commonJS({ + "node_modules/crypto-js/x64-core.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function(undefined2) { + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + var C_x64 = C.x64 = {}; + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function(high, low) { + this.high = high; + this.low = low; + } + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + // return X64Word.create(high, low); + // }, + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + // return X64Word.create(high, low); + // }, + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + // return X64Word.create(high, low); + // }, + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + // return X64Word.create(high, low); + // }, + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + // return X64Word.create(high, low); + // }, + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + // return X64Word.create(high, low); + // }, + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + // return X64Word.create(high, low); + // } + }); + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function(words, sigBytes) { + words = this.words = words || []; + if (sigBytes != undefined2) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function() { + var x64Words = this.words; + var x64WordsLength = x64Words.length; + var x32Words = []; + for (var i2 = 0; i2 < x64WordsLength; i2++) { + var x64Word = x64Words[i2]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + return X32WordArray.create(x32Words, this.sigBytes); + }, + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function() { + var clone = Base.clone.call(this); + var words = clone.words = this.words.slice(0); + var wordsLength = words.length; + for (var i2 = 0; i2 < wordsLength; i2++) { + words[i2] = words[i2].clone(); + } + return clone; + } + }); + })(); + return CryptoJS; + }); + } +}); + +// node_modules/crypto-js/lib-typedarrays.js +var require_lib_typedarrays = __commonJS({ + "node_modules/crypto-js/lib-typedarrays.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + if (typeof ArrayBuffer != "function") { + return; + } + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var superInit = WordArray.init; + var subInit = WordArray.init = function(typedArray) { + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + if (typedArray instanceof Uint8Array) { + var typedArrayByteLength = typedArray.byteLength; + var words = []; + for (var i2 = 0; i2 < typedArrayByteLength; i2++) { + words[i2 >>> 2] |= typedArray[i2] << 24 - i2 % 4 * 8; + } + superInit.call(this, words, typedArrayByteLength); + } else { + superInit.apply(this, arguments); + } + }; + subInit.prototype = WordArray; + })(); + return CryptoJS.lib.WordArray; + }); + } +}); + +// node_modules/crypto-js/enc-utf16.js +var require_enc_utf16 = __commonJS({ + "node_modules/crypto-js/enc-utf16.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function(wordArray) { + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var utf16Chars = []; + for (var i2 = 0; i2 < sigBytes; i2 += 2) { + var codePoint = words[i2 >>> 2] >>> 16 - i2 % 4 * 8 & 65535; + utf16Chars.push(String.fromCharCode(codePoint)); + } + return utf16Chars.join(""); + }, + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function(utf16Str) { + var utf16StrLength = utf16Str.length; + var words = []; + for (var i2 = 0; i2 < utf16StrLength; i2++) { + words[i2 >>> 1] |= utf16Str.charCodeAt(i2) << 16 - i2 % 2 * 16; + } + return WordArray.create(words, utf16StrLength * 2); + } + }; + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function(wordArray) { + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var utf16Chars = []; + for (var i2 = 0; i2 < sigBytes; i2 += 2) { + var codePoint = swapEndian(words[i2 >>> 2] >>> 16 - i2 % 4 * 8 & 65535); + utf16Chars.push(String.fromCharCode(codePoint)); + } + return utf16Chars.join(""); + }, + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function(utf16Str) { + var utf16StrLength = utf16Str.length; + var words = []; + for (var i2 = 0; i2 < utf16StrLength; i2++) { + words[i2 >>> 1] |= swapEndian(utf16Str.charCodeAt(i2) << 16 - i2 % 2 * 16); + } + return WordArray.create(words, utf16StrLength * 2); + } + }; + function swapEndian(word) { + return word << 8 & 4278255360 | word >>> 8 & 16711935; + } + })(); + return CryptoJS.enc.Utf16; + }); + } +}); + +// node_modules/crypto-js/enc-base64.js +var require_enc_base64 = __commonJS({ + "node_modules/crypto-js/enc-base64.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function(wordArray) { + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + wordArray.clamp(); + var base64Chars = []; + for (var i2 = 0; i2 < sigBytes; i2 += 3) { + var byte1 = words[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255; + var byte2 = words[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255; + var byte3 = words[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255; + var triplet = byte1 << 16 | byte2 << 8 | byte3; + for (var j = 0; j < 4 && i2 + j * 0.75 < sigBytes; j++) { + base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63)); + } + } + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + return base64Chars.join(""); + }, + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function(base64Str) { + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + return parseLoop(base64Str, base64StrLength, reverseMap); + }, + _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" + }; + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i2 = 0; i2 < base64StrLength; i2++) { + if (i2 % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i2 - 1)] << i2 % 4 * 2; + var bits2 = reverseMap[base64Str.charCodeAt(i2)] >>> 6 - i2 % 4 * 2; + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + })(); + return CryptoJS.enc.Base64; + }); + } +}); + +// node_modules/crypto-js/enc-base64url.js +var require_enc_base64url = __commonJS({ + "node_modules/crypto-js/enc-base64url.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + var Base64url = C_enc.Base64url = { + /** + * Converts a word array to a Base64url string. + * + * @param {WordArray} wordArray The word array. + * + * @param {boolean} urlSafe Whether to use url safe + * + * @return {string} The Base64url string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); + */ + stringify: function(wordArray, urlSafe) { + if (urlSafe === void 0) { + urlSafe = true; + } + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = urlSafe ? this._safe_map : this._map; + wordArray.clamp(); + var base64Chars = []; + for (var i2 = 0; i2 < sigBytes; i2 += 3) { + var byte1 = words[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255; + var byte2 = words[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255; + var byte3 = words[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255; + var triplet = byte1 << 16 | byte2 << 8 | byte3; + for (var j = 0; j < 4 && i2 + j * 0.75 < sigBytes; j++) { + base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63)); + } + } + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + return base64Chars.join(""); + }, + /** + * Converts a Base64url string to a word array. + * + * @param {string} base64Str The Base64url string. + * + * @param {boolean} urlSafe Whether to use url safe + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64url.parse(base64String); + */ + parse: function(base64Str, urlSafe) { + if (urlSafe === void 0) { + urlSafe = true; + } + var base64StrLength = base64Str.length; + var map = urlSafe ? this._safe_map : this._map; + var reverseMap = this._reverseMap; + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + return parseLoop(base64Str, base64StrLength, reverseMap); + }, + _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" + }; + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i2 = 0; i2 < base64StrLength; i2++) { + if (i2 % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i2 - 1)] << i2 % 4 * 2; + var bits2 = reverseMap[base64Str.charCodeAt(i2)] >>> 6 - i2 % 4 * 2; + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + })(); + return CryptoJS.enc.Base64url; + }); + } +}); + +// node_modules/crypto-js/md5.js +var require_md5 = __commonJS({ + "node_modules/crypto-js/md5.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function(Math2) { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + var T = []; + (function() { + for (var i2 = 0; i2 < 64; i2++) { + T[i2] = Math2.abs(Math2.sin(i2 + 1)) * 4294967296 | 0; + } + })(); + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function() { + this._hash = new WordArray.init([ + 1732584193, + 4023233417, + 2562383102, + 271733878 + ]); + }, + _doProcessBlock: function(M2, offset2) { + for (var i2 = 0; i2 < 16; i2++) { + var offset_i = offset2 + i2; + var M_offset_i = M2[offset_i]; + M2[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360; + } + var H = this._hash.words; + var M_offset_0 = M2[offset2 + 0]; + var M_offset_1 = M2[offset2 + 1]; + var M_offset_2 = M2[offset2 + 2]; + var M_offset_3 = M2[offset2 + 3]; + var M_offset_4 = M2[offset2 + 4]; + var M_offset_5 = M2[offset2 + 5]; + var M_offset_6 = M2[offset2 + 6]; + var M_offset_7 = M2[offset2 + 7]; + var M_offset_8 = M2[offset2 + 8]; + var M_offset_9 = M2[offset2 + 9]; + var M_offset_10 = M2[offset2 + 10]; + var M_offset_11 = M2[offset2 + 11]; + var M_offset_12 = M2[offset2 + 12]; + var M_offset_13 = M2[offset2 + 13]; + var M_offset_14 = M2[offset2 + 14]; + var M_offset_15 = M2[offset2 + 15]; + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + H[0] = H[0] + a | 0; + H[1] = H[1] + b | 0; + H[2] = H[2] + c | 0; + H[3] = H[3] + d | 0; + }, + _doFinalize: function() { + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; + var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296); + var nBitsTotalL = nBitsTotal; + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360; + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360; + data.sigBytes = (dataWords.length + 1) * 4; + this._process(); + var hash = this._hash; + var H = hash.words; + for (var i2 = 0; i2 < 4; i2++) { + var H_i = H[i2]; + H[i2] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360; + } + return hash; + }, + clone: function() { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + return clone; + } + }); + function FF(a, b, c, d, x, s, t) { + var n = a + (b & c | ~b & d) + x + t; + return (n << s | n >>> 32 - s) + b; + } + function GG(a, b, c, d, x, s, t) { + var n = a + (b & d | c & ~d) + x + t; + return (n << s | n >>> 32 - s) + b; + } + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return (n << s | n >>> 32 - s) + b; + } + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return (n << s | n >>> 32 - s) + b; + } + C.MD5 = Hasher._createHelper(MD5); + C.HmacMD5 = Hasher._createHmacHelper(MD5); + })(Math); + return CryptoJS.MD5; + }); + } +}); + +// node_modules/crypto-js/sha1.js +var require_sha1 = __commonJS({ + "node_modules/crypto-js/sha1.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + var W = []; + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function() { + this._hash = new WordArray.init([ + 1732584193, + 4023233417, + 2562383102, + 271733878, + 3285377520 + ]); + }, + _doProcessBlock: function(M2, offset2) { + var H = this._hash.words; + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + for (var i2 = 0; i2 < 80; i2++) { + if (i2 < 16) { + W[i2] = M2[offset2 + i2] | 0; + } else { + var n = W[i2 - 3] ^ W[i2 - 8] ^ W[i2 - 14] ^ W[i2 - 16]; + W[i2] = n << 1 | n >>> 31; + } + var t = (a << 5 | a >>> 27) + e + W[i2]; + if (i2 < 20) { + t += (b & c | ~b & d) + 1518500249; + } else if (i2 < 40) { + t += (b ^ c ^ d) + 1859775393; + } else if (i2 < 60) { + t += (b & c | b & d | c & d) - 1894007588; + } else { + t += (b ^ c ^ d) - 899497514; + } + e = d; + d = c; + c = b << 30 | b >>> 2; + b = a; + a = t; + } + H[0] = H[0] + a | 0; + H[1] = H[1] + b | 0; + H[2] = H[2] + c | 0; + H[3] = H[3] + d | 0; + H[4] = H[4] + e | 0; + }, + _doFinalize: function() { + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296); + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + this._process(); + return this._hash; + }, + clone: function() { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + return clone; + } + }); + C.SHA1 = Hasher._createHelper(SHA1); + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + })(); + return CryptoJS.SHA1; + }); + } +}); + +// node_modules/crypto-js/sha256.js +var require_sha256 = __commonJS({ + "node_modules/crypto-js/sha256.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function(Math2) { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + var H = []; + var K = []; + (function() { + function isPrime(n2) { + var sqrtN = Math2.sqrt(n2); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n2 % factor)) { + return false; + } + } + return true; + } + function getFractionalBits(n2) { + return (n2 - (n2 | 0)) * 4294967296 | 0; + } + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3)); + nPrime++; + } + n++; + } + })(); + var W = []; + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function() { + this._hash = new WordArray.init(H.slice(0)); + }, + _doProcessBlock: function(M2, offset2) { + var H2 = this._hash.words; + var a = H2[0]; + var b = H2[1]; + var c = H2[2]; + var d = H2[3]; + var e = H2[4]; + var f = H2[5]; + var g = H2[6]; + var h = H2[7]; + for (var i2 = 0; i2 < 64; i2++) { + if (i2 < 16) { + W[i2] = M2[offset2 + i2] | 0; + } else { + var gamma0x = W[i2 - 15]; + var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3; + var gamma1x = W[i2 - 2]; + var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10; + W[i2] = gamma0 + W[i2 - 7] + gamma1 + W[i2 - 16]; + } + var ch = e & f ^ ~e & g; + var maj = a & b ^ a & c ^ b & c; + var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22); + var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25); + var t1 = h + sigma1 + ch + K[i2] + W[i2]; + var t2 = sigma0 + maj; + h = g; + g = f; + f = e; + e = d + t1 | 0; + d = c; + c = b; + b = a; + a = t1 + t2 | 0; + } + H2[0] = H2[0] + a | 0; + H2[1] = H2[1] + b | 0; + H2[2] = H2[2] + c | 0; + H2[3] = H2[3] + d | 0; + H2[4] = H2[4] + e | 0; + H2[5] = H2[5] + f | 0; + H2[6] = H2[6] + g | 0; + H2[7] = H2[7] + h | 0; + }, + _doFinalize: function() { + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296); + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + this._process(); + return this._hash; + }, + clone: function() { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + return clone; + } + }); + C.SHA256 = Hasher._createHelper(SHA256); + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + })(Math); + return CryptoJS.SHA256; + }); + } +}); + +// node_modules/crypto-js/sha224.js +var require_sha224 = __commonJS({ + "node_modules/crypto-js/sha224.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_sha256()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./sha256"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function() { + this._hash = new WordArray.init([ + 3238371032, + 914150663, + 812702999, + 4144912697, + 4290775857, + 1750603025, + 1694076839, + 3204075428 + ]); + }, + _doFinalize: function() { + var hash = SHA256._doFinalize.call(this); + hash.sigBytes -= 4; + return hash; + } + }); + C.SHA224 = SHA256._createHelper(SHA224); + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + })(); + return CryptoJS.SHA224; + }); + } +}); + +// node_modules/crypto-js/sha512.js +var require_sha512 = __commonJS({ + "node_modules/crypto-js/sha512.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_x64_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./x64-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + var K = [ + X64Word_create(1116352408, 3609767458), + X64Word_create(1899447441, 602891725), + X64Word_create(3049323471, 3964484399), + X64Word_create(3921009573, 2173295548), + X64Word_create(961987163, 4081628472), + X64Word_create(1508970993, 3053834265), + X64Word_create(2453635748, 2937671579), + X64Word_create(2870763221, 3664609560), + X64Word_create(3624381080, 2734883394), + X64Word_create(310598401, 1164996542), + X64Word_create(607225278, 1323610764), + X64Word_create(1426881987, 3590304994), + X64Word_create(1925078388, 4068182383), + X64Word_create(2162078206, 991336113), + X64Word_create(2614888103, 633803317), + X64Word_create(3248222580, 3479774868), + X64Word_create(3835390401, 2666613458), + X64Word_create(4022224774, 944711139), + X64Word_create(264347078, 2341262773), + X64Word_create(604807628, 2007800933), + X64Word_create(770255983, 1495990901), + X64Word_create(1249150122, 1856431235), + X64Word_create(1555081692, 3175218132), + X64Word_create(1996064986, 2198950837), + X64Word_create(2554220882, 3999719339), + X64Word_create(2821834349, 766784016), + X64Word_create(2952996808, 2566594879), + X64Word_create(3210313671, 3203337956), + X64Word_create(3336571891, 1034457026), + X64Word_create(3584528711, 2466948901), + X64Word_create(113926993, 3758326383), + X64Word_create(338241895, 168717936), + X64Word_create(666307205, 1188179964), + X64Word_create(773529912, 1546045734), + X64Word_create(1294757372, 1522805485), + X64Word_create(1396182291, 2643833823), + X64Word_create(1695183700, 2343527390), + X64Word_create(1986661051, 1014477480), + X64Word_create(2177026350, 1206759142), + X64Word_create(2456956037, 344077627), + X64Word_create(2730485921, 1290863460), + X64Word_create(2820302411, 3158454273), + X64Word_create(3259730800, 3505952657), + X64Word_create(3345764771, 106217008), + X64Word_create(3516065817, 3606008344), + X64Word_create(3600352804, 1432725776), + X64Word_create(4094571909, 1467031594), + X64Word_create(275423344, 851169720), + X64Word_create(430227734, 3100823752), + X64Word_create(506948616, 1363258195), + X64Word_create(659060556, 3750685593), + X64Word_create(883997877, 3785050280), + X64Word_create(958139571, 3318307427), + X64Word_create(1322822218, 3812723403), + X64Word_create(1537002063, 2003034995), + X64Word_create(1747873779, 3602036899), + X64Word_create(1955562222, 1575990012), + X64Word_create(2024104815, 1125592928), + X64Word_create(2227730452, 2716904306), + X64Word_create(2361852424, 442776044), + X64Word_create(2428436474, 593698344), + X64Word_create(2756734187, 3733110249), + X64Word_create(3204031479, 2999351573), + X64Word_create(3329325298, 3815920427), + X64Word_create(3391569614, 3928383900), + X64Word_create(3515267271, 566280711), + X64Word_create(3940187606, 3454069534), + X64Word_create(4118630271, 4000239992), + X64Word_create(116418474, 1914138554), + X64Word_create(174292421, 2731055270), + X64Word_create(289380356, 3203993006), + X64Word_create(460393269, 320620315), + X64Word_create(685471733, 587496836), + X64Word_create(852142971, 1086792851), + X64Word_create(1017036298, 365543100), + X64Word_create(1126000580, 2618297676), + X64Word_create(1288033470, 3409855158), + X64Word_create(1501505948, 4234509866), + X64Word_create(1607167915, 987167468), + X64Word_create(1816402316, 1246189591) + ]; + var W = []; + (function() { + for (var i2 = 0; i2 < 80; i2++) { + W[i2] = X64Word_create(); + } + })(); + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function() { + this._hash = new X64WordArray.init([ + new X64Word.init(1779033703, 4089235720), + new X64Word.init(3144134277, 2227873595), + new X64Word.init(1013904242, 4271175723), + new X64Word.init(2773480762, 1595750129), + new X64Word.init(1359893119, 2917565137), + new X64Word.init(2600822924, 725511199), + new X64Word.init(528734635, 4215389547), + new X64Word.init(1541459225, 327033209) + ]); + }, + _doProcessBlock: function(M2, offset2) { + var H = this._hash.words; + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + for (var i2 = 0; i2 < 80; i2++) { + var Wil; + var Wih; + var Wi = W[i2]; + if (i2 < 16) { + Wih = Wi.high = M2[offset2 + i2 * 2] | 0; + Wil = Wi.low = M2[offset2 + i2 * 2 + 1] | 0; + } else { + var gamma0x = W[i2 - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7; + var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25); + var gamma1x = W[i2 - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6; + var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26); + var Wi7 = W[i2 - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + var Wi16 = W[i2 - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + Wil = gamma0l + Wi7l; + Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0); + Wil = Wil + gamma1l; + Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0); + Wil = Wil + Wi16l; + Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0); + Wi.high = Wih; + Wi.low = Wil; + } + var chh = eh & fh ^ ~eh & gh; + var chl = el & fl ^ ~el & gl; + var majh = ah & bh ^ ah & ch ^ bh & ch; + var majl = al & bl ^ al & cl ^ bl & cl; + var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7); + var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7); + var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9); + var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9); + var Ki = K[i2]; + var Kih = Ki.high; + var Kil = Ki.low; + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0); + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0); + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = dl + t1l | 0; + eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = t1l + t2l | 0; + ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0; + } + H0l = H0.low = H0l + al; + H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0); + H1l = H1.low = H1l + bl; + H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0); + H2l = H2.low = H2l + cl; + H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0); + H3l = H3.low = H3l + dl; + H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0); + H4l = H4.low = H4l + el; + H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0); + H5l = H5.low = H5l + fl; + H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0); + H6l = H6.low = H6l + gl; + H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0); + H7l = H7.low = H7l + hl; + H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0); + }, + _doFinalize: function() { + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; + dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 4294967296); + dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + this._process(); + var hash = this._hash.toX32(); + return hash; + }, + clone: function() { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + return clone; + }, + blockSize: 1024 / 32 + }); + C.SHA512 = Hasher._createHelper(SHA512); + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + })(); + return CryptoJS.SHA512; + }); + } +}); + +// node_modules/crypto-js/sha384.js +var require_sha384 = __commonJS({ + "node_modules/crypto-js/sha384.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_x64_core(), require_sha512()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./x64-core", "./sha512"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function() { + this._hash = new X64WordArray.init([ + new X64Word.init(3418070365, 3238371032), + new X64Word.init(1654270250, 914150663), + new X64Word.init(2438529370, 812702999), + new X64Word.init(355462360, 4144912697), + new X64Word.init(1731405415, 4290775857), + new X64Word.init(2394180231, 1750603025), + new X64Word.init(3675008525, 1694076839), + new X64Word.init(1203062813, 3204075428) + ]); + }, + _doFinalize: function() { + var hash = SHA512._doFinalize.call(this); + hash.sigBytes -= 16; + return hash; + } + }); + C.SHA384 = SHA512._createHelper(SHA384); + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + })(); + return CryptoJS.SHA384; + }); + } +}); + +// node_modules/crypto-js/sha3.js +var require_sha3 = __commonJS({ + "node_modules/crypto-js/sha3.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_x64_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./x64-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function(Math2) { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + (function() { + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64; + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5; + } + } + var LFSR = 1; + for (var i2 = 0; i2 < 24; i2++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + for (var j = 0; j < 7; j++) { + if (LFSR & 1) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else { + roundConstantMsw ^= 1 << bitPosition - 32; + } + } + if (LFSR & 128) { + LFSR = LFSR << 1 ^ 113; + } else { + LFSR <<= 1; + } + } + ROUND_CONSTANTS[i2] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + })(); + var T = []; + (function() { + for (var i2 = 0; i2 < 25; i2++) { + T[i2] = X64Word.create(); + } + })(); + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + _doReset: function() { + var state = this._state = []; + for (var i2 = 0; i2 < 25; i2++) { + state[i2] = new X64Word.init(); + } + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + _doProcessBlock: function(M2, offset2) { + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + for (var i2 = 0; i2 < nBlockSizeLanes; i2++) { + var M2i = M2[offset2 + 2 * i2]; + var M2i1 = M2[offset2 + 2 * i2 + 1]; + M2i = (M2i << 8 | M2i >>> 24) & 16711935 | (M2i << 24 | M2i >>> 8) & 4278255360; + M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 16711935 | (M2i1 << 24 | M2i1 >>> 8) & 4278255360; + var lane = state[i2]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + for (var round = 0; round < 24; round++) { + for (var x = 0; x < 5; x++) { + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31); + var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + var tMsw; + var tLsw; + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + if (rhoOffset < 32) { + tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset; + tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset; + } else { + tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset; + tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset; + } + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[(x + 1) % 5 + 5 * y]; + var Tx2Lane = T[(x + 2) % 5 + 5 * y]; + lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high; + lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low; + } + } + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low; + } + }, + _doFinalize: function() { + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + dataWords[nBitsLeft >>> 5] |= 1 << 24 - nBitsLeft % 32; + dataWords[(Math2.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 128; + data.sigBytes = dataWords.length * 4; + this._process(); + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + var hashWords = []; + for (var i2 = 0; i2 < outputLengthLanes; i2++) { + var lane = state[i2]; + var laneMsw = lane.high; + var laneLsw = lane.low; + laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 16711935 | (laneMsw << 24 | laneMsw >>> 8) & 4278255360; + laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 16711935 | (laneLsw << 24 | laneLsw >>> 8) & 4278255360; + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + return new WordArray.init(hashWords, outputLengthBytes); + }, + clone: function() { + var clone = Hasher.clone.call(this); + var state = clone._state = this._state.slice(0); + for (var i2 = 0; i2 < 25; i2++) { + state[i2] = state[i2].clone(); + } + return clone; + } + }); + C.SHA3 = Hasher._createHelper(SHA3); + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + })(Math); + return CryptoJS.SHA3; + }); + } +}); + +// node_modules/crypto-js/ripemd160.js +var require_ripemd160 = __commonJS({ + "node_modules/crypto-js/ripemd160.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function(Math2) { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + var _zl = WordArray.create([ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 7, + 4, + 13, + 1, + 10, + 6, + 15, + 3, + 12, + 0, + 9, + 5, + 2, + 14, + 11, + 8, + 3, + 10, + 14, + 4, + 9, + 15, + 8, + 1, + 2, + 7, + 0, + 6, + 13, + 11, + 5, + 12, + 1, + 9, + 11, + 10, + 0, + 8, + 12, + 4, + 13, + 3, + 7, + 15, + 14, + 5, + 6, + 2, + 4, + 0, + 5, + 9, + 7, + 12, + 2, + 10, + 14, + 1, + 3, + 8, + 11, + 6, + 15, + 13 + ]); + var _zr = WordArray.create([ + 5, + 14, + 7, + 0, + 9, + 2, + 11, + 4, + 13, + 6, + 15, + 8, + 1, + 10, + 3, + 12, + 6, + 11, + 3, + 7, + 0, + 13, + 5, + 10, + 14, + 15, + 8, + 12, + 4, + 9, + 1, + 2, + 15, + 5, + 1, + 3, + 7, + 14, + 6, + 9, + 11, + 8, + 12, + 2, + 10, + 0, + 4, + 13, + 8, + 6, + 4, + 1, + 3, + 11, + 15, + 0, + 5, + 12, + 2, + 13, + 9, + 7, + 10, + 14, + 12, + 15, + 10, + 4, + 1, + 5, + 8, + 7, + 6, + 2, + 13, + 14, + 0, + 3, + 9, + 11 + ]); + var _sl = WordArray.create([ + 11, + 14, + 15, + 12, + 5, + 8, + 7, + 9, + 11, + 13, + 14, + 15, + 6, + 7, + 9, + 8, + 7, + 6, + 8, + 13, + 11, + 9, + 7, + 15, + 7, + 12, + 15, + 9, + 11, + 7, + 13, + 12, + 11, + 13, + 6, + 7, + 14, + 9, + 13, + 15, + 14, + 8, + 13, + 6, + 5, + 12, + 7, + 5, + 11, + 12, + 14, + 15, + 14, + 15, + 9, + 8, + 9, + 14, + 5, + 6, + 8, + 6, + 5, + 12, + 9, + 15, + 5, + 11, + 6, + 8, + 13, + 12, + 5, + 12, + 13, + 14, + 11, + 8, + 5, + 6 + ]); + var _sr = WordArray.create([ + 8, + 9, + 9, + 11, + 13, + 15, + 15, + 5, + 7, + 7, + 8, + 11, + 14, + 14, + 12, + 6, + 9, + 13, + 15, + 7, + 12, + 8, + 9, + 11, + 7, + 7, + 12, + 7, + 6, + 15, + 13, + 11, + 9, + 7, + 15, + 11, + 8, + 6, + 6, + 14, + 12, + 13, + 5, + 14, + 13, + 13, + 7, + 5, + 15, + 5, + 8, + 11, + 14, + 14, + 6, + 14, + 6, + 9, + 12, + 9, + 12, + 5, + 15, + 8, + 8, + 5, + 12, + 9, + 12, + 5, + 14, + 6, + 8, + 13, + 6, + 5, + 15, + 13, + 11, + 11 + ]); + var _hl = WordArray.create([0, 1518500249, 1859775393, 2400959708, 2840853838]); + var _hr = WordArray.create([1352829926, 1548603684, 1836072691, 2053994217, 0]); + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function() { + this._hash = WordArray.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); + }, + _doProcessBlock: function(M2, offset2) { + for (var i2 = 0; i2 < 16; i2++) { + var offset_i = offset2 + i2; + var M_offset_i = M2[offset_i]; + M2[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360; + } + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + var t; + for (var i2 = 0; i2 < 80; i2 += 1) { + t = al + M2[offset2 + zl[i2]] | 0; + if (i2 < 16) { + t += f1(bl, cl, dl) + hl[0]; + } else if (i2 < 32) { + t += f2(bl, cl, dl) + hl[1]; + } else if (i2 < 48) { + t += f3(bl, cl, dl) + hl[2]; + } else if (i2 < 64) { + t += f4(bl, cl, dl) + hl[3]; + } else { + t += f5(bl, cl, dl) + hl[4]; + } + t = t | 0; + t = rotl(t, sl[i2]); + t = t + el | 0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + t = ar + M2[offset2 + zr[i2]] | 0; + if (i2 < 16) { + t += f5(br, cr, dr) + hr[0]; + } else if (i2 < 32) { + t += f4(br, cr, dr) + hr[1]; + } else if (i2 < 48) { + t += f3(br, cr, dr) + hr[2]; + } else if (i2 < 64) { + t += f2(br, cr, dr) + hr[3]; + } else { + t += f1(br, cr, dr) + hr[4]; + } + t = t | 0; + t = rotl(t, sr[i2]); + t = t + er | 0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + t = H[1] + cl + dr | 0; + H[1] = H[2] + dl + er | 0; + H[2] = H[3] + el + ar | 0; + H[3] = H[4] + al + br | 0; + H[4] = H[0] + bl + cr | 0; + H[0] = t; + }, + _doFinalize: function() { + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; + dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 16711935 | (nBitsTotal << 24 | nBitsTotal >>> 8) & 4278255360; + data.sigBytes = (dataWords.length + 1) * 4; + this._process(); + var hash = this._hash; + var H = hash.words; + for (var i2 = 0; i2 < 5; i2++) { + var H_i = H[i2]; + H[i2] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360; + } + return hash; + }, + clone: function() { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + return clone; + } + }); + function f1(x, y, z2) { + return x ^ y ^ z2; + } + function f2(x, y, z2) { + return x & y | ~x & z2; + } + function f3(x, y, z2) { + return (x | ~y) ^ z2; + } + function f4(x, y, z2) { + return x & z2 | y & ~z2; + } + function f5(x, y, z2) { + return x ^ (y | ~z2); + } + function rotl(x, n) { + return x << n | x >>> 32 - n; + } + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + })(Math); + return CryptoJS.RIPEMD160; + }); + } +}); + +// node_modules/crypto-js/hmac.js +var require_hmac = __commonJS({ + "node_modules/crypto-js/hmac.js"(exports2, module2) { + (function(root, factory) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function(hasher, key) { + hasher = this._hasher = new hasher.init(); + if (typeof key == "string") { + key = Utf8.parse(key); + } + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + key.clamp(); + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + for (var i2 = 0; i2 < hasherBlockSize; i2++) { + oKeyWords[i2] ^= 1549556828; + iKeyWords[i2] ^= 909522486; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + this.reset(); + }, + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function() { + var hasher = this._hasher; + hasher.reset(); + hasher.update(this._iKey); + }, + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function(messageUpdate) { + this._hasher.update(messageUpdate); + return this; + }, + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function(messageUpdate) { + var hasher = this._hasher; + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + return hmac; + } + }); + })(); + }); + } +}); + +// node_modules/crypto-js/pbkdf2.js +var require_pbkdf2 = __commonJS({ + "node_modules/crypto-js/pbkdf2.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_sha256(), require_hmac()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./sha256", "./hmac"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + var HMAC = C_algo.HMAC; + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA256 + * @property {number} iterations The number of iterations to perform. Default: 250000 + */ + cfg: Base.extend({ + keySize: 128 / 32, + hasher: SHA256, + iterations: 25e4 + }), + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function(cfg) { + this.cfg = this.cfg.extend(cfg); + }, + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function(password, salt) { + var cfg = this.cfg; + var hmac = HMAC.create(cfg.hasher, password); + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([1]); + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + var blockWords = block.words; + var blockWordsLength = blockWords.length; + var intermediate = block; + for (var i2 = 1; i2 < iterations; i2++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + var intermediateWords = intermediate.words; + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + return derivedKey; + } + }); + C.PBKDF2 = function(password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + })(); + return CryptoJS.PBKDF2; + }); + } +}); + +// node_modules/crypto-js/evpkdf.js +var require_evpkdf = __commonJS({ + "node_modules/crypto-js/evpkdf.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_sha1(), require_hmac()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./sha1", "./hmac"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128 / 32, + hasher: MD5, + iterations: 1 + }), + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function(cfg) { + this.cfg = this.cfg.extend(cfg); + }, + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function(password, salt) { + var block; + var cfg = this.cfg; + var hasher = cfg.hasher.create(); + var derivedKey = WordArray.create(); + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + block = hasher.update(password).finalize(salt); + hasher.reset(); + for (var i2 = 1; i2 < iterations; i2++) { + block = hasher.finalize(block); + hasher.reset(); + } + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + return derivedKey; + } + }); + C.EvpKDF = function(password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + })(); + return CryptoJS.EvpKDF; + }); + } +}); + +// node_modules/crypto-js/cipher-core.js +var require_cipher_core = __commonJS({ + "node_modules/crypto-js/cipher-core.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_evpkdf()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./evpkdf"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.lib.Cipher || function(undefined2) { + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function(key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function(key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function(xformMode, key, cfg) { + this.cfg = this.cfg.extend(cfg); + this._xformMode = xformMode; + this._key = key; + this.reset(); + }, + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function() { + BufferedBlockAlgorithm.reset.call(this); + this._doReset(); + }, + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function(dataUpdate) { + this._append(dataUpdate); + return this._process(); + }, + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function(dataUpdate) { + if (dataUpdate) { + this._append(dataUpdate); + } + var finalProcessedData = this._doFinalize(); + return finalProcessedData; + }, + keySize: 128 / 32, + ivSize: 128 / 32, + _ENC_XFORM_MODE: 1, + _DEC_XFORM_MODE: 2, + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: /* @__PURE__ */ function() { + function selectCipherStrategy(key) { + if (typeof key == "string") { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + return function(cipher) { + return { + encrypt: function(message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + decrypt: function(ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }() + }); + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function() { + var finalProcessedBlocks = this._process(true); + return finalProcessedBlocks; + }, + blockSize: 1 + }); + var C_mode = C.mode = {}; + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function(cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function(cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function(cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + var CBC = C_mode.CBC = function() { + var CBC2 = BlockCipherMode.extend(); + CBC2.Encryptor = CBC2.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function(words, offset2) { + var cipher = this._cipher; + var blockSize = cipher.blockSize; + xorBlock.call(this, words, offset2, blockSize); + cipher.encryptBlock(words, offset2); + this._prevBlock = words.slice(offset2, offset2 + blockSize); + } + }); + CBC2.Decryptor = CBC2.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function(words, offset2) { + var cipher = this._cipher; + var blockSize = cipher.blockSize; + var thisBlock = words.slice(offset2, offset2 + blockSize); + cipher.decryptBlock(words, offset2); + xorBlock.call(this, words, offset2, blockSize); + this._prevBlock = thisBlock; + } + }); + function xorBlock(words, offset2, blockSize) { + var block; + var iv = this._iv; + if (iv) { + block = iv; + this._iv = undefined2; + } else { + block = this._prevBlock; + } + for (var i2 = 0; i2 < blockSize; i2++) { + words[offset2 + i2] ^= block[i2]; + } + } + return CBC2; + }(); + var C_pad = C.pad = {}; + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function(data, blockSize) { + var blockSizeBytes = blockSize * 4; + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes; + var paddingWords = []; + for (var i2 = 0; i2 < nPaddingBytes; i2 += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + data.concat(padding); + }, + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function(data) { + var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255; + data.sigBytes -= nPaddingBytes; + } + }; + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + reset: function() { + var modeCreator; + Cipher.reset.call(this); + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + if (this._xformMode == this._ENC_XFORM_MODE) { + modeCreator = mode.createEncryptor; + } else { + modeCreator = mode.createDecryptor; + this._minBufferSize = 1; + } + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + _doProcessBlock: function(words, offset2) { + this._mode.processBlock(words, offset2); + }, + _doFinalize: function() { + var finalProcessedBlocks; + var padding = this.cfg.padding; + if (this._xformMode == this._ENC_XFORM_MODE) { + padding.pad(this._data, this.blockSize); + finalProcessedBlocks = this._process(true); + } else { + finalProcessedBlocks = this._process(true); + padding.unpad(finalProcessedBlocks); + } + return finalProcessedBlocks; + }, + blockSize: 128 / 32 + }); + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function(cipherParams) { + this.mixIn(cipherParams); + }, + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function(formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + var C_format = C.format = {}; + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function(cipherParams) { + var wordArray; + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + if (salt) { + wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext); + } else { + wordArray = ciphertext; + } + return wordArray.toString(Base64); + }, + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function(openSSLStr) { + var salt; + var ciphertext = Base64.parse(openSSLStr); + var ciphertextWords = ciphertext.words; + if (ciphertextWords[0] == 1398893684 && ciphertextWords[1] == 1701076831) { + salt = WordArray.create(ciphertextWords.slice(2, 4)); + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + return CipherParams.create({ ciphertext, salt }); + } + }; + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function(cipher, message, key, cfg) { + cfg = this.cfg.extend(cfg); + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + var cipherCfg = encryptor.cfg; + return CipherParams.create({ + ciphertext, + key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function(cipher, ciphertext, key, cfg) { + cfg = this.cfg.extend(cfg); + ciphertext = this._parse(ciphertext, cfg.format); + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + return plaintext; + }, + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function(ciphertext, format) { + if (typeof ciphertext == "string") { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + var C_kdf = C.kdf = {}; + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function(password, keySize, ivSize, salt, hasher) { + if (!salt) { + salt = WordArray.random(64 / 8); + } + if (!hasher) { + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + } else { + var key = EvpKDF.create({ keySize: keySize + ivSize, hasher }).compute(password, salt); + } + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + return CipherParams.create({ key, iv, salt }); + } + }; + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function(cipher, message, password, cfg) { + cfg = this.cfg.extend(cfg); + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); + cfg.iv = derivedParams.iv; + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + ciphertext.mixIn(derivedParams); + return ciphertext; + }, + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function(cipher, ciphertext, password, cfg) { + cfg = this.cfg.extend(cfg); + ciphertext = this._parse(ciphertext, cfg.format); + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); + cfg.iv = derivedParams.iv; + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + return plaintext; + } + }); + }(); + }); + } +}); + +// node_modules/crypto-js/mode-cfb.js +var require_mode_cfb = __commonJS({ + "node_modules/crypto-js/mode-cfb.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.mode.CFB = function() { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + CFB.Encryptor = CFB.extend({ + processBlock: function(words, offset2) { + var cipher = this._cipher; + var blockSize = cipher.blockSize; + generateKeystreamAndEncrypt.call(this, words, offset2, blockSize, cipher); + this._prevBlock = words.slice(offset2, offset2 + blockSize); + } + }); + CFB.Decryptor = CFB.extend({ + processBlock: function(words, offset2) { + var cipher = this._cipher; + var blockSize = cipher.blockSize; + var thisBlock = words.slice(offset2, offset2 + blockSize); + generateKeystreamAndEncrypt.call(this, words, offset2, blockSize, cipher); + this._prevBlock = thisBlock; + } + }); + function generateKeystreamAndEncrypt(words, offset2, blockSize, cipher) { + var keystream; + var iv = this._iv; + if (iv) { + keystream = iv.slice(0); + this._iv = void 0; + } else { + keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + for (var i2 = 0; i2 < blockSize; i2++) { + words[offset2 + i2] ^= keystream[i2]; + } + } + return CFB; + }(); + return CryptoJS.mode.CFB; + }); + } +}); + +// node_modules/crypto-js/mode-ctr.js +var require_mode_ctr = __commonJS({ + "node_modules/crypto-js/mode-ctr.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.mode.CTR = function() { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function(words, offset2) { + var cipher = this._cipher; + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + if (iv) { + counter = this._counter = iv.slice(0); + this._iv = void 0; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0; + for (var i2 = 0; i2 < blockSize; i2++) { + words[offset2 + i2] ^= keystream[i2]; + } + } + }); + CTR.Decryptor = Encryptor; + return CTR; + }(); + return CryptoJS.mode.CTR; + }); + } +}); + +// node_modules/crypto-js/mode-ctr-gladman.js +var require_mode_ctr_gladman = __commonJS({ + "node_modules/crypto-js/mode-ctr-gladman.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.mode.CTRGladman = function() { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + function incWord(word) { + if ((word >> 24 & 255) === 255) { + var b1 = word >> 16 & 255; + var b2 = word >> 8 & 255; + var b3 = word & 255; + if (b1 === 255) { + b1 = 0; + if (b2 === 255) { + b2 = 0; + if (b3 === 255) { + b3 = 0; + } else { + ++b3; + } + } else { + ++b2; + } + } else { + ++b1; + } + word = 0; + word += b1 << 16; + word += b2 << 8; + word += b3; + } else { + word += 1 << 24; + } + return word; + } + function incCounter(counter) { + if ((counter[0] = incWord(counter[0])) === 0) { + counter[1] = incWord(counter[1]); + } + return counter; + } + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function(words, offset2) { + var cipher = this._cipher; + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + if (iv) { + counter = this._counter = iv.slice(0); + this._iv = void 0; + } + incCounter(counter); + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + for (var i2 = 0; i2 < blockSize; i2++) { + words[offset2 + i2] ^= keystream[i2]; + } + } + }); + CTRGladman.Decryptor = Encryptor; + return CTRGladman; + }(); + return CryptoJS.mode.CTRGladman; + }); + } +}); + +// node_modules/crypto-js/mode-ofb.js +var require_mode_ofb = __commonJS({ + "node_modules/crypto-js/mode-ofb.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.mode.OFB = function() { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function(words, offset2) { + var cipher = this._cipher; + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + if (iv) { + keystream = this._keystream = iv.slice(0); + this._iv = void 0; + } + cipher.encryptBlock(keystream, 0); + for (var i2 = 0; i2 < blockSize; i2++) { + words[offset2 + i2] ^= keystream[i2]; + } + } + }); + OFB.Decryptor = Encryptor; + return OFB; + }(); + return CryptoJS.mode.OFB; + }); + } +}); + +// node_modules/crypto-js/mode-ecb.js +var require_mode_ecb = __commonJS({ + "node_modules/crypto-js/mode-ecb.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.mode.ECB = function() { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + ECB.Encryptor = ECB.extend({ + processBlock: function(words, offset2) { + this._cipher.encryptBlock(words, offset2); + } + }); + ECB.Decryptor = ECB.extend({ + processBlock: function(words, offset2) { + this._cipher.decryptBlock(words, offset2); + } + }); + return ECB; + }(); + return CryptoJS.mode.ECB; + }); + } +}); + +// node_modules/crypto-js/pad-ansix923.js +var require_pad_ansix923 = __commonJS({ + "node_modules/crypto-js/pad-ansix923.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.pad.AnsiX923 = { + pad: function(data, blockSize) { + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8; + data.sigBytes += nPaddingBytes; + }, + unpad: function(data) { + var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255; + data.sigBytes -= nPaddingBytes; + } + }; + return CryptoJS.pad.Ansix923; + }); + } +}); + +// node_modules/crypto-js/pad-iso10126.js +var require_pad_iso10126 = __commonJS({ + "node_modules/crypto-js/pad-iso10126.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.pad.Iso10126 = { + pad: function(data, blockSize) { + var blockSizeBytes = blockSize * 4; + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + unpad: function(data) { + var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255; + data.sigBytes -= nPaddingBytes; + } + }; + return CryptoJS.pad.Iso10126; + }); + } +}); + +// node_modules/crypto-js/pad-iso97971.js +var require_pad_iso97971 = __commonJS({ + "node_modules/crypto-js/pad-iso97971.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.pad.Iso97971 = { + pad: function(data, blockSize) { + data.concat(CryptoJS.lib.WordArray.create([2147483648], 1)); + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + unpad: function(data) { + CryptoJS.pad.ZeroPadding.unpad(data); + data.sigBytes--; + } + }; + return CryptoJS.pad.Iso97971; + }); + } +}); + +// node_modules/crypto-js/pad-zeropadding.js +var require_pad_zeropadding = __commonJS({ + "node_modules/crypto-js/pad-zeropadding.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.pad.ZeroPadding = { + pad: function(data, blockSize) { + var blockSizeBytes = blockSize * 4; + data.clamp(); + data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes); + }, + unpad: function(data) { + var dataWords = data.words; + var i2 = data.sigBytes - 1; + for (var i2 = data.sigBytes - 1; i2 >= 0; i2--) { + if (dataWords[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) { + data.sigBytes = i2 + 1; + break; + } + } + } + }; + return CryptoJS.pad.ZeroPadding; + }); + } +}); + +// node_modules/crypto-js/pad-nopadding.js +var require_pad_nopadding = __commonJS({ + "node_modules/crypto-js/pad-nopadding.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + CryptoJS.pad.NoPadding = { + pad: function() { + }, + unpad: function() { + } + }; + return CryptoJS.pad.NoPadding; + }); + } +}); + +// node_modules/crypto-js/format-hex.js +var require_format_hex = __commonJS({ + "node_modules/crypto-js/format-hex.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function(undefined2) { + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function(cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function(input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext }); + } + }; + })(); + return CryptoJS.format.Hex; + }); + } +}); + +// node_modules/crypto-js/aes.js +var require_aes = __commonJS({ + "node_modules/crypto-js/aes.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + (function() { + var d = []; + for (var i2 = 0; i2 < 256; i2++) { + if (i2 < 128) { + d[i2] = i2 << 1; + } else { + d[i2] = i2 << 1 ^ 283; + } + } + var x = 0; + var xi = 0; + for (var i2 = 0; i2 < 256; i2++) { + var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4; + sx = sx >>> 8 ^ sx & 255 ^ 99; + SBOX[x] = sx; + INV_SBOX[sx] = x; + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + var t = d[sx] * 257 ^ sx * 16843008; + SUB_MIX_0[x] = t << 24 | t >>> 8; + SUB_MIX_1[x] = t << 16 | t >>> 16; + SUB_MIX_2[x] = t << 8 | t >>> 24; + SUB_MIX_3[x] = t; + var t = x8 * 16843009 ^ x4 * 65537 ^ x2 * 257 ^ x * 16843008; + INV_SUB_MIX_0[sx] = t << 24 | t >>> 8; + INV_SUB_MIX_1[sx] = t << 16 | t >>> 16; + INV_SUB_MIX_2[sx] = t << 8 | t >>> 24; + INV_SUB_MIX_3[sx] = t; + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + })(); + var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function() { + var t; + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + var nRounds = this._nRounds = keySize + 6; + var ksRows = (nRounds + 1) * 4; + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + t = keySchedule[ksRow - 1]; + if (!(ksRow % keySize)) { + t = t << 8 | t >>> 24; + t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255]; + t ^= RCON[ksRow / keySize | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255]; + } + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 255]] ^ INV_SUB_MIX_2[SBOX[t >>> 8 & 255]] ^ INV_SUB_MIX_3[SBOX[t & 255]]; + } + } + }, + encryptBlock: function(M2, offset2) { + this._doCryptBlock(M2, offset2, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + decryptBlock: function(M2, offset2) { + var t = M2[offset2 + 1]; + M2[offset2 + 1] = M2[offset2 + 3]; + M2[offset2 + 3] = t; + this._doCryptBlock(M2, offset2, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + var t = M2[offset2 + 1]; + M2[offset2 + 1] = M2[offset2 + 3]; + M2[offset2 + 3] = t; + }, + _doCryptBlock: function(M2, offset2, keySchedule, SUB_MIX_02, SUB_MIX_12, SUB_MIX_22, SUB_MIX_32, SBOX2) { + var nRounds = this._nRounds; + var s0 = M2[offset2] ^ keySchedule[0]; + var s1 = M2[offset2 + 1] ^ keySchedule[1]; + var s2 = M2[offset2 + 2] ^ keySchedule[2]; + var s3 = M2[offset2 + 3] ^ keySchedule[3]; + var ksRow = 4; + for (var round = 1; round < nRounds; round++) { + var t0 = SUB_MIX_02[s0 >>> 24] ^ SUB_MIX_12[s1 >>> 16 & 255] ^ SUB_MIX_22[s2 >>> 8 & 255] ^ SUB_MIX_32[s3 & 255] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_02[s1 >>> 24] ^ SUB_MIX_12[s2 >>> 16 & 255] ^ SUB_MIX_22[s3 >>> 8 & 255] ^ SUB_MIX_32[s0 & 255] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_02[s2 >>> 24] ^ SUB_MIX_12[s3 >>> 16 & 255] ^ SUB_MIX_22[s0 >>> 8 & 255] ^ SUB_MIX_32[s1 & 255] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_02[s3 >>> 24] ^ SUB_MIX_12[s0 >>> 16 & 255] ^ SUB_MIX_22[s1 >>> 8 & 255] ^ SUB_MIX_32[s2 & 255] ^ keySchedule[ksRow++]; + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + var t0 = (SBOX2[s0 >>> 24] << 24 | SBOX2[s1 >>> 16 & 255] << 16 | SBOX2[s2 >>> 8 & 255] << 8 | SBOX2[s3 & 255]) ^ keySchedule[ksRow++]; + var t1 = (SBOX2[s1 >>> 24] << 24 | SBOX2[s2 >>> 16 & 255] << 16 | SBOX2[s3 >>> 8 & 255] << 8 | SBOX2[s0 & 255]) ^ keySchedule[ksRow++]; + var t2 = (SBOX2[s2 >>> 24] << 24 | SBOX2[s3 >>> 16 & 255] << 16 | SBOX2[s0 >>> 8 & 255] << 8 | SBOX2[s1 & 255]) ^ keySchedule[ksRow++]; + var t3 = (SBOX2[s3 >>> 24] << 24 | SBOX2[s0 >>> 16 & 255] << 16 | SBOX2[s1 >>> 8 & 255] << 8 | SBOX2[s2 & 255]) ^ keySchedule[ksRow++]; + M2[offset2] = t0; + M2[offset2 + 1] = t1; + M2[offset2 + 2] = t2; + M2[offset2 + 3] = t3; + }, + keySize: 256 / 32 + }); + C.AES = BlockCipher._createHelper(AES); + })(); + return CryptoJS.AES; + }); + } +}); + +// node_modules/crypto-js/tripledes.js +var require_tripledes = __commonJS({ + "node_modules/crypto-js/tripledes.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + var PC1 = [ + 57, + 49, + 41, + 33, + 25, + 17, + 9, + 1, + 58, + 50, + 42, + 34, + 26, + 18, + 10, + 2, + 59, + 51, + 43, + 35, + 27, + 19, + 11, + 3, + 60, + 52, + 44, + 36, + 63, + 55, + 47, + 39, + 31, + 23, + 15, + 7, + 62, + 54, + 46, + 38, + 30, + 22, + 14, + 6, + 61, + 53, + 45, + 37, + 29, + 21, + 13, + 5, + 28, + 20, + 12, + 4 + ]; + var PC2 = [ + 14, + 17, + 11, + 24, + 1, + 5, + 3, + 28, + 15, + 6, + 21, + 10, + 23, + 19, + 12, + 4, + 26, + 8, + 16, + 7, + 27, + 20, + 13, + 2, + 41, + 52, + 31, + 37, + 47, + 55, + 30, + 40, + 51, + 45, + 33, + 48, + 44, + 49, + 39, + 56, + 34, + 53, + 46, + 42, + 50, + 36, + 29, + 32 + ]; + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + var SBOX_P = [ + { + 0: 8421888, + 268435456: 32768, + 536870912: 8421378, + 805306368: 2, + 1073741824: 512, + 1342177280: 8421890, + 1610612736: 8389122, + 1879048192: 8388608, + 2147483648: 514, + 2415919104: 8389120, + 2684354560: 33280, + 2952790016: 8421376, + 3221225472: 32770, + 3489660928: 8388610, + 3758096384: 0, + 4026531840: 33282, + 134217728: 0, + 402653184: 8421890, + 671088640: 33282, + 939524096: 32768, + 1207959552: 8421888, + 1476395008: 512, + 1744830464: 8421378, + 2013265920: 2, + 2281701376: 8389120, + 2550136832: 33280, + 2818572288: 8421376, + 3087007744: 8389122, + 3355443200: 8388610, + 3623878656: 32770, + 3892314112: 514, + 4160749568: 8388608, + 1: 32768, + 268435457: 2, + 536870913: 8421888, + 805306369: 8388608, + 1073741825: 8421378, + 1342177281: 33280, + 1610612737: 512, + 1879048193: 8389122, + 2147483649: 8421890, + 2415919105: 8421376, + 2684354561: 8388610, + 2952790017: 33282, + 3221225473: 514, + 3489660929: 8389120, + 3758096385: 32770, + 4026531841: 0, + 134217729: 8421890, + 402653185: 8421376, + 671088641: 8388608, + 939524097: 512, + 1207959553: 32768, + 1476395009: 8388610, + 1744830465: 2, + 2013265921: 33282, + 2281701377: 32770, + 2550136833: 8389122, + 2818572289: 514, + 3087007745: 8421888, + 3355443201: 8389120, + 3623878657: 0, + 3892314113: 33280, + 4160749569: 8421378 + }, + { + 0: 1074282512, + 16777216: 16384, + 33554432: 524288, + 50331648: 1074266128, + 67108864: 1073741840, + 83886080: 1074282496, + 100663296: 1073758208, + 117440512: 16, + 134217728: 540672, + 150994944: 1073758224, + 167772160: 1073741824, + 184549376: 540688, + 201326592: 524304, + 218103808: 0, + 234881024: 16400, + 251658240: 1074266112, + 8388608: 1073758208, + 25165824: 540688, + 41943040: 16, + 58720256: 1073758224, + 75497472: 1074282512, + 92274688: 1073741824, + 109051904: 524288, + 125829120: 1074266128, + 142606336: 524304, + 159383552: 0, + 176160768: 16384, + 192937984: 1074266112, + 209715200: 1073741840, + 226492416: 540672, + 243269632: 1074282496, + 260046848: 16400, + 268435456: 0, + 285212672: 1074266128, + 301989888: 1073758224, + 318767104: 1074282496, + 335544320: 1074266112, + 352321536: 16, + 369098752: 540688, + 385875968: 16384, + 402653184: 16400, + 419430400: 524288, + 436207616: 524304, + 452984832: 1073741840, + 469762048: 540672, + 486539264: 1073758208, + 503316480: 1073741824, + 520093696: 1074282512, + 276824064: 540688, + 293601280: 524288, + 310378496: 1074266112, + 327155712: 16384, + 343932928: 1073758208, + 360710144: 1074282512, + 377487360: 16, + 394264576: 1073741824, + 411041792: 1074282496, + 427819008: 1073741840, + 444596224: 1073758224, + 461373440: 524304, + 478150656: 0, + 494927872: 16400, + 511705088: 1074266128, + 528482304: 540672 + }, + { + 0: 260, + 1048576: 0, + 2097152: 67109120, + 3145728: 65796, + 4194304: 65540, + 5242880: 67108868, + 6291456: 67174660, + 7340032: 67174400, + 8388608: 67108864, + 9437184: 67174656, + 10485760: 65792, + 11534336: 67174404, + 12582912: 67109124, + 13631488: 65536, + 14680064: 4, + 15728640: 256, + 524288: 67174656, + 1572864: 67174404, + 2621440: 0, + 3670016: 67109120, + 4718592: 67108868, + 5767168: 65536, + 6815744: 65540, + 7864320: 260, + 8912896: 4, + 9961472: 256, + 11010048: 67174400, + 12058624: 65796, + 13107200: 65792, + 14155776: 67109124, + 15204352: 67174660, + 16252928: 67108864, + 16777216: 67174656, + 17825792: 65540, + 18874368: 65536, + 19922944: 67109120, + 20971520: 256, + 22020096: 67174660, + 23068672: 67108868, + 24117248: 0, + 25165824: 67109124, + 26214400: 67108864, + 27262976: 4, + 28311552: 65792, + 29360128: 67174400, + 30408704: 260, + 31457280: 65796, + 32505856: 67174404, + 17301504: 67108864, + 18350080: 260, + 19398656: 67174656, + 20447232: 0, + 21495808: 65540, + 22544384: 67109120, + 23592960: 256, + 24641536: 67174404, + 25690112: 65536, + 26738688: 67174660, + 27787264: 65796, + 28835840: 67108868, + 29884416: 67109124, + 30932992: 67174400, + 31981568: 4, + 33030144: 65792 + }, + { + 0: 2151682048, + 65536: 2147487808, + 131072: 4198464, + 196608: 2151677952, + 262144: 0, + 327680: 4198400, + 393216: 2147483712, + 458752: 4194368, + 524288: 2147483648, + 589824: 4194304, + 655360: 64, + 720896: 2147487744, + 786432: 2151678016, + 851968: 4160, + 917504: 4096, + 983040: 2151682112, + 32768: 2147487808, + 98304: 64, + 163840: 2151678016, + 229376: 2147487744, + 294912: 4198400, + 360448: 2151682112, + 425984: 0, + 491520: 2151677952, + 557056: 4096, + 622592: 2151682048, + 688128: 4194304, + 753664: 4160, + 819200: 2147483648, + 884736: 4194368, + 950272: 4198464, + 1015808: 2147483712, + 1048576: 4194368, + 1114112: 4198400, + 1179648: 2147483712, + 1245184: 0, + 1310720: 4160, + 1376256: 2151678016, + 1441792: 2151682048, + 1507328: 2147487808, + 1572864: 2151682112, + 1638400: 2147483648, + 1703936: 2151677952, + 1769472: 4198464, + 1835008: 2147487744, + 1900544: 4194304, + 1966080: 64, + 2031616: 4096, + 1081344: 2151677952, + 1146880: 2151682112, + 1212416: 0, + 1277952: 4198400, + 1343488: 4194368, + 1409024: 2147483648, + 1474560: 2147487808, + 1540096: 64, + 1605632: 2147483712, + 1671168: 4096, + 1736704: 2147487744, + 1802240: 2151678016, + 1867776: 4160, + 1933312: 2151682048, + 1998848: 4194304, + 2064384: 4198464 + }, + { + 0: 128, + 4096: 17039360, + 8192: 262144, + 12288: 536870912, + 16384: 537133184, + 20480: 16777344, + 24576: 553648256, + 28672: 262272, + 32768: 16777216, + 36864: 537133056, + 40960: 536871040, + 45056: 553910400, + 49152: 553910272, + 53248: 0, + 57344: 17039488, + 61440: 553648128, + 2048: 17039488, + 6144: 553648256, + 10240: 128, + 14336: 17039360, + 18432: 262144, + 22528: 537133184, + 26624: 553910272, + 30720: 536870912, + 34816: 537133056, + 38912: 0, + 43008: 553910400, + 47104: 16777344, + 51200: 536871040, + 55296: 553648128, + 59392: 16777216, + 63488: 262272, + 65536: 262144, + 69632: 128, + 73728: 536870912, + 77824: 553648256, + 81920: 16777344, + 86016: 553910272, + 90112: 537133184, + 94208: 16777216, + 98304: 553910400, + 102400: 553648128, + 106496: 17039360, + 110592: 537133056, + 114688: 262272, + 118784: 536871040, + 122880: 0, + 126976: 17039488, + 67584: 553648256, + 71680: 16777216, + 75776: 17039360, + 79872: 537133184, + 83968: 536870912, + 88064: 17039488, + 92160: 128, + 96256: 553910272, + 100352: 262272, + 104448: 553910400, + 108544: 0, + 112640: 553648128, + 116736: 16777344, + 120832: 262144, + 124928: 537133056, + 129024: 536871040 + }, + { + 0: 268435464, + 256: 8192, + 512: 270532608, + 768: 270540808, + 1024: 268443648, + 1280: 2097152, + 1536: 2097160, + 1792: 268435456, + 2048: 0, + 2304: 268443656, + 2560: 2105344, + 2816: 8, + 3072: 270532616, + 3328: 2105352, + 3584: 8200, + 3840: 270540800, + 128: 270532608, + 384: 270540808, + 640: 8, + 896: 2097152, + 1152: 2105352, + 1408: 268435464, + 1664: 268443648, + 1920: 8200, + 2176: 2097160, + 2432: 8192, + 2688: 268443656, + 2944: 270532616, + 3200: 0, + 3456: 270540800, + 3712: 2105344, + 3968: 268435456, + 4096: 268443648, + 4352: 270532616, + 4608: 270540808, + 4864: 8200, + 5120: 2097152, + 5376: 268435456, + 5632: 268435464, + 5888: 2105344, + 6144: 2105352, + 6400: 0, + 6656: 8, + 6912: 270532608, + 7168: 8192, + 7424: 268443656, + 7680: 270540800, + 7936: 2097160, + 4224: 8, + 4480: 2105344, + 4736: 2097152, + 4992: 268435464, + 5248: 268443648, + 5504: 8200, + 5760: 270540808, + 6016: 270532608, + 6272: 270540800, + 6528: 270532616, + 6784: 8192, + 7040: 2105352, + 7296: 2097160, + 7552: 0, + 7808: 268435456, + 8064: 268443656 + }, + { + 0: 1048576, + 16: 33555457, + 32: 1024, + 48: 1049601, + 64: 34604033, + 80: 0, + 96: 1, + 112: 34603009, + 128: 33555456, + 144: 1048577, + 160: 33554433, + 176: 34604032, + 192: 34603008, + 208: 1025, + 224: 1049600, + 240: 33554432, + 8: 34603009, + 24: 0, + 40: 33555457, + 56: 34604032, + 72: 1048576, + 88: 33554433, + 104: 33554432, + 120: 1025, + 136: 1049601, + 152: 33555456, + 168: 34603008, + 184: 1048577, + 200: 1024, + 216: 34604033, + 232: 1, + 248: 1049600, + 256: 33554432, + 272: 1048576, + 288: 33555457, + 304: 34603009, + 320: 1048577, + 336: 33555456, + 352: 34604032, + 368: 1049601, + 384: 1025, + 400: 34604033, + 416: 1049600, + 432: 1, + 448: 0, + 464: 34603008, + 480: 33554433, + 496: 1024, + 264: 1049600, + 280: 33555457, + 296: 34603009, + 312: 1, + 328: 33554432, + 344: 1048576, + 360: 1025, + 376: 34604032, + 392: 33554433, + 408: 34603008, + 424: 0, + 440: 34604033, + 456: 1049601, + 472: 1024, + 488: 33555456, + 504: 1048577 + }, + { + 0: 134219808, + 1: 131072, + 2: 134217728, + 3: 32, + 4: 131104, + 5: 134350880, + 6: 134350848, + 7: 2048, + 8: 134348800, + 9: 134219776, + 10: 133120, + 11: 134348832, + 12: 2080, + 13: 0, + 14: 134217760, + 15: 133152, + 2147483648: 2048, + 2147483649: 134350880, + 2147483650: 134219808, + 2147483651: 134217728, + 2147483652: 134348800, + 2147483653: 133120, + 2147483654: 133152, + 2147483655: 32, + 2147483656: 134217760, + 2147483657: 2080, + 2147483658: 131104, + 2147483659: 134350848, + 2147483660: 0, + 2147483661: 134348832, + 2147483662: 134219776, + 2147483663: 131072, + 16: 133152, + 17: 134350848, + 18: 32, + 19: 2048, + 20: 134219776, + 21: 134217760, + 22: 134348832, + 23: 131072, + 24: 0, + 25: 131104, + 26: 134348800, + 27: 134219808, + 28: 134350880, + 29: 133120, + 30: 2080, + 31: 134217728, + 2147483664: 131072, + 2147483665: 2048, + 2147483666: 134348832, + 2147483667: 133152, + 2147483668: 32, + 2147483669: 134348800, + 2147483670: 134217728, + 2147483671: 134219808, + 2147483672: 134350880, + 2147483673: 134217760, + 2147483674: 134219776, + 2147483675: 0, + 2147483676: 133120, + 2147483677: 2080, + 2147483678: 131104, + 2147483679: 134350848 + } + ]; + var SBOX_MASK = [ + 4160749569, + 528482304, + 33030144, + 2064384, + 129024, + 8064, + 504, + 2147483679 + ]; + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function() { + var key = this._key; + var keyWords = key.words; + var keyBits = []; + for (var i2 = 0; i2 < 56; i2++) { + var keyBitPos = PC1[i2] - 1; + keyBits[i2] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1; + } + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + var subKey = subKeys[nSubKey] = []; + var bitShift = BIT_SHIFTS[nSubKey]; + for (var i2 = 0; i2 < 24; i2++) { + subKey[i2 / 6 | 0] |= keyBits[(PC2[i2] - 1 + bitShift) % 28] << 31 - i2 % 6; + subKey[4 + (i2 / 6 | 0)] |= keyBits[28 + (PC2[i2 + 24] - 1 + bitShift) % 28] << 31 - i2 % 6; + } + subKey[0] = subKey[0] << 1 | subKey[0] >>> 31; + for (var i2 = 1; i2 < 7; i2++) { + subKey[i2] = subKey[i2] >>> (i2 - 1) * 4 + 3; + } + subKey[7] = subKey[7] << 5 | subKey[7] >>> 27; + } + var invSubKeys = this._invSubKeys = []; + for (var i2 = 0; i2 < 16; i2++) { + invSubKeys[i2] = subKeys[15 - i2]; + } + }, + encryptBlock: function(M2, offset2) { + this._doCryptBlock(M2, offset2, this._subKeys); + }, + decryptBlock: function(M2, offset2) { + this._doCryptBlock(M2, offset2, this._invSubKeys); + }, + _doCryptBlock: function(M2, offset2, subKeys) { + this._lBlock = M2[offset2]; + this._rBlock = M2[offset2 + 1]; + exchangeLR.call(this, 4, 252645135); + exchangeLR.call(this, 16, 65535); + exchangeRL.call(this, 2, 858993459); + exchangeRL.call(this, 8, 16711935); + exchangeLR.call(this, 1, 1431655765); + for (var round = 0; round < 16; round++) { + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + var f = 0; + for (var i2 = 0; i2 < 8; i2++) { + f |= SBOX_P[i2][((rBlock ^ subKey[i2]) & SBOX_MASK[i2]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + exchangeLR.call(this, 1, 1431655765); + exchangeRL.call(this, 8, 16711935); + exchangeRL.call(this, 2, 858993459); + exchangeLR.call(this, 16, 65535); + exchangeLR.call(this, 4, 252645135); + M2[offset2] = this._lBlock; + M2[offset2 + 1] = this._rBlock; + }, + keySize: 64 / 32, + ivSize: 64 / 32, + blockSize: 64 / 32 + }); + function exchangeLR(offset2, mask) { + var t = (this._lBlock >>> offset2 ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset2; + } + function exchangeRL(offset2, mask) { + var t = (this._rBlock >>> offset2 ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset2; + } + C.DES = BlockCipher._createHelper(DES); + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function() { + var key = this._key; + var keyWords = key.words; + if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { + throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); + } + var key1 = keyWords.slice(0, 2); + var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); + var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); + this._des1 = DES.createEncryptor(WordArray.create(key1)); + this._des2 = DES.createEncryptor(WordArray.create(key2)); + this._des3 = DES.createEncryptor(WordArray.create(key3)); + }, + encryptBlock: function(M2, offset2) { + this._des1.encryptBlock(M2, offset2); + this._des2.decryptBlock(M2, offset2); + this._des3.encryptBlock(M2, offset2); + }, + decryptBlock: function(M2, offset2) { + this._des3.decryptBlock(M2, offset2); + this._des2.encryptBlock(M2, offset2); + this._des1.decryptBlock(M2, offset2); + }, + keySize: 192 / 32, + ivSize: 64 / 32, + blockSize: 64 / 32 + }); + C.TripleDES = BlockCipher._createHelper(TripleDES); + })(); + return CryptoJS.TripleDES; + }); + } +}); + +// node_modules/crypto-js/rc4.js +var require_rc4 = __commonJS({ + "node_modules/crypto-js/rc4.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function() { + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + var S = this._S = []; + for (var i2 = 0; i2 < 256; i2++) { + S[i2] = i2; + } + for (var i2 = 0, j = 0; i2 < 256; i2++) { + var keyByteIndex = i2 % keySigBytes; + var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255; + j = (j + S[i2] + keyByte) % 256; + var t = S[i2]; + S[i2] = S[j]; + S[j] = t; + } + this._i = this._j = 0; + }, + _doProcessBlock: function(M2, offset2) { + M2[offset2] ^= generateKeystreamWord.call(this); + }, + keySize: 256 / 32, + ivSize: 0 + }); + function generateKeystreamWord() { + var S = this._S; + var i2 = this._i; + var j = this._j; + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i2 = (i2 + 1) % 256; + j = (j + S[i2]) % 256; + var t = S[i2]; + S[i2] = S[j]; + S[j] = t; + keystreamWord |= S[(S[i2] + S[j]) % 256] << 24 - n * 8; + } + this._i = i2; + this._j = j; + return keystreamWord; + } + C.RC4 = StreamCipher._createHelper(RC4); + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + _doReset: function() { + RC4._doReset.call(this); + for (var i2 = this.cfg.drop; i2 > 0; i2--) { + generateKeystreamWord.call(this); + } + } + }); + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + })(); + return CryptoJS.RC4; + }); + } +}); + +// node_modules/crypto-js/rabbit.js +var require_rabbit = __commonJS({ + "node_modules/crypto-js/rabbit.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + var S = []; + var C_ = []; + var G = []; + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function() { + var K = this._key.words; + var iv = this.cfg.iv; + for (var i2 = 0; i2 < 4; i2++) { + K[i2] = (K[i2] << 8 | K[i2] >>> 24) & 16711935 | (K[i2] << 24 | K[i2] >>> 8) & 4278255360; + } + var X = this._X = [ + K[0], + K[3] << 16 | K[2] >>> 16, + K[1], + K[0] << 16 | K[3] >>> 16, + K[2], + K[1] << 16 | K[0] >>> 16, + K[3], + K[2] << 16 | K[1] >>> 16 + ]; + var C2 = this._C = [ + K[2] << 16 | K[2] >>> 16, + K[0] & 4294901760 | K[1] & 65535, + K[3] << 16 | K[3] >>> 16, + K[1] & 4294901760 | K[2] & 65535, + K[0] << 16 | K[0] >>> 16, + K[2] & 4294901760 | K[3] & 65535, + K[1] << 16 | K[1] >>> 16, + K[3] & 4294901760 | K[0] & 65535 + ]; + this._b = 0; + for (var i2 = 0; i2 < 4; i2++) { + nextState.call(this); + } + for (var i2 = 0; i2 < 8; i2++) { + C2[i2] ^= X[i2 + 4 & 7]; + } + if (iv) { + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360; + var i22 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360; + var i1 = i0 >>> 16 | i22 & 4294901760; + var i3 = i22 << 16 | i0 & 65535; + C2[0] ^= i0; + C2[1] ^= i1; + C2[2] ^= i22; + C2[3] ^= i3; + C2[4] ^= i0; + C2[5] ^= i1; + C2[6] ^= i22; + C2[7] ^= i3; + for (var i2 = 0; i2 < 4; i2++) { + nextState.call(this); + } + } + }, + _doProcessBlock: function(M2, offset2) { + var X = this._X; + nextState.call(this); + S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; + S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; + S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; + S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; + for (var i2 = 0; i2 < 4; i2++) { + S[i2] = (S[i2] << 8 | S[i2] >>> 24) & 16711935 | (S[i2] << 24 | S[i2] >>> 8) & 4278255360; + M2[offset2 + i2] ^= S[i2]; + } + }, + blockSize: 128 / 32, + ivSize: 64 / 32 + }); + function nextState() { + var X = this._X; + var C2 = this._C; + for (var i2 = 0; i2 < 8; i2++) { + C_[i2] = C2[i2]; + } + C2[0] = C2[0] + 1295307597 + this._b | 0; + C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; + C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; + C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; + C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; + C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; + C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; + C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; + this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; + for (var i2 = 0; i2 < 8; i2++) { + var gx = X[i2] + C2[i2]; + var ga = gx & 65535; + var gb = gx >>> 16; + var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; + var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); + G[i2] = gh ^ gl; + } + X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; + X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; + X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; + X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; + X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; + X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; + X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; + X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; + } + C.Rabbit = StreamCipher._createHelper(Rabbit); + })(); + return CryptoJS.Rabbit; + }); + } +}); + +// node_modules/crypto-js/rabbit-legacy.js +var require_rabbit_legacy = __commonJS({ + "node_modules/crypto-js/rabbit-legacy.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + var S = []; + var C_ = []; + var G = []; + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function() { + var K = this._key.words; + var iv = this.cfg.iv; + var X = this._X = [ + K[0], + K[3] << 16 | K[2] >>> 16, + K[1], + K[0] << 16 | K[3] >>> 16, + K[2], + K[1] << 16 | K[0] >>> 16, + K[3], + K[2] << 16 | K[1] >>> 16 + ]; + var C2 = this._C = [ + K[2] << 16 | K[2] >>> 16, + K[0] & 4294901760 | K[1] & 65535, + K[3] << 16 | K[3] >>> 16, + K[1] & 4294901760 | K[2] & 65535, + K[0] << 16 | K[0] >>> 16, + K[2] & 4294901760 | K[3] & 65535, + K[1] << 16 | K[1] >>> 16, + K[3] & 4294901760 | K[0] & 65535 + ]; + this._b = 0; + for (var i2 = 0; i2 < 4; i2++) { + nextState.call(this); + } + for (var i2 = 0; i2 < 8; i2++) { + C2[i2] ^= X[i2 + 4 & 7]; + } + if (iv) { + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360; + var i22 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360; + var i1 = i0 >>> 16 | i22 & 4294901760; + var i3 = i22 << 16 | i0 & 65535; + C2[0] ^= i0; + C2[1] ^= i1; + C2[2] ^= i22; + C2[3] ^= i3; + C2[4] ^= i0; + C2[5] ^= i1; + C2[6] ^= i22; + C2[7] ^= i3; + for (var i2 = 0; i2 < 4; i2++) { + nextState.call(this); + } + } + }, + _doProcessBlock: function(M2, offset2) { + var X = this._X; + nextState.call(this); + S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; + S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; + S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; + S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; + for (var i2 = 0; i2 < 4; i2++) { + S[i2] = (S[i2] << 8 | S[i2] >>> 24) & 16711935 | (S[i2] << 24 | S[i2] >>> 8) & 4278255360; + M2[offset2 + i2] ^= S[i2]; + } + }, + blockSize: 128 / 32, + ivSize: 64 / 32 + }); + function nextState() { + var X = this._X; + var C2 = this._C; + for (var i2 = 0; i2 < 8; i2++) { + C_[i2] = C2[i2]; + } + C2[0] = C2[0] + 1295307597 + this._b | 0; + C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; + C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; + C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; + C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; + C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; + C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; + C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; + this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; + for (var i2 = 0; i2 < 8; i2++) { + var gx = X[i2] + C2[i2]; + var ga = gx & 65535; + var gb = gx >>> 16; + var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; + var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); + G[i2] = gh ^ gl; + } + X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; + X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; + X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; + X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; + X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; + X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; + X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; + X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; + } + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + })(); + return CryptoJS.RabbitLegacy; + }); + } +}); + +// node_modules/crypto-js/blowfish.js +var require_blowfish = __commonJS({ + "node_modules/crypto-js/blowfish.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } else { + factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + (function() { + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + const N = 16; + const ORIG_P = [ + 608135816, + 2242054355, + 320440878, + 57701188, + 2752067618, + 698298832, + 137296536, + 3964562569, + 1160258022, + 953160567, + 3193202383, + 887688300, + 3232508343, + 3380367581, + 1065670069, + 3041331479, + 2450970073, + 2306472731 + ]; + const ORIG_S = [ + [ + 3509652390, + 2564797868, + 805139163, + 3491422135, + 3101798381, + 1780907670, + 3128725573, + 4046225305, + 614570311, + 3012652279, + 134345442, + 2240740374, + 1667834072, + 1901547113, + 2757295779, + 4103290238, + 227898511, + 1921955416, + 1904987480, + 2182433518, + 2069144605, + 3260701109, + 2620446009, + 720527379, + 3318853667, + 677414384, + 3393288472, + 3101374703, + 2390351024, + 1614419982, + 1822297739, + 2954791486, + 3608508353, + 3174124327, + 2024746970, + 1432378464, + 3864339955, + 2857741204, + 1464375394, + 1676153920, + 1439316330, + 715854006, + 3033291828, + 289532110, + 2706671279, + 2087905683, + 3018724369, + 1668267050, + 732546397, + 1947742710, + 3462151702, + 2609353502, + 2950085171, + 1814351708, + 2050118529, + 680887927, + 999245976, + 1800124847, + 3300911131, + 1713906067, + 1641548236, + 4213287313, + 1216130144, + 1575780402, + 4018429277, + 3917837745, + 3693486850, + 3949271944, + 596196993, + 3549867205, + 258830323, + 2213823033, + 772490370, + 2760122372, + 1774776394, + 2652871518, + 566650946, + 4142492826, + 1728879713, + 2882767088, + 1783734482, + 3629395816, + 2517608232, + 2874225571, + 1861159788, + 326777828, + 3124490320, + 2130389656, + 2716951837, + 967770486, + 1724537150, + 2185432712, + 2364442137, + 1164943284, + 2105845187, + 998989502, + 3765401048, + 2244026483, + 1075463327, + 1455516326, + 1322494562, + 910128902, + 469688178, + 1117454909, + 936433444, + 3490320968, + 3675253459, + 1240580251, + 122909385, + 2157517691, + 634681816, + 4142456567, + 3825094682, + 3061402683, + 2540495037, + 79693498, + 3249098678, + 1084186820, + 1583128258, + 426386531, + 1761308591, + 1047286709, + 322548459, + 995290223, + 1845252383, + 2603652396, + 3431023940, + 2942221577, + 3202600964, + 3727903485, + 1712269319, + 422464435, + 3234572375, + 1170764815, + 3523960633, + 3117677531, + 1434042557, + 442511882, + 3600875718, + 1076654713, + 1738483198, + 4213154764, + 2393238008, + 3677496056, + 1014306527, + 4251020053, + 793779912, + 2902807211, + 842905082, + 4246964064, + 1395751752, + 1040244610, + 2656851899, + 3396308128, + 445077038, + 3742853595, + 3577915638, + 679411651, + 2892444358, + 2354009459, + 1767581616, + 3150600392, + 3791627101, + 3102740896, + 284835224, + 4246832056, + 1258075500, + 768725851, + 2589189241, + 3069724005, + 3532540348, + 1274779536, + 3789419226, + 2764799539, + 1660621633, + 3471099624, + 4011903706, + 913787905, + 3497959166, + 737222580, + 2514213453, + 2928710040, + 3937242737, + 1804850592, + 3499020752, + 2949064160, + 2386320175, + 2390070455, + 2415321851, + 4061277028, + 2290661394, + 2416832540, + 1336762016, + 1754252060, + 3520065937, + 3014181293, + 791618072, + 3188594551, + 3933548030, + 2332172193, + 3852520463, + 3043980520, + 413987798, + 3465142937, + 3030929376, + 4245938359, + 2093235073, + 3534596313, + 375366246, + 2157278981, + 2479649556, + 555357303, + 3870105701, + 2008414854, + 3344188149, + 4221384143, + 3956125452, + 2067696032, + 3594591187, + 2921233993, + 2428461, + 544322398, + 577241275, + 1471733935, + 610547355, + 4027169054, + 1432588573, + 1507829418, + 2025931657, + 3646575487, + 545086370, + 48609733, + 2200306550, + 1653985193, + 298326376, + 1316178497, + 3007786442, + 2064951626, + 458293330, + 2589141269, + 3591329599, + 3164325604, + 727753846, + 2179363840, + 146436021, + 1461446943, + 4069977195, + 705550613, + 3059967265, + 3887724982, + 4281599278, + 3313849956, + 1404054877, + 2845806497, + 146425753, + 1854211946 + ], + [ + 1266315497, + 3048417604, + 3681880366, + 3289982499, + 290971e4, + 1235738493, + 2632868024, + 2414719590, + 3970600049, + 1771706367, + 1449415276, + 3266420449, + 422970021, + 1963543593, + 2690192192, + 3826793022, + 1062508698, + 1531092325, + 1804592342, + 2583117782, + 2714934279, + 4024971509, + 1294809318, + 4028980673, + 1289560198, + 2221992742, + 1669523910, + 35572830, + 157838143, + 1052438473, + 1016535060, + 1802137761, + 1753167236, + 1386275462, + 3080475397, + 2857371447, + 1040679964, + 2145300060, + 2390574316, + 1461121720, + 2956646967, + 4031777805, + 4028374788, + 33600511, + 2920084762, + 1018524850, + 629373528, + 3691585981, + 3515945977, + 2091462646, + 2486323059, + 586499841, + 988145025, + 935516892, + 3367335476, + 2599673255, + 2839830854, + 265290510, + 3972581182, + 2759138881, + 3795373465, + 1005194799, + 847297441, + 406762289, + 1314163512, + 1332590856, + 1866599683, + 4127851711, + 750260880, + 613907577, + 1450815602, + 3165620655, + 3734664991, + 3650291728, + 3012275730, + 3704569646, + 1427272223, + 778793252, + 1343938022, + 2676280711, + 2052605720, + 1946737175, + 3164576444, + 3914038668, + 3967478842, + 3682934266, + 1661551462, + 3294938066, + 4011595847, + 840292616, + 3712170807, + 616741398, + 312560963, + 711312465, + 1351876610, + 322626781, + 1910503582, + 271666773, + 2175563734, + 1594956187, + 70604529, + 3617834859, + 1007753275, + 1495573769, + 4069517037, + 2549218298, + 2663038764, + 504708206, + 2263041392, + 3941167025, + 2249088522, + 1514023603, + 1998579484, + 1312622330, + 694541497, + 2582060303, + 2151582166, + 1382467621, + 776784248, + 2618340202, + 3323268794, + 2497899128, + 2784771155, + 503983604, + 4076293799, + 907881277, + 423175695, + 432175456, + 1378068232, + 4145222326, + 3954048622, + 3938656102, + 3820766613, + 2793130115, + 2977904593, + 26017576, + 3274890735, + 3194772133, + 1700274565, + 1756076034, + 4006520079, + 3677328699, + 720338349, + 1533947780, + 354530856, + 688349552, + 3973924725, + 1637815568, + 332179504, + 3949051286, + 53804574, + 2852348879, + 3044236432, + 1282449977, + 3583942155, + 3416972820, + 4006381244, + 1617046695, + 2628476075, + 3002303598, + 1686838959, + 431878346, + 2686675385, + 1700445008, + 1080580658, + 1009431731, + 832498133, + 3223435511, + 2605976345, + 2271191193, + 2516031870, + 1648197032, + 4164389018, + 2548247927, + 300782431, + 375919233, + 238389289, + 3353747414, + 2531188641, + 2019080857, + 1475708069, + 455242339, + 2609103871, + 448939670, + 3451063019, + 1395535956, + 2413381860, + 1841049896, + 1491858159, + 885456874, + 4264095073, + 4001119347, + 1565136089, + 3898914787, + 1108368660, + 540939232, + 1173283510, + 2745871338, + 3681308437, + 4207628240, + 3343053890, + 4016749493, + 1699691293, + 1103962373, + 3625875870, + 2256883143, + 3830138730, + 1031889488, + 3479347698, + 1535977030, + 4236805024, + 3251091107, + 2132092099, + 1774941330, + 1199868427, + 1452454533, + 157007616, + 2904115357, + 342012276, + 595725824, + 1480756522, + 206960106, + 497939518, + 591360097, + 863170706, + 2375253569, + 3596610801, + 1814182875, + 2094937945, + 3421402208, + 1082520231, + 3463918190, + 2785509508, + 435703966, + 3908032597, + 1641649973, + 2842273706, + 3305899714, + 1510255612, + 2148256476, + 2655287854, + 3276092548, + 4258621189, + 236887753, + 3681803219, + 274041037, + 1734335097, + 3815195456, + 3317970021, + 1899903192, + 1026095262, + 4050517792, + 356393447, + 2410691914, + 3873677099, + 3682840055 + ], + [ + 3913112168, + 2491498743, + 4132185628, + 2489919796, + 1091903735, + 1979897079, + 3170134830, + 3567386728, + 3557303409, + 857797738, + 1136121015, + 1342202287, + 507115054, + 2535736646, + 337727348, + 3213592640, + 1301675037, + 2528481711, + 1895095763, + 1721773893, + 3216771564, + 62756741, + 2142006736, + 835421444, + 2531993523, + 1442658625, + 3659876326, + 2882144922, + 676362277, + 1392781812, + 170690266, + 3921047035, + 1759253602, + 3611846912, + 1745797284, + 664899054, + 1329594018, + 3901205900, + 3045908486, + 2062866102, + 2865634940, + 3543621612, + 3464012697, + 1080764994, + 553557557, + 3656615353, + 3996768171, + 991055499, + 499776247, + 1265440854, + 648242737, + 3940784050, + 980351604, + 3713745714, + 1749149687, + 3396870395, + 4211799374, + 3640570775, + 1161844396, + 3125318951, + 1431517754, + 545492359, + 4268468663, + 3499529547, + 1437099964, + 2702547544, + 3433638243, + 2581715763, + 2787789398, + 1060185593, + 1593081372, + 2418618748, + 4260947970, + 69676912, + 2159744348, + 86519011, + 2512459080, + 3838209314, + 1220612927, + 3339683548, + 133810670, + 1090789135, + 1078426020, + 1569222167, + 845107691, + 3583754449, + 4072456591, + 1091646820, + 628848692, + 1613405280, + 3757631651, + 526609435, + 236106946, + 48312990, + 2942717905, + 3402727701, + 1797494240, + 859738849, + 992217954, + 4005476642, + 2243076622, + 3870952857, + 3732016268, + 765654824, + 3490871365, + 2511836413, + 1685915746, + 3888969200, + 1414112111, + 2273134842, + 3281911079, + 4080962846, + 172450625, + 2569994100, + 980381355, + 4109958455, + 2819808352, + 2716589560, + 2568741196, + 3681446669, + 3329971472, + 1835478071, + 660984891, + 3704678404, + 4045999559, + 3422617507, + 3040415634, + 1762651403, + 1719377915, + 3470491036, + 2693910283, + 3642056355, + 3138596744, + 1364962596, + 2073328063, + 1983633131, + 926494387, + 3423689081, + 2150032023, + 4096667949, + 1749200295, + 3328846651, + 309677260, + 2016342300, + 1779581495, + 3079819751, + 111262694, + 1274766160, + 443224088, + 298511866, + 1025883608, + 3806446537, + 1145181785, + 168956806, + 3641502830, + 3584813610, + 1689216846, + 3666258015, + 3200248200, + 1692713982, + 2646376535, + 4042768518, + 1618508792, + 1610833997, + 3523052358, + 4130873264, + 2001055236, + 3610705100, + 2202168115, + 4028541809, + 2961195399, + 1006657119, + 2006996926, + 3186142756, + 1430667929, + 3210227297, + 1314452623, + 4074634658, + 4101304120, + 2273951170, + 1399257539, + 3367210612, + 3027628629, + 1190975929, + 2062231137, + 2333990788, + 2221543033, + 2438960610, + 1181637006, + 548689776, + 2362791313, + 3372408396, + 3104550113, + 3145860560, + 296247880, + 1970579870, + 3078560182, + 3769228297, + 1714227617, + 3291629107, + 3898220290, + 166772364, + 1251581989, + 493813264, + 448347421, + 195405023, + 2709975567, + 677966185, + 3703036547, + 1463355134, + 2715995803, + 1338867538, + 1343315457, + 2802222074, + 2684532164, + 233230375, + 2599980071, + 2000651841, + 3277868038, + 1638401717, + 4028070440, + 3237316320, + 6314154, + 819756386, + 300326615, + 590932579, + 1405279636, + 3267499572, + 3150704214, + 2428286686, + 3959192993, + 3461946742, + 1862657033, + 1266418056, + 963775037, + 2089974820, + 2263052895, + 1917689273, + 448879540, + 3550394620, + 3981727096, + 150775221, + 3627908307, + 1303187396, + 508620638, + 2975983352, + 2726630617, + 1817252668, + 1876281319, + 1457606340, + 908771278, + 3720792119, + 3617206836, + 2455994898, + 1729034894, + 1080033504 + ], + [ + 976866871, + 3556439503, + 2881648439, + 1522871579, + 1555064734, + 1336096578, + 3548522304, + 2579274686, + 3574697629, + 3205460757, + 3593280638, + 3338716283, + 3079412587, + 564236357, + 2993598910, + 1781952180, + 1464380207, + 3163844217, + 3332601554, + 1699332808, + 1393555694, + 1183702653, + 3581086237, + 1288719814, + 691649499, + 2847557200, + 2895455976, + 3193889540, + 2717570544, + 1781354906, + 1676643554, + 2592534050, + 3230253752, + 1126444790, + 2770207658, + 2633158820, + 2210423226, + 2615765581, + 2414155088, + 3127139286, + 673620729, + 2805611233, + 1269405062, + 4015350505, + 3341807571, + 4149409754, + 1057255273, + 2012875353, + 2162469141, + 2276492801, + 2601117357, + 993977747, + 3918593370, + 2654263191, + 753973209, + 36408145, + 2530585658, + 25011837, + 3520020182, + 2088578344, + 530523599, + 2918365339, + 1524020338, + 1518925132, + 3760827505, + 3759777254, + 1202760957, + 3985898139, + 3906192525, + 674977740, + 4174734889, + 2031300136, + 2019492241, + 3983892565, + 4153806404, + 3822280332, + 352677332, + 2297720250, + 60907813, + 90501309, + 3286998549, + 1016092578, + 2535922412, + 2839152426, + 457141659, + 509813237, + 4120667899, + 652014361, + 1966332200, + 2975202805, + 55981186, + 2327461051, + 676427537, + 3255491064, + 2882294119, + 3433927263, + 1307055953, + 942726286, + 933058658, + 2468411793, + 3933900994, + 4215176142, + 1361170020, + 2001714738, + 2830558078, + 3274259782, + 1222529897, + 1679025792, + 2729314320, + 3714953764, + 1770335741, + 151462246, + 3013232138, + 1682292957, + 1483529935, + 471910574, + 1539241949, + 458788160, + 3436315007, + 1807016891, + 3718408830, + 978976581, + 1043663428, + 3165965781, + 1927990952, + 4200891579, + 2372276910, + 3208408903, + 3533431907, + 1412390302, + 2931980059, + 4132332400, + 1947078029, + 3881505623, + 4168226417, + 2941484381, + 1077988104, + 1320477388, + 886195818, + 18198404, + 3786409e3, + 2509781533, + 112762804, + 3463356488, + 1866414978, + 891333506, + 18488651, + 661792760, + 1628790961, + 3885187036, + 3141171499, + 876946877, + 2693282273, + 1372485963, + 791857591, + 2686433993, + 3759982718, + 3167212022, + 3472953795, + 2716379847, + 445679433, + 3561995674, + 3504004811, + 3574258232, + 54117162, + 3331405415, + 2381918588, + 3769707343, + 4154350007, + 1140177722, + 4074052095, + 668550556, + 3214352940, + 367459370, + 261225585, + 2610173221, + 4209349473, + 3468074219, + 3265815641, + 314222801, + 3066103646, + 3808782860, + 282218597, + 3406013506, + 3773591054, + 379116347, + 1285071038, + 846784868, + 2669647154, + 3771962079, + 3550491691, + 2305946142, + 453669953, + 1268987020, + 3317592352, + 3279303384, + 3744833421, + 2610507566, + 3859509063, + 266596637, + 3847019092, + 517658769, + 3462560207, + 3443424879, + 370717030, + 4247526661, + 2224018117, + 4143653529, + 4112773975, + 2788324899, + 2477274417, + 1456262402, + 2901442914, + 1517677493, + 1846949527, + 2295493580, + 3734397586, + 2176403920, + 1280348187, + 1908823572, + 3871786941, + 846861322, + 1172426758, + 3287448474, + 3383383037, + 1655181056, + 3139813346, + 901632758, + 1897031941, + 2986607138, + 3066810236, + 3447102507, + 1393639104, + 373351379, + 950779232, + 625454576, + 3124240540, + 4148612726, + 2007998917, + 544563296, + 2244738638, + 2330496472, + 2058025392, + 1291430526, + 424198748, + 50039436, + 29584100, + 3605783033, + 2429876329, + 2791104160, + 1057563949, + 3255363231, + 3075367218, + 3463963227, + 1469046755, + 985887462 + ] + ]; + var BLOWFISH_CTX = { + pbox: [], + sbox: [] + }; + function F(ctx, x) { + let a = x >> 24 & 255; + let b = x >> 16 & 255; + let c = x >> 8 & 255; + let d = x & 255; + let y = ctx.sbox[0][a] + ctx.sbox[1][b]; + y = y ^ ctx.sbox[2][c]; + y = y + ctx.sbox[3][d]; + return y; + } + function BlowFish_Encrypt(ctx, left, right) { + let Xl = left; + let Xr = right; + let temp; + for (let i2 = 0; i2 < N; ++i2) { + Xl = Xl ^ ctx.pbox[i2]; + Xr = F(ctx, Xl) ^ Xr; + temp = Xl; + Xl = Xr; + Xr = temp; + } + temp = Xl; + Xl = Xr; + Xr = temp; + Xr = Xr ^ ctx.pbox[N]; + Xl = Xl ^ ctx.pbox[N + 1]; + return { left: Xl, right: Xr }; + } + function BlowFish_Decrypt(ctx, left, right) { + let Xl = left; + let Xr = right; + let temp; + for (let i2 = N + 1; i2 > 1; --i2) { + Xl = Xl ^ ctx.pbox[i2]; + Xr = F(ctx, Xl) ^ Xr; + temp = Xl; + Xl = Xr; + Xr = temp; + } + temp = Xl; + Xl = Xr; + Xr = temp; + Xr = Xr ^ ctx.pbox[1]; + Xl = Xl ^ ctx.pbox[0]; + return { left: Xl, right: Xr }; + } + function BlowFishInit(ctx, key, keysize) { + for (let Row = 0; Row < 4; Row++) { + ctx.sbox[Row] = []; + for (let Col = 0; Col < 256; Col++) { + ctx.sbox[Row][Col] = ORIG_S[Row][Col]; + } + } + let keyIndex = 0; + for (let index2 = 0; index2 < N + 2; index2++) { + ctx.pbox[index2] = ORIG_P[index2] ^ key[keyIndex]; + keyIndex++; + if (keyIndex >= keysize) { + keyIndex = 0; + } + } + let Data1 = 0; + let Data2 = 0; + let res = 0; + for (let i2 = 0; i2 < N + 2; i2 += 2) { + res = BlowFish_Encrypt(ctx, Data1, Data2); + Data1 = res.left; + Data2 = res.right; + ctx.pbox[i2] = Data1; + ctx.pbox[i2 + 1] = Data2; + } + for (let i2 = 0; i2 < 4; i2++) { + for (let j = 0; j < 256; j += 2) { + res = BlowFish_Encrypt(ctx, Data1, Data2); + Data1 = res.left; + Data2 = res.right; + ctx.sbox[i2][j] = Data1; + ctx.sbox[i2][j + 1] = Data2; + } + } + return true; + } + var Blowfish = C_algo.Blowfish = BlockCipher.extend({ + _doReset: function() { + if (this._keyPriorReset === this._key) { + return; + } + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + BlowFishInit(BLOWFISH_CTX, keyWords, keySize); + }, + encryptBlock: function(M2, offset2) { + var res = BlowFish_Encrypt(BLOWFISH_CTX, M2[offset2], M2[offset2 + 1]); + M2[offset2] = res.left; + M2[offset2 + 1] = res.right; + }, + decryptBlock: function(M2, offset2) { + var res = BlowFish_Decrypt(BLOWFISH_CTX, M2[offset2], M2[offset2 + 1]); + M2[offset2] = res.left; + M2[offset2 + 1] = res.right; + }, + blockSize: 64 / 32, + keySize: 128 / 32, + ivSize: 64 / 32 + }); + C.Blowfish = BlockCipher._createHelper(Blowfish); + })(); + return CryptoJS.Blowfish; + }); + } +}); + +// node_modules/crypto-js/index.js +var require_crypto_js = __commonJS({ + "node_modules/crypto-js/index.js"(exports2, module2) { + (function(root, factory, undef) { + if (typeof exports2 === "object") { + module2.exports = exports2 = factory(require_core(), require_x64_core(), require_lib_typedarrays(), require_enc_utf16(), require_enc_base64(), require_enc_base64url(), require_md5(), require_sha1(), require_sha256(), require_sha224(), require_sha512(), require_sha384(), require_sha3(), require_ripemd160(), require_hmac(), require_pbkdf2(), require_evpkdf(), require_cipher_core(), require_mode_cfb(), require_mode_ctr(), require_mode_ctr_gladman(), require_mode_ofb(), require_mode_ecb(), require_pad_ansix923(), require_pad_iso10126(), require_pad_iso97971(), require_pad_zeropadding(), require_pad_nopadding(), require_format_hex(), require_aes(), require_tripledes(), require_rc4(), require_rabbit(), require_rabbit_legacy(), require_blowfish()); + } else if (typeof define === "function" && define.amd) { + define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./enc-base64url", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy", "./blowfish"], factory); + } else { + root.CryptoJS = factory(root.CryptoJS); + } + })(exports2, function(CryptoJS) { + return CryptoJS; + }); + } +}); + +// node_modules/minimist/index.js +var require_minimist = __commonJS({ + "node_modules/minimist/index.js"(exports2, module2) { + "use strict"; + function hasKey(obj, keys) { + var o = obj; + keys.slice(0, -1).forEach(function(key2) { + o = o[key2] || {}; + }); + var key = keys[keys.length - 1]; + return key in o; + } + function isNumber(x) { + if (typeof x === "number") { + return true; + } + if (/^0x[0-9a-f]+$/i.test(x)) { + return true; + } + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); + } + function isConstructorOrProto(obj, key) { + return key === "constructor" && typeof obj[key] === "function" || key === "__proto__"; + } + module2.exports = function(args2, opts) { + if (!opts) { + opts = {}; + } + var flags = { + bools: {}, + strings: {}, + unknownFn: null + }; + if (typeof opts.unknown === "function") { + flags.unknownFn = opts.unknown; + } + if (typeof opts.boolean === "boolean" && opts.boolean) { + flags.allBools = true; + } else { + [].concat(opts.boolean).filter(Boolean).forEach(function(key2) { + flags.bools[key2] = true; + }); + } + var aliases = {}; + function aliasIsBoolean(key2) { + return aliases[key2].some(function(x) { + return flags.bools[x]; + }); + } + Object.keys(opts.alias || {}).forEach(function(key2) { + aliases[key2] = [].concat(opts.alias[key2]); + aliases[key2].forEach(function(x) { + aliases[x] = [key2].concat(aliases[key2].filter(function(y) { + return x !== y; + })); + }); + }); + [].concat(opts.string).filter(Boolean).forEach(function(key2) { + flags.strings[key2] = true; + if (aliases[key2]) { + [].concat(aliases[key2]).forEach(function(k) { + flags.strings[k] = true; + }); + } + }); + var defaults = opts.default || {}; + var argv = { _: [] }; + function argDefined(key2, arg2) { + return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2]; + } + function setKey(obj, keys, value2) { + var o = obj; + for (var i3 = 0; i3 < keys.length - 1; i3++) { + var key2 = keys[i3]; + if (isConstructorOrProto(o, key2)) { + return; + } + if (o[key2] === void 0) { + o[key2] = {}; + } + if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) { + o[key2] = {}; + } + if (o[key2] === Array.prototype) { + o[key2] = []; + } + o = o[key2]; + } + var lastKey = keys[keys.length - 1]; + if (isConstructorOrProto(o, lastKey)) { + return; + } + if (o === Object.prototype || o === Number.prototype || o === String.prototype) { + o = {}; + } + if (o === Array.prototype) { + o = []; + } + if (o[lastKey] === void 0 || flags.bools[lastKey] || typeof o[lastKey] === "boolean") { + o[lastKey] = value2; + } else if (Array.isArray(o[lastKey])) { + o[lastKey].push(value2); + } else { + o[lastKey] = [o[lastKey], value2]; + } + } + function setArg(key2, val, arg2) { + if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) { + if (flags.unknownFn(arg2) === false) { + return; + } + } + var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val; + setKey(argv, key2.split("."), value2); + (aliases[key2] || []).forEach(function(x) { + setKey(argv, x.split("."), value2); + }); + } + Object.keys(flags.bools).forEach(function(key2) { + setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]); + }); + var notFlags = []; + if (args2.indexOf("--") !== -1) { + notFlags = args2.slice(args2.indexOf("--") + 1); + args2 = args2.slice(0, args2.indexOf("--")); + } + for (var i2 = 0; i2 < args2.length; i2++) { + var arg = args2[i2]; + var key; + var next; + if (/^--.+=/.test(arg)) { + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== "false"; + } + setArg(key, value, arg); + } else if (/^--no-.+/.test(arg)) { + key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } else if (/^--.+/.test(arg)) { + key = arg.match(/^--(.+)/)[1]; + next = args2[i2 + 1]; + if (next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i2 += 1; + } else if (/^(true|false)$/.test(next)) { + setArg(key, next === "true", arg); + i2 += 1; + } else { + setArg(key, flags.strings[key] ? "" : true, arg); + } + } else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1, -1).split(""); + var broken = false; + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + if (next === "-") { + setArg(letters[j], next, arg); + continue; + } + if (/[A-Za-z]/.test(letters[j]) && next[0] === "=") { + setArg(letters[j], next.slice(1), arg); + broken = true; + break; + } + if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], arg.slice(j + 2), arg); + broken = true; + break; + } else { + setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg); + } + } + key = arg.slice(-1)[0]; + if (!broken && key !== "-") { + if (args2[i2 + 1] && !/^(-|--)[^-]/.test(args2[i2 + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args2[i2 + 1], arg); + i2 += 1; + } else if (args2[i2 + 1] && /^(true|false)$/.test(args2[i2 + 1])) { + setArg(key, args2[i2 + 1] === "true", arg); + i2 += 1; + } else { + setArg(key, flags.strings[key] ? "" : true, arg); + } + } + } else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args2.slice(i2 + 1)); + break; + } + } + } + Object.keys(defaults).forEach(function(k) { + if (!hasKey(argv, k.split("."))) { + setKey(argv, k.split("."), defaults[k]); + (aliases[k] || []).forEach(function(x) { + setKey(argv, x.split("."), defaults[k]); + }); + } + }); + if (opts["--"]) { + argv["--"] = notFlags.slice(); + } else { + notFlags.forEach(function(k) { + argv._.push(k); + }); + } + return argv; + }; + } +}); + +// rabbit_1.js +var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject2) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject2(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject2(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = exports && exports.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) { + if (pack || arguments.length === 2) for (var i2 = 0, l = from.length, ar; i2 < l; i2++) { + if (ar || !(i2 in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i2); + ar[i2] = from[i2]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var util = require("util"); +var pixels = require_image_pixels(); +var cryptoJs = require_crypto_js(); +var user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"; +var crypto_1 = require("crypto"); +var crypto = crypto_1.webcrypto; +var wasm; +var arr = new Array(128).fill(void 0); +var dateNow = Date.now(); +var content; +var cmd_args = require_minimist()(process.argv.slice(2)); +var referrer = cmd_args["referrer"]; +var embed_url = cmd_args["embed-url"]; +if (!embed_url) { + console.error("Please provide embed-url"); + process.exit(1); +} +if (!referrer) { + console.error("Please provide referrer"); + process.exit(1); +} +function isDetached(buffer) { + if (buffer.byteLength === 0) { + var formatted = util.format(buffer); + return formatted.includes("detached"); + } + return false; +} +var dataURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAgAElEQVR4Xu3dCXwU9d3H8f8e2ZwkJCEQrgCCoKBVQURRq6Lg8aCVVut9tdbbVq21XvWq52O973rX+65YRRQPFAERARHkvnNAgJA72WR388wsmXQYNgEs6WN+v09er5iYY3e+79+G7/5nZnd9hjcEEEAAAQQQ6PACvg6fgAA7LNB0nmna4V8S8Au+vxtu7wLmSAQEEEgswD9wCm8ZFLrCoRMZAQTEC1Do4ke8dUAKXeHQiYwAAuIFKHTxI6bQHQF2uSu8sRMZAUUCFLqiYTtRWaErHDqREUBAvACFLn7ErNBZoSu8kRMZAYUCFLrCobNCVzh0IiOAgHgBCl38iFmhs0JXeCMnMgIKBSh0hUNnha5w6ERGAAHxAhS6+BGzQmeFrvBGTmQEFApQ6AqHzgpd4dCJjAAC4gUodPEjZoXOCl3hjZzICCgUoNAVDp0VusKhExkBBMQLUOjiR8wKnRW6whs5kRFQKEChKxw6K3SFQycyAgiIF6DQxY+YFTordIU3ciIjoFCAQlc4dFboCodOZAQQEC9AoYsfMSt0VugKb+RERkChAIWucOis0BUOncgIICBegEIXP2JW6KzQFd7IiYyAQgEKXeHQiYwAAgggIE+AQpc3UxIhgAACCCgUoNAVDp3ICCCAAALyBCh0eTMlEQIIIICAQgEKXeHQiYwAAgggIE+AQpc3UxIhgAACCCgUoNAVDp3ICCCAAALyBCh0eTMlEQIIIICAQgEKXeHQiYwAAgggIE+AQpc3UxIhgAACCCgUoNAVDp3ICCCAAALyBCh0eTMlEQIIIICAQgEKXeHQiYwAAgggIE+AQpc3UxIhgAACCCgUoNAVDp3ICCCAAALyBCh0eTMlEQIIIICAQgEK/UcNvWknu/maftRm/Nd+aVt5f+rb/1+D4ooQQACB/zeBnVxM/285mq94W8WzU7cvkV1bnolKu52LfFtF215e27renToHLgwBBBBAwBLo4IXeaiG1dy735Tufb+s63eXd2uc/9ka5s+4YbCvDtrYvwXZQ7ttC4/sIIIDAzhD4T/8B3xnb8CMuY6si396C3dEVdGvb5i5xb6F7r8MpuUQfd2ax/yelvqN7G9wu23FHhVL/ETdyfgUBBBDYIYEOWOhblHlrxZpo1bw9Wb2l6P1/7/W19f/2IForcfvr7nf3z3o/36GBuq5zW7+X6E6Q8zvbY9XaNju5PN+n1Lc1EL6PAAII/CcC2/sP939yHTvpd9sscjtHa+/29bdVXm0Vk3fbExW4P8F1e1ew3gKPeQrdW+47atbWSt/5Xlt7Mbbl09r2eMs70f+7fCn1HR0sP48AAghsr0BHLPTWitspVu/HRKt4r09bu8XdP+u9bvd1uYs9UaE7JW5/dL97y/7H7DpvbfsT3Q62tZfBm9ebxfn/RNvd2tco9e39i+TnEEAAgR8p0EEKvWV1nqhQ7SJt7d3+eW/RJsrsLsRWdhm3CHtL3Hvd7sJ0Lssp82hzmTsfvcVu/7+r/LaYamvH5t0/39pufO8K3HFMZNPWbSKRkzej+45LgkMLrNJ/5N8qv4YAAgi0KdABCj1hmTtFFGgubPuj825/z/35tnaJO4XY1urSQXQXoXM93o/Oz7gv1y45u8Rbe3eKvbVd79sq2R3Zdm+Zb49Pa3ca3NvtfO7cWbG3KdGhBevLlDr/LiGAAAI7W6CjFLqzne7VsbvEgxaM825/3f7cW+qJVqOJVpytlFCc3lnxu+80eO9MONfjLnSnyCPNpW5/dN6d73lL3Tvr1vYsuMvcu+3ONrS2Z8O5Q+Tek+HkdF9/a+cAOHdU2vroLXYKfWf/FXN5CCCAQHNB/YQhtlqdO7u3nRJ1SjzJCuG821+zP3cXvLu4vCtod/F6j3O7d7+7C917Z8K5E+Fsn3MdTpnZpe0UeKP1uf1u/7/zMVGpO3Nx78L3zirR7m53BvfPe+8MtbUnY1tl7l6Nu/c6OHdYvHk8dzRYof+E/+jYNAQQ6KACP/EVerzQ3e/uEnJKO2T9jPfdW/BOATsrUaecE608Wzthzb2r2nuHwn3nwd8prdb+f1NVm2YXnLN6dYrc/tjQXOb2R/dq3b1KT1To7nm1dnw+0Urf2Xb3IQr3Xgzn6+69C+47Os4dk0RF7t7+tvY8uEvdHuuPOfmvg/6ZsdkIIIBA+wt0pEJ3l7mzCreLPLmNd/eq3V1aiQrde/a5txgTFXr8TsURw2d3P3PsZz8bsceiPbrllOd3SqvL9Ptj/oaGYEN5dcaG75cVLHjr0wO/ffGDw5ZaJV9n/U64udTtQneXevSAk94syO1d1O2HyQcuXD5nrwrTaF9Fy52allvERSetHZadGc2ZMDV36qz5KZusb7hXxfbn7r0Lzh2Ztu6IuPdiONfjvtMQv/z+oxryhp1VfWMgualbfaX/i6WTk5/7/s205VYiO5N770Oi1bprmyj09v/z5hoQQECTwE+40LfY3e7e1e4t8xRrYPZ7qvMxL1DW6aoeTx+6e8qSPdMD9dm1sdS6ZfW9ip4s/fW339cPqm4uyPicdw2tSL+o26tDd01e1Ss9UJteHUurml87YOH9pefMWNuYa5evtxhbSvGwYd91u+2iF8fsO3jJPknBqH3noo23pqbFq3suvPfl499/ecIhS6xir/UUe2TMhX/fe89RX1wRSA53a6hJXfLJP06/5fsJY4pchd4yr79esuqkXXqFjy+vCcx98b2uD0+b02ntaUdPzr71ohfOqqpNKfnLo2e+/e7k/eyid+4Q2Ibucw3cezECM16//rwhA4sP+npW34nX3HvqR1/PG1DZnD2233nVw3rt2zDa+Pymel1gTn25ryS9S7RrVu/oUT5fU2zl1JQbpj2ZPrO51J29D22dI2BHYoWu6V8asiKAQLsLdIRCdz8szClzu4zslblT5GnW5/H3S7q+OPS8vNcus4o8x6sXaQpE39006vOrC6+cHrMezXZLjweH/zr3g1FJvmh8F7n7rTaaUvXI+tNefbz05AXNxWZ/u+WOxc2/e3Gvy04bP9ZajXfytaIYS+lvIhk/s07PyzS+hmITrJhuYo01kdcnHTThT/ef81nRhi4VzaUeX9me/cCV5ySn1+asmDX04yGHfPG7Zd/u/dqnz50+tbq0q12S8d3hGanR4EWnrjuyZ179oOzMyICaev+aF97t+tDU7zKLv3jqmnH7D1l4WlJSpPN9Lx17zp8fPueHxsYkuzid7Xb7hR6/+dmD9hi0ZreZX+evOuXEWcd3zaspiEVM7P7nxjxx26Pj5pRVZdjbFes9ItJlwOG1Q7N6xwamZUd3s74WXTs39NTaucmzh5xYfVks7Cv8YWLaIwveSl7hzmNnst6dlbrn2D6F3u5/3VwBAgioEvipF7p3N7ezqrRXw+4yT7f+P/2P+c/uf37eK9cGfE1bFbR7qh9VHDi3NpbSeHz2J8Pamnasydd0z9pz3nh8/Sl2qbcU+iNXPbrfOcd9enBqctjehgRvQRPu/lsTyT7EqlL7fkfzW0OZSSl62Phr55spswfO+M1Nl727tKi7vYqO764+/X+vPznSmFT7xfOnTfzlX+74c8nSfjM+e+asT8rW9K53Cv3ik0p+vu+e1ceWlQeXbqoKFU34MmvKnEUZxdGoabjstHcLrjnrzXPr6pPKrnrknEdfn3hwafM1247uEwhD153yyt5XXDb5tzm5tT03lITWp9ZVZaZ2Dyb7UwOmYn2w4rI7Tn/uufGjVtrl3VzK8TsdBSMas4eeWX1yel5sz5K5yU8GUyK+7ILoqFVTU+6c/nj6N81ZnEMJ3kJ3HUen0FX9S0NYBBBod4GOUOju3e12oTvHze1d7Paq3C7zjEEpK7q9M+Cix5L9kYydqRaOBRuPW/L480vDfWqsy/VdfMJ7u9xx6QuHWytz+/oTvoXzTjKRLmOtlXmaqaquNqGkJBMKhYzPXso3bjSpK24y/oYS89YnB3z+h/vO+6RoXW6VXZbNxRk1gai5+Jnzry9d3n/OJ0+dObmpKBS5MPWG0dZBCH/xnr9Zf+jYzmNDSbGMNSXJs58b3+2dhStS7eJ2n3Rnfx6957Kn9/xhee+ytz/ff92mykx7Wx2/0KNn33PEyefMO7Zz90iOz+8zdcuqTbBT0ARzrO0M+s206b3m//lvZ3z85ZzdN9jbdekZE3tfe/F7x9XUJJdf/8Qpb9Ue3H90Wk5sl/XLkt7pskvj6FVfh+6e/lCnr6yfte98uM8RcHa9e85JoNB35u2Uy0IAAQQ6SqE7x62dQrJXxi1lbn3e6bm+V59+cOa3J7fHSP9Vfui8P6y+7pvB/VZnTHr0+iPzczfZu9kT2jUFOpm6Af9rmpLyzA8LFpirrr7ORCNR88hDD5i+ffsYv99vQuteMsGNH1iVW990+f3nvvLk20cuqq1PsYswvns6t2B12qm333Lpill7fT35hV9/c2P0piO7VH863MTqU/0+X6ys55hl6/e7sGTQPun7zJyX8emrE7p+OfAXN++X2XVFwZz3L3qleN7I4nN+8VGPB654+qra+uTyC++46OF3Pt/fLub4oYoHrnn+oAP2WPSzPknLB+YM9HcKZgT8TY2xeKknd0+1jhAkmZi1Lr/r0aM/uvcfY+dvKM+sff7uJ4aPG/PtAZ3S6zs99MIRTz07Y+yagSf5ziovDHy1bkFw+sqvQvPLVwbLrMt3TvpzSt19LJ0VenvcQLlMBBBAwF5x/nQVWh6y5pzd7hz/dY6d24Vur8Y7We+ZU3c/6c5uSWWD2iNPcUNe5cELX/7o5Vvv3mvcodP6pSQ3trpLP5o+2IR7/9E0BTubDz780Nxz7/2msrLSKvQHzdB99jbBYNAEKqeb5KLHjS9aZRat6ll0/B+vfXvhqgJ713v8YW67DPs2b+zlj5327QejP1n23oGrnsm5/LTK0u961DeGfcF9DjfB0WcaX0430xTzRd74qMsbE6Z0nnfo7889oVOXNf2/eeOy+5d/c8zylFBj9MErn9pvSVH3Dc//6/CVpRs728fSQ+eOnTTotmvfOa1r16oejWUNJlYTMUl5ycafEjCRTQ3x91B+ivGnBU11WaDht38574PXJx6w+poLxvf9428/PCg3uzpn2uz+U6+9+4TxGSf1PNqf3BSY98/UZ5ZPSllkXb59op9d6O4z+RMdR7e2hRV6e9xWuUwEENAr0NEK3dndbq/Q47va7TK33+cOOe6J9EBdbnuMsj4Wip5U98iXnzx6/f552RUpzklwseReJpI10joPPmad8DbFOvGt1MRSB5pwwZ+sFXpnEw6HzbvvvWdSU1PN4aNGmTTro/3mLnT7/y++64J3n33viOV14WT72HNsxAnv7Dpi3PgjPnr0vPFHL1vY5czcd3++dt2yjPUVVSb4m9utss00jTMnGt+S2U1flo/59M3682ZWpGTWBJNror2ywtE3b7973PKSbmv+8uhpn89fET9U4JzhnnT98c8Ov+TiKWO7FjTk+gI+U7/C2tWead3J6Gztag/44/8fSAuYYG5yfNf7rG/y1/7hznOmpmdFIk/e+vRhvXuU5ZVtSt9w+e2nPls4ZO/+mT2jfRb8K/XpRe8nz7eux74up9TtPQ7uh+W5nxKWQm+PGyqXiQACqgU6aqHbzegu9KxZg49/MCtYk98e06yMpje+tf8py686463+ndLr4qvzaLy47ZW4dR/COTa+8hbjb9xgavtbu9xDPTZ/PcFbqOR5E9z0kfHF7M4z5u3PDph36V3nzyjemGsXYuzYPz6wf/7AZb0/uu+Czx6KPHSwdX5Ar6bUJP/cBYtNeMjPTdKRZ5vo8rmm8YMnja+yzHwbOHHKq41XfF0a614xavh36a/dcfdZazdmFV9w28VvfjV3sL0b3Cn00G7dV+a+fOWtp+1xaHXvpMwkX1M0ZuqX15iQvas9w4oWbTJ1S63j/t1T4rve7afFueeJ0d89/c6oxW8//tBBg3Yp6W7HuvfpI195duYxK/xW8a+ZEZy/aXmoxLoe+yGBdqHb786xdOfYPoXeHjdOLhMBBBBoFpBQ6FlWlqxPdzvzhj6hkiHtMdkl9QVVTRf3rB81/PvcUFLELkcT7nGB2RTYxzz5zEsmLT3NnHbKySa3+i2rqD82kc6HmIZup1pL8a3Pz/OFC03Kyr/Gi995W1HUreyoS2/+ePGanvZjv2Nn/u2aI2sqsurS3+hTeqn/7WFd0uszUnv3MqtWrjTLFi41DQHrqIP1+DLTYHVmU5N13MRnpvrO+PyNxotnlpn8yoEFhYGSTbnV1glsVpn6TWzza7gFQ6FIyg2XvLPP0IIF/fftt3hg7i5NafZZ7dEKa1d7eYNJ6mrtak8NmmhVg2ksDZukfKvk04OmvtIXPeva86dccPrnvQ8ctrTAMghOm9V/1tV/O2n8FzN2W2ldtr3d9ol99rt7le5+shn3K8xZP8Yu9/a4rXKZCCCgV6CjFbrz+HPvCr3zE31uOPmIrGm/bI9RvrbxqMLj7lnWefd+hel+/+YnvAn3uNBMmNlg7rrnIVNRUWGe/vsTZp/cmSa5YlJ85d2Ye4xpyPuVVerW/Y3mlbqvbqn1sLXHjK9+tVXBziulWsvaupSGYy6+64u0YEravFXZJf3G/Kt78eJdN91U/eIe+yb/0DOrd9dgsJN9qoAx38+YZUqKS0zUepya+83vCzR9nveXz1JHHmb679JUYD1GPS81OZZhnYPnr6kNlD/ycvfnRx/yadfLzpl4VNfcypyi74NVnfMaUtPyfEF713t4VXX8uHkwe/NZ7o3r6+MrdvvYuv3UOpMn9lqX3s1nhgxel52a0hiqqkmpvuK205556vVD5lrbYT+e3il1Z5XuPY5OobfHjZPLRAABBJoFOlKh22e6O8/Z7jxkzTmGnnVc50+G3Fdw5y3tMdnfrfjr3GdffmLX3t02pDp70aMZe5qS1DPN/z74jElJSTGXXXiGyd90n/FbK/DNTy5n/dc64z2aZj0Pi7VS9zUUGX/dctPYYK2Eg9aa2rM7/sZ7b96Yk2Gyl5ekF742pWB2QcPS0AN9bj2oZ160U3LXrsZvPfTNfmtsCJs5U2eYjRvKTMxancffcrqbpMNONsGfHWLqfek1ReuTVxWvS1pTWhYsa2oKWLsUmgKTpmeuOGDY/NxHbn5+XO/8sm719UmN9cuqfBm9g4GkTKvRrfsXdcuqTKhb8672lhMFrF3w1tnvPqvYQ91SjT/075vMax/sN+GvD/7i4/lLexe7St0udHuVTqG3x42Ry0QAAQRaEegohd5yUldzqTsPW2s5y936eufPBp1xbUHy2p16pvvycK+q0Yue/Wb1e2fv36vbxjR3D9tntEeyDrSa2zpTvOxT4wuv2WLl7ZhHrIetzV9aZabNLjPzFleYA4d1Mb84vLt1kty/T5b/4223remRE+0+e3nOkvdndl98Xef7dju6y9e75PbJTfJbJ9M5dwDCpaWmdl2pWbSm2GyqrTVNOT1Myhk3WHvefSby1Ttm3aLapY9VXDVhQ5dOdYddcMUp4ZrsTTNeu/LDjYW72yWb9PBNz4089djpI7KzatNLijKq0+vKUjJ6+oPxXe3WGe/Ws7saX3LA+rj5ptGwts40haMmyS5ze7Xueisu7Vx81V0nP/vSuyPnJSh091Pbxh8Xb707j0W3PmWXO/8qIYAAAjtToCMUuvPCIs4znbmfJW6LE+N+0+Wt4df1ePyKnQl0zZorZr2+6eh13zx/+Yi9By3PDgZi22VWWRk2i1bWWEVeaZV4lamyyrJHn92s4rVW1fWF5rKz+prOmZuf/r0+nBQZdvoDkwpLuzfU1AUaeiaVpPyj31UH9y/wZYWys6yzzzcXaWN5uQlbZd4UiZhG633Z2lKzsdY6kbzvHiZauNi6IOsMdason4jc8495ucPXHXLhn06sq8jZOPOtKz/dVNzfLtik9PRw2oSn/vY/I/Zatot1TD24Zn6oJjs7nJLetSlg72rf4i3WZGoXVppQz1TrTHhrD0GCk/wefG7Ms7c9dtznpRsz7ZMC7F3v9grdfm9jhU6Z78zbKJeFAAII2ALbVU7/P1QtL86S6IVZ7Meiu58pzj7AHD857q0Bl5y/d9qiETtjm7+p2aP45GX3TbOd3rv3lmGjR8zplRxqbFmmVlY3mLlW4W2qbDC19VFTWxc1G8rCZu2GsKmujdrnq5m8Hn3NnvseZob9/FiTFEo2j/31PJPi22AuP3tAS6EvL8yvGHPpLVOWFXa3S9dc3f3vA0/v/9lueb07Jft81s4Ie/VdW2fdDyg0TY32YnfzW8w6261w4yZTVFZuIq5j6msCB3z3VONNH6+K7VZu/Zi9X96es73d8SfmOWTEgu5P3f7MUf0L1uU1NgaidavqTHqPgD+Ybu16d71FrVwR67HqSdZueHsFn+ht0tQhE2+87/h3p84etNL6vnMc3dnl7jx0zf187tYqnULfGbdPLgMBBBBwC/yEC93ezK2eXKallKxvOs/l7qzS408w0ze5qPvb/S+5PitYvdWLs+zI6CuiGXW/XPLwv1Y29LRL1n/zeS8OvOL0d/fJSK1veVW1tycWmS9mlptQcpb11K6pJj2rs8nt2tvk9+5veu4y2PTbbR/TuUu+9exwAVO4YoF56q5LTcnqxWb/vbLMr4/uZdKtk9Dst1cnHrz0D/ee931pWedwhr828Paufzhs5HXrc1N6+3wVb+WbiPWAsLo1RdYTy9mL3q3fqurqzOr1G015TV38uHp16u4rF1/ZNxrtE01fPH2/adPeHDe3ekOXSJ8Dw31iUX+wdF6g+trf/nPIhad+MjwvtyrDPgveXnx7F+D2iXH2M8jZj0n3W7vhE73NmNvvyxvuHffaxCl7L0tQ6O5ni3Ne3pXHoO/IDZGfRQABBLZToKMUurPCtFsl0TPGbVHqR2VOGXhvwe1/SvY3ul4ZZTtFrB9rtE4ku3TlDf/8uGrk2ubf8g/utyrziyevPj4nszrDKb7JM9abdz4qMReNvcH0/9UJ1pOzWM9x425Fq1wblq40kya9YiZ+/IKpq62yyt2Yy88aYAb0zTABa0Fsr+LPuunyz96YdFBJfUMoel7eq/0u3W3S0L6/qEsL5sVMzZdZpuaHdSZSYy16nZPgWolSXReOLatKL326/NzxdSdUd+43cvZeqRk1me/ff/GLK2btXTbq+sqxSWm+jFkvpHxTvtTU/fPxB0aPGrGgf0rK5hdd9741lFrHzyNNJqmNQp82e9dPb7x/3Bsff7XH8uZC954Ul+Bx6KzQt//WyE8igAAC2yfQkQrd/RKgdqk7x9K3el5363udzs97bfgV+c+cF/TF2nzlNS9TtMkf+1vJb8b/fcNJC63vOY8ti79a2fsP3DjmiOFzB1uPw44XYHVto7nn6SXmmLr9Ta/UbiZl112Mv0uO9fSpm6yHrjWZaLH1zHHllebZis/NyshG68KazOiReeZ/DrNPiNu84v36+10LT7ru6i9XlXSttR4x3vTekMuO2nvXaI+kFOtp26y3+pK1ptF6WJzzYPJEYw1Hg+E5tYN/eG7juGlfVO5bnD1oVcqRFz01Nq934eDiJQO++fjxsyeWruhfe/AV1WNy+kcGzn4hddLq6cnle+++Mu/l+x47clD/td38vpZDHC1XEa1utB6+Zj0e3T7zvXlvgvf635009LUbH/jl+98tKLDPdLcfh+4UuvuJZTwvoUqhb9+fJz+FAAIIbL9ARyh0O41zYpz3ed1bK3X77PeM8/NeHXZF/rN2qSdcgSYo8+h9a89647H1p9pnbcefV9113YGhg5Z0mfjgTWfl5lR2tvdQ27+/orDaNIwvMJl1mcZvnyJuvYWtY92h/Hzr8dyb70s8Wzk5XujD9swypxzb22Q0l2NDYzB69s2/f//tTw8qDjcmNZ6Q9WHPm/abcERedizTfhrWhg0brfcNpsnzmHNnuyujGRVTKofOeaL0hBk/hAeVWa/xHn/e9BNuvO2o/P4r9lj9/R7Tls/ac+mS6cPXdds7JT9vUGOf/j9vGL16emj6d6+nLqgr85srz50w5Mpz3z+wW5dK+xyELd+sffG1i6yHsvVIfFJcJOJvuO3R4+6544n/mR4OJ9snxLmfWMY5fu48l7vr1dYo9O3/E+UnEUAAge0T+IkXuh2i5Ti6t9QTvTa6+0S5+Gukn5Hzzz3/3OPp81P99W2+rGo4Fqr729rfvPjMhl/Zz0nuXlHaG9Gyq/+m37089Moz3xmXnlJvvzhM/G39y/kmts666uZFrrfQ34hMNYNHBszI4TkmxXUs+qHXxn5+899PmbuxMtMuv9jE4X/+1R4FtbskhfyBxqoqEy4psY5h25uy5Zv1YjHFH1WMnPH0+hPmFkfy7RJ1XtEsvt1jLnpsxB6HTv1lUko42/7NDat7ziwLXtOpvDBlRU6f6O6B5FjW3DfS31k8MaUwZp3z9s5j948Zc9C8IWmpDVsdoqgtjUb84cZAqGuSz3scfeGy7jOvv/fE596auO/S5jJv60ll7GPo9gl6HEPfvr9NfgoBBBDYIYGOUuh2KKfQnePpzsPYnGePc858t0vdKXa7dFP3S5/T4/7ed17YLbSxXyKd9Y3ZRX9e86e/T64ebj8fuffVwdwPm4tf11PXPTDqtKMnH2O96lr81VY2vZlvGgqtT5sf0RYuLLJW6N1aVuhZv15jkns0xh/j7bx9MGXfb86/4+LPCku72CfdxX7V5fMetx3w/onZ6eHcWH3Y1BcVmljYfm2TzW+xJl90WX3B4jc2HjXlzfLRyypiWfYZcpGcnotTD/nd1b+rq8ou/vbt37+9fsVe9nO3xwYd+FV+r90X9Riw37ejQml1eWvKbyltrM+o37gsaVnvEeEx/kBT6uKP0yYsGJ+8tCB7XdqbDz98/OBdi/oG/LHEZ7954GrqQpX3PnPUw3c/ccw3VaSDAMEAABxFSURBVLVp9tn09pntztO+8sIsO/RnyA8jgAAC/7lAByh0O+QWq3SnYJ1Vs/skObvUnWJ3zoK3PyaHTEPKPb3vOnp056njknyReBFHmgLhyZXD37t81XUf1JgU53nH3a/f7Tzky/3ENvGXb73zkuf2v/CED35lvVhLVvWUzr662Z2t1XRzYzsnr1knyPk7NZqck4tNoNPmp2qNRv3Rlz48ZNKfHzx76tqyHLvM40+48uUh1/5uQNeaQdYLkwfrrDsEUetJY+y3hlhS3fd1A2Y9Xzpu8mdVI4tqTbKz9yD+sUvBD2mHnHvN7+urswq/feeyV9cuGWoXetMhp7+859BjP7zE+GOhRVP3e7Gy6eRgj32Cx6+eERpfXxkIDzi0blxKZlOv2k3+wooi/6rcsuKyW094bkT/HvHj6Z4HpG95Q7OeZa76H+8e+Pytjxz75ZrivI2uIndelMUudOdkOGd7bcvmcxLY5f6f/+lyCQgggMCWAh2p0O0tt7fXu+vdeShb/DHWze9OscfL3PX1YL+k1Z2u7/H46FAgEryz+PyP5tf3tx87bZeqe7e1c/zcXejO9bRc9qHDvutxxyX/OG5oz5XDqsbnhSJl1vOibnFuWZPJHLXepAypMb6kJrNwZa+Ftz934odvTjpwZfNLpbY8lGv+sVf9pUtqbZ/64hJfxNrdXh1JWT+revCXj5ae+sWsuiGboiZgl6HzbGvO9jq/7xyftj/Gnw/2rPuv+m1Oj7UjK0ryZk57a9z4xTMP2HTULVXnZvWI/bymzPdDeWFgqWnyhzrlR3dJ7hTttnF58IfkeSWLbjnr5YP32r1wD+vx9gkfIVC0rvPSx18a9cqjLx0xt6wiw7ZzXl3N+zro9u4Fz+PP2d3OP0AIIIBAewl0kEK347c0ZaJSd3a/O2e/O8XufHSOt9vft4vZye2sGp1idArI/VKf7j0C3jsN8TsMh+07J/+PR7436me160aENlpPcBPx+QPZDSawZ119RV6oaPbyfgtfnnDY7A++GlZUu/k1z93XEz+2/MCQRw8anfnViTVVkaqvyn/28cOlp09f2tDHLsvm484tT5vqbKu73J0id37WjPz16wOGjv3ooqRQQ7cFX4x8+MuXTvk+HMnyH3BB1eHdBkeOSs6I9VszM+mlOS+kT6tcG7C3x7EJ/ObXk/uNG/3tzwb1LembaZ3t12id/La2tHPRZ9MHf/PEK4d+v2x1/ibr5+1VuFPi9ufOWe3eV1jjZVPb66+Xy0UAAQRcAh2o0LcqdXu3sLtsvbvgnRK3P7oL3/m9+AU2v7tL0vOc43Et99n19p0E57i9/bm9knWK3n2Hwd425w6Ds7reYne59f2tVtbNs2l+1ZWW7fNejnu1vlWZu+6weI2cHM4hBNvMcXM+Og8PTHSnx96Nbt8hsd/t4naXuPMkMs4dFs9D1djdzr88CCCAQHsKdORCd4rWW+ruYncKtmX12VzO3rJyF6t7RenYO0Xo3r3vlLi7zO3rcUrUKXTvXgDvCtu5U9Gyuk5Q6u7tS/S5cwfA2V5nL4Z3b4a70O0s7lzO/7dV6M5hCafUvR+dEwoT7Gpvfgk6nva1Pf+euWwEEFAs0MEK3Z7UFrvevaXuLSxnBep8dJdt/MJc796idErSXYruZ6pzTsZz7wFwStHt6l1du/cAJFpdO9u1Pdvn/v3Wytx9zoF7xe5+jnznc3eZJ7rT4xy7d4rbOfHNewJcooz2jgPvHQ/Ff3pERwABBHauQAcs9ISl7n5Im7ucEq06nYJ2JJ3CdX90r5ZbO2afaE+Ad3XrlHJrq+qWk9ia71i4yzxRobe2re5bhXd17rbxOiUqe/fvu7fB2c3vPt/A/YgA7/kHCe6sUOg798+XS0MAAQT+LdBBC73VUm+tsNxft3/Zu4L27vZOVOjuXfveXdWt7a72FqJ7te6+zkRF7v6atxxb203vZEtU6ol2w7u/5t174V6hu0/Mc5+M19q5B5Q5/8oggAAC/2WBDlzoW5T6jhRZImJ3gXuPZbsvO9FJZol2Vzu/09rJbW2VubvIE/1+W7/rzNNb3m35JPqe16i1QxOJdq1T5v/lP2KuDgEEEPCuVDuoyBYP/HYXmreo2srrLk7HwX0M3XtZ7l3r7pL37s53X1aiInYfU/YeX/Zu07budDjX5S1197Yn+ry1r7lvD949Ak5pez+2sueAXe0d9I+LzUYAgQ4k0MFX6Ft0jjtLos+3lXVbJ2y5y9q9e7q11bD3joF3te39vrdA2/r91n430R0a9x2Zbbm0ZrStPQVt7DWgzDvQvwdsKgIIdGCBbZVcB4y21cuA/piM7nJvrQTdBe/93OvW1h6A1oo8UWm3topPtPfBW+5t/Yx3db+t7U9058RzqIIi74B/PGwyAgh0YIEfU3YdKO7Wr/G9EzZ+W6vgtq4i0V6Abe0ZsC+vrSJ3X593nonm29bME32vretOdEfF2h7KfCfczrgIBBBAYIcEhBf6Dlls44cT3jnYngLd1gq8tevdnqLf3oDtMecE20eRb+9A+DkEEEBgZwu0xz/0O3sbf4KX1y4r/zZy7mhR/re2b0e36yc4SjYJAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAtwCFrnv+pEcAAQQQECJAoQsZJDEQQAABBHQLUOi65096BBBAAAEhAhS6kEESAwEEEEBAt8D/ATY93seMmImHAAAAAElFTkSuQmCC"; +var meta = { + content +}; +var image_data = { + height: 50, + width: 65, + data: new Uint8ClampedArray() +}; +var canvas = { + baseUrl: "", + width: 0, + height: 0, + style: { + style: { + display: "inline" + } + }, + context2d: {} +}; +var fake_window = { + localStorage: { + setItem: function(item, value) { + fake_window.localStorage[item] = value; + } + }, + navigator: { + webdriver: false, + userAgent: user_agent + }, + length: 0, + document: { + cookie: "" + }, + origin: "", + location: { + href: "", + origin: "" + }, + performance: { + timeOrigin: dateNow + }, + xrax: "", + c: false, + G: "", + z: function(a) { + return [ + (4278190080 & a) >> 24, + (16711680 & a) >> 16, + (65280 & a) >> 8, + 255 & a + ]; + }, + crypto, + msCrypto: crypto, + browser_version: 1676800512 +}; +var nodeList = { + image: { + src: "", + height: 50, + width: 65, + complete: true + }, + context2d: {}, + length: 1 +}; +function get(index2) { + return arr[index2]; +} +arr.push(void 0, null, true, false); +var size = 0; +var memoryBuff; +function getMemBuff() { + return memoryBuff = null !== memoryBuff && 0 !== memoryBuff.byteLength ? memoryBuff : new Uint8Array(wasm.memory.buffer); +} +var encoder = new TextEncoder(); +var encode = function(text, array) { + return encoder.encodeInto(text, array); +}; +function parse(text, func, func2) { + if (void 0 === func2) { + var encoded = encoder.encode(text); + var parsedIndex = func(encoded.length, 1) >>> 0; + return getMemBuff().subarray(parsedIndex, parsedIndex + encoded.length).set(encoded), size = encoded.length, parsedIndex; + } + var len = text.length; + var parsedLen = func(len, 1) >>> 0; + var new_arr = getMemBuff(); + var i2 = 0; + for (; i2 < len; i2++) { + var char = text.charCodeAt(i2); + if (127 < char) { + break; + } + new_arr[parsedLen + i2] = char; + } + return i2 !== len && (0 !== i2 && (text = text.slice(i2)), parsedLen = func2(parsedLen, len, len = i2 + 3 * text.length, 1) >>> 0, encoded = getMemBuff().subarray(parsedLen + i2, parsedLen + len), i2 += encode(text, encoded).written, parsedLen = func2(parsedLen, len, i2, 1) >>> 0), size = i2, parsedLen; +} +var dataView; +function isNull(test) { + return null == test; +} +function getDataView() { + return dataView = dataView === null || isDetached(dataView.buffer) || dataView.buffer !== wasm.memory.buffer ? new DataView(wasm.memory.buffer) : dataView; +} +var pointer = arr.length; +function shift(QP) { + QP < 132 || (arr[QP] = pointer, pointer = QP); +} +function shiftGet(QP) { + var Qn = get(QP); + return shift(QP), Qn; +} +var decoder = new TextDecoder("utf-8", { + fatal: true, + ignoreBOM: true +}); +function decodeSub(index2, offset2) { + return index2 >>>= 0, decoder.decode(getMemBuff().subarray(index2, index2 + offset2)); +} +function addToStack(item) { + pointer === arr.length && arr.push(arr.length + 1); + var Qn = pointer; + return pointer = arr[Qn], arr[Qn] = item, Qn; +} +function args(QP, Qn, QT, func) { + var Qx = { + "a": QP, + "b": Qn, + "cnt": 1, + "dtor": QT + }; + return QP = function() { + var Qw = []; + for (var _i = 0; _i < arguments.length; _i++) { + Qw[_i] = arguments[_i]; + } + Qx.cnt++; + try { + return func.apply(void 0, __spreadArray([Qx.a, Qx.b], Qw, false)); + } finally { + 0 == --Qx.cnt && (wasm.__wbindgen_export_2.get(Qx.dtor)(Qx.a, Qx.b), Qx.a = 0); + } + }, QP.original = Qx, QP; +} +function export3(QP, Qn) { + return shiftGet(wasm.__wbindgen_export_3(QP, Qn)); +} +function export4(Qy, QO, QX) { + wasm.__wbindgen_export_4(Qy, QO, addToStack(QX)); +} +function export5(QP, Qn) { + wasm.__wbindgen_export_5(QP, Qn); +} +function applyToWindow(func, args2) { + try { + return func.apply(fake_window, args2); + } catch (error) { + wasm.__wbindgen_export_6(addToStack(error)); + } +} +function Qj(QP, Qn) { + return Qn = Qn(+QP.length, 1) >>> 0, getMemBuff().set(QP, Qn), size = QP.length, Qn; +} +function QN(QP, Qn) { + return __awaiter(this, void 0, void 0, function() { + var QT, Qt, _a; + return __generator(this, function(_b) { + switch (_b.label) { + case 0: + if (!("function" == typeof Response && QP instanceof Response)) return [3, 3]; + return [4, QP.arrayBuffer()]; + case 1: + QT = _b.sent(); + return [4, WebAssembly.instantiate(QT, Qn)]; + case 2: + _a = (Qt = _b.sent(), Object.assign(Qt, { "bytes": QT })); + return [3, 5]; + case 3: + return [4, WebAssembly.instantiate(QP, Qn)]; + case 4: + _a = (Qt = _b.sent()) instanceof WebAssembly.Instance ? { + "instance": Qt, + "module": QP + } : Qt; + _b.label = 5; + case 5: + return [2, _a]; + } + }); + }); +} +function initWasm() { + var wasmObj = { + "wbg": { + "__wbindgen_is_function": function(index2) { + return typeof get(index2) == "function"; + }, + "__wbindgen_is_string": function(index2) { + return typeof get(index2) == "string"; + }, + "__wbindgen_is_object": function(index2) { + var object = get(index2); + return typeof object == "object" && object !== null; + }, + "__wbindgen_number_get": function(offset2, index2) { + var number = get(index2); + getDataView().setFloat64(offset2 + 8, isNull(number) ? 0 : number, true); + getDataView().setInt32(offset2, isNull(number) ? 0 : 1, true); + }, + "__wbindgen_string_get": function(offset2, index2) { + var str = get(index2); + var val = parse(str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + getDataView().setInt32(offset2 + 4, size, true); + getDataView().setInt32(offset2, val, true); + }, + "__wbindgen_object_drop_ref": function(index2) { + shiftGet(index2); + }, + "__wbindgen_cb_drop": function(index2) { + var org = shiftGet(index2).original; + return 1 == org.cnt-- && !(org.a = 0); + }, + "__wbindgen_string_new": function(index2, offset2) { + return addToStack(decodeSub(index2, offset2)); + }, + "__wbindgen_is_null": function(index2) { + return null === get(index2); + }, + "__wbindgen_is_undefined": function(index2) { + return void 0 === get(index2); + }, + "__wbindgen_boolean_get": function(index2) { + var bool = get(index2); + return "boolean" == typeof bool ? bool ? 1 : 0 : 2; + }, + "__wbg_instanceof_CanvasRenderingContext2d_4ec30ddd3f29f8f9": function() { + return true; + }, + "__wbg_subarray_adc418253d76e2f1": function(index2, num1, num2) { + return addToStack(get(index2).subarray(num1 >>> 0, num2 >>> 0)); + }, + "__wbg_randomFillSync_5c9c955aa56b6049": function() { + }, + "__wbg_getRandomValues_3aa56aa6edec874c": function() { + return applyToWindow(function(index1, index2) { + get(index1).getRandomValues(get(index2)); + }, arguments); + }, + "__wbg_msCrypto_eb05e62b530a1508": function(index2) { + return addToStack(get(index2).msCrypto); + }, + "__wbg_toString_6eb7c1f755c00453": function(index2) { + var fakestr = "[object Storage]"; + return addToStack(fakestr); + }, + "__wbg_toString_139023ab33acec36": function(index2) { + return addToStack(get(index2).toString()); + }, + "__wbg_require_cca90b1a94a0255b": function() { + return applyToWindow(function() { + return addToStack(module.require); + }, arguments); + }, + "__wbg_crypto_1d1f22824a6a080c": function(index2) { + return addToStack(get(index2).crypto); + }, + "__wbg_process_4a72847cc503995b": function(index2) { + return addToStack(get(index2).process); + }, + "__wbg_versions_f686565e586dd935": function(index2) { + return addToStack(get(index2).versions); + }, + "__wbg_node_104a2ff8d6ea03a2": function(index2) { + return addToStack(get(index2).node); + }, + "__wbg_localStorage_3d538af21ea07fcc": function() { + return applyToWindow(function(index2) { + var data = fake_window.localStorage; + if (isNull(data)) { + return 0; + } else { + return addToStack(data); + } + }, arguments); + }, + "__wbg_setfillStyle_59f426135f52910f": function() { + }, + "__wbg_setshadowBlur_229c56539d02f401": function() { + }, + "__wbg_setshadowColor_340d5290cdc4ae9d": function() { + }, + "__wbg_setfont_16d6e31e06a420a5": function() { + }, + "__wbg_settextBaseline_c3266d3bd4a6695c": function() { + }, + "__wbg_drawImage_cb13768a1bdc04bd": function() { + }, + "__wbg_getImageData_66269d289f37d3c7": function() { + return applyToWindow(function() { + return addToStack(image_data); + }, arguments); + }, + "__wbg_rect_2fa1df87ef638738": function() { + }, + "__wbg_fillRect_4dd28e628381d240": function() { + }, + "__wbg_fillText_07e5da9e41652f20": function() { + }, + "__wbg_setProperty_5144ddce66bbde41": function() { + }, + "__wbg_createElement_03cf347ddad1c8c0": function() { + return applyToWindow(function(index2, decodeIndex, decodeIndexOffset) { + return addToStack(canvas); + }, arguments); + }, + "__wbg_querySelector_118a0639aa1f51cd": function() { + return applyToWindow(function(index2, decodeIndex, decodeOffset) { + return addToStack(meta); + }, arguments); + }, + "__wbg_querySelectorAll_50c79cd4f7573825": function() { + return applyToWindow(function() { + return addToStack(nodeList); + }, arguments); + }, + "__wbg_getAttribute_706ae88bd37410fa": function(offset2, index2, decodeIndex, decodeOffset) { + var attr = meta.content; + var todo = isNull(attr) ? 0 : parse(attr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + getDataView().setInt32(offset2 + 4, size, true); + getDataView().setInt32(offset2, todo, true); + }, + "__wbg_target_6795373f170fd786": function(index2) { + var target = get(index2).target; + return isNull(target) ? 0 : addToStack(target); + }, + "__wbg_addEventListener_f984e99465a6a7f4": function() { + }, + "__wbg_instanceof_HtmlCanvasElement_1e81f71f630e46bc": function() { + return true; + }, + "__wbg_setwidth_233645b297bb3318": function(index2, set) { + get(index2).width = set >>> 0; + }, + "__wbg_setheight_fcb491cf54e3527c": function(index2, set) { + get(index2).height = set >>> 0; + }, + "__wbg_getContext_dfc91ab0837db1d1": function() { + return applyToWindow(function(index2) { + return addToStack(get(index2).context2d); + }, arguments); + }, + "__wbg_toDataURL_97b108dd1a4b7454": function() { + return applyToWindow(function(offset2, index2) { + var _dataUrl = parse(dataURL, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + getDataView().setInt32(offset2 + 4, size, true); + getDataView().setInt32(offset2, _dataUrl, true); + }, arguments); + }, + "__wbg_instanceof_HtmlDocument_1100f8a983ca79f9": function() { + return true; + }, + "__wbg_style_ca229e3326b3c3fb": function(index2) { + addToStack(get(index2).style); + }, + "__wbg_instanceof_HtmlImageElement_9c82d4e3651a8533": function() { + return true; + }, + "__wbg_src_87a0e38af6229364": function(offset2, index2) { + var _src = parse(get(index2).src, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + getDataView().setInt32(offset2 + 4, size, true); + getDataView().setInt32(offset2, _src, true); + }, + "__wbg_width_e1a38bdd483e1283": function(index2) { + return get(index2).width; + }, + "__wbg_height_e4cc2294187313c9": function(index2) { + return get(index2).height; + }, + "__wbg_complete_1162c2697406af11": function(index2) { + return get(index2).complete; + }, + "__wbg_data_d34dc554f90b8652": function(offset2, index2) { + var _data = Qj(get(index2).data, wasm.__wbindgen_export_0); + getDataView().setInt32(offset2 + 4, size, true); + getDataView().setInt32(offset2, _data, true); + }, + "__wbg_origin_305402044aa148ce": function() { + return applyToWindow(function(offset2, index2) { + var _origin = parse(get(index2).origin, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + getDataView().setInt32(offset2 + 4, size, true); + getDataView().setInt32(offset2, _origin, true); + }, arguments); + }, + "__wbg_length_8a9352f7b7360c37": function(index2) { + return get(index2).length; + }, + "__wbg_get_c30ae0782d86747f": function(index2) { + var _image = get(index2).image; + return isNull(_image) ? 0 : addToStack(_image); + }, + "__wbg_timeOrigin_f462952854d802ec": function(index2) { + return get(index2).timeOrigin; + }, + "__wbg_instanceof_Window_cee7a886d55e7df5": function() { + return true; + }, + "__wbg_document_eb7fd66bde3ee213": function(index2) { + var _document = get(index2).document; + return isNull(_document) ? 0 : addToStack(_document); + }, + "__wbg_location_b17760ac7977a47a": function(index2) { + return addToStack(get(index2).location); + }, + "__wbg_performance_4ca1873776fdb3d2": function(index2) { + var _performance = get(index2).performance; + return isNull(_performance) ? 0 : addToStack(_performance); + }, + "__wbg_origin_e1f8acdeb3a39a2b": function(offset2, index2) { + var _origin = parse(get(index2).origin, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + getDataView().setInt32(offset2 + 4, size, true); + getDataView().setInt32(offset2, _origin, true); + }, + "__wbg_get_8986951b1ee310e0": function(index2, decode1, decode2) { + var data = get(index2)[decodeSub(decode1, decode2)]; + return isNull(data) ? 0 : addToStack(data); + }, + "__wbg_setTimeout_6ed7182ebad5d297": function() { + return applyToWindow(function() { + return 7; + }, arguments); + }, + "__wbg_self_05040bd9523805b9": function() { + return applyToWindow(function() { + return addToStack(fake_window); + }, arguments); + }, + "__wbg_window_adc720039f2cb14f": function() { + return applyToWindow(function() { + return addToStack(fake_window); + }, arguments); + }, + "__wbg_globalThis_622105db80c1457d": function() { + return applyToWindow(function() { + return addToStack(fake_window); + }, arguments); + }, + "__wbg_global_f56b013ed9bcf359": function() { + return applyToWindow(function() { + return addToStack(fake_window); + }, arguments); + }, + "__wbg_newnoargs_cfecb3965268594c": function(index2, offset2) { + return addToStack(new Function(decodeSub(index2, offset2))); + }, + "__wbindgen_object_clone_ref": function(index2) { + return addToStack(get(index2)); + }, + "__wbg_eval_c824e170787ad184": function() { + return applyToWindow(function(index, offset) { + var fake_str = "fake_" + decodeSub(index, offset); + var ev = eval(fake_str); + return addToStack(ev); + }, arguments); + }, + "__wbg_call_3f093dd26d5569f8": function() { + return applyToWindow(function(index2, index22) { + return addToStack(get(index2).call(get(index22))); + }, arguments); + }, + "__wbg_call_67f2111acd2dfdb6": function() { + return applyToWindow(function(index2, index22, index3) { + return addToStack(get(index2).call(get(index22), get(index3))); + }, arguments); + }, + "__wbg_set_961700853a212a39": function() { + return applyToWindow(function(index2, index22, index3) { + return Reflect.set(get(index2), get(index22), get(index3)); + }, arguments); + }, + "__wbg_buffer_b914fb8b50ebbc3e": function(index2) { + return addToStack(get(index2).buffer); + }, + "__wbg_newwithbyteoffsetandlength_0de9ee56e9f6ee6e": function(index2, val, val2) { + return addToStack(new Uint8Array(get(index2), val >>> 0, val2 >>> 0)); + }, + "__wbg_newwithlength_0d03cef43b68a530": function(length) { + return addToStack(new Uint8Array(length >>> 0)); + }, + "__wbg_new_b1f2d6842d615181": function(index2) { + return addToStack(new Uint8Array(get(index2))); + }, + "__wbg_buffer_67e624f5a0ab2319": function(index2) { + return addToStack(get(index2).buffer); + }, + "__wbg_length_21c4b0ae73cba59d": function(index2) { + return get(index2).length; + }, + "__wbg_set_7d988c98e6ced92d": function(index2, index22, val) { + get(index2).set(get(index22), val >>> 0); + }, + "__wbindgen_debug_string": function() { + }, + "__wbindgen_throw": function(index2, offset2) { + throw new Error(decodeSub(index2, offset2)); + }, + "__wbindgen_memory": function() { + return addToStack(wasm.memory); + }, + "__wbindgen_closure_wrapper117": function(Qn, QT) { + return addToStack(args(Qn, QT, 2, export3)); + }, + "__wbindgen_closure_wrapper119": function(Qn, QT) { + return addToStack(args(Qn, QT, 2, export4)); + }, + "__wbindgen_closure_wrapper121": function(Qn, QT) { + return addToStack(args(Qn, QT, 2, export5)); + }, + "__wbindgen_closure_wrapper123": function(Qn, QT) { + var test = addToStack(args(Qn, QT, 9, export4)); + return test; + } + } + }; + return wasmObj; +} +function assignWasm(resp) { + wasm = resp.exports; + dataView = null, memoryBuff = null, wasm; +} +function QZ(QP) { + var Qn; + return void 0 !== wasm ? wasm : (Qn = initWasm(), QP instanceof WebAssembly.Module || (QP = new WebAssembly.Module(QP)), assignWasm(new WebAssembly.Instance(QP, Qn))); +} +function loadWasm(url) { + return __awaiter(this, void 0, void 0, function() { + var mod, buffer, _a, _b; + var _c; + return __generator(this, function(_d) { + switch (_d.label) { + case 0: + if (!(void 0 !== wasm)) return [3, 1]; + _a = wasm; + return [3, 4]; + case 1: + mod = initWasm(); + url = fetch(url), void 0; + _b = QN; + return [4, url]; + case 2: + return [4, _b.apply(void 0, [_d.sent(), mod])]; + case 3: + _a = (_c = _d.sent(), url = _c.instance, mod = _c.module, buffer = _c.bytes, assignWasm(url), buffer); + _d.label = 4; + case 4: + return [2, _a]; + } + }); + }); +} +var grootLoader = { + groot: function() { + wasm.groot(); + } +}; +var wasmLoader = Object.assign(loadWasm, { "initSync": QZ }, grootLoader); +var V = function(url) { + return __awaiter(void 0, void 0, void 0, function() { + var Q0; + return __generator(this, function(_a) { + switch (_a.label) { + case 0: + return [4, wasmLoader(url)]; + case 1: + Q0 = _a.sent(); + fake_window.bytes = Q0; + try { + wasmLoader.groot(); + } catch (error) { + console.error(error); + } + fake_window.jwt_plugin(Q0); + return [2, fake_window.navigate()]; + } + }); + }); +}; +var getMeta = function(url) { + return __awaiter(void 0, void 0, void 0, function() { + var resp, txt, regx, match, content2; + return __generator(this, function(_a) { + switch (_a.label) { + case 0: + return [4, fetch(url, { + "headers": { + "UserAgent": user_agent, + "Referrer": referrer + } + })]; + case 1: + resp = _a.sent(); + return [4, resp.text()]; + case 2: + txt = _a.sent(); + regx = /name="j_crt" content="[A-Za-z0-9]*/g; + match = txt.match(regx)[0]; + content2 = match.slice(match.lastIndexOf('"') + 1); + meta.content = content2 + "=="; + return [ + 2 + /*return*/ + ]; + } + }); + }); +}; +var i = function(a, P) { + try { + for (var Q0 = 0; Q0 < a.length; Q0++) { + a[Q0] = a[Q0] ^ P[Q0 % P.length]; + } + } catch (Q1) { + return null; + } +}; +var M = function(a, P) { + try { + var Q0 = cryptoJs.AES.decrypt(a, P); + return JSON.parse(Q0.toString(cryptoJs.enc.Utf8)); + } catch (Q1) { + var Q0 = cryptoJs.AES.decrypt(a, P); + } + return []; +}; +function z(a) { + return [(a & 4278190080) >> 24, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255]; +} +var main = function(embed_url2, referrer2) { + return __awaiter(void 0, void 0, void 0, function() { + var xrax, regx, base_url, data, _a, test, browser_version, Q5, getSourcesUrl, temp_sources, Q3, Q1, Q8, str, decrypted_sources; + return __generator(this, function(_b) { + switch (_b.label) { + case 0: + xrax = embed_url2.split("/").pop().split("?").shift(); + regx = /https:\/\/[a-zA-Z0-9.]*/; + base_url = embed_url2.match(regx)[0]; + nodeList.image.src = base_url + "/images/image.png?v=0.0.9"; + _a = Uint8ClampedArray.bind; + return [4, pixels(nodeList.image.src)]; + case 1: + data = new (_a.apply(Uint8ClampedArray, [void 0, _b.sent().data]))(); + image_data.data = data; + test = embed_url2.split("/"); + browser_version = 1676800512; + canvas.baseUrl = base_url; + fake_window.origin = base_url; + fake_window.location.origin = base_url; + fake_window.location.href = embed_url2; + fake_window.xrax = xrax; + fake_window.G = xrax; + return [4, getMeta(embed_url2)]; + case 2: + _b.sent(); + return [4, V(base_url + "/images/loading.png?v=0.0.9")]; + case 3: + Q5 = _b.sent(); + getSourcesUrl = ""; + if (base_url.includes("mega")) { + getSourcesUrl = base_url + "/" + test[3] + "/ajax/" + test[4] + "/getSources?id=" + fake_window.pid + "&v=" + fake_window.localStorage.kversion + "&h=" + fake_window.localStorage.kid + "&b=" + browser_version; + } else { + getSourcesUrl = base_url + "/ajax/" + test[3] + "/" + test[4] + "/getSources?id=" + fake_window.pid + "&v=" + fake_window.localStorage.kversion + "&h=" + fake_window.localStorage.kid + "&b=" + browser_version; + } + return [4, fetch(getSourcesUrl, { + "headers": { + "User-Agent": user_agent, + "Referrer": embed_url2, + "X-Requested-With": "XMLHttpRequest" + }, + "method": "GET", + "mode": "cors" + })]; + case 4: + return [4, _b.sent().json()]; + case 5: + temp_sources = _b.sent(); + Q3 = fake_window.localStorage.kversion; + Q1 = z(Q3); + Q5 = new Uint8Array(Q5); + Q8 = temp_sources.t != 0 ? (i(Q5, Q1), Q5) : (Q8 = temp_sources.k, i(Q8, Q1), Q8); + str = btoa(String.fromCharCode.apply(null, new Uint8Array(Q8))); + decrypted_sources = M(temp_sources.sources, str); + temp_sources.sources = decrypted_sources; + console.log(JSON.stringify(temp_sources, null, 2)); + return [ + 2 + /*return*/ + ]; + } + }); + }); +}; +main(embed_url, referrer); +/*! Bundled license information: + +object-assign/index.js: + (* + object-assign + (c) Sindre Sorhus + @license MIT + *) + +tough-cookie/lib/pubsuffix-psl.js: + (*! + * Copyright (c) 2018, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *) + +tough-cookie/lib/store.js: + (*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *) + +tough-cookie/lib/permuteDomain.js: + (*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *) + +tough-cookie/lib/pathMatch.js: + (*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *) + +tough-cookie/lib/memstore.js: + (*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *) + +tough-cookie/lib/cookie.js: + (*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *) + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +aws-sign2/index.js: + (*! + * Copyright 2010 LearnBoost + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *) + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +uri-js/dist/es5/uri.all.js: + (** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *) + +arr-flatten/index.js: + (*! + * arr-flatten + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) + +is-buffer/index.js: + (*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + *) + +crypto-js/ripemd160.js: + (** @preserve + (c) 2012 by Cédric Mesnil. 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. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + +crypto-js/mode-ctr-gladman.js: + (** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + *) +*/ \ No newline at end of file diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..9d72789 --- /dev/null +++ b/vercel.json @@ -0,0 +1,15 @@ +{ + "version": 2, + "builds": [ + { + "src": "index.js", + "use": "@vercel/node" + } + ], + "routes": [ + { + "src": "/(.*)", + "dest": "index.js" + } + ] +} \ No newline at end of file