diff --git a/.gitignore b/.gitignore
index 7bbca429..722e3af1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -162,3 +162,4 @@ dist
/jx/_30wmv.js
.DS_Store
/spider/catvod/mtv60w[差].js
+/drpy-node-bundle/jx/_30wmv.js
diff --git a/README.md b/README.md
index d5e44324..e1b77c4b 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ nodejs作为服务端的drpy实现。全面升级异步写法
### 常用超链接
* [本项目主页-免翻](https://github.com/hjdhnx/drpy-node)
+* [DS源仓库-去中心化](http://183.87.133.60:5678/)
* ~~[最新DS本地包-适配皮卡丘](/gh/release)~~
* [DS本地包下载中心](/admin/download)
* [接口文档](docs/apidoc.md) | [接口列表如定时任务](docs/apiList.md) |
@@ -70,6 +71,18 @@ nodejs作为服务端的drpy实现。全面升级异步写法
## 更新记录
+### 20260315
+
+更新至V1.3.29
+
+### 20260314
+
+更新至V1.3.28
+
+### 20260301
+
+更新至V1.3.27
+
### 20260228
更新至V1.3.26
diff --git a/apps/source-checker/index.html b/apps/source-checker/index.html
index d31f6267..284b0465 100644
--- a/apps/source-checker/index.html
+++ b/apps/source-checker/index.html
@@ -523,22 +523,36 @@
检测结果
// 2. 如果推荐接口异常,检测一级分类接口
let categorySuccess = false;
if (homeResult.data && homeResult.data.class && homeResult.data.class.length > 0) {
- const firstCategory = homeResult.data.class[0];
- if (firstCategory.type_id) {
+ // 尝试检测前两个分类(容错机制)
+ const categoriesToCheck = homeResult.data.class.slice(0, 2);
+
+ for (let i = 0; i < categoriesToCheck.length; i++) {
+ const category = categoriesToCheck[i];
+ if (!category.type_id) continue;
+
const cateResult = await this.testApi(source.api, {
ac: 'list',
- t: firstCategory.type_id,
+ t: category.type_id,
pg: 1,
extend
});
- result.details.category = cateResult;
+
+ // 记录结果:如果是第一个,直接记录;如果是后续且成功了,也记录覆盖
+ if (i === 0 || (cateResult.success && this.isValidData(cateResult.data))) {
+ result.details.category = cateResult;
+ }
categorySuccess = cateResult.success && this.isValidData(cateResult.data);
if (categorySuccess) {
result.status = 'success';
- result.message = '分类接口正常';
- this.log(`${source.name}: 分类接口正常`, 'success');
+ result.message = `分类接口正常${i > 0 ? ' (容错:分类2)' : ''}`;
+ this.log(`${source.name}: 分类接口正常${i > 0 ? ' (容错:分类2)' : ''}`, 'success');
return;
+ } else {
+ // 如果是第一个失败且还有下一个,记录日志
+ if (i === 0 && categoriesToCheck.length > 1) {
+ this.log(`${source.name}: 分类1无数据,尝试容错检测分类2...`, 'warning');
+ }
}
}
}
diff --git a/config/map.txt b/config/map.txt
index 5919fc23..5e8d2390 100644
--- a/config/map.txt
+++ b/config/map.txt
@@ -18,6 +18,7 @@ emby@@{"server":"http://139.9.106.196:2345","username":"kid","password":""}@@小
采集之王[合]@@?type=url¶ms=../json/采集[密]静态.json$1$@@采王成人[密]
采集之王[合]@@?type=url¶ms=../json/采集2024静态.json$1$@@采王2024
采集之王[合]@@?type=url¶ms=../json/采集2025静态.json$1$@@采王2025
+采集之王[合]@@?type=url¶ms=../json/采集2026静态.json$1$@@采王2026
UC分享@@?type=url¶ms=../json/UC分享.json@@UC分享[盘]
16wMV[听]@@?type=url¶ms=../json/十六万歌曲.txt
点歌欢唱[B]@@?type=url¶ms=../json/十六万歌曲.txt
diff --git a/controllers/docs.js b/controllers/docs.js
index 662c6f2f..723a2f13 100644
--- a/controllers/docs.js
+++ b/controllers/docs.js
@@ -6,7 +6,8 @@
import path from 'path';
import {existsSync, readFileSync} from 'fs';
import {getMimeType} from '../utils/mime-type.js';
-import '../utils/marked.min.js'; // Markdown解析库
+// import '../utils/marked.min.js'; // Markdown解析库
+import { marked } from "marked";
import {validateBasicAuth} from "../utils/api_validate.js";
/**
diff --git a/controllers/root.js b/controllers/root.js
index 9946fbd9..6194cd16 100644
--- a/controllers/root.js
+++ b/controllers/root.js
@@ -1,6 +1,7 @@
import path from 'path';
import {readdirSync, readFileSync, writeFileSync, existsSync, createReadStream} from 'fs';
-import '../utils/marked.min.js';
+// import '../utils/marked.min.js';
+import { marked } from "marked";
import {computeHash} from '../utils/utils.js';
import {validateBasicAuth} from "../utils/api_validate.js";
import {daemon} from "../utils/daemonManager.js";
diff --git a/data/source-checker/report.json b/data/source-checker/report.json
index 58ee9e37..4f8aeb5a 100644
--- a/data/source-checker/report.json
+++ b/data/source-checker/report.json
@@ -1,10 +1,10 @@
{
- "exportTime": "2025-10-07T23:18:12.758Z",
+ "exportTime": "2026-03-14T05:07:55.462Z",
"configUrl": "http://localhost:5757/config/1?sub=all&healthy=0&pwd=dzyyds",
- "totalSources": 192,
+ "totalSources": 299,
"summary": {
- "success": 150,
- "error": 42,
+ "success": 249,
+ "error": 50,
"pending": 0
},
"sources": [
@@ -17,10 +17,21 @@
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%AE%BE%E7%BD%AE%E4%B8%AD%E5%BF%83?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_央视大全[官]",
+ "name": "央视大全[官](DS)",
+ "api": "http://localhost:5757/api/央视大全[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
@@ -32,1106 +43,2348 @@
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%85%BE%E4%BA%91%E9%A9%BE%E9%9B%BE[%E5%AE%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_央视大全[官]",
- "name": "央视大全[官](DS)",
- "api": "http://localhost:5757/api/央视大全[官]?pwd=dzyyds",
+ "key": "drpyS_IPTV直播",
+ "name": "IPTV直播(DS)",
+ "api": "http://localhost:5757/api/直播转点播[合]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%A4%AE%E8%A7%86%E5%A4%A7%E5%85%A8[%E5%AE%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_番茄小说[书]",
- "name": "番茄小说[书](DS)",
- "api": "http://localhost:5757/api/番茄小说[书]?pwd=dzyyds",
+ "key": "drpyS_人人影视[优]",
+ "name": "人人影视[优](DS)",
+ "api": "http://localhost:5757/api/人人影视[优]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%95%AA%E8%8C%84%E5%B0%8F%E8%AF%B4[%E4%B9%A6]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%95%AA%E8%8C%84%E5%B0%8F%E8%AF%B4[%E4%B9%A6]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_大象影视",
- "name": "大象影视(DS)",
- "api": "http://localhost:5757/api/大象影视?pwd=dzyyds",
+ "key": "drpyS_短剧聚合[短]",
+ "name": "短剧聚合[短](DS)",
+ "api": "http://localhost:5757/api/短剧聚合[短]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%A4%A7%E8%B1%A1%E5%BD%B1%E8%A7%86?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_木兮[优]",
- "name": "木兮[优](DS)",
- "api": "http://localhost:5757/api/木兮[优]?pwd=dzyyds",
+ "key": "drpyS_IPTV四川[官]",
+ "name": "IPTV四川[官](DS)",
+ "api": "http://localhost:5757/api/直播转点播[合]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%9C%A8%E5%85%AE[%E4%BC%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_樱花动漫[优]",
- "name": "樱花动漫[优](DS)",
- "api": "http://localhost:5757/api/樱花动漫[优]?pwd=dzyyds",
+ "key": "drpyS_剧海影视[优]",
+ "name": "剧海影视[优](DS)",
+ "api": "http://localhost:5757/api/剧海影视[优]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%A8%B1%E8%8A%B1%E5%8A%A8%E6%BC%AB[%E4%BC%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_PTT[优]",
- "name": "PTT[优](DS)",
- "api": "http://localhost:5757/api/PTT[优]?pwd=dzyyds",
+ "key": "drpyS_星辰影院[优]",
+ "name": "星辰影院[优](DS)",
+ "api": "http://localhost:5757/api/星辰影院[优]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/PTT[%E4%BC%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_hdmoli[盘]",
- "name": "hdmoli[盘](DS)",
- "api": "http://localhost:5757/api/hdmoli[盘]?pwd=dzyyds",
+ "key": "drpyS_木兮[优]",
+ "name": "木兮[优](DS)",
+ "api": "http://localhost:5757/api/木兮[优]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/hdmoli[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_粤漫之家[优]",
- "name": "粤漫之家[优](DS)",
- "api": "http://localhost:5757/api/粤漫之家[优]?pwd=dzyyds",
+ "key": "drpyS_毒舌影视[优]",
+ "name": "毒舌影视[优](DS)",
+ "api": "http://localhost:5757/api/毒舌影视[优]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%B2%A4%E6%BC%AB%E4%B9%8B%E5%AE%B6[%E4%BC%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_FTP[盘]",
- "name": "FTP[盘](DS)",
- "api": "http://localhost:5757/api/ftp[盘]?pwd=dzyyds",
+ "key": "drpyS_小苹果[优]",
+ "name": "小苹果[优](DS)",
+ "api": "http://localhost:5757/api/小苹果[优]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 2,
"lang": "ds",
"status": "success",
- "message": "手动标记为正常",
- "testUrls": {
- "home": "http://localhost:5757/api/ftp[%E7%9B%98]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTTysp0AMxAIzjQSIQAAAA",
- "category": "http://localhost:5757/api/ftp[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1&extend=H4sIAAAAAAAAA9PT088qzs%2FTTysp0AMxAIzjQSIQAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
- "manuallyMarked": true
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
},
{
- "key": "drpyS_WebDav[盘]",
- "name": "WebDav[盘](DS)",
- "api": "http://localhost:5757/api/webdav[盘]?pwd=dzyyds",
+ "key": "drpyS_樱花动漫[优]",
+ "name": "樱花动漫[优](DS)",
+ "api": "http://localhost:5757/api/樱花动漫[优]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 2,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/webdav[%E7%9B%98]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTL09NSkks0wOxASthelgTAAAA",
- "category": "http://localhost:5757/api/webdav[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1&extend=H4sIAAAAAAAAA9PT088qzs%2FTL09NSkks0wOxASthelgTAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_多多[盘]",
- "name": "多多[盘](DS)",
- "api": "http://localhost:5757/api/多多[盘]?pwd=dzyyds",
+ "key": "drpyS_热播影视[优]",
+ "name": "热播影视[优](DS)",
+ "api": "http://localhost:5757/api/热播影视[优]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%A4%9A%E5%A4%9A[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_傻样[盘]",
- "name": "傻样[盘](DS)",
- "api": "http://localhost:5757/api/傻样[盘]?pwd=dzyyds",
+ "key": "drpyS_泥视频[优]",
+ "name": "泥视频[优](DS)",
+ "api": "http://localhost:5757/api/泥视频[优]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%82%BB%E6%A0%B7[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_二小[盘]",
- "name": "二小[盘](DS)",
- "api": "http://localhost:5757/api/二小[盘]?pwd=dzyyds",
+ "key": "drpyS_独播库[优]",
+ "name": "独播库[优](DS)",
+ "api": "http://localhost:5757/api/独播库[优]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%BA%8C%E5%B0%8F[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_小米盘搜[盘]",
- "name": "小米盘搜[盘](DS)",
- "api": "http://localhost:5757/api/小米盘搜[盘]?pwd=dzyyds",
+ "key": "drpyS_粤漫之家[优]",
+ "name": "粤漫之家[优](DS)",
+ "api": "http://localhost:5757/api/粤漫之家[优]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 0,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%B0%8F%E7%B1%B3%E7%9B%98%E6%90%9C[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_木偶[盘]",
- "name": "木偶[盘](DS)",
- "api": "http://localhost:5757/api/木偶[盘]?pwd=dzyyds",
+ "key": "drpyS_耐看点播[优]",
+ "name": "耐看点播[优](DS)",
+ "api": "http://localhost:5757/api/耐看点播[优]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%9C%A8%E5%81%B6[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_欧哥[盘]",
- "name": "欧哥[盘](DS)",
- "api": "http://localhost:5757/api/欧哥[盘]?pwd=dzyyds",
+ "key": "drpyS_永乐视频[优]",
+ "name": "永乐视频[优](DS)",
+ "api": "http://localhost:5757/api/永乐视频[优]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%AC%A7%E5%93%A5[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_玩偶哥哥[盘]",
- "name": "玩偶哥哥[盘](DS)",
- "api": "http://localhost:5757/api/玩偶哥哥[盘]?pwd=dzyyds",
+ "key": "drpyS_麻雀视频[优]",
+ "name": "麻雀视频[优](DS)",
+ "api": "http://localhost:5757/api/麻雀视频[优]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%8E%A9%E5%81%B6%E5%93%A5%E5%93%A5[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_玩偶哥哥DM[盘]",
- "name": "玩偶哥哥DM[盘](DS)",
- "api": "http://localhost:5757/api/玩偶哥哥DM[盘]?pwd=dzyyds",
+ "key": "drpyS_飞快TV[优]",
+ "name": "飞快TV[优](DS)",
+ "api": "http://localhost:5757/api/飞快TV[优]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%8E%A9%E5%81%B6%E5%93%A5%E5%93%A5DM[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%8E%A9%E5%81%B6%E5%93%A5%E5%93%A5DM[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_木偶ᵐ[盘]",
- "name": "木偶ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_追新影视[优]",
+ "name": "追新影视[优](DS)",
+ "api": "http://localhost:5757/api/追新影视[优]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF5NmfF08ZtABDtdR4gAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_玩偶ᵐ[盘]",
- "name": "玩偶ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_傻样[盘]",
+ "name": "傻样[盘](DS)",
+ "api": "http://localhost:5757/api/傻样[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF53rfyaeM2FUMAXj8hgiIAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_蜡笔ᵐ[盘]",
- "name": "蜡笔ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_夸克社[盘]",
+ "name": "夸克社[盘](DS)",
+ "api": "http://localhost:5757/api/夸克社[盘]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF5MWfh8zVTAI8Mua8gAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_欧歌ᵐ[盘]",
- "name": "欧歌ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_木偶[盘]",
+ "name": "木偶[盘](DS)",
+ "api": "http://localhost:5757/api/木偶[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF5tmb5s7U9AIVJTBogAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_虎斑ᵐ[盘]",
- "name": "虎斑ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_多多[盘]",
+ "name": "多多[盘](DS)",
+ "api": "http://localhost:5757/api/多多[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF5MbPv2bSJAFZ8CcsgAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_至臻ᵐ[盘]",
- "name": "至臻ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_Emby[优]",
+ "name": "Emby[优](DS)",
+ "api": "http://localhost:5757/api/Emby[优]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF50b75RftuAAWyZJQgAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_二小ᵐ[盘]",
- "name": "二小ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_爱看资源[盘]",
+ "name": "爱看资源[盘](DS)",
+ "api": "http://localhost:5757/api/爱看资源[盘]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF5sqvn6YZ%2BAGwhNKsgAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_多多ᵐ[盘]",
- "name": "多多ᵐ[盘](DS)",
- "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "key": "drpyS_短剧网[盘]",
+ "name": "短剧网[盘](DS)",
+ "api": "http://localhost:5757/api/短剧网[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp%2F%2FtMJvS9be5%2FvXacHElF5umQWEAEA1%2BC5iSAAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_趣盘社[盘]",
- "name": "趣盘社[盘](DS)",
- "api": "http://localhost:5757/api/趣盘社[盘]?pwd=dzyyds",
+ "key": "drpyS_盘Ta[盘]",
+ "name": "盘Ta[盘](DS)",
+ "api": "http://localhost:5757/api/盘Ta[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%B6%A3%E7%9B%98%E7%A4%BE[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E8%B6%A3%E7%9B%98%E7%A4%BE[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_至臻[盘]",
- "name": "至臻[盘](DS)",
- "api": "http://localhost:5757/api/至臻[盘]?pwd=dzyyds",
+ "key": "drpyS_立播[盘]",
+ "name": "立播[盘](DS)",
+ "api": "http://localhost:5757/api/立播[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%87%B3%E8%87%BB[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_虎斑[盘]",
- "name": "虎斑[盘](DS)",
- "api": "http://localhost:5757/api/虎斑[盘]?pwd=dzyyds",
+ "key": "drpyS_欧哥[盘]",
+ "name": "欧哥[盘](DS)",
+ "api": "http://localhost:5757/api/欧哥[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%99%8E%E6%96%91[%E7%9B%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_360影视[官]",
- "name": "360影视[官](DS)",
- "api": "http://localhost:5757/api/360影视[官]?pwd=dzyyds",
+ "key": "drpyS_番茄小说[书]",
+ "name": "番茄小说[书](DS)",
+ "api": "http://localhost:5757/api/番茄小说[书]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/360%E5%BD%B1%E8%A7%86[%E5%AE%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_哔哩收藏[官]",
- "name": "哔哩收藏[官](DS)",
- "api": "http://localhost:5757/api/哔哩收藏[官]?pwd=dzyyds",
+ "key": "drpyS_荐片[优]",
+ "name": "荐片[优](DS)",
+ "api": "http://localhost:5757/api/荐片[优]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%93%94%E5%93%A9%E6%94%B6%E8%97%8F[%E5%AE%98]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp5ytPJK59N2fZier8eSAQA1H95AxkAAAA%3D",
- "category": "http://localhost:5757/api/%E5%93%94%E5%93%A9%E6%94%B6%E8%97%8F[%E5%AE%98]?pwd=dzyyds&ac=list&t=1&pg=1&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp5ytPJK59N2fZier8eSAQA1H95AxkAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_优酷[官]",
- "name": "优酷[官](DS)",
- "api": "http://localhost:5757/api/优酷[官]?pwd=dzyyds",
+ "key": "php_番茄小说 ᵈᶻ[书]",
+ "name": "番茄小说 ᵈᶻ[书](PHP)",
+ "api": "http://localhost:5757/api/番茄小说 ᵈᶻ[书]?do=php&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "php",
"status": "success",
"message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%BC%98%E9%85%B7[%E5%AE%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E4%BC%98%E9%85%B7[%E5%AE%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_哔哩影视[官]",
- "name": "哔哩影视[官](DS)",
- "api": "http://localhost:5757/api/哔哩影视[官]?pwd=dzyyds",
+ "key": "drpyS_TG频道[优]",
+ "name": "TG频道[优](DS)",
+ "api": "http://localhost:5757/api/TG频道?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%93%94%E5%93%A9%E5%BD%B1%E8%A7%86[%E5%AE%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_雷鲸小站[盘]",
- "name": "雷鲸小站[盘](DS)",
- "api": "http://localhost:5757/api/雷鲸小站[盘]?pwd=dzyyds",
+ "key": "drpyS_瓜子[优]",
+ "name": "瓜子[优](DS)",
+ "api": "http://localhost:5757/api/瓜子[优]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
"message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%9B%B7%E9%B2%B8%E5%B0%8F%E7%AB%99[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E9%9B%B7%E9%B2%B8%E5%B0%8F%E7%AB%99[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_哔哩大全[官]",
- "name": "哔哩大全[官](DS)",
- "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "key": "drpyS_短剧频道[优]",
+ "name": "短剧频道[优](DS)",
+ "api": "http://localhost:5757/api/TG频道?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%88%91%E7%9A%84%E5%93%94%E5%93%A9[%E5%AE%98]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp5ytPJK58uWf60dYUeSAQAZ2A%2BOBkAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_哔哩教育[官]",
- "name": "哔哩教育[官](DS)",
- "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "key": "drpyS_蜡笔ᵐ[盘]",
+ "name": "蜡笔ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%88%91%E7%9A%84%E5%93%94%E5%93%A9[%E5%AE%98]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp5ytPJK59NnfmiaZMeSAQAgv7xPBkAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_哔哩少儿[官]",
- "name": "哔哩少儿[官](DS)",
- "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "key": "drpyS_夸克影视[盘]",
+ "name": "夸克影视[盘](DS)",
+ "api": "http://localhost:5757/api/夸克影视[盘]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%88%91%E7%9A%84%E5%93%94%E5%93%A9[%E5%AE%98]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp5ytPJK59umPi0Zb8eSAQAOsH08xkAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_奇珍异兽[官]",
- "name": "奇珍异兽[官](DS)",
- "api": "http://localhost:5757/api/奇珍异兽[官]?pwd=dzyyds",
+ "key": "drpyS_UC分享[盘]",
+ "name": "UC分享[盘](DS)",
+ "api": "http://localhost:5757/api/UC分享?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%A5%87%E7%8F%8D%E5%BC%82%E5%85%BD[%E5%AE%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%A5%87%E7%8F%8D%E5%BC%82%E5%85%BD[%E5%AE%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
- "manuallyMarked": false
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
},
{
- "key": "drpyS_哔哩大杂烩[官]",
- "name": "哔哩大杂烩[官](DS)",
- "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "key": "drpyS_WebDav影视[盘]",
+ "name": "WebDav影视[盘](DS)",
+ "api": "http://localhost:5757/api/webdav影视[盘]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "drpyS_七味[优]",
+ "name": "七味[优](DS)",
+ "api": "http://localhost:5757/api/七味[优]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%88%91%E7%9A%84%E5%93%94%E5%93%A9[%E5%AE%98]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTfzp5ytPJK58uWf5sbtPz5pV6IEEAolZcGBwAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "3/4 接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_菜狗[官]",
- "name": "菜狗[官](DS)",
- "api": "http://localhost:5757/api/菜狗[官]?pwd=dzyyds",
+ "key": "drpyS_WebDav[盘]",
+ "name": "WebDav[盘](DS)",
+ "api": "http://localhost:5757/api/webdav[盘]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 0,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%8F%9C%E7%8B%97[%E5%AE%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E8%8F%9C%E7%8B%97[%E5%AE%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "drpyS_WebDavZn[盘]",
+ "name": "WebDavZn[盘](DS)",
+ "api": "http://localhost:5757/api/webdav[盘]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "drpyS_FTP[盘]",
+ "name": "FTP[盘](DS)",
+ "api": "http://localhost:5757/api/ftp[盘]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "drpyS_至臻[盘]",
+ "name": "至臻[盘](DS)",
+ "api": "http://localhost:5757/api/至臻[盘]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_斗鱼直播弹幕[官]",
- "name": "斗鱼直播弹幕[官](DS)",
- "api": "http://localhost:5757/api/斗鱼直播弹幕[官]?pwd=dzyyds",
+ "key": "drpyS_虎斑[盘]",
+ "name": "虎斑[盘](DS)",
+ "api": "http://localhost:5757/api/虎斑[盘]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%96%97%E9%B1%BC%E7%9B%B4%E6%92%AD%E5%BC%B9%E5%B9%95[%E5%AE%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_百忙无果[官]",
- "name": "百忙无果[官](DS)",
- "api": "http://localhost:5757/api/百忙无果[官]?pwd=dzyyds",
+ "key": "drpyS_木偶ᵐ[盘]",
+ "name": "木偶ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%99%BE%E5%BF%99%E6%97%A0%E6%9E%9C[%E5%AE%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%99%BE%E5%BF%99%E6%97%A0%E6%9E%9C[%E5%AE%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_30wMV[听]",
- "name": "30wMV[听](DS)",
- "api": "http://localhost:5757/api/30wMV[听]?pwd=dzyyds",
+ "key": "drpyS_多多ᵐ[盘]",
+ "name": "多多ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 1,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/30wMV[%E5%90%AC]?pwd=dzyyds",
- "category": "http://localhost:5757/api/30wMV[%E5%90%AC]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_4K大全[AG³]",
- "name": "4K大全[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "catvod_Alist[盘]",
+ "name": "Alist[盘](cat)",
+ "api": "http://localhost:5757/api/alist?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2Fappcms.4kdq.icu%22%2C%22key%22%3A%22R6FVRw4jsy4Hsitj%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_16wMV[听]",
- "name": "16wMV[听](DS)",
- "api": "http://localhost:5757/api/16wMV[听]?pwd=dzyyds",
+ "key": "drpyS_电影港[磁]",
+ "name": "电影港[磁](DS)",
+ "api": "http://localhost:5757/api/电影港[磁]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/16wMV[%E5%90%AC]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTf9rb%2BLR17ZMd7c%2FW9jybvUmvpKIEABrNdgcbAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_23影视[AM]",
- "name": "23影视[AM](hipy)",
- "api": "http://localhost:5757/api/AppMuou?do=py&pwd=dzyyds",
+ "key": "drpyS_至臻ᵐ[盘]",
+ "name": "至臻ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppMuou?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fmuouapp.oss-cn-hangzhou.aliyuncs.com%2FMUOUAPP%2F764119293.txt%22%2C%22version%22%3A%224.2.0%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_2k动漫[AS]",
- "name": "2k动漫[AS](hipy)",
- "api": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds",
+ "key": "drpyS_集百动漫[漫]",
+ "name": "集百动漫[漫](DS)",
+ "api": "http://localhost:5757/api/集百动漫[漫]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fdmsk.oss-rg-china-mainland.aliyuncs.com%2Fdmapp%2Fdmapi.txt%22%2C%22key%22%3A%22ygcnbcobcegtgigg%22%2C%22iv%22%3A%224058263969143708%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_百度盘[搜]",
- "name": "百度盘[搜](DS)",
- "api": "http://localhost:5757/api/百度盘[搜]?pwd=dzyyds",
+ "key": "php_星星短剧 ᵈᶻ[短]",
+ "name": "星星短剧 ᵈᶻ[短](PHP)",
+ "api": "http://localhost:5757/api/星星短剧 ᵈᶻ[短]?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_动漫豆[漫]",
+ "name": "动漫豆[漫](DS)",
+ "api": "http://localhost:5757/api/动漫豆[漫]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%99%BE%E5%BA%A6%E7%9B%98[%E6%90%9C]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "catvod_爱玩音乐",
- "name": "爱玩音乐(cat)",
- "api": "http://localhost:5757/api/爱玩音乐?do=cat&pwd=dzyyds",
+ "key": "drpyS_360影视[官]",
+ "name": "360影视[官](DS)",
+ "api": "http://localhost:5757/api/360影视[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_甜圈短剧[短]",
+ "name": "甜圈短剧[短](cat)",
+ "api": "http://localhost:5757/api/甜圈短剧[短]?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "cat",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%88%B1%E7%8E%A9%E9%9F%B3%E4%B9%90?do=cat&pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%88%B1%E7%8E%A9%E9%9F%B3%E4%B9%90?do=cat&pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_白蛇[AG³]",
- "name": "白蛇[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "catvod_聚合短剧[短]",
+ "name": "聚合短剧[短](cat)",
+ "api": "http://localhost:5757/api/聚合短剧[短]?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2Ftengxunyunaliyun.oss-cn-shanghai.aliyuncs.com%2Ftengxunyun.txt%22%2C%22datakey%22%3A%22n3l2tx5jdkp9s2c8%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_啊哈DJ[听]",
- "name": "啊哈DJ[听](DS)",
- "api": "http://localhost:5757/api/啊哈DJ[听]?pwd=dzyyds",
+ "key": "drpyS_哔哩戏曲[官]",
+ "name": "哔哩戏曲[官](DS)",
+ "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_哔哩教育[官]",
+ "name": "哔哩教育[官](DS)",
+ "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_哔哩少儿[官]",
+ "name": "哔哩少儿[官](DS)",
+ "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_哔哩大全[官]",
+ "name": "哔哩大全[官](DS)",
+ "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_哔哩大杂烩[官]",
+ "name": "哔哩大杂烩[官](DS)",
+ "api": "http://localhost:5757/api/我的哔哩[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_斗鱼直播弹幕[官]",
+ "name": "斗鱼直播弹幕[官](DS)",
+ "api": "http://localhost:5757/api/斗鱼直播弹幕[官]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "hipy_py_剧透社[盘]",
+ "name": "剧透社[盘](hipy)",
+ "api": "http://localhost:5757/api/剧透社[盘]?do=py&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "hipy",
+ "status": "success",
"message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%95%8A%E5%93%88DJ[%E5%90%AC]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%95%8A%E5%93%88DJ[%E5%90%AC]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_贝乐虎[儿]",
- "name": "贝乐虎[儿](DS)",
- "api": "http://localhost:5757/api/贝乐虎[儿]?pwd=dzyyds",
+ "key": "drpyS_哔哩影视[官]",
+ "name": "哔哩影视[官](DS)",
+ "api": "http://localhost:5757/api/哔哩影视[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_玩偶ᵐ[盘]",
+ "name": "玩偶ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_虎斑ᵐ[盘]",
+ "name": "虎斑ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_樱漫[漫]",
+ "name": "樱漫[漫](DS)",
+ "api": "http://localhost:5757/api/樱漫[漫]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_星芽短剧[短]",
+ "name": "星芽短剧[短](DS)",
+ "api": "http://localhost:5757/api/星芽短剧[短]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_七猫短剧[短]",
+ "name": "七猫短剧[短](DS)",
+ "api": "http://localhost:5757/api/七猫短剧[短]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_牛牛短剧[短]",
+ "name": "牛牛短剧[短](DS)",
+ "api": "http://localhost:5757/api/牛牛短剧[短]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_爱动漫[漫]",
+ "name": "爱动漫[漫](DS)",
+ "api": "http://localhost:5757/api/爱动漫[漫]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_西饭短剧[短]",
+ "name": "西饭短剧[短](DS)",
+ "api": "http://localhost:5757/api/西饭短剧[短]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_哔哩收藏[官]",
+ "name": "哔哩收藏[官](DS)",
+ "api": "http://localhost:5757/api/哔哩收藏[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_优酷[官]",
+ "name": "优酷[官](DS)",
+ "api": "http://localhost:5757/api/优酷[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_菜狗[官]",
+ "name": "菜狗[官](DS)",
+ "api": "http://localhost:5757/api/菜狗[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_果果 ᵈᶻ[官]",
+ "name": "果果 ᵈᶻ[官](PHP)",
+ "api": "http://localhost:5757/api/果果 ᵈᶻ[官]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_百忙无果[官]",
+ "name": "百忙无果[官](DS)",
+ "api": "http://localhost:5757/api/百忙无果[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_哩哩[官]",
+ "name": "哩哩[官](cat)",
+ "api": "http://localhost:5757/api/哩哩[官]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_央央[官]",
+ "name": "央央[官](cat)",
+ "api": "http://localhost:5757/api/央央[官]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_腾腾 ᵈᶻ[官]",
+ "name": "腾腾 ᵈᶻ[官](PHP)",
+ "api": "http://localhost:5757/api/腾腾 ᵈᶻ[官]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_软鸭短剧[短]",
+ "name": "软鸭短剧[短](DS)",
+ "api": "http://localhost:5757/api/软鸭短剧[短]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_番茄短剧[短]",
+ "name": "番茄短剧[短](DS)",
+ "api": "http://localhost:5757/api/番茄短剧[短]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "catvod_奇奇[官]",
+ "name": "奇奇[官](cat)",
+ "api": "http://localhost:5757/api/奇奇[官]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "分类接口正常 (容错:分类2)",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_奇奇 ᵈᶻ[官]",
+ "name": "奇奇 ᵈᶻ[官](PHP)",
+ "api": "http://localhost:5757/api/奇奇 ᵈᶻ[官]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常 (容错:分类2)",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_奇珍异兽[官]",
+ "name": "奇珍异兽[官](DS)",
+ "api": "http://localhost:5757/api/奇珍异兽[官]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常 (容错:分类2)",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_DJ音乐[听]",
+ "name": "DJ音乐[听](DS)",
+ "api": "http://localhost:5757/api/DJ音乐[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_六月听书[听]",
+ "name": "六月听书[听](DS)",
+ "api": "http://localhost:5757/api/六月听书[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_16wMV[听]",
+ "name": "16wMV[听](DS)",
+ "api": "http://localhost:5757/api/16wMV[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_听了么[听]",
+ "name": "听了么[听](cat)",
+ "api": "http://localhost:5757/api/听了么[听]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_网抑云[听]",
+ "name": "网抑云[听](cat)",
+ "api": "http://localhost:5757/api/网抑云[听]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_爱推图[画]",
+ "name": "爱推图[画](DS)",
+ "api": "http://localhost:5757/api/爱推图[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_包子漫画[画]",
+ "name": "包子漫画[画](DS)",
+ "api": "http://localhost:5757/api/包子漫画[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_酷爱漫画[画]",
+ "name": "酷爱漫画[画](DS)",
+ "api": "http://localhost:5757/api/酷爱漫画[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_番茄漫画[画]",
+ "name": "番茄漫画[画](DS)",
+ "api": "http://localhost:5757/api/番茄漫画[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "drpyS_光社漫画[画]",
+ "name": "光社漫画[画](DS)",
+ "api": "http://localhost:5757/api/光社漫画[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_酷爱漫画 ᵈᶻ[画]",
+ "name": "酷爱漫画 ᵈᶻ[画](PHP)",
+ "api": "http://localhost:5757/api/酷爱漫画 ᵈᶻ[画]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_果果[官]",
+ "name": "果果[官](cat)",
+ "api": "http://localhost:5757/api/果果[官]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_30wMV[听]",
+ "name": "30wMV[听](DS)",
+ "api": "http://localhost:5757/api/30wMV[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_凤凰FM[听]",
+ "name": "凤凰FM[听](DS)",
+ "api": "http://localhost:5757/api/凤凰FM[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_爱玩音乐[听]",
+ "name": "爱玩音乐[听](DS)",
+ "api": "http://localhost:5757/api/爱玩音乐[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_博看听书[听]",
+ "name": "博看听书[听](DS)",
+ "api": "http://localhost:5757/api/博看听书[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_布谷音乐[听]",
+ "name": "布谷音乐[听](DS)",
+ "api": "http://localhost:5757/api/布谷音乐[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_狗狗音乐[听]",
+ "name": "狗狗音乐[听](DS)",
+ "api": "http://localhost:5757/api/狗狗音乐[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_蜻蜓FM[听]",
+ "name": "蜻蜓FM[听](DS)",
+ "api": "http://localhost:5757/api/蜻蜓FM[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_青木倪壁纸[画]",
+ "name": "青木倪壁纸[画](cat)",
+ "api": "http://localhost:5757/api/青木倪壁纸[画]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_酷我听书[听]",
+ "name": "酷我听书[听](DS)",
+ "api": "http://localhost:5757/api/酷我听书[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_包子漫画 ᵈᶻ[画]",
+ "name": "包子漫画 ᵈᶻ[画](PHP)",
+ "api": "http://localhost:5757/api/包子漫画 ᵈᶻ[画]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_米兔音乐[听]",
+ "name": "米兔音乐[听](DS)",
+ "api": "http://localhost:5757/api/米兔音乐[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_七猫小说[书]",
+ "name": "七猫小说[书](DS)",
+ "api": "http://localhost:5757/api/七猫小说[书]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_努努书坊[书]",
+ "name": "努努书坊[书](DS)",
+ "api": "http://localhost:5757/api/努努书坊[书]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_去读书[书]",
+ "name": "去读书[书](DS)",
+ "api": "http://localhost:5757/api/去读书[书]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_阅读助手[书]",
+ "name": "阅读助手[书](DS)",
+ "api": "http://localhost:5757/api/阅读助手[书]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "hipy_py_爱玩音乐[听]",
+ "name": "爱玩音乐[听](hipy)",
+ "api": "http://localhost:5757/api/爱玩音乐[听]?do=py&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "hipy",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_音乐磁场[听]",
+ "name": "音乐磁场[听](DS)",
+ "api": "http://localhost:5757/api/音乐磁场[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_去读书 ᵈᶻ[书]",
+ "name": "去读书 ᵈᶻ[书](PHP)",
+ "api": "http://localhost:5757/api/去读书 ᵈᶻ[书]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_七猫小说 ᵈᶻ[书]",
+ "name": "七猫小说 ᵈᶻ[书](PHP)",
+ "api": "http://localhost:5757/api/七猫小说 ᵈᶻ[书]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "hipy_py_爱听音乐[听]",
+ "name": "爱听音乐[听](hipy)",
+ "api": "http://localhost:5757/api/爱听音乐[听]?do=py&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "hipy",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_阅读助手 ᵈᶻ[书]",
+ "name": "阅读助手 ᵈᶻ[书](PHP)",
+ "api": "http://localhost:5757/api/阅读助手 ᵈᶻ[书]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_漫画大全[画]",
+ "name": "漫画大全[画](DS)",
+ "api": "http://localhost:5757/api/漫画大全[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_74P福利图 ᵈᵇ[画]",
+ "name": "74P福利图 ᵈᵇ[画](PHP)",
+ "api": "http://localhost:5757/api/74P福利图 ᵈᵇ[画]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_顶点小说[书]",
+ "name": "顶点小说[书](DS)",
+ "api": "http://localhost:5757/api/顶点小说[书]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_漫神[画]",
+ "name": "漫神[画](DS)",
+ "api": "http://localhost:5757/api/漫神[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_动漫啦[画]",
+ "name": "动漫啦[画](DS)",
+ "api": "http://localhost:5757/api/动漫啦[画]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_酷酷[官]",
+ "name": "酷酷[官](cat)",
+ "api": "http://localhost:5757/api/酷酷[官]?do=cat&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "cat",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "hipy_py_七猫小说[书]",
+ "name": "七猫小说[书](hipy)",
+ "api": "http://localhost:5757/api/七猫小说[书]?do=py&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "hipy",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_音乐聚合[听]",
+ "name": "音乐聚合[听](DS)",
+ "api": "http://localhost:5757/api/音乐聚合[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "php_74P福利图 ᵈᶻ[画]",
+ "name": "74P福利图 ᵈᶻ[画](PHP)",
+ "api": "http://localhost:5757/api/74P福利图 ᵈᶻ[画]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_蓝鹰_Appget",
+ "name": "蓝鹰[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "php_动漫啦 ᵈᶻ[画]",
+ "name": "动漫啦 ᵈᶻ[画](PHP)",
+ "api": "http://localhost:5757/api/动漫啦 ᵈᶻ[画]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_番茄畅听[听]",
+ "name": "番茄畅听[听](DS)",
+ "api": "http://localhost:5757/api/番茄畅听[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "drpyS_播客[听]",
+ "name": "播客[听](DS)",
+ "api": "http://localhost:5757/api/播客[听]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
+ },
+ {
+ "key": "php_番茄漫画 ᵈᶻ[画]",
+ "name": "番茄漫画 ᵈᶻ[画](PHP)",
+ "api": "http://localhost:5757/api/番茄漫画 ᵈᶻ[画]?do=php&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "php",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_TG搜[搜]",
+ "name": "TG搜[搜](DS)",
+ "api": "http://localhost:5757/api/TG搜[搜]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_TG盘搜[搜]",
+ "name": "TG盘搜[搜](DS)",
+ "api": "http://localhost:5757/api/TG盘搜[搜]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_兄弟盘[搜]",
+ "name": "兄弟盘[搜](DS)",
+ "api": "http://localhost:5757/api/兄弟盘[搜]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_百度盘[搜]",
+ "name": "百度盘[搜](DS)",
+ "api": "http://localhost:5757/api/百度盘[搜]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_网盘资源[搜]",
+ "name": "网盘资源[搜](DS)",
+ "api": "http://localhost:5757/api/网盘资源[搜]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_iptv",
+ "name": "iptv(DS)",
+ "api": "http://localhost:5757/api/iptv?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "push_agent",
+ "name": "push_agent(DS)",
+ "api": "http://localhost:5757/api/push_agent?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_动作交互",
+ "name": "动作交互(DS)",
+ "api": "http://localhost:5757/api/动作交互?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_动作测试新定标准版",
+ "name": "动作测试新定标准版(DS)",
+ "api": "http://localhost:5757/api/动作测试新定标准版?pwd=dzyyds",
+ "type": 4,
+ "searchable": 0,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_点歌欢唱[B]",
+ "name": "点歌欢唱[B](DS)",
+ "api": "http://localhost:5757/api/点歌欢唱[B]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_梨园行[戏]",
+ "name": "梨园行[戏](DS)",
+ "api": "http://localhost:5757/api/梨园行[戏]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_影视_Appget",
+ "name": "影视[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_小猪_Appget",
+ "name": "小猪[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_奇奇_Appget",
+ "name": "奇奇[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_爱壹帆",
+ "name": "爱壹帆(DS)",
+ "api": "http://localhost:5757/api/爱壹帆?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_优兔_Appget",
+ "name": "优兔[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_紫金_Appget",
+ "name": "紫金[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_五八_Appget",
+ "name": "五八[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_丫丫动漫_Appget",
+ "name": "丫丫动漫[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_爱盈_Appget",
+ "name": "爱盈[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_元咲动漫_Appget",
+ "name": "元咲动漫[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_火狐_Appget",
+ "name": "火狐[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_数字_Appget",
+ "name": "数字[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_APP模板配置",
+ "name": "APP模板配置(DS)",
+ "api": "http://localhost:5757/api/APP模板配置?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_方舟动漫_Appget",
+ "name": "方舟动漫[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_番薯动漫_Appget",
+ "name": "番薯动漫[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_金牌_Appget",
+ "name": "金牌[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "unknown",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_兔小贝[儿]",
+ "name": "兔小贝[儿](DS)",
+ "api": "http://localhost:5757/api/兔小贝[儿]?pwd=dzyyds",
+ "type": 4,
+ "searchable": 2,
+ "lang": "ds",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "drpyS_开眼",
+ "name": "开眼(DS)",
+ "api": "http://localhost:5757/api/开眼?pwd=dzyyds",
"type": 4,
"searchable": 0,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%B4%9D%E4%B9%90%E8%99%8E[%E5%84%BF]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_哔哩哔哩",
- "name": "哔哩哔哩(hipy)",
- "api": "http://localhost:5757/api/哔哩哔哩?do=py&pwd=dzyyds",
+ "key": "drpyS_咕咕动漫_Appget",
+ "name": "咕咕动漫[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "unknown",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_博看听书[听]",
- "name": "博看听书[听](DS)",
- "api": "http://localhost:5757/api/博看听书[听]?pwd=dzyyds",
+ "key": "drpyS_凡客TV",
+ "name": "凡客TV(DS)",
+ "api": "http://localhost:5757/api/凡客TV?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%8D%9A%E7%9C%8B%E5%90%AC%E4%B9%A6[%E5%90%AC]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_播客[听]",
- "name": "播客[听](DS)",
- "api": "http://localhost:5757/api/播客[听]?pwd=dzyyds",
+ "key": "drpyS_php测试",
+ "name": "php测试(DS)",
+ "api": "http://localhost:5757/api/php?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 1,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%92%AD%E5%AE%A2[%E5%90%AC]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
- "manuallyMarked": false
+ "message": "手动标记为正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": true
},
{
- "key": "hipy_py_畅看[ATV⁵]",
- "name": "畅看[ATV⁵](hipy)",
- "api": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds",
+ "key": "drpyS_王子_Appget",
+ "name": "王子[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "unknown",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds&extend=http%3A%2F%2F118.89.203.120%3A8366"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "2/4 接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_采王2025",
- "name": "采王2025(DS)",
- "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
+ "key": "drpyS_枫林影视",
+ "name": "枫林影视(DS)",
+ "api": "http://localhost:5757/api/枫林影视?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%87%87%E9%9B%86%E4%B9%8B%E7%8E%8B[%E5%90%88]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTf9ne%2FnJ2m5GBkenLuTOfNTTqgURVDFUAfHtVViAAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "3/4 接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_采王2024",
- "name": "采王2024(DS)",
- "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
+ "key": "drpyS_爱看机器人[虫]",
+ "name": "爱看机器人[虫](DS)",
+ "api": "http://localhost:5757/api/爱看机器人[虫]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%87%87%E9%9B%86%E4%B9%8B%E7%8E%8B[%E5%90%88]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTf9ne%2FnJ2m5GBkcnLuTOfNTTqgURVDFUAlKCu7yAAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "分类接口正常 (容错:分类2)",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_仓鼠[AG²]",
- "name": "仓鼠[AG²](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "drpyS_一万部电影[合]",
+ "name": "一万部电影[合](DS)",
+ "api": "http://localhost:5757/api/直播转点播[合]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fnewappcms.cs4k.top%22%2C%22key%22%3A%22Z98KXaLtO2wC1Pte%22%2C%22path%22%3A%22%2Fapi.php%2Fqijiappapi%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_采王道长[合]",
- "name": "采王道长[合](DS)",
- "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
+ "key": "drpyS_贝乐虎[儿]",
+ "name": "贝乐虎[儿](DS)",
+ "api": "http://localhost:5757/api/贝乐虎[儿]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 0,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%87%87%E9%9B%86%E4%B9%8B%E7%8E%8B[%E5%90%88]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTf9ne%2FnJ228u5M581NOqBRFQMAcGPDNobAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_动作测试新定标准版",
- "name": "动作测试新定标准版(DS)",
- "api": "http://localhost:5757/api/动作测试新定标准版?pwd=dzyyds",
+ "key": "drpyS_玖月影视",
+ "name": "玖月影视(DS)",
+ "api": "http://localhost:5757/api/玖月影视?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%8A%A8%E4%BD%9C%E6%B5%8B%E8%AF%95%E6%96%B0%E5%AE%9A%E6%A0%87%E5%87%86%E7%89%88?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_点歌欢唱[B]",
- "name": "点歌欢唱[B](DS)",
- "api": "http://localhost:5757/api/点歌欢唱[B]?pwd=dzyyds",
+ "key": "drpyS_采王zy[密]",
+ "name": "采王zy[密](DS)",
+ "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%82%B9%E6%AD%8C%E6%AC%A2%E5%94%B1[B]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTf9rb%2BLR17ZMd7c%2FW9jybvUmvpKIEABrNdgcbAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_顶点小说[书]",
- "name": "顶点小说[书](DS)",
- "api": "http://localhost:5757/api/顶点小说[书]?pwd=dzyyds",
+ "key": "drpyS_王子TV",
+ "name": "王子TV(DS)",
+ "api": "http://localhost:5757/api/王子TV?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%A1%B6%E7%82%B9%E5%B0%8F%E8%AF%B4[%E4%B9%A6]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_大米[AV²]",
- "name": "大米[AV²](hipy)",
- "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
+ "key": "drpyS_采王道长[合]",
+ "name": "采王道长[合](DS)",
+ "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV2%C2%B2?do=py&pwd=dzyyds&extend=https%3A%2F%2Fdmz8k4.wiki"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_动作交互",
- "name": "动作交互(DS)",
- "api": "http://localhost:5757/api/动作交互?pwd=dzyyds",
+ "key": "drpyS_采王2024",
+ "name": "采王2024(DS)",
+ "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%8A%A8%E4%BD%9C%E4%BA%A4%E4%BA%92?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_动作代理测试",
- "name": "动作代理测试(hipy)",
- "api": "http://localhost:5757/api/动作代理测试?do=py&pwd=dzyyds",
+ "key": "drpyS_采王成人[密]",
+ "name": "采王成人[密](DS)",
+ "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
- "lang": "hipy",
+ "searchable": 1,
+ "lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%8A%A8%E4%BD%9C%E4%BB%A3%E7%90%86%E6%B5%8B%E8%AF%95?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_番茄短剧",
- "name": "番茄短剧(DS)",
- "api": "http://localhost:5757/api/番茄短剧?pwd=dzyyds",
+ "key": "drpyS_飞牛影视",
+ "name": "飞牛影视(DS)",
+ "api": "http://localhost:5757/api/飞牛影视?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%95%AA%E8%8C%84%E7%9F%AD%E5%89%A7?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_凤凰FM[听]",
- "name": "凤凰FM[听](DS)",
- "api": "http://localhost:5757/api/凤凰FM[听]?pwd=dzyyds",
+ "key": "drpyS_麦田影院",
+ "name": "麦田影院(DS)",
+ "api": "http://localhost:5757/api/麦田影院?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%87%A4%E5%87%B0FM[%E5%90%AC]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%87%A4%E5%87%B0FM[%E5%90%AC]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_番喜[ATV⁵]",
- "name": "番喜[ATV⁵](hipy)",
- "api": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds",
+ "key": "drpyS_采王2025",
+ "name": "采王2025(DS)",
+ "api": "http://localhost:5757/api/采集之王[合]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds&extend=http%3A%2F%2F118.89.203.120%3A8762"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_非凡采集[采]",
- "name": "非凡采集[采](DS)",
- "api": "http://localhost:5757/api/非凡采集[采]?pwd=dzyyds",
+ "key": "ktv60w",
+ "name": "mtv60w[差](cat)",
+ "api": "http://localhost:5757/api/mtv60w[差]?do=cat&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 0,
+ "lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%9D%9E%E5%87%A1%E9%87%87%E9%9B%86[%E9%87%87]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_凡客TV",
- "name": "凡客TV(DS)",
- "api": "http://localhost:5757/api/凡客TV?pwd=dzyyds",
+ "key": "drpyS_爱看高清",
+ "name": "爱看高清(DS)",
+ "api": "http://localhost:5757/api/爱看高清?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%87%A1%E5%AE%A2TV?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
- "manuallyMarked": false
- },
- {
- "key": "drpyS_光映视界_AppShark",
- "name": "光映视界[M](SHARK)",
- "api": "http://localhost:5757/api/AppShark[模板]?pwd=dzyyds",
- "type": 4,
- "searchable": 1,
- "lang": "unknown",
- "status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppShark[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=..%2Fjson%2FApp%E6%A8%A1%E6%9D%BF%E9%85%8D%E7%BD%AE.json%24%E5%85%89%E6%98%A0%E8%A7%86%E7%95%8C",
- "category": "http://localhost:5757/api/AppShark[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&ac=list&t=1&pg=1&extend=..%2Fjson%2FApp%E6%A8%A1%E6%9D%BF%E9%85%8D%E7%BD%AE.json%24%E5%85%89%E6%98%A0%E8%A7%86%E7%95%8C"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
@@ -1143,25 +2396,8 @@
"lang": "ds",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%AC%BC%E7%89%87%E4%B9%8B%E5%AE%B6?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
- "manuallyMarked": false
- },
- {
- "key": "hipy_py_海狗视频[Hs]",
- "name": "海狗视频[Hs](hipy)",
- "api": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds",
- "type": 4,
- "searchable": 1,
- "lang": "hipy",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fdy.stxbed.com%22%2C%22app_id%22%3A%22haigou%22%2C%22deviceid%22%3A%22%22%2C%22versionCode%22%3A%2220100%22%2C%22UMENG_CHANNEL%22%3A%22zhuan%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
@@ -1173,1783 +2409,1509 @@
"lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%B2%B3%E5%8D%97%E7%94%B5%E8%A7%86%E4%BB%A3%E7%90%86?do=cat&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
- "manuallyMarked": false
- },
- {
- "key": "hipy_py_好震惊[AV²]",
- "name": "好震惊[AV²](hipy)",
- "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
- "type": 4,
- "searchable": 1,
- "lang": "hipy",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV2%C2%B2?do=py&pwd=dzyyds&extend=http%3A%2F%2Fv.lnhaozhenjin.cn"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_好乐影视",
- "name": "好乐影视(DS)",
- "api": "http://localhost:5757/api/好乐影视?pwd=dzyyds",
+ "key": "catvod_猫测试",
+ "name": "猫测试(cat)",
+ "api": "http://localhost:5757/api/猫测试?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%A5%BD%E4%B9%90%E5%BD%B1%E8%A7%86?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "catvod_荐片",
- "name": "荐片(cat)",
- "api": "http://localhost:5757/api/荐片?do=cat&pwd=dzyyds",
+ "key": "catvod_月光影视",
+ "name": "月光影视(cat)",
+ "api": "http://localhost:5757/api/月光影视?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%8D%90%E7%89%87?do=cat&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_集百动漫",
- "name": "集百动漫(DS)",
- "api": "http://localhost:5757/api/集百动漫?pwd=dzyyds",
+ "key": "hipy_py_4K影视",
+ "name": "4K影视(hipy)",
+ "api": "http://localhost:5757/api/4K影视?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%9B%86%E7%99%BE%E5%8A%A8%E6%BC%AB?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_火猫[AG¹]",
- "name": "火猫[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "hipy_py_呀哩4K[AF]",
+ "name": "呀哩4K[AF](hipy)",
+ "api": "http://localhost:5757/api/AppFei?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2F154.12.90.59%3A14500%22%2C%22key%22%3A%22J6AIORKJ3PQOJKM3%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_火猫影视[AFX]",
- "name": "火猫影视[AFX](hipy)",
- "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
+ "key": "hipy_py_森林动漫[AF]",
+ "name": "森林动漫[AF](hipy)",
+ "api": "http://localhost:5757/api/AppFei?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fcunchu8.obs.cn-north-4.myhuaweicloud.com%2Fconfig.json%22%2C%22parse%22%3A%7B%22JL4K%22%3A%22http%3A%2F%2F194.147.100.155%3A7891%2F%3Furl%3D%22%7D%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_即看影视[AS]",
- "name": "即看影视[AS](hipy)",
- "api": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds",
+ "key": "hipy_py_4KVM",
+ "name": "4KVM(hipy)",
+ "api": "http://localhost:5757/api/4KVM?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fskyappdata-1321528676.cos.accelerate.myqcloud.com%2F4kapp%2Fappipr.txt%22%2C%22key%22%3A%22ygcnbckhcuvygdyb%22%2C%22iv%22%3A%224023892775143708%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
- "manuallyMarked": false
- },
- {
- "key": "drpyS_荐片",
- "name": "荐片(DS)",
- "api": "http://localhost:5757/api/荐片?pwd=dzyyds",
- "type": 4,
- "searchable": 2,
- "lang": "ds",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%8D%90%E7%89%87?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_鲸鱼影视[AG³]",
- "name": "鲸鱼影视[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "hipy_py_火猫影视[AFX]",
+ "name": "火猫影视[AFX](hipy)",
+ "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fjingyu4k-1312635929.cos.ap-nanjing.myqcloud.com%2F1.json%22%2C%22datakey%22%3A%22AAdgrdghjfgswerA%22%2C%22api%22%3A2%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_锦鲤短剧",
- "name": "锦鲤短剧(hipy)",
- "api": "http://localhost:5757/api/锦鲤短剧?do=py&pwd=dzyyds",
+ "key": "hipy_py_茉莉[AG¹]",
+ "name": "茉莉[AG¹](hipy)",
+ "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%94%A6%E9%B2%A4%E7%9F%AD%E5%89%A7?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_剧下饭[AV²]",
- "name": "剧下饭[AV²](hipy)",
- "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
+ "key": "hipy_py_魔方[AG¹]",
+ "name": "魔方[AG¹](hipy)",
+ "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV2%C2%B2?do=py&pwd=dzyyds&extend=http%3A%2F%2Fjxfmax.juxiafan.com"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_橘子TV[Ayq]",
- "name": "橘子TV[Ayq](hipy)",
- "api": "http://localhost:5757/api/AppYqk?do=py&pwd=dzyyds",
+ "key": "hipy_py_五八[AG¹]",
+ "name": "五八[AG¹](hipy)",
+ "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppYqk?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fgapi0725.5p8jcjc.com%2Fconfig.json%2Chttps%3A%2F%2Fgapi0725.olrv5gz.com%2Fconfig.json%2Chttps%3A%2F%2Fgapi0725.mvljeat.com%2Fconfig.json%2Chttps%3A%2F%2Fjzapp-1318635097.cos.ap-shanghai.myqcloud.com%2Fconfig.json%2Chttps%3A%2F%2Fjuzi-config-1360051343.cos.ap-shanghai.myqcloud.com%2Fconfig.json%22%2C%22appId%22%3A%22fea23e11fc1241409682880e15fb2851%22%2C%22appkey%22%3A%22f384b87cc9ef41e4842dda977bae2c7f%22%2C%22udid%22%3A%22bfc18c00-c866-46cb-8d7b-121c39b942d4%22%2C%22bundlerId%22%3A%22com.voraguzzee.ts%22%2C%22source%22%3A%221003_default%22%2C%22version%22%3A%221.0.1%22%2C%22versionCode%22%3A1000%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_剧下饭[AV⁶]",
- "name": "剧下饭[AV⁶](hipy)",
- "api": "http://localhost:5757/api/AppV6?do=py&pwd=dzyyds",
+ "key": "hipy_py_丫丫动漫[AG¹]",
+ "name": "丫丫动漫[AG¹](hipy)",
+ "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV6?do=py&pwd=dzyyds&extend=http%3A%2F%2Fjxfmax.juxiafan.com%2Ficciu_api.php%2Fv1.vod"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_剧永久[AV⁶]",
- "name": "剧永久[AV⁶](hipy)",
- "api": "http://localhost:5757/api/AppV6?do=py&pwd=dzyyds",
+ "key": "catvod_荐片",
+ "name": "荐片(cat)",
+ "api": "http://localhost:5757/api/荐片?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV6?do=py&pwd=dzyyds&extend=%7B%22api%22%3A%22http%3A%2F%2Fyjyi.juyongjiu.com%2Ficciu_api.php%2Fv1.vod%22%2C%22datasignkey%22%3A%226QQNUsP3PkD2ajJCPCY8%22%2C%22apisignkey%22%3A%22lvdoutv-1.0.0%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_酷我听书[听]",
- "name": "酷我听书[听](DS)",
- "api": "http://localhost:5757/api/酷我听书[听]?pwd=dzyyds",
+ "key": "hipy_py_OMOfun[AG¹]",
+ "name": "OMOfun[AG¹](hipy)",
+ "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%85%B7%E6%88%91%E5%90%AC%E4%B9%A6[%E5%90%AC]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E9%85%B7%E6%88%91%E5%90%AC%E4%B9%A6[%E5%90%AC]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_开眼",
- "name": "开眼(DS)",
- "api": "http://localhost:5757/api/开眼?pwd=dzyyds",
+ "key": "drpyS_美颜怪[擦]",
+ "name": "美颜怪[擦](DS)",
+ "api": "http://localhost:5757/api/美颜怪[擦]?pwd=dzyyds",
"type": 4,
"searchable": 0,
"lang": "ds",
"status": "success",
"message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%BC%80%E7%9C%BC?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%BC%80%E7%9C%BC?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_可可影视",
- "name": "可可影视(DS)",
- "api": "http://localhost:5757/api/可可影视?pwd=dzyyds",
+ "key": "hipy_py_雪豹视频[Hs]",
+ "name": "雪豹视频[Hs](hipy)",
+ "api": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 0,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%8F%AF%E5%8F%AF%E5%BD%B1%E8%A7%86?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_看客联盟[AS]",
- "name": "看客联盟[AS](hipy)",
+ "key": "hipy_py_即看影视[AS]",
+ "name": "即看影视[AS](hipy)",
"api": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fkankelm.cn%3A2024%2Fappdomain.txt%22%2C%22key%22%3A%22ygcnbcvybqqckwqy%22%2C%22iv%22%3A%221583560747143708%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_六月听书[听]",
- "name": "六月听书[听](DS)",
- "api": "http://localhost:5757/api/六月听书[听]?pwd=dzyyds",
+ "key": "catvod_喜刷刷",
+ "name": "喜刷刷(cat)",
+ "api": "http://localhost:5757/api/喜刷刷?do=cat&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 0,
+ "lang": "cat",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%85%AD%E6%9C%88%E5%90%AC%E4%B9%A6[%E5%90%AC]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_懒懒视频",
- "name": "懒懒视频(hipy)",
- "api": "http://localhost:5757/api/懒懒视频?do=py&pwd=dzyyds",
+ "key": "catvod_yikm[游戏]",
+ "name": "yikm[游戏](cat)",
+ "api": "http://localhost:5757/api/yikm[游戏]?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "cat",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%87%92%E6%87%92%E8%A7%86%E9%A2%91?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_蓝鹰_Appget",
- "name": "蓝鹰[M](GET)",
- "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
+ "key": "catvod_爱玩音乐",
+ "name": "爱玩音乐(cat)",
+ "api": "http://localhost:5757/api/爱玩音乐?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "unknown",
+ "lang": "cat",
"status": "success",
"message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/Appget[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&extend=..%2Fjson%2FApp%E6%A8%A1%E6%9D%BF%E9%85%8D%E7%BD%AE.json%24%E8%93%9D%E9%B9%B0",
- "category": "http://localhost:5757/api/Appget[%E6%A8%A1%E6%9D%BF]?pwd=dzyyds&ac=list&t=1&pg=1&extend=..%2Fjson%2FApp%E6%A8%A1%E6%9D%BF%E9%85%8D%E7%BD%AE.json%24%E8%93%9D%E9%B9%B0"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_玲珑[AG¹]",
- "name": "玲珑[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "hipy_py_麒麟[AFX]",
+ "name": "麒麟[AFX](hipy)",
+ "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fmac.555618.xyz%22%2C%22key%22%3A%22%23getapp%40TMD%402025%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "catvod_猫测试",
- "name": "猫测试(cat)",
- "api": "http://localhost:5757/api/猫测试?do=cat&pwd=dzyyds",
+ "key": "hipy_py_粉象[AFX]",
+ "name": "粉象[AFX](hipy)",
+ "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
+ "type": 4,
+ "searchable": 1,
+ "lang": "hipy",
+ "status": "success",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
+ "manuallyMarked": false
+ },
+ {
+ "key": "catvod_海龟",
+ "name": "海龟(cat)",
+ "api": "http://localhost:5757/api/海龟?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "cat",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%8C%AB%E6%B5%8B%E8%AF%95?do=cat&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_美颜怪[擦]",
- "name": "美颜怪[擦](DS)",
- "api": "http://localhost:5757/api/美颜怪[擦]?pwd=dzyyds",
+ "key": "hipy_py_拾光视频[Hs]",
+ "name": "拾光视频[Hs](hipy)",
+ "api": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 0,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BE%8E%E9%A2%9C%E6%80%AA[%E6%93%A6]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%BE%8E%E9%A2%9C%E6%80%AA[%E6%93%A6]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_麦田影院",
- "name": "麦田影院(DS)",
- "api": "http://localhost:5757/api/麦田影院?pwd=dzyyds",
+ "key": "hipy_py_番喜[ATV⁵]",
+ "name": "番喜[ATV⁵](hipy)",
+ "api": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%BA%A6%E7%94%B0%E5%BD%B1%E9%99%A2?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_米诺-旧[AG¹]",
- "name": "米诺-旧[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "hipy_py_闪影[AV²]",
+ "name": "闪影[AV²](hipy)",
+ "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2Fwww.milkidc.cn%22%2C%22key%22%3A%2220c79c979da8db0f%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_萝卜[AG³]",
- "name": "萝卜[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "hipy_py_紫云[AV¹]",
+ "name": "紫云[AV¹](hipy)",
+ "api": "http://localhost:5757/api/AppV1?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fapiapplbys.lbys.app%3A5678%22%2C%22key%22%3A%22apiapplbyskey168%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_牛牛短剧",
- "name": "牛牛短剧(DS)",
- "api": "http://localhost:5757/api/牛牛短剧?pwd=dzyyds",
+ "key": "hipy_py_看客联盟[AS]",
+ "name": "看客联盟[AS](hipy)",
+ "api": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%89%9B%E7%89%9B%E7%9F%AD%E5%89%A7?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%89%9B%E7%89%9B%E7%9F%AD%E5%89%A7?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_七猫短剧",
- "name": "七猫短剧(DS)",
- "api": "http://localhost:5757/api/七猫短剧?pwd=dzyyds",
+ "key": "hipy_py_2k动漫[AS]",
+ "name": "2k动漫[AS](hipy)",
+ "api": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%B8%83%E7%8C%AB%E7%9F%AD%E5%89%A7?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E4%B8%83%E7%8C%AB%E7%9F%AD%E5%89%A7?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_米兔-旧[AG¹]",
- "name": "米兔-旧[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "hipy_py_剧下饭[AV²]",
+ "name": "剧下饭[AV²](hipy)",
+ "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2Fnew.tkbot.fun%22%2C%22key%22%3A%22d032c12876bc6848%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_皮皮虾[ATV⁵]",
- "name": "皮皮虾[ATV⁵](hipy)",
- "api": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds",
+ "key": "hipy_py_剧永久[AV⁶]",
+ "name": "剧永久[AV⁶](hipy)",
+ "api": "http://localhost:5757/api/AppV6?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds&extend=http%3A%2F%2F38.55.237.41%3A8762"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_清风DJ[听]",
- "name": "清风DJ[听](DS)",
- "api": "http://localhost:5757/api/清风DJ[听]?pwd=dzyyds",
+ "key": "hipy_py_剧下饭[AV⁶]",
+ "name": "剧下饭[AV⁶](hipy)",
+ "api": "http://localhost:5757/api/AppV6?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 0,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%B8%85%E9%A3%8EDJ[%E5%90%AC]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_七猫小说[书]",
- "name": "七猫小说[书](DS)",
- "api": "http://localhost:5757/api/七猫小说[书]?pwd=dzyyds",
+ "key": "hipy_py_皮皮虾[ATV⁵]",
+ "name": "皮皮虾[ATV⁵](hipy)",
+ "api": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%B8%83%E7%8C%AB%E5%B0%8F%E8%AF%B4[%E4%B9%A6]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E4%B8%83%E7%8C%AB%E5%B0%8F%E8%AF%B4[%E4%B9%A6]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_七月[AG³]",
- "name": "七月[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "hipy_py_依赖测试",
+ "name": "依赖测试(hipy)",
+ "api": "http://localhost:5757/api/依赖测试?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2F99.jl8.top%2F1.txt%22%2C%22key%22%3A%22xnybssspqtwotuwj%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_七猫小说[书]",
- "name": "七猫小说[书](hipy)",
- "api": "http://localhost:5757/api/七猫小说[书]?do=py&pwd=dzyyds",
+ "key": "hipy_py_动作代理测试",
+ "name": "动作代理测试(hipy)",
+ "api": "http://localhost:5757/api/动作代理测试?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 0,
"lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%B8%83%E7%8C%AB%E5%B0%8F%E8%AF%B4[%E4%B9%A6]?do=py&pwd=dzyyds",
- "category": "http://localhost:5757/api/%E4%B8%83%E7%8C%AB%E5%B0%8F%E8%AF%B4[%E4%B9%A6]?do=py&pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "catvod_青木倪壁纸[画]",
- "name": "青木倪壁纸[画](cat)",
- "api": "http://localhost:5757/api/青木倪壁纸[画]?do=cat&pwd=dzyyds",
+ "key": "hipy_py_掌上追剧[AG³]",
+ "name": "掌上追剧[AG³](hipy)",
+ "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "cat",
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%9D%92%E6%9C%A8%E5%80%AA%E5%A3%81%E7%BA%B8[%E7%94%BB]?do=cat&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_热剧[AV²]",
- "name": "热剧[AV²](hipy)",
- "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
+ "key": "hipy_py_一起看[Ayq]",
+ "name": "一起看[Ayq](hipy)",
+ "api": "http://localhost:5757/api/AppYqk?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV2%C2%B2?do=py&pwd=dzyyds&extend=https%3A%2F%2Fwww.rebovod.com"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_软鸭短剧",
- "name": "软鸭短剧(DS)",
- "api": "http://localhost:5757/api/软鸭短剧?pwd=dzyyds",
+ "key": "hipy_py_橘子TV[Ayq]",
+ "name": "橘子TV[Ayq](hipy)",
+ "api": "http://localhost:5757/api/AppYqk?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%BD%AF%E9%B8%AD%E7%9F%AD%E5%89%A7?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E8%BD%AF%E9%B8%AD%E7%9F%AD%E5%89%A7?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_天空影视",
- "name": "天空影视(hipy)",
- "api": "http://localhost:5757/api/天空影视?do=py&pwd=dzyyds",
+ "key": "hipy_py_懒懒视频",
+ "name": "懒懒视频(hipy)",
+ "api": "http://localhost:5757/api/懒懒视频?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%A4%A9%E7%A9%BA%E5%BD%B1%E8%A7%86?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_森林动漫[AF]",
- "name": "森林动漫[AF](hipy)",
- "api": "http://localhost:5757/api/AppFei?do=py&pwd=dzyyds",
+ "key": "hipy_py_Free影视[AS]",
+ "name": "Free影视[AS](hipy)",
+ "api": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppFei?do=py&pwd=dzyyds&extend=https%3A%2F%2Fysa.yy-fun.cc%2Ffeiapp"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_闪影[AV²]",
- "name": "闪影[AV²](hipy)",
- "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
+ "key": "hipy_py_哔哩哔哩",
+ "name": "哔哩哔哩(hipy)",
+ "api": "http://localhost:5757/api/哔哩哔哩?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV2%C2%B2?do=py&pwd=dzyyds&extend=http%3A%2F%2F38.47.213.61%3A41271"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "3/4 接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_拾光视频[Hs]",
- "name": "拾光视频[Hs](hipy)",
- "api": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds",
+ "key": "hipy_py_热播APP",
+ "name": "热播APP(hipy)",
+ "api": "http://localhost:5757/api/热播APP?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fdy.jmzp.net.cn%22%2C%22app_id%22%3A%22shiguang%22%2C%22deviceid%22%3A%22%22%2C%22versionCode%22%3A%2210000%22%2C%22UMENG_CHANNEL%22%3A%22guan%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_网盘资源[搜]",
- "name": "网盘资源[搜](DS)",
- "api": "http://localhost:5757/api/网盘资源[搜]?pwd=dzyyds",
+ "key": "hipy_py_哇哇APP",
+ "name": "哇哇APP(hipy)",
+ "api": "http://localhost:5757/api/哇哇APP?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%BD%91%E7%9B%98%E8%B5%84%E6%BA%90[%E6%90%9C]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_五八[AG¹]",
- "name": "五八[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "hipy_py_新韩剧网",
+ "name": "新韩剧网(hipy)",
+ "api": "http://localhost:5757/api/新韩剧网?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fdy.58ys.vip%22%2C%22key%22%3A%22JEWibY1AgWF0V1xx%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_未来影视[AFX]",
- "name": "未来影视[AFX](hipy)",
- "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
+ "key": "hipy_py_欣欣影视",
+ "name": "欣欣影视(hipy)",
+ "api": "http://localhost:5757/api/欣欣影视?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2Fkumiao.yzbao.com.cn%22%2C%22parse%22%3A%7B%22qq%7Cqiyi%7Cmgtv%7Cyouku%7Cbilibili%22%3A%22https%3A%2F%2Fapi.qljson.xyz%2Fapi%2F%3Fkey%3D67f6a108dc6d84eaf81ac58417c1f72a%26url%3D%22%7D%7D",
- "category": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds&ac=list&t=1&pg=1&extend=%7B%22host%22%3A%22http%3A%2F%2Fkumiao.yzbao.com.cn%22%2C%22parse%22%3A%7B%22qq%7Cqiyi%7Cmgtv%7Cyouku%7Cbilibili%22%3A%22https%3A%2F%2Fapi.qljson.xyz%2Fapi%2F%3Fkey%3D67f6a108dc6d84eaf81ac58417c1f72a%26url%3D%22%7D%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_兔小贝[儿]",
- "name": "兔小贝[儿](DS)",
- "api": "http://localhost:5757/api/兔小贝[儿]?pwd=dzyyds",
+ "key": "hipy_py_看客TV",
+ "name": "看客TV(hipy)",
+ "api": "http://localhost:5757/api/看客TV?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%85%94%E5%B0%8F%E8%B4%9D[%E5%84%BF]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%85%94%E5%B0%8F%E8%B4%9D[%E5%84%BF]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_王子TV",
- "name": "王子TV(DS)",
- "api": "http://localhost:5757/api/王子TV?pwd=dzyyds",
+ "key": "hipy_py_独播库",
+ "name": "独播库(hipy)",
+ "api": "http://localhost:5757/api/独播库?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%8E%8B%E5%AD%90TV?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_西饭短剧",
- "name": "西饭短剧(DS)",
- "api": "http://localhost:5757/api/西饭短剧?pwd=dzyyds",
+ "key": "hipy_py_端木",
+ "name": "端木(hipy)",
+ "api": "http://localhost:5757/api/端木?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%A5%BF%E9%A5%AD%E7%9F%AD%E5%89%A7?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E8%A5%BF%E9%A5%AD%E7%9F%AD%E5%89%A7?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_星芽短剧",
- "name": "星芽短剧(DS)",
- "api": "http://localhost:5757/api/星芽短剧?pwd=dzyyds",
+ "key": "hipy_py_麻雀视频",
+ "name": "麻雀视频(hipy)",
+ "api": "http://localhost:5757/api/麻雀视频?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%98%9F%E8%8A%BD%E7%9F%AD%E5%89%A7?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E6%98%9F%E8%8A%BD%E7%9F%AD%E5%89%A7?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "推荐接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_欣欣影视",
- "name": "欣欣影视(hipy)",
- "api": "http://localhost:5757/api/欣欣影视?do=py&pwd=dzyyds",
+ "key": "php_坚果视频 ᵈᶻ",
+ "name": "坚果视频 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/坚果视频 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "php",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%AC%A3%E6%AC%A3%E5%BD%B1%E8%A7%86?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_新浪资源",
- "name": "新浪资源(hipy)",
- "api": "http://localhost:5757/api/新浪资源?do=py&pwd=dzyyds",
+ "key": "hipy_py_麦田影院",
+ "name": "麦田影院(hipy)",
+ "api": "http://localhost:5757/api/麦田影院?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%96%B0%E6%B5%AA%E8%B5%84%E6%BA%90?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_小绿书[B]",
- "name": "小绿书[B](DS)",
- "api": "http://localhost:5757/api/小绿书[B]?pwd=dzyyds",
+ "key": "php_金牌 ᵈᶻ",
+ "name": "金牌 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/金牌 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
- "searchable": 0,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "php",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%B0%8F%E7%BB%BF%E4%B9%A6[B]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_兄弟盘[搜]",
- "name": "兄弟盘[搜](DS)",
- "api": "http://localhost:5757/api/兄弟盘[搜]?pwd=dzyyds",
+ "key": "php_人人影视 ᵈᶻ",
+ "name": "人人影视 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/人人影视 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "php",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%85%84%E5%BC%9F%E7%9B%98[%E6%90%9C]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_雄鹰[AG²]",
- "name": "雄鹰[AG²](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "hipy_py_猎手APP",
+ "name": "猎手APP(hipy)",
+ "api": "http://localhost:5757/api/猎手APP?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Flanyinghz.oss-cn-hangzhou.aliyuncs.com%2Flanyingxmy.txt%22%2C%22key%22%3A%22ca94b06ca359d80e%22%2C%22path%22%3A%22%2Fapi.php%2Fqijiappapi%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_雪豹视频[Hs]",
- "name": "雪豹视频[Hs](hipy)",
- "api": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds",
+ "key": "php_麻雀视频 ᵈᶻ",
+ "name": "麻雀视频 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/麻雀视频 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "php",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppHs?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fdy.jszdzs.com%22%2C%22app_id%22%3A%22xuebao%22%2C%22deviceid%22%3A%22%22%2C%22versionCode%22%3A%2221300%22%2C%22UMENG_CHANNEL%22%3A%22share%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_依赖测试",
- "name": "依赖测试(hipy)",
- "api": "http://localhost:5757/api/依赖测试?do=py&pwd=dzyyds",
+ "key": "php_山有木兮 ᵈᶻ",
+ "name": "山有木兮 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/山有木兮 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "php",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%BE%9D%E8%B5%96%E6%B5%8B%E8%AF%95?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_丫丫动漫[AG¹]",
- "name": "丫丫动漫[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "php_B站 ᵈᶻ",
+ "name": "B站 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/B站 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "php",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2Ftv.yy-fun.cc%22%2C%22key%22%3A%22qkxnwkfjwpcnwycl%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_呀哩4K[AF]",
- "name": "呀哩4K[AF](hipy)",
- "api": "http://localhost:5757/api/AppFei?do=py&pwd=dzyyds",
+ "key": "php_哇哇影视 ᵈᶻ",
+ "name": "哇哇影视 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/哇哇影视 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "php",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppFei?do=py&pwd=dzyyds&extend=https%3A%2F%2Fysc.yy-fun.cc%2Ffeiapp"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_樱漫[漫]",
- "name": "樱漫[漫](DS)",
- "api": "http://localhost:5757/api/樱漫[漫]?pwd=dzyyds",
+ "key": "hipy_py_河马短剧",
+ "name": "河马短剧(hipy)",
+ "api": "http://localhost:5757/api/河马短剧?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "success",
"message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%A8%B1%E6%BC%AB[%E6%BC%AB]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E6%A8%B1%E6%BC%AB[%E6%BC%AB]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_一起看[Ayq]",
- "name": "一起看[Ayq](hipy)",
- "api": "http://localhost:5757/api/AppYqk?do=py&pwd=dzyyds",
+ "key": "hipy_py_兄弟影视",
+ "name": "兄弟影视(hipy)",
+ "api": "http://localhost:5757/api/兄弟影视?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppYqk?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fgapi0320.3njzmrx1.com%2Fconfig.json%2Chttps%3A%2F%2Fgapi0320.lq0okex8.com%2Fconfig.json%2Chttps%3A%2F%2Fgapi0320.zabqs8xp.com%2Fconfig.json%2Chttps%3A%2F%2Fyappconfig-20250628-1318635097.cos.ap-shanghai.myqcloud.com%2Fconfig.json%2Chttps%3A%2F%2Fyconfig-20250628-1360051343.cos.ap-guangzhou.myqcloud.com%2Fconfig.json%22%2C%22appId%22%3A%22d6d520ea90904f1ba680ed6c9c9f9007%22%2C%22appkey%22%3A%2270af67d2b6cf47679b397ea4c1886877%22%2C%22udid%22%3A%22bfc18c00-c866-46cb-8d7b-121c39b942d4%22%2C%22bundlerId%22%3A%22com.flotimingo.ts%22%2C%22source%22%3A%221001_default%22%2C%22version%22%3A%221.3.10%22%2C%22versionCode%22%3A1104%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_直播转点播[合]",
- "name": "直播转点播[合](DS)",
- "api": "http://localhost:5757/api/直播转点播[合]?pwd=dzyyds",
+ "key": "hipy_py_爱瓜APP",
+ "name": "爱瓜APP(hipy)",
+ "api": "http://localhost:5757/api/爱瓜APP?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "success",
"message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%9B%B4%E6%92%AD%E8%BD%AC%E7%82%B9%E6%92%AD[%E5%90%88]?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTz8ksSzVKzi3WA%2FEAuuBHLxUAAAA%3D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_云云[AG³]",
- "name": "云云[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "hipy_py_瓜子",
+ "name": "瓜子(hipy)",
+ "api": "http://localhost:5757/api/瓜子?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fstaraugust123456.oss-cn-hangzhou.aliyuncs.com%2F1.txt%22%2C%22datakey%22%3A%22staraugust123456%22%2C%22api%22%3A2%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "分类接口正常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_掌上追剧[AG³]",
- "name": "掌上追剧[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "hipy_py_资源管理",
+ "name": "资源管理(hipy)",
+ "api": "http://localhost:5757/api/资源管理?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22http%3A%2F%2Ftvb.yy-fun.cc%22%2C%22key%22%3A%22jcTz6Jda2aKrH8Tk%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "分类接口正常 (容错:分类2)",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_APP模板配置",
- "name": "APP模板配置(DS)",
- "api": "http://localhost:5757/api/APP模板配置?pwd=dzyyds",
+ "key": "php_荐片影视 ᵈᶻ",
+ "name": "荐片影视 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/荐片影视 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "php",
"status": "success",
"message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/APP%E6%A8%A1%E6%9D%BF%E9%85%8D%E7%BD%AE?pwd=dzyyds",
- "category": "http://localhost:5757/api/APP%E6%A8%A1%E6%9D%BF%E9%85%8D%E7%BD%AE?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_紫云[AV¹]",
- "name": "紫云[AV¹](hipy)",
- "api": "http://localhost:5757/api/AppV1?do=py&pwd=dzyyds",
+ "key": "drpyS_啊哈DJ[听]",
+ "name": "啊哈DJ[听](DS)",
+ "api": "http://localhost:5757/api/啊哈DJ[听]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
- "lang": "hipy",
+ "searchable": 2,
+ "lang": "ds",
"status": "success",
- "message": "推荐接口正常",
+ "message": "2/4 接口正常",
"testUrls": {
- "home": "http://localhost:5757/api/AppV1?do=py&pwd=dzyyds&extend=http%3A%2F%2Fziyuncms.feifan12.xyz%2Fapi.php"
+ "home": "http://localhost:5757/api/%E5%95%8A%E5%93%88DJ[%E5%90%AC]?pwd=dzyyds",
+ "category": "http://localhost:5757/api/%E5%95%8A%E5%93%88DJ[%E5%90%AC]?pwd=dzyyds&ac=list&t=1&pg=1",
+ "search": "http://localhost:5757/api/%E5%95%8A%E5%93%88DJ[%E5%90%AC]?pwd=dzyyds&ac=list&wd=%E6%B5%8B%E8%AF%95",
+ "detail": "http://localhost:5757/api/%E5%95%8A%E5%93%88DJ[%E5%90%AC]?pwd=dzyyds&ac=detail&ids=1"
},
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_Free影视[AS]",
- "name": "Free影视[AS](hipy)",
- "api": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds",
+ "key": "drpyS_3Q影视[优]",
+ "name": "3Q影视[优](DS)",
+ "api": "http://localhost:5757/api/3Q影视[优]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
- "status": "success",
- "message": "推荐接口正常",
+ "lang": "ds",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
"testUrls": {
- "home": "http://localhost:5757/api/AppSk?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fsk.xiaoyaoys.top%2Fskkkkkkk.txt%22%2C%22key%22%3A%22ygcnbcczduwydmrs%22%2C%22iv%22%3A%224672921073143708%22%7D"
+ "home": "http://localhost:5757/api/3Q%E5%BD%B1%E8%A7%86[%E4%BC%98]?pwd=dzyyds",
+ "category": "http://localhost:5757/api/3Q%E5%BD%B1%E8%A7%86[%E4%BC%98]?pwd=dzyyds&ac=list&t=1&pg=1"
},
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_iptv",
- "name": "iptv(DS)",
- "api": "http://localhost:5757/api/iptv?pwd=dzyyds",
+ "key": "drpyS_玩偶哥哥DM[盘]",
+ "name": "玩偶哥哥DM[盘](DS)",
+ "api": "http://localhost:5757/api/玩偶哥哥DM[盘]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 1,
"lang": "ds",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/iptv?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_ikanbot",
- "name": "ikanbot(DS)",
- "api": "http://localhost:5757/api/ikanbot?pwd=dzyyds",
+ "key": "drpyS_玩偶哥哥[盘]",
+ "name": "玩偶哥哥[盘](DS)",
+ "api": "http://localhost:5757/api/玩偶哥哥[盘]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
- "status": "success",
- "message": "分类接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/ikanbot?pwd=dzyyds",
- "category": "http://localhost:5757/api/ikanbot?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_gaze",
- "name": "gaze(DS)",
- "api": "http://localhost:5757/api/gaze?pwd=dzyyds",
+ "key": "drpyS_二小[盘]",
+ "name": "二小[盘](DS)",
+ "api": "http://localhost:5757/api/二小[盘]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
+ "searchable": 1,
"lang": "ds",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/gaze?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "push_agent",
- "name": "push_agent(DS)",
- "api": "http://localhost:5757/api/push_agent?pwd=dzyyds",
+ "key": "drpyS_二小ᵐ[盘]",
+ "name": "二小ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 0,
+ "searchable": 1,
"lang": "ds",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/push_agent?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_OMOfun[AG¹]",
- "name": "OMOfun[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "drpyS_欧歌ᵐ[盘]",
+ "name": "欧歌ᵐ[盘](DS)",
+ "api": "http://localhost:5757/api/网盘[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fapp.omofun1.top%22%2C%22key%22%3A%2266dc309cbeeca454%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "lang": "ds",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_TVB云播",
- "name": "TVB云播(DS)",
- "api": "http://localhost:5757/api/TVB云播?pwd=dzyyds",
+ "key": "drpyS_NT动漫[漫]",
+ "name": "NT动漫[漫](DS)",
+ "api": "http://localhost:5757/api/NT动漫[漫]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/TVB%E4%BA%91%E6%92%AD?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_TVB云播[AFX]",
- "name": "TVB云播[AFX](hipy)",
- "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
+ "key": "php_围观短剧 ᵈᶻ[短]",
+ "name": "围观短剧 ᵈᶻ[短](PHP)",
+ "api": "http://localhost:5757/api/围观短剧 ᵈᶻ[短]?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
- "status": "success",
- "message": "推荐接口正常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds&extend=http%3A%2F%2Fapp.hktvyb.cc"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "lang": "php",
+ "status": "error",
+ "message": "推荐和分类接口均异常",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_皮皮虾[优]",
- "name": "皮皮虾[优](DS)",
- "api": "http://localhost:5757/api/皮皮虾[优]?pwd=dzyyds",
+ "key": "drpyS_嗷呜动漫[漫]",
+ "name": "嗷呜动漫[漫](DS)",
+ "api": "http://localhost:5757/api/嗷呜动漫[漫]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
"testUrls": {
- "home": "http://localhost:5757/api/%E7%9A%AE%E7%9A%AE%E8%99%BE[%E4%BC%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%9A%AE%E7%9A%AE%E8%99%BE[%E4%BC%98]?pwd=dzyyds&ac=list&t=1&pg=1"
+ "home": "http://localhost:5757/api/%E5%97%B7%E5%91%9C%E5%8A%A8%E6%BC%AB[%E6%BC%AB]?pwd=dzyyds",
+ "category": "http://localhost:5757/api/%E5%97%B7%E5%91%9C%E5%8A%A8%E6%BC%AB[%E6%BC%AB]?pwd=dzyyds&ac=list&t=1&pg=1"
},
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_光速[优]",
- "name": "光速[优](DS)",
- "api": "http://localhost:5757/api/光速[优]?pwd=dzyyds",
+ "key": "catvod_嗷呜动漫[漫]",
+ "name": "嗷呜动漫[漫](cat)",
+ "api": "http://localhost:5757/api/嗷呜动漫[漫]?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "cat",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%85%89%E9%80%9F[%E4%BC%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_UC分享[盘]",
- "name": "UC分享[盘](DS)",
- "api": "http://localhost:5757/api/UC分享?pwd=dzyyds",
+ "key": "drpyS_雪花电影[磁]",
+ "name": "雪花电影[磁](DS)",
+ "api": "http://localhost:5757/api/雪花电影[磁]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/UC%E5%88%86%E4%BA%AB?pwd=dzyyds&extend=H4sIAAAAAAAAA9PT088qzs%2FTD3V%2B2tH2ZNdqPRAPAKubOwMVAAAA",
- "category": "http://localhost:5757/api/UC%E5%88%86%E4%BA%AB?pwd=dzyyds&ac=list&t=1&pg=1&extend=H4sIAAAAAAAAA9PT088qzs%2FTD3V%2B2tH2ZNdqPRAPAKubOwMVAAAA"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_视觉[优]",
- "name": "视觉[优](DS)",
- "api": "http://localhost:5757/api/视觉[优]?pwd=dzyyds",
+ "key": "drpyS_雷鲸小站[盘]",
+ "name": "雷鲸小站[盘](DS)",
+ "api": "http://localhost:5757/api/雷鲸小站[盘]?pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%A7%86%E8%A7%89[%E4%BC%98]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_团长资源[盘]",
- "name": "团长资源[盘](DS)",
- "api": "http://localhost:5757/api/团长资源[盘]?pwd=dzyyds",
+ "key": "php_绅士漫画 ᵈᶻ[画]",
+ "name": "绅士漫画 ᵈᶻ[画](PHP)",
+ "api": "http://localhost:5757/api/绅士漫画 ᵈᶻ[画]?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "php",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%9B%A2%E9%95%BF%E8%B5%84%E6%BA%90[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%9B%A2%E9%95%BF%E8%B5%84%E6%BA%90[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_特下饭[盘]",
- "name": "特下饭[盘](DS)",
- "api": "http://localhost:5757/api/特下饭[盘]?pwd=dzyyds",
+ "key": "catvod_番茄漫画[画]",
+ "name": "番茄漫画[画](cat)",
+ "api": "http://localhost:5757/api/番茄漫画[画]?do=cat&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%89%B9%E4%B8%8B%E9%A5%AD[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%89%B9%E4%B8%8B%E9%A5%AD[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_小米[盘]",
- "name": "小米[盘](DS)",
- "api": "http://localhost:5757/api/小米[盘]?pwd=dzyyds",
+ "key": "drpyS_仓鼠_Appget",
+ "name": "仓鼠[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%B0%8F%E7%B1%B3[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%B0%8F%E7%B1%B3[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_蜡笔[盘]",
- "name": "蜡笔[盘](DS)",
- "api": "http://localhost:5757/api/蜡笔[盘]?pwd=dzyyds",
+ "key": "drpyS_咖啡_Appget",
+ "name": "咖啡[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%9C%A1%E7%AC%94[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E8%9C%A1%E7%AC%94[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_闪电优汐[盘]",
- "name": "闪电优汐[盘](DS)",
- "api": "http://localhost:5757/api/闪电优汐[盘]?pwd=dzyyds",
+ "key": "drpyS_鲸鱼_Appget",
+ "name": "鲸鱼[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%97%AA%E7%94%B5%E4%BC%98%E6%B1%90[%E7%9B%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E9%97%AA%E7%94%B5%E4%BC%98%E6%B1%90[%E7%9B%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_哔哩直播[官]",
- "name": "哔哩直播[官](DS)",
- "api": "http://localhost:5757/api/哔哩直播[官]?pwd=dzyyds",
+ "key": "drpyS_火锅_Appget",
+ "name": "火锅[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%93%94%E5%93%A9%E7%9B%B4%E6%92%AD[%E5%AE%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%93%94%E5%93%A9%E7%9B%B4%E6%92%AD[%E5%AE%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_抖音直播弹幕[官]",
- "name": "抖音直播弹幕[官](DS)",
- "api": "http://localhost:5757/api/抖音直播弹幕[官]?pwd=dzyyds",
+ "key": "drpyS_旗星_Appget",
+ "name": "旗星[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%8A%96%E9%9F%B3%E7%9B%B4%E6%92%AD%E5%BC%B9%E5%B9%95[%E5%AE%98]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E6%8A%96%E9%9F%B3%E7%9B%B4%E6%92%AD%E5%BC%B9%E5%B9%95[%E5%AE%98]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_爱看剧Fax[ATV⁵]",
- "name": "爱看剧Fax[ATV⁵](hipy)",
- "api": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds",
+ "key": "drpyS_剧梦_Appget",
+ "name": "剧梦[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppToV5?do=py&pwd=dzyyds&extend=http%3A%2F%2F111.173.114.61%3A8762"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_播剧网",
- "name": "播剧网(DS)",
- "api": "http://localhost:5757/api/播剧网?pwd=dzyyds",
+ "key": "drpyS_顾我_Appget",
+ "name": "顾我[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E6%92%AD%E5%89%A7%E7%BD%91?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E6%92%AD%E5%89%A7%E7%BD%91?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_动漫巴士[漫]",
- "name": "动漫巴士[漫](DS)",
- "api": "http://localhost:5757/api/动漫巴士[漫]?pwd=dzyyds",
+ "key": "drpyS_爆炸_Appget",
+ "name": "爆炸[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%8A%A8%E6%BC%AB%E5%B7%B4%E5%A3%AB[%E6%BC%AB]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%8A%A8%E6%BC%AB%E5%B7%B4%E5%A3%AB[%E6%BC%AB]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_短剧库",
- "name": "短剧库(DS)",
- "api": "http://localhost:5757/api/短剧库?pwd=dzyyds",
+ "key": "drpyS_灵虎_Appget",
+ "name": "灵虎[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%9F%AD%E5%89%A7%E5%BA%93?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_番薯动漫[漫]",
- "name": "番薯动漫[漫](DS)",
- "api": "http://localhost:5757/api/番薯动漫[漫]?pwd=dzyyds",
+ "key": "drpyS_云云_Appget",
+ "name": "云云[M](GET)",
+ "api": "http://localhost:5757/api/Appget[模板]?pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "unknown",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%95%AA%E8%96%AF%E5%8A%A8%E6%BC%AB[%E6%BC%AB]?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%95%AA%E8%96%AF%E5%8A%A8%E6%BC%AB[%E6%BC%AB]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "catvod_风车动漫",
- "name": "风车动漫(cat)",
- "api": "http://localhost:5757/api/风车动漫?do=cat&pwd=dzyyds",
+ "key": "drpyS_18av[密]",
+ "name": "18av[密](DS)",
+ "api": "http://localhost:5757/api/18av[密]?pwd=dzyyds",
"type": 4,
- "searchable": 1,
- "lang": "cat",
+ "searchable": 2,
+ "lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%A3%8E%E8%BD%A6%E5%8A%A8%E6%BC%AB?do=cat&pwd=dzyyds",
- "category": "http://localhost:5757/api/%E9%A3%8E%E8%BD%A6%E5%8A%A8%E6%BC%AB?do=cat&pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_瓜子H5",
- "name": "瓜子H5(DS)",
- "api": "http://localhost:5757/api/瓜子H5?pwd=dzyyds",
+ "key": "drpyS_55影视",
+ "name": "55影视(DS)",
+ "api": "http://localhost:5757/api/55影视?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%93%9C%E5%AD%90H5?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_瓜萌[AG³]",
- "name": "瓜萌[AG³](hipy)",
- "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
+ "key": "drpyS_999片",
+ "name": "999片(DS)",
+ "api": "http://localhost:5757/api/999片?pwd=dzyyds",
"type": 4,
- "searchable": 1,
- "lang": "hipy",
+ "searchable": 2,
+ "lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fwww.guahd.com%2F1.txt%22%2C%22key%22%3A%22f2A7D4B9E8C16531%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.758Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_河狸![AV²]",
- "name": "河狸",
- "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
+ "key": "drpyS_TVB云播",
+ "name": "TVB云播(DS)",
+ "api": "http://localhost:5757/api/TVB云播?pwd=dzyyds",
"type": 4,
- "searchable": 1,
- "lang": "hipy",
+ "searchable": 2,
+ "lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV2%C2%B2?do=py&pwd=dzyyds&extend=https%3A%2F%2Fwww.heli888.cc"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_火车太堵",
- "name": "火车太堵(DS)",
- "api": "http://localhost:5757/api/火车太堵?pwd=dzyyds",
+ "key": "drpyS_卫星影视",
+ "name": "卫星影视(DS)",
+ "api": "http://localhost:5757/api/卫星影视?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 2,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%81%AB%E8%BD%A6%E5%A4%AA%E5%A0%B5?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%81%AB%E8%BD%A6%E5%A4%AA%E5%A0%B5?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_九七电影网",
- "name": "九七电影网(DS)",
- "api": "http://localhost:5757/api/九七电影网?pwd=dzyyds",
+ "key": "drpyS_非凡采集[采]",
+ "name": "非凡采集[采](DS)",
+ "api": "http://localhost:5757/api/非凡采集[采]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%B9%9D%E4%B8%83%E7%94%B5%E5%BD%B1%E7%BD%91?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E4%B9%9D%E4%B8%83%E7%94%B5%E5%BD%B1%E7%BD%91?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_金牌影院",
- "name": "金牌影院(DS)",
- "api": "http://localhost:5757/api/金牌影院?pwd=dzyyds",
+ "key": "drpyS_零度",
+ "name": "零度(DS)",
+ "api": "http://localhost:5757/api/零度?pwd=dzyyds",
"type": 4,
- "searchable": 1,
+ "searchable": 0,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%87%91%E7%89%8C%E5%BD%B1%E9%99%A2?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E9%87%91%E7%89%8C%E5%BD%B1%E9%99%A2?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_橘子[AG¹]",
- "name": "橘子[AG¹](hipy)",
- "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
+ "key": "drpyS_黑料不打烊[密]",
+ "name": "黑料不打烊[密](DS)",
+ "api": "http://localhost:5757/api/黑料不打烊[密]?pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "hipy",
+ "lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds&extend=%7B%22host%22%3A%22https%3A%2F%2Fapi1.bffree.cn%22%2C%22key%22%3A%222015692015692015%22%7D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_蓝莓短剧",
- "name": "蓝莓短剧(DS)",
- "api": "http://localhost:5757/api/蓝莓短剧?pwd=dzyyds",
+ "key": "hipy_py_花柳影视[AFX]",
+ "name": "花柳影视[AFX](hipy)",
+ "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%93%9D%E8%8E%93%E7%9F%AD%E5%89%A7?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E8%93%9D%E8%8E%93%E7%9F%AD%E5%89%A7?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_老白故事[听]",
- "name": "老白故事[听](DS)",
- "api": "http://localhost:5757/api/老白故事[听]?pwd=dzyyds",
+ "key": "hipy_py_旗星[AG¹]",
+ "name": "旗星[AG¹](hipy)",
+ "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%80%81%E7%99%BD%E6%95%85%E4%BA%8B[%E5%90%AC]?pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_飘雪影院",
- "name": "飘雪影院(DS)",
- "api": "http://localhost:5757/api/飘雪影院?pwd=dzyyds",
+ "key": "hipy_py_TVB云播[AFX]",
+ "name": "TVB云播[AFX](hipy)",
+ "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%A3%98%E9%9B%AA%E5%BD%B1%E9%99%A2?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E9%A3%98%E9%9B%AA%E5%BD%B1%E9%99%A2?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_人人视频",
- "name": "人人视频(DS)",
- "api": "http://localhost:5757/api/人人视频?pwd=dzyyds",
+ "key": "hipy_py_木瓜影视[AFX]",
+ "name": "木瓜影视[AFX](hipy)",
+ "api": "http://localhost:5757/api/AppFox?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%BA%BA%E4%BA%BA%E8%A7%86%E9%A2%91?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E4%BA%BA%E4%BA%BA%E8%A7%86%E9%A2%91?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_全民追剧",
- "name": "全民追剧(DS)",
- "api": "http://localhost:5757/api/全民追剧?pwd=dzyyds",
+ "key": "hipy_py_AppMuou",
+ "name": "AppMuou(hipy)",
+ "api": "http://localhost:5757/api/AppMuou?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%85%A8%E6%B0%91%E8%BF%BD%E5%89%A7?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%85%A8%E6%B0%91%E8%BF%BD%E5%89%A7?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_秋霞电影网",
- "name": "秋霞电影网(DS)",
- "api": "http://localhost:5757/api/秋霞电影网?pwd=dzyyds",
+ "key": "drpyS_麻豆社[密]",
+ "name": "麻豆社[密](DS)",
+ "api": "http://localhost:5757/api/麻豆社[密]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
"testUrls": {
- "home": "http://localhost:5757/api/%E7%A7%8B%E9%9C%9E%E7%94%B5%E5%BD%B1%E7%BD%91?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%A7%8B%E9%9C%9E%E7%94%B5%E5%BD%B1%E7%BD%91?pwd=dzyyds&ac=list&t=1&pg=1"
+ "home": "http://localhost:5757/api/%E9%BA%BB%E8%B1%86%E7%A4%BE[%E5%AF%86]?pwd=dzyyds",
+ "category": "http://localhost:5757/api/%E9%BA%BB%E8%B1%86%E7%A4%BE[%E5%AF%86]?pwd=dzyyds&ac=list&t=1&pg=1"
},
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_素白白",
- "name": "素白白(DS)",
- "api": "http://localhost:5757/api/素白白?pwd=dzyyds",
+ "key": "drpyS_草榴社区[密]",
+ "name": "草榴社区[密](DS)",
+ "api": "http://localhost:5757/api/草榴社区[密]?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E7%B4%A0%E7%99%BD%E7%99%BD?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E7%B4%A0%E7%99%BD%E7%99%BD?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_雪糕TV",
- "name": "雪糕TV(DS)",
- "api": "http://localhost:5757/api/雪糕TV?pwd=dzyyds",
+ "key": "drpyS_短剧视频库",
+ "name": "短剧视频库(DS)",
+ "api": "http://localhost:5757/api/短剧视频库?pwd=dzyyds",
"type": 4,
"searchable": 2,
"lang": "ds",
"status": "error",
- "message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E9%9B%AA%E7%B3%95TV?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E9%9B%AA%E7%B3%95TV?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "message": "Cannot set properties of null (setting 'textContent')",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_兄弟影视",
- "name": "兄弟影视(DS)",
- "api": "http://localhost:5757/api/兄弟影视?pwd=dzyyds",
+ "key": "hipy_py_玲珑[AG¹]",
+ "name": "玲珑[AG¹](hipy)",
+ "api": "http://localhost:5757/api/AppGet?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E5%85%84%E5%BC%9F%E5%BD%B1%E8%A7%86?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E5%85%84%E5%BC%9F%E5%BD%B1%E8%A7%86?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_追剧狂人",
- "name": "追剧狂人(DS)",
- "api": "http://localhost:5757/api/追剧狂人?pwd=dzyyds",
+ "key": "hipy_py_AppV2¹",
+ "name": "AppV2¹(hipy)",
+ "api": "http://localhost:5757/api/AppV2¹?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E8%BF%BD%E5%89%A7%E7%8B%82%E4%BA%BA?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E8%BF%BD%E5%89%A7%E7%8B%82%E4%BA%BA?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_专享影视",
- "name": "专享影视(DS)",
- "api": "http://localhost:5757/api/专享影视?pwd=dzyyds",
+ "key": "hipy_py_七月[AG³]",
+ "name": "七月[AG³](hipy)",
+ "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/%E4%B8%93%E4%BA%AB%E5%BD%B1%E8%A7%86?pwd=dzyyds",
- "category": "http://localhost:5757/api/%E4%B8%93%E4%BA%AB%E5%BD%B1%E8%A7%86?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "hipy_py_AppV2¹",
- "name": "AppV2¹(hipy)",
- "api": "http://localhost:5757/api/AppV2¹?do=py&pwd=dzyyds",
+ "key": "hipy_py_鲸鱼影视[AG³]",
+ "name": "鲸鱼影视[AG³](hipy)",
+ "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
"lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/AppV2%C2%B9?do=py&pwd=dzyyds"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_ACG漫画网[画]",
- "name": "ACG漫画网[画](DS)",
- "api": "http://localhost:5757/api/ACG漫画网[画]?pwd=dzyyds",
+ "key": "hipy_py_小雅动漫[EM³]",
+ "name": "小雅动漫[EM³](hipy)",
+ "api": "http://localhost:5757/api/emby?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/ACG%E6%BC%AB%E7%94%BB%E7%BD%91[%E7%94%BB]?pwd=dzyyds",
- "category": "http://localhost:5757/api/ACG%E6%BC%AB%E7%94%BB%E7%BD%91[%E7%94%BB]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_KTV歌厅[听]",
- "name": "KTV歌厅[听](DS)",
- "api": "http://localhost:5757/api/KTV歌厅[听]?pwd=dzyyds",
+ "key": "hipy_py_好震惊[AV²]",
+ "name": "好震惊[AV²](hipy)",
+ "api": "http://localhost:5757/api/AppV2²?do=py&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/KTV%E6%AD%8C%E5%8E%85[%E5%90%AC]?pwd=dzyyds",
- "category": "http://localhost:5757/api/KTV%E6%AD%8C%E5%8E%85[%E5%90%AC]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_MP4电影[磁]",
- "name": "MP4电影[磁](DS)",
- "api": "http://localhost:5757/api/MP4电影[磁]?pwd=dzyyds",
+ "key": "hipy_py_云云[AG³]",
+ "name": "云云[AG³](hipy)",
+ "api": "http://localhost:5757/api/getapp3.4.4?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/MP4%E7%94%B5%E5%BD%B1[%E7%A3%81]?pwd=dzyyds",
- "category": "http://localhost:5757/api/MP4%E7%94%B5%E5%BD%B1[%E7%A3%81]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_php测试",
- "name": "php测试(DS)",
- "api": "http://localhost:5757/api/php?pwd=dzyyds",
+ "key": "php_嗷呜动漫 ᵈᶻ",
+ "name": "嗷呜动漫 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/嗷呜动漫 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "php",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/php?pwd=dzyyds&extend=H4sIAAAAAAAAA6tWysgvLlGyUsooKSkottLXLy8v10tKzEwp1UvOz1WqBQCTzRcDIAAAAA%3D%3D",
- "category": "http://localhost:5757/api/php?pwd=dzyyds&ac=list&t=1&pg=1&extend=H4sIAAAAAAAAA6tWysgvLlGyUsooKSkottLXLy8v10tKzEwp1UvOz1WqBQCTzRcDIAAAAA%3D%3D"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_Nyafun[漫]",
- "name": "Nyafun[漫](DS)",
- "api": "http://localhost:5757/api/Nyafun[漫]?pwd=dzyyds",
+ "key": "hipy_py_新浪资源",
+ "name": "新浪资源(hipy)",
+ "api": "http://localhost:5757/api/新浪资源?do=py&pwd=dzyyds",
"type": 4,
"searchable": 1,
- "lang": "ds",
+ "lang": "hipy",
"status": "error",
- "message": "推荐和分类接口均异常",
+ "message": "仅 1/4 接口正常",
"testUrls": {
- "home": "http://localhost:5757/api/Nyafun[%E6%BC%AB]?pwd=dzyyds",
- "category": "http://localhost:5757/api/Nyafun[%E6%BC%AB]?pwd=dzyyds&ac=list&t=1&pg=1"
+ "home": "http://localhost:5757/api/%E6%96%B0%E6%B5%AA%E8%B5%84%E6%BA%90?do=py&pwd=dzyyds",
+ "category": "http://localhost:5757/api/%E6%96%B0%E6%B5%AA%E8%B5%84%E6%BA%90?do=py&pwd=dzyyds&ac=list&t=1&pg=1",
+ "search": "http://localhost:5757/api/%E6%96%B0%E6%B5%AA%E8%B5%84%E6%BA%90?do=py&pwd=dzyyds&ac=list&wd=%E6%B5%8B%E8%AF%95",
+ "detail": "http://localhost:5757/api/%E6%96%B0%E6%B5%AA%E8%B5%84%E6%BA%90?do=py&pwd=dzyyds&ac=detail&ids=1"
},
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
},
{
- "key": "drpyS_OmoFun[漫]",
- "name": "OmoFun[漫](DS)",
- "api": "http://localhost:5757/api/OmoFun[漫]?pwd=dzyyds",
+ "key": "php_零度影视 ᵈᶻ",
+ "name": "零度影视 ᵈᶻ(PHP)",
+ "api": "http://localhost:5757/api/零度影视 ᵈᶻ?do=php&pwd=dzyyds",
"type": 4,
- "searchable": 2,
- "lang": "ds",
+ "searchable": 1,
+ "lang": "php",
"status": "error",
"message": "推荐和分类接口均异常",
- "testUrls": {
- "home": "http://localhost:5757/api/OmoFun[%E6%BC%AB]?pwd=dzyyds",
- "category": "http://localhost:5757/api/OmoFun[%E6%BC%AB]?pwd=dzyyds&ac=list&t=1&pg=1"
- },
- "checkTime": "2025-10-07T23:18:12.759Z",
+ "testUrls": {},
+ "checkTime": "2026-03-14T05:07:55.462Z",
"manuallyMarked": false
}
]
diff --git a/docs/updateRecord.md b/docs/updateRecord.md
index 7bd8fd82..227d570e 100644
--- a/docs/updateRecord.md
+++ b/docs/updateRecord.md
@@ -1,5 +1,30 @@
# drpyS更新记录
+### 20260315
+
+更新至V1.3.29
+
+1. 彻底解决ds代码问题导致的阻止程序退出
+2. 完善全局require处理,支持cjs文件里引入 `axios` 等对象不报错
+3. 彻底优化本地bundle包
+4. 更新迅雷网盘解析支持,设置中心推送里可以推送播放迅雷链接
+
+### 20260314
+
+更新至V1.3.28
+
+1. 合并zy佬在mcp服务上做的一些更新
+2. 优化 drpyS内存开销,杜绝无限内存增长,实测 pm2运行的ds经历多轮源可用性测试后仍旧可以 长期低于 400mb内存占用
+3. 优化本地bundle包几乎完美
+4. 优化阿里和UC网盘解析
+5. 处理了一些失效的源
+
+### 20260301
+
+更新至V1.3.27
+
+1. 移除py源需要的`ujson`依赖,优化py源`资源管理.py`
+
### 20260228
更新至V1.3.26
diff --git a/drpy-node-bundle/libs/localDsCore.bundled.js b/drpy-node-bundle/libs/localDsCore.bundled.js
index ff6d9e60..e5540372 100644
--- a/drpy-node-bundle/libs/localDsCore.bundled.js
+++ b/drpy-node-bundle/libs/localDsCore.bundled.js
@@ -1,15 +1,13 @@
-
-import { createRequire as _createRequire } from 'module';
-import { fileURLToPath as _fileURLToPath } from 'url';
-import { dirname as _dirname } from 'path';
+import { createRequire as _createRequire } from "module";
+import { fileURLToPath as _fileURLToPath } from "url";
+import { dirname as _dirname } from "path";
const __filename = _fileURLToPath(import.meta.url);
const __dirname = _dirname(__filename);
const _originalRequire = _createRequire(import.meta.url);
const require = (moduleName) => {
- if (moduleName === 'pako') return global.pako;
- return _originalRequire(moduleName);
+ if (moduleName === "pako") return global.pako;
+ return _originalRequire(moduleName);
};
-
import { createRequire } from "node:module";
import crypto$1, { createHash } from "crypto";
import path, { join, sep } from "path";
@@ -34,11 +32,10 @@ import process$1 from "node:process";
import os from "node:os";
import tty from "node:tty";
import util$1 from "node:util";
-import { createRequire as createRequire$1 } from "module";
+import Module, { createRequire as createRequire$1 } from "module";
import { setTimeout as setTimeout$1 } from "timers";
import { pipeline } from "stream/promises";
import diagnosticsChannel from "diagnostics_channel";
-
//#region \0rolldown/runtime.js
var __create = Object.create;
var __defProp = Object.defineProperty;
@@ -60,28 +57,20 @@ var __commonJS = (cb, mod) => function() {
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
var __exportAll = (all, no_symbols) => {
let target = {};
- for (var name in all) {
- __defProp(target, name, {
- get: all[name],
- enumerable: true
- });
- }
- if (!no_symbols) {
- __defProp(target, Symbol.toStringTag, { value: "Module" });
- }
+ for (var name in all) __defProp(target, name, {
+ get: all[name],
+ enumerable: true
+ });
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
return target;
};
var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
- key = keys[i];
- if (!__hasOwnProp.call(to, key) && key !== except) {
- __defProp(to, key, {
- get: ((k) => from[k]).bind(null, key),
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
- });
- }
- }
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
+ key = keys[i];
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
+ get: ((k) => from[k]).bind(null, key),
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
+ });
}
return to;
};
@@ -94,9 +83,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
var __toBinaryNode = (base64) => new Uint8Array(Buffer.from(base64, "base64"));
var __toBinary = /* @__PURE__ */ (() => {
var table = new Uint8Array(128);
- for (var i = 0; i < 64; i++) {
- table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;
- }
+ for (var i = 0; i < 64; i++) table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;
return (base64) => {
var n = base64.length, bytes = new Uint8Array((n - (base64[n - 1] == "=") - (base64[n - 2] == "=")) * 3 / 4 | 0);
for (var i = 0, j = 0; i < n;) {
@@ -110,17 +97,14 @@ var __toBinary = /* @__PURE__ */ (() => {
};
})();
var __require = /* @__PURE__ */ createRequire(import.meta.url);
-
//#endregion
//#region ../libs_drpy/pako.min.js
var require_pako_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- !function(t) {
+ (function(t) {
if ("object" == typeof exports && "undefined" != typeof module) module.exports = t();
else if ("function" == typeof define && define.amd) define([], t);
- else {
- ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).pako = t();
- }
- }(function() {
+ else ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).pako = t();
+ })(function() {
return function r(s, o, l) {
function h(e, t) {
if (!o[e]) {
@@ -128,7 +112,7 @@ var require_pako_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var a = "function" == typeof __require && __require;
if (!t && a) return a(e, !0);
if (d) return d(e, !0);
- var i = new Error("Cannot find module '" + e + "'");
+ var i = /* @__PURE__ */ new Error("Cannot find module '" + e + "'");
throw i.code = "MODULE_NOT_FOUND", i;
}
var n = o[e] = { exports: {} };
@@ -410,16 +394,17 @@ var require_pako_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function L(t, e) {
var a, i, n = t.max_chain_length, r = t.strstart, s = t.prev_length, o = t.nice_match, l = t.strstart > t.w_size - B ? t.strstart - (t.w_size - B) : 0, h = t.window, d = t.w_mask, f = t.prev, _ = t.strstart + z, u = h[r + s - 1], c = h[r + s];
t.prev_length >= t.good_match && (n >>= 2), o > t.lookahead && (o = t.lookahead);
- do {
+ do
if (h[(a = e) + s] === c && h[a + s - 1] === u && h[a] === h[r] && h[++a] === h[r + 1]) {
r += 2, a++;
- do {} while (h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && r < _);
+ do ;
+while (h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && h[++r] === h[++a] && r < _);
if (i = z - (_ - r), r = _ - z, s < i) {
if (t.match_start = e, o <= (s = i)) break;
u = h[r + s - 1], c = h[r + s];
}
}
- } while ((e = f[e & d]) > l && 0 != --n);
+ while ((e = f[e & d]) > l && 0 != --n);
return s <= t.lookahead ? s : t.lookahead;
}
function H(t) {
@@ -571,7 +556,8 @@ var require_pako_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (t.match_length = 0, t.lookahead >= x && 0 < t.strstart && (i = s[n = t.strstart - 1]) === s[++n] && i === s[++n] && i === s[++n]) {
r = t.strstart + z;
- do {} while (i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && n < r);
+ do ;
+while (i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && i === s[++n] && n < r);
t.match_length = z - (r - n), t.match_length > t.lookahead && (t.match_length = t.lookahead);
}
if (t.match_length >= x ? (a = h._tr_tally(t, 1, t.match_length - x), t.lookahead -= t.match_length, t.strstart += t.match_length, t.match_length = 0) : (a = h._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++), a && (U(t, !1), 0 === t.strm.avail_out)) return A;
@@ -611,8 +597,8 @@ var require_pako_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10: [function(t, e, a) {
"use strict";
e.exports = function(t, e) {
- var a, i, n, r, s, o, l, h, d, f, _, u, c, b, g, m, w, p, v, k, y, x, z, B, S;
- a = t.state, i = t.next_in, B = t.input, n = i + (t.avail_in - 5), r = t.next_out, S = t.output, s = r - (e - t.avail_out), o = r + (t.avail_out - 257), l = a.dmax, h = a.wsize, d = a.whave, f = a.wnext, _ = a.window, u = a.hold, c = a.bits, b = a.lencode, g = a.distcode, m = (1 << a.lenbits) - 1, w = (1 << a.distbits) - 1;
+ var a = t.state, i = t.next_in, n, r, s, o, l, h, d, f, _, u, c, b, g, m, w, p, v, k, y, x, z, B = t.input, S;
+ n = i + (t.avail_in - 5), r = t.next_out, S = t.output, s = r - (e - t.avail_out), o = r + (t.avail_out - 257), l = a.dmax, h = a.wsize, d = a.whave, f = a.wnext, _ = a.window, u = a.hold, c = a.bits, b = a.lencode, g = a.distcode, m = (1 << a.lenbits) - 1, w = (1 << a.distbits) - 1;
t: do {
c < 15 && (u += B[i++] << c, c += 8, u += B[i++] << c, c += 8), p = b[u & m];
e: for (;;) {
@@ -1271,7 +1257,7 @@ var require_pako_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
n[d = E & f] = y << 24 | x << 16 | _ - r | 0;
}
}
- return 0 !== E && (n[_ + E] = w - z << 24 | 64 << 16 | 0), o.bits = y, 0;
+ return 0 !== E && (n[_ + E] = w - z << 24 | 4194304), o.bits = y, 0;
};
}, { "../utils/common": 3 }],
13: [function(t, e, a) {
@@ -1553,57 +1539,35 @@ var require_pako_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}, {}, [])("/");
});
}));
-
//#endregion
//#region ../libs_drpy/crypto-js.js
var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory();
- } else if (typeof define === "function" && define.amd) {
- define([], factory);
- } else {
- globalThis.CryptoJS = factory();
- }
+ if (typeof exports === "object") module.exports = exports = factory();
+ else if (typeof define === "function" && define.amd) define([], factory);
+ else globalThis.CryptoJS = factory();
})(exports, function() {
/**
* CryptoJS core components.
*/
var CryptoJS = CryptoJS || function(Math, undefined) {
var crypto;
- if (typeof window !== "undefined" && window.crypto) {
- crypto = window.crypto;
- }
- if (typeof self !== "undefined" && self.crypto) {
- crypto = self.crypto;
- }
- if (typeof globalThis !== "undefined" && globalThis.crypto) {
- crypto = globalThis.crypto;
- }
- if (!crypto && typeof window !== "undefined" && window.msCrypto) {
- crypto = window.msCrypto;
- }
- if (!crypto && typeof global !== "undefined" && global.crypto) {
- crypto = global.crypto;
- }
- if (!crypto && typeof __require === "function") {
- try {
- crypto = __require("crypto");
- } catch (err) {}
- }
+ if (typeof window !== "undefined" && window.crypto) crypto = window.crypto;
+ if (typeof self !== "undefined" && self.crypto) crypto = self.crypto;
+ if (typeof globalThis !== "undefined" && globalThis.crypto) crypto = globalThis.crypto;
+ if (!crypto && typeof window !== "undefined" && window.msCrypto) crypto = window.msCrypto;
+ if (!crypto && typeof global !== "undefined" && global.crypto) crypto = global.crypto;
+ if (!crypto && typeof __require === "function") try {
+ crypto = __require("crypto");
+ } catch (err) {}
var cryptoSecureRandomInt = function() {
if (crypto) {
- if (typeof crypto.getRandomValues === "function") {
- try {
- return crypto.getRandomValues(new Uint32Array(1))[0];
- } catch (err) {}
- }
- if (typeof crypto.randomBytes === "function") {
- try {
- return crypto.randomBytes(4).readInt32LE();
- } catch (err) {}
- }
+ if (typeof crypto.getRandomValues === "function") try {
+ return crypto.getRandomValues(new Uint32Array(1))[0];
+ } catch (err) {}
+ if (typeof crypto.randomBytes === "function") try {
+ return crypto.randomBytes(4).readInt32LE();
+ } catch (err) {}
}
throw new Error("Native crypto module could not be used to get secure random number.");
};
@@ -1632,14 +1596,10 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return {
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);
- };
- }
+ 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;
@@ -1651,14 +1611,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
init: function() {},
mixIn: function(properties) {
- for (var propertyName in properties) {
- if (properties.hasOwnProperty(propertyName)) {
- this[propertyName] = properties[propertyName];
- }
- }
- if (properties.hasOwnProperty("toString")) {
- this.toString = properties.toString;
- }
+ for (var propertyName in properties) if (properties.hasOwnProperty(propertyName)) this[propertyName] = properties[propertyName];
+ if (properties.hasOwnProperty("toString")) this.toString = properties.toString;
},
clone: function() {
return this.init.prototype.extend(this);
@@ -1674,11 +1628,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var WordArray = C_lib.WordArray = Base.extend({
init: function(words, sigBytes) {
words = this.words = words || [];
- if (sigBytes != undefined) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 4;
- }
+ if (sigBytes != undefined) this.sigBytes = sigBytes;
+ else this.sigBytes = words.length * 4;
},
toString: function(encoder) {
return (encoder || Hex).stringify(this);
@@ -1689,16 +1640,11 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var thisSigBytes = this.sigBytes;
var thatSigBytes = wordArray.sigBytes;
this.clamp();
- if (thisSigBytes % 4) {
- for (var i = 0; i < thatSigBytes; i++) {
- var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
- }
- } else {
- for (var j = 0; j < thatSigBytes; j += 4) {
- thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
- }
+ if (thisSigBytes % 4) for (var i = 0; i < thatSigBytes; i++) {
+ var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
+ thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
}
+ else for (var j = 0; j < thatSigBytes; j += 4) thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
this.sigBytes += thatSigBytes;
return this;
},
@@ -1715,9 +1661,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
random: function(nBytes) {
var words = [];
- for (var i = 0; i < nBytes; i += 4) {
- words.push(cryptoSecureRandomInt());
- }
+ for (var i = 0; i < nBytes; i += 4) words.push(cryptoSecureRandomInt());
return new WordArray.init(words, nBytes);
}
});
@@ -1743,9 +1687,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(hexStr) {
var hexStrLength = hexStr.length;
var words = [];
- for (var i = 0; i < hexStrLength; i += 2) {
- words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
- }
+ for (var i = 0; i < hexStrLength; i += 2) words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
return new WordArray.init(words, hexStrLength / 2);
}
};
@@ -1766,9 +1708,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(latin1Str) {
var latin1StrLength = latin1Str.length;
var words = [];
- for (var i = 0; i < latin1StrLength; i++) {
- words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
- }
+ for (var i = 0; i < latin1StrLength; i++) words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
return new WordArray.init(words, latin1StrLength);
}
};
@@ -1800,9 +1740,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._nDataBytes = 0;
},
_append: function(data) {
- if (typeof data == "string") {
- data = Utf8.parse(data);
- }
+ if (typeof data == "string") data = Utf8.parse(data);
this._data.concat(data);
this._nDataBytes += data.sigBytes;
},
@@ -1812,19 +1750,13 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var dataWords = data.words;
var dataSigBytes = data.sigBytes;
var blockSize = this.blockSize;
- var blockSizeBytes = blockSize * 4;
- var nBlocksReady = dataSigBytes / blockSizeBytes;
- if (doFlush) {
- nBlocksReady = Math.ceil(nBlocksReady);
- } else {
- nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
- }
+ var nBlocksReady = dataSigBytes / (blockSize * 4);
+ if (doFlush) nBlocksReady = Math.ceil(nBlocksReady);
+ else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
var nWordsReady = nBlocksReady * blockSize;
var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
if (nWordsReady) {
- for (var offset = 0; offset < nWordsReady; offset += blockSize) {
- this._doProcessBlock(dataWords, offset);
- }
+ for (var offset = 0; offset < nWordsReady; offset += blockSize) this._doProcessBlock(dataWords, offset);
processedWords = dataWords.splice(0, nWordsReady);
data.sigBytes -= nBytesReady;
}
@@ -1858,11 +1790,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
},
finalize: function(messageUpdate) {
- if (messageUpdate) {
- this._append(messageUpdate);
- }
- var hash = this._doFinalize();
- return hash;
+ if (messageUpdate) this._append(messageUpdate);
+ return this._doFinalize();
},
blockSize: 512 / 32,
_createHelper: function(hasher) {
@@ -1907,11 +1836,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var X64WordArray = C_x64.WordArray = Base.extend({
init: function(words, sigBytes) {
words = this.words = words || [];
- if (sigBytes != undefined) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 8;
- }
+ if (sigBytes != undefined) this.sigBytes = sigBytes;
+ else this.sigBytes = words.length * 8;
},
toX32: function() {
var x64Words = this.words;
@@ -1928,45 +1854,30 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var clone = Base.clone.call(this);
var words = clone.words = this.words.slice(0);
var wordsLength = words.length;
- for (var i = 0; i < wordsLength; i++) {
- words[i] = words[i].clone();
- }
+ for (var i = 0; i < wordsLength; i++) words[i] = words[i].clone();
return clone;
}
});
})();
(function() {
- if (typeof ArrayBuffer != "function") {
- return;
- }
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ if (typeof ArrayBuffer != "function") return;
+ var WordArray = CryptoJS.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 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 i = 0; i < typedArrayByteLength; i++) {
- words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
- }
+ for (var i = 0; i < typedArrayByteLength; i++) words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
superInit.call(this, words, typedArrayByteLength);
- } else {
- superInit.apply(this, arguments);
- }
+ } else superInit.apply(this, arguments);
};
subInit.prototype = WordArray;
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_enc = C.enc;
/**
* UTF-16 BE encoding strategy.
@@ -1985,9 +1896,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(utf16Str) {
var utf16StrLength = utf16Str.length;
var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
- }
+ for (var i = 0; i < utf16StrLength; i++) words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
return WordArray.create(words, utf16StrLength * 2);
}
};
@@ -2008,9 +1917,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(utf16Str) {
var utf16StrLength = utf16Str.length;
var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
- }
+ for (var i = 0; i < utf16StrLength; i++) words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
return WordArray.create(words, utf16StrLength * 2);
}
};
@@ -2020,8 +1927,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_enc = C.enc;
/**
* Base64 encoding strategy.
@@ -2038,16 +1944,10 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * .75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
- }
+ for (var j = 0; j < 4 && i + j * .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);
- }
- }
+ if (paddingChar) while (base64Chars.length % 4) base64Chars.push(paddingChar);
return base64Chars.join("");
},
parse: function(base64Str) {
@@ -2056,16 +1956,12 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var reverseMap = this._reverseMap;
if (!reverseMap) {
reverseMap = this._reverseMap = [];
- for (var j = 0; j < map.length; j++) {
- reverseMap[map.charCodeAt(j)] = j;
- }
+ 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;
- }
+ if (paddingIndex !== -1) base64StrLength = paddingIndex;
}
return parseLoop(base64Str, base64StrLength, reverseMap);
},
@@ -2074,22 +1970,17 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function parseLoop(base64Str, base64StrLength, reverseMap) {
var words = [];
var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
+ for (var i = 0; i < base64StrLength; i++) if (i % 4) {
+ var bitsCombined = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2 | reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
+ words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
+ nBytes++;
}
return WordArray.create(words, nBytes);
}
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_enc = C.enc;
/**
* Base64url encoding strategy.
@@ -2106,16 +1997,10 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * .75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
- }
+ for (var j = 0; j < 4 && i + j * .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);
- }
- }
+ if (paddingChar) while (base64Chars.length % 4) base64Chars.push(paddingChar);
return base64Chars.join("");
},
parse: function(base64Str, urlSafe = true) {
@@ -2124,16 +2009,12 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var reverseMap = this._reverseMap;
if (!reverseMap) {
reverseMap = this._reverseMap = [];
- for (var j = 0; j < map.length; j++) {
- reverseMap[map.charCodeAt(j)] = j;
- }
+ 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;
- }
+ if (paddingIndex !== -1) base64StrLength = paddingIndex;
}
return parseLoop(base64Str, base64StrLength, reverseMap);
},
@@ -2143,14 +2024,10 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function parseLoop(base64Str, base64StrLength, reverseMap) {
var words = [];
var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
+ for (var i = 0; i < base64StrLength; i++) if (i % 4) {
+ var bitsCombined = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2 | reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
+ words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
+ nBytes++;
}
return WordArray.create(words, nBytes);
}
@@ -2163,9 +2040,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var C_algo = C.algo;
var T = [];
(function() {
- for (var i = 0; i < 64; i++) {
- T[i] = Math.abs(Math.sin(i + 1)) * 4294967296 | 0;
- }
+ for (var i = 0; i < 64; i++) T[i] = Math.abs(Math.sin(i + 1)) * 4294967296 | 0;
})();
/**
* MD5 hash algorithm.
@@ -2376,22 +2251,16 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var d = H[3];
var e = H[4];
for (var i = 0; i < 80; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
+ if (i < 16) W[i] = M[offset + i] | 0;
+ else {
var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
W[i] = n << 1 | n >>> 31;
}
var t = (a << 5 | a >>> 27) + e + W[i];
- if (i < 20) {
- t += (b & c | ~b & d) + 1518500249;
- } else if (i < 40) {
- t += (b ^ c ^ d) + 1859775393;
- } else if (i < 60) {
- t += (b & c | b & d | c & d) - 1894007588;
- } else {
- t += (b ^ c ^ d) - 899497514;
- }
+ if (i < 20) t += (b & c | ~b & d) + 1518500249;
+ else if (i < 40) t += (b ^ c ^ d) + 1859775393;
+ else if (i < 60) t += (b & c | b & d | c & d) - 1894007588;
+ else t += (b ^ c ^ d) - 899497514;
e = d;
d = c;
c = b << 30 | b >>> 2;
@@ -2464,11 +2333,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
(function() {
function isPrime(n) {
var sqrtN = Math.sqrt(n);
- for (var factor = 2; factor <= sqrtN; factor++) {
- if (!(n % factor)) {
- return false;
- }
- }
+ for (var factor = 2; factor <= sqrtN; factor++) if (!(n % factor)) return false;
return true;
}
function getFractionalBits(n) {
@@ -2478,9 +2343,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var nPrime = 0;
while (nPrime < 64) {
if (isPrime(n)) {
- if (nPrime < 8) {
- H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
- }
+ if (nPrime < 8) H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
nPrime++;
}
@@ -2506,9 +2369,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var g = H[6];
var h = H[7];
for (var i = 0; i < 64; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
+ if (i < 16) W[i] = M[offset + i] | 0;
+ else {
var gamma0x = W[i - 15];
var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
var gamma1x = W[i - 2];
@@ -2590,8 +2452,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})(Math);
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_algo = C.algo;
var SHA256 = C_algo.SHA256;
/**
@@ -2649,8 +2510,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var Hasher = C_lib.Hasher;
+ var Hasher = C.lib.Hasher;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var X64WordArray = C_x64.WordArray;
@@ -2742,9 +2602,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
];
var W = [];
(function() {
- for (var i = 0; i < 80; i++) {
- W[i] = X64Word_create();
- }
+ for (var i = 0; i < 80; i++) W[i] = X64Word_create();
})();
/**
* SHA-512 hash algorithm.
@@ -2902,8 +2760,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
this._process();
- var hash = this._hash.toX32();
- return hash;
+ return this._hash.toX32();
},
clone: function() {
var clone = Hasher.clone.call(this);
@@ -3008,8 +2865,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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 X64Word = C.x64.Word;
var C_algo = C.algo;
var RHO_OFFSETS = [];
var PI_INDEXES = [];
@@ -3023,11 +2879,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
- }
- }
+ 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 i = 0; i < 24; i++) {
var roundConstantMsw = 0;
@@ -3035,26 +2887,18 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
+ if (bitPosition < 32) roundConstantLsw ^= 1 << bitPosition;
+ else roundConstantMsw ^= 1 << bitPosition - 32;
}
+ if (LFSR & 128) LFSR = LFSR << 1 ^ 113;
+ else LFSR <<= 1;
}
ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
}
})();
var T = [];
(function() {
- for (var i = 0; i < 25; i++) {
- T[i] = X64Word.create();
- }
+ for (var i = 0; i < 25; i++) T[i] = X64Word.create();
})();
/**
* SHA-3 hash algorithm.
@@ -3063,9 +2907,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cfg: Hasher.cfg.extend({ outputLength: 512 }),
_doReset: function() {
var state = this._state = [];
- for (var i = 0; i < 25; i++) {
- state[i] = new X64Word.init();
- }
+ for (var i = 0; i < 25; i++) state[i] = new X64Word.init();
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
},
_doProcessBlock: function(M, offset) {
@@ -3127,16 +2969,14 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
- }
+ 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];
@@ -3172,9 +3012,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
clone: function() {
var clone = Hasher.clone.call(this);
var state = clone._state = this._state.slice(0);
- for (var i = 0; i < 25; i++) {
- state[i] = state[i].clone();
- }
+ for (var i = 0; i < 25; i++) state[i] = state[i].clone();
return clone;
}
});
@@ -3594,26 +3432,15 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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 ar = al = H[0], br = bl = H[1], cr = cl = H[2], dr = dl = H[3], er = el = H[4];
var t;
for (var i = 0; i < 80; i += 1) {
t = al + M[offset + zl[i]] | 0;
- if (i < 16) {
- t += f1(bl, cl, dl) + hl[0];
- } else if (i < 32) {
- t += f2(bl, cl, dl) + hl[1];
- } else if (i < 48) {
- t += f3(bl, cl, dl) + hl[2];
- } else if (i < 64) {
- t += f4(bl, cl, dl) + hl[3];
- } else {
- t += f5(bl, cl, dl) + hl[4];
- }
+ if (i < 16) t += f1(bl, cl, dl) + hl[0];
+ else if (i < 32) t += f2(bl, cl, dl) + hl[1];
+ else if (i < 48) t += f3(bl, cl, dl) + hl[2];
+ else if (i < 64) t += f4(bl, cl, dl) + hl[3];
+ else t += f5(bl, cl, dl) + hl[4];
t = t | 0;
t = rotl(t, sl[i]);
t = t + el | 0;
@@ -3623,17 +3450,11 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cl = bl;
bl = t;
t = ar + M[offset + zr[i]] | 0;
- if (i < 16) {
- t += f5(br, cr, dr) + hr[0];
- } else if (i < 32) {
- t += f4(br, cr, dr) + hr[1];
- } else if (i < 48) {
- t += f3(br, cr, dr) + hr[2];
- } else if (i < 64) {
- t += f2(br, cr, dr) + hr[3];
- } else {
- t += f1(br, cr, dr) + hr[4];
- }
+ if (i < 16) t += f5(br, cr, dr) + hr[0];
+ else if (i < 32) t += f4(br, cr, dr) + hr[1];
+ else if (i < 48) t += f3(br, cr, dr) + hr[2];
+ else if (i < 64) t += f2(br, cr, dr) + hr[3];
+ else t += f1(br, cr, dr) + hr[4];
t = t | 0;
t = rotl(t, sr[i]);
t = t + er | 0;
@@ -3724,10 +3545,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})(Math);
(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 Base = C.lib.Base;
+ var Utf8 = C.enc.Utf8;
var C_algo = C.algo;
/**
* HMAC algorithm.
@@ -3735,14 +3554,10 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var HMAC = C_algo.HMAC = Base.extend({
init: function(hasher, key) {
hasher = this._hasher = new hasher.init();
- if (typeof key == "string") {
- key = Utf8.parse(key);
- }
+ if (typeof key == "string") key = Utf8.parse(key);
var hasherBlockSize = hasher.blockSize;
var hasherBlockSizeBytes = hasherBlockSize * 4;
- if (key.sigBytes > hasherBlockSizeBytes) {
- key = hasher.finalize(key);
- }
+ if (key.sigBytes > hasherBlockSizeBytes) key = hasher.finalize(key);
key.clamp();
var oKey = this._oKey = key.clone();
var iKey = this._iKey = key.clone();
@@ -3768,8 +3583,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var hasher = this._hasher;
var innerHash = hasher.finalize(messageUpdate);
hasher.reset();
- var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
- return hmac;
+ return hasher.finalize(this._oKey.clone().concat(innerHash));
}
});
})();
@@ -3812,9 +3626,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
intermediate = hmac.finalize(intermediate);
hmac.reset();
var intermediateWords = intermediate.words;
- for (var j = 0; j < blockWordsLength; j++) {
- blockWords[j] ^= intermediateWords[j];
- }
+ for (var j = 0; j < blockWordsLength; j++) blockWords[j] ^= intermediateWords[j];
}
derivedKey.concat(block);
blockIndexWords[0]++;
@@ -3873,9 +3685,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var keySize = cfg.keySize;
var iterations = cfg.iterations;
while (derivedKeyWords.length < keySize) {
- if (block) {
- hasher.update(block);
- }
+ if (block) hasher.update(block);
block = hasher.update(password).finalize(salt);
hasher.reset();
for (var i = 1; i < iterations; i++) {
@@ -3921,8 +3731,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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 EvpKDF = C.algo.EvpKDF;
/**
* Abstract base cipher template.
*
@@ -3954,11 +3763,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this._process();
},
finalize: function(dataUpdate) {
- if (dataUpdate) {
- this._append(dataUpdate);
- }
- var finalProcessedData = this._doFinalize();
- return finalProcessedData;
+ if (dataUpdate) this._append(dataUpdate);
+ return this._doFinalize();
},
keySize: 128 / 32,
ivSize: 128 / 32,
@@ -3966,11 +3772,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_DEC_XFORM_MODE: 2,
_createHelper: function() {
function selectCipherStrategy(key) {
- if (typeof key == "string") {
- return PasswordBasedCipher;
- } else {
- return SerializableCipher;
- }
+ if (typeof key == "string") return PasswordBasedCipher;
+ else return SerializableCipher;
}
return function(cipher) {
return {
@@ -3991,8 +3794,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var StreamCipher = C_lib.StreamCipher = Cipher.extend({
_doFinalize: function() {
- var finalProcessedBlocks = this._process(!!"flush");
- return finalProcessedBlocks;
+ return this._process(true);
},
blockSize: 1
});
@@ -4050,12 +3852,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (iv) {
block = iv;
this._iv = undefined;
- } else {
- block = this._prevBlock;
- }
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= block[i];
- }
+ } else block = this._prevBlock;
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= block[i];
}
return CBC;
}();
@@ -4072,9 +3870,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes;
var paddingWords = [];
- for (var i = 0; i < nPaddingBytes; i += 4) {
- paddingWords.push(paddingWord);
- }
+ for (var i = 0; i < nPaddingBytes; i += 4) paddingWords.push(paddingWord);
var padding = WordArray.create(paddingWords, nPaddingBytes);
data.concat(padding);
},
@@ -4099,15 +3895,13 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var cfg = this.cfg;
var iv = cfg.iv;
var mode = cfg.mode;
- if (this._xformMode == this._ENC_XFORM_MODE) {
- modeCreator = mode.createEncryptor;
- } else {
+ 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 {
+ 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;
}
@@ -4120,9 +3914,9 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var padding = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
padding.pad(this._data, this.blockSize);
- finalProcessedBlocks = this._process(!!"flush");
+ finalProcessedBlocks = this._process(true);
} else {
- finalProcessedBlocks = this._process(!!"flush");
+ finalProcessedBlocks = this._process(true);
padding.unpad(finalProcessedBlocks);
}
return finalProcessedBlocks;
@@ -4162,11 +3956,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var wordArray;
var ciphertext = cipherParams.ciphertext;
var salt = cipherParams.salt;
- if (salt) {
- wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
- } else {
- wordArray = ciphertext;
- }
+ if (salt) wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
+ else wordArray = ciphertext;
return wordArray.toString(Base64);
},
parse: function(openSSLStr) {
@@ -4208,15 +3999,11 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
+ return cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
},
_parse: function(ciphertext, format) {
- if (typeof ciphertext == "string") {
- return format.parse(ciphertext, this);
- } else {
- return ciphertext;
- }
+ if (typeof ciphertext == "string") return format.parse(ciphertext, this);
+ else return ciphertext;
}
});
/**
@@ -4227,9 +4014,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* OpenSSL key derivation function.
*/
var OpenSSLKdf = C_kdf.OpenSSL = { execute: function(password, keySize, ivSize, salt) {
- if (!salt) {
- salt = WordArray.random(64 / 8);
- }
+ if (!salt) salt = WordArray.random(64 / 8);
var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
key.sigBytes = keySize * 4;
@@ -4258,8 +4043,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ciphertext = this._parse(ciphertext, cfg.format);
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
cfg.iv = derivedParams.iv;
- var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
- return plaintext;
+ return SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
}
});
}();
@@ -4286,14 +4070,10 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var iv = this._iv;
if (iv) {
keystream = iv.slice(0);
- this._iv = undefined;
- } else {
- keystream = this._prevBlock;
- }
+ this._iv = void 0;
+ } else keystream = this._prevBlock;
cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
}
return CFB;
}();
@@ -4302,23 +4082,20 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
CryptoJS.mode.CTR = function() {
var CTR = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = CTR.Encryptor = CTR.extend({ processBlock: function(words, offset) {
+ CTR.Decryptor = CTR.Encryptor = CTR.extend({ processBlock: function(words, offset) {
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 = undefined;
+ this._iv = void 0;
}
var keystream = counter.slice(0);
cipher.encryptBlock(keystream, 0);
counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
} });
- CTR.Decryptor = Encryptor;
return CTR;
}();
/** @preserve
@@ -4337,49 +4114,35 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
b1 = 0;
if (b2 === 255) {
b2 = 0;
- if (b3 === 255) {
- b3 = 0;
- } else {
- ++b3;
- }
- } else {
- ++b2;
- }
- } else {
- ++b1;
- }
+ 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;
- }
+ } else word += 1 << 24;
return word;
}
function incCounter(counter) {
- if ((counter[0] = incWord(counter[0])) === 0) {
- counter[1] = incWord(counter[1]);
- }
+ if ((counter[0] = incWord(counter[0])) === 0) counter[1] = incWord(counter[1]);
return counter;
}
- var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ processBlock: function(words, offset) {
+ CTRGladman.Decryptor = CTRGladman.Encryptor = CTRGladman.extend({ processBlock: function(words, offset) {
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 = undefined;
+ this._iv = void 0;
}
incCounter(counter);
var keystream = counter.slice(0);
cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
} });
- CTRGladman.Decryptor = Encryptor;
return CTRGladman;
}();
/**
@@ -4387,21 +4150,18 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
CryptoJS.mode.OFB = function() {
var OFB = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = OFB.Encryptor = OFB.extend({ processBlock: function(words, offset) {
+ OFB.Decryptor = OFB.Encryptor = OFB.extend({ processBlock: function(words, offset) {
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 = undefined;
+ this._iv = void 0;
}
cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
} });
- OFB.Decryptor = Encryptor;
return OFB;
}();
/**
@@ -4474,11 +4234,9 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
unpad: function(data) {
var dataWords = data.words;
var i = data.sigBytes - 1;
- for (var i = data.sigBytes - 1; i >= 0; i--) {
- if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) {
- data.sigBytes = i + 1;
- break;
- }
+ for (var i = data.sigBytes - 1; i >= 0; i--) if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) {
+ data.sigBytes = i + 1;
+ break;
}
}
};
@@ -4491,10 +4249,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
(function(undefined) {
var C = CryptoJS;
- var C_lib = C.lib;
- var CipherParams = C_lib.CipherParams;
- var C_enc = C.enc;
- var Hex = C_enc.Hex;
+ var CipherParams = C.lib.CipherParams;
+ var Hex = C.enc.Hex;
var C_format = C.format;
var HexFormatter = C_format.Hex = {
stringify: function(cipherParams) {
@@ -4508,8 +4264,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var BlockCipher = C_lib.BlockCipher;
+ var BlockCipher = C.lib.BlockCipher;
var C_algo = C.algo;
var SBOX = [];
var INV_SBOX = [];
@@ -4523,13 +4278,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var INV_SUB_MIX_3 = [];
(function() {
var d = [];
- for (var i = 0; i < 256; i++) {
- if (i < 128) {
- d[i] = i << 1;
- } else {
- d[i] = i << 1 ^ 283;
- }
- }
+ for (var i = 0; i < 256; i++) if (i < 128) d[i] = i << 1;
+ else d[i] = i << 1 ^ 283;
var x = 0;
var xi = 0;
for (var i = 0; i < 256; i++) {
@@ -4550,9 +4300,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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 {
+ if (!x) x = xi = 1;
+ else {
x = x2 ^ d[d[d[x8 ^ x2]]];
xi ^= d[d[xi]];
}
@@ -4577,43 +4326,29 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var AES = C_algo.AES = BlockCipher.extend({
_doReset: function() {
var t;
- if (this._nRounds && this._keyPriorReset === this._key) {
- return;
- }
+ 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 ksRows = ((this._nRounds = keySize + 6) + 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;
- }
+ 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]];
- }
+ 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(M, offset) {
@@ -5343,8 +5078,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var DES = C_algo.DES = BlockCipher.extend({
_doReset: function() {
- var key = this._key;
- var keyWords = key.words;
+ var keyWords = this._key.words;
var keyBits = [];
for (var i = 0; i < 56; i++) {
var keyBitPos = PC1[i] - 1;
@@ -5359,15 +5093,11 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
}
subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
- for (var i = 1; i < 7; i++) {
- subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
- }
+ for (var i = 1; i < 7; i++) subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
}
var invSubKeys = this._invSubKeys = [];
- for (var i = 0; i < 16; i++) {
- invSubKeys[i] = subKeys[15 - i];
- }
+ for (var i = 0; i < 16; i++) invSubKeys[i] = subKeys[15 - i];
},
encryptBlock: function(M, offset) {
this._doCryptBlock(M, offset, this._subKeys);
@@ -5388,9 +5118,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var lBlock = this._lBlock;
var rBlock = this._rBlock;
var f = 0;
- for (var i = 0; i < 8; i++) {
- f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
- }
+ for (var i = 0; i < 8; i++) f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
this._lBlock = rBlock;
this._rBlock = lBlock ^ f;
}
@@ -5433,11 +5161,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
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 keyWords = this._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);
@@ -5471,8 +5196,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
+ var StreamCipher = C.lib.StreamCipher;
var C_algo = C.algo;
/**
* RC4 stream cipher algorithm.
@@ -5483,9 +5207,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var keyWords = key.words;
var keySigBytes = key.sigBytes;
var S = this._S = [];
- for (var i = 0; i < 256; i++) {
- S[i] = i;
- }
+ for (var i = 0; i < 256; i++) S[i] = i;
for (var i = 0, j = 0; i < 256; i++) {
var keyByteIndex = i % keySigBytes;
var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255;
@@ -5535,9 +5257,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cfg: RC4.cfg.extend({ drop: 192 }),
_doReset: function() {
RC4._doReset.call(this);
- for (var i = this.cfg.drop; i > 0; i--) {
- generateKeystreamWord.call(this);
- }
+ for (var i = this.cfg.drop; i > 0; i--) generateKeystreamWord.call(this);
}
});
/**
@@ -5552,8 +5272,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
+ var StreamCipher = C.lib.StreamCipher;
var C_algo = C.algo;
var S = [];
var C_ = [];
@@ -5565,9 +5284,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_doReset: function() {
var K = this._key.words;
var iv = this.cfg.iv;
- for (var i = 0; i < 4; i++) {
- K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
- }
+ for (var i = 0; i < 4; i++) K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
var X = this._X = [
K[0],
K[3] << 16 | K[2] >>> 16,
@@ -5589,12 +5306,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
K[3] & 4294901760 | K[0] & 65535
];
this._b = 0;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- for (var i = 0; i < 8; i++) {
- C[i] ^= X[i + 4 & 7];
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
+ for (var i = 0; i < 8; i++) C[i] ^= X[i + 4 & 7];
if (iv) {
var IV = iv.words;
var IV_0 = IV[0];
@@ -5611,9 +5324,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
C[5] ^= i1;
C[6] ^= i2;
C[7] ^= i3;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
}
},
_doProcessBlock: function(M, offset) {
@@ -5634,9 +5345,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function nextState() {
var X = this._X;
var C = this._C;
- for (var i = 0; i < 8; i++) {
- C_[i] = C[i];
- }
+ for (var i = 0; i < 8; i++) C_[i] = C[i];
C[0] = C[0] + 1295307597 + this._b | 0;
C[1] = C[1] + 3545052371 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
C[2] = C[2] + 886263092 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
@@ -5650,9 +5359,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var gx = X[i] + C[i];
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[i] = gh ^ gl;
+ G[i] = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb ^ ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
}
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;
@@ -5675,8 +5382,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})();
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
+ var StreamCipher = C.lib.StreamCipher;
var C_algo = C.algo;
var S = [];
var C_ = [];
@@ -5713,12 +5419,8 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
K[3] & 4294901760 | K[0] & 65535
];
this._b = 0;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- for (var i = 0; i < 8; i++) {
- C[i] ^= X[i + 4 & 7];
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
+ for (var i = 0; i < 8; i++) C[i] ^= X[i + 4 & 7];
if (iv) {
var IV = iv.words;
var IV_0 = IV[0];
@@ -5735,9 +5437,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
C[5] ^= i1;
C[6] ^= i2;
C[7] ^= i3;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
}
},
_doProcessBlock: function(M, offset) {
@@ -5758,9 +5458,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function nextState() {
var X = this._X;
var C = this._C;
- for (var i = 0; i < 8; i++) {
- C_[i] = C[i];
- }
+ for (var i = 0; i < 8; i++) C_[i] = C[i];
C[0] = C[0] + 1295307597 + this._b | 0;
C[1] = C[1] + 3545052371 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
C[2] = C[2] + 886263092 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
@@ -5774,9 +5472,7 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var gx = X[i] + C[i];
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[i] = gh ^ gl;
+ G[i] = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb ^ ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
}
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;
@@ -5800,7 +5496,6 @@ var require_crypto_js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS;
});
}));
-
//#endregion
//#region ../utils/random-http-ua.js
var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -5808,11 +5503,9 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
- if (typeof Object.getOwnPropertySymbols === "function") {
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
- }));
- }
+ if (typeof Object.getOwnPropertySymbols === "function") ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+ }));
ownKeys.forEach(function(key) {
_defineProperty(target, key, source[key]);
});
@@ -5820,16 +5513,13 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return target;
}
function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
+ if (key in obj) Object.defineProperty(obj, key, {
+ value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ else obj[key] = value;
return obj;
}
/**
@@ -5847,8 +5537,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
* @return {Boolean} 是否概率落在区间
*/
var rMP = function rMP(rate) {
- var seed = parseInt(Math.random().toString().slice(2, 4));
- return seed < rate;
+ return parseInt(Math.random().toString().slice(2, 4)) < rate;
};
/**
* 根据所给概率返回此次随机是否有值
@@ -5885,8 +5574,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
if (rateResult) return rateResult;
}
if (!listNoRate.length) listNoRate = listWithRate;
- var seed = parseInt(Math.random().toString().slice(-3).split("").reverse().join(""));
- var index = seed % listNoRate.length;
+ var index = parseInt(Math.random().toString().slice(-3).split("").reverse().join("")) % listNoRate.length;
return listNoRate[index].replace(/^[0-9]{1,3}\^/, "");
};
/**
@@ -5895,38 +5583,36 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
* @return {String} 随机出的字母
*/
var rMW = function rMW() {
- var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
+ var num = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
var ret = "";
- for (var n = 0; n < num; n++) {
- ret += rML([
- "A",
- "B",
- "C",
- "D",
- "E",
- "F",
- "G",
- "H",
- "I",
- "J",
- "K",
- "L",
- "M",
- "N",
- "O",
- "P",
- "Q",
- "R",
- "S",
- "T",
- "U",
- "V",
- "W",
- "X",
- "Y",
- "Z"
- ]);
- }
+ for (var n = 0; n < num; n++) ret += rML([
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z"
+ ]);
return ret;
};
/**
@@ -5944,9 +5630,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var base = Math.min(from, to);
var range = Math.abs(from - to) + 1;
var randomRange = range.toString().length + 1;
- var seed = parseInt(Math.random().toString().slice(-randomRange).split("").reverse().join(""));
- var jump = seed % range;
- return base + jump;
+ return base + parseInt(Math.random().toString().slice(-randomRange).split("").reverse().join("")) % range;
};
/**
* 将数组里的元素拼成一个字符串,['', ';']过滤掉
@@ -6186,7 +5870,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return `Linux; Android ${rD.androidVer()}; ${tag} Build/HUAWEI${tag}; wv`;
},
"android-mi": function androidMi() {
- var miVerList = [
+ var miVer = rML([`MI ${rML([
"4LTE",
"5",
"5X",
@@ -6207,8 +5891,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"PAD 4",
"NOTE",
"NOTE LTE"
- ];
- var miVer = rML([`MI ${rML(miVerList)}`, `MIX ${rML([
+ ])}`, `MIX ${rML([
"2",
"2s",
"3"
@@ -6223,7 +5906,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return `Linux; Android ${rD.androidVer()}; ${miVer} ${suf}; wv`;
},
"android-oppo": function androidOppo() {
- var oppoVerList = [
+ var tag = `OPPO ${rML([
"r9 plustm a",
"A57t",
"R9m",
@@ -6266,12 +5949,11 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"r9m",
"R11 Plusk",
"r9 plusm a"
- ];
- var tag = `OPPO ${rML(oppoVerList)} Build/${rMW(3)}${rMR(10, 30)}${rMW(1)}`;
+ ])} Build/${rMW(3)}${rMR(10, 30)}${rMW(1)}`;
return `Linux; Android ${rD.androidVer()}; ${tag}; wv`;
},
"android-vivo": function androidVivo() {
- var vivoVerList = [
+ var tag = `vivo ${rML([
"X21i A",
"X9Plus",
"Y66L",
@@ -6317,8 +5999,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"Xplay5A",
"Z1i",
"NEX S"
- ];
- var tag = `vivo ${rML(vivoVerList)} Build/${rML([
+ ])} Build/${rML([
"OPM1",
"PKQ1",
"OPR1"
@@ -6326,7 +6007,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return `Linux; Android ${rD.androidVer()}; ${tag}; wv`;
},
"android-samsung": function androidSamsung() {
- var samsungVerList = [
+ var tag = `SM-${rML([
"G9550",
"C7000",
"G9500",
@@ -6393,8 +6074,7 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"J250F",
"N9008V",
"G8870"
- ];
- var tag = `SM-${rML(samsungVerList)} Build/${rMW(`${rMR(1, 3)}`)}${rMR(0, 99)}${rMW(1)}`;
+ ])} Build/${rMW(`${rMR(1, 3)}`)}${rMR(0, 99)}${rMW(1)}`;
return `Linux; Android ${rD.androidVer()}; ${tag}; wv`;
}
};
@@ -6448,14 +6128,12 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var genOneUaOfpc = function genOneUaOfpc(opts) {
var foundation = "Mozilla/5.0";
var tag = `${opts.os}-${opts.app}`;
- var osHandler = osHandlerOfpc[`${tag}`] || osHandlerOfpc[`${opts.os}`];
- var osInfo = osHandler();
+ var osInfo = (osHandlerOfpc[`${tag}`] || osHandlerOfpc[`${opts.os}`])();
var engine = `AppleWebKit/${rD.engineVer()} (KHTML\, like Gecko)`;
var version = `Version/${rD.versionVer()}`;
var chrome = `Chrome/${rD.chromeVer()}`;
var safari = `Safari/${rD.safariVer()}`;
- var prefix = rML([`50^${version}`, `${chrome}`]);
- var suffix = cL([`${prefix}`, `${safari}`]);
+ var suffix = cL([`${rML([`50^${version}`, `${chrome}`])}`, `${safari}`]);
var ua = "";
switch (tag) {
case "windows-ie":
@@ -6488,15 +6166,8 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var genOneUaOfmobile = function genOneUaOfmobile(opts) {
var foundation = "Mozilla/5.0";
var osInfo = "";
- if (opts.os === "ios") {
- var _tag = `${opts.os}-${opts.app}`;
- var osHandler = osHandlerOfpc[`${_tag}`] || osHandlerOfpc[`${opts.os}`];
- osInfo = osHandler();
- } else {
- var deviceTag = `${opts.os}-${opts.brand}`;
- var _osHandler = osHandlerOfpc[`${deviceTag}`] || osHandlerOfpc[`${opts.os}`];
- osInfo = _osHandler();
- }
+ if (opts.os === "ios") osInfo = (osHandlerOfpc[`${`${opts.os}-${opts.app}`}`] || osHandlerOfpc[`${opts.os}`])();
+ else osInfo = (osHandlerOfpc[`${`${opts.os}-${opts.brand}`}`] || osHandlerOfpc[`${opts.os}`])();
var engine = `AppleWebKit/${rD.engineVer()} (KHTML\, like Gecko)`;
var prefix = "";
var version = `Version/${rD.versionVer()}`;
@@ -6543,13 +6214,11 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var genUaType = function genUaType() {
var device = rD.device();
var os = rD[`${device}Os`]();
- var app = rD[`${os}App`]();
- var brand = `${device}${os}` === "mobileandroid" ? rD.androidBrand() : "";
return {
device,
os,
- app,
- brand
+ app: rD[`${os}App`](),
+ brand: `${device}${os}` === "mobileandroid" ? rD.androidBrand() : ""
};
};
/**
@@ -6569,9 +6238,9 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"androidBrand",
"androidApp"
];
- var generateUa = function generateUa() {
- var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
- var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var randomUa = { generateUa: function generateUa() {
+ var num = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
+ var opt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
num = parseInt(num);
if (isNaN(num) || num < 1) num = 1;
var config = _objectSpread({}, customDefault, opt);
@@ -6581,24 +6250,16 @@ var require_random_http_ua = /* @__PURE__ */ __commonJSMin(((exports, module) =>
};
});
var ret = [];
- for (var n = 0; n < num; n++) {
- ret.push(genOneUa(genUaType()));
- }
+ for (var n = 0; n < num; n++) ret.push(genOneUa(genUaType()));
return ret[1] ? ret : ret[0];
- };
- var randomUa = { generateUa };
- if (typeof exports === "object") {
- module.exports = randomUa;
- } else if (typeof define === "function") {
- define(function() {
- return randomUa;
- });
- } else {
- globalThis.randomUa = randomUa;
- }
+ } };
+ if (typeof exports === "object") module.exports = randomUa;
+ else if (typeof define === "function") define(function() {
+ return randomUa;
+ });
+ else globalThis.randomUa = randomUa;
})();
}));
-
//#endregion
//#region ../libs_drpy/jinja.js
var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -6669,9 +6330,7 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.isSilent = false;
}
Parser.prototype.push = function(line) {
- if (!this.isSilent) {
- this.compiled.push(line);
- }
+ if (!this.isSilent) this.compiled.push(line);
};
Parser.prototype.parse = function(src) {
this.tokenize(src);
@@ -6683,16 +6342,12 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var match = src.slice(index + open.length).match(TAGS[open]);
match = match ? match[0] : "";
var simplified = match.replace(STRINGS, "@");
- if (!match || ~simplified.indexOf(open)) {
- return index + 1;
- }
+ if (!match || ~simplified.indexOf(open)) return index + 1;
var inner = match.slice(0, 0 - open.length);
if (inner.charAt(0) === "-") var wsCollapseLeft = true;
if (inner.slice(-1) === "-") var wsCollapseRight = true;
inner = inner.replace(/^-|-$/g, "").trim();
- if (parser.rawMode && open + inner !== "{%endraw") {
- return index + 1;
- }
+ if (parser.rawMode && open + inner !== "{%endraw") return index + 1;
var text = src.slice(lastEnd, index);
lastEnd = index + open.length + match.length;
if (trimLeading) text = trimLeft(text);
@@ -6714,9 +6369,8 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
Parser.prototype.tokenHandler = function(open, inner) {
var type = delimeters[open];
- if (type === "directive") {
- this.compileTag(inner);
- } else if (type === "output") {
+ if (type === "directive") this.compileTag(inner);
+ else if (type === "output") {
var extracted = this.extractEnt(inner, STRINGS, "@");
extracted.src = extracted.src.replace(/\|\|/g, "~").split("|");
extracted.src = extracted.src.map(function(part) {
@@ -6726,17 +6380,13 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (parts.length > 1) {
var filters = parts.slice(1).map(this.parseFilter.bind(this));
this.push("filter(" + this.parseExpr(parts[0]) + "," + filters.join(",") + ");");
- } else {
- this.push("filter(" + this.parseExpr(parts[0]) + ");");
- }
+ } else this.push("filter(" + this.parseExpr(parts[0]) + ");");
}
};
Parser.prototype.compileTag = function(str) {
var directive = str.split(" ")[0];
var handler = tagHandlers[directive];
- if (!handler) {
- throw new Error("Invalid tag: " + str);
- }
+ if (!handler) throw new Error("Invalid tag: " + str);
handler.call(this, str.slice(directive.length).trim());
};
Parser.prototype.parseFilter = function(src) {
@@ -6798,12 +6448,9 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
simplified = simplified.replace(/[@#~v]/g, "i");
simplified = simplified.replace(OPERATORS, "%");
simplified = simplified.replace(/!+[i]/g, "i");
- var terms = opts.terms ? simplified.split(",") : [simplified];
- terms.forEach(function(term) {
+ (opts.terms ? simplified.split(",") : [simplified]).forEach(function(term) {
while (term !== (term = term.replace(/\(i(%i)*\)/g, "i")));
- if (!term.match(/^i(%i)*/)) {
- throw new Error("Invalid expression: " + src + " " + term);
- }
+ if (!term.match(/^i(%i)*/)) throw new Error("Invalid expression: " + src + " " + term);
});
parsed3.src = parsed3.src.replace(VARIABLES, this.parseVar.bind(this));
parsed2.src = this.injectEnt(parsed3, "i");
@@ -6813,18 +6460,12 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Parser.prototype.parseVar = function(src) {
var args = Array.prototype.slice.call(arguments);
var str = args.pop(), index = args.pop();
- if (src === "i" && str.charAt(index + 1) === ":") {
- return "\"i\"";
- }
+ if (src === "i" && str.charAt(index + 1) === ":") return "\"i\"";
var parts = ["\"i\""];
src.replace(ACCESSOR, function(part) {
- if (part === ".i") {
- parts.push("\"i\"");
- } else if (part === "[i]") {
- parts.push("get(\"i\")");
- } else {
- parts.push(part.slice(1, -1));
- }
+ if (part === ".i") parts.push("\"i\"");
+ else if (part === "[i]") parts.push("get(\"i\")");
+ else parts.push(part.slice(1, -1));
});
return "get(" + parts.join(",") + ")";
};
@@ -6849,11 +6490,8 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.nest.unshift("if");
},
"else": function() {
- if (this.nest[0] === "for") {
- this.push("}, function() {");
- } else {
- this.push("} else {");
- }
+ if (this.nest[0] === "for") this.push("}, function() {");
+ else this.push("} else {");
},
"elseif": function(expr) {
this.push("} else if (" + this.parseExpr(expr) + ") {");
@@ -6900,9 +6538,8 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
"endblock": function() {
this.nest.shift();
- if (this.isParent) {
- this.push("});");
- } else if (this.hasParent) {
+ if (this.isParent) this.push("});");
+ else if (this.hasParent) {
this.push("}");
this.isSilent = true;
}
@@ -6986,13 +6623,9 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (filter) {
arr[0] = val;
val = filter.apply(data, arr);
- } else {
- throw new Error("Invalid filter: " + name);
- }
- }
- if (opts.autoEscape && name !== opts.autoEscape && name !== "safe") {
- val = filters[opts.autoEscape].call(data, val);
+ } else throw new Error("Invalid filter: " + name);
}
+ if (opts.autoEscape && name !== opts.autoEscape && name !== "safe") val = filters[opts.autoEscape].call(data, val);
output.push(val);
};
var each = function(obj, loopvar, fn1, fn2) {
@@ -7032,9 +6665,7 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return val;
},
toJson: function(val) {
- if (typeof val === "object") {
- return JSON.stringify(val);
- }
+ if (typeof val === "object") return JSON.stringify(val);
return toString(val);
}
}, opts.filters || {});
@@ -7063,25 +6694,20 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
code.push("return $.render();");
code.push("}");
code = code.join("\n");
- if (opts.runtime === false) {
- var fn = new Function("data", "options", "return (" + code + ")(runtime(data, options))");
- } else {
+ if (opts.runtime === false) var fn = new Function("data", "options", "return (" + code + ")(runtime(data, options))");
+ else {
runtime = runtime || (runtime = getRuntime.toString());
fn = new Function("data", "options", "return (" + code + ")((" + runtime + ")(data, options))");
}
return { render: fn };
};
jinja.render = function(markup, data, opts) {
- var tmpl = jinja.compile(markup);
- return tmpl.render(data, opts);
+ return jinja.compile(markup).render(data, opts);
};
jinja.templateFiles = [];
jinja.readTemplateFile = function(name) {
- var templateFiles = this.templateFiles || [];
- var templateFile = templateFiles[name];
- if (templateFile == null) {
- throw new Error("Template file not found: " + name);
- }
+ var templateFile = (this.templateFiles || [])[name];
+ if (templateFile == null) throw new Error("Template file not found: " + name);
return templateFile;
};
/*!
@@ -7098,25 +6724,18 @@ var require_jinja = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var match;
while (match = reg.exec(str)) {
var result = fn(match[0], match.index, str);
- if (typeof result == "number") {
- reg.lastIndex = result;
- }
+ if (typeof result == "number") reg.lastIndex = result;
}
}
}));
}));
-
//#endregion
//#region ../libs_drpy/jsencrypt.js
var require_jsencrypt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
(function webpackUniversalModuleDefinition(root, factory) {
- if (typeof exports === "object" && typeof module === "object") {
- module.exports = exports = factory();
- } else if (typeof define === "function" && define.amd) {
- define([], factory);
- } else {
- globalThis.JSEncrypt = factory();
- }
+ if (typeof exports === "object" && typeof module === "object") module.exports = exports = factory();
+ else if (typeof define === "function" && define.amd) define([], factory);
+ else globalThis.JSEncrypt = factory();
})(exports, () => {
return (() => {
var __webpack_modules__ = {
@@ -7187,43 +6806,28 @@ var require_jsencrypt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var __webpack_module_cache__ = {};
function __webpack_require__(moduleId) {
var cachedModule = __webpack_module_cache__[moduleId];
- if (cachedModule !== undefined) {
- return cachedModule.exports;
- }
+ if (cachedModule !== void 0) return cachedModule.exports;
var module$14 = __webpack_module_cache__[moduleId] = { exports: {} };
__webpack_modules__[moduleId](module$14, module$14.exports, __webpack_require__);
return module$14.exports;
}
- (() => {
- __webpack_require__.d = (exports$9, definition) => {
- for (var key in definition) {
- if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports$9, key)) {
- Object.defineProperty(exports$9, key, {
- enumerable: true,
- get: definition[key]
- });
- }
- }
- };
- })();
- (() => {
- __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
- })();
- (() => {
- __webpack_require__.r = (exports$10) => {
- if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
- Object.defineProperty(exports$10, Symbol.toStringTag, { value: "Module" });
- }
- Object.defineProperty(exports$10, "__esModule", { value: true });
- };
- })();
+ __webpack_require__.d = (exports$9, definition) => {
+ for (var key in definition) if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports$9, key)) Object.defineProperty(exports$9, key, {
+ enumerable: true,
+ get: definition[key]
+ });
+ };
+ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
+ __webpack_require__.r = (exports$10) => {
+ if (typeof Symbol !== "undefined" && Symbol.toStringTag) Object.defineProperty(exports$10, Symbol.toStringTag, { value: "Module" });
+ Object.defineProperty(exports$10, "__esModule", { value: true });
+ };
var __webpack_exports__ = __webpack_require__("./lib/index.js");
__webpack_exports__ = __webpack_exports__["default"];
return __webpack_exports__;
})();
});
}));
-
//#endregion
//#region ../libs_drpy/_dist/json5.js
var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -7236,24 +6840,18 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
var _global = createCommonjsModule(function(module$9) {
var global = module$9.exports = typeof window != "undefined" && window.Math == Math ? window : typeof self != "undefined" && self.Math == Math ? self : Function("return this")();
- if (typeof __g == "number") {
- __g = global;
- }
+ if (typeof __g == "number") __g = global;
});
var _core = createCommonjsModule(function(module$10) {
var core = module$10.exports = { version: "2.6.5" };
- if (typeof __e == "number") {
- __e = core;
- }
+ if (typeof __e == "number") __e = core;
});
var _core_1 = _core.version;
var _isObject = function(it) {
return typeof it === "object" ? it !== null : typeof it === "function";
};
var _anObject = function(it) {
- if (!_isObject(it)) {
- throw TypeError(it + " is not an object!");
- }
+ if (!_isObject(it)) throw TypeError(it + " is not an object!");
return it;
};
var _fails = function(exec) {
@@ -7279,40 +6877,25 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} }).a != 7;
});
var _toPrimitive = function(it, S) {
- if (!_isObject(it)) {
- return it;
- }
+ if (!_isObject(it)) return it;
var fn, val;
- if (S && typeof (fn = it.toString) == "function" && !_isObject(val = fn.call(it))) {
- return val;
- }
- if (typeof (fn = it.valueOf) == "function" && !_isObject(val = fn.call(it))) {
- return val;
- }
- if (!S && typeof (fn = it.toString) == "function" && !_isObject(val = fn.call(it))) {
- return val;
- }
+ if (S && typeof (fn = it.toString) == "function" && !_isObject(val = fn.call(it))) return val;
+ if (typeof (fn = it.valueOf) == "function" && !_isObject(val = fn.call(it))) return val;
+ if (!S && typeof (fn = it.toString) == "function" && !_isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
var dP = Object.defineProperty;
- var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
+ var _objectDp = { f: _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
_anObject(O);
P = _toPrimitive(P, true);
_anObject(Attributes);
- if (_ie8DomDefine) {
- try {
- return dP(O, P, Attributes);
- } catch (e) {}
- }
- if ("get" in Attributes || "set" in Attributes) {
- throw TypeError("Accessors not supported!");
- }
- if ("value" in Attributes) {
- O[P] = Attributes.value;
- }
+ if (_ie8DomDefine) try {
+ return dP(O, P, Attributes);
+ } catch (e) {}
+ if ("get" in Attributes || "set" in Attributes) throw TypeError("Accessors not supported!");
+ if ("value" in Attributes) O[P] = Attributes.value;
return O;
- };
- var _objectDp = { f };
+ } };
var _propertyDesc = function(bitmap, value) {
return {
enumerable: !(bitmap & 1),
@@ -7334,21 +6917,20 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var id = 0;
var px = Math.random();
var _uid = function(key) {
- return "Symbol(".concat(key === undefined ? "" : key, ")_", (++id + px).toString(36));
+ return "Symbol(".concat(key === void 0 ? "" : key, ")_", (++id + px).toString(36));
};
var _library = false;
- var _shared = createCommonjsModule(function(module$11) {
+ var _functionToString = createCommonjsModule(function(module$11) {
var SHARED = "__core-js_shared__";
var store = _global[SHARED] || (_global[SHARED] = {});
(module$11.exports = function(key, value) {
- return store[key] || (store[key] = value !== undefined ? value : {});
+ return store[key] || (store[key] = value !== void 0 ? value : {});
})("versions", []).push({
version: _core.version,
mode: _library ? "pure" : "global",
copyright: "© 2019 Denis Pushkarev (zloirock.ru)"
});
- });
- var _functionToString = _shared("native-function-to-string", Function.toString);
+ })("native-function-to-string", Function.toString);
var _redefine = createCommonjsModule(function(module$12) {
var SRC = _uid("src");
var TO_STRING = "toString";
@@ -7358,40 +6940,26 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
(module$12.exports = function(O, key, val, safe) {
var isFunction = typeof val == "function";
- if (isFunction) {
- _has(val, "name") || _hide(val, "name", key);
- }
- if (O[key] === val) {
- return;
- }
- if (isFunction) {
- _has(val, SRC) || _hide(val, SRC, O[key] ? "" + O[key] : TPL.join(String(key)));
- }
- if (O === _global) {
- O[key] = val;
- } else if (!safe) {
+ if (isFunction) _has(val, "name") || _hide(val, "name", key);
+ if (O[key] === val) return;
+ if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? "" + O[key] : TPL.join(String(key)));
+ if (O === _global) O[key] = val;
+ else if (!safe) {
delete O[key];
_hide(O, key, val);
- } else if (O[key]) {
- O[key] = val;
- } else {
- _hide(O, key, val);
- }
+ } else if (O[key]) O[key] = val;
+ else _hide(O, key, val);
})(Function.prototype, TO_STRING, function toString() {
return typeof this == "function" && this[SRC] || _functionToString.call(this);
});
});
var _aFunction = function(it) {
- if (typeof it != "function") {
- throw TypeError(it + " is not a function!");
- }
+ if (typeof it != "function") throw TypeError(it + " is not a function!");
return it;
};
var _ctx = function(fn, that, length) {
_aFunction(fn);
- if (that === undefined) {
- return fn;
- }
+ if (that === void 0) return fn;
switch (length) {
case 1: return function(a) {
return fn.call(that, a);
@@ -7418,22 +6986,14 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var exports$8 = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
var expProto = exports$8[PROTOTYPE] || (exports$8[PROTOTYPE] = {});
var key, own, out, exp;
- if (IS_GLOBAL) {
- source = name;
- }
+ if (IS_GLOBAL) source = name;
for (key in source) {
- own = !IS_FORCED && target && target[key] !== undefined;
+ own = !IS_FORCED && target && target[key] !== void 0;
out = (own ? target : source)[key];
exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == "function" ? _ctx(Function.call, out) : out;
- if (target) {
- _redefine(target, key, out, type & $export.U);
- }
- if (exports$8[key] != out) {
- _hide(exports$8, key, exp);
- }
- if (IS_PROTO && expProto[key] != out) {
- expProto[key] = out;
- }
+ if (target) _redefine(target, key, out, type & $export.U);
+ if (exports$8[key] != out) _hide(exports$8, key, exp);
+ if (IS_PROTO && expProto[key] != out) expProto[key] = out;
}
};
_global.core = _core;
@@ -7452,9 +7012,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
var _defined = function(it) {
- if (it == undefined) {
- throw TypeError("Can't call method on " + it);
- }
+ if (it == void 0) throw TypeError("Can't call method on " + it);
return it;
};
var _stringAt = function(TO_STRING) {
@@ -7463,9 +7021,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var i = _toInteger(pos);
var l = s.length;
var a, b;
- if (i < 0 || i >= l) {
- return TO_STRING ? "" : undefined;
- }
+ if (i < 0 || i >= l) return TO_STRING ? "" : void 0;
a = s.charCodeAt(i);
return a < 55296 || a > 56319 || i + 1 === l || (b = s.charCodeAt(i + 1)) < 56320 || b > 57343 ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 55296 << 10) + (b - 56320) + 65536;
};
@@ -7491,21 +7047,16 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var code;
while (aLen > i) {
code = +arguments$1[i++];
- if (_toAbsoluteIndex(code, 1114111) !== code) {
- throw RangeError(code + " is not a valid code point");
- }
+ if (_toAbsoluteIndex(code, 1114111) !== code) throw RangeError(code + " is not a valid code point");
res.push(code < 65536 ? fromCharCode(code) : fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320));
}
return res.join("");
} });
var fromCodePoint = _core.String.fromCodePoint;
- var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
- var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
- var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
var unicode = {
- Space_Separator,
- ID_Start,
- ID_Continue
+ Space_Separator: /[\u1680\u2000-\u200A\u202F\u205F\u3000]/,
+ ID_Start: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,
+ ID_Continue: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
};
var util = {
isSpaceSeparator: function isSpaceSeparator(c) {
@@ -7540,51 +7091,38 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pos = 0;
line = 1;
column = 0;
- token = undefined;
- key = undefined;
- root = undefined;
+ token = void 0;
+ key = void 0;
+ root = void 0;
do {
token = lex();
parseStates[parseState]();
} while (token.type !== "eof");
- if (typeof reviver === "function") {
- return internalize({ "": root }, "", reviver);
- }
+ if (typeof reviver === "function") return internalize({ "": root }, "", reviver);
return root;
};
function internalize(holder, name, reviver) {
var value = holder[name];
- if (value != null && typeof value === "object") {
- if (Array.isArray(value)) {
- for (var i = 0; i < value.length; i++) {
- var key = String(i);
- var replacement = internalize(value, key, reviver);
- if (replacement === undefined) {
- delete value[key];
- } else {
- Object.defineProperty(value, key, {
- value: replacement,
- writable: true,
- enumerable: true,
- configurable: true
- });
- }
- }
- } else {
- for (var key$1 in value) {
- var replacement$1 = internalize(value, key$1, reviver);
- if (replacement$1 === undefined) {
- delete value[key$1];
- } else {
- Object.defineProperty(value, key$1, {
- value: replacement$1,
- writable: true,
- enumerable: true,
- configurable: true
- });
- }
- }
- }
+ if (value != null && typeof value === "object") if (Array.isArray(value)) for (var i = 0; i < value.length; i++) {
+ var key = String(i);
+ var replacement = internalize(value, key, reviver);
+ if (replacement === void 0) delete value[key];
+ else Object.defineProperty(value, key, {
+ value: replacement,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ else for (var key$1 in value) {
+ var replacement$1 = internalize(value, key$1, reviver);
+ if (replacement$1 === void 0) delete value[key$1];
+ else Object.defineProperty(value, key$1, {
+ value: replacement$1,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
}
return reviver.call(holder, name, value);
}
@@ -7601,29 +7139,20 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (;;) {
c = peek();
var token = lexStates[lexState]();
- if (token) {
- return token;
- }
+ if (token) return token;
}
}
function peek() {
- if (source[pos]) {
- return String.fromCodePoint(source.codePointAt(pos));
- }
+ if (source[pos]) return String.fromCodePoint(source.codePointAt(pos));
}
function read() {
var c = peek();
if (c === "\n") {
line++;
column = 0;
- } else if (c) {
- column += c.length;
- } else {
- column++;
- }
- if (c) {
- pos += c.length;
- }
+ } else if (c) column += c.length;
+ else column++;
+ if (c) pos += c.length;
return c;
}
var lexStates = {
@@ -7645,7 +7174,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
read();
lexState = "comment";
return;
- case undefined:
+ case void 0:
read();
return newToken("eof");
}
@@ -7674,7 +7203,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
read();
lexState = "multiLineCommentAsterisk";
return;
- case undefined: throw invalidChar(read());
+ case void 0: throw invalidChar(read());
}
read();
},
@@ -7687,7 +7216,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
read();
lexState = "default";
return;
- case undefined: throw invalidChar(read());
+ case void 0: throw invalidChar(read());
}
read();
lexState = "multiLineComment";
@@ -7701,7 +7230,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
read();
lexState = "default";
return;
- case undefined:
+ case void 0:
read();
return newToken("eof");
}
@@ -7725,9 +7254,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return newToken("boolean", false);
case "-":
case "+":
- if (read() === "-") {
- sign = -1;
- }
+ if (read() === "-") sign = -1;
lexState = "sign";
return;
case ".":
@@ -7768,18 +7295,14 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
throw invalidChar(read());
},
identifierNameStartEscape: function identifierNameStartEscape() {
- if (c !== "u") {
- throw invalidChar(read());
- }
+ if (c !== "u") throw invalidChar(read());
read();
var u = unicodeEscape();
switch (u) {
case "$":
case "_": break;
default:
- if (!util.isIdStartChar(u)) {
- throw invalidIdentifier();
- }
+ if (!util.isIdStartChar(u)) throw invalidIdentifier();
break;
}
buffer += u;
@@ -7805,9 +7328,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return newToken("identifier", buffer);
},
identifierNameEscape: function identifierNameEscape() {
- if (c !== "u") {
- throw invalidChar(read());
- }
+ if (c !== "u") throw invalidChar(read());
read();
var u = unicodeEscape();
switch (u) {
@@ -7816,9 +7337,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case "":
case "": break;
default:
- if (!util.isIdContinueChar(u)) {
- throw invalidIdentifier();
- }
+ if (!util.isIdContinueChar(u)) throw invalidIdentifier();
break;
}
buffer += u;
@@ -8002,7 +7521,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case "\u2029":
separatorChar(c);
break;
- case undefined: throw invalidChar(read());
+ case void 0: throw invalidChar(read());
}
buffer += read();
},
@@ -8039,9 +7558,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
throw invalidChar(read());
},
afterPropertyName: function afterPropertyName() {
- if (c === ":") {
- return newToken("punctuator", read());
- }
+ if (c === ":") return newToken("punctuator", read());
throw invalidChar(read());
},
beforePropertyValue: function beforePropertyValue() {
@@ -8055,9 +7572,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
throw invalidChar(read());
},
beforeArrayValue: function beforeArrayValue() {
- if (c === "]") {
- return newToken("punctuator", read());
- }
+ if (c === "]") return newToken("punctuator", read());
lexState = "value";
},
afterArrayValue: function afterArrayValue() {
@@ -8082,16 +7597,12 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function literal(s) {
for (var i = 0, list = s; i < list.length; i += 1) {
var c = list[i];
- var p = peek();
- if (p !== c) {
- throw invalidChar(read());
- }
+ if (peek() !== c) throw invalidChar(read());
read();
}
}
function escape() {
- var c = peek();
- switch (c) {
+ switch (peek()) {
case "b":
read();
return "\b";
@@ -8112,9 +7623,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return "\v";
case "0":
read();
- if (util.isDigit(peek())) {
- throw invalidChar(read());
- }
+ if (util.isDigit(peek())) throw invalidChar(read());
return "\0";
case "x":
read();
@@ -8129,9 +7638,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return "";
case "\r":
read();
- if (peek() === "\n") {
- read();
- }
+ if (peek() === "\n") read();
return "";
case "1":
case "2":
@@ -8142,21 +7649,17 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case "7":
case "8":
case "9": throw invalidChar(read());
- case undefined: throw invalidChar(read());
+ case void 0: throw invalidChar(read());
}
return read();
}
function hexEscape() {
var buffer = "";
var c = peek();
- if (!util.isHexDigit(c)) {
- throw invalidChar(read());
- }
+ if (!util.isHexDigit(c)) throw invalidChar(read());
buffer += read();
c = peek();
- if (!util.isHexDigit(c)) {
- throw invalidChar(read());
- }
+ if (!util.isHexDigit(c)) throw invalidChar(read());
buffer += read();
return String.fromCodePoint(parseInt(buffer, 16));
}
@@ -8165,18 +7668,14 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var count = 4;
while (count-- > 0) {
var c = peek();
- if (!util.isHexDigit(c)) {
- throw invalidChar(read());
- }
+ if (!util.isHexDigit(c)) throw invalidChar(read());
buffer += read();
}
return String.fromCodePoint(parseInt(buffer, 16));
}
var parseStates = {
start: function start() {
- if (token.type === "eof") {
- throw invalidEOF();
- }
+ if (token.type === "eof") throw invalidEOF();
push();
},
beforePropertyName: function beforePropertyName() {
@@ -8193,21 +7692,15 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
},
afterPropertyName: function afterPropertyName() {
- if (token.type === "eof") {
- throw invalidEOF();
- }
+ if (token.type === "eof") throw invalidEOF();
parseState = "beforePropertyValue";
},
beforePropertyValue: function beforePropertyValue() {
- if (token.type === "eof") {
- throw invalidEOF();
- }
+ if (token.type === "eof") throw invalidEOF();
push();
},
beforeArrayValue: function beforeArrayValue() {
- if (token.type === "eof") {
- throw invalidEOF();
- }
+ if (token.type === "eof") throw invalidEOF();
if (token.type === "punctuator" && token.value === "]") {
pop();
return;
@@ -8215,9 +7708,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
push();
},
afterPropertyValue: function afterPropertyValue() {
- if (token.type === "eof") {
- throw invalidEOF();
- }
+ if (token.type === "eof") throw invalidEOF();
switch (token.value) {
case ",":
parseState = "beforePropertyName";
@@ -8226,9 +7717,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
},
afterArrayValue: function afterArrayValue() {
- if (token.type === "eof") {
- throw invalidEOF();
- }
+ if (token.type === "eof") throw invalidEOF();
switch (token.value) {
case ",":
parseState = "beforeArrayValue";
@@ -8258,54 +7747,37 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
value = token.value;
break;
}
- if (root === undefined) {
- root = value;
- } else {
+ if (root === void 0) root = value;
+ else {
var parent = stack[stack.length - 1];
- if (Array.isArray(parent)) {
- parent.push(value);
- } else {
- Object.defineProperty(parent, key, {
- value,
- writable: true,
- enumerable: true,
- configurable: true
- });
- }
+ if (Array.isArray(parent)) parent.push(value);
+ else Object.defineProperty(parent, key, {
+ value,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
}
if (value !== null && typeof value === "object") {
stack.push(value);
- if (Array.isArray(value)) {
- parseState = "beforeArrayValue";
- } else {
- parseState = "beforePropertyName";
- }
+ if (Array.isArray(value)) parseState = "beforeArrayValue";
+ else parseState = "beforePropertyName";
} else {
var current = stack[stack.length - 1];
- if (current == null) {
- parseState = "end";
- } else if (Array.isArray(current)) {
- parseState = "afterArrayValue";
- } else {
- parseState = "afterPropertyValue";
- }
+ if (current == null) parseState = "end";
+ else if (Array.isArray(current)) parseState = "afterArrayValue";
+ else parseState = "afterPropertyValue";
}
}
function pop() {
stack.pop();
var current = stack[stack.length - 1];
- if (current == null) {
- parseState = "end";
- } else if (Array.isArray(current)) {
- parseState = "afterArrayValue";
- } else {
- parseState = "afterPropertyValue";
- }
+ if (current == null) parseState = "end";
+ else if (Array.isArray(current)) parseState = "afterArrayValue";
+ else parseState = "afterPropertyValue";
}
function invalidChar(c) {
- if (c === undefined) {
- return syntaxError("JSON5: invalid end of input at " + line + ":" + column);
- }
+ if (c === void 0) return syntaxError("JSON5: invalid end of input at " + line + ":" + column);
return syntaxError("JSON5: invalid character '" + formatChar(c) + "' at " + line + ":" + column);
}
function invalidEOF() {
@@ -8333,9 +7805,7 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"\u2028": "\\u2028",
"\u2029": "\\u2029"
};
- if (replacements[c]) {
- return replacements[c];
- }
+ if (replacements[c]) return replacements[c];
if (c < " ") {
var hexString = c.charCodeAt(0).toString(16);
return "\\x" + ("00" + hexString).substring(hexString.length);
@@ -8348,245 +7818,183 @@ var require_json5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
err.columnNumber = column;
return err;
}
- var stringify = function stringify(value, replacer, space) {
- var stack = [];
- var indent = "";
- var propertyList;
- var replacerFunc;
- var gap = "";
- var quote;
- if (replacer != null && typeof replacer === "object" && !Array.isArray(replacer)) {
- space = replacer.space;
- quote = replacer.quote;
- replacer = replacer.replacer;
- }
- if (typeof replacer === "function") {
- replacerFunc = replacer;
- } else if (Array.isArray(replacer)) {
- propertyList = [];
- for (var i = 0, list = replacer; i < list.length; i += 1) {
- var v = list[i];
- var item = void 0;
- if (typeof v === "string") {
- item = v;
- } else if (typeof v === "number" || v instanceof String || v instanceof Number) {
- item = String(v);
- }
- if (item !== undefined && propertyList.indexOf(item) < 0) {
- propertyList.push(item);
- }
- }
- }
- if (space instanceof Number) {
- space = Number(space);
- } else if (space instanceof String) {
- space = String(space);
- }
- if (typeof space === "number") {
- if (space > 0) {
- space = Math.min(10, Math.floor(space));
- gap = " ".substr(0, space);
- }
- } else if (typeof space === "string") {
- gap = space.substr(0, 10);
- }
- return serializeProperty("", { "": value });
- function serializeProperty(key, holder) {
- var value = holder[key];
- if (value != null) {
- if (typeof value.toJSON5 === "function") {
- value = value.toJSON5(key);
- } else if (typeof value.toJSON === "function") {
- value = value.toJSON(key);
- }
- }
- if (replacerFunc) {
- value = replacerFunc.call(holder, key, value);
- }
- if (value instanceof Number) {
- value = Number(value);
- } else if (value instanceof String) {
- value = String(value);
- } else if (value instanceof Boolean) {
- value = value.valueOf();
- }
- switch (value) {
- case null: return "null";
- case true: return "true";
- case false: return "false";
- }
- if (typeof value === "string") {
- return quoteString(value, false);
- }
- if (typeof value === "number") {
- return String(value);
- }
- if (typeof value === "object") {
- return Array.isArray(value) ? serializeArray(value) : serializeObject(value);
- }
- return undefined;
- }
- function quoteString(value) {
- var quotes = {
- "'": .1,
- "\"": .2
- };
- var replacements = {
- "'": "\\'",
- "\"": "\\\"",
- "\\": "\\\\",
- "\b": "\\b",
- "\f": "\\f",
- "\n": "\\n",
- "\r": "\\r",
- " ": "\\t",
- "\v": "\\v",
- "\0": "\\0",
- "\u2028": "\\u2028",
- "\u2029": "\\u2029"
- };
- var product = "";
- for (var i = 0; i < value.length; i++) {
- var c = value[i];
- switch (c) {
- case "'":
- case "\"":
- quotes[c]++;
- product += c;
+ return {
+ parse,
+ stringify: function stringify(value, replacer, space) {
+ var stack = [];
+ var indent = "";
+ var propertyList;
+ var replacerFunc;
+ var gap = "";
+ var quote;
+ if (replacer != null && typeof replacer === "object" && !Array.isArray(replacer)) {
+ space = replacer.space;
+ quote = replacer.quote;
+ replacer = replacer.replacer;
+ }
+ if (typeof replacer === "function") replacerFunc = replacer;
+ else if (Array.isArray(replacer)) {
+ propertyList = [];
+ for (var i = 0, list = replacer; i < list.length; i += 1) {
+ var v = list[i];
+ var item = void 0;
+ if (typeof v === "string") item = v;
+ else if (typeof v === "number" || v instanceof String || v instanceof Number) item = String(v);
+ if (item !== void 0 && propertyList.indexOf(item) < 0) propertyList.push(item);
+ }
+ }
+ if (space instanceof Number) space = Number(space);
+ else if (space instanceof String) space = String(space);
+ if (typeof space === "number") {
+ if (space > 0) {
+ space = Math.min(10, Math.floor(space));
+ gap = " ".substr(0, space);
+ }
+ } else if (typeof space === "string") gap = space.substr(0, 10);
+ return serializeProperty("", { "": value });
+ function serializeProperty(key, holder) {
+ var value = holder[key];
+ if (value != null) {
+ if (typeof value.toJSON5 === "function") value = value.toJSON5(key);
+ else if (typeof value.toJSON === "function") value = value.toJSON(key);
+ }
+ if (replacerFunc) value = replacerFunc.call(holder, key, value);
+ if (value instanceof Number) value = Number(value);
+ else if (value instanceof String) value = String(value);
+ else if (value instanceof Boolean) value = value.valueOf();
+ switch (value) {
+ case null: return "null";
+ case true: return "true";
+ case false: return "false";
+ }
+ if (typeof value === "string") return quoteString(value, false);
+ if (typeof value === "number") return String(value);
+ if (typeof value === "object") return Array.isArray(value) ? serializeArray(value) : serializeObject(value);
+ }
+ function quoteString(value) {
+ var quotes = {
+ "'": .1,
+ "\"": .2
+ };
+ var replacements = {
+ "'": "\\'",
+ "\"": "\\\"",
+ "\\": "\\\\",
+ "\b": "\\b",
+ "\f": "\\f",
+ "\n": "\\n",
+ "\r": "\\r",
+ " ": "\\t",
+ "\v": "\\v",
+ "\0": "\\0",
+ "\u2028": "\\u2028",
+ "\u2029": "\\u2029"
+ };
+ var product = "";
+ for (var i = 0; i < value.length; i++) {
+ var c = value[i];
+ switch (c) {
+ case "'":
+ case "\"":
+ quotes[c]++;
+ product += c;
+ continue;
+ case "\0": if (util.isDigit(value[i + 1])) {
+ product += "\\x00";
+ continue;
+ }
+ }
+ if (replacements[c]) {
+ product += replacements[c];
continue;
- case "\0": if (util.isDigit(value[i + 1])) {
- product += "\\x00";
+ }
+ if (c < " ") {
+ var hexString = c.charCodeAt(0).toString(16);
+ product += "\\x" + ("00" + hexString).substring(hexString.length);
continue;
}
+ product += c;
}
- if (replacements[c]) {
- product += replacements[c];
- continue;
- }
- if (c < " ") {
- var hexString = c.charCodeAt(0).toString(16);
- product += "\\x" + ("00" + hexString).substring(hexString.length);
- continue;
- }
- product += c;
- }
- var quoteChar = quote || Object.keys(quotes).reduce(function(a, b) {
- return quotes[a] < quotes[b] ? a : b;
- });
- product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]);
- return quoteChar + product + quoteChar;
- }
- function serializeObject(value) {
- if (stack.indexOf(value) >= 0) {
- throw TypeError("Converting circular structure to JSON5");
+ var quoteChar = quote || Object.keys(quotes).reduce(function(a, b) {
+ return quotes[a] < quotes[b] ? a : b;
+ });
+ product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]);
+ return quoteChar + product + quoteChar;
}
- stack.push(value);
- var stepback = indent;
- indent = indent + gap;
- var keys = propertyList || Object.keys(value);
- var partial = [];
- for (var i = 0, list = keys; i < list.length; i += 1) {
- var key = list[i];
- var propertyString = serializeProperty(key, value);
- if (propertyString !== undefined) {
- var member = serializeKey(key) + ":";
- if (gap !== "") {
- member += " ";
+ function serializeObject(value) {
+ if (stack.indexOf(value) >= 0) throw TypeError("Converting circular structure to JSON5");
+ stack.push(value);
+ var stepback = indent;
+ indent = indent + gap;
+ var keys = propertyList || Object.keys(value);
+ var partial = [];
+ for (var i = 0, list = keys; i < list.length; i += 1) {
+ var key = list[i];
+ var propertyString = serializeProperty(key, value);
+ if (propertyString !== void 0) {
+ var member = serializeKey(key) + ":";
+ if (gap !== "") member += " ";
+ member += propertyString;
+ partial.push(member);
}
- member += propertyString;
- partial.push(member);
}
- }
- var final;
- if (partial.length === 0) {
- final = "{}";
- } else {
- var properties;
- if (gap === "") {
- properties = partial.join(",");
- final = "{" + properties + "}";
- } else {
- var separator = ",\n" + indent;
- properties = partial.join(separator);
- final = "{\n" + indent + properties + ",\n" + stepback + "}";
+ var final;
+ if (partial.length === 0) final = "{}";
+ else {
+ var properties;
+ if (gap === "") {
+ properties = partial.join(",");
+ final = "{" + properties + "}";
+ } else {
+ var separator = ",\n" + indent;
+ properties = partial.join(separator);
+ final = "{\n" + indent + properties + ",\n" + stepback + "}";
+ }
}
+ stack.pop();
+ indent = stepback;
+ return final;
+ }
+ function serializeKey(key) {
+ if (key.length === 0) return quoteString(key, true);
+ var firstChar = String.fromCodePoint(key.codePointAt(0));
+ if (!util.isIdStartChar(firstChar)) return quoteString(key, true);
+ for (var i = firstChar.length; i < key.length; i++) if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) return quoteString(key, true);
+ return key;
}
- stack.pop();
- indent = stepback;
- return final;
- }
- function serializeKey(key) {
- if (key.length === 0) {
- return quoteString(key, true);
- }
- var firstChar = String.fromCodePoint(key.codePointAt(0));
- if (!util.isIdStartChar(firstChar)) {
- return quoteString(key, true);
- }
- for (var i = firstChar.length; i < key.length; i++) {
- if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
- return quoteString(key, true);
+ function serializeArray(value) {
+ if (stack.indexOf(value) >= 0) throw TypeError("Converting circular structure to JSON5");
+ stack.push(value);
+ var stepback = indent;
+ indent = indent + gap;
+ var partial = [];
+ for (var i = 0; i < value.length; i++) {
+ var propertyString = serializeProperty(String(i), value);
+ partial.push(propertyString !== void 0 ? propertyString : "null");
}
- }
- return key;
- }
- function serializeArray(value) {
- if (stack.indexOf(value) >= 0) {
- throw TypeError("Converting circular structure to JSON5");
- }
- stack.push(value);
- var stepback = indent;
- indent = indent + gap;
- var partial = [];
- for (var i = 0; i < value.length; i++) {
- var propertyString = serializeProperty(String(i), value);
- partial.push(propertyString !== undefined ? propertyString : "null");
- }
- var final;
- if (partial.length === 0) {
- final = "[]";
- } else {
- if (gap === "") {
- var properties = partial.join(",");
- final = "[" + properties + "]";
- } else {
+ var final;
+ if (partial.length === 0) final = "[]";
+ else if (gap === "") final = "[" + partial.join(",") + "]";
+ else {
var separator = ",\n" + indent;
var properties$1 = partial.join(separator);
final = "[\n" + indent + properties$1 + ",\n" + stepback + "]";
}
+ stack.pop();
+ indent = stepback;
+ return final;
}
- stack.pop();
- indent = stepback;
- return final;
}
};
- var JSON5 = {
- parse,
- stringify
- };
- var lib = JSON5;
- var es5 = lib;
- return es5;
}));
}));
-
//#endregion
//#region ../libs_drpy/_dist/gb18030.js
var require_gb18030 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- /**
- * GB18030编码转换模块
- * 提供GB18030字符编码的解码功能,支持CommonJS、AMD和全局环境
- * GB18030是中华人民共和国国家标准,是中文编码的扩展标准
- */
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory();
- } else if (typeof define === "function" && define.amd) {
- define([], factory);
- } else {
- globalThis.gbkTool = factory();
- }
+ if (typeof exports === "object") module.exports = exports = factory();
+ else if (typeof define === "function" && define.amd) define([], factory);
+ else globalThis.gbkTool = factory();
})(exports, function() {
/**
* 处理压缩的编码映射数据
@@ -8594,31 +8002,21 @@ var require_gb18030 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {string} 处理后的编码数据
*/
var data = function(zipData) {
- var re = zipData.replace(/#(\d+)\$/g, function(a, b) {
+ return zipData.replace(/#(\d+)\$/g, function(a, b) {
return Array(+b + 3).join("#");
}).replace(/#/g, "####").replace(/(\w\w):([\w#]+)(?:,|$)/g, function(a, hd, dt) {
return dt.replace(/../g, function(a) {
- if (a != "##") {
- return hd + a;
- } else {
- return a;
- }
+ if (a != "##") return hd + a;
+ else return a;
});
});
- return re;
}("4e:020405060f12171f20212326292e2f313335373c40414244464a5155575a5b6263646567686a6b6c6d6e6f727475767778797a7b7c7d7f808182838485878a#909697999c9d9ea3aaafb0b1b4b6b7b8b9bcbdbec8cccfd0d2dadbdce0e2e6e7e9edeeeff1f4f8f9fafcfe,4f:00020304050607080b0c12131415161c1d212328292c2d2e31333537393b3e3f40414244454748494a4b4c525456616266686a6b6d6e7172757778797a7d8081828586878a8c8e909293959698999a9c9e9fa1a2a4abadb0b1b2b3b4b6b7b8b9babbbcbdbec0c1c2c6c7c8c9cbcccdd2d3d4d5d6d9dbe0e2e4e5e7ebecf0f2f4f5f6f7f9fbfcfdff,50:000102030405060708090a#0b0e1011131516171b1d1e20222324272b2f303132333435363738393b3d3f404142444546494a4b4d5051525354565758595b5d5e5f6061626364666768696a6b6d6e6f70717273747578797a7c7d818283848687898a8b8c8e8f909192939495969798999a9b9c9d9e9fa0a1a2a4a6aaabadaeafb0b1b3b4b5b6b7b8b9bcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdced0d1d2d3d4d5d7d8d9dbdcdddedfe0e1e2e3e4e5e8e9eaebeff0f1f2f4f6f7f8f9fafcfdfeff,51:00010203040508#090a0c0d0e0f1011131415161718191a1b1c1d1e1f2022232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e42474a4c4e4f5052535758595b5d5e5f606163646667696a6f727a7e7f838486878a8b8e8f90919394989a9d9e9fa1a3a6a7a8a9aaadaeb4b8b9babebfc1c2c3c5c8cacdced0d2d3d4d5d6d7d8d9dadcdedfe2e3e5e6e7e8e9eaeceef1f2f4f7fe,52:0405090b0c0f101314151c1e1f2122232526272a2c2f313234353c3e4445464748494b4e4f5253555758#595a5b5d5f6062636466686b6c6d6e7071737475767778797a7b7c7e808384858687898a8b8c8d8e8f91929495969798999a9ca4a5a6a7aeafb0b4b5b6b7b8b9babbbcbdc0c1c2c4c5c6c8cacccdcecfd1d3d4d5d7d9dadbdcdddee0e1e2e3e5e6e7e8e9eaebecedeeeff1f2f3f4f5f6f7f8fbfcfd,53:0102030407090a0b0c0e11121314181b1c1e1f2224252728292b2c2d2f3031323334353637383c3d404244464b4c4d505458595b5d65686a6c6d7276797b7c7d7e80818387888a8e8f#90919293949697999b9c9ea0a1a4a7aaabacadafb0b1b2b3b4b5b7b8b9babcbdbec0c3c4c5c6c7cecfd0d2d3d5dadcdddee1e2e7f4fafeff,54:000205070b1418191a1c2224252a303336373a3d3f4142444547494c4d4e4f515a5d5e5f6061636567696a6b6c6d6e6f7074797a7e7f8183858788898a8d919397989c9e9fa0a1a2a5aeb0b2b5b6b7b9babcbec3c5cacbd6d8dbe0e1e2e3e4ebeceff0f1f4f5f6f7f8f9fbfe,55:0002030405080a0b0c0d0e121315161718191a1c1d1e1f212526#28292b2d3234353638393a3b3d40424547484b4c4d4e4f515253545758595a5b5d5e5f60626368696b6f7071727374797a7d7f85868c8d8e9092939596979a9b9ea0a1a2a3a4a5a6a8a9aaabacadaeafb0b2b4b6b8babcbfc0c1c2c3c6c7c8cacbcecfd0d5d7d8d9dadbdee0e2e7e9edeef0f1f4f6f8f9fafbfcff,56:0203040506070a0b0d1011121314151617191a1c1d202122252628292a2b2e2f30333537383a3c3d3e404142434445464748494a4b4f5051525355565a5b5d5e5f6061#636566676d6e6f70727374757778797a7d7e7f80818283848788898a8b8c8d9091929495969798999a9b9c9d9e9fa0a1a2a4a5a6a7a8a9aaabacadaeb0b1b2b3b4b5b6b8b9babbbdbebfc0c1c2c3c4c5c6c7c8c9cbcccdcecfd0d1d2d3d5d6d8d9dce3e5e6e7e8e9eaeceeeff2f3f6f7f8fbfc,57:00010205070b0c0d0e0f101112131415161718191a1b1d1e202122242526272b313234353637383c3d3f414344454648494b52535455565859626365676c6e707172747578797a7d7e7f80#818788898a8d8e8f90919495969798999a9c9d9e9fa5a8aaacafb0b1b3b5b6b7b9babbbcbdbebfc0c1c4c5c6c7c8c9cacccdd0d1d3d6d7dbdcdee1e2e3e5e6e7e8e9eaebeceef0f1f2f3f5f6f7fbfcfeff,58:0103040508090a0c0e0f101213141617181a1b1c1d1f222325262728292b2c2d2e2f31323334363738393a3b3c3d3e3f4041424345464748494a4b4e4f505253555657595a5b5c5d5f6061626364666768696a6d6e6f707172737475767778797a7b7c7d7f82848687888a8b8c#8d8e8f909194959697989b9c9da0a1a2a3a4a5a6a7aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbdbebfc0c2c3c4c6c7c8c9cacbcccdcecfd0d2d3d4d6d7d8d9dadbdcdddedfe0e1e2e3e5e6e7e8e9eaedeff1f2f4f5f7f8fafbfcfdfeff,59:000103050608090a0b0c0e1011121317181b1d1e2021222326282c30323335363b3d3e3f404345464a4c4d505253595b5c5d5e5f616364666768696a6b6c6d6e6f70717275777a7b7c7e7f8085898b8c8e8f90919495989a9b9c9d9fa0a1a2a6#a7acadb0b1b3b4b5b6b7b8babcbdbfc0c1c2c3c4c5c7c8c9cccdcecfd5d6d9dbdedfe0e1e2e4e6e7e9eaebedeeeff0f1f2f3f4f5f6f7f8fafcfdfe,5a:00020a0b0d0e0f101214151617191a1b1d1e2122242627282a2b2c2d2e2f3033353738393a3b3d3e3f414243444547484b4c4d4e4f5051525354565758595b5c5d5e5f60616364656668696b6c6d6e6f7071727378797b7c7d7e808182838485868788898a8b8c8d8e8f9091939495969798999c9d9e9fa0a1a2a3a4a5a6a7a8a9abac#adaeafb0b1b4b6b7b9babbbcbdbfc0c3c4c5c6c7c8cacbcdcecfd0d1d3d5d7d9dadbdddedfe2e4e5e7e8eaecedeeeff0f2f3f4f5f6f7f8f9fafbfcfdfeff,5b:0001020304050607080a0b0c0d0e0f10111213141518191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303133353638393a3b3c3d3e3f4142434445464748494a4b4c4d4e4f52565e606167686b6d6e6f7274767778797b7c7e7f82868a8d8e90919294969fa7a8a9acadaeafb1b2b7babbbcc0c1c3c8c9cacbcdcecf#d1d4d5d6d7d8d9dadbdce0e2e3e6e7e9eaebecedeff1f2f3f4f5f6f7fdfe,5c:0002030507080b0c0d0e10121317191b1e1f2021232628292a2b2d2e2f303233353637434446474c4d5253545657585a5b5c5d5f62646768696a6b6c6d70727374757677787b7c7d7e808384858687898a8b8e8f9293959d9e9fa0a1a4a5a6a7a8aaaeafb0b2b4b6b9babbbcbec0c2c3c5c6c7c8c9cacccdcecfd0d1d3d4d5d6d7d8dadbdcdddedfe0e2e3e7e9ebeceeeff1f2f3f4f5f6f7f8f9fafcfdfeff,5d:00#01040508090a0b0c0d0f10111213151718191a1c1d1f2021222325282a2b2c2f3031323335363738393a3b3c3f4041424344454648494d4e4f5051525354555657595a5c5e5f6061626364656667686a6d6e7071727375767778797a7b7c7d7e7f8081838485868788898a8b8c8d8e8f9091929394959697989a9b9c9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b8b9babbbcbdbebfc0c1c2c3c4c6c7c8c9cacbcccecfd0d1d2d3d4d5d6d7d8d9dadcdfe0e3e4eaeced#f0f5f6f8f9fafbfcff,5e:000407090a0b0d0e1213171e1f20212223242528292a2b2c2f303233343536393a3e3f404143464748494a4b4d4e4f50515253565758595a5c5d5f60636465666768696a6b6c6d6e6f70717577797e8182838588898c8d8e92989b9da1a2a3a4a8a9aaabacaeafb0b1b2b4babbbcbdbfc0c1c2c3c4c5c6c7c8cbcccdcecfd0d4d5d7d8d9dadcdddedfe0e1e2e3e4e5e6e7e9ebecedeeeff0f1f2f3f5f8f9fbfcfd,5f:050607090c0d0e10121416191a1c1d1e21222324#282b2c2e30323334353637383b3d3e3f4142434445464748494a4b4c4d4e4f5154595a5b5c5e5f60636567686b6e6f72747576787a7d7e7f83868d8e8f919394969a9b9d9e9fa0a2a3a4a5a6a7a9abacafb0b1b2b3b4b6b8b9babbbebfc0c1c2c7c8cacbced3d4d5dadbdcdedfe2e3e5e6e8e9eceff0f2f3f4f6f7f9fafc,60:0708090b0c10111317181a1e1f2223242c2d2e3031323334363738393a3d3e404445464748494a4c4e4f5153545657585b5c5e5f606165666e71727475777e80#8182858687888a8b8e8f909193959798999c9ea1a2a4a5a7a9aaaeb0b3b5b6b7b9babdbebfc0c1c2c3c4c7c8c9cccdcecfd0d2d3d4d6d7d9dbdee1e2e3e4e5eaf1f2f5f7f8fbfcfdfeff,61:02030405070a0b0c1011121314161718191b1c1d1e21222528292a2c2d2e2f303132333435363738393a3b3c3d3e4041424344454647494b4d4f50525354565758595a5b5c5e5f606163646566696a6b6c6d6e6f717273747678797a7b7c7d7e7f808182838485868788898a8c8d8f9091929395#969798999a9b9c9e9fa0a1a2a3a4a5a6aaabadaeafb0b1b2b3b4b5b6b8b9babbbcbdbfc0c1c3c4c5c6c7c9cccdcecfd0d3d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e7e8e9eaebecedeeeff0f1f2f3f4f6f7f8f9fafbfcfdfe,62:00010203040507091314191c1d1e2023262728292b2d2f303132353638393a3b3c424445464a4f50555657595a5c5d5e5f6061626465687172747577787a7b7d818283858687888b8c8d8e8f9094999c9d9ea3a6a7a9aaadaeafb0b2b3b4b6b7b8babec0c1#c3cbcfd1d5dddee0e1e4eaebf0f2f5f8f9fafb,63:00030405060a0b0c0d0f10121314151718191c2627292c2d2e30313334353637383b3c3e3f40414447484a51525354565758595a5b5c5d60646566686a6b6c6f707273747578797c7d7e7f81838485868b8d9193949597999a9b9c9d9e9fa1a4a6abafb1b2b5b6b9bbbdbfc0c1c2c3c5c7c8cacbccd1d3d4d5d7d8d9dadbdcdddfe2e4e5e6e7e8ebeceeeff0f1f3f5f7f9fafbfcfe,64:0304060708090a0d0e111215161718191a1d1f222324#252728292b2e2f3031323335363738393b3c3e404243494b4c4d4e4f505153555657595a5b5c5d5f60616263646566686a6b6c6e6f70717273747576777b7c7d7e7f8081838688898a8b8c8d8e8f90939497989a9b9c9d9fa0a1a2a3a5a6a7a8aaabafb1b2b3b4b6b9bbbdbebfc1c3c4c6c7c8c9cacbcccfd1d3d4d5d6d9dadbdcdddfe0e1e3e5e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,65:01020304050607080a0b0c0d0e0f10111314151617191a1b1c1d1e1f2021#222324262728292a2c2d30313233373a3c3d404142434446474a4b4d4e5052535457585a5c5f606164656768696a6d6e6f7173757678797a7b7c7d7e7f8081828384858688898a8d8e8f92949596989a9d9ea0a2a3a6a8aaacaeb1b2b3b4b5b6b7b8babbbebfc0c2c7c8c9cacdd0d1d3d4d5d8d9dadbdcdddedfe1e3e4eaebf2f3f4f5f8f9fbfcfdfeff,66:0104050708090b0d1011121617181a1b1c1e2122232426292a2b2c2e3032333738393a3b3d3f40424445464748494a4d4e505158#595b5c5d5e6062636567696a6b6c6d7172737578797b7c7d7f808183858688898a8b8d8e8f909293949598999a9b9c9e9fa0a1a2a3a4a5a6a9aaabacadafb0b1b2b3b5b6b7b8babbbcbdbfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8dadedfe0e1e2e3e4e5e7e8eaebecedeeeff1f5f6f8fafbfd,67:010203040506070c0e0f1112131618191a1c1e20212223242527292e303233363738393b3c3e3f414445474a4b4d5254555758595a5b5d62636466676b6c6e717476#78797a7b7d8082838586888a8c8d8e8f9192939496999b9fa0a1a4a6a9acaeb1b2b4b9babbbcbdbebfc0c2c5c6c7c8c9cacbcccdced5d6d7dbdfe1e3e4e6e7e8eaebedeef2f5f6f7f8f9fafbfcfe,68:01020304060d1012141518191a1b1c1e1f20222324252627282b2c2d2e2f30313435363a3b3f474b4d4f52565758595a5b5c5d5e5f6a6c6d6e6f707172737578797a7b7c7d7e7f8082848788898a8b8c8d8e90919294959698999a9b9c9d9e9fa0a1a3a4a5a9aaabacaeb1b2b4b6b7b8#b9babbbcbdbebfc1c3c4c5c6c7c8cacccecfd0d1d3d4d6d7d9dbdcdddedfe1e2e4e5e6e7e8e9eaebecedeff2f3f4f6f7f8fbfdfeff,69:00020304060708090a0c0f11131415161718191a1b1c1d1e21222325262728292a2b2c2e2f313233353637383a3b3c3e4041434445464748494a4b4c4d4e4f50515253555658595b5c5f616264656768696a6c6d6f7072737475767a7b7d7e7f8183858a8b8c8e8f909192939697999a9d9e9fa0a1a2a3a4a5a6a9aaacaeafb0b2b3b5b6b8b9babcbd#bebfc0c2c3c4c5c6c7c8c9cbcdcfd1d2d3d5d6d7d8d9dadcdddee1e2e3e4e5e6e7e8e9eaebeceeeff0f1f3f4f5f6f7f8f9fafbfcfe,6a:000102030405060708090b0c0d0e0f10111213141516191a1b1c1d1e20222324252627292b2c2d2e30323334363738393a3b3c3f40414243454648494a4b4c4d4e4f515253545556575a5c5d5e5f60626364666768696a6b6c6d6e6f70727374757677787a7b7d7e7f81828385868788898a8b8c8d8f929394959698999a9b9c9d9e9fa1a2a3a4a5a6#a7a8aaadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,6b:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f252628292a2b2c2d2e2f303133343536383b3c3d3f4041424445484a4b4d4e4f5051525354555657585a5b5c5d5e5f606168696b6c6d6e6f7071727374757677787a7d7e7f808588#8c8e8f909194959798999c9d9e9fa0a2a3a4a5a6a7a8a9abacadaeafb0b1b2b6b8b9babbbcbdbec0c3c4c6c7c8c9caccced0d1d8dadcdddedfe0e2e3e4e5e6e7e8e9ecedeef0f1f2f4f6f7f8fafbfcfeff,6c:000102030408090a0b0c0e12171c1d1e2023252b2c2d31333637393a3b3c3e3f434445484b4c4d4e4f5152535658595a62636566676b6c6d6e6f71737577787a7b7c7f8084878a8b8d8e9192959697989a9c9d9ea0a2a8acafb0b4b5b6b7bac0c1c2c3c6c7c8cbcdcecfd1d2d8#d9dadcdddfe4e6e7e9ecedf2f4f9ff,6d:000203050608090a0d0f101113141516181c1d1f20212223242628292c2d2f30343637383a3f404244494c50555657585b5d5f6162646567686b6c6d707172737576797a7b7d7e7f8081838486878a8b8d8f9092969798999a9ca2a5acadb0b1b3b4b6b7b9babbbcbdbec1c2c3c8c9cacdcecfd0d2d3d4d5d7dadbdcdfe2e3e5e7e8e9eaedeff0f2f4f5f6f8fafdfeff,6e:0001020304060708090b0f12131518191b1c1e1f222627282a2c2e30313335#3637393b3c3d3e3f40414245464748494a4b4c4f5051525557595a5c5d5e606162636465666768696a6c6d6f707172737475767778797a7b7c7d8081828487888a8b8c8d8e91929394959697999a9b9d9ea0a1a3a4a6a8a9abacadaeb0b3b5b8b9bcbebfc0c3c4c5c6c8c9cacccdced0d2d6d8d9dbdcdde3e7eaebecedeeeff0f1f2f3f5f6f7f8fafbfcfdfeff,6f:000103040507080a0b0c0d0e101112161718191a1b1c1d1e1f212223252627282c2e303234353738393a3b3c3d3f404142#43444548494a4c4e4f5051525354555657595a5b5d5f60616364656768696a6b6c6f707173757677797b7d7e7f808182838586878a8b8f909192939495969798999a9b9d9e9fa0a2a3a4a5a6a8a9aaabacadaeafb0b1b2b4b5b7b8babbbcbdbebfc1c3c4c5c6c7c8cacbcccdcecfd0d3d4d5d6d7d8d9dadbdcdddfe2e3e4e5e6e7e8e9eaebecedf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,70:000102030405060708090a0b0c0d0e0f1012131415161718191c1d1e1f2021222425262728292a#2b2c2d2e2f30313233343637383a3b3c3d3e3f404142434445464748494a4b4d4e505152535455565758595a5b5c5d5f606162636465666768696a6e7172737477797a7b7d818283848687888b8c8d8f90919397989a9b9e9fa0a1a2a3a4a5a6a7a8a9aab0b2b4b5b6babebfc4c5c6c7c9cbcccdcecfd0d1d2d3d4d5d6d7dadcdddee0e1e2e3e5eaeef0f1f2f3f4f5f6f8fafbfcfeff,71:0001020304050607080b0c0d0e0f111214171b1c1d1e1f2021222324252728292a2b2c2d2e323334#353738393a3b3c3d3e3f4041424344464748494b4d4f505152535455565758595a5b5d5f6061626365696a6b6c6d6f707174757677797b7c7e7f8081828385868788898b8c8d8e909192939596979a9b9c9d9ea1a2a3a4a5a6a7a9aaabadaeafb0b1b2b4b6b7b8babbbcbdbebfc0c1c2c4c5c6c7c8c9cacbcccdcfd0d1d2d3d6d7d8d9dadbdcdddedfe1e2e3e4e6e8e9eaebecedeff0f1f2f3f4f5f6f7f8fafbfcfdfeff,72:0001020304050708090a0b0c0d0e0f101112131415161718191a#1b1c1e1f2021222324252627292b2d2e2f3233343a3c3e40414243444546494a4b4e4f505153545557585a5c5e60636465686a6b6c6d707173747677787b7c7d828385868788898c8e9091939495969798999a9b9c9d9ea0a1a2a3a4a5a6a7a8a9aaabaeb1b2b3b5babbbcbdbebfc0c5c6c7c9cacbcccfd1d3d4d5d6d8dadb#95$,30:000102,00b702:c9c7,00a830:0305,2014ff5e20:162618191c1d,30:141508090a0b0c0d0e0f16171011,00:b1d7f7,22:362728110f2a2908371aa52520,231222:992b2e614c483d1d606e6f64651e3534,26:4240,00b020:3233,2103ff0400a4ff:e0e1,203000a7211626:0605,25:cbcfcec7c6a1a0b3b2,203b21:92909193,30:13#95$,21:70717273747576777879#4$,24:88898a8b8c8d8e8f909192939495969798999a9b7475767778797a7b7c7d7e7f808182838485868760616263646566676869##,32:20212223242526272829##,21:606162636465666768696a6b#97$,ff:010203e505060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5de3#95$,30:4142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f90919293#106$a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6#103$,03:9192939495969798999a9b9c9d9e9fa0a1a3a4a5a6a7a8a9#6$b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c3c4c5c6c7c8c9#5$,fe:3536393a3f403d3e41424344##3b3c373831#3334#104$,04:10111213141501161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f#13$30313233343551363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f#11$,02:cacbd9,20:13152535,21:050996979899,22:151f23526667bf,25:505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f7071727381828384858687#88898a8b8c8d8e8f939495bcbde2e3e4e5,2609229530:121d1e#9$,010100e101ce00e0011300e9011b00e8012b00ed01d000ec014d00f301d200f2016b00fa01d400f901:d6d8dadc,00:fcea,0251e7c701:4448,e7c802:61#2$,31:05060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20212223242526272829#19$,30:212223242526272829,32a333:8e8f9c9d9ea1c4ced1d2d5,fe30ff:e2e4#,212132:31#,20:10#1$,30:fc9b9cfdfe069d9e,fe:494a4b4c4d4e4f50515254555657595a5b5c5d5e5f6061#626364656668696a6b,e7:e7e8e9eaebecedeeeff0f1f2f3,30:07#11$,25:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b#13$,72:dcdddfe2e3e4e5e6e7eaebf5f6f9fdfeff,73:00020405060708090b0c0d0f1011121418191a1f2023242627282d2f30323335363a3b3c3d404142434445464748#494a4b4c4e4f515354555658595a5b5c5d5e5f6162636465666768696a6b6e7071#92$72737475767778797a7b7c7d7f808182838586888a8c8d8f90929394959798999a9c9d9ea0a1a3a4a5a6a7a8aaacadb1b4b5b6b8b9bcbdbebfc1c3c4c5c6c7#cbccced2d3d4d5d6d7d8dadbdcdddfe1e2e3e4e6e8eaebeceeeff0f1f3f4f5f6f7#92$f8f9fafbfcfdfeff,74:0001020407080b0c0d0e1112131415161718191c1d1e1f2021232427292b2d2f31323738393a3b3d3e3f4042434445464748494a4b4c4d#4e4f505152535456585d606162636465666768696a6b6c6e6f717273747578797a#92$7b7c7d7f8284858688898a8c8d8f9192939495969798999a9b9d9fa0a1a2a3a4a5a6aaabacadaeafb0b1b2b3b4b5b6b7b8b9bbbcbdbebfc0c1c2c3c4c5c6c7#c8c9cacbcccdcecfd0d1d3d4d5d6d7d8d9dadbdddfe1e5e7e8e9eaebecedf0f1f2#92$f3f5f8f9fafbfcfdfe,75:0001020305060708090a0b0c0e1012141516171b1d1e202122232426272a2e3436393c3d3f414243444647494a4d5051525355565758#5d5e5f60616263646768696b6c6d6e6f7071737576777a7b7c7d7e808182848587#92$88898a8c8d8e909395989b9c9ea2a6a7a8a9aaadb6b7babbbfc0c1c6cbcccecfd0d1d3d7d9dadcdddfe0e1e5e9ecedeeeff2f3f5f6f7f8fafbfdfe,76:02040607#08090b0d0e0f11121314161a1c1d1e212327282c2e2f31323637393a3b3d414244#92$45464748494a4b4e4f50515253555758595a5b5d5f6061626465666768696a6c6d6e7071727374757677797a7c7f80818385898a8c8d8f9092949597989a9b#9c9d9e9fa0a1a2a3a5a6a7a8a9aaabacadafb0b3b5b6b7b8b9babbbcbdbec0c1c3,554a963f57c3632854ce550954c076:914c,853c77ee827e788d72319698978d6c285b894ffa630966975cb880fa684880ae660276ce51f9655671ac7ff1888450b2596561ca6fb382ad634c625253ed54277b06516b75a45df462d48dcb9776628a8019575d97387f627238767d67cf767e64464f708d2562dc7a17659173ed642c6273822c9881677f724862:6ecc,4f3474e3534a529e7eca90a65e2e6886699c81807ed168d278c5868c9551508d8c2482de80de53058912526576:c4c7c9cbccd3d5d9dadcdddee0e1e2e3e4e6e7e8e9eaebecedf0f3f5f6f7fafbfdff,77:00020305060a0c0e0f1011121314151617181b1c1d1e21232425272a2b#2c2e3031323334393b3d3e3f4244454648494a4b4c4d4e4f52535455565758595c,858496f94fdd582199715b9d62:b1a5,66b48c799c8d7206676f789160b253:5117,8f8880cc8d1d94a1500d72c8590760eb711988ab595482ef672c7b285d297ef7752d6cf58e668ff8903c9f3b6bd491197b145f7c78a784d6853d6b:d5d9d6,5e:0187,75f995ed655d5f:0ac5,8f9f58c181c2907f965b97ad8fb97f168d2c62414fbf53:d85e,8f:a8a9ab,904d68075f6a819888689cd6618b522b762a5f6c658c6fd26ee85bbe644851:75b0,67c44e1979c9997c70b377:5d5e5f606467696a6d6e6f7071727374757677787a7b7c818283868788898a8b8f90939495969798999a9b9c9d9ea1a3a4a6a8abadaeafb1b2b4b6b7b8b9ba#bcbec0c1c2c3c4c5c6c7c8c9cacbcccecfd0d1d2d3d4d5d6d8d9dadddedfe0e1e4,75c55e7673bb83e064ad62e894b56ce2535a52c3640f94c27b944f2f5e1b823681:168a,6e246cca9a736355535c54fa886557e04e0d5e036b657c3f90e8601664e6731c88c16750624d8d22776c8e2991c75f6983dc8521991053c286956b8b60:ede8,707f82:cd31,4ed36ca785cf64cd7cd969fd66f9834953957b564fa7518c6d4b5c428e6d63d253c983:2c36,67e578b4643d5bdf5c945dee8be762c667f48c7a640063ba8749998b8c177f2094f24ea7961098a4660c731677:e6e8eaeff0f1f2f4f5f7f9fafbfc,78:0304050607080a0b0e0f101315191b1e20212224282a2b2e2f31323335363d3f414243444648494a4b4d4f51535458595a#5b5c5e5f606162636465666768696f7071727374757678797a7b7d7e7f80818283,573a5c1d5e38957f507f80a05382655e7545553150218d856284949e671d56326f6e5de2543570928f66626f64a463a35f7b6f8890f481e38fb05c1866685ff16c8996488d81886c649179f057ce6a59621054484e587a0b60e96f848bda627f901e9a8b79e4540375f4630153196c608fdf5f1b9a70803b9f7f4f885c3a8d647fc565a570bd51:45b2,866b5d075ba062bd916c75748e0c7a2061017b794ec77ef877854e1181ed521d51fa6a7153a88e87950496cf6ec19664695a78:848586888a8b8f9092949596999d9ea0a2a4a6a8a9aaabacadaeafb5b6b7b8babbbcbdbfc0c2c3c4c6c7c8cccdcecfd1d2d3d6d7d8dadbdcdddedfe0e1e2e3#e4e5e6e7e9eaebedeeeff0f1f3f5f6f8f9fbfcfdfeff,79:00020304060708090a0b0c,784050a877d7641089e6590463e35ddd7a7f693d4f20823955984e3275ae7a975e:628a,95ef521b5439708a6376952457826625693f918755076df37eaf882262337ef075b5832878c196cc8f9e614874f78bcd6b64523a8d506b21806a847156f153064e:ce1b,51d17c97918b7c074fc38e7f7be17a9c64675d1450ac810676017cb96dec7fe067515b:58f8,78cb64:ae13,63:aa2b,9519642d8fbe7b5476296253592754466b7950a362345e266b864ee38d37888b5f85902e79:0d0e0f1011121415161718191a1b1c1d1f2021222325262728292a2b2c2d2e2f3031323335363738393d3f42434445474a4b4c4d4e4f505152545558596163#6466696a6b6c6e70717273747576797b7c7d7e7f8283868788898b8c8d8e909192,6020803d62c54e39535590f863b880c665e66c2e4f4660ee6de18bde5f3986cb5f536321515a83616863520063638e4850125c9b79775bfc52307a3b60bc905376d75f:b797,76848e6c706f767b7b4977aa51f3909358244f4e6ef48fea654c7b1b72c46da47fdf5ae162b55e95573084827b2c5e1d5f1f90127f1498a063826ec7789870b95178975b57ab75354f4375385e9760e659606dc06bbf788953fc96d551cb52016389540a94938c038dcc7239789f87768fed8c0d53e079:939495969798999b9c9d9e9fa0a1a2a3a4a5a6a8a9aaabacadaeafb0b1b2b4b5b6b7b8bcbfc2c4c5c7c8cacccecfd0d3d4d6d7d9dadbdcdddee0e1e2e5e8ea#eceef1f2f3f4f5f6f7f9fafcfeff,7a:0104050708090a0c0f10111213151618191b1c,4e0176ef53ee948998769f0e952d5b9a8ba24e:221c,51ac846361c252a8680b4f97606b51bb6d1e515c6296659796618c46901775d890fd77636bd272:8aec,8bfb583577798d4c675c9540809a5ea66e2159927aef77ed953b6bb565ad7f0e58065151961f5bf958a954288e726566987f56e4949d76fe9041638754c659:1a3a,579b8eb267358dfa8235524160f0581586fe5ce89e454fc4989d8bb95a2560765384627c904f9102997f6069800c513f80335c1499756d314e8c7a:1d1f21222425262728292a2b2c2d2e2f303132343536383a3e4041424344454748494a4b4c4d4e4f50525354555658595a5b5c5d5e5f606162636465666768#696a6b6c6d6e6f717273757b7c7d7e828587898a8b8c8e8f909394999a9b9ea1a2,8d3053d17f5a7b4f4f104e4f96006cd573d085e95e06756a7ffb6a0a77fe94927e4151e170e653cd8fd483038d2972af996d6cdb574a82b365b980aa623f963259a84eff8bbf7eba653e83f2975e556198de80a5532a8bfd542080ba5e9f6cb88d3982ac915a54296c1b52067eb7575f711a6c7e7c89594b4efd5fff61247caa4e305c0167ab87025cf0950b98ce75af70fd902251af7f1d8bbd594951e44f5b5426592b657780a45b7562:76c2,8f905e456c1f7b264f:0fd8,670d7a:a3a4a7a9aaabaeafb0b1b2b4b5b6b7b8b9babbbcbdbec0c1c2c3c4c5c6c7c8c9cacccdcecfd0d1d2d3d4d5d7d8dadbdcdde1e2e4e7e8e9eaebeceef0f1f2f3#f4f5f6f7f8fbfcfe,7b:0001020507090c0d0e1012131617181a1c1d1f21222327292d,6d:6eaa,798f88b15f17752b629a8f854fef91dc65a781:2f51,5e9c81508d74526f89868d4b590d50854ed8961c723681798d1f5bcc8ba3964459877f1a549056:760e,8be565396982949976d66e895e72751867:46d1,7aff809d8d76611f79c665628d635188521a94a27f38809b7eb25c976e2f67607bd9768b9ad8818f7f947cd5641e95507a3f54:4ae5,6b4c640162089e3d80f3759952729769845b683c86e496:0194,94ec4e2a54047ed968398ddf801566f45e9a7fb97b:2f303234353637393b3d3f404142434446484a4d4e535557595c5e5f61636465666768696a6b6c6d6f70737476787a7c7d7f81828384868788898a8b8c8e8f#9192939698999a9b9e9fa0a3a4a5aeafb0b2b3b5b6b7b9babbbcbdbebfc0c2c3c4,57c2803f68975de5653b529f606d9f9a4f9b8eac516c5bab5f135de96c5e62f18d21517194a952fe6c9f82df72d757a267848d2d591f8f9c83c754957b8d4f306cbd5b6459d19f1353e486ca9aa88c3780a16545987e56fa96c7522e74dc52505be1630289024e5662d0602a68fa51735b9851a089c27ba199867f5060ef704c8d2f51495e7f901b747089c4572d78455f529f9f95fa8f689b3c8be17678684267dc8d:ea35,523d8f8a6eda68cd950590ed56fd679c88f98fc754c87b:c5c8c9cacbcdcecfd0d2d4d5d6d7d8dbdcdedfe0e2e3e4e7e8e9ebecedeff0f2f3f4f5f6f8f9fafbfdff,7c:0001020304050608090a0d0e101112131415171819#1a1b1c1d1e20212223242528292b2c2d2e2f3031323334353637393a3b3c3d3e42,9ab85b696d776c264ea55bb39a87916361a890af97e9542b6db55bd251fd558a7f:55f0,64bc634d65f161be608d710a6c:5749,592f676d822a58d5568e8c6a6beb90dd597d801753f76d695475559d83:77cf,683879be548c4f55540876d28c8996026cb36db88d6b89109e648d3a563f9ed175d55f8872e0606854fc4ea86a2a886160528f7054c470d886799e3f6d2a5b8f5f187ea255894faf7334543c539a501954:0e7c,4e4e5ffd745a58f6846b80e1877472d07cca6e567c:434445464748494a4b4c4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f70717275767778797a7e7f8081828384858687#888a8b8c8d8e8f90939496999a9ba0a1a3a6a7a8a9abacadafb0b4b5b6b7b8babb,5f27864e552c62a44e926caa623782b154d7534e733e6ed1753b521253168bdd69d05f8a60006dee574f6b2273af68538fd87f13636260a3552475ea8c6271156da35ba65e7b8352614c9ec478fa87577c27768751f060f6714c66435e4c604d8c0e707063258f895fbd606286d456de6bc160946167534960e066668d3f79fd4f1a70e96c478b:b3f2,7ed88364660f5a5a9b426d:51f7,8c416d3b4f19706b83b7621660d1970d8d27797851fb57:3efa,673a75787a3d79ef7b957c:bfc0c2c3c4c6c9cbcecfd0d1d2d3d4d8dadbdddee1e2e3e4e5e6e7e9eaebecedeef0f1f2f3f4f5f6f7f9fafcfdfeff,7d:000102030405060708090b0c0d0e0f10#1112131415161718191a1b1c1d1e1f212324252628292a2c2d2e30313233343536,808c99658ff96fc08ba59e2159ec7ee97f095409678168d88f917c4d96c653ca602575be6c7253735ac97ea7632451e0810a5df184df628051805b634f0e796d524260b86d4e5b:c4c2,8b:a1b0,65e25fcc964559937e:e7aa,560967b759394f735bb652a0835a988a8d3e753294be50477a3c4ef767b69a7e5ac16b7c76d1575a5c167b3a95f4714e517c80a9827059787f04832768c067ec78:b177,62e363617b804fed526a51cf835069db92748d:f531,89c1952e7bad4ef67d:3738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6f70717273747576#78797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798,506582305251996f6e:1085,6da75efa50f559dc5c066d466c5f7586848b686859568bb253209171964d854969127901712680f64ea490ca6d479a845a0756bc640594f077eb4fa5811a72e189d2997a7f347ede527f655991758f:7f83,53eb7a9663:eda5,768679f888579636622a52ab8282685467706377776b7aed6d017ed389e359d0621285c982a5754c501f4ecb75a58beb5c4a5dfe7b4b65a491d14eca6d25895f7d2795264ec58c288fdb9773664b79818fd170ec6d787d:999a9b9c9d9e9fa0a1a2a3a4a5a7a8a9aaabacadafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9#dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fa,5c3d52b283465162830e775b66769cb84eac60ca7c:beb3,7ecf4e958b66666f988897595883656c955c5f8475c997567a:dfde,51c070af7a9863ea7a767ea0739697ed4e4570784e5d915253a965:51e7,81fc8205548e5c31759a97a062d872d975bd5c459a7983ca5c40548077e94e3e6cae805a62d2636e5de851778ddd8e1e952f4ff153e560e770ac526763509e435a1f5026773753777ee26485652b628963985014723589c951b38bc07edd574783cc94a7519b541b5cfb7d:fbfcfdfeff,7e:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f30313233343536373839#3a3c3d3e3f40424344454648494a4b4c4d4e4f505152535455565758595a5b5c5d,4fca7ae36d5a90e19a8f55805496536154af5f0063e9697751ef6168520a582a52d8574e780d770b5eb761777ce062:5b97,4ea27095800362f770e49760577782db67ef68f578d5989779d158f354b353ef6e34514b523b5ba28bfe80af554357a660735751542d7a7a60505b5463a762a053e362635bc767af54ed7a9f82e691775e9388e4593857ae630e8de880ef57577b774fa95feb5bbd6b3e53217b5072c2684677:ff36,65f751b54e8f76d45cbf7aa58475594e9b4150807e:5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f8081838485868788898a8b8c8d8e8f909192939495969798999a9c9d9e#aeb4bbbcd6e4ecf9,7f:0a101e37393b3c3d3e3f404143464748494a4b4c4d4e4f5253,998861276e8357646606634656f062:ec69,5ed39614578362c955878721814a8fa3556683b167658d5684dd5a6a680f62e67bee961151706f9c8c3063fd89c861d27f0670c26ee57405699472fc5eca90ce67176d6a635e52b3726280014f6c59e5916a70d96d9d52d24e5096f7956d857e78ca7d2f5121579264c2808b7c7b6cea68f1695e51b7539868a872819ece7bf172f879bb6f137406674e91cc9ca4793c83:8954,540f68174e3d538952b1783e5386522950884f:8bd0,7f:56595b5c5d5e6063646566676b6c6d6f7073757677787a7b7c7d7f8082838485868788898b8d8f9091929395969798999b9ca0a2a3a5a6a8a9aaabacadaeb1#b3b4b5b6b7babbbec0c2c3c4c6c7c8c9cbcdcfd0d1d2d3d6d7d9dadbdcdddee2e3,75e27acb7c926ca596b6529b748354e94fe9805483b28fde95705ec9601c6d9f5e18655b813894fe604b70bc7ec37cae51c968817cb1826f4e248f8691cf667e4eae8c0564a9804a50da759771ce5be58fbd6f664e86648295635ed66599521788c270c852a3730e7433679778f797164e3490bb9cde6dcb51db8d41541d62ce73b283f196f69f8494c34f367f9a51cc707596755cad988653e64ee46e9c740969b4786b998f7559521876246d4167f3516d9f99804b54997b3c7abf7f:e4e7e8eaebecedeff2f4f5f6f7f8f9fafdfeff,80:020708090a0e0f11131a1b1d1e1f2123242b2c2d2e2f303234393a3c3e404144454748494e4f505153555657#595b5c5d5e5f6061626364656667686b6c6d6e6f7072737475767778797a7b7c7d,9686578462e29647697c5a0464027bd36f0f964b82a6536298855e90708963b35364864f9c819e93788c97328d:ef42,9e7f6f5e79845f559646622e9a74541594dd4fa365c55c:6561,7f1586516c2f5f8b73876ee47eff5ce6631b5b6a6ee653754e7163a0756562a18f6e4f264ed16ca67eb68bba841d87ba7f57903b95237ba99aa188f8843d6d1b9a867edc59889ebb739b780186829a:6c82,561b541757cb4e709ea653568fc881097792999286ee6ee1851366fc61626f2b80:7e818285888a8d8e8f909192949597999ea3a6a7a8acb0b3b5b6b8b9bbc5c7c8c9cacbcfd0d1d2d3d4d5d8dfe0e2e3e6eef5f7f9fbfeff,81:000103040507080b#0c1517191b1c1d1f202122232425262728292a2b2d2e3033343537393a3b3c3d3f,8c298292832b76f26c135fd983bd732b8305951a6bdb77db94c6536f830251925e3d8c8c8d384e4873ab679a68859176970971646ca177095a9295416bcf7f8e66275bd059b95a9a95:e8f7,4eec84:0c99,6aac76df9530731b68a65b5f772f919a97617cdc8ff78c1c5f257c7379d889c56ccc871c5bc65e4268c977207ef551:954d,52c95a297f05976282d763cf778485d079d26e3a5e9959998511706d6c1162bf76bf654f60af95fd660e879f9e2394ed54:0d7d,8c2c647881:40414243444547494d4e4f525657585b5c5d5e5f6162636466686a6b6c6f727375767778818384858687898b8c8d8e90929394959697999a9e9fa0a1a2a4a5#a7a9abacadaeafb0b1b2b4b5b6b7b8b9bcbdbebfc4c5c7c8c9cbcdcecfd0d1d2d3,647986116a21819c78e864699b5462b9672b83ab58a89ed86cab6f205bde964c8c0b725f67d062c772614ea959c66bcd589366ae5e5552df6155672876ee776672677a4662ff54:ea50,94a090a35a1c7eb36c164e435976801059485357753796be56ca63208111607c95f96dd65462998151855ae980fd59ae9713502a6ce55c3c62df4f60533f817b90066eba852b62c85e7478be64b5637b5ff55a18917f9e1f5c3f634f80425b7d556e95:4a4d,6d8560a867e072de51dd5b8181:d4d5d6d7d8d9dadbdcdddedfe0e1e2e4e5e6e8e9ebeeeff0f1f2f5f6f7f8f9fafdff,82:030708090a0b0e0f111315161718191a1d2024252627292e323a3c3d3f#404142434546484a4c4d4e5051525354555657595b5c5d5e606162636465666769,62e76cde725b626d94ae7ebd81136d53519c5f04597452aa6012597366968650759f632a61e67cef8bfa54e66b279e256bb485d5545550766ca4556a8db4722c5e156015743662cd6392724c5f986e436d3e65006f5876d878d076fc7554522453db4e535e9e65c180:2ad6,629b5486522870ae888d8dd16ce1547880da57f988f48d54966a914d4f696c9b55b776c6783062a870f96f8e5f6d84ec68da787c7bf781a8670b9e4f636778b0576f7812973962:79ab,528874356bd782:6a6b6c6d71757677787b7c808183858687898c90939495969a9b9ea0a2a3a7b2b5b6babbbcbfc0c2c3c5c6c9d0d6d9dadde2e7e8e9eaecedeef0f2f3f5f6f8#fafcfdfeff,83:000a0b0d1012131618191d1e1f20212223242526292a2e3032373b3d,5564813e75b276ae533975de50fb5c418b6c7bc7504f72479a9798d86f0274e27968648777a562fc98918d2b54c180584e52576a82f9840d5e7351ed74f68bc45c4f57616cfc98875a4678349b448feb7c955256625194fa4ec68386846183e984b257d467345703666e6d668c3166dd7011671f6b3a6816621a59bb4e0351c46f0667d26c8f517668cb59476b6775665d0e81109f5065d779:4841,9a918d775c824e5e4f01542f5951780c56686c148fc45f036c:7de3,8bab639083:3e3f41424445484a4b4c4d4e5355565758595d6270717273747576797a7e7f808182838487888a8b8c8d8f909194959697999a9d9fa1a2a3a4a5a6a7acadae#afb5bbbebfc2c3c4c6c8c9cbcdced0d1d2d3d5d7d9dadbdee2e3e4e6e7e8ebeced,60706d3d7275626694:8ec5,53438fc17b7e4edf8c264e7e9ed494:b1b3,524d6f5c90636d458c3458115d4c6b:2049,67aa545b81547f8c589985375f3a62a26a47953965726084686577a74e544fa85de7979864ac7fd85ced4fcf7a8d520783044e14602f7a8394a64fb54eb279e6743452e482b964d279bd5bdd6c8197528f7b6c22503e537f6e0564ce66746c3060c598778bf75e86743c7a7779cb4e1890b174036c4256da914b6cc58d8b533a86c666f28eaf5c489a716e2083:eeeff3f4f5f6f7fafbfcfeff,84:0002050708090a10121314151617191a1b1e1f20212223292a2b2c2d2e2f30323334353637393a3b3e3f404142434445474849#4a4b4c4d4e4f505253545556585d5e5f606264656667686a6e6f70727477797b7c,53d65a369f8b8da353bb570898a76743919b6cc9516875ca62f372ac52:389d,7f3a7094763853749e4a69b7786e96c088d97fa471:36c3,518967d374e458e4651856b78ba9997662707ed560f970ed58ec4e:c1ba,5fcd97e74efb8ba45203598a7eab62544ecd65e5620e833884c98363878d71946eb65bb97ed2519763c967d480898339881551125b7a59828fb14e736c5d516589258f6f962e854a745e95:10f0,6da682e55f3164926d128428816e9cc3585e8d5b4e0953c184:7d7e7f8081838485868a8d8f90919293949596989a9b9d9e9fa0a2a3a4a5a6a7a8a9aaabacadaeb0b1b3b5b6b7bbbcbec0c2c3c5c6c7c8cbcccecfd2d4d5d7#d8d9dadbdcdee1e2e4e7e8e9eaebedeeeff1f2f3f4f5f6f7f8f9fafbfdfe,85:000102,4f1e6563685155d34e2764149a9a626b5ac2745f82726da968ee50e7838e7802674052396c997eb150bb5565715e7b5b665273ca82eb67495c715220717d886b95ea965564c58d6181b355846c5562477f2e58924f2455468d4f664c4e0a5c1a88f368a2634e7a0d70e7828d52fa97f65c1154e890b57ecd59628d4a86c782:0c0d,8d6664445c0461516d89793e8bbe78377533547b4f388eab6df15a207ec5795e6c885ba15a76751a80be614e6e1758f075:1f25,727253477ef385:030405060708090a0b0d0e0f101214151618191b1c1d1e2022232425262728292a2d2e2f303132333435363e3f404142444546474b4c4d4e4f505152535455#57585a5b5c5d5f60616263656667696a6b6c6d6e6f707173757677787c7d7f8081,770176db526980dc57235e08593172ee65bd6e7f8bd75c388671534177f362fe65f64ec098df86805b9e8bc653f277e24f7f5c4e9a7659cb5f0f793a58eb4e1667ff4e8b62ed8a93901d52bf662f55dc566c90024ed54f8d91ca99706c0f5e0260435ba489c68bd56536624b99965b:88ff,6388552e53d77626517d852c67a268b36b8a62928f9353d482126dd1758f4e668d4e5b70719f85af66:91d9,7f7287009ecd9f205c5e672f8ff06811675f620d7ad658855eb665706f3185:82838688898a8b8c8d8e909192939495969798999a9d9e9fa0a1a2a3a5a6a7a9abacadb1b2b3b4b5b6b8babbbcbdbebfc0c2c3c4c5c6c7c8cacbcccdced1d2#d4d6d7d8d9dadbdddedfe0e1e2e3e5e6e7e8eaebecedeeeff0f1f2f3f4f5f6f7f8,60555237800d6454887075295e05681362f4971c53cc723d8c016c3477617a0e542e77ac987a821c8bf47855671470c165af64955636601d79c153f84e1d6b7b80865bfa55e356db4f:3a3c,99725df3677e80386002988290015b8b8b:bcf5,641c825864de55fd82cf91654fd77d20901f7c9f50f358516eaf5bbf8bc980839178849c7b97867d96:8b8f,7ee59ad3788e5c817a57904296a7795f5b59635f7b0b84d168ad55067f2974107d2295016240584c4ed65b835979585485:f9fafcfdfe,86:0001020304060708090a0b0c0d0e0f10121314151718191a1b1c1d1e1f20212223242526282a2b2c2d2e2f3031323334353637393a3b3d3e3f40#4142434445464748494a4b4c525355565758595b5c5d5f6061636465666768696a,736d631e8e:4b0f,80ce82d462ac53f06cf0915e592a60016c70574d644a8d2a762b6ee9575b6a8075f06f6d8c:2d08,57666bef889278b363a253f970ad6c645858642a580268e0819b55107cd650188eba6dcc8d9f70eb638f6d9b6ed47ee68404684390036dd896768ba85957727985e4817e75bc8a8a68af52548e22951163d098988e44557c4f5366ff568f60d56d9552435c4959296dfb586b75:301c,606c82148146631167618fe2773a8d:f334,94c15e165385542c70c386:6d6f7072737475767778838485868788898e8f90919294969798999a9b9e9fa0a1a2a5a6abadaeb2b3b7b8b9bbbcbdbebfc1c2c3c5c8cccdd2d3d5d6d7dadc#dde0e1e2e3e5e6e7e8eaebeceff5f6f7fafbfcfdff,87:010405060b0c0e0f10111416,6c405ef7505c4ead5ead633a8247901a6850916e77b3540c94dc5f647ae5687663457b527edf75db507762955934900f51f879c37a8156fe5f9290146d825c60571f541051546e4d56e263a89893817f8715892a9000541e5c6f81c062:d658,81319e3596409a:6e7c,692d59a562d3553e631654c786d96d3c5a0374e6889c6b6a59168c4c5f2f6e7e73a9987d4e3870f75b8c7897633d665a769660cb5b9b5a494e0781556c6a738b4ea167897f515f8065fa671b5fd859845a0187:191b1d1f20242627282a2b2c2d2f303233353638393a3c3d404142434445464a4b4d4f505152545556585a5b5c5d5e5f6162666768696a6b6c6d6f71727375#7778797a7f8081848687898a8c8e8f90919294959698999a9b9c9d9ea0a1a2a3a4,5dcd5fae537197e68fdd684556f4552f60df4e3a6f4d7ef482c7840e59d44f:1f2a,5c3e7eac672a851a5473754f80c355829b4f4f4d6e2d8c135c096170536b761f6e29868a658795fb7eb9543b7a337d0a95ee55e17fc174ee631d87176da17a9d621165a1536763e16c835deb545c94a84e4c6c618bec5c4b65e0829c68a754:3e34,6b:cb66,4e9463425348821e4f:0dae,575e620a96fe6664726952:ffa1,609f8bef661471996790897f785277fd6670563b54389521727a87:a5a6a7a9aaaeb0b1b2b4b6b7b8b9bbbcbebfc1c2c3c4c5c7c8c9cccdcecfd0d4d5d6d7d8d9dadcdddedfe1e2e3e4e6e7e8e9ebecedeff0f1f2f3f4f5f6f7f8#fafbfcfdff,88:0001020405060708090b0c0d0e0f101112141718191a1c1d1e1f2023,7a00606f5e0c6089819d591560dc718470ef6eaa6c5072806a8488ad5e2d4e605ab3559c94e36d177cfb9699620f7ec6778e867e5323971e8f9666875ce14fa072ed4e0b53a6590f54136380952851484ed99c9c7ea454b88d248854823795f26d8e5f265acc663e966973:b02e,53bf817a99857fa15baa96:7750,7ebf76f853a2957699997bb189446e584e617fd479658be660f354cd4eab98795df76a6150cf54118c618427785d9704524a54ee56a395006d885bb56dc6665388:2425262728292a2b2c2d2e2f30313334353637383a3b3d3e3f414243464748494a4b4e4f505152535556585a5b5c5d5e5f6066676a6d6f717374757678797a#7b7c80838687898a8c8e8f90919394959798999a9b9d9e9fa0a1a3a5a6a7a8a9aa,5c0f5b5d6821809655787b11654869544e9b6b47874e978b534f631f643a90aa659c80c18c10519968b0537887f961c86c:c4fb,8c225c5185aa82af950c6b238f9b65b05f:fbc3,4fe18845661f8165732960fa51745211578b5f6290a2884c91925e78674f602759d351:44f6,80f853086c7996c4718a4f:11ee,7f9e673d55c5950879c088967ee3589f620c9700865a5618987b5f908bb884c4915753d965ed5e8f755c60647d6e5a7f7e:eaed,8f6955a75ba360ac65cb738488:acaeafb0b2b3b4b5b6b8b9babbbdbebfc0c3c4c7c8cacbcccdcfd0d1d3d6d7dadbdcdddee0e1e6e7e9eaebecedeeeff2f5f6f7fafbfdff,89:0001030405060708#090b0c0d0e0f1114151617181c1d1e1f20222324262728292c2d2e2f3132333537,9009766377297eda9774859b5b667a7496ea884052cb718f5faa65ec8be25bfb9a6f5de16b896c5b8b:adaf,900a8fc5538b62bc9e:262d,54404e2b82bd7259869c5d1688596daf96c554d14e9a8bb6710954bd960970df6df976d04e25781487125ca95ef68a00989c960e708e6cbf594463a9773c884d6f148273583071d5538c781a96c155015f6671305bb48c1a9a8c6b83592e9e2f79e76768626c4f6f75a17f8a6d0b96336c274ef075d2517b68376f3e908081705996747689:38393a3b3c3d3e3f40424345464748494a4b4c4d4e4f505152535455565758595a5b5c5d6061626364656768696a6b6c6d6e6f707172737475767778797a7c#7d7e808284858788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1,64475c2790657a918c2359da54ac8200836f898180006930564e8036723791ce51b64e5f987563964e1a53f666f3814b591c6db24e0058f9533b63d694f14f:9d0a,886398905937905779fb4eea80f075916c825b9c59e85f5d69058681501a5df24e5977e34ee5827a6291661390915c794ebf5f7981c69038808475ab4ea688d4610f6bc55fc64e4976ca6ea28b:e3ae,8c0a8bd15f027f:fccc,7ece83:356b,56e06bb797f3963459fb541f94f66deb5bc5996e5c395f15969089:a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c3cdd3d4d5d7d8d9dbdddfe0e1e2e4e7e8e9eaecedeef0f1f2f4f5f6f7f8f9fa#fbfcfdfeff,8a:01020304050608090a0b0c0d0e0f101112131415161718191a1b1c1d,537082f16a315a749e705e947f2883b984:2425,836787478fce8d6276c85f719896786c662054df62e54f6381c375c85eb896cd8e0a86f9548f6cf36d8c6c38607f52c775285e7d4f1860a05fe75c24753190ae94c072b96cb96e389149670953:cbf3,4f5191c98bf153c85e7c8fc26de44e8e76c26986865e611a82064f:59de,903e9c7c61096e:1d14,96854e885a3196e84e0e5c7f79b95b878bed7fbd738957df828b90c15401904755bb5cea5fa161086b3272f180b28a:891e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3f4041424344454647494a4b4c4d4e4f505152535455565758595a5b5c5d5e#5f606162636465666768696a6b6c6d6e6f7071727374757677787a7b7c7d7e7f80,6d745bd388d598848c6b9a6d9e336e0a51:a443,57a38881539f63f48f9556ed54585706733f6e907f188fdc82d1613f6028966266f07ea68d:8ac3,94a55cb37ca4670860a6960580184e9190e75300966851418fd08574915d665597f55b55531d78386742683d54c9707e5bb08f7d518d572854b1651266828d:5e43,810f846c906d7cdf51ff85fb67a365e96fa186a48e81566a90207682707671e58d2362e952196cfd8d3c600e589e618e66fe8d60624e55b36e23672d8f678a:81828384858687888b8c8d8e8f9091929495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2#c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3,94e195f87728680569a8548b4e4d70b88bc86458658b5b857a84503a5be877bb6be18a797c986cbe76cf65a98f975d2d5c5586386808536062187ad96e5b7efd6a1f7ae05f706f335f20638c6da867564e085e108d264ed780c07634969c62db662d627e6cbc8d7571677f695146808753ec906e629854f286f08f998005951785178fd96d5973cd659f771f7504782781fb8d1e94884fa6679575b98bca9707632f9547963584b8632377415f8172f04e896014657462ef6b63653f8a:e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,8b:0001020304050608090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20212223#24252728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445,5e2775c790d18bc1829d679d652f5431871877e580a281026c414e4b7ec7804c76f4690d6b966267503c4f84574063076b628dbe53ea65e87eb85fd763:1ab7,81:f3f4,7f6e5e1c5cd95236667a79e97a1a8d28709975d46ede6cbb7a924e2d76c55fe0949f88777ec879cd80bf91cd4ef24f17821f54685dde6d328bcc7ca58f7480985e1a549276b15b99663c9aa473e0682a86db6731732a8b:f8db,90107af970db716e62c477a956314e3b845767f152a986c08d2e94f87b518b:464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f6061626364656768696a6b6d6e6f707172737475767778797a7b7c7d7e7f80818283848586#8788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9facb1bbc7d0ea,8c:091e,4f4f6ce8795d9a7b6293722a62fd4e1378168f6c64b08d5a7bc668695e8488c55986649e58ee72b6690e95258ffd8d5857607f008c0651c6634962d95353684c74228301914c55447740707c6d4a517954a88d4459ff6ecb6dc45b5c7d2b4ed47c7d6ed35b5081ea6e0d5b579b0368d58e2a5b977efc603b7eb590b98d70594f63cd79df8db3535265cf79568bc5963b7ec494bb7e825634918967007f6a5c0a907566285de64f5067de505a4f5c57505e:a7#3$,8c:38393a3b3c3d3e3f4042434445484a4b4d4e4f5051525354565758595b5c5d5e5f60636465666768696c6d6e6f707172747576777b7c7d7e7f808183848687#888b8d8e8f90919293959697999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacad,4e:8d0c,51404e105eff53454e:15981e,9b325b6c56694e2879ba4e3f53154e47592d723b536e6c1056df80e499976bd3777e9f174e:369f,9f104e:5c6993,82885b5b556c560f4ec453:8d9da3a5ae,97658d5d53:1af5262e3e,8d5c53:6663,52:02080e2d333f404c5e615c,84af52:7d82819093,51827f544e:bbc3c9c2e8e1ebde,4f1b4ef34f:2264,4ef54f:2527092b5e67,65384f:5a5d,8c:aeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebec#edeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,8d:000102030405060708090a0b0c0d,4f:5f57323d76749189838f7e7baa7cac94e6e8eac5dae3dcd1dff8,50:294c,4ff350:2c0f2e2d,4ffe50:1c0c25287e4355484e6c7ba5a7a9bad6,510650:edece6ee,51:070b,4edd6c3d4f:5865ce,9fa06c467c74516e5dfd9ec999985181591452f9530d8a07531051eb591951554ea051564eb388:6ea4,4eb5811488d279805b3488037fb851:abb1bdbc,8d:0e0f101112131415161718191a1b1c205152575f6568696a6c6e6f717278797a7b7c7d7e7f808283868788898c8d8e8f90929395969798999a9b9c9d9ea0a1#a2a4a5a6a7a8a9aaabacadaeafb0b2b6b7b9bbbdc0c1c2c5c7c8c9cacdd0d2d3d4,51:c796a2a5,8b:a0a6a7aab4b5b7c2c3cbcfced2d3d4d6d8d9dcdfe0e4e8e9eef0f3f6f9fcff,8c:000204070c0f1112141516191b181d1f202125272a2b2e2f32333536,53:697a,96:1d2221312a3d3c4249545f676c7274888d97b0,90:979b9d99aca1b4b3b6ba,8d:d5d8d9dce0e1e2e5e6e7e9edeef0f1f2f4f6fcfeff,8e:00010203040607080b0d0e1011121315161718191a1b1c202124252627282b2d303233343637383b3c3e#3f4345464c4d4e4f505354555657585a5b5c5d5e5f60616263646567686a6b6e71,90:b8b0cfc5bed0c4c7d3e6e2dcd7dbebeffe,91:04221e23312f394346,520d594252:a2acadbe,54ff52:d0d6f0,53df71ee77cd5ef451:f5fc,9b2f53b65f01755a5def57:4ca9a1,58:7ebcc5d1,57:292c2a33392e2f5c3b4269856b867c7b686d7673ada48cb2cfa7b493a0d5d8dad9d2b8f4eff8e4dd,8e:73757778797a7b7d7e808283848688898a8b8c8d8e91929395969798999a9b9d9fa0a1a2a3a4a5a6a7a8a9aaadaeb0b1b3b4b5b6b7b8b9bbbcbdbebfc0c1c2#c3c4c5c6c7c8c9cacbcccdcfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4,58:0b0d,57:fded,58:001e194420656c81899a80,99a89f1961ff82:797d7f8f8aa8848e919799abb8beb0c8cae398b7aecbccc1a9b4a1aa9fc4cea4e1,830982:f7e4,83:0f07,82:dcf4d2d8,830c82:fbd3,83:111a061415,82:e0d5,83:1c515b5c08923c34319b5e2f4f47435f4017602d3a336665,8e:e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,8f:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20212223#2425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4041424344,83:681b696c6a6d6eb078b3b4a0aa939c857cb6a97db87b989ea8babcc1,840183:e5d8,580784:180b,83:ddfdd6,84:1c381106,83:d4df,84:0f03,83:f8f9eac5c0,842683:f0e1,84:5c515a597387887a89783c4669768c8e316dc1cdd0e6bdd3cabfbae0a1b9b497e5e3,850c750d853884f085:391f3a,8f:45464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f6061626364656a808c929da0a1a2a4a5a6a7aaacadaeafb2b3b4b5b7b8babbbcbfc0c3c6#c9cacbcccdcfd2d6d7dae0e1e3e7eceff1f2f4f5f6fafbfcfeff,90:07080c0e131518,85:563b,84:fffc,85:594868645e7a,77a285:43727ba4a8878f79ae9c85b9b7b0d3c1dcff,86:270529163c,5efe5f0859:3c41,803759:555a58,530f5c:22252c34,62:4c6a9fbbcadad7ee,632262f663:394b43adf6717a8eb46dac8a69aebcf2f8e0ffc4dece,645263:c6be,64:45410b1b200c26215e846d96,90:191c2324252728292a2b2c303132333437393a3d3f4043454648494a4b4c4e545556595a5c5d5e5f6061646667696a6b6c6f70717273767778797a7b7c7e81#84858687898a8c8d8e8f90929496989a9c9e9fa0a4a5a7a8a9abadb2b7bcbdbfc0,64:7ab7b899bac0d0d7e4e2,65:09252e,5f:0bd2,75195f1153:5ff1fde9e8fb,54:1216064b5253545643215759233282947771649a9b8476669dd0adc2b4d2a7a6d3d472a3d5bbbfccd9dadca9aaa4ddcfde,551b54e7552054fd551454f355:22230f11272a678fb5496d41553f503c,90:c2c3c6c8c9cbcccdd2d4d5d6d8d9dadedfe0e3e4e5e9eaeceef0f1f2f3f5f6f7f9fafbfcff,91:00010305060708090a0b0c0d0e0f1011121314151617181a1b1c#1d1f20212425262728292a2b2c2d2e30323334353637383a3b3c3d3e3f40414244,55:375675767733305c8bd283b1b988819f7ed6917bdfbdbe9499eaf7c9,561f55:d1ebecd4e6ddc4efe5f2f3cccde8f5e4,8f9456:1e080c012423,55fe56:00272d5839572c4d62595c4c548664716b7b7c8593afd4d7dde1f5ebf9ff,57:040a091c,5e:0f191411313b3c,91:454748515354555658595b5c5f606667686b6d737a7b7c808182838486888a8e8f939495969798999c9d9e9fa0a1a4a5a6a7a8a9abacb0b1b2b3b6b7b8b9bb#bcbdbebfc0c1c2c3c4c5c6c8cbd0d2d3d4d5d6d7d8d9dadbdddedfe0e1e2e3e4e5,5e:3744545b5e61,5c:8c7a8d9096889899919a9cb5a2bdacabb1a3c1b7c4d2e4cbe5,5d:020327262e241e061b583e343d6c5b6f5d6b4b4a697482999d,8c735d:b7c5,5f:73778287898c95999ca8adb5bc,88625f6172:adb0b4b7b8c3c1cecdd2e8efe9f2f4f7,730172f3730372fa91:e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,92:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324#25262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445,72fb73:1713210a1e1d152239252c3831504d57606c6f7e,821b592598e759:2402,99:636768696a6b6c74777d8084878a8d9091939495,5e:80918b96a5a0b9b5beb3,8d535e:d2d1dbe8ea,81ba5f:c4c9d6cf,60035fee60045f:e1e4fe,60:0506,5f:eaedf8,60:1935261b0f0d292b0a3f2178797b7a42,92:464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f7071727375767778797a7b7c7d7e7f808182838485#868788898a8b8c8d8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7,60:6a7d969aad9d83928c9becbbb1ddd8c6dab4,61:20261523,60f461:000e2b4a75ac94a7b7d4f5,5fdd96b395:e9ebf1f3f5f6fcfe,96:030406080a0b0c0d0f12151617191a,4e2c723f62156c:35545c4aa38590948c6869747686a9d0d4adf7f8f1d7b2e0d6faebeeb1d3effe,92:a8a9aaabacadafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8#e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,93:00010203040506070809,6d:39270c43480704190e2b4d2e351a4f525433916f9ea05e93945c607c63,6e1a6d:c7c5de,6e0e6d:bfe0,6e116d:e6ddd9,6e166dab6e0c6dae6e:2b6e4e6bb25f865354322544dfb198e0,6f2d6e:e2a5a7bdbbb7d7b4cf8fc29f,6f:6246472415,6ef96f:2f364b742a0929898d8c78727c7ad1,93:0a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3f40414243444546474849#4a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696b,6f:c9a7b9b6c2e1eedee0ef,70:1a231b39354f5e,5b:80849593a5b8,752f9a9e64345b:e4ee,89305bf08e478b078f:b6d3d5e5eee4e9e6f3e8,90:05040b26110d162135362d2f445152506858625b,66b990:747d8288838b,5f:50575658,5c3b54ab5c:5059,5b715c:6366,7fbc5f:2a292d,82745f3c9b3b5c6e59:81838da9aaa3,93:6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaab#acadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cbcccd,59:97caab9ea4d2b2afd7be,5a:0506,59dd5a0859:e3d8f9,5a:0c09323411231340674a553c6275,80ec5a:aa9b777abeebb2d2d4b8e0e3f1d6e6d8dc,5b:091716323740,5c:151c,5b:5a6573515362,9a:7577787a7f7d808185888a90929396989b9c9d9fa0a2a3a5a7,7e:9fa1a3a5a8a9,93:cecfd0d1d2d3d4d5d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,94:000102030405060708090a0b0c0d#0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e,7e:adb0bec0c1c2c9cbccd0d4d7dbe0e1e8ebeeeff1f2,7f0d7e:f6fafbfe,7f:01020307080b0c0f111217191c1b1f212223242526272a2b2c2d2f3031323335,5e7a757f5ddb753e909573:8e91aea29fcfc2d1b7b3c0c9c8e5d9,987c740a73:e9e7debaf2,74:0f2a5b262528302e2c,94:2f303132333435363738393a3b3c3d3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6c6d6e6f#707172737475767778797a7b7c7d7e7f8081828384919698c7cfd3d4dae6fb,95:1c20,74:1b1a415c575559776d7e9c8e8081878b9ea8a990a7d2ba,97:eaebec,67:4c535e4869a5876a7398a775a89ead8b777cf0,680967d8680a67:e9b0,680c67:d9b5dab3dd,680067:c3b8e2,680e67:c1fd,68:323360614e624464831d55664167403e4a4929b58f7477936bc2,696e68fc69:1f20,68f995:27333d43484b555a606e74757778797a7b7c7d7e808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aa#abacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacb,692468f069:0b0157,68e369:10713960425d846b80987834cc8788ce896663799ba7bbabadd4b1c1cadf95e08dff,6a2f69ed6a:171865,69f26a:443ea0505b358e793d28587c9190a997ab,73:3752,6b:8182878492938d9a9ba1aa,8f:6b6d71727375767877797a7c7e818284878b,95:cccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7ecff,96:0713181b1e20232425262728292b2c2d2f303738393a3e41434a4e4f5152535657#58595a5c5d5e606365666b6d6e6f70717378797a7b7c7d7e7f808182838487898a,8f:8d8e8f989a,8ece62:0b171b1f222125242c,81e774:eff4ff,75:0f1113,65:34eeeff0,66:0a19,677266:031500,708566:f71d34313635,800666:5f54414f56615777848ca79dbedbdce6e9,8d:3233363b3d4045464849474d5559,89:c7cacbcccecfd0d1,72:6e9f5d666f7e7f848b8d8f92,63:0832b0,96:8c8e91929395969a9b9d9e9fa0a1a2a3a4a5a6a8a9aaabacadaeafb1b2b4b5b7b8babbbfc2c3c8cacbd0d1d3d4d6d7d8d9dadbdcdddedfe1e2e3e4e5e6e7eb#ecedeef0f1f2f4f5f8fafbfcfdff,97:0203050a0b0c10111214151718191a1b1d1f20,64:3fd8,80046b:eaf3fdf5f9,6c:0507060d1518191a2129242a32,65:35556b,72:4d525630,8662521680:9f9c93bc,670a80:bdb1abadb4b7e7e8e9eadbc2c4d9cdd7,671080:ddebf1f4ed,81:0d0e,80:f2fc,671581128c5a81:361e2c1832484c5374595a7160697c7d6d67,584d5ab581:888291,6ed581:a3aacc,672681:cabb,97:2122232425262728292b2c2e2f3133343536373a3b3c3d3f404142434445464748494a4b4c4d4e4f5051545557585a5c5d5f63646667686a6b6c6d6e6f7071#72757778797a7b7d7e7f8081828384868788898a8c8e8f9093959697999a9b9c9d,81:c1a6,6b:243739434659,98:d1d2d3d5d9da,6bb35f406bc289f365909f5165:93bcc6c4c3ccced2d6,70:809c969dbbc0b7abb1e8ca,71:1013162f31735c6845724a787a98b3b5a8a0e0d4e7f9,72:1d28,706c71:1866b9,62:3e3d434849,79:3b4046495b5c535a6257606f677a858a9aa7b3,5f:d1d0,97:9e9fa1a2a4a5a6a7a8a9aaacaeb0b1b3b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3#e4e5e8eeeff0f1f2f4f7f8f9fafbfcfdfeff,98:000102030405060708090a0b0c0d0e,60:3c5d5a67415963ab,61:060d5da99dcbd1,620680:807f,6c:93f6,6dfc77:f6f8,78:0009171811,65ab78:2d1c1d393a3b1f3c252c23294e6d56572650474c6a9b939a879ca1a3b2b9a5d4d9c9ecf2,790578f479:13241e34,9f9b9e:f9fbfc,76f177:040d,76f977:07081a22192d263538505147435a68,98:0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d#4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e,77:62657f8d7d808c919fa0b0b5bd,75:3a404e4b485b727983,7f:58615f,8a487f:68747179817e,76:cde5,883294:8586878b8a8c8d8f909497959a9b9ca3a4abaaadacafb0b2b4b6b7b8b9babcbdbfc4c8c9cacbcccdced0d1d2d5d6d7d9d8dbdedfe0e2e4e5e7e8ea,98:6f70717273748b8e929599a3a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcfd0d4d6d7dbdcdde0e1e2e3e4#e5e6e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,99:0001020304050607,94:e9ebeeeff3f4f5f7f9fcfdff,95:03020607090a0d0e0f1213141516181b1d1e1f222a2b292c3132343637383c3e3f4235444546494c4e4f525354565758595b5e5f5d61626465666768696a6b6c6f7172733a,77:e7ec,96c979:d5ede3eb,7a065d477a:03021e14,99:08090a0b0c0e0f1112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2f303132333435363738393a3b3c3d3e3f40414243444546474849#4a4b4c4d4e4f50515253565758595a5b5c5d5e5f60616264667378797b7e828389,7a:393751,9ecf99a57a7076:888e9399a4,74:dee0,752c9e:202228292a2b2c3231363837393a3e414244464748494b4c4e5155575a5b5c5e63666768696a6b6c716d73,75:929496a09daca3b3b4b8c4b1b0c3c2d6cde3e8e6e4ebe7,760375:f1fcff,76:1000050c170a25181519,99:8c8e9a9b9c9d9e9fa0a1a2a3a4a6a7a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8#d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9,76:1b3c2220402d303f35433e334d5e545c566b6f,7fca7a:e6787980868895a6a0aca8adb3,88:6469727d7f82a2c6b7bcc9e2cee3e5f1,891a88:fce8fef0,89:2119131b0a342b3641667b,758b80e576:b2b4,77dc80:1214161c20222526272928310b3543464d526971,898398:788083,99:fafbfcfdfeff,9a:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738#393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f50515253545556575859,98:898c8d8f949a9b9e9fa1a2a5a6,86:4d546c6e7f7a7c7ba88d8bac9da7a3aa93a9b6c4b5ceb0bab1afc9cfb4e9f1f2edf3d0,871386:def4dfd8d1,87:0307,86f887:080a0d09233b1e252e1a3e48343129373f82227d7e7b60704c6e8b53637c64596593afa8d2,9a:5a5b5c5d5e5f606162636465666768696a6b7283898d8e949599a6a9aaabacadaeafb2b3b4b5b9bbbdbebfc3c4c6c7c8c9cacdcecfd0d2d4d5d6d7d9dadbdc#dddee0e2e3e4e5e7e8e9eaeceef0f1f2f3f4f5f6f7f8fafcfdfeff,9b:000102040506,87:c68885ad9783abe5acb5b3cbd3bdd1c0cadbeae0ee,88:1613,87fe88:0a1b21393c,7f:36424445,82107a:fafd,7b:080304150a2b0f47382a192e31202524333e1e585a45754c5d606e7b62727190a6a7b8ac9da885aa9ca2abb4d1c1ccdddae5e6ea,7c0c7b:fefc,7c:0f160b,9b:07090a0b0c0d0e1011121415161718191a1b1c1d1e2021222425262728292a2b2c2d2e3031333435363738393a3d3e3f40464a4b4c4e50525355565758595a#5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b,7c:1f2a26384140,81fe82:010204,81ec884482:2122232d2f282b383b33343e44494b4f5a5f68,88:7e8588d8df,895e7f:9d9fa7afb0b2,7c7c65497c:919d9c9ea2b2bcbdc1c7cccdc8c5d7e8,826e66a87f:bfced5e5e1e6e9eef3,7cf87d:77a6ae,7e:479b,9e:b8b4,8d:73849491b1676d,8c:4749,91:4a504e4f64,9b:7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9ba#bbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadb,91:626170696f7d7e7274798c85908d91a2a3aaadaeafb5b4ba,8c559e7e8d:b8eb,8e:055969,8d:b5bfbcbac4d6d7dadececfdbc6ecf7f8e3f9fbe4,8e098dfd8e:141d1f2c2e232f3a4039353d3149414251524a70767c6f74858f94909c9e,8c:78828a859894,659b89:d6dedadc,9b:dcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,9c:000102030405060708090a0b0c0d0e0f101112131415161718191a#1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b,89:e5ebef,8a3e8b26975396:e9f3ef,97:0601080f0e2a2d303e,9f:808385868788898a8c,9efe9f:0b0d,96:b9bcbdced2,77bf96e092:8eaec8,93:3e6aca8f,94:3e6b,9c:7f8285868788,7a239c:8b8e90919294959a9b9e9fa0a1a2a3a5a6a7a8a9abadaeb0b1b2b3b4b5b6b7babbbcbdc4c5c6c7cacb3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a#7b7d7e808384898a8c8f93969798999daaacafb9bebfc0c1c2c8c9d1d2dadbe0e1cccdcecfd0d3d4d5d7d8d9dcdddfe2,97:7c85919294afaba3b2b4,9a:b1b0b7,9e589a:b6babcc1c0c5c2cbccd1,9b:45434749484d51,98e899:0d2e5554,9a:dfe1e6efebfbedf9,9b:080f131f23,9e:bdbe,7e3b9e:8287888b92,93d69e:9d9fdbdcdde0dfe2e9e7e5eaef,9f:222c2f39373d3e44,9c:e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,9d:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021#22232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142#92$434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f8081#82838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2#92$a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1#e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff,9e:000102#92$030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e24272e30343b3c404d5052535456595d5f606162656e6f727475767778797a7b7c7d80#8183848586898a8c8d8e8f90919495969798999a9b9c9ea0a1a2a3a4a5a7a8a9aa#92$abacadaeafb0b1b2b3b5b6b7b9babcbfc0c1c2c3c5c6c7c8cacbccd0d2d3d5d6d7d9dadee1e3e4e6e8ebecedeef0f1f2f3f4f5f6f7f8fafdff,9f:000102030405#060708090a0c0f1112141516181a1b1c1d1e1f21232425262728292a2b2d2e3031#92$3233343536383a3c3f4041424345464748494a4b4c4d4e4f52535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778#797a7b7c7d7e81828d8e8f9091929394959697989c9d9ea1a2a3a4a5,f9:2c7995e7f1#92$,fa:0c0d0e0f111314181f20212324272829,e8:15161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40414243#4445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f6061626364"), U2Ghash = {}, G2Uhash = {};
- !function(data) {
+ (function(data) {
var k = 0;
data = data.match(/..../g);
- for (var i = 129; i <= 254; i++) {
- for (var j = 64; j <= 254; j++) {
- U2Ghash[data[k++]] = ("%" + i.toString(16) + "%" + j.toString(16)).toUpperCase();
- }
- }
- for (var key in U2Ghash) {
- G2Uhash[U2Ghash[key]] = key;
- }
- }(data);
+ for (var i = 129; i <= 254; i++) for (var j = 64; j <= 254; j++) U2Ghash[data[k++]] = ("%" + i.toString(16) + "%" + j.toString(16)).toUpperCase();
+ for (var key in U2Ghash) G2Uhash[U2Ghash[key]] = key;
+ })(data);
function isAscii(unicode) {
return unicode == 8364 || unicode <= 127 && unicode >= 0;
}
@@ -8626,9 +8024,8 @@ var require_gb18030 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
encode: function(str) {
return str.replace(/./g, function(a) {
var code = a.charCodeAt(0);
- if (isAscii(code)) {
- return encodeURIComponent(a);
- } else {
+ if (isAscii(code)) return encodeURIComponent(a);
+ else {
var key = code.toString(16);
if (key.length != 4) key = ("000" + key).match(/....$/)[0];
return U2Ghash[key] || a;
@@ -8637,11 +8034,8 @@ var require_gb18030 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
decode: function(str) {
return str.replace(/%[0-9A-F]{2}%[0-9A-F]{2}/g, function(a) {
- if (a in G2Uhash) {
- return String.fromCharCode("0x" + G2Uhash[a]);
- } else {
- return a;
- }
+ if (a in G2Uhash) return String.fromCharCode("0x" + G2Uhash[a]);
+ else return a;
}).replace(/%[\w]{2}/g, function(a) {
return decodeURIComponent(a);
});
@@ -8649,7 +8043,6 @@ var require_gb18030 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
});
}));
-
//#endregion
//#region ../libs_drpy/_dist/node-rsa.js
var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -8665,21 +8058,21 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* - 支持多种密钥格式(PEM、DER等)
* - ASN.1编码解码支持
*/
- /*! For license information please see node-rsa.bundle.js.LICENSE.txt */ !function(t, e) {
+ /*! For license information please see node-rsa.bundle.js.LICENSE.txt */ (function(t, e) {
"object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.NODERSA = e() : t.NODERSA = e();
- }(globalThis, (() => (() => {
+ })(globalThis, (() => (() => {
var t = {
6395: (t) => {
t.exports = { newInvalidAsn1Error: function(t) {
- var e = new Error();
+ var e = /* @__PURE__ */ new Error();
return e.name = "InvalidAsn1Error", e.message = t || "", e;
} };
},
5670: (t, e, r) => {
- var n = r(6395), i = r(6299), o = r(3319), s = r(1431);
+ var n = r(6395), i = r(6299);
for (var a in t.exports = {
- Reader: o,
- Writer: s
+ Reader: r(3319),
+ Writer: r(1431)
}, i) i.hasOwnProperty(a) && (t.exports[a] = i[a]);
for (var f in n) n.hasOwnProperty(f) && (t.exports[f] = n[f]);
},
@@ -8809,8 +8202,8 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
growthFactor: 8
};
function f(t) {
- var e, r;
- e = a, r = t || {}, n.ok(e), n.equal(typeof e, "object"), n.ok(r), n.equal(typeof r, "object"), Object.getOwnPropertyNames(e).forEach((function(t) {
+ var e = a, r = t || {};
+ n.ok(e), n.equal(typeof e, "object"), n.ok(r), n.equal(typeof r, "object"), Object.getOwnPropertyNames(e).forEach((function(t) {
if (!r[t]) {
var n = Object.getOwnPropertyDescriptor(e, t);
Object.defineProperty(r, t, n);
@@ -8857,9 +8250,9 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if ("number" != typeof e && (e = o.OID), !/^([0-9]+\.){3,}[0-9]+$/.test(t)) throw new Error("argument is not a valid OID string");
var r = t.split("."), n = [];
n.push(40 * parseInt(r[0], 10) + parseInt(r[1], 10)), r.slice(2).forEach((function(t) {
- !function(t, e) {
+ (function(t, e) {
e < 128 ? t.push(e) : e < 16384 ? (t.push(e >>> 7 | 128), t.push(127 & e)) : e < 2097152 ? (t.push(e >>> 14 | 128), t.push(e >>> 7 & 255 | 128), t.push(127 & e)) : e < 268435456 ? (t.push(e >>> 21 | 128), t.push(e >>> 14 & 255 | 128), t.push(e >>> 7 & 255 | 128), t.push(127 & e)) : (t.push(e >>> 28 & 255 | 128), t.push(e >>> 21 & 255 | 128), t.push(e >>> 14 & 255 | 128), t.push(e >>> 7 & 255 | 128), t.push(127 & e));
- }(n, parseInt(t, 10));
+ })(n, parseInt(t, 10));
}));
var i = this;
this._ensure(2 + n.length), this.writeByte(e), this.writeLength(n.length), n.forEach((function(t) {
@@ -9012,7 +8405,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var e = t.stackStartFunction || v;
if (Error.captureStackTrace) Error.captureStackTrace(this, e);
else {
- var r = new Error();
+ var r = /* @__PURE__ */ new Error();
if (r.stack) {
var n = r.stack, i = y(e), o = n.indexOf("\n" + i);
if (o >= 0) {
@@ -9286,7 +8679,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
e.log = function() {
var t, r;
console.log("%s - %s", (r = [
- B((t = new Date()).getHours()),
+ B((t = /* @__PURE__ */ new Date()).getHours()),
B(t.getMinutes()),
B(t.getSeconds())
].join(":"), [
@@ -9870,7 +9263,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var C = /[^+/0-9A-Za-z-_]/g;
function U(t, e) {
var r;
- e = e || 1 / 0;
+ e = e || Infinity;
for (var n = t.length, i = null, o = [], s = 0; s < n; ++s) {
if ((r = t.charCodeAt(s)) > 55295 && r < 57344) {
if (!i) {
@@ -9939,8 +9332,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var n = r(6743), i = r(453), o = r(6897), s = r(9675), a = i("%Function.prototype.apply%"), f = i("%Function.prototype.call%"), u = i("%Reflect.apply%", !0) || n.call(f, a), c = r(655), h = i("%Math.max%");
t.exports = function(t) {
if ("function" != typeof t) throw new s("a function is required");
- var e = u(n, f, arguments);
- return o(e, 1 + h(0, t.length - (arguments.length - 1)), !0);
+ return o(u(n, f, arguments), 1 + h(0, t.length - (arguments.length - 1)), !0);
};
var p = function() {
return u(n, a, arguments);
@@ -9951,7 +9343,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var n;
t.exports = (n = r(9021), r(754), r(4636), r(9506), r(7165), function() {
var t = n, e = t.lib.BlockCipher, r = t.algo, i = [], o = [], s = [], a = [], f = [], u = [], c = [], h = [], p = [], l = [];
- !function() {
+ (function() {
for (var t = [], e = 0; e < 256; e++) t[e] = e < 128 ? e << 1 : e << 1 ^ 283;
var r = 0, n = 0;
for (e = 0; e < 256; e++) {
@@ -9960,7 +9352,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var g = t[r], d = t[g], v = t[d], m = 257 * t[y] ^ 16843008 * y;
s[r] = m << 24 | m >>> 8, a[r] = m << 16 | m >>> 16, f[r] = m << 8 | m >>> 24, u[r] = m, m = 16843009 * v ^ 65537 * d ^ 257 * g ^ 16843008 * r, c[y] = m << 24 | m >>> 8, h[y] = m << 16 | m >>> 16, p[y] = m << 8 | m >>> 24, l[y] = m, r ? (r = g ^ t[t[t[v ^ g]]], n ^= t[t[n]]) : r = n = 1;
}
- }();
+ })();
var y = [
0,
1,
@@ -10479,9 +9871,9 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var n;
t.exports = (n = r(9021), function(t) {
var e = n, r = e.lib, i = r.WordArray, o = r.Hasher, s = e.algo, a = [];
- !function() {
+ (function() {
for (var e = 0; e < 64; e++) a[e] = 4294967296 * t.abs(t.sin(e + 1)) | 0;
- }();
+ })();
var f = s.MD5 = o.extend({
_doReset: function() {
this._hash = new i.init([
@@ -10568,7 +9960,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
return t;
}
- var r = t.Encryptor = t.extend({ processBlock: function(t, r) {
+ return t.Decryptor = t.Encryptor = t.extend({ processBlock: function(t, r) {
var n = this._cipher, i = n.blockSize, o = this._iv, s = this._counter;
o && (s = this._counter = o.slice(0), this._iv = void 0), function(t) {
0 === (t[0] = e(t[0])) && (t[1] = e(t[1]));
@@ -10576,8 +9968,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var a = s.slice(0);
n.encryptBlock(a, 0);
for (var f = 0; f < i; f++) t[r + f] ^= a[f];
- } });
- return t.Decryptor = r, t;
+ } }), t;
}(), n.mode.CTRGladman);
},
6939: function(t, e, r) {
@@ -10733,8 +10124,8 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function f() {
for (var t = this._X, e = this._C, r = 0; r < 8; r++) o[r] = e[r];
for (e[0] = e[0] + 1295307597 + this._b | 0, e[1] = e[1] + 3545052371 + (e[0] >>> 0 < o[0] >>> 0 ? 1 : 0) | 0, e[2] = e[2] + 886263092 + (e[1] >>> 0 < o[1] >>> 0 ? 1 : 0) | 0, e[3] = e[3] + 1295307597 + (e[2] >>> 0 < o[2] >>> 0 ? 1 : 0) | 0, e[4] = e[4] + 3545052371 + (e[3] >>> 0 < o[3] >>> 0 ? 1 : 0) | 0, e[5] = e[5] + 886263092 + (e[4] >>> 0 < o[4] >>> 0 ? 1 : 0) | 0, e[6] = e[6] + 1295307597 + (e[5] >>> 0 < o[5] >>> 0 ? 1 : 0) | 0, e[7] = e[7] + 3545052371 + (e[6] >>> 0 < o[6] >>> 0 ? 1 : 0) | 0, this._b = e[7] >>> 0 < o[7] >>> 0 ? 1 : 0, r = 0; r < 8; r++) {
- var n = t[r] + e[r], i = 65535 & n, a = n >>> 16, f = ((i * i >>> 17) + i * a >>> 15) + a * a, u = ((4294901760 & n) * n | 0) + ((65535 & n) * n | 0);
- s[r] = f ^ u;
+ var n = t[r] + e[r], i = 65535 & n, a = n >>> 16;
+ s[r] = ((i * i >>> 17) + i * a >>> 15) + a * a ^ ((4294901760 & n) * n | 0) + ((65535 & n) * n | 0);
}
t[0] = s[0] + (s[7] << 16 | s[7] >>> 16) + (s[6] << 16 | s[6] >>> 16) | 0, t[1] = s[1] + (s[0] << 8 | s[0] >>> 24) + s[7] | 0, t[2] = s[2] + (s[1] << 16 | s[1] >>> 16) + (s[0] << 16 | s[0] >>> 16) | 0, t[3] = s[3] + (s[2] << 8 | s[2] >>> 24) + s[1] | 0, t[4] = s[4] + (s[3] << 16 | s[3] >>> 16) + (s[2] << 16 | s[2] >>> 16) | 0, t[5] = s[5] + (s[4] << 8 | s[4] >>> 24) + s[3] | 0, t[6] = s[6] + (s[5] << 16 | s[5] >>> 16) + (s[4] << 16 | s[4] >>> 16) | 0, t[7] = s[7] + (s[6] << 8 | s[6] >>> 24) + s[5] | 0;
}
@@ -10784,8 +10175,8 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function f() {
for (var t = this._X, e = this._C, r = 0; r < 8; r++) o[r] = e[r];
for (e[0] = e[0] + 1295307597 + this._b | 0, e[1] = e[1] + 3545052371 + (e[0] >>> 0 < o[0] >>> 0 ? 1 : 0) | 0, e[2] = e[2] + 886263092 + (e[1] >>> 0 < o[1] >>> 0 ? 1 : 0) | 0, e[3] = e[3] + 1295307597 + (e[2] >>> 0 < o[2] >>> 0 ? 1 : 0) | 0, e[4] = e[4] + 3545052371 + (e[3] >>> 0 < o[3] >>> 0 ? 1 : 0) | 0, e[5] = e[5] + 886263092 + (e[4] >>> 0 < o[4] >>> 0 ? 1 : 0) | 0, e[6] = e[6] + 1295307597 + (e[5] >>> 0 < o[5] >>> 0 ? 1 : 0) | 0, e[7] = e[7] + 3545052371 + (e[6] >>> 0 < o[6] >>> 0 ? 1 : 0) | 0, this._b = e[7] >>> 0 < o[7] >>> 0 ? 1 : 0, r = 0; r < 8; r++) {
- var n = t[r] + e[r], i = 65535 & n, a = n >>> 16, f = ((i * i >>> 17) + i * a >>> 15) + a * a, u = ((4294901760 & n) * n | 0) + ((65535 & n) * n | 0);
- s[r] = f ^ u;
+ var n = t[r] + e[r], i = 65535 & n, a = n >>> 16;
+ s[r] = ((i * i >>> 17) + i * a >>> 15) + a * a ^ ((4294901760 & n) * n | 0) + ((65535 & n) * n | 0);
}
t[0] = s[0] + (s[7] << 16 | s[7] >>> 16) + (s[6] << 16 | s[6] >>> 16) | 0, t[1] = s[1] + (s[0] << 8 | s[0] >>> 24) + s[7] | 0, t[2] = s[2] + (s[1] << 16 | s[1] >>> 16) + (s[0] << 16 | s[0] >>> 16) | 0, t[3] = s[3] + (s[2] << 8 | s[2] >>> 24) + s[1] | 0, t[4] = s[4] + (s[3] << 16 | s[3] >>> 16) + (s[2] << 16 | s[2] >>> 16) | 0, t[5] = s[5] + (s[4] << 8 | s[4] >>> 24) + s[3] | 0, t[6] = s[6] + (s[5] << 16 | s[5] >>> 16) + (s[4] << 16 | s[4] >>> 16) | 0, t[7] = s[7] + (s[6] << 8 | s[6] >>> 24) + s[5] | 0;
}
@@ -11284,7 +10675,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var n;
t.exports = (n = r(9021), function(t) {
var e = n, r = e.lib, i = r.WordArray, o = r.Hasher, s = e.algo, a = [], f = [];
- !function() {
+ (function() {
function e(e) {
for (var r = t.sqrt(e), n = 2; n <= r; n++) if (!(e % n)) return !1;
return !0;
@@ -11293,7 +10684,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return 4294967296 * (t - (0 | t)) | 0;
}
for (var n = 2, i = 0; i < 64;) e(n) && (i < 8 && (a[i] = r(t.pow(n, .5))), f[i] = r(t.pow(n, 1 / 3)), i++), n++;
- }();
+ })();
var u = [], c = s.SHA256 = o.extend({
_doReset: function() {
this._hash = new i.init(a.slice(0));
@@ -11326,7 +10717,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var n;
t.exports = (n = r(9021), r(3240), function(t) {
var e = n, r = e.lib, i = r.WordArray, o = r.Hasher, s = e.x64.Word, a = e.algo, f = [], u = [], c = [];
- !function() {
+ (function() {
for (var t = 1, e = 0, r = 0; r < 24; r++) {
f[t + 5 * e] = (r + 1) * (r + 2) / 2 % 64;
var n = (2 * t + 3 * e) % 5;
@@ -11343,11 +10734,11 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
c[o] = s.create(a, h);
}
- }();
+ })();
var h = [];
- !function() {
+ (function() {
for (var t = 0; t < 25; t++) h[t] = s.create();
- }();
+ })();
var p = a.SHA3 = o.extend({
cfg: o.cfg.extend({ outputLength: 512 }),
_doReset: function() {
@@ -11512,9 +10903,9 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
a(1607167915, 987167468),
a(1816402316, 1246189591)
], u = [];
- !function() {
+ (function() {
for (var t = 0; t < 80; t++) u[t] = a();
- }();
+ })();
var c = s.SHA512 = e.extend({
_doReset: function() {
this._hash = new o.init([
@@ -12460,7 +11851,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"%IteratorPrototype%": d && m ? m(m([][Symbol.iterator]())) : n,
"%JSON%": "object" == typeof JSON ? JSON : n,
"%Map%": "undefined" == typeof Map ? n : Map,
- "%MapIteratorPrototype%": "undefined" != typeof Map && d && m ? m(new Map()[Symbol.iterator]()) : n,
+ "%MapIteratorPrototype%": "undefined" != typeof Map && d && m ? m((/* @__PURE__ */ new Map())[Symbol.iterator]()) : n,
"%Math%": Math,
"%Number%": Number,
"%Object%": Object,
@@ -12473,7 +11864,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"%Reflect%": "undefined" == typeof Reflect ? n : Reflect,
"%RegExp%": RegExp,
"%Set%": "undefined" == typeof Set ? n : Set,
- "%SetIteratorPrototype%": "undefined" != typeof Set && d && m ? m(new Set()[Symbol.iterator]()) : n,
+ "%SetIteratorPrototype%": "undefined" != typeof Set && d && m ? m((/* @__PURE__ */ new Set())[Symbol.iterator]()) : n,
"%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? n : SharedArrayBuffer,
"%String%": String,
"%StringIteratorPrototype%": d && m ? m(""[Symbol.iterator]()) : n,
@@ -12494,8 +11885,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (m) try {
null.error;
} catch (t) {
- var E = m(m(t));
- b["%Error.prototype%"] = E;
+ b["%Error.prototype%"] = m(m(t));
}
var w = function t(e) {
var r;
@@ -12710,8 +12100,8 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
9957: (t, e, r) => {
"use strict";
- var n = Function.prototype.call, i = Object.prototype.hasOwnProperty, o = r(6743);
- t.exports = o.call(n, i);
+ var n = Function.prototype.call, i = Object.prototype.hasOwnProperty;
+ t.exports = r(6743).call(n, i);
},
251: (t, e) => {
e.read = function(t, e, r, n, i) {
@@ -12720,13 +12110,13 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (s = o & (1 << -c) - 1, o >>= -c, c += n; c > 0; s = 256 * s + t[e + h], h += p, c -= 8);
if (0 === o) o = 1 - u;
else {
- if (o === f) return s ? NaN : 1 / 0 * (l ? -1 : 1);
+ if (o === f) return s ? NaN : Infinity * (l ? -1 : 1);
s += Math.pow(2, n), o -= u;
}
return (l ? -1 : 1) * s * Math.pow(2, o - n);
}, e.write = function(t, e, r, n, i, o) {
var s, a, f, u = 8 * o - i - 1, c = (1 << u) - 1, h = c >> 1, p = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, l = n ? 0 : o - 1, y = n ? 1 : -1, g = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0;
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0, s = c) : (s = Math.floor(Math.log(e) / Math.LN2), e * (f = Math.pow(2, -s)) < 1 && (s--, f *= 2), (e += s + h >= 1 ? p / f : p * Math.pow(2, 1 - h)) * f >= 2 && (s++, f /= 2), s + h >= c ? (a = 0, s = c) : s + h >= 1 ? (a = (e * f - 1) * Math.pow(2, i), s += h) : (a = e * Math.pow(2, h - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + l] = 255 & a, l += y, a /= 256, i -= 8);
+ for (e = Math.abs(e), isNaN(e) || e === Infinity ? (a = isNaN(e) ? 1 : 0, s = c) : (s = Math.floor(Math.log(e) / Math.LN2), e * (f = Math.pow(2, -s)) < 1 && (s--, f *= 2), (e += s + h >= 1 ? p / f : p * Math.pow(2, 1 - h)) * f >= 2 && (s++, f /= 2), s + h >= c ? (a = 0, s = c) : s + h >= 1 ? (a = (e * f - 1) * Math.pow(2, i), s += h) : (a = e * Math.pow(2, h - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + l] = 255 & a, l += y, a /= 256, i -= 8);
for (s = s << i | a, u += i; u > 0; t[r + l] = 255 & s, l += y, s /= 256, u -= 8);
t[r + l - y] |= 128 * g;
};
@@ -13077,7 +12467,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
v.write("openssh-key-v1", "utf8"), v.writeUInt8(0, 14), m.off += 15, c(m, n.from("none")), c(m, n.from("none")), c(m, n.from("")), m.off = m.buf.writeUInt32BE(1, m.off), m.off = m.buf.writeUInt32BE(y, m.off), c(m, n.from("ssh-rsa")), c(m, i), c(m, r), m.off = m.buf.writeUInt32BE(d - 47 - y, m.off), m.off += 8, c(m, n.from("ssh-rsa")), c(m, r), c(m, i), c(m, s), c(m, u), c(m, h), c(m, p), c(m, l);
let S = 1;
for (; m.off < d;) m.off = m.buf.writeUInt8(S++, m.off);
- return "der" === e.type ? m.buf : a + "\n" + o.linebrk(v.toString("base64"), 70) + "\n" + f + "\n";
+ return "der" === e.type ? m.buf : a + "\n" + o.linebrk(v.toString("base64"), 70) + "\n-----END OPENSSH PRIVATE KEY-----\n";
},
privateImport: function(t, e, r) {
var c;
@@ -13148,7 +12538,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
privateExport: function(t, e) {
e = e || {};
var r = t.n.toBuffer(), n = t.d.toBuffer(), o = t.p.toBuffer(), u = t.q.toBuffer(), c = t.dmp1.toBuffer(), h = t.dmq1.toBuffer(), p = t.coeff.toBuffer(), l = r.length + n.length + o.length + u.length + c.length + h.length + p.length + 512, y = new i.Writer({ size: l });
- return y.startSequence(), y.writeInt(0), y.writeBuffer(r, 2), y.writeInt(t.e), y.writeBuffer(n, 2), y.writeBuffer(o, 2), y.writeBuffer(u, 2), y.writeBuffer(c, 2), y.writeBuffer(h, 2), y.writeBuffer(p, 2), y.endSequence(), "der" === e.type ? y.buffer : a + "\n" + s.linebrk(y.buffer.toString("base64"), 64) + "\n" + f;
+ return y.startSequence(), y.writeInt(0), y.writeBuffer(r, 2), y.writeInt(t.e), y.writeBuffer(n, 2), y.writeBuffer(o, 2), y.writeBuffer(u, 2), y.writeBuffer(c, 2), y.writeBuffer(h, 2), y.writeBuffer(p, 2), y.endSequence(), "der" === e.type ? y.buffer : a + "\n" + s.linebrk(y.buffer.toString("base64"), 64) + "\n-----END RSA PRIVATE KEY-----";
},
privateImport: function(t, e, r) {
var u;
@@ -13166,7 +12556,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
publicExport: function(t, e) {
e = e || {};
var r = t.n.toBuffer(), n = r.length + 512, o = new i.Writer({ size: n });
- return o.startSequence(), o.writeBuffer(r, 2), o.writeInt(t.e), o.endSequence(), "der" === e.type ? o.buffer : u + "\n" + s.linebrk(o.buffer.toString("base64"), 64) + "\n" + c;
+ return o.startSequence(), o.writeBuffer(r, 2), o.writeInt(t.e), o.endSequence(), "der" === e.type ? o.buffer : u + "\n" + s.linebrk(o.buffer.toString("base64"), 64) + "\n-----END RSA PUBLIC KEY-----";
},
publicImport: function(t, e, r) {
var a;
@@ -13196,7 +12586,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var r = t.n.toBuffer(), n = t.d.toBuffer(), o = t.p.toBuffer(), c = t.q.toBuffer(), h = t.dmp1.toBuffer(), p = t.dmq1.toBuffer(), l = t.coeff.toBuffer(), y = r.length + n.length + o.length + c.length + h.length + p.length + l.length + 512, g = new i.Writer({ size: y });
g.startSequence(), g.writeInt(0), g.writeBuffer(r, 2), g.writeInt(t.e), g.writeBuffer(n, 2), g.writeBuffer(o, 2), g.writeBuffer(c, 2), g.writeBuffer(h, 2), g.writeBuffer(p, 2), g.writeBuffer(l, 2), g.endSequence();
var d = new i.Writer({ size: y });
- return d.startSequence(), d.writeInt(0), d.startSequence(), d.writeOID(s), d.writeNull(), d.endSequence(), d.writeBuffer(g.buffer, 4), d.endSequence(), "der" === e.type ? d.buffer : f + "\n" + a.linebrk(d.buffer.toString("base64"), 64) + "\n" + u;
+ return d.startSequence(), d.writeInt(0), d.startSequence(), d.writeOID(s), d.writeNull(), d.endSequence(), d.writeBuffer(g.buffer, 4), d.endSequence(), "der" === e.type ? d.buffer : f + "\n" + a.linebrk(d.buffer.toString("base64"), 64) + "\n-----END PRIVATE KEY-----";
},
privateImport: function(t, e, r) {
var c;
@@ -13218,7 +12608,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var r = t.n.toBuffer(), n = r.length + 512, o = new i.Writer({ size: n });
o.writeByte(0), o.startSequence(), o.writeBuffer(r, 2), o.writeInt(t.e), o.endSequence();
var f = new i.Writer({ size: n });
- return f.startSequence(), f.startSequence(), f.writeOID(s), f.writeNull(), f.endSequence(), f.writeBuffer(o.buffer, 3), f.endSequence(), "der" === e.type ? f.buffer : c + "\n" + a.linebrk(f.buffer.toString("base64"), 64) + "\n" + h;
+ return f.startSequence(), f.startSequence(), f.writeOID(s), f.writeNull(), f.endSequence(), f.writeBuffer(o.buffer, 3), f.endSequence(), "der" === e.type ? f.buffer : c + "\n" + a.linebrk(f.buffer.toString("base64"), 64) + "\n-----END PUBLIC KEY-----";
},
publicImport: function(t, e, r) {
var f;
@@ -13551,7 +12941,9 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case 256:
n = 8;
break;
- default: return void this.fromRadix(t, e);
+ default:
+ this.fromRadix(t, e);
+ return;
}
this.t = 0, this.s = 0;
for (var i = t.length, o = !1, a = 0; --i >= 0;) {
@@ -14204,7 +13596,6 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return r + t.substring(n, t.length);
}, t.exports.detectEnvironment = function() {
return "browser";
- "undefined" == typeof window || !window || n && "node" === n.title ? "node" : "browser";
}, t.exports.get32IntFromBuffer = function(t, e) {
var r;
if (e = e || 0, (r = t.length - e) > 0) {
@@ -14314,15 +13705,13 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return o(t);
} : r(8875), a = Object.keys;
s.shim = function() {
- if (Object.keys) {
- var t = function() {
- var t = Object.keys(arguments);
- return t && t.length === arguments.length;
- }(1, 2);
- t || (Object.keys = function(t) {
- return i(t) ? a(n.call(t)) : a(t);
- });
- } else Object.keys = s;
+ if (Object.keys) (function() {
+ var t = Object.keys(arguments);
+ return t && t.length === arguments.length;
+ })(1, 2) || (Object.keys = function(t) {
+ return i(t) ? a(n.call(t)) : a(t);
+ });
+ else Object.keys = s;
return Object.keys || s;
}, t.exports = s;
},
@@ -14349,10 +13738,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
for (var d = 0; d < h.length; ++d) {
var v = h[d];
- if (f(c, v)) {
- var m = c[v];
- r[v] = m;
- }
+ if (f(c, v)) r[v] = c[v];
}
}
return r;
@@ -14401,7 +13787,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
}
- !function() {
+ (function() {
try {
e = "function" == typeof setTimeout ? setTimeout : i;
} catch (t) {
@@ -14412,7 +13798,7 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} catch (t) {
r = o;
}
- }();
+ })();
var a, f = [], u = !1, c = -1;
function h() {
u && a && (u = !1, a.length ? f = a.concat(f) : c = -1, f.length && p());
@@ -14497,7 +13883,8 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
},
3200: (t, e, r) => {
- var n = r(8287).Buffer, i = r(1396), o = {
+ var n = r(8287).Buffer, i = r(1396);
+ t.exports = {
randomBytes: function(t) {
for (var e = [], r = 0; r < t; r++) e.push(Math.floor(256 * Math.random()));
return n.from(e);
@@ -14515,7 +13902,6 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
}
};
- t.exports = o;
},
7033: (t, e, r) => {
var n = r(8287).Buffer;
@@ -14578,7 +13964,6 @@ var require_node_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}(), r(7033);
})()));
}));
-
//#endregion
//#region ../libs_drpy/abba.js
var import_node_rsa = /* @__PURE__ */ __toESM(require_node_rsa(), 1);
@@ -14595,17 +13980,11 @@ const keystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
* instead of throwing INVALID_CHARACTER_ERR we return null.
*/
function atob$3(data) {
- if (arguments.length === 0) {
- throw new TypeError("1 argument required, but only 0 present.");
- }
+ if (arguments.length === 0) throw new TypeError("1 argument required, but only 0 present.");
data = `${data}`;
data = data.replace(/[ \t\n\f\r]/g, "");
- if (data.length % 4 === 0) {
- data = data.replace(/==?$/, "");
- }
- if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) {
- throw new DOMException("Failed to decode base64: invalid character", "InvalidCharacterError");
- }
+ if (data.length % 4 === 0) data = data.replace(/==?$/, "");
+ if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) throw new DOMException("Failed to decode base64: invalid character", "InvalidCharacterError");
let output = "";
let buffer = 0;
let accumulatedBits = 0;
@@ -14636,30 +14015,24 @@ function atob$3(data) {
*/
function atobLookup(chr) {
const index = keystr.indexOf(chr);
- return index < 0 ? undefined : index;
+ return index < 0 ? void 0 : index;
}
/**
* btoa() as defined by the HTML and Infra specs, which mostly just references
* RFC 4648.
*/
function btoa$3(s) {
- if (arguments.length === 0) {
- throw new TypeError("1 argument required, but only 0 present.");
- }
+ if (arguments.length === 0) throw new TypeError("1 argument required, but only 0 present.");
let i;
s = `${s}`;
- for (i = 0; i < s.length; i++) {
- if (s.charCodeAt(i) > 255) {
- throw new DOMException("The string to be encoded contains characters outside of the Latin1 range.", "InvalidCharacterError");
- }
- }
+ for (i = 0; i < s.length; i++) if (s.charCodeAt(i) > 255) throw new DOMException("The string to be encoded contains characters outside of the Latin1 range.", "InvalidCharacterError");
let out = "";
for (i = 0; i < s.length; i += 3) {
const groupsOfSix = [
- undefined,
- undefined,
- undefined,
- undefined
+ void 0,
+ void 0,
+ void 0,
+ void 0
];
groupsOfSix[0] = s.charCodeAt(i) >> 2;
groupsOfSix[1] = (s.charCodeAt(i) & 3) << 4;
@@ -14671,13 +14044,8 @@ function btoa$3(s) {
groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6;
groupsOfSix[3] = s.charCodeAt(i + 2) & 63;
}
- for (let j = 0; j < groupsOfSix.length; j++) {
- if (typeof groupsOfSix[j] === "undefined") {
- out += "=";
- } else {
- out += btoaLookup(groupsOfSix[j]);
- }
- }
+ for (let j = 0; j < groupsOfSix.length; j++) if (typeof groupsOfSix[j] === "undefined") out += "=";
+ else out += btoaLookup(groupsOfSix[j]);
}
return out;
}
@@ -14686,14 +14054,10 @@ function btoa$3(s) {
* corresponding ASCII character.
*/
function btoaLookup(index) {
- if (index >= 0 && index < 64) {
- return keystr[index];
- }
- return undefined;
+ if (index >= 0 && index < 64) return keystr[index];
}
globalThis.atob = atob$3;
globalThis.btoa = btoa$3;
-
//#endregion
//#region shim.js
global.pako = import_pako_min.default;
@@ -14706,7 +14070,285 @@ global.gbkTool = import_gb18030.default;
global.NODERSA = import_node_rsa.default;
global.atob = atob$3;
global.btoa = btoa$3;
-
+//#endregion
+//#region ../libs_drpy/crypto-util.js
+/**
+* 加密解密工具库
+* 提供Base64、MD5、RC4等加密解密功能
+*/
+/**
+* 浏览器兼容的Base64编解码实现
+* @returns {Object} 包含atob和btoa方法的对象
+*/
+function window_b64() {
+ let b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ let base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
+ /**
+ * Base64编码
+ * @param {string} str 待编码字符串
+ * @returns {string} Base64编码结果
+ */
+ function btoa(str) {
+ var out, i, len;
+ var c1, c2, c3;
+ len = str.length;
+ i = 0;
+ out = "";
+ while (i < len) {
+ c1 = str.charCodeAt(i++) & 255;
+ if (i == len) {
+ out += b64map.charAt(c1 >> 2);
+ out += b64map.charAt((c1 & 3) << 4);
+ out += "==";
+ break;
+ }
+ c2 = str.charCodeAt(i++);
+ if (i == len) {
+ out += b64map.charAt(c1 >> 2);
+ out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
+ out += b64map.charAt((c2 & 15) << 2);
+ out += "=";
+ break;
+ }
+ c3 = str.charCodeAt(i++);
+ out += b64map.charAt(c1 >> 2);
+ out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
+ out += b64map.charAt((c2 & 15) << 2 | (c3 & 192) >> 6);
+ out += b64map.charAt(c3 & 63);
+ }
+ return out;
+ }
+ /**
+ * Base64解码
+ * @param {string} str Base64编码字符串
+ * @returns {string} 解码结果
+ */
+ function atob(str) {
+ var c1, c2, c3, c4;
+ var i, len = str.length, out;
+ i = 0;
+ out = "";
+ while (i < len) {
+ do
+ c1 = base64DecodeChars[str.charCodeAt(i++) & 255];
+ while (i < len && c1 == -1);
+ if (c1 == -1) break;
+ do
+ c2 = base64DecodeChars[str.charCodeAt(i++) & 255];
+ while (i < len && c2 == -1);
+ if (c2 == -1) break;
+ out += String.fromCharCode(c1 << 2 | (c2 & 48) >> 4);
+ do {
+ c3 = str.charCodeAt(i++) & 255;
+ if (c3 == 61) return out;
+ c3 = base64DecodeChars[c3];
+ } while (i < len && c3 == -1);
+ if (c3 == -1) break;
+ out += String.fromCharCode((c2 & 15) << 4 | (c3 & 60) >> 2);
+ do {
+ c4 = str.charCodeAt(i++) & 255;
+ if (c4 == 61) return out;
+ c4 = base64DecodeChars[c4];
+ } while (i < len && c4 == -1);
+ if (c4 == -1) break;
+ out += String.fromCharCode((c3 & 3) << 6 | c4);
+ }
+ return out;
+ }
+ return {
+ atob,
+ btoa
+ };
+}
+const { atob: atob$2, btoa: btoa$2 } = window_b64();
+/**
+* Base64编码(使用CryptoJS)
+* @param {string} text 待编码文本
+* @returns {string} Base64编码结果
+*/
+function base64Encode$1(text) {
+ return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(text));
+}
+/**
+* Base64解码(使用CryptoJS)
+* @param {string} text Base64编码文本
+* @returns {string} 解码结果
+*/
+function base64Decode$2(text) {
+ return CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(text));
+}
+/**
+* MD5哈希
+* @param {string} text 待哈希文本
+* @returns {string} MD5哈希值
+*/
+function md5$1(text) {
+ return CryptoJS.MD5(text).toString();
+}
+/**
+* RC4加密
+* @param {string} word 待加密内容
+* @param {string} key 加密密钥
+* @returns {string} 加密结果
+*/
+function rc4Encrypt(word, key) {
+ return CryptoJS.RC4.encrypt(word, CryptoJS.enc.Utf8.parse(key)).toString();
+}
+/**
+* RC4解密
+* @param {string} word 待解密内容
+* @param {string} key 解密密钥
+* @returns {string} 解密结果
+*/
+function rc4Decrypt(word, key) {
+ const ciphertext = CryptoJS.enc.Hex.parse(word);
+ const key_data = CryptoJS.enc.Utf8.parse(key);
+ return CryptoJS.RC4.decrypt({ ciphertext }, key_data, {
+ mode: CryptoJS.mode.ECB,
+ padding: CryptoJS.pad.Pkcs7
+ }).toString(CryptoJS.enc.Utf8);
+}
+/**
+* RC4解码(自定义实现)
+* @param {string} data 待解码数据
+* @param {string} key 密钥
+* @param {number} t 类型标识
+* @returns {string} 解码结果
+*/
+function rc4_decode(data, key, t) {
+ let pwd = key || "ffsirllq";
+ let cipher = "";
+ key = [];
+ let box = [];
+ let pwd_length = pwd.length;
+ if (t === 1) data = atob$2(data);
+ else data = encodeURIComponent(data);
+ let data_length = data.length;
+ for (let i = 0; i < 256; i++) {
+ key[i] = pwd[i % pwd_length].charCodeAt();
+ box[i] = i;
+ }
+ for (let j = 0, i = 0; i < 256; i++) {
+ j = (j + box[i] + key[i]) % 256;
+ let tmp = box[i];
+ box[i] = box[j];
+ box[j] = tmp;
+ }
+ for (let a = 0, j = 0, i = 0; i < data_length; i++) {
+ a = (a + 1) % 256;
+ j = (j + box[a]) % 256;
+ let tmp = box[a];
+ box[a] = box[j];
+ box[j] = tmp;
+ let k = box[(box[a] + box[j]) % 256];
+ cipher += String.fromCharCode(data[i].charCodeAt() ^ k);
+ }
+ if (t === 1) return decodeURIComponent(cipher);
+ else return btoa$2(cipher);
+}
+/**
+* 十六进制编解码工具
+*/
+const hex = {
+ decode: function(val) {
+ return Buffer.from(val, "hex").toString("utf-8");
+ },
+ encode: function(val) {
+ return Buffer.from(val, "utf-8").toString("hex");
+ }
+};
+/**
+* 解析编码格式
+* @param {string} value 值
+* @param {string} encoding 编码格式
+* @returns {Object} CryptoJS编码对象
+*/
+const parseEncode = function(value, encoding) {
+ switch (encoding) {
+ case "base64": return CryptoJS.enc.Base64.parse(value);
+ case "hex": return CryptoJS.enc.Hex.parse(value);
+ case "latin1": return CryptoJS.enc.Latin1.parse(value);
+ case "utf8": return CryptoJS.enc.Utf8.parse(value);
+ default: return CryptoJS.enc.Utf8.parse(value);
+ }
+};
+/**
+* 格式化编码输出
+* @param {Object} value CryptoJS对象
+* @param {string} encoding 编码格式
+* @returns {string} 格式化结果
+*/
+const formatEncode = function(value, encoding) {
+ switch (encoding.toLowerCase()) {
+ case "base64": return value.toString();
+ case "hex": return value.ciphertext.toString();
+ }
+};
+/**
+* 格式化解码输出
+* @param {Object} value CryptoJS对象
+* @param {string} encoding 编码格式
+* @returns {string} 格式化结果
+*/
+const formatDecode = function(value, encoding) {
+ switch (encoding.toLowerCase()) {
+ case "utf8": return value.toString(CryptoJS.enc.Utf8);
+ case "base64": return value.toString(CryptoJS.enc.Base64);
+ case "hex": return value.toString(CryptoJS.enc.Hex);
+ default: return value.toString(CryptoJS.enc.Utf8);
+ }
+};
+/**
+* 获取加密模式
+* @param {string} mode 模式名称
+* @returns {Object} CryptoJS模式对象
+*/
+const getMode = function(mode) {
+ switch (mode.toLowerCase()) {
+ case "cbc": return CryptoJS.mode.CBC;
+ case "cfb": return CryptoJS.mode.CFB;
+ case "ofb": return CryptoJS.mode.OFB;
+ case "ctr": return CryptoJS.mode.CTR;
+ case "ecb": return CryptoJS.mode.ECB;
+ default: return CryptoJS.mode.CBC;
+ }
+};
+/**
+* 获取填充方式
+* @param {string} padding 填充方式名称
+* @returns {Object} CryptoJS填充对象
+*/
+const getPad = function(padding) {
+ switch (padding.toLowerCase()) {
+ case "zeropadding": return CryptoJS.pad.ZeroPadding;
+ case "pkcs5padding":
+ case "pkcs7padding": return CryptoJS.pad.Pkcs7;
+ case "ansix923": return CryptoJS.pad.AnsiX923;
+ case "iso10126": return CryptoJS.pad.Iso10126;
+ case "iso97971": return CryptoJS.pad.Iso97971;
+ case "nopadding": return CryptoJS.pad.NoPadding;
+ default: return CryptoJS.pad.ZeroPadding;
+ }
+};
+/**
+* RC4加密解密工具
+*/
+const rc4 = {
+ encode: function(val, key, encoding = "utf8", keyEncoding = "utf8", outputEncode = "base64") {
+ if (!["base64", "hex"].includes(outputEncode.toLowerCase())) return "";
+ if (!key || !val) return "";
+ const plaintext = parseEncode(val, encoding);
+ const v = parseEncode(key, keyEncoding);
+ return formatEncode(CryptoJS.RC4.encrypt(plaintext, v), outputEncode);
+ },
+ decode: function(val, key, encoding = "utf8", keyEncoding = "utf8", outputEncode = "base64") {
+ if (!["base64", "hex"].includes(encoding.toLowerCase())) return "";
+ if (!key || !val) return "";
+ const plaintext = parseEncode(val, encoding);
+ const v = parseEncode(key, keyEncoding);
+ return formatDecode(CryptoJS.RC4.toString(plaintext, v), outputEncode);
+ }
+};
//#endregion
//#region ../utils/api_helper.js
/**
@@ -14715,7 +14357,7 @@ global.btoa = btoa$3;
* 支持热重载和多种引擎类型的动态选择
*/
let jsonWatcher = null;
-let debounceTimers = new Map();
+let debounceTimers = /* @__PURE__ */ new Map();
/**
* 启动JSON文件监听器
* 在开发环境下监听JSON文件变化,自动清除模块缓存实现热重载
@@ -14727,17 +14369,17 @@ function startJsonWatcher(ENGINES, jsonDir) {
try {
jsonWatcher = watch(jsonDir, { recursive: true }, (eventType, filename) => {
if (filename && filename.endsWith(".json")) {
- if (debounceTimers.has(filename)) {
- clearTimeout(debounceTimers.get(filename));
- }
+ if (debounceTimers.has(filename)) clearTimeout(debounceTimers.get(filename));
const timer = setTimeout(() => {
console.log(`[HotReload] ${filename} changed, clearing cache...`);
ENGINES.drpyS.clearAllCache();
debounceTimers.delete(filename);
}, 100);
+ if (timer.unref) timer.unref();
debounceTimers.set(filename, timer);
}
});
+ if (jsonWatcher.unref) jsonWatcher.unref();
} catch (error) {
console.error("start json file listening failed with error:", error);
}
@@ -14790,7 +14432,6 @@ function getApiEngine(engines, moduleName, query, options) {
modulePath
};
}
-
//#endregion
//#region ../node_modules/xmlhttprequest/lib/XMLHttpRequest.js
var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -14911,9 +14552,7 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
this.open = function(method, url, async, user, password) {
this.abort();
errorFlag = false;
- if (!isAllowedHttpMethod(method)) {
- throw new Error("SecurityError: Request method not allowed");
- }
+ if (!isAllowedHttpMethod(method)) throw new Error("SecurityError: Request method not allowed");
settings = {
"method": method,
"url": url.toString(),
@@ -14939,16 +14578,12 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
* @param string value Header value
*/
this.setRequestHeader = function(header, value) {
- if (this.readyState !== this.OPENED) {
- throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");
- }
+ if (this.readyState !== this.OPENED) throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");
if (!isAllowedHttpHeader(header)) {
console.warn("Refused to set unsafe header \"" + header + "\"");
return;
}
- if (sendFlag) {
- throw new Error("INVALID_STATE_ERR: send flag is true");
- }
+ if (sendFlag) throw new Error("INVALID_STATE_ERR: send flag is true");
header = headersCase[header.toLowerCase()] || header;
headersCase[header.toLowerCase()] = header;
headers[header] = headers[header] ? headers[header] + ", " + value : value;
@@ -14960,9 +14595,7 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
* @return string Text of the header or null if it doesn't exist.
*/
this.getResponseHeader = function(header) {
- if (typeof header === "string" && this.readyState > this.OPENED && response && response.headers && response.headers[header.toLowerCase()] && !errorFlag) {
- return response.headers[header.toLowerCase()];
- }
+ if (typeof header === "string" && this.readyState > this.OPENED && response && response.headers && response.headers[header.toLowerCase()] && !errorFlag) return response.headers[header.toLowerCase()];
return null;
};
/**
@@ -14971,15 +14604,9 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
* @return string A string with all response headers separated by CR+LF
*/
this.getAllResponseHeaders = function() {
- if (this.readyState < this.HEADERS_RECEIVED || errorFlag) {
- return "";
- }
+ if (this.readyState < this.HEADERS_RECEIVED || errorFlag) return "";
var result = "";
- for (var i in response.headers) {
- if (i !== "set-cookie" && i !== "set-cookie2") {
- result += i + ": " + response.headers[i] + "\r\n";
- }
- }
+ for (var i in response.headers) if (i !== "set-cookie" && i !== "set-cookie2") result += i + ": " + response.headers[i] + "\r\n";
return result.substr(0, result.length - 2);
};
/**
@@ -14989,9 +14616,7 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
* @return string Returns the request header or empty string if not set
*/
this.getRequestHeader = function(name) {
- if (typeof name === "string" && headersCase[name.toLowerCase()]) {
- return headers[headersCase[name.toLowerCase()]];
- }
+ if (typeof name === "string" && headersCase[name.toLowerCase()]) return headers[headersCase[name.toLowerCase()]];
return "";
};
/**
@@ -15000,12 +14625,8 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
* @param string data Optional data to send as request body.
*/
this.send = function(data) {
- if (this.readyState !== this.OPENED) {
- throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");
- }
- if (sendFlag) {
- throw new Error("INVALID_STATE_ERR: send has already been called");
- }
+ if (this.readyState !== this.OPENED) throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");
+ if (sendFlag) throw new Error("INVALID_STATE_ERR: send has already been called");
var ssl = false, local = false;
var url = Url.parse(settings.url);
var host;
@@ -15017,7 +14638,7 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
case "file:":
local = true;
break;
- case undefined:
+ case void 0:
case null:
case "":
host = "localhost";
@@ -15025,58 +14646,39 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
default: throw new Error("Protocol not supported.");
}
if (local) {
- if (settings.method !== "GET") {
- throw new Error("XMLHttpRequest: Only GET method is supported");
- }
- if (settings.async) {
- fs$6.readFile(url.pathname, "utf8", function(error, data) {
- if (error) {
- self.handleError(error);
- } else {
- self.status = 200;
- self.responseText = data;
- setState(self.DONE);
- }
- });
- } else {
- try {
- this.responseText = fs$6.readFileSync(url.pathname, "utf8");
- this.status = 200;
+ if (settings.method !== "GET") throw new Error("XMLHttpRequest: Only GET method is supported");
+ if (settings.async) fs$6.readFile(url.pathname, "utf8", function(error, data) {
+ if (error) self.handleError(error);
+ else {
+ self.status = 200;
+ self.responseText = data;
setState(self.DONE);
- } catch (e) {
- this.handleError(e);
}
+ });
+ else try {
+ this.responseText = fs$6.readFileSync(url.pathname, "utf8");
+ this.status = 200;
+ setState(self.DONE);
+ } catch (e) {
+ this.handleError(e);
}
return;
}
var port = url.port || (ssl ? 443 : 80);
var uri = url.pathname + (url.search ? url.search : "");
- for (var name in defaultHeaders) {
- if (!headersCase[name.toLowerCase()]) {
- headers[name] = defaultHeaders[name];
- }
- }
+ for (var name in defaultHeaders) if (!headersCase[name.toLowerCase()]) headers[name] = defaultHeaders[name];
headers.Host = host;
- if (!(ssl && port === 443 || port === 80)) {
- headers.Host += ":" + url.port;
- }
+ if (!(ssl && port === 443 || port === 80)) headers.Host += ":" + url.port;
if (settings.user) {
- if (typeof settings.password === "undefined") {
- settings.password = "";
- }
+ if (typeof settings.password === "undefined") settings.password = "";
var authBuf = new Buffer(settings.user + ":" + settings.password);
headers.Authorization = "Basic " + authBuf.toString("base64");
}
- if (settings.method === "GET" || settings.method === "HEAD") {
- data = null;
- } else if (data) {
+ if (settings.method === "GET" || settings.method === "HEAD") data = null;
+ else if (data) {
headers["Content-Length"] = Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data);
- if (!headers["Content-Type"]) {
- headers["Content-Type"] = "text/plain;charset=UTF-8";
- }
- } else if (settings.method === "POST") {
- headers["Content-Length"] = 0;
- }
+ if (!headers["Content-Type"]) headers["Content-Type"] = "text/plain;charset=UTF-8";
+ } else if (settings.method === "POST") headers["Content-Length"] = 0;
var options = {
host,
port,
@@ -15097,15 +14699,14 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
settings.url = response.headers.location;
var url = Url.parse(settings.url);
host = url.hostname;
- var newOptions = {
+ request = doRequest({
hostname: url.hostname,
port: url.port,
path: url.path,
method: response.statusCode === 303 ? "GET" : settings.method,
headers,
withCredentials: self.withCredentials
- };
- request = doRequest(newOptions, responseHandler).on("error", errorHandler);
+ }, responseHandler).on("error", errorHandler);
request.end();
return;
}
@@ -15113,12 +14714,8 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
setState(self.HEADERS_RECEIVED);
self.status = response.statusCode;
response.on("data", function(chunk) {
- if (chunk) {
- self.responseText += chunk;
- }
- if (sendFlag) {
- setState(self.LOADING);
- }
+ if (chunk) self.responseText += chunk;
+ if (sendFlag) setState(self.LOADING);
});
response.on("end", function() {
if (sendFlag) {
@@ -15134,24 +14731,21 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
self.handleError(error);
};
request = doRequest(options, responseHandler).on("error", errorHandler);
- if (data) {
- request.write(data);
- }
+ if (data) request.write(data);
request.end();
self.dispatchEvent("loadstart");
} else {
var contentFile = ".node-xmlhttprequest-content-" + process.pid;
var syncFile = ".node-xmlhttprequest-sync-" + process.pid;
fs$6.writeFileSync(syncFile, "", "utf8");
- var execString = "var http = require('http'), https = require('https'), fs = require('fs');" + "var doRequest = http" + (ssl ? "s" : "") + ".request;" + "var options = " + JSON.stringify(options) + ";" + "var responseText = '';" + "var req = doRequest(options, function(response) {" + "response.setEncoding('utf8');" + "response.on('data', function(chunk) {" + " responseText += chunk;" + "});" + "response.on('end', function() {" + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');" + "fs.unlinkSync('" + syncFile + "');" + "});" + "response.on('error', function(error) {" + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');" + "fs.unlinkSync('" + syncFile + "');" + "});" + "}).on('error', function(error) {" + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');" + "fs.unlinkSync('" + syncFile + "');" + "});" + (data ? "req.write('" + JSON.stringify(data).slice(1, -1).replace(/'/g, "\\'") + "');" : "") + "req.end();";
+ var execString = "var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http" + (ssl ? "s" : "") + ".request;var options = " + JSON.stringify(options) + ";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('" + syncFile + "');});response.on('error', function(error) {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('" + syncFile + "');});}).on('error', function(error) {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('" + syncFile + "');});" + (data ? "req.write('" + JSON.stringify(data).slice(1, -1).replace(/'/g, "\\'") + "');" : "") + "req.end();";
var syncProc = spawn(process.argv[0], ["-e", execString]);
- while (fs$6.existsSync(syncFile)) {}
+ while (fs$6.existsSync(syncFile));
var resp = JSON.parse(fs$6.readFileSync(contentFile, "utf8"));
syncProc.stdin.end();
fs$6.unlinkSync(contentFile);
- if (resp.err) {
- self.handleError(resp.err);
- } else {
+ if (resp.err) self.handleError(resp.err);
+ else {
response = resp.data;
self.status = resp.data.statusCode;
self.responseText = resp.data.text;
@@ -15194,9 +14788,7 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
* Adds an event listener. Preferred method of binding to events.
*/
this.addEventListener = function(event, callback) {
- if (!(event in listeners)) {
- listeners[event] = [];
- }
+ if (!(event in listeners)) listeners[event] = [];
listeners[event].push(callback);
};
/**
@@ -15204,24 +14796,16 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
* Only works on the matching funciton, cannot be a copy.
*/
this.removeEventListener = function(event, callback) {
- if (event in listeners) {
- listeners[event] = listeners[event].filter(function(ev) {
- return ev !== callback;
- });
- }
+ if (event in listeners) listeners[event] = listeners[event].filter(function(ev) {
+ return ev !== callback;
+ });
};
/**
* Dispatch any events, including both "on" methods and events attached using addEventListener.
*/
this.dispatchEvent = function(event) {
- if (typeof self["on" + event] === "function") {
- self["on" + event]();
- }
- if (event in listeners) {
- for (var i = 0, len = listeners[event].length; i < len; i++) {
- listeners[event][i].call(self);
- }
- }
+ if (typeof self["on" + event] === "function") self["on" + event]();
+ if (event in listeners) for (var i = 0, len = listeners[event].length; i < len; i++) listeners[event][i].call(self);
};
/**
* Changes readyState and calls onreadystatechange.
@@ -15231,9 +14815,7 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
var setState = function(state) {
if (state == self.LOADING || self.readyState !== state) {
self.readyState = state;
- if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) {
- self.dispatchEvent("readystatechange");
- }
+ if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) self.dispatchEvent("readystatechange");
if (self.readyState === self.DONE && !errorFlag) {
self.dispatchEvent("load");
self.dispatchEvent("loadend");
@@ -15242,7 +14824,6 @@ var require_XMLHttpRequest = /* @__PURE__ */ __commonJSMin(((exports) => {
};
};
}));
-
//#endregion
//#region ../node_modules/ws/lib/constants.js
var require_constants$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -15265,7 +14846,6 @@ var require_constants$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
NOOP: () => {}
};
}));
-
//#endregion
//#region ../node_modules/ws/lib/buffer-util.js
var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -15289,9 +14869,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
target.set(buf, offset);
offset += buf.length;
}
- if (offset < totalLength) {
- return new FastBuffer(target.buffer, target.byteOffset, offset);
- }
+ if (offset < totalLength) return new FastBuffer(target.buffer, target.byteOffset, offset);
return target;
}
/**
@@ -15305,9 +14883,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
function _mask(source, mask, output, offset, length) {
- for (let i = 0; i < length; i++) {
- output[offset + i] = source[i] ^ mask[i & 3];
- }
+ for (let i = 0; i < length; i++) output[offset + i] = source[i] ^ mask[i & 3];
}
/**
* Unmasks a buffer using the given mask.
@@ -15317,9 +14893,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
function _unmask(buffer, mask) {
- for (let i = 0; i < buffer.length; i++) {
- buffer[i] ^= mask[i & 3];
- }
+ for (let i = 0; i < buffer.length; i++) buffer[i] ^= mask[i & 3];
}
/**
* Converts a buffer to an `ArrayBuffer`.
@@ -15329,9 +14903,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
function toArrayBuffer(buf) {
- if (buf.length === buf.buffer.byteLength) {
- return buf.buffer;
- }
+ if (buf.length === buf.buffer.byteLength) return buf.buffer;
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
}
/**
@@ -15346,11 +14918,9 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
toBuffer.readOnly = true;
if (Buffer.isBuffer(data)) return data;
let buf;
- if (data instanceof ArrayBuffer) {
- buf = new FastBuffer(data);
- } else if (ArrayBuffer.isView(data)) {
- buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);
- } else {
+ if (data instanceof ArrayBuffer) buf = new FastBuffer(data);
+ else if (ArrayBuffer.isView(data)) buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);
+ else {
buf = Buffer.from(data);
toBuffer.readOnly = false;
}
@@ -15364,21 +14934,18 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
unmask: _unmask
};
/* istanbul ignore else */
- if (!process.env.WS_NO_BUFFER_UTIL) {
- try {
- const bufferUtil = __require("bufferutil");
- module.exports.mask = function(source, mask, output, offset, length) {
- if (length < 48) _mask(source, mask, output, offset, length);
- else bufferUtil.mask(source, mask, output, offset, length);
- };
- module.exports.unmask = function(buffer, mask) {
- if (buffer.length < 32) _unmask(buffer, mask);
- else bufferUtil.unmask(buffer, mask);
- };
- } catch (e) {}
- }
+ if (!process.env.WS_NO_BUFFER_UTIL) try {
+ const bufferUtil = __require("bufferutil");
+ module.exports.mask = function(source, mask, output, offset, length) {
+ if (length < 48) _mask(source, mask, output, offset, length);
+ else bufferUtil.mask(source, mask, output, offset, length);
+ };
+ module.exports.unmask = function(buffer, mask) {
+ if (buffer.length < 32) _unmask(buffer, mask);
+ else bufferUtil.unmask(buffer, mask);
+ };
+ } catch (e) {}
}));
-
//#endregion
//#region ../node_modules/ws/lib/limiter.js
var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -15430,7 +14997,6 @@ var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = Limiter;
}));
-
//#endregion
//#region ../node_modules/ws/lib/permessage-deflate.js
var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -15482,15 +15048,12 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
constructor(options, isServer, maxPayload) {
this._maxPayload = maxPayload | 0;
this._options = options || {};
- this._threshold = this._options.threshold !== undefined ? this._options.threshold : 1024;
+ this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
this._isServer = !!isServer;
this._deflate = null;
this._inflate = null;
this.params = null;
- if (!zlibLimiter) {
- const concurrency = this._options.concurrencyLimit !== undefined ? this._options.concurrencyLimit : 10;
- zlibLimiter = new Limiter(concurrency);
- }
+ if (!zlibLimiter) zlibLimiter = new Limiter(this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10);
}
/**
* @type {String}
@@ -15506,20 +15069,11 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
*/
offer() {
const params = {};
- if (this._options.serverNoContextTakeover) {
- params.server_no_context_takeover = true;
- }
- if (this._options.clientNoContextTakeover) {
- params.client_no_context_takeover = true;
- }
- if (this._options.serverMaxWindowBits) {
- params.server_max_window_bits = this._options.serverMaxWindowBits;
- }
- if (this._options.clientMaxWindowBits) {
- params.client_max_window_bits = this._options.clientMaxWindowBits;
- } else if (this._options.clientMaxWindowBits == null) {
- params.client_max_window_bits = true;
- }
+ if (this._options.serverNoContextTakeover) params.server_no_context_takeover = true;
+ if (this._options.clientNoContextTakeover) params.client_no_context_takeover = true;
+ if (this._options.serverMaxWindowBits) params.server_max_window_bits = this._options.serverMaxWindowBits;
+ if (this._options.clientMaxWindowBits) params.client_max_window_bits = this._options.clientMaxWindowBits;
+ else if (this._options.clientMaxWindowBits == null) params.client_max_window_bits = true;
return params;
}
/**
@@ -15548,9 +15102,7 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
const callback = this._deflate[kCallback];
this._deflate.close();
this._deflate = null;
- if (callback) {
- callback(new Error("The deflate stream was closed while data was being processed"));
- }
+ if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
}
}
/**
@@ -15563,28 +15115,15 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
acceptAsServer(offers) {
const opts = this._options;
const accepted = offers.find((params) => {
- if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) {
- return false;
- }
+ if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) return false;
return true;
});
- if (!accepted) {
- throw new Error("None of the extension offers can be accepted");
- }
- if (opts.serverNoContextTakeover) {
- accepted.server_no_context_takeover = true;
- }
- if (opts.clientNoContextTakeover) {
- accepted.client_no_context_takeover = true;
- }
- if (typeof opts.serverMaxWindowBits === "number") {
- accepted.server_max_window_bits = opts.serverMaxWindowBits;
- }
- if (typeof opts.clientMaxWindowBits === "number") {
- accepted.client_max_window_bits = opts.clientMaxWindowBits;
- } else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) {
- delete accepted.client_max_window_bits;
- }
+ if (!accepted) throw new Error("None of the extension offers can be accepted");
+ if (opts.serverNoContextTakeover) accepted.server_no_context_takeover = true;
+ if (opts.clientNoContextTakeover) accepted.client_no_context_takeover = true;
+ if (typeof opts.serverMaxWindowBits === "number") accepted.server_max_window_bits = opts.serverMaxWindowBits;
+ if (typeof opts.clientMaxWindowBits === "number") accepted.client_max_window_bits = opts.clientMaxWindowBits;
+ else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) delete accepted.client_max_window_bits;
return accepted;
}
/**
@@ -15596,16 +15135,10 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
*/
acceptAsClient(response) {
const params = response[0];
- if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) {
- throw new Error("Unexpected parameter \"client_no_context_takeover\"");
- }
+ if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) throw new Error("Unexpected parameter \"client_no_context_takeover\"");
if (!params.client_max_window_bits) {
- if (typeof this._options.clientMaxWindowBits === "number") {
- params.client_max_window_bits = this._options.clientMaxWindowBits;
- }
- } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) {
- throw new Error("Unexpected or invalid parameter \"client_max_window_bits\"");
- }
+ if (typeof this._options.clientMaxWindowBits === "number") params.client_max_window_bits = this._options.clientMaxWindowBits;
+ } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) throw new Error("Unexpected or invalid parameter \"client_max_window_bits\"");
return params;
}
/**
@@ -15619,33 +15152,21 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
configurations.forEach((params) => {
Object.keys(params).forEach((key) => {
let value = params[key];
- if (value.length > 1) {
- throw new Error(`Parameter "${key}" must have only a single value`);
- }
+ if (value.length > 1) throw new Error(`Parameter "${key}" must have only a single value`);
value = value[0];
if (key === "client_max_window_bits") {
if (value !== true) {
const num = +value;
- if (!Number.isInteger(num) || num < 8 || num > 15) {
- throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
- }
+ if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
value = num;
- } else if (!this._isServer) {
- throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
- }
+ } else if (!this._isServer) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
} else if (key === "server_max_window_bits") {
const num = +value;
- if (!Number.isInteger(num) || num < 8 || num > 15) {
- throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
- }
+ if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
value = num;
} else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") {
- if (value !== true) {
- throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
- }
- } else {
- throw new Error(`Unknown parameter "${key}"`);
- }
+ if (value !== true) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
+ } else throw new Error(`Unknown parameter "${key}"`);
params[key] = value;
});
});
@@ -15724,9 +15245,7 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
} else {
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
- if (fin && this.params[`${endpoint}_no_context_takeover`]) {
- this._inflate.reset();
- }
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) this._inflate.reset();
}
callback(null, data);
});
@@ -15755,19 +15274,13 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
this._deflate[kCallback] = callback;
this._deflate.write(data);
this._deflate.flush(zlib$3.Z_SYNC_FLUSH, () => {
- if (!this._deflate) {
- return;
- }
+ if (!this._deflate) return;
let data = bufferUtil.concat(this._deflate[kBuffers], this._deflate[kTotalLength]);
- if (fin) {
- data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
- }
+ if (fin) data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
this._deflate[kCallback] = null;
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
- if (fin && this.params[`${endpoint}_no_context_takeover`]) {
- this._deflate.reset();
- }
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) this._deflate.reset();
callback(null, data);
});
}
@@ -15795,7 +15308,7 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
this[kBuffers].push(chunk);
return;
}
- this[kError] = new RangeError("Max payload size exceeded");
+ this[kError] = /* @__PURE__ */ new RangeError("Max payload size exceeded");
this[kError].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
this[kError][kStatusCode] = 1009;
this.removeListener("data", inflateOnData);
@@ -15817,7 +15330,6 @@ var require_permessage_deflate$1 = /* @__PURE__ */ __commonJSMin(((exports, modu
this[kCallback](err);
}
}));
-
//#endregion
//#region ../node_modules/ws/lib/validation.js
var require_validation$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -15975,28 +15487,17 @@ var require_validation$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _isValidUTF8(buf) {
const len = buf.length;
let i = 0;
- while (i < len) {
- if ((buf[i] & 128) === 0) {
- i++;
- } else if ((buf[i] & 224) === 192) {
- if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) {
- return false;
- }
- i += 2;
- } else if ((buf[i] & 240) === 224) {
- if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) {
- return false;
- }
- i += 3;
- } else if ((buf[i] & 248) === 240) {
- if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) {
- return false;
- }
- i += 4;
- } else {
- return false;
- }
- }
+ while (i < len) if ((buf[i] & 128) === 0) i++;
+ else if ((buf[i] & 224) === 192) {
+ if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) return false;
+ i += 2;
+ } else if ((buf[i] & 240) === 224) {
+ if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) return false;
+ i += 3;
+ } else if ((buf[i] & 248) === 240) {
+ if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) return false;
+ i += 4;
+ } else return false;
return true;
}
/**
@@ -16015,20 +15516,16 @@ var require_validation$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
isValidUTF8: _isValidUTF8,
tokenChars
};
- if (isUtf8$1) {
+ if (isUtf8$1) module.exports.isValidUTF8 = function(buf) {
+ return buf.length < 24 ? _isValidUTF8(buf) : isUtf8$1(buf);
+ };
+ else if (!process.env.WS_NO_UTF_8_VALIDATE) try {
+ const isValidUTF8 = __require("utf-8-validate");
module.exports.isValidUTF8 = function(buf) {
- return buf.length < 24 ? _isValidUTF8(buf) : isUtf8$1(buf);
+ return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
};
- } else if (!process.env.WS_NO_UTF_8_VALIDATE) {
- try {
- const isValidUTF8 = __require("utf-8-validate");
- module.exports.isValidUTF8 = function(buf) {
- return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
- };
- } catch (e) {}
- }
+ } catch (e) {}
}));
-
//#endregion
//#region ../node_modules/ws/lib/receiver.js
var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -16069,18 +15566,18 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
constructor(options = {}) {
super();
- this._allowSynchronousEvents = options.allowSynchronousEvents !== undefined ? options.allowSynchronousEvents : true;
+ this._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true;
this._binaryType = options.binaryType || BINARY_TYPES[0];
this._extensions = options.extensions || {};
this._isServer = !!options.isServer;
this._maxPayload = options.maxPayload | 0;
this._skipUTF8Validation = !!options.skipUTF8Validation;
- this[kWebSocket] = undefined;
+ this[kWebSocket] = void 0;
this._bufferedBytes = 0;
this._buffers = [];
this._compressed = false;
this._payloadLength = 0;
- this._mask = undefined;
+ this._mask = void 0;
this._fragmented = 0;
this._masked = false;
this._fin = false;
@@ -16125,9 +15622,8 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
do {
const buf = this._buffers[0];
const offset = dst.length - n;
- if (n >= buf.length) {
- dst.set(this._buffers.shift(), offset);
- } else {
+ if (n >= buf.length) dst.set(this._buffers.shift(), offset);
+ else {
dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
this._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n);
}
@@ -16143,7 +15639,7 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
startLoop(cb) {
this._loop = true;
- do {
+ do
switch (this._state) {
case GET_INFO:
this.getInfo(cb);
@@ -16165,7 +15661,7 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._loop = false;
return;
}
- } while (this._loop);
+ while (this._loop);
if (!this._errored) cb();
}
/**
@@ -16181,14 +15677,12 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
const buf = this.consume(2);
if ((buf[0] & 48) !== 0) {
- const error = this.createError(RangeError, "RSV2 and RSV3 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_2_3");
- cb(error);
+ cb(this.createError(RangeError, "RSV2 and RSV3 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_2_3"));
return;
}
const compressed = (buf[0] & 64) === 64;
if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
- const error = this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1");
- cb(error);
+ cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1"));
return;
}
this._fin = (buf[0] & 128) === 128;
@@ -16196,55 +15690,46 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._payloadLength = buf[1] & 127;
if (this._opcode === 0) {
if (compressed) {
- const error = this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1");
- cb(error);
+ cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1"));
return;
}
if (!this._fragmented) {
- const error = this.createError(RangeError, "invalid opcode 0", true, 1002, "WS_ERR_INVALID_OPCODE");
- cb(error);
+ cb(this.createError(RangeError, "invalid opcode 0", true, 1002, "WS_ERR_INVALID_OPCODE"));
return;
}
this._opcode = this._fragmented;
} else if (this._opcode === 1 || this._opcode === 2) {
if (this._fragmented) {
- const error = this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE");
- cb(error);
+ cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE"));
return;
}
this._compressed = compressed;
} else if (this._opcode > 7 && this._opcode < 11) {
if (!this._fin) {
- const error = this.createError(RangeError, "FIN must be set", true, 1002, "WS_ERR_EXPECTED_FIN");
- cb(error);
+ cb(this.createError(RangeError, "FIN must be set", true, 1002, "WS_ERR_EXPECTED_FIN"));
return;
}
if (compressed) {
- const error = this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1");
- cb(error);
+ cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1"));
return;
}
if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) {
- const error = this.createError(RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");
- cb(error);
+ cb(this.createError(RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"));
return;
}
} else {
- const error = this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE");
- cb(error);
+ cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE"));
return;
}
if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
this._masked = (buf[1] & 128) === 128;
if (this._isServer) {
if (!this._masked) {
- const error = this.createError(RangeError, "MASK must be set", true, 1002, "WS_ERR_EXPECTED_MASK");
- cb(error);
+ cb(this.createError(RangeError, "MASK must be set", true, 1002, "WS_ERR_EXPECTED_MASK"));
return;
}
} else if (this._masked) {
- const error = this.createError(RangeError, "MASK must be clear", true, 1002, "WS_ERR_UNEXPECTED_MASK");
- cb(error);
+ cb(this.createError(RangeError, "MASK must be clear", true, 1002, "WS_ERR_UNEXPECTED_MASK"));
return;
}
if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
@@ -16278,9 +15763,8 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
const buf = this.consume(8);
const num = buf.readUInt32BE(0);
- if (num > Math.pow(2, 53 - 32) - 1) {
- const error = this.createError(RangeError, "Unsupported WebSocket frame: payload length > 2^53 - 1", false, 1009, "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");
- cb(error);
+ if (num > Math.pow(2, 21) - 1) {
+ cb(this.createError(RangeError, "Unsupported WebSocket frame: payload length > 2^53 - 1", false, 1009, "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"));
return;
}
this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
@@ -16296,8 +15780,7 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (this._payloadLength && this._opcode < 8) {
this._totalPayloadLength += this._payloadLength;
if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
- const error = this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");
- cb(error);
+ cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));
return;
}
}
@@ -16331,9 +15814,7 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
data = this.consume(this._payloadLength);
- if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) {
- unmask(data, this._mask);
- }
+ if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask);
}
if (this._opcode > 7) {
this.controlMessage(data, cb);
@@ -16358,14 +15839,12 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @private
*/
decompress(data, cb) {
- const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
- perMessageDeflate.decompress(data, this._fin, (err, buf) => {
+ this._extensions[PerMessageDeflate.extensionName].decompress(data, this._fin, (err, buf) => {
if (err) return cb(err);
if (buf.length) {
this._messageLength += buf.length;
if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
- const error = this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");
- cb(error);
+ cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));
return;
}
this._fragments.push(buf);
@@ -16393,15 +15872,10 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._fragments = [];
if (this._opcode === 2) {
let data;
- if (this._binaryType === "nodebuffer") {
- data = concat(fragments, messageLength);
- } else if (this._binaryType === "arraybuffer") {
- data = toArrayBuffer(concat(fragments, messageLength));
- } else if (this._binaryType === "blob") {
- data = new Blob(fragments);
- } else {
- data = fragments;
- }
+ if (this._binaryType === "nodebuffer") data = concat(fragments, messageLength);
+ else if (this._binaryType === "arraybuffer") data = toArrayBuffer(concat(fragments, messageLength));
+ else if (this._binaryType === "blob") data = new Blob(fragments);
+ else data = fragments;
if (this._allowSynchronousEvents) {
this.emit("message", data, true);
this._state = GET_INFO;
@@ -16416,8 +15890,7 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} else {
const buf = concat(fragments, messageLength);
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
- const error = this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8");
- cb(error);
+ cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8"));
return;
}
if (this._state === INFLATING || this._allowSynchronousEvents) {
@@ -16449,14 +15922,12 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} else {
const code = data.readUInt16BE(0);
if (!isValidStatusCode(code)) {
- const error = this.createError(RangeError, `invalid status code ${code}`, true, 1002, "WS_ERR_INVALID_CLOSE_CODE");
- cb(error);
+ cb(this.createError(RangeError, `invalid status code ${code}`, true, 1002, "WS_ERR_INVALID_CLOSE_CODE"));
return;
}
const buf = new FastBuffer(data.buffer, data.byteOffset + 2, data.length - 2);
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
- const error = this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8");
- cb(error);
+ cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8"));
return;
}
this._loop = false;
@@ -16502,7 +15973,6 @@ var require_receiver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = Receiver;
}));
-
//#endregion
//#region ../node_modules/ws/lib/sender.js
var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -16520,10 +15990,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const DEFAULT = 0;
const DEFLATING = 1;
const GET_BLOB_DATA = 2;
- /**
- * HyBi Sender implementation.
- */
- var Sender = class Sender {
+ module.exports = class Sender {
/**
* Creates a Sender instance.
*
@@ -16545,7 +16012,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._queue = [];
this._state = DEFAULT;
this.onerror = NOOP;
- this[kWebSocket] = undefined;
+ this[kWebSocket] = void 0;
}
/**
* Frames a piece of data according to the HyBi WebSocket protocol.
@@ -16575,14 +16042,11 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let skipMasking = false;
if (options.mask) {
mask = options.maskBuffer || maskBuffer;
- if (options.generateMask) {
- options.generateMask(mask);
- } else {
+ if (options.generateMask) options.generateMask(mask);
+ else {
if (randomPoolPointer === RANDOM_POOL_SIZE) {
/* istanbul ignore else */
- if (randomPool === undefined) {
- randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
- }
+ if (randomPool === void 0) randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
randomFillSync$1(randomPool, 0, RANDOM_POOL_SIZE);
randomPoolPointer = 0;
}
@@ -16595,14 +16059,12 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
offset = 6;
}
let dataLength;
- if (typeof data === "string") {
- if ((!options.mask || skipMasking) && options[kByteLength] !== undefined) {
- dataLength = options[kByteLength];
- } else {
- data = Buffer.from(data);
- dataLength = data.length;
- }
- } else {
+ if (typeof data === "string") if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength];
+ else {
+ data = Buffer.from(data);
+ dataLength = data.length;
+ }
+ else {
dataLength = data.length;
merge = options.mask && options.readOnly && !skipMasking;
}
@@ -16618,9 +16080,8 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
target[0] = options.fin ? options.opcode | 128 : options.opcode;
if (options.rsv1) target[0] |= 64;
target[1] = payloadLength;
- if (payloadLength === 126) {
- target.writeUInt16BE(dataLength, 2);
- } else if (payloadLength === 127) {
+ if (payloadLength === 126) target.writeUInt16BE(dataLength, 2);
+ else if (payloadLength === 127) {
target[2] = target[3] = 0;
target.writeUIntBE(dataLength, 4, 6);
}
@@ -16649,25 +16110,18 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
close(code, data, mask, cb) {
let buf;
- if (code === undefined) {
- buf = EMPTY_BUFFER;
- } else if (typeof code !== "number" || !isValidStatusCode(code)) {
- throw new TypeError("First argument must be a valid error code number");
- } else if (data === undefined || !data.length) {
+ if (code === void 0) buf = EMPTY_BUFFER;
+ else if (typeof code !== "number" || !isValidStatusCode(code)) throw new TypeError("First argument must be a valid error code number");
+ else if (data === void 0 || !data.length) {
buf = Buffer.allocUnsafe(2);
buf.writeUInt16BE(code, 0);
} else {
const length = Buffer.byteLength(data);
- if (length > 123) {
- throw new RangeError("The message must not be greater than 123 bytes");
- }
+ if (length > 123) throw new RangeError("The message must not be greater than 123 bytes");
buf = Buffer.allocUnsafe(2 + length);
buf.writeUInt16BE(code, 0);
- if (typeof data === "string") {
- buf.write(data, 2);
- } else {
- buf.set(data, 2);
- }
+ if (typeof data === "string") buf.write(data, 2);
+ else buf.set(data, 2);
}
const options = {
[kByteLength]: buf.length,
@@ -16679,17 +16133,14 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
readOnly: false,
rsv1: false
};
- if (this._state !== DEFAULT) {
- this.enqueue([
- this.dispatch,
- buf,
- false,
- options,
- cb
- ]);
- } else {
- this.sendFrame(Sender.frame(buf, options), cb);
- }
+ if (this._state !== DEFAULT) this.enqueue([
+ this.dispatch,
+ buf,
+ false,
+ options,
+ cb
+ ]);
+ else this.sendFrame(Sender.frame(buf, options), cb);
}
/**
* Sends a ping message to the other peer.
@@ -16713,9 +16164,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
byteLength = data.length;
readOnly = toBuffer.readOnly;
}
- if (byteLength > 125) {
- throw new RangeError("The data size must not be greater than 125 bytes");
- }
+ if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes");
const options = {
[kByteLength]: byteLength,
fin: true,
@@ -16726,29 +16175,22 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
readOnly,
rsv1: false
};
- if (isBlob(data)) {
- if (this._state !== DEFAULT) {
- this.enqueue([
- this.getBlobData,
- data,
- false,
- options,
- cb
- ]);
- } else {
- this.getBlobData(data, false, options, cb);
- }
- } else if (this._state !== DEFAULT) {
- this.enqueue([
- this.dispatch,
- data,
- false,
- options,
- cb
- ]);
- } else {
- this.sendFrame(Sender.frame(data, options), cb);
- }
+ if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([
+ this.getBlobData,
+ data,
+ false,
+ options,
+ cb
+ ]);
+ else this.getBlobData(data, false, options, cb);
+ else if (this._state !== DEFAULT) this.enqueue([
+ this.dispatch,
+ data,
+ false,
+ options,
+ cb
+ ]);
+ else this.sendFrame(Sender.frame(data, options), cb);
}
/**
* Sends a pong message to the other peer.
@@ -16772,9 +16214,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
byteLength = data.length;
readOnly = toBuffer.readOnly;
}
- if (byteLength > 125) {
- throw new RangeError("The data size must not be greater than 125 bytes");
- }
+ if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes");
const options = {
[kByteLength]: byteLength,
fin: true,
@@ -16785,29 +16225,22 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
readOnly,
rsv1: false
};
- if (isBlob(data)) {
- if (this._state !== DEFAULT) {
- this.enqueue([
- this.getBlobData,
- data,
- false,
- options,
- cb
- ]);
- } else {
- this.getBlobData(data, false, options, cb);
- }
- } else if (this._state !== DEFAULT) {
- this.enqueue([
- this.dispatch,
- data,
- false,
- options,
- cb
- ]);
- } else {
- this.sendFrame(Sender.frame(data, options), cb);
- }
+ if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([
+ this.getBlobData,
+ data,
+ false,
+ options,
+ cb
+ ]);
+ else this.getBlobData(data, false, options, cb);
+ else if (this._state !== DEFAULT) this.enqueue([
+ this.dispatch,
+ data,
+ false,
+ options,
+ cb
+ ]);
+ else this.sendFrame(Sender.frame(data, options), cb);
}
/**
* Sends a data message to the other peer.
@@ -16844,9 +16277,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (this._firstFragment) {
this._firstFragment = false;
- if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? "server_no_context_takeover" : "client_no_context_takeover"]) {
- rsv1 = byteLength >= perMessageDeflate._threshold;
- }
+ if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? "server_no_context_takeover" : "client_no_context_takeover"]) rsv1 = byteLength >= perMessageDeflate._threshold;
this._compress = rsv1;
} else {
rsv1 = false;
@@ -16863,29 +16294,22 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
readOnly,
rsv1
};
- if (isBlob(data)) {
- if (this._state !== DEFAULT) {
- this.enqueue([
- this.getBlobData,
- data,
- this._compress,
- opts,
- cb
- ]);
- } else {
- this.getBlobData(data, this._compress, opts, cb);
- }
- } else if (this._state !== DEFAULT) {
- this.enqueue([
- this.dispatch,
- data,
- this._compress,
- opts,
- cb
- ]);
- } else {
- this.dispatch(data, this._compress, opts, cb);
- }
+ if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([
+ this.getBlobData,
+ data,
+ this._compress,
+ opts,
+ cb
+ ]);
+ else this.getBlobData(data, this._compress, opts, cb);
+ else if (this._state !== DEFAULT) this.enqueue([
+ this.dispatch,
+ data,
+ this._compress,
+ opts,
+ cb
+ ]);
+ else this.dispatch(data, this._compress, opts, cb);
}
/**
* Gets the contents of a blob as binary data.
@@ -16915,7 +16339,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._state = GET_BLOB_DATA;
blob.arrayBuffer().then((arrayBuffer) => {
if (this._socket.destroyed) {
- const err = new Error("The socket was closed while the blob was being read");
+ const err = /* @__PURE__ */ new Error("The socket was closed while the blob was being read");
process.nextTick(callCallbacks, this, err, cb);
return;
}
@@ -16925,9 +16349,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._state = DEFAULT;
this.sendFrame(Sender.frame(data, options), cb);
this.dequeue();
- } else {
- this.dispatch(data, compress, options, cb);
- }
+ } else this.dispatch(data, compress, options, cb);
}).catch((err) => {
process.nextTick(onError, this, err, cb);
});
@@ -16965,8 +16387,7 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._state = DEFLATING;
perMessageDeflate.compress(data, options.fin, (_, buf) => {
if (this._socket.destroyed) {
- const err = new Error("The socket was closed while data was being compressed");
- callCallbacks(this, err, cb);
+ callCallbacks(this, /* @__PURE__ */ new Error("The socket was closed while data was being compressed"), cb);
return;
}
this._bufferedBytes -= options[kByteLength];
@@ -17011,12 +16432,9 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._socket.write(list[0]);
this._socket.write(list[1], cb);
this._socket.uncork();
- } else {
- this._socket.write(list[0], cb);
- }
+ } else this._socket.write(list[0], cb);
}
};
- module.exports = Sender;
/**
* Calls queued callbacks with an error.
*
@@ -17046,7 +16464,6 @@ var require_sender$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
sender.onerror(err);
}
}));
-
//#endregion
//#region ../node_modules/ws/lib/event-target.js
var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -17109,9 +16526,9 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
constructor(type, options = {}) {
super(type);
- this[kCode] = options.code === undefined ? 0 : options.code;
- this[kReason] = options.reason === undefined ? "" : options.reason;
- this[kWasClean] = options.wasClean === undefined ? false : options.wasClean;
+ this[kCode] = options.code === void 0 ? 0 : options.code;
+ this[kReason] = options.reason === void 0 ? "" : options.reason;
+ this[kWasClean] = options.wasClean === void 0 ? false : options.wasClean;
}
/**
* @type {Number}
@@ -17152,8 +16569,8 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
constructor(type, options = {}) {
super(type);
- this[kError] = options.error === undefined ? null : options.error;
- this[kMessage] = options.message === undefined ? "" : options.message;
+ this[kError] = options.error === void 0 ? null : options.error;
+ this[kMessage] = options.message === void 0 ? "" : options.message;
}
/**
* @type {*}
@@ -17186,7 +16603,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
constructor(type, options = {}) {
super(type);
- this[kData] = options.data === undefined ? null : options.data;
+ this[kData] = options.data === void 0 ? null : options.data;
}
/**
* @type {*}
@@ -17196,28 +16613,20 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
Object.defineProperty(MessageEvent.prototype, "data", { enumerable: true });
- /**
- * This provides methods for emulating the `EventTarget` interface. It's not
- * meant to be used directly.
- *
- * @mixin
- */
- const EventTarget = {
- addEventListener(type, handler, options = {}) {
- for (const listener of this.listeners(type)) {
- if (!options[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) {
- return;
- }
- }
- let wrapper;
- if (type === "message") {
- wrapper = function onMessage(data, isBinary) {
+ module.exports = {
+ CloseEvent,
+ ErrorEvent,
+ Event,
+ EventTarget: {
+ addEventListener(type, handler, options = {}) {
+ for (const listener of this.listeners(type)) if (!options[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) return;
+ let wrapper;
+ if (type === "message") wrapper = function onMessage(data, isBinary) {
const event = new MessageEvent("message", { data: isBinary ? data : data.toString() });
event[kTarget] = this;
callListener(handler, this, event);
};
- } else if (type === "close") {
- wrapper = function onClose(code, message) {
+ else if (type === "close") wrapper = function onClose(code, message) {
const event = new CloseEvent("close", {
code,
reason: message.toString(),
@@ -17226,8 +16635,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
event[kTarget] = this;
callListener(handler, this, event);
};
- } else if (type === "error") {
- wrapper = function onError(error) {
+ else if (type === "error") wrapper = function onError(error) {
const event = new ErrorEvent("error", {
error,
message: error.message
@@ -17235,37 +16643,24 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
event[kTarget] = this;
callListener(handler, this, event);
};
- } else if (type === "open") {
- wrapper = function onOpen() {
+ else if (type === "open") wrapper = function onOpen() {
const event = new Event("open");
event[kTarget] = this;
callListener(handler, this, event);
};
- } else {
- return;
- }
- wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
- wrapper[kListener] = handler;
- if (options.once) {
- this.once(type, wrapper);
- } else {
- this.on(type, wrapper);
- }
- },
- removeEventListener(type, handler) {
- for (const listener of this.listeners(type)) {
- if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
+ else return;
+ wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
+ wrapper[kListener] = handler;
+ if (options.once) this.once(type, wrapper);
+ else this.on(type, wrapper);
+ },
+ removeEventListener(type, handler) {
+ for (const listener of this.listeners(type)) if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
this.removeListener(type, listener);
break;
}
}
- }
- };
- module.exports = {
- CloseEvent,
- ErrorEvent,
- Event,
- EventTarget,
+ },
MessageEvent
};
/**
@@ -17277,14 +16672,10 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @private
*/
function callListener(listener, thisArg, event) {
- if (typeof listener === "object" && listener.handleEvent) {
- listener.handleEvent.call(listener, event);
- } else {
- listener.call(thisArg, event);
- }
+ if (typeof listener === "object" && listener.handleEvent) listener.handleEvent.call(listener, event);
+ else listener.call(thisArg, event);
}
}));
-
//#endregion
//#region ../node_modules/ws/lib/extension.js
var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -17300,7 +16691,7 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @private
*/
function push(dest, name, elem) {
- if (dest[name] === undefined) dest[name] = [elem];
+ if (dest[name] === void 0) dest[name] = [elem];
else dest[name].push(elem);
}
/**
@@ -17324,113 +16715,81 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let i = 0;
for (; i < header.length; i++) {
code = header.charCodeAt(i);
- if (extensionName === undefined) {
- if (end === -1 && tokenChars[code] === 1) {
- if (start === -1) start = i;
- } else if (i !== 0 && (code === 32 || code === 9)) {
- if (end === -1 && start !== -1) end = i;
- } else if (code === 59 || code === 44) {
- if (start === -1) {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- if (end === -1) end = i;
- const name = header.slice(start, end);
- if (code === 44) {
- push(offers, name, params);
- params = Object.create(null);
- } else {
- extensionName = name;
- }
- start = end = -1;
- } else {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- } else if (paramName === undefined) {
- if (end === -1 && tokenChars[code] === 1) {
- if (start === -1) start = i;
- } else if (code === 32 || code === 9) {
- if (end === -1 && start !== -1) end = i;
- } else if (code === 59 || code === 44) {
- if (start === -1) {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- if (end === -1) end = i;
- push(params, header.slice(start, end), true);
- if (code === 44) {
- push(offers, extensionName, params);
- params = Object.create(null);
- extensionName = undefined;
- }
- start = end = -1;
- } else if (code === 61 && start !== -1 && end === -1) {
- paramName = header.slice(start, i);
- start = end = -1;
- } else {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- } else {
- if (isEscaping) {
- if (tokenChars[code] !== 1) {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- if (start === -1) start = i;
- else if (!mustUnescape) mustUnescape = true;
- isEscaping = false;
- } else if (inQuotes) {
- if (tokenChars[code] === 1) {
- if (start === -1) start = i;
- } else if (code === 34 && start !== -1) {
- inQuotes = false;
- end = i;
- } else if (code === 92) {
- isEscaping = true;
- } else {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- } else if (code === 34 && header.charCodeAt(i - 1) === 61) {
- inQuotes = true;
- } else if (end === -1 && tokenChars[code] === 1) {
- if (start === -1) start = i;
- } else if (start !== -1 && (code === 32 || code === 9)) {
- if (end === -1) end = i;
- } else if (code === 59 || code === 44) {
- if (start === -1) {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- if (end === -1) end = i;
- let value = header.slice(start, end);
- if (mustUnescape) {
- value = value.replace(/\\/g, "");
- mustUnescape = false;
- }
- push(params, paramName, value);
- if (code === 44) {
- push(offers, extensionName, params);
- params = Object.create(null);
- extensionName = undefined;
- }
- paramName = undefined;
- start = end = -1;
- } else {
- throw new SyntaxError(`Unexpected character at index ${i}`);
+ if (extensionName === void 0) if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (i !== 0 && (code === 32 || code === 9)) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 59 || code === 44) {
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
+ if (end === -1) end = i;
+ const name = header.slice(start, end);
+ if (code === 44) {
+ push(offers, name, params);
+ params = Object.create(null);
+ } else extensionName = name;
+ start = end = -1;
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
+ else if (paramName === void 0) if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (code === 32 || code === 9) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 59 || code === 44) {
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
+ if (end === -1) end = i;
+ push(params, header.slice(start, end), true);
+ if (code === 44) {
+ push(offers, extensionName, params);
+ params = Object.create(null);
+ extensionName = void 0;
}
- }
- }
- if (start === -1 || inQuotes || code === 32 || code === 9) {
- throw new SyntaxError("Unexpected end of input");
+ start = end = -1;
+ } else if (code === 61 && start !== -1 && end === -1) {
+ paramName = header.slice(start, i);
+ start = end = -1;
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
+ else if (isEscaping) {
+ if (tokenChars[code] !== 1) throw new SyntaxError(`Unexpected character at index ${i}`);
+ if (start === -1) start = i;
+ else if (!mustUnescape) mustUnescape = true;
+ isEscaping = false;
+ } else if (inQuotes) if (tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (code === 34 && start !== -1) {
+ inQuotes = false;
+ end = i;
+ } else if (code === 92) isEscaping = true;
+ else throw new SyntaxError(`Unexpected character at index ${i}`);
+ else if (code === 34 && header.charCodeAt(i - 1) === 61) inQuotes = true;
+ else if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (start !== -1 && (code === 32 || code === 9)) {
+ if (end === -1) end = i;
+ } else if (code === 59 || code === 44) {
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
+ if (end === -1) end = i;
+ let value = header.slice(start, end);
+ if (mustUnescape) {
+ value = value.replace(/\\/g, "");
+ mustUnescape = false;
+ }
+ push(params, paramName, value);
+ if (code === 44) {
+ push(offers, extensionName, params);
+ params = Object.create(null);
+ extensionName = void 0;
+ }
+ paramName = void 0;
+ start = end = -1;
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
}
+ if (start === -1 || inQuotes || code === 32 || code === 9) throw new SyntaxError("Unexpected end of input");
if (end === -1) end = i;
const token = header.slice(start, end);
- if (extensionName === undefined) {
- push(offers, token, params);
- } else {
- if (paramName === undefined) {
- push(params, token, true);
- } else if (mustUnescape) {
- push(params, paramName, token.replace(/\\/g, ""));
- } else {
- push(params, paramName, token);
- }
+ if (extensionName === void 0) push(offers, token, params);
+ else {
+ if (paramName === void 0) push(params, token, true);
+ else if (mustUnescape) push(params, paramName, token.replace(/\\/g, ""));
+ else push(params, paramName, token);
push(offers, extensionName, params);
}
return offers;
@@ -17460,7 +16819,6 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse
};
}));
-
//#endregion
//#region ../node_modules/ws/lib/websocket.js
var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -17523,16 +16881,11 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._bufferedAmount = 0;
this._isServer = false;
this._redirects = 0;
- if (protocols === undefined) {
+ if (protocols === void 0) protocols = [];
+ else if (!Array.isArray(protocols)) if (typeof protocols === "object" && protocols !== null) {
+ options = protocols;
protocols = [];
- } else if (!Array.isArray(protocols)) {
- if (typeof protocols === "object" && protocols !== null) {
- options = protocols;
- protocols = [];
- } else {
- protocols = [protocols];
- }
- }
+ } else protocols = [protocols];
initAsClient(this, address, protocols, options);
} else {
this._autoPong = options.autoPong;
@@ -17678,9 +17031,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.emit("close", this._closeCode, this._closeMessage);
return;
}
- if (this._extensions[PerMessageDeflate.extensionName]) {
- this._extensions[PerMessageDeflate.extensionName].cleanup();
- }
+ if (this._extensions[PerMessageDeflate.extensionName]) this._extensions[PerMessageDeflate.extensionName].cleanup();
this._receiver.removeAllListeners();
this._readyState = WebSocket.CLOSED;
this.emit("close", this._closeCode, this._closeMessage);
@@ -17708,23 +17059,18 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
close(code, data) {
if (this.readyState === WebSocket.CLOSED) return;
if (this.readyState === WebSocket.CONNECTING) {
- const msg = "WebSocket was closed before the connection was established";
- abortHandshake(this, this._req, msg);
+ abortHandshake(this, this._req, "WebSocket was closed before the connection was established");
return;
}
if (this.readyState === WebSocket.CLOSING) {
- if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) {
- this._socket.end();
- }
+ if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) this._socket.end();
return;
}
this._readyState = WebSocket.CLOSING;
this._sender.close(code, data, !this._isServer, (err) => {
if (err) return;
this._closeFrameSent = true;
- if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) {
- this._socket.end();
- }
+ if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) this._socket.end();
});
setCloseTimer(this);
}
@@ -17734,9 +17080,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
pause() {
- if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) {
- return;
- }
+ if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return;
this._paused = true;
this._socket.pause();
}
@@ -17749,22 +17093,20 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
ping(data, mask, cb) {
- if (this.readyState === WebSocket.CONNECTING) {
- throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
- }
+ if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
if (typeof data === "function") {
cb = data;
- data = mask = undefined;
+ data = mask = void 0;
} else if (typeof mask === "function") {
cb = mask;
- mask = undefined;
+ mask = void 0;
}
if (typeof data === "number") data = data.toString();
if (this.readyState !== WebSocket.OPEN) {
sendAfterClose(this, data, cb);
return;
}
- if (mask === undefined) mask = !this._isServer;
+ if (mask === void 0) mask = !this._isServer;
this._sender.ping(data || EMPTY_BUFFER, mask, cb);
}
/**
@@ -17776,22 +17118,20 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
pong(data, mask, cb) {
- if (this.readyState === WebSocket.CONNECTING) {
- throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
- }
+ if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
if (typeof data === "function") {
cb = data;
- data = mask = undefined;
+ data = mask = void 0;
} else if (typeof mask === "function") {
cb = mask;
- mask = undefined;
+ mask = void 0;
}
if (typeof data === "number") data = data.toString();
if (this.readyState !== WebSocket.OPEN) {
sendAfterClose(this, data, cb);
return;
}
- if (mask === undefined) mask = !this._isServer;
+ if (mask === void 0) mask = !this._isServer;
this._sender.pong(data || EMPTY_BUFFER, mask, cb);
}
/**
@@ -17800,9 +17140,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
resume() {
- if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) {
- return;
- }
+ if (this.readyState === WebSocket.CONNECTING || this.readyState === WebSocket.CLOSED) return;
this._paused = false;
if (!this._receiver._writableState.needDrain) this._socket.resume();
}
@@ -17822,9 +17160,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
send(data, options, cb) {
- if (this.readyState === WebSocket.CONNECTING) {
- throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
- }
+ if (this.readyState === WebSocket.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
if (typeof options === "function") {
cb = options;
options = {};
@@ -17841,9 +17177,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
fin: true,
...options
};
- if (!this._extensions[PerMessageDeflate.extensionName]) {
- opts.compress = false;
- }
+ if (!this._extensions[PerMessageDeflate.extensionName]) opts.compress = false;
this._sender.send(data || EMPTY_BUFFER, opts, cb);
}
/**
@@ -17854,8 +17188,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
terminate() {
if (this.readyState === WebSocket.CLOSED) return;
if (this.readyState === WebSocket.CONNECTING) {
- const msg = "WebSocket was closed before the connection was established";
- abortHandshake(this, this._req, msg);
+ abortHandshake(this, this._req, "WebSocket was closed before the connection was established");
return;
}
if (this._socket) {
@@ -17948,17 +17281,13 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Object.defineProperty(WebSocket.prototype, `on${method}`, {
enumerable: true,
get() {
- for (const listener of this.listeners(method)) {
- if (listener[kForOnEventAttribute]) return listener[kListener];
- }
+ for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) return listener[kListener];
return null;
},
set(handler) {
- for (const listener of this.listeners(method)) {
- if (listener[kForOnEventAttribute]) {
- this.removeListener(method, listener);
- break;
- }
+ for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) {
+ this.removeListener(method, listener);
+ break;
}
if (typeof handler !== "function") return;
this.addEventListener(method, handler, { [kForOnEventAttribute]: true });
@@ -18013,50 +17342,37 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
followRedirects: false,
maxRedirects: 10,
...options,
- socketPath: undefined,
- hostname: undefined,
- protocol: undefined,
- timeout: undefined,
+ socketPath: void 0,
+ hostname: void 0,
+ protocol: void 0,
+ timeout: void 0,
method: "GET",
- host: undefined,
- path: undefined,
- port: undefined
+ host: void 0,
+ path: void 0,
+ port: void 0
};
websocket._autoPong = opts.autoPong;
- if (!protocolVersions.includes(opts.protocolVersion)) {
- throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} ` + `(supported versions: ${protocolVersions.join(", ")})`);
- }
+ if (!protocolVersions.includes(opts.protocolVersion)) throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`);
let parsedUrl;
- if (address instanceof URL$2) {
- parsedUrl = address;
- } else {
- try {
- parsedUrl = new URL$2(address);
- } catch (e) {
- throw new SyntaxError(`Invalid URL: ${address}`);
- }
- }
- if (parsedUrl.protocol === "http:") {
- parsedUrl.protocol = "ws:";
- } else if (parsedUrl.protocol === "https:") {
- parsedUrl.protocol = "wss:";
+ if (address instanceof URL$2) parsedUrl = address;
+ else try {
+ parsedUrl = new URL$2(address);
+ } catch (e) {
+ throw new SyntaxError(`Invalid URL: ${address}`);
}
+ if (parsedUrl.protocol === "http:") parsedUrl.protocol = "ws:";
+ else if (parsedUrl.protocol === "https:") parsedUrl.protocol = "wss:";
websocket._url = parsedUrl.href;
const isSecure = parsedUrl.protocol === "wss:";
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
let invalidUrlMessage;
- if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
- invalidUrlMessage = "The URL's protocol must be one of \"ws:\", \"wss:\", " + "\"http:\", \"https:\", or \"ws+unix:\"";
- } else if (isIpcUrl && !parsedUrl.pathname) {
- invalidUrlMessage = "The URL's pathname is empty";
- } else if (parsedUrl.hash) {
- invalidUrlMessage = "The URL contains a fragment identifier";
- }
+ if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) invalidUrlMessage = "The URL's protocol must be one of \"ws:\", \"wss:\", \"http:\", \"https:\", or \"ws+unix:\"";
+ else if (isIpcUrl && !parsedUrl.pathname) invalidUrlMessage = "The URL's pathname is empty";
+ else if (parsedUrl.hash) invalidUrlMessage = "The URL contains a fragment identifier";
if (invalidUrlMessage) {
const err = new SyntaxError(invalidUrlMessage);
- if (websocket._redirects === 0) {
- throw err;
- } else {
+ if (websocket._redirects === 0) throw err;
+ else {
emitErrorAndClose(websocket, err);
return;
}
@@ -18064,7 +17380,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const defaultPort = isSecure ? 443 : 80;
const key = randomBytes(16).toString("base64");
const request = isSecure ? https$6.request : http$12.request;
- const protocolSet = new Set();
+ const protocolSet = /* @__PURE__ */ new Set();
let perMessageDeflate;
opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
opts.defaultPort = opts.defaultPort || defaultPort;
@@ -18085,23 +17401,14 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (protocols.length) {
for (const protocol of protocols) {
- if (typeof protocol !== "string" || !subprotocolRegex.test(protocol) || protocolSet.has(protocol)) {
- throw new SyntaxError("An invalid or duplicated subprotocol was specified");
- }
+ if (typeof protocol !== "string" || !subprotocolRegex.test(protocol) || protocolSet.has(protocol)) throw new SyntaxError("An invalid or duplicated subprotocol was specified");
protocolSet.add(protocol);
}
opts.headers["Sec-WebSocket-Protocol"] = protocols.join(",");
}
- if (opts.origin) {
- if (opts.protocolVersion < 13) {
- opts.headers["Sec-WebSocket-Origin"] = opts.origin;
- } else {
- opts.headers.Origin = opts.origin;
- }
- }
- if (parsedUrl.username || parsedUrl.password) {
- opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
- }
+ if (opts.origin) if (opts.protocolVersion < 13) opts.headers["Sec-WebSocket-Origin"] = opts.origin;
+ else opts.headers.Origin = opts.origin;
+ if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
if (isIpcUrl) {
const parts = opts.path.split(":");
opts.socketPath = parts[0];
@@ -18118,35 +17425,23 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
...options,
headers: {}
};
- if (headers) {
- for (const [key, value] of Object.entries(headers)) {
- options.headers[key.toLowerCase()] = value;
- }
- }
+ if (headers) for (const [key, value] of Object.entries(headers)) options.headers[key.toLowerCase()] = value;
} else if (websocket.listenerCount("redirect") === 0) {
const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath;
if (!isSameHost || websocket._originalSecure && !isSecure) {
delete opts.headers.authorization;
delete opts.headers.cookie;
if (!isSameHost) delete opts.headers.host;
- opts.auth = undefined;
+ opts.auth = void 0;
}
}
- if (opts.auth && !options.headers.authorization) {
- options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
- }
- req = websocket._req = request(opts);
- if (websocket._redirects) {
- websocket.emit("redirect", websocket.url, req);
- }
- } else {
+ if (opts.auth && !options.headers.authorization) options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
req = websocket._req = request(opts);
- }
- if (opts.timeout) {
- req.on("timeout", () => {
- abortHandshake(websocket, req, "Opening handshake has timed out");
- });
- }
+ if (websocket._redirects) websocket.emit("redirect", websocket.url, req);
+ } else req = websocket._req = request(opts);
+ if (opts.timeout) req.on("timeout", () => {
+ abortHandshake(websocket, req, "Opening handshake has timed out");
+ });
req.on("error", (err) => {
if (req === null || req[kAborted]) return;
req = websocket._req = null;
@@ -18165,21 +17460,18 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
try {
addr = new URL$2(location, address);
} catch (e) {
- const err = new SyntaxError(`Invalid URL: ${location}`);
- emitErrorAndClose(websocket, err);
+ emitErrorAndClose(websocket, /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`));
return;
}
initAsClient(websocket, addr, protocols, options);
- } else if (!websocket.emit("unexpected-response", req, res)) {
- abortHandshake(websocket, req, `Unexpected server response: ${res.statusCode}`);
- }
+ } else if (!websocket.emit("unexpected-response", req, res)) abortHandshake(websocket, req, `Unexpected server response: ${res.statusCode}`);
});
req.on("upgrade", (res, socket, head) => {
websocket.emit("upgrade", res);
if (websocket.readyState !== WebSocket.CONNECTING) return;
req = websocket._req = null;
const upgrade = res.headers.upgrade;
- if (upgrade === undefined || upgrade.toLowerCase() !== "websocket") {
+ if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
abortHandshake(websocket, socket, "Invalid Upgrade header");
return;
}
@@ -18190,46 +17482,37 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
const serverProt = res.headers["sec-websocket-protocol"];
let protError;
- if (serverProt !== undefined) {
- if (!protocolSet.size) {
- protError = "Server sent a subprotocol but none was requested";
- } else if (!protocolSet.has(serverProt)) {
- protError = "Server sent an invalid subprotocol";
- }
- } else if (protocolSet.size) {
- protError = "Server sent no subprotocol";
- }
+ if (serverProt !== void 0) {
+ if (!protocolSet.size) protError = "Server sent a subprotocol but none was requested";
+ else if (!protocolSet.has(serverProt)) protError = "Server sent an invalid subprotocol";
+ } else if (protocolSet.size) protError = "Server sent no subprotocol";
if (protError) {
abortHandshake(websocket, socket, protError);
return;
}
if (serverProt) websocket._protocol = serverProt;
const secWebSocketExtensions = res.headers["sec-websocket-extensions"];
- if (secWebSocketExtensions !== undefined) {
+ if (secWebSocketExtensions !== void 0) {
if (!perMessageDeflate) {
- const message = "Server sent a Sec-WebSocket-Extensions header but no extension " + "was requested";
- abortHandshake(websocket, socket, message);
+ abortHandshake(websocket, socket, "Server sent a Sec-WebSocket-Extensions header but no extension was requested");
return;
}
let extensions;
try {
extensions = parse(secWebSocketExtensions);
} catch (err) {
- const message = "Invalid Sec-WebSocket-Extensions header";
- abortHandshake(websocket, socket, message);
+ abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Extensions header");
return;
}
const extensionNames = Object.keys(extensions);
if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName) {
- const message = "Server indicated an extension that was not requested";
- abortHandshake(websocket, socket, message);
+ abortHandshake(websocket, socket, "Server indicated an extension that was not requested");
return;
}
try {
perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
} catch (err) {
- const message = "Invalid Sec-WebSocket-Extensions header";
- abortHandshake(websocket, socket, message);
+ abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Extensions header");
return;
}
websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
@@ -18241,11 +17524,8 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
skipUTF8Validation: opts.skipUTF8Validation
});
});
- if (opts.finishRequest) {
- opts.finishRequest(req, websocket);
- } else {
- req.end();
- }
+ if (opts.finishRequest) opts.finishRequest(req, websocket);
+ else req.end();
}
/**
* Emit the `'error'` and `'close'` events.
@@ -18279,10 +17559,8 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @private
*/
function tlsConnect(options) {
- options.path = undefined;
- if (!options.servername && options.servername !== "") {
- options.servername = net$6.isIP(options.host) ? "" : options.host;
- }
+ options.path = void 0;
+ if (!options.servername && options.servername !== "") options.servername = net$6.isIP(options.host) ? "" : options.host;
return tls$2.connect(options);
}
/**
@@ -18301,9 +17579,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (stream.setHeader) {
stream[kAborted] = true;
stream.abort();
- if (stream.socket && !stream.socket.destroyed) {
- stream.socket.destroy();
- }
+ if (stream.socket && !stream.socket.destroyed) stream.socket.destroy();
process.nextTick(emitErrorAndClose, websocket, err);
} else {
stream.destroy(err);
@@ -18327,7 +17603,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
else websocket._bufferedAmount += length;
}
if (cb) {
- const err = new Error(`WebSocket is not open: readyState ${websocket.readyState} ` + `(${readyStates[websocket.readyState]})`);
+ const err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
process.nextTick(cb, err);
}
}
@@ -18343,7 +17619,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
websocket._closeFrameReceived = true;
websocket._closeMessage = reason;
websocket._closeCode = code;
- if (websocket._socket[kWebSocket] === undefined) return;
+ if (websocket._socket[kWebSocket] === void 0) return;
websocket._socket.removeListener("data", socketOnData);
process.nextTick(resume, websocket._socket);
if (code === 1005) websocket.close();
@@ -18366,7 +17642,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function receiverOnError(err) {
const websocket = this[kWebSocket];
- if (websocket._socket[kWebSocket] !== undefined) {
+ if (websocket._socket[kWebSocket] !== void 0) {
websocket._socket.removeListener("data", socketOnData);
process.nextTick(resume, websocket._socket);
websocket.close(err[kStatusCode]);
@@ -18463,15 +17739,12 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.removeListener("end", socketOnEnd);
websocket._readyState = WebSocket.CLOSING;
let chunk;
- if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && (chunk = websocket._socket.read()) !== null) {
- websocket._receiver.write(chunk);
- }
+ if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && (chunk = websocket._socket.read()) !== null) websocket._receiver.write(chunk);
websocket._receiver.end();
- this[kWebSocket] = undefined;
+ this[kWebSocket] = void 0;
clearTimeout(websocket._closeTimer);
- if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) {
- websocket.emitClose();
- } else {
+ if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) websocket.emitClose();
+ else {
websocket._receiver.on("error", receiverOnFinish);
websocket._receiver.on("finish", receiverOnFinish);
}
@@ -18483,9 +17756,7 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @private
*/
function socketOnData(chunk) {
- if (!this[kWebSocket]._receiver.write(chunk)) {
- this.pause();
- }
+ if (!this[kWebSocket]._receiver.write(chunk)) this.pause();
}
/**
* The listener of the socket `'end'` event.
@@ -18513,7 +17784,6 @@ var require_websocket$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
}));
-
//#endregion
//#region ../node_modules/ws/lib/stream.js
var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -18534,9 +17804,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @private
*/
function duplexOnEnd() {
- if (!this.destroyed && this._writableState.finished) {
- this.destroy();
- }
+ if (!this.destroyed && this._writableState.finished) this.destroy();
}
/**
* The listener of the `'error'` event.
@@ -18547,9 +17815,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function duplexOnError(err) {
this.removeListener("error", duplexOnError);
this.destroy();
- if (this.listenerCount("error") === 0) {
- this.emit("error", err);
- }
+ if (this.listenerCount("error") === 0) this.emit("error", err);
}
/**
* Wraps a `WebSocket` in a duplex stream.
@@ -18634,7 +17900,6 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = createWebSocketStream;
}));
-
//#endregion
//#region ../node_modules/ws/lib/subprotocol.js
var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -18647,44 +17912,33 @@ var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
function parse(header) {
- const protocols = new Set();
+ const protocols = /* @__PURE__ */ new Set();
let start = -1;
let end = -1;
let i = 0;
- for (i; i < header.length; i++) {
+ for (; i < header.length; i++) {
const code = header.charCodeAt(i);
if (end === -1 && tokenChars[code] === 1) {
if (start === -1) start = i;
} else if (i !== 0 && (code === 32 || code === 9)) {
if (end === -1 && start !== -1) end = i;
} else if (code === 44) {
- if (start === -1) {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
if (end === -1) end = i;
const protocol = header.slice(start, end);
- if (protocols.has(protocol)) {
- throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
- }
+ if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
protocols.add(protocol);
start = end = -1;
- } else {
- throw new SyntaxError(`Unexpected character at index ${i}`);
- }
- }
- if (start === -1 || end !== -1) {
- throw new SyntaxError("Unexpected end of input");
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
}
+ if (start === -1 || end !== -1) throw new SyntaxError("Unexpected end of input");
const protocol = header.slice(start, i);
- if (protocols.has(protocol)) {
- throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
- }
+ if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
protocols.add(protocol);
return protocols;
}
module.exports = { parse };
}));
-
//#endregion
//#region ../node_modules/ws/lib/websocket-server.js
var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -18758,9 +18012,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
WebSocket,
...options
};
- if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) {
- throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options " + "must be specified");
- }
+ if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options must be specified");
if (options.port != null) {
this._server = http$11.createServer((req, res) => {
const body = http$11.STATUS_CODES[426];
@@ -18771,9 +18023,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
res.end(body);
});
this._server.listen(options.port, options.host, options.backlog, callback);
- } else if (options.server) {
- this._server = options.server;
- }
+ } else if (options.server) this._server = options.server;
if (this._server) {
const emitConnection = this.emit.bind(this, "connection");
this._removeListeners = addListeners(this._server, {
@@ -18786,7 +18036,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
}
if (options.perMessageDeflate === true) options.perMessageDeflate = {};
if (options.clientTracking) {
- this.clients = new Set();
+ this.clients = /* @__PURE__ */ new Set();
this._shouldEmitClose = false;
}
this.options = options;
@@ -18802,9 +18052,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
* @public
*/
address() {
- if (this.options.noServer) {
- throw new Error("The server is operating in \"noServer\" mode");
- }
+ if (this.options.noServer) throw new Error("The server is operating in \"noServer\" mode");
if (!this._server) return null;
return this._server.address();
}
@@ -18817,11 +18065,9 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
*/
close(cb) {
if (this._state === CLOSED) {
- if (cb) {
- this.once("close", () => {
- cb(new Error("The server is not running"));
- });
- }
+ if (cb) this.once("close", () => {
+ cb(/* @__PURE__ */ new Error("The server is not running"));
+ });
process.nextTick(emitClose, this);
return;
}
@@ -18833,15 +18079,9 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
this._removeListeners();
this._removeListeners = this._server = null;
}
- if (this.clients) {
- if (!this.clients.size) {
- process.nextTick(emitClose, this);
- } else {
- this._shouldEmitClose = true;
- }
- } else {
- process.nextTick(emitClose, this);
- }
+ if (this.clients) if (!this.clients.size) process.nextTick(emitClose, this);
+ else this._shouldEmitClose = true;
+ else process.nextTick(emitClose, this);
} else {
const server = this._server;
this._removeListeners();
@@ -18861,8 +18101,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
shouldHandle(req) {
if (this.options.path) {
const index = req.url.indexOf("?");
- const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
- if (pathname !== this.options.path) return false;
+ if ((index !== -1 ? req.url.slice(0, index) : req.url) !== this.options.path) return false;
}
return true;
}
@@ -18881,23 +18120,19 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
const upgrade = req.headers.upgrade;
const version = +req.headers["sec-websocket-version"];
if (req.method !== "GET") {
- const message = "Invalid HTTP method";
- abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
+ abortHandshakeOrEmitwsClientError(this, req, socket, 405, "Invalid HTTP method");
return;
}
- if (upgrade === undefined || upgrade.toLowerCase() !== "websocket") {
- const message = "Invalid Upgrade header";
- abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Upgrade header");
return;
}
- if (key === undefined || !keyRegex.test(key)) {
- const message = "Missing or invalid Sec-WebSocket-Key header";
- abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ if (key === void 0 || !keyRegex.test(key)) {
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Key header");
return;
}
if (version !== 13 && version !== 8) {
- const message = "Missing or invalid Sec-WebSocket-Version header";
- abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, { "Sec-WebSocket-Version": "13, 8" });
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Version header", { "Sec-WebSocket-Version": "13, 8" });
return;
}
if (!this.shouldHandle(req)) {
@@ -18905,19 +18140,16 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
return;
}
const secWebSocketProtocol = req.headers["sec-websocket-protocol"];
- let protocols = new Set();
- if (secWebSocketProtocol !== undefined) {
- try {
- protocols = subprotocol.parse(secWebSocketProtocol);
- } catch (err) {
- const message = "Invalid Sec-WebSocket-Protocol header";
- abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
- return;
- }
+ let protocols = /* @__PURE__ */ new Set();
+ if (secWebSocketProtocol !== void 0) try {
+ protocols = subprotocol.parse(secWebSocketProtocol);
+ } catch (err) {
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Sec-WebSocket-Protocol header");
+ return;
}
const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
const extensions = {};
- if (this.options.perMessageDeflate && secWebSocketExtensions !== undefined) {
+ if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {
const perMessageDeflate = new PerMessageDeflate(this.options.perMessageDeflate, true, this.options.maxPayload);
try {
const offers = extension.parse(secWebSocketExtensions);
@@ -18926,8 +18158,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
}
} catch (err) {
- const message = "Invalid or unacceptable Sec-WebSocket-Extensions header";
- abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid or unacceptable Sec-WebSocket-Extensions header");
return;
}
}
@@ -18939,9 +18170,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
};
if (this.options.verifyClient.length === 2) {
this.options.verifyClient(info, (verified, code, message, headers) => {
- if (!verified) {
- return abortHandshake(socket, code || 401, message, headers);
- }
+ if (!verified) return abortHandshake(socket, code || 401, message, headers);
this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
});
return;
@@ -18965,18 +18194,15 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
*/
completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
if (!socket.readable || !socket.writable) return socket.destroy();
- if (socket[kWebSocket]) {
- throw new Error("server.handleUpgrade() was called more than once with the same " + "socket, possibly due to a misconfiguration");
- }
+ if (socket[kWebSocket]) throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");
if (this._state > RUNNING) return abortHandshake(socket, 503);
- const digest = createHash$1("sha1").update(key + GUID).digest("base64");
const headers = [
"HTTP/1.1 101 Switching Protocols",
"Upgrade: websocket",
"Connection: Upgrade",
- `Sec-WebSocket-Accept: ${digest}`
+ `Sec-WebSocket-Accept: ${createHash$1("sha1").update(key + GUID).digest("base64")}`
];
- const ws = new this.options.WebSocket(null, undefined, this.options);
+ const ws = new this.options.WebSocket(null, void 0, this.options);
if (protocols.size) {
const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
if (protocol) {
@@ -19002,9 +18228,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
this.clients.add(ws);
ws.on("close", () => {
this.clients.delete(ws);
- if (this._shouldEmitClose && !this.clients.size) {
- process.nextTick(emitClose, this);
- }
+ if (this._shouldEmitClose && !this.clients.size) process.nextTick(emitClose, this);
});
}
cb(ws, req);
@@ -19024,9 +18248,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
function addListeners(server, map) {
for (const event of Object.keys(map)) server.on(event, map[event]);
return function removeListeners() {
- for (const event of Object.keys(map)) {
- server.removeListener(event, map[event]);
- }
+ for (const event of Object.keys(map)) server.removeListener(event, map[event]);
};
}
/**
@@ -19084,12 +18306,9 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
const err = new Error(message);
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
server.emit("wsClientError", err, socket, req);
- } else {
- abortHandshake(socket, code, message, headers);
- }
+ } else abortHandshake(socket, code, message, headers);
}
}));
-
//#endregion
//#region ../node_modules/ws/wrapper.mjs
var import_XMLHttpRequest = require_XMLHttpRequest();
@@ -19099,7 +18318,6 @@ var import_sender = /* @__PURE__ */ __toESM(require_sender$1(), 1);
var import_websocket = /* @__PURE__ */ __toESM(require_websocket$1(), 1);
var import_websocket_server = /* @__PURE__ */ __toESM(require_websocket_server(), 1);
var wrapper_default = import_websocket.default;
-
//#endregion
//#region ../node_modules/bignumber.js/bignumber.mjs
var bignumber_exports = /* @__PURE__ */ __exportAll({
@@ -19127,11 +18345,9 @@ function clone$2(configObject) {
if (b == null) {
if (v && v._isBigNumber === true) {
x.s = v.s;
- if (!v.c || v.e > MAX_EXP) {
- x.c = x.e = null;
- } else if (v.e < MIN_EXP) {
- x.c = [x.e = 0];
- } else {
+ if (!v.c || v.e > MAX_EXP) x.c = x.e = null;
+ else if (v.e < MIN_EXP) x.c = [x.e = 0];
+ else {
x.e = v.e;
x.c = v.c.slice();
}
@@ -19141,9 +18357,8 @@ function clone$2(configObject) {
x.s = 1 / v < 0 ? (v = -v, -1) : 1;
if (v === ~~v) {
for (e = 0, i = v; i >= 10; i /= 10, e++);
- if (e > MAX_EXP) {
- x.c = x.e = null;
- } else {
+ if (e > MAX_EXP) x.c = x.e = null;
+ else {
x.e = e;
x.c = [v];
}
@@ -19159,9 +18374,7 @@ function clone$2(configObject) {
if (e < 0) e = i;
e += +str.slice(i + 1);
str = str.substring(0, i);
- } else if (e < 0) {
- e = str.length;
- }
+ } else if (e < 0) e = str.length;
} else {
intCheck(b, 2, ALPHABET.length, "Base");
if (b == 10 && alphabetHasNormalDecimalDigits) {
@@ -19172,31 +18385,25 @@ function clone$2(configObject) {
if (isNum = typeof v == "number") {
if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
- if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
- throw Error(tooManyDigits + v);
- }
- } else {
- x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
- }
+ if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) throw Error(tooManyDigits + v);
+ } else x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
alphabet = ALPHABET.slice(0, b);
e = i = 0;
- for (len = str.length; i < len; i++) {
- if (alphabet.indexOf(c = str.charAt(i)) < 0) {
- if (c == ".") {
- if (i > e) {
- e = len;
- continue;
- }
- } else if (!caseChanged) {
- if (str == str.toUpperCase() && (str = str.toLowerCase()) || str == str.toLowerCase() && (str = str.toUpperCase())) {
- caseChanged = true;
- i = -1;
- e = 0;
- continue;
- }
+ for (len = str.length; i < len; i++) if (alphabet.indexOf(c = str.charAt(i)) < 0) {
+ if (c == ".") {
+ if (i > e) {
+ e = len;
+ continue;
+ }
+ } else if (!caseChanged) {
+ if (str == str.toUpperCase() && (str = str.toLowerCase()) || str == str.toLowerCase() && (str = str.toUpperCase())) {
+ caseChanged = true;
+ i = -1;
+ e = 0;
+ continue;
}
- return parseNumeric(x, String(v), isNum, b);
}
+ return parseNumeric(x, String(v), isNum, b);
}
isNum = false;
str = convertBase(str, b, 10, x.s);
@@ -19207,33 +18414,23 @@ function clone$2(configObject) {
for (len = str.length; str.charCodeAt(--len) === 48;);
if (str = str.slice(i, ++len)) {
len -= i;
- if (isNum && BigNumber.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
- throw Error(tooManyDigits + x.s * v);
- }
- if ((e = e - i - 1) > MAX_EXP) {
- x.c = x.e = null;
- } else if (e < MIN_EXP) {
- x.c = [x.e = 0];
- } else {
+ if (isNum && BigNumber.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) throw Error(tooManyDigits + x.s * v);
+ if ((e = e - i - 1) > MAX_EXP) x.c = x.e = null;
+ else if (e < MIN_EXP) x.c = [x.e = 0];
+ else {
x.e = e;
x.c = [];
i = (e + 1) % LOG_BASE;
if (e < 0) i += LOG_BASE;
if (i < len) {
if (i) x.c.push(+str.slice(0, i));
- for (len -= LOG_BASE; i < len;) {
- x.c.push(+str.slice(i, i += LOG_BASE));
- }
+ for (len -= LOG_BASE; i < len;) x.c.push(+str.slice(i, i += LOG_BASE));
i = LOG_BASE - (str = str.slice(i)).length;
- } else {
- i -= len;
- }
+ } else i -= len;
for (; i--; str += "0");
x.c.push(+str);
}
- } else {
- x.c = [x.e = 0];
- }
+ } else x.c = [x.e = 0];
}
BigNumber.clone = clone$2;
BigNumber.ROUND_UP = 0;
@@ -19248,91 +18445,75 @@ function clone$2(configObject) {
BigNumber.EUCLID = 9;
BigNumber.config = BigNumber.set = function(obj) {
var p, v;
- if (obj != null) {
- if (typeof obj == "object") {
- if (obj.hasOwnProperty(p = "DECIMAL_PLACES")) {
- v = obj[p];
- intCheck(v, 0, MAX, p);
- DECIMAL_PLACES = v;
- }
- if (obj.hasOwnProperty(p = "ROUNDING_MODE")) {
- v = obj[p];
- intCheck(v, 0, 8, p);
- ROUNDING_MODE = v;
- }
- if (obj.hasOwnProperty(p = "EXPONENTIAL_AT")) {
- v = obj[p];
- if (v && v.pop) {
- intCheck(v[0], -MAX, 0, p);
- intCheck(v[1], 0, MAX, p);
- TO_EXP_NEG = v[0];
- TO_EXP_POS = v[1];
- } else {
- intCheck(v, -MAX, MAX, p);
- TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
- }
- }
- if (obj.hasOwnProperty(p = "RANGE")) {
- v = obj[p];
- if (v && v.pop) {
- intCheck(v[0], -MAX, -1, p);
- intCheck(v[1], 1, MAX, p);
- MIN_EXP = v[0];
- MAX_EXP = v[1];
- } else {
- intCheck(v, -MAX, MAX, p);
- if (v) {
- MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
- } else {
- throw Error(bignumberError + p + " cannot be zero: " + v);
- }
- }
+ if (obj != null) if (typeof obj == "object") {
+ if (obj.hasOwnProperty(p = "DECIMAL_PLACES")) {
+ v = obj[p];
+ intCheck(v, 0, MAX, p);
+ DECIMAL_PLACES = v;
+ }
+ if (obj.hasOwnProperty(p = "ROUNDING_MODE")) {
+ v = obj[p];
+ intCheck(v, 0, 8, p);
+ ROUNDING_MODE = v;
+ }
+ if (obj.hasOwnProperty(p = "EXPONENTIAL_AT")) {
+ v = obj[p];
+ if (v && v.pop) {
+ intCheck(v[0], -MAX, 0, p);
+ intCheck(v[1], 0, MAX, p);
+ TO_EXP_NEG = v[0];
+ TO_EXP_POS = v[1];
+ } else {
+ intCheck(v, -MAX, MAX, p);
+ TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
}
- if (obj.hasOwnProperty(p = "CRYPTO")) {
- v = obj[p];
- if (v === !!v) {
- if (v) {
- if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) {
- CRYPTO = v;
- } else {
- CRYPTO = !v;
- throw Error(bignumberError + "crypto unavailable");
- }
- } else {
- CRYPTO = v;
- }
- } else {
- throw Error(bignumberError + p + " not true or false: " + v);
- }
+ }
+ if (obj.hasOwnProperty(p = "RANGE")) {
+ v = obj[p];
+ if (v && v.pop) {
+ intCheck(v[0], -MAX, -1, p);
+ intCheck(v[1], 1, MAX, p);
+ MIN_EXP = v[0];
+ MAX_EXP = v[1];
+ } else {
+ intCheck(v, -MAX, MAX, p);
+ if (v) MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
+ else throw Error(bignumberError + p + " cannot be zero: " + v);
}
- if (obj.hasOwnProperty(p = "MODULO_MODE")) {
- v = obj[p];
- intCheck(v, 0, 9, p);
- MODULO_MODE = v;
- }
- if (obj.hasOwnProperty(p = "POW_PRECISION")) {
- v = obj[p];
- intCheck(v, 0, MAX, p);
- POW_PRECISION = v;
- }
- if (obj.hasOwnProperty(p = "FORMAT")) {
- v = obj[p];
- if (typeof v == "object") FORMAT = v;
- else throw Error(bignumberError + p + " not an object: " + v);
- }
- if (obj.hasOwnProperty(p = "ALPHABET")) {
- v = obj[p];
- if (typeof v == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) {
- alphabetHasNormalDecimalDigits = v.slice(0, 10) == "0123456789";
- ALPHABET = v;
- } else {
- throw Error(bignumberError + p + " invalid: " + v);
- }
+ }
+ if (obj.hasOwnProperty(p = "CRYPTO")) {
+ v = obj[p];
+ if (v === !!v) if (v) if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) CRYPTO = v;
+ else {
+ CRYPTO = !v;
+ throw Error(bignumberError + "crypto unavailable");
}
- } else {
- throw Error(bignumberError + "Object expected: " + obj);
+ else CRYPTO = v;
+ else throw Error(bignumberError + p + " not true or false: " + v);
}
- }
+ if (obj.hasOwnProperty(p = "MODULO_MODE")) {
+ v = obj[p];
+ intCheck(v, 0, 9, p);
+ MODULO_MODE = v;
+ }
+ if (obj.hasOwnProperty(p = "POW_PRECISION")) {
+ v = obj[p];
+ intCheck(v, 0, MAX, p);
+ POW_PRECISION = v;
+ }
+ if (obj.hasOwnProperty(p = "FORMAT")) {
+ v = obj[p];
+ if (typeof v == "object") FORMAT = v;
+ else throw Error(bignumberError + p + " not an object: " + v);
+ }
+ if (obj.hasOwnProperty(p = "ALPHABET")) {
+ v = obj[p];
+ if (typeof v == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) {
+ alphabetHasNormalDecimalDigits = v.slice(0, 10) == "0123456789";
+ ALPHABET = v;
+ } else throw Error(bignumberError + p + " invalid: " + v);
+ }
+ } else throw Error(bignumberError + "Object expected: " + obj);
return {
DECIMAL_PLACES,
ROUNDING_MODE,
@@ -19365,9 +18546,7 @@ function clone$2(configObject) {
if (n !== 0) return true;
}
}
- } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {
- return true;
- }
+ } else if (c === null && e === null && (s === null || s === 1 || s === -1)) return true;
throw Error(bignumberError + "Invalid BigNumber: " + v);
};
BigNumber.maximum = BigNumber.max = function() {
@@ -19388,43 +18567,38 @@ function clone$2(configObject) {
if (dp == null) dp = DECIMAL_PLACES;
else intCheck(dp, 0, MAX);
k = mathceil(dp / LOG_BASE);
- if (CRYPTO) {
- if (crypto.getRandomValues) {
- a = crypto.getRandomValues(new Uint32Array(k *= 2));
- for (; i < k;) {
- v = a[i] * 131072 + (a[i + 1] >>> 11);
- if (v >= 9e15) {
- b = crypto.getRandomValues(new Uint32Array(2));
- a[i] = b[0];
- a[i + 1] = b[1];
- } else {
- c.push(v % 0x5af3107a4000);
- i += 2;
- }
- }
- i = k / 2;
- } else if (crypto.randomBytes) {
- a = crypto.randomBytes(k *= 7);
- for (; i < k;) {
- v = (a[i] & 31) * 281474976710656 + a[i + 1] * 1099511627776 + a[i + 2] * 4294967296 + a[i + 3] * 16777216 + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
- if (v >= 9e15) {
- crypto.randomBytes(7).copy(a, i);
- } else {
- c.push(v % 0x5af3107a4000);
- i += 7;
- }
+ if (CRYPTO) if (crypto.getRandomValues) {
+ a = crypto.getRandomValues(new Uint32Array(k *= 2));
+ for (; i < k;) {
+ v = a[i] * 131072 + (a[i + 1] >>> 11);
+ if (v >= 9e15) {
+ b = crypto.getRandomValues(new Uint32Array(2));
+ a[i] = b[0];
+ a[i + 1] = b[1];
+ } else {
+ c.push(v % 0x5af3107a4000);
+ i += 2;
}
- i = k / 7;
- } else {
- CRYPTO = false;
- throw Error(bignumberError + "crypto unavailable");
}
- }
- if (!CRYPTO) {
+ i = k / 2;
+ } else if (crypto.randomBytes) {
+ a = crypto.randomBytes(k *= 7);
for (; i < k;) {
- v = random53bitInt();
- if (v < 9e15) c[i++] = v % 0x5af3107a4000;
+ v = (a[i] & 31) * 281474976710656 + a[i + 1] * 1099511627776 + a[i + 2] * 4294967296 + a[i + 3] * 16777216 + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
+ if (v >= 9e15) crypto.randomBytes(7).copy(a, i);
+ else {
+ c.push(v % 0x5af3107a4000);
+ i += 7;
+ }
}
+ i = k / 7;
+ } else {
+ CRYPTO = false;
+ throw Error(bignumberError + "crypto unavailable");
+ }
+ if (!CRYPTO) for (; i < k;) {
+ v = random53bitInt();
+ if (v < 9e15) c[i++] = v % 0x5af3107a4000;
}
k = c[--i];
dp %= LOG_BASE;
@@ -19433,9 +18607,8 @@ function clone$2(configObject) {
c[i] = mathfloor(k / v) * v;
}
for (; c[i] === 0; c.pop(), i--);
- if (i < 0) {
- c = [e = 0];
- } else {
+ if (i < 0) c = [e = 0];
+ else {
for (e = -1; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);
for (i = 1, v = c[0]; v >= 10; v /= 10, i++);
if (i < LOG_BASE) e -= LOG_BASE - i;
@@ -19457,12 +18630,10 @@ function clone$2(configObject) {
for (; i < len;) {
for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);
arr[0] += alphabet.indexOf(str.charAt(i++));
- for (j = 0; j < arr.length; j++) {
- if (arr[j] > baseOut - 1) {
- if (arr[j + 1] == null) arr[j + 1] = 0;
- arr[j + 1] += arr[j] / baseOut | 0;
- arr[j] %= baseOut;
- }
+ for (j = 0; j < arr.length; j++) if (arr[j] > baseOut - 1) {
+ if (arr[j + 1] == null) arr[j + 1] = 0;
+ arr[j + 1] += arr[j] / baseOut | 0;
+ arr[j] %= baseOut;
}
}
return arr.reverse();
@@ -19483,9 +18654,8 @@ function clone$2(configObject) {
e = k = xc.length;
for (; xc[--k] == 0; xc.pop());
if (!xc[0]) return alphabet.charAt(0);
- if (i < 0) {
- --e;
- } else {
+ if (i < 0) --e;
+ else {
x.c = xc;
x.e = e;
x.s = sign;
@@ -19499,17 +18669,14 @@ function clone$2(configObject) {
k = baseOut / 2;
r = r || d < 0 || xc[d + 1] != null;
r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i > k || i == k && (rm == 4 || r || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
- if (d < 1 || !xc[0]) {
- str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
- } else {
+ if (d < 1 || !xc[0]) str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
+ else {
xc.length = d;
- if (r) {
- for (--baseOut; ++xc[--d] > baseOut;) {
- xc[d] = 0;
- if (!d) {
- ++e;
- xc = [1].concat(xc);
- }
+ if (r) for (--baseOut; ++xc[--d] > baseOut;) {
+ xc[d] = 0;
+ if (!d) {
+ ++e;
+ xc = [1].concat(xc);
}
}
for (k = xc.length; !xc[--k];);
@@ -19535,15 +18702,10 @@ function clone$2(configObject) {
}
function compare(a, b, aL, bL) {
var i, cmp;
- if (aL != bL) {
- cmp = aL > bL ? 1 : -1;
- } else {
- for (i = cmp = 0; i < aL; i++) {
- if (a[i] != b[i]) {
- cmp = a[i] > b[i] ? 1 : -1;
- break;
- }
- }
+ if (aL != bL) cmp = aL > bL ? 1 : -1;
+ else for (i = cmp = 0; i < aL; i++) if (a[i] != b[i]) {
+ cmp = a[i] > b[i] ? 1 : -1;
+ break;
}
return cmp;
}
@@ -19558,9 +18720,7 @@ function clone$2(configObject) {
}
return function(x, y, dp, rm, base) {
var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s = x.s == y.s ? 1 : -1, xc = x.c, yc = y.c;
- if (!xc || !xc[0] || !yc || !yc[0]) {
- return new BigNumber(!x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : xc && xc[0] == 0 || !yc ? s * 0 : s / 0);
- }
+ if (!xc || !xc[0] || !yc || !yc[0]) return new BigNumber(!x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : xc && xc[0] == 0 || !yc ? s * 0 : s / 0);
q = new BigNumber(s);
qc = q.c = [];
e = x.e - y.e;
@@ -19614,30 +18774,25 @@ function clone$2(configObject) {
cmp = 1;
}
} else {
- if (n == 0) {
- cmp = n = 1;
- }
+ if (n == 0) cmp = n = 1;
prod = yc.slice();
prodL = prod.length;
}
if (prodL < remL) prod = [0].concat(prod);
subtract(rem, prod, remL, base);
remL = rem.length;
- if (cmp == -1) {
- while (compare(yc, rem, yL, remL) < 1) {
- n++;
- subtract(rem, yL < remL ? yz : yc, remL, base);
- remL = rem.length;
- }
+ if (cmp == -1) while (compare(yc, rem, yL, remL) < 1) {
+ n++;
+ subtract(rem, yL < remL ? yz : yc, remL, base);
+ remL = rem.length;
}
} else if (cmp === 0) {
n++;
rem = [0];
}
qc[i++] = n;
- if (rem[0]) {
- rem[remL++] = xc[xi] || 0;
- } else {
+ if (rem[0]) rem[remL++] = xc[xi] || 0;
+ else {
rem = [xc[xi]];
remL = 1;
}
@@ -19693,9 +18848,7 @@ function clone$2(configObject) {
var k, y, i = 1, x = new BigNumber(args[0]);
for (; i < args.length; i++) {
y = new BigNumber(args[i]);
- if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
- x = y;
- }
+ if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) x = y;
}
return x;
}
@@ -19703,11 +18856,9 @@ function clone$2(configObject) {
var i = 1, j = c.length;
for (; !c[--j]; c.pop());
for (j = c[0]; j >= 10; j /= 10, i++);
- if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {
- n.c = n.e = null;
- } else if (e < MIN_EXP) {
- n.c = [n.e = 0];
- } else {
+ if ((e = i + e * LOG_BASE - 1) > MAX_EXP) n.c = n.e = null;
+ else if (e < MIN_EXP) n.c = [n.e = 0];
+ else {
n.e = e;
n.c = c;
}
@@ -19717,9 +18868,8 @@ function clone$2(configObject) {
var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
return function(x, str, isNum, b) {
var base, s = isNum ? str : str.replace(whitespaceOrPlus, "");
- if (isInfinityOrNaN.test(s)) {
- x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
- } else {
+ if (isInfinityOrNaN.test(s)) x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
+ else {
if (!isNum) {
s = s.replace(basePrefix, function(m, p1, p2) {
base = (p2 = p2.toLowerCase()) == "x" ? 16 : p2 == "b" ? 2 : 8;
@@ -19731,9 +18881,7 @@ function clone$2(configObject) {
}
if (str != s) return new BigNumber(s, base);
}
- if (BigNumber.DEBUG) {
- throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str);
- }
+ if (BigNumber.DEBUG) throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str);
x.s = null;
}
x.c = x.e = null;
@@ -19752,17 +18900,14 @@ function clone$2(configObject) {
rd = mathfloor(n / pows10[d - j - 1] % 10);
} else {
ni = mathceil((i + 1) / LOG_BASE);
- if (ni >= xc.length) {
- if (r) {
- for (; xc.length <= ni; xc.push(0));
- n = rd = 0;
- d = 1;
- i %= LOG_BASE;
- j = i - LOG_BASE + 1;
- } else {
- break out;
- }
- } else {
+ if (ni >= xc.length) if (r) {
+ for (; xc.length <= ni; xc.push(0));
+ n = rd = 0;
+ d = 1;
+ i %= LOG_BASE;
+ j = i - LOG_BASE + 1;
+ } else break out;
+ else {
n = k = xc[ni];
for (d = 1; k >= 10; k /= 10, d++);
i %= LOG_BASE;
@@ -19778,9 +18923,7 @@ function clone$2(configObject) {
sd -= x.e + 1;
xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
x.e = -sd || 0;
- } else {
- xc[0] = x.e = 0;
- }
+ } else xc[0] = x.e = 0;
return x;
}
if (i == 0) {
@@ -19792,32 +18935,25 @@ function clone$2(configObject) {
k = pows10[LOG_BASE - i];
xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;
}
- if (r) {
- for (;;) {
- if (ni == 0) {
- for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);
- j = xc[0] += k;
- for (k = 1; j >= 10; j /= 10, k++);
- if (i != k) {
- x.e++;
- if (xc[0] == BASE) xc[0] = 1;
- }
- break;
- } else {
- xc[ni] += k;
- if (xc[ni] != BASE) break;
- xc[ni--] = 0;
- k = 1;
- }
+ if (r) for (;;) if (ni == 0) {
+ for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);
+ j = xc[0] += k;
+ for (k = 1; j >= 10; j /= 10, k++);
+ if (i != k) {
+ x.e++;
+ if (xc[0] == BASE) xc[0] = 1;
}
+ break;
+ } else {
+ xc[ni] += k;
+ if (xc[ni] != BASE) break;
+ xc[ni--] = 0;
+ k = 1;
}
for (i = xc.length; xc[--i] === 0; xc.pop());
}
- if (x.e > MAX_EXP) {
- x.c = x.e = null;
- } else if (x.e < MIN_EXP) {
- x.c = [x.e = 0];
- }
+ if (x.e > MAX_EXP) x.c = x.e = null;
+ else if (x.e < MIN_EXP) x.c = [x.e = 0];
}
return x;
}
@@ -19859,9 +18995,7 @@ function clone$2(configObject) {
P.exponentiatedBy = P.pow = function(n, m) {
var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this;
n = new BigNumber(n);
- if (n.c && !n.isInteger()) {
- throw Error(bignumberError + "Exponent not an integer: " + valueOf(n));
- }
+ if (n.c && !n.isInteger()) throw Error(bignumberError + "Exponent not an integer: " + valueOf(n));
if (m != null) m = new BigNumber(m);
nIsBig = n.e > 14;
if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
@@ -19877,9 +19011,7 @@ function clone$2(configObject) {
k = x.s < 0 && isOdd(n) ? -0 : 0;
if (x.e > -1) k = 1 / k;
return new BigNumber(nIsNeg ? 1 / k : k);
- } else if (POW_PRECISION) {
- k = mathceil(POW_PRECISION / LOG_BASE + 2);
- }
+ } else if (POW_PRECISION) k = mathceil(POW_PRECISION / LOG_BASE + 2);
if (nIsBig) {
half = new BigNumber(.5);
if (nIsNeg) n.s = 1;
@@ -19895,9 +19027,7 @@ function clone$2(configObject) {
if (!y.c) break;
if (k) {
if (y.c.length > k) y.c.length = k;
- } else if (isModExp) {
- y = y.mod(m);
- }
+ } else if (isModExp) y = y.mod(m);
}
if (i) {
i = mathfloor(i / 2);
@@ -19906,9 +19036,8 @@ function clone$2(configObject) {
} else {
n = n.times(half);
round(n, n.e + 1, 1);
- if (n.e > 14) {
- nIsOdd = isOdd(n);
- } else {
+ if (n.e > 14) nIsOdd = isOdd(n);
+ else {
i = +valueOf(n);
if (i === 0) break;
nIsOdd = i % 2;
@@ -19917,9 +19046,7 @@ function clone$2(configObject) {
x = x.times(x);
if (k) {
if (x.c && x.c.length > k) x.c.length = k;
- } else if (isModExp) {
- x = x.mod(m);
- }
+ } else if (isModExp) x = x.mod(m);
}
if (isModExp) return y;
if (nIsNeg) y = ONE.div(y);
@@ -19976,9 +19103,7 @@ function clone$2(configObject) {
var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
if (!xe || !ye) {
if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);
- if (!xc[0] || !yc[0]) {
- return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : ROUNDING_MODE == 3 ? -0 : 0);
- }
+ if (!xc[0] || !yc[0]) return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : ROUNDING_MODE == 3 ? -0 : 0);
}
xe = bitFloor(xe);
ye = bitFloor(ye);
@@ -19996,11 +19121,9 @@ function clone$2(configObject) {
t.reverse();
} else {
j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;
- for (a = b = 0; b < j; b++) {
- if (xc[b] != yc[b]) {
- xLTy = xc[b] < yc[b];
- break;
- }
+ for (a = b = 0; b < j; b++) if (xc[b] != yc[b]) {
+ xLTy = xc[b] < yc[b];
+ break;
}
}
if (xLTy) {
@@ -20031,20 +19154,15 @@ function clone$2(configObject) {
P.modulo = P.mod = function(y, b) {
var q, s, x = this;
y = new BigNumber(y, b);
- if (!x.c || !y.s || y.c && !y.c[0]) {
- return new BigNumber(NaN);
- } else if (!y.c || x.c && !x.c[0]) {
- return new BigNumber(x);
- }
+ if (!x.c || !y.s || y.c && !y.c[0]) return new BigNumber(NaN);
+ else if (!y.c || x.c && !x.c[0]) return new BigNumber(x);
if (MODULO_MODE == 9) {
s = y.s;
y.s = 1;
q = div(x, y, 0, 3);
y.s = s;
q.s *= s;
- } else {
- q = div(x, y, 0, MODULO_MODE);
- }
+ } else q = div(x, y, 0, MODULO_MODE);
y = x.minus(q.times(y));
if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;
return y;
@@ -20052,13 +19170,11 @@ function clone$2(configObject) {
P.multipliedBy = P.times = function(y, b) {
var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber(y, b)).c;
if (!xc || !yc || !xc[0] || !yc[0]) {
- if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
- y.c = y.e = y.s = null;
- } else {
+ if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) y.c = y.e = y.s = null;
+ else {
y.s *= x.s;
- if (!xc || !yc) {
- y.c = y.e = null;
- } else {
+ if (!xc || !yc) y.c = y.e = null;
+ else {
y.c = [0];
y.e = 0;
}
@@ -20094,11 +19210,8 @@ function clone$2(configObject) {
}
zc[j] = c;
}
- if (c) {
- ++e;
- } else {
- zc.splice(0, 1);
- }
+ if (c) ++e;
+ else zc.splice(0, 1);
return normalise(y, zc, e);
};
P.negated = function() {
@@ -20177,25 +19290,20 @@ function clone$2(configObject) {
};
P.squareRoot = P.sqrt = function() {
var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber("0.5");
- if (s !== 1 || !c || !c[0]) {
- return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
- }
+ if (s !== 1 || !c || !c[0]) return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : Infinity);
s = Math.sqrt(+valueOf(x));
- if (s == 0 || s == 1 / 0) {
+ if (s == 0 || s == Infinity) {
n = coeffToString(c);
if ((n.length + e) % 2 == 0) n += "0";
s = Math.sqrt(+n);
e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
- if (s == 1 / 0) {
- n = "5e" + e;
- } else {
+ if (s == Infinity) n = "5e" + e;
+ else {
n = s.toExponential();
n = n.slice(0, n.indexOf("e") + 1) + e;
}
r = new BigNumber(n);
- } else {
- r = new BigNumber(s + "");
- }
+ } else r = new BigNumber(s + "");
if (r.c[0]) {
e = r.e;
s = e + dp;
@@ -20245,19 +19353,14 @@ function clone$2(configObject) {
};
P.toFormat = function(dp, rm, format) {
var str, x = this;
- if (format == null) {
- if (dp != null && rm && typeof rm == "object") {
- format = rm;
- rm = null;
- } else if (dp && typeof dp == "object") {
- format = dp;
- dp = rm = null;
- } else {
- format = FORMAT;
- }
- } else if (typeof format != "object") {
- throw Error(bignumberError + "Argument not an object: " + format);
- }
+ if (format == null) if (dp != null && rm && typeof rm == "object") {
+ format = rm;
+ rm = null;
+ } else if (dp && typeof dp == "object") {
+ format = dp;
+ dp = rm = null;
+ } else format = FORMAT;
+ else if (typeof format != "object") throw Error(bignumberError + "Argument not an object: " + format);
str = x.toFixed(dp, rm);
if (x.c) {
var i, arr = str.split("."), g1 = +format.groupSize, g2 = +format.secondaryGroupSize, groupSeparator = format.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
@@ -20282,9 +19385,7 @@ function clone$2(configObject) {
var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c;
if (md != null) {
n = new BigNumber(md);
- if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
- throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n));
- }
+ if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n));
}
if (!xc) return new BigNumber(x);
d = new BigNumber(ONE);
@@ -20295,7 +19396,7 @@ function clone$2(configObject) {
d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
md = !md || n.comparedTo(d) > 0 ? e > 0 ? d : n1 : n;
exp = MAX_EXP;
- MAX_EXP = 1 / 0;
+ MAX_EXP = Infinity;
n = new BigNumber(s);
n0.c[0] = 0;
for (;;) {
@@ -20327,17 +19428,13 @@ function clone$2(configObject) {
};
P.toString = function(b) {
var str, n = this, s = n.s, e = n.e;
- if (e === null) {
- if (s) {
- str = "Infinity";
- if (s < 0) str = "-" + str;
- } else {
- str = "NaN";
- }
- } else {
- if (b == null) {
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0");
- } else if (b === 10 && alphabetHasNormalDecimalDigits) {
+ if (e === null) if (s) {
+ str = "Infinity";
+ if (s < 0) str = "-" + str;
+ } else str = "NaN";
+ else {
+ if (b == null) str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0");
+ else if (b === 10 && alphabetHasNormalDecimalDigits) {
n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
str = toFixedPoint(coeffToString(n.c), n.e, "0");
} else {
@@ -20388,9 +19485,7 @@ function compare(x, y) {
return k == l ? 0 : k > l ^ a ? 1 : -1;
}
function intCheck(n, min, max, name) {
- if (n < min || n > max || n !== mathfloor(n)) {
- throw Error(bignumberError + (name || "Argument") + (typeof n == "number" ? n < min || n > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n));
- }
+ if (n < min || n > max || n !== mathfloor(n)) throw Error(bignumberError + (name || "Argument") + (typeof n == "number" ? n < min || n > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n));
}
function isOdd(n) {
var k = n.c.length - 1;
@@ -20409,9 +19504,7 @@ function toFixedPoint(str, e, z) {
if (++e > len) {
for (zs = z, e -= len; --e; zs += z);
str += zs;
- } else if (e < len) {
- str = str.slice(0, e) + "." + str.slice(e);
- }
+ } else if (e < len) str = str.slice(0, e) + "." + str.slice(e);
}
return str;
}
@@ -20435,7 +19528,6 @@ var init_bignumber = __esmMin((() => {
], SQRT_BASE = 1e7, MAX = 1e9;
BigNumber = clone$2();
}));
-
//#endregion
//#region ../node_modules/json-bigint/lib/stringify.js
var require_stringify$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -20443,9 +19535,6 @@ var require_stringify$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var JSON = module.exports;
(function() {
"use strict";
- function f(n) {
- return n < 10 ? "0" + n : n;
- }
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = {
"\b": "\\b",
" ": "\\t",
@@ -20464,83 +19553,54 @@ var require_stringify$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function str(key, holder) {
var i, k, v, length, mind = gap, partial, value = holder[key], isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value));
- if (value && typeof value === "object" && typeof value.toJSON === "function") {
- value = value.toJSON(key);
- }
- if (typeof rep === "function") {
- value = rep.call(holder, key, value);
- }
+ if (value && typeof value === "object" && typeof value.toJSON === "function") value = value.toJSON(key);
+ if (typeof rep === "function") value = rep.call(holder, key, value);
switch (typeof value) {
- case "string": if (isBigNumber) {
- return value;
- } else {
- return quote(value);
- }
+ case "string": if (isBigNumber) return value;
+ else return quote(value);
case "number": return isFinite(value) ? String(value) : "null";
case "boolean":
case "null":
case "bigint": return String(value);
case "object":
- if (!value) {
- return "null";
- }
+ if (!value) return "null";
gap += indent;
partial = [];
if (Object.prototype.toString.apply(value) === "[object Array]") {
length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || "null";
- }
+ for (i = 0; i < length; i += 1) partial[i] = str(i, value) || "null";
v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]";
gap = mind;
return v;
}
if (rep && typeof rep === "object") {
length = rep.length;
- for (i = 0; i < length; i += 1) {
- if (typeof rep[i] === "string") {
- k = rep[i];
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ": " : ":") + v);
- }
- }
+ for (i = 0; i < length; i += 1) if (typeof rep[i] === "string") {
+ k = rep[i];
+ v = str(k, value);
+ if (v) partial.push(quote(k) + (gap ? ": " : ":") + v);
}
- } else {
- Object.keys(value).forEach(function(k) {
- var v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ": " : ":") + v);
- }
- });
- }
+ } else Object.keys(value).forEach(function(k) {
+ var v = str(k, value);
+ if (v) partial.push(quote(k) + (gap ? ": " : ":") + v);
+ });
v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}";
gap = mind;
return v;
}
}
- if (typeof JSON.stringify !== "function") {
- JSON.stringify = function(value, replacer, space) {
- var i;
- gap = "";
- indent = "";
- if (typeof space === "number") {
- for (i = 0; i < space; i += 1) {
- indent += " ";
- }
- } else if (typeof space === "string") {
- indent = space;
- }
- rep = replacer;
- if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) {
- throw new Error("JSON.stringify");
- }
- return str("", { "": value });
- };
- }
+ if (typeof JSON.stringify !== "function") JSON.stringify = function(value, replacer, space) {
+ var i;
+ gap = "";
+ indent = "";
+ if (typeof space === "number") for (i = 0; i < space; i += 1) indent += " ";
+ else if (typeof space === "string") indent = space;
+ rep = replacer;
+ if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) throw new Error("JSON.stringify");
+ return str("", { "": value });
+ };
})();
}));
-
//#endregion
//#region ../node_modules/json-bigint/lib/parse.js
var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -20557,29 +19617,15 @@ var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
protoAction: "error",
constructorAction: "error"
};
- if (options !== undefined && options !== null) {
- if (options.strict === true) {
- _options.strict = true;
- }
- if (options.storeAsString === true) {
- _options.storeAsString = true;
- }
+ if (options !== void 0 && options !== null) {
+ if (options.strict === true) _options.strict = true;
+ if (options.storeAsString === true) _options.storeAsString = true;
_options.alwaysParseAsBig = options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false;
_options.useNativeBigInt = options.useNativeBigInt === true ? options.useNativeBigInt : false;
- if (typeof options.constructorAction !== "undefined") {
- if (options.constructorAction === "error" || options.constructorAction === "ignore" || options.constructorAction === "preserve") {
- _options.constructorAction = options.constructorAction;
- } else {
- throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}`);
- }
- }
- if (typeof options.protoAction !== "undefined") {
- if (options.protoAction === "error" || options.protoAction === "ignore" || options.protoAction === "preserve") {
- _options.protoAction = options.protoAction;
- } else {
- throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}`);
- }
- }
+ if (typeof options.constructorAction !== "undefined") if (options.constructorAction === "error" || options.constructorAction === "ignore" || options.constructorAction === "preserve") _options.constructorAction = options.constructorAction;
+ else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}`);
+ if (typeof options.protoAction !== "undefined") if (options.protoAction === "error" || options.protoAction === "ignore" || options.protoAction === "preserve") _options.protoAction = options.protoAction;
+ else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}`);
}
var at, ch, escapee = {
"\"": "\"",
@@ -20598,9 +19644,7 @@ var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
text
};
}, next = function(c) {
- if (c && c !== ch) {
- error("Expected '" + c + "' instead of '" + ch + "'");
- }
+ if (c && c !== ch) error("Expected '" + c + "' instead of '" + ch + "'");
ch = text.charAt(at);
at += 1;
return ch;
@@ -20616,9 +19660,7 @@ var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (ch === ".") {
string += ".";
- while (next() && ch >= "0" && ch <= "9") {
- string += ch;
- }
+ while (next() && ch >= "0" && ch <= "9") string += ch;
}
if (ch === "e" || ch === "E") {
string += ch;
@@ -20633,9 +19675,8 @@ var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
number = +string;
- if (!isFinite(number)) {
- error("Bad number");
- } else {
+ if (!isFinite(number)) error("Bad number");
+ else {
if (BigNumber == null) BigNumber = (init_bignumber(), __toCommonJS(bignumber_exports));
if (string.length > 15) return _options.storeAsString ? string : _options.useNativeBigInt ? BigInt(string) : new BigNumber(string);
else return !_options.alwaysParseAsBig ? number : _options.useNativeBigInt ? BigInt(number) : new BigNumber(number);
@@ -20657,26 +19698,19 @@ var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
uffff = 0;
for (i = 0; i < 4; i += 1) {
hex = parseInt(next(), 16);
- if (!isFinite(hex)) {
- break;
- }
+ if (!isFinite(hex)) break;
uffff = uffff * 16 + hex;
}
string += String.fromCharCode(uffff);
- } else if (typeof escapee[ch] === "string") {
- string += escapee[ch];
- } else {
- break;
- }
+ } else if (typeof escapee[ch] === "string") string += escapee[ch];
+ else break;
startAt = at;
}
}
}
error("Bad string");
}, white = function() {
- while (ch && ch <= " ") {
- next();
- }
+ while (ch && ch <= " ") next();
}, word = function() {
switch (ch) {
case "t":
@@ -20734,28 +19768,14 @@ var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
key = string();
white();
next(":");
- if (_options.strict === true && Object.hasOwnProperty.call(object, key)) {
- error("Duplicate key \"" + key + "\"");
- }
- if (suspectProtoRx.test(key) === true) {
- if (_options.protoAction === "error") {
- error("Object contains forbidden prototype property");
- } else if (_options.protoAction === "ignore") {
- value();
- } else {
- object[key] = value();
- }
- } else if (suspectConstructorRx.test(key) === true) {
- if (_options.constructorAction === "error") {
- error("Object contains forbidden constructor property");
- } else if (_options.constructorAction === "ignore") {
- value();
- } else {
- object[key] = value();
- }
- } else {
- object[key] = value();
- }
+ if (_options.strict === true && Object.hasOwnProperty.call(object, key)) error("Duplicate key \"" + key + "\"");
+ if (suspectProtoRx.test(key) === true) if (_options.protoAction === "error") error("Object contains forbidden prototype property");
+ else if (_options.protoAction === "ignore") value();
+ else object[key] = value();
+ else if (suspectConstructorRx.test(key) === true) if (_options.constructorAction === "error") error("Object contains forbidden constructor property");
+ else if (_options.constructorAction === "ignore") value();
+ else object[key] = value();
+ else object[key] = value();
white();
if (ch === "}") {
next("}");
@@ -20784,28 +19804,20 @@ var require_parse$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ch = " ";
result = value();
white();
- if (ch) {
- error("Syntax error");
- }
+ if (ch) error("Syntax error");
return typeof reviver === "function" ? (function walk(holder, key) {
var k, v, value = holder[key];
- if (value && typeof value === "object") {
- Object.keys(value).forEach(function(k) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- });
- }
+ if (value && typeof value === "object") Object.keys(value).forEach(function(k) {
+ v = walk(value, k);
+ if (v !== void 0) value[k] = v;
+ else delete value[k];
+ });
return reviver.call(holder, key, value);
})({ "": result }, "") : result;
};
};
module.exports = json_parse;
}));
-
//#endregion
//#region ../node_modules/json-bigint/index.js
var require_json_bigint = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -20820,7 +19832,6 @@ var require_json_bigint = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.parse = json_parse();
module.exports.stringify = json_stringify;
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/forge.js
var require_forge = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -20833,7 +19844,6 @@ var require_forge = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
module.exports = { options: { usePureJavaScript: false } };
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/baseN.js
var require_baseN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -20880,16 +19890,11 @@ var require_baseN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the baseN-encoded output string.
*/
api.encode = function(input, alphabet, maxline) {
- if (typeof alphabet !== "string") {
- throw new TypeError("\"alphabet\" must be a string.");
- }
- if (maxline !== undefined && typeof maxline !== "number") {
- throw new TypeError("\"maxline\" must be a number.");
- }
+ if (typeof alphabet !== "string") throw new TypeError("\"alphabet\" must be a string.");
+ if (maxline !== void 0 && typeof maxline !== "number") throw new TypeError("\"maxline\" must be a number.");
var output = "";
- if (!(input instanceof Uint8Array)) {
- output = _encodeWithByteBuffer(input, alphabet);
- } else {
+ if (!(input instanceof Uint8Array)) output = _encodeWithByteBuffer(input, alphabet);
+ else {
var i = 0;
var base = alphabet.length;
var first = alphabet.charAt(0);
@@ -20905,12 +19910,8 @@ var require_baseN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
carry = carry / base | 0;
}
}
- for (i = 0; input[i] === 0 && i < input.length - 1; ++i) {
- output += first;
- }
- for (i = digits.length - 1; i >= 0; --i) {
- output += alphabet[digits[i]];
- }
+ for (i = 0; input[i] === 0 && i < input.length - 1; ++i) output += first;
+ for (i = digits.length - 1; i >= 0; --i) output += alphabet[digits[i]];
}
if (maxline) {
var regex = new RegExp(".{1," + maxline + "}", "g");
@@ -20927,18 +19928,12 @@ var require_baseN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the Uint8Array.
*/
api.decode = function(input, alphabet) {
- if (typeof input !== "string") {
- throw new TypeError("\"input\" must be a string.");
- }
- if (typeof alphabet !== "string") {
- throw new TypeError("\"alphabet\" must be a string.");
- }
+ if (typeof input !== "string") throw new TypeError("\"input\" must be a string.");
+ if (typeof alphabet !== "string") throw new TypeError("\"alphabet\" must be a string.");
var table = _reverseAlphabets[alphabet];
if (!table) {
table = _reverseAlphabets[alphabet] = [];
- for (var i = 0; i < alphabet.length; ++i) {
- table[alphabet.charCodeAt(i)] = i;
- }
+ for (var i = 0; i < alphabet.length; ++i) table[alphabet.charCodeAt(i)] = i;
}
input = input.replace(/\s/g, "");
var base = alphabet.length;
@@ -20946,9 +19941,7 @@ var require_baseN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var bytes = [0];
for (var i = 0; i < input.length; i++) {
var value = table[input.charCodeAt(i)];
- if (value === undefined) {
- return;
- }
+ if (value === void 0) return;
for (var j = 0, carry = value; j < bytes.length; ++j) {
carry += bytes[j] * base;
bytes[j] = carry & 255;
@@ -20959,12 +19952,8 @@ var require_baseN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
carry >>= 8;
}
}
- for (var k = 0; input[k] === first && k < input.length - 1; ++k) {
- bytes.push(0);
- }
- if (typeof Buffer !== "undefined") {
- return Buffer.from(bytes.reverse());
- }
+ for (var k = 0; input[k] === first && k < input.length - 1; ++k) bytes.push(0);
+ if (typeof Buffer !== "undefined") return Buffer.from(bytes.reverse());
return new Uint8Array(bytes.reverse());
};
function _encodeWithByteBuffer(input, alphabet) {
@@ -20984,16 +19973,11 @@ var require_baseN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
var output = "";
- for (i = 0; input.at(i) === 0 && i < input.length() - 1; ++i) {
- output += first;
- }
- for (i = digits.length - 1; i >= 0; --i) {
- output += alphabet[digits[i]];
- }
+ for (i = 0; input.at(i) === 0 && i < input.length() - 1; ++i) output += first;
+ for (i = digits.length - 1; i >= 0; --i) output += alphabet[digits[i]];
return output;
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/util.js
var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -21010,16 +19994,13 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
(function() {
if (typeof process !== "undefined" && process.nextTick && !process.browser) {
util.nextTick = process.nextTick;
- if (typeof setImmediate === "function") {
- util.setImmediate = setImmediate;
- } else {
- util.setImmediate = util.nextTick;
- }
+ if (typeof setImmediate === "function") util.setImmediate = setImmediate;
+ else util.setImmediate = util.nextTick;
return;
}
if (typeof setImmediate === "function") {
util.setImmediate = function() {
- return setImmediate.apply(undefined, arguments);
+ return setImmediate.apply(void 0, arguments);
};
util.nextTick = function(callback) {
return setImmediate(callback);
@@ -21034,9 +20015,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var callbacks = [];
util.setImmediate = function(callback) {
callbacks.push(callback);
- if (callbacks.length === 1) {
- window.postMessage(msg, "*");
- }
+ if (callbacks.length === 1) window.postMessage(msg, "*");
};
function handler(event) {
if (event.source === window && event.data === msg) {
@@ -21069,9 +20048,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
oldSetImmediate(callback);
} else {
callbacks.push(callback);
- if (callbacks.length === 1) {
- div.setAttribute("a", attr = !attr);
- }
+ if (callbacks.length === 1) div.setAttribute("a", attr = !attr);
}
};
}
@@ -21079,9 +20056,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
})();
util.isNodejs = typeof process !== "undefined" && process.versions && process.versions.node;
util.globalScope = (function() {
- if (util.isNodejs) {
- return global;
- }
+ if (util.isNodejs) return global;
return typeof self === "undefined" ? window : self;
})();
util.isArray = Array.isArray || function(x) {
@@ -21091,7 +20066,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return typeof ArrayBuffer !== "undefined" && x instanceof ArrayBuffer;
};
util.isArrayBufferView = function(x) {
- return x && util.isArrayBuffer(x.buffer) && x.byteLength !== undefined;
+ return x && util.isArrayBuffer(x.buffer) && x.byteLength !== void 0;
};
/**
* Ensure a bits param is 8, 16, 24, or 32. Used to validate input for
@@ -21103,9 +20078,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* Throw Error if n invalid.
*/
function _checkBitsParam(n) {
- if (!(n === 8 || n === 16 || n === 24 || n === 32)) {
- throw new Error("Only 8, 16, 24, or 32 bits supported: " + n);
- }
+ if (!(n === 8 || n === 16 || n === 24 || n === 32)) throw new Error("Only 8, 16, 24, or 32 bits supported: " + n);
}
util.ByteBuffer = ByteStringBuffer;
/** Buffer w/BinaryString backing */
@@ -21118,22 +20091,17 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function ByteStringBuffer(b) {
this.data = "";
this.read = 0;
- if (typeof b === "string") {
- this.data = b;
- } else if (util.isArrayBuffer(b) || util.isArrayBufferView(b)) {
- if (typeof Buffer !== "undefined" && b instanceof Buffer) {
- this.data = b.toString("binary");
- } else {
- var arr = new Uint8Array(b);
- try {
- this.data = String.fromCharCode.apply(null, arr);
- } catch (e) {
- for (var i = 0; i < arr.length; ++i) {
- this.putByte(arr[i]);
- }
- }
+ if (typeof b === "string") this.data = b;
+ else if (util.isArrayBuffer(b) || util.isArrayBufferView(b)) if (typeof Buffer !== "undefined" && b instanceof Buffer) this.data = b.toString("binary");
+ else {
+ var arr = new Uint8Array(b);
+ try {
+ this.data = String.fromCharCode.apply(null, arr);
+ } catch (e) {
+ for (var i = 0; i < arr.length; ++i) this.putByte(arr[i]);
}
- } else if (b instanceof ByteStringBuffer || typeof b === "object" && typeof b.data === "string" && typeof b.read === "number") {
+ }
+ else if (b instanceof ByteStringBuffer || typeof b === "object" && typeof b.data === "string" && typeof b.read === "number") {
this.data = b.data;
this.read = b.read;
}
@@ -21186,13 +20154,9 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
b = String.fromCharCode(b);
var d = this.data;
while (n > 0) {
- if (n & 1) {
- d += b;
- }
+ if (n & 1) d += b;
n >>>= 1;
- if (n > 0) {
- b += b;
- }
+ if (n > 0) b += b;
}
this.data = d;
this._optimizeConstructedString(n);
@@ -21307,9 +20271,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putSignedInt = function(i, n) {
- if (i < 0) {
- i += 2 << n - 1;
- }
+ if (i < 0) i += 2 << n - 1;
return this.putInt(i, n);
};
/**
@@ -21424,9 +20386,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
util.ByteStringBuffer.prototype.getSignedInt = function(n) {
var x = this.getInt(n);
var max = 2 << n - 2;
- if (x >= max) {
- x -= max << 1;
- }
+ if (x >= max) x -= max << 1;
return x;
};
/**
@@ -21444,9 +20404,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
count = Math.min(this.length(), count);
rval = this.data.slice(this.read, this.read + count);
this.read += count;
- } else if (count === 0) {
- rval = "";
- } else {
+ } else if (count === 0) rval = "";
+ else {
rval = this.read === 0 ? this.data : this.data.slice(this.read);
this.clear();
}
@@ -21547,9 +20506,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = "";
for (var i = this.read; i < this.data.length; ++i) {
var b = this.data.charCodeAt(i);
- if (b < 16) {
- rval += "0";
- }
+ if (b < 16) rval += "0";
rval += b.toString(16);
}
return rval;
@@ -21599,22 +20556,15 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var isArrayBuffer = util.isArrayBuffer(b);
var isArrayBufferView = util.isArrayBufferView(b);
if (isArrayBuffer || isArrayBufferView) {
- if (isArrayBuffer) {
- this.data = new DataView(b);
- } else {
- this.data = new DataView(b.buffer, b.byteOffset, b.byteLength);
- }
+ if (isArrayBuffer) this.data = new DataView(b);
+ else this.data = new DataView(b.buffer, b.byteOffset, b.byteLength);
this.write = "writeOffset" in options ? options.writeOffset : this.data.byteLength;
return;
}
- this.data = new DataView(new ArrayBuffer(0));
+ this.data = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(0));
this.write = 0;
- if (b !== null && b !== undefined) {
- this.putBytes(b);
- }
- if ("writeOffset" in options) {
- this.write = options.writeOffset;
- }
+ if (b !== null && b !== void 0) this.putBytes(b);
+ if ("writeOffset" in options) this.write = options.writeOffset;
}
util.DataBuffer = DataBuffer;
/**
@@ -21645,9 +20595,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* necessary.
*/
util.DataBuffer.prototype.accommodate = function(amount, growSize) {
- if (this.length() >= amount) {
- return this;
- }
+ if (this.length() >= amount) return this;
growSize = Math.max(growSize || this.growSize, amount);
var src = new Uint8Array(this.data.buffer, this.data.byteOffset, this.data.byteLength);
var dst = new Uint8Array(this.length() + growSize);
@@ -21677,9 +20625,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.DataBuffer.prototype.fillWithByte = function(b, n) {
this.accommodate(n);
- for (var i = 0; i < n; ++i) {
- this.data.setUint8(b);
- }
+ for (var i = 0; i < n; ++i) this.data.setUint8(b);
return this;
};
/**
@@ -21889,9 +20835,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
util.DataBuffer.prototype.putSignedInt = function(i, n) {
_checkBitsParam(n);
this.accommodate(n / 8);
- if (i < 0) {
- i += 2 << n - 1;
- }
+ if (i < 0) i += 2 << n - 1;
return this.putInt(i, n);
};
/**
@@ -21996,9 +20940,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
util.DataBuffer.prototype.getSignedInt = function(n) {
var x = this.getInt(n);
var max = 2 << n - 2;
- if (x >= max) {
- x -= max << 1;
- }
+ if (x >= max) x -= max << 1;
return x;
};
/**
@@ -22015,9 +20957,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
count = Math.min(this.length(), count);
rval = this.data.slice(this.read, this.read + count);
this.read += count;
- } else if (count === 0) {
- rval = "";
- } else {
+ } else if (count === 0) rval = "";
+ else {
rval = this.read === 0 ? this.data : this.data.slice(this.read);
this.clear();
}
@@ -22094,7 +21035,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return this buffer.
*/
util.DataBuffer.prototype.clear = function() {
- this.data = new DataView(new ArrayBuffer(0));
+ this.data = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(0));
this.read = this.write = 0;
return this;
};
@@ -22119,9 +21060,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = "";
for (var i = this.read; i < this.data.byteLength; ++i) {
var b = this.data.getUint8(i);
- if (b < 16) {
- rval += "0";
- }
+ if (b < 16) rval += "0";
rval += b.toString(16);
}
return rval;
@@ -22138,21 +21077,11 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
util.DataBuffer.prototype.toString = function(encoding) {
var view = new Uint8Array(this.data, this.read, this.length());
encoding = encoding || "utf8";
- if (encoding === "binary" || encoding === "raw") {
- return util.binary.raw.encode(view);
- }
- if (encoding === "hex") {
- return util.binary.hex.encode(view);
- }
- if (encoding === "base64") {
- return util.binary.base64.encode(view);
- }
- if (encoding === "utf8") {
- return util.text.utf8.decode(view);
- }
- if (encoding === "utf16") {
- return util.text.utf16.decode(view);
- }
+ if (encoding === "binary" || encoding === "raw") return util.binary.raw.encode(view);
+ if (encoding === "hex") return util.binary.hex.encode(view);
+ if (encoding === "base64") return util.binary.base64.encode(view);
+ if (encoding === "utf8") return util.text.utf8.decode(view);
+ if (encoding === "utf16") return util.text.utf16.decode(view);
throw new Error("Invalid encoding: " + encoding);
};
/** End Buffer w/UInt8Array backing */
@@ -22168,9 +21097,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.createBuffer = function(input, encoding) {
encoding = encoding || "raw";
- if (input !== undefined && encoding === "utf8") {
- input = util.encodeUtf8(input);
- }
+ if (input !== void 0 && encoding === "utf8") input = util.encodeUtf8(input);
return new util.ByteBuffer(input);
};
/**
@@ -22186,13 +21113,9 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
util.fillString = function(c, n) {
var s = "";
while (n > 0) {
- if (n & 1) {
- s += c;
- }
+ if (n & 1) s += c;
n >>>= 1;
- if (n > 0) {
- c += c;
- }
+ if (n > 0) c += c;
}
return s;
};
@@ -22235,13 +21158,11 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
util.hexToBytes = function(hex) {
var rval = "";
var i = 0;
- if (hex.length & 1 == 1) {
+ if (hex.length & true) {
i = 1;
rval += String.fromCharCode(parseInt(hex[0], 16));
}
- for (; i < hex.length; i += 2) {
- rval += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
- }
+ for (; i < hex.length; i += 2) rval += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
return rval;
};
/**
@@ -22368,9 +21289,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
chr3 = input.charCodeAt(i++);
line += _base64.charAt(chr1 >> 2);
line += _base64.charAt((chr1 & 3) << 4 | chr2 >> 4);
- if (isNaN(chr2)) {
- line += "==";
- } else {
+ if (isNaN(chr2)) line += "==";
+ else {
line += _base64.charAt((chr2 & 15) << 2 | chr3 >> 6);
line += isNaN(chr3) ? "=" : _base64.charAt(chr3 & 63);
}
@@ -22402,9 +21322,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
output += String.fromCharCode(enc1 << 2 | enc2 >> 4);
if (enc3 !== 64) {
output += String.fromCharCode((enc2 & 15) << 4 | enc3 >> 2);
- if (enc4 !== 64) {
- output += String.fromCharCode((enc3 & 3) << 6 | enc4);
- }
+ if (enc4 !== 64) output += String.fromCharCode((enc3 & 3) << 6 | enc4);
}
}
return output;
@@ -22468,14 +21386,10 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.binary.raw.decode = function(str, output, offset) {
var out = output;
- if (!out) {
- out = new Uint8Array(str.length);
- }
+ if (!out) out = new Uint8Array(str.length);
offset = offset || 0;
var j = offset;
- for (var i = 0; i < str.length; ++i) {
- out[j++] = str.charCodeAt(i);
- }
+ for (var i = 0; i < str.length; ++i) out[j++] = str.charCodeAt(i);
return output ? j - offset : out;
};
/**
@@ -22499,18 +21413,14 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.binary.hex.decode = function(hex, output, offset) {
var out = output;
- if (!out) {
- out = new Uint8Array(Math.ceil(hex.length / 2));
- }
+ if (!out) out = new Uint8Array(Math.ceil(hex.length / 2));
offset = offset || 0;
var i = 0, j = offset;
if (hex.length & 1) {
i = 1;
out[j++] = parseInt(hex[0], 16);
}
- for (; i < hex.length; i += 2) {
- out[j++] = parseInt(hex.substr(i, 2), 16);
- }
+ for (; i < hex.length; i += 2) out[j++] = parseInt(hex.substr(i, 2), 16);
return output ? j - offset : out;
};
/**
@@ -22533,9 +21443,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
chr3 = input[i++];
line += _base64.charAt(chr1 >> 2);
line += _base64.charAt((chr1 & 3) << 4 | chr2 >> 4);
- if (isNaN(chr2)) {
- line += "==";
- } else {
+ if (isNaN(chr2)) line += "==";
+ else {
line += _base64.charAt((chr2 & 15) << 2 | chr3 >> 6);
line += isNaN(chr3) ? "=" : _base64.charAt(chr3 & 63);
}
@@ -22559,9 +21468,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.binary.base64.decode = function(input, output, offset) {
var out = output;
- if (!out) {
- out = new Uint8Array(Math.ceil(input.length / 4) * 3);
- }
+ if (!out) out = new Uint8Array(Math.ceil(input.length / 4) * 3);
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
offset = offset || 0;
var enc1, enc2, enc3, enc4;
@@ -22574,9 +21481,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
out[j++] = enc1 << 2 | enc2 >> 4;
if (enc3 !== 64) {
out[j++] = (enc2 & 15) << 4 | enc3 >> 2;
- if (enc4 !== 64) {
- out[j++] = (enc3 & 3) << 6 | enc4;
- }
+ if (enc4 !== 64) out[j++] = (enc3 & 3) << 6 | enc4;
}
}
return output ? j - offset : out.subarray(0, j);
@@ -22604,14 +21509,10 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
util.text.utf8.encode = function(str, output, offset) {
str = util.encodeUtf8(str);
var out = output;
- if (!out) {
- out = new Uint8Array(str.length);
- }
+ if (!out) out = new Uint8Array(str.length);
offset = offset || 0;
var j = offset;
- for (var i = 0; i < str.length; ++i) {
- out[j++] = str.charCodeAt(i);
- }
+ for (var i = 0; i < str.length; ++i) out[j++] = str.charCodeAt(i);
return output ? j - offset : out;
};
/**
@@ -22636,9 +21537,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.text.utf16.encode = function(str, output, offset) {
var out = output;
- if (!out) {
- out = new Uint8Array(str.length * 2);
- }
+ if (!out) out = new Uint8Array(str.length * 2);
var view = new Uint16Array(out.buffer);
offset = offset || 0;
var j = offset;
@@ -22673,10 +21572,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
bytes = util.decode64(api.deflate(util.encode64(bytes)).rval);
if (raw) {
var start = 2;
- var flg = bytes.charCodeAt(1);
- if (flg & 32) {
- start = 6;
- }
+ if (bytes.charCodeAt(1) & 32) start = 6;
bytes = bytes.substring(start, bytes.length - 4);
}
return bytes;
@@ -22703,13 +21599,10 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param obj the storage object, null to remove.
*/
var _setStorageObject = function(api, id, obj) {
- if (!api) {
- throw new Error("WebStorage not available.");
- }
+ if (!api) throw new Error("WebStorage not available.");
var rval;
- if (obj === null) {
- rval = api.removeItem(id);
- } else {
+ if (obj === null) rval = api.removeItem(id);
+ else {
obj = util.encode64(JSON.stringify(obj));
rval = api.setItem(id, obj);
}
@@ -22729,26 +21622,18 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the storage object entry or null if none exists.
*/
var _getStorageObject = function(api, id) {
- if (!api) {
- throw new Error("WebStorage not available.");
- }
+ if (!api) throw new Error("WebStorage not available.");
var rval = api.getItem(id);
- if (api.init) {
- if (rval.rval === null) {
- if (rval.error) {
- var error = new Error(rval.error.message);
- error.id = rval.error.id;
- error.name = rval.error.name;
- throw error;
- }
- rval = null;
- } else {
- rval = rval.rval;
+ if (api.init) if (rval.rval === null) {
+ if (rval.error) {
+ var error = new Error(rval.error.message);
+ error.id = rval.error.id;
+ error.name = rval.error.name;
+ throw error;
}
- }
- if (rval !== null) {
- rval = JSON.parse(util.decode64(rval));
- }
+ rval = null;
+ } else rval = rval.rval;
+ if (rval !== null) rval = JSON.parse(util.decode64(rval));
return rval;
};
/**
@@ -22761,9 +21646,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var _setItem = function(api, id, key, data) {
var obj = _getStorageObject(api, id);
- if (obj === null) {
- obj = {};
- }
+ if (obj === null) obj = {};
obj[key] = data;
_setStorageObject(api, id, obj);
};
@@ -22778,9 +21661,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var _getItem = function(api, id, key) {
var rval = _getStorageObject(api, id);
- if (rval !== null) {
- rval = key in rval ? rval[key] : null;
- }
+ if (rval !== null) rval = key in rval ? rval[key] : null;
return rval;
};
/**
@@ -22799,9 +21680,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
empty = false;
break;
}
- if (empty) {
- obj = null;
- }
+ if (empty) obj = null;
_setStorageObject(api, id, obj);
}
};
@@ -22825,9 +21704,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var _callStorageFunction = function(func, args, location) {
var rval = null;
- if (typeof location === "undefined") {
- location = ["web", "flash"];
- }
+ if (typeof location === "undefined") location = ["web", "flash"];
var type;
var done = false;
var exception = null;
@@ -22835,9 +21712,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
type = location[idx];
try {
if (type === "flash" || type === "both") {
- if (args[0] === null) {
- throw new Error("Flash local storage not available.");
- }
+ if (args[0] === null) throw new Error("Flash local storage not available.");
rval = func.apply(this, args);
done = type === "flash";
}
@@ -22849,13 +21724,9 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} catch (ex) {
exception = ex;
}
- if (done) {
- break;
- }
- }
- if (!done) {
- throw exception;
+ if (done) break;
}
+ if (!done) throw exception;
return rval;
};
/**
@@ -22938,11 +21809,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param object the object to check.
*/
util.isEmpty = function(obj) {
- for (var prop in obj) {
- if (obj.hasOwnProperty(prop)) {
- return false;
- }
- }
+ for (var prop in obj) if (obj.hasOwnProperty(prop)) return false;
return true;
};
/**
@@ -22963,19 +21830,14 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var last = 0;
while (match = re.exec(format)) {
part = format.substring(last, re.lastIndex - 2);
- if (part.length > 0) {
- parts.push(part);
- }
+ if (part.length > 0) parts.push(part);
last = re.lastIndex;
var code = match[0][1];
switch (code) {
case "s":
case "o":
- if (argi < arguments.length) {
- parts.push(arguments[argi++ + 1]);
- } else {
- parts.push(">");
- }
+ if (argi < arguments.length) parts.push(arguments[argi++ + 1]);
+ else parts.push(">");
break;
case "%":
parts.push("%");
@@ -22993,8 +21855,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.formatNumber = function(number, decimals, dec_point, thousands_sep) {
var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;
- var d = dec_point === undefined ? "," : dec_point;
- var t = thousands_sep === undefined ? "." : thousands_sep, s = n < 0 ? "-" : "";
+ var d = dec_point === void 0 ? "," : dec_point;
+ var t = thousands_sep === void 0 ? "." : thousands_sep, s = n < 0 ? "-" : "";
var i = parseInt(n = Math.abs(+n || 0).toFixed(c), 10) + "";
var j = i.length > 3 ? i.length % 3 : 0;
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
@@ -23005,15 +21867,10 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* http://snipplr.com/view/5949/format-humanize-file-byte-size-presentation-in-javascript/
*/
util.formatSize = function(size) {
- if (size >= 1073741824) {
- size = util.formatNumber(size / 1073741824, 2, ".", "") + " GiB";
- } else if (size >= 1048576) {
- size = util.formatNumber(size / 1048576, 2, ".", "") + " MiB";
- } else if (size >= 1024) {
- size = util.formatNumber(size / 1024, 0) + " KiB";
- } else {
- size = util.formatNumber(size, 0) + " bytes";
- }
+ if (size >= 1073741824) size = util.formatNumber(size / 1073741824, 2, ".", "") + " GiB";
+ else if (size >= 1048576) size = util.formatNumber(size / 1048576, 2, ".", "") + " MiB";
+ else if (size >= 1024) size = util.formatNumber(size / 1024, 0) + " KiB";
+ else size = util.formatNumber(size, 0) + " bytes";
return size;
};
/**
@@ -23025,12 +21882,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* be parsed.
*/
util.bytesFromIP = function(ip) {
- if (ip.indexOf(".") !== -1) {
- return util.bytesFromIPv4(ip);
- }
- if (ip.indexOf(":") !== -1) {
- return util.bytesFromIPv6(ip);
- }
+ if (ip.indexOf(".") !== -1) return util.bytesFromIPv4(ip);
+ if (ip.indexOf(":") !== -1) return util.bytesFromIPv6(ip);
return null;
};
/**
@@ -23042,15 +21895,11 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
util.bytesFromIPv4 = function(ip) {
ip = ip.split(".");
- if (ip.length !== 4) {
- return null;
- }
+ if (ip.length !== 4) return null;
var b = util.createBuffer();
for (var i = 0; i < ip.length; ++i) {
var num = parseInt(ip[i], 10);
- if (isNaN(num)) {
- return null;
- }
+ if (isNaN(num)) return null;
b.putByte(num);
}
return b.getBytes();
@@ -23077,9 +21926,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
continue;
}
var bytes = util.hexToBytes(ip[i]);
- if (bytes.length < 2) {
- b.putByte(0);
- }
+ if (bytes.length < 2) b.putByte(0);
b.putBytes(bytes);
}
return b.getBytes();
@@ -23094,12 +21941,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* respectively, are given, otherwise null.
*/
util.bytesToIP = function(bytes) {
- if (bytes.length === 4) {
- return util.bytesToIPv4(bytes);
- }
- if (bytes.length === 16) {
- return util.bytesToIPv6(bytes);
- }
+ if (bytes.length === 4) return util.bytesToIPv4(bytes);
+ if (bytes.length === 16) return util.bytesToIPv6(bytes);
return null;
};
/**
@@ -23111,13 +21954,9 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the IPv4 string representation or null for an invalid # of bytes.
*/
util.bytesToIPv4 = function(bytes) {
- if (bytes.length !== 4) {
- return null;
- }
+ if (bytes.length !== 4) return null;
var ip = [];
- for (var i = 0; i < bytes.length; ++i) {
- ip.push(bytes.charCodeAt(i));
- }
+ for (var i = 0; i < bytes.length; ++i) ip.push(bytes.charCodeAt(i));
return ip.join(".");
};
/**
@@ -23129,30 +21968,23 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the IPv16 string representation or null for an invalid # of bytes.
*/
util.bytesToIPv6 = function(bytes) {
- if (bytes.length !== 16) {
- return null;
- }
+ if (bytes.length !== 16) return null;
var ip = [];
var zeroGroups = [];
var zeroMaxGroup = 0;
for (var i = 0; i < bytes.length; i += 2) {
var hex = util.bytesToHex(bytes[i] + bytes[i + 1]);
- while (hex[0] === "0" && hex !== "0") {
- hex = hex.substr(1);
- }
+ while (hex[0] === "0" && hex !== "0") hex = hex.substr(1);
if (hex === "0") {
var last = zeroGroups[zeroGroups.length - 1];
var idx = ip.length;
- if (!last || idx !== last.end + 1) {
- zeroGroups.push({
- start: idx,
- end: idx
- });
- } else {
+ if (!last || idx !== last.end + 1) zeroGroups.push({
+ start: idx,
+ end: idx
+ });
+ else {
last.end = idx;
- if (last.end - last.start > zeroGroups[zeroMaxGroup].end - zeroGroups[zeroMaxGroup].start) {
- zeroMaxGroup = zeroGroups.length - 1;
- }
+ if (last.end - last.start > zeroGroups[zeroMaxGroup].end - zeroGroups[zeroMaxGroup].start) zeroMaxGroup = zeroGroups.length - 1;
}
}
ip.push(hex);
@@ -23161,12 +21993,8 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var group = zeroGroups[zeroMaxGroup];
if (group.end - group.start > 0) {
ip.splice(group.start, group.end - group.start + 1, "");
- if (group.start === 0) {
- ip.unshift("");
- }
- if (group.end === 7) {
- ip.push("");
- }
+ if (group.start === 0) ip.unshift("");
+ if (group.end === 7) ip.push("");
}
}
return ip.join(":");
@@ -23186,9 +22014,7 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
options = {};
}
options = options || {};
- if ("cores" in util && !options.update) {
- return callback(null, util.cores);
- }
+ if ("cores" in util && !options.update) return callback(null, util.cores);
if (typeof navigator !== "undefined" && "hardwareConcurrency" in navigator && navigator.hardwareConcurrency > 0) {
util.cores = navigator.hardwareConcurrency;
return callback(null, util.cores);
@@ -23239,17 +22065,13 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
worker.addEventListener("message", function(e) {
results.push(e.data);
if (results.length === numWorkers) {
- for (var i = 0; i < numWorkers; ++i) {
- workers[i].terminate();
- }
+ for (var i = 0; i < numWorkers; ++i) workers[i].terminate();
callback(null, results);
}
});
workers.push(worker);
}
- for (var i = 0; i < numWorkers; ++i) {
- workers[i].postMessage(i);
- }
+ for (var i = 0; i < numWorkers; ++i) workers[i].postMessage(i);
}
function reduce(numWorkers, results) {
var overlaps = [];
@@ -23257,13 +22079,9 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var r1 = results[n];
var overlap = overlaps[n] = [];
for (var i = 0; i < numWorkers; ++i) {
- if (n === i) {
- continue;
- }
+ if (n === i) continue;
var r2 = results[i];
- if (r1.st > r2.st && r1.st < r2.et || r2.st > r1.st && r2.st < r1.et) {
- overlap.push(i);
- }
+ if (r1.st > r2.st && r1.st < r2.et || r2.st > r1.st && r2.st < r1.et) overlap.push(i);
}
}
return overlaps.reduce(function(max, overlap) {
@@ -23272,7 +22090,6 @@ var require_util$8 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/cipher.js
var require_cipher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -23304,13 +22121,9 @@ var require_cipher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var api = algorithm;
if (typeof api === "string") {
api = forge.cipher.getAlgorithm(api);
- if (api) {
- api = api();
- }
- }
- if (!api) {
- throw new Error("Unsupported algorithm: " + algorithm);
+ if (api) api = api();
}
+ if (!api) throw new Error("Unsupported algorithm: " + algorithm);
return new forge.cipher.BlockCipher({
algorithm: api,
key,
@@ -23334,13 +22147,9 @@ var require_cipher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var api = algorithm;
if (typeof api === "string") {
api = forge.cipher.getAlgorithm(api);
- if (api) {
- api = api();
- }
- }
- if (!api) {
- throw new Error("Unsupported algorithm: " + algorithm);
+ if (api) api = api();
}
+ if (!api) throw new Error("Unsupported algorithm: " + algorithm);
return new forge.cipher.BlockCipher({
algorithm: api,
key,
@@ -23367,9 +22176,7 @@ var require_cipher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
forge.cipher.getAlgorithm = function(name) {
name = name.toUpperCase();
- if (name in forge.cipher.algorithms) {
- return forge.cipher.algorithms[name];
- }
+ if (name in forge.cipher.algorithms) return forge.cipher.algorithms[name];
return null;
};
var BlockCipher = forge.cipher.BlockCipher = function(options) {
@@ -23413,9 +22220,7 @@ var require_cipher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
BlockCipher.prototype.start = function(options) {
options = options || {};
var opts = {};
- for (var key in options) {
- opts[key] = options[key];
- }
+ for (var key in options) opts[key] = options[key];
opts.decrypt = this._decrypt;
this._finish = false;
this._input = forge.util.createBuffer();
@@ -23428,10 +22233,8 @@ var require_cipher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param input the buffer to read from.
*/
BlockCipher.prototype.update = function(input) {
- if (input) {
- this._input.putBuffer(input);
- }
- while (!this._op.call(this.mode, this._input, this.output, this._finish) && !this._finish) {}
+ if (input) this._input.putBuffer(input);
+ while (!this._op.call(this.mode, this._input, this.output, this._finish) && !this._finish);
this._input.compact();
};
/**
@@ -23455,26 +22258,19 @@ var require_cipher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
options.decrypt = this._decrypt;
options.overflow = this._input.length() % this.blockSize;
if (!this._decrypt && this.mode.pad) {
- if (!this.mode.pad(this._input, options)) {
- return false;
- }
+ if (!this.mode.pad(this._input, options)) return false;
}
this._finish = true;
this.update();
if (this._decrypt && this.mode.unpad) {
- if (!this.mode.unpad(this.output, options)) {
- return false;
- }
+ if (!this.mode.unpad(this.output, options)) return false;
}
if (this.mode.afterFinish) {
- if (!this.mode.afterFinish(this.output, options)) {
- return false;
- }
+ if (!this.mode.afterFinish(this.output, options)) return false;
}
return true;
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/cipherModes.js
var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -23501,28 +22297,16 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
modes.ecb.prototype.start = function(options) {};
modes.ecb.prototype.encrypt = function(input, output, finish) {
- if (input.length() < this.blockSize && !(finish && input.length() > 0)) {
- return true;
- }
- for (var i = 0; i < this._ints; ++i) {
- this._inBlock[i] = input.getInt32();
- }
+ if (input.length() < this.blockSize && !(finish && input.length() > 0)) return true;
+ for (var i = 0; i < this._ints; ++i) this._inBlock[i] = input.getInt32();
this.cipher.encrypt(this._inBlock, this._outBlock);
- for (var i = 0; i < this._ints; ++i) {
- output.putInt32(this._outBlock[i]);
- }
+ for (var i = 0; i < this._ints; ++i) output.putInt32(this._outBlock[i]);
};
modes.ecb.prototype.decrypt = function(input, output, finish) {
- if (input.length() < this.blockSize && !(finish && input.length() > 0)) {
- return true;
- }
- for (var i = 0; i < this._ints; ++i) {
- this._inBlock[i] = input.getInt32();
- }
+ if (input.length() < this.blockSize && !(finish && input.length() > 0)) return true;
+ for (var i = 0; i < this._ints; ++i) this._inBlock[i] = input.getInt32();
this.cipher.decrypt(this._inBlock, this._outBlock);
- for (var i = 0; i < this._ints; ++i) {
- output.putInt32(this._outBlock[i]);
- }
+ for (var i = 0; i < this._ints; ++i) output.putInt32(this._outBlock[i]);
};
modes.ecb.prototype.pad = function(input, options) {
var padding = input.length() === this.blockSize ? this.blockSize : this.blockSize - input.length();
@@ -23530,14 +22314,10 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return true;
};
modes.ecb.prototype.unpad = function(output, options) {
- if (options.overflow > 0) {
- return false;
- }
+ if (options.overflow > 0) return false;
var len = output.length();
var count = output.at(len - 1);
- if (count > this.blockSize << 2) {
- return false;
- }
+ if (count > this.blockSize << 2) return false;
output.truncate(count);
return true;
};
@@ -23553,41 +22333,26 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
modes.cbc.prototype.start = function(options) {
if (options.iv === null) {
- if (!this._prev) {
- throw new Error("Invalid IV parameter.");
- }
+ if (!this._prev) throw new Error("Invalid IV parameter.");
this._iv = this._prev.slice(0);
- } else if (!("iv" in options)) {
- throw new Error("Invalid IV parameter.");
- } else {
+ } else if (!("iv" in options)) throw new Error("Invalid IV parameter.");
+ else {
this._iv = transformIV(options.iv, this.blockSize);
this._prev = this._iv.slice(0);
}
};
modes.cbc.prototype.encrypt = function(input, output, finish) {
- if (input.length() < this.blockSize && !(finish && input.length() > 0)) {
- return true;
- }
- for (var i = 0; i < this._ints; ++i) {
- this._inBlock[i] = this._prev[i] ^ input.getInt32();
- }
+ if (input.length() < this.blockSize && !(finish && input.length() > 0)) return true;
+ for (var i = 0; i < this._ints; ++i) this._inBlock[i] = this._prev[i] ^ input.getInt32();
this.cipher.encrypt(this._inBlock, this._outBlock);
- for (var i = 0; i < this._ints; ++i) {
- output.putInt32(this._outBlock[i]);
- }
+ for (var i = 0; i < this._ints; ++i) output.putInt32(this._outBlock[i]);
this._prev = this._outBlock;
};
modes.cbc.prototype.decrypt = function(input, output, finish) {
- if (input.length() < this.blockSize && !(finish && input.length() > 0)) {
- return true;
- }
- for (var i = 0; i < this._ints; ++i) {
- this._inBlock[i] = input.getInt32();
- }
+ if (input.length() < this.blockSize && !(finish && input.length() > 0)) return true;
+ for (var i = 0; i < this._ints; ++i) this._inBlock[i] = input.getInt32();
this.cipher.decrypt(this._inBlock, this._outBlock);
- for (var i = 0; i < this._ints; ++i) {
- output.putInt32(this._prev[i] ^ this._outBlock[i]);
- }
+ for (var i = 0; i < this._ints; ++i) output.putInt32(this._prev[i] ^ this._outBlock[i]);
this._prev = this._inBlock.slice(0);
};
modes.cbc.prototype.pad = function(input, options) {
@@ -23596,14 +22361,10 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return true;
};
modes.cbc.prototype.unpad = function(output, options) {
- if (options.overflow > 0) {
- return false;
- }
+ if (options.overflow > 0) return false;
var len = output.length();
var count = output.at(len - 1);
- if (count > this.blockSize << 2) {
- return false;
- }
+ if (count > this.blockSize << 2) return false;
output.truncate(count);
return true;
};
@@ -23621,18 +22382,14 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._partialBytes = 0;
};
modes.cfb.prototype.start = function(options) {
- if (!("iv" in options)) {
- throw new Error("Invalid IV parameter.");
- }
+ if (!("iv" in options)) throw new Error("Invalid IV parameter.");
this._iv = transformIV(options.iv, this.blockSize);
this._inBlock = this._iv.slice(0);
this._partialBytes = 0;
};
modes.cfb.prototype.encrypt = function(input, output, finish) {
var inputLength = input.length();
- if (inputLength === 0) {
- return true;
- }
+ if (inputLength === 0) return true;
this.cipher.encrypt(this._inBlock, this._outBlock);
if (this._partialBytes === 0 && inputLength >= this.blockSize) {
for (var i = 0; i < this._ints; ++i) {
@@ -23642,24 +22399,15 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
var partialBytes = (this.blockSize - inputLength) % this.blockSize;
- if (partialBytes > 0) {
- partialBytes = this.blockSize - partialBytes;
- }
+ if (partialBytes > 0) partialBytes = this.blockSize - partialBytes;
this._partialOutput.clear();
for (var i = 0; i < this._ints; ++i) {
this._partialBlock[i] = input.getInt32() ^ this._outBlock[i];
this._partialOutput.putInt32(this._partialBlock[i]);
}
- if (partialBytes > 0) {
- input.read -= this.blockSize;
- } else {
- for (var i = 0; i < this._ints; ++i) {
- this._inBlock[i] = this._partialBlock[i];
- }
- }
- if (this._partialBytes > 0) {
- this._partialOutput.getBytes(this._partialBytes);
- }
+ if (partialBytes > 0) input.read -= this.blockSize;
+ else for (var i = 0; i < this._ints; ++i) this._inBlock[i] = this._partialBlock[i];
+ if (this._partialBytes > 0) this._partialOutput.getBytes(this._partialBytes);
if (partialBytes > 0 && !finish) {
output.putBytes(this._partialOutput.getBytes(partialBytes - this._partialBytes));
this._partialBytes = partialBytes;
@@ -23670,9 +22418,7 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
modes.cfb.prototype.decrypt = function(input, output, finish) {
var inputLength = input.length();
- if (inputLength === 0) {
- return true;
- }
+ if (inputLength === 0) return true;
this.cipher.encrypt(this._inBlock, this._outBlock);
if (this._partialBytes === 0 && inputLength >= this.blockSize) {
for (var i = 0; i < this._ints; ++i) {
@@ -23682,24 +22428,15 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
var partialBytes = (this.blockSize - inputLength) % this.blockSize;
- if (partialBytes > 0) {
- partialBytes = this.blockSize - partialBytes;
- }
+ if (partialBytes > 0) partialBytes = this.blockSize - partialBytes;
this._partialOutput.clear();
for (var i = 0; i < this._ints; ++i) {
this._partialBlock[i] = input.getInt32();
this._partialOutput.putInt32(this._partialBlock[i] ^ this._outBlock[i]);
}
- if (partialBytes > 0) {
- input.read -= this.blockSize;
- } else {
- for (var i = 0; i < this._ints; ++i) {
- this._inBlock[i] = this._partialBlock[i];
- }
- }
- if (this._partialBytes > 0) {
- this._partialOutput.getBytes(this._partialBytes);
- }
+ if (partialBytes > 0) input.read -= this.blockSize;
+ else for (var i = 0; i < this._ints; ++i) this._inBlock[i] = this._partialBlock[i];
+ if (this._partialBytes > 0) this._partialOutput.getBytes(this._partialBytes);
if (partialBytes > 0 && !finish) {
output.putBytes(this._partialOutput.getBytes(partialBytes - this._partialBytes));
this._partialBytes = partialBytes;
@@ -23721,18 +22458,14 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._partialBytes = 0;
};
modes.ofb.prototype.start = function(options) {
- if (!("iv" in options)) {
- throw new Error("Invalid IV parameter.");
- }
+ if (!("iv" in options)) throw new Error("Invalid IV parameter.");
this._iv = transformIV(options.iv, this.blockSize);
this._inBlock = this._iv.slice(0);
this._partialBytes = 0;
};
modes.ofb.prototype.encrypt = function(input, output, finish) {
var inputLength = input.length();
- if (input.length() === 0) {
- return true;
- }
+ if (input.length() === 0) return true;
this.cipher.encrypt(this._inBlock, this._outBlock);
if (this._partialBytes === 0 && inputLength >= this.blockSize) {
for (var i = 0; i < this._ints; ++i) {
@@ -23742,23 +22475,12 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
var partialBytes = (this.blockSize - inputLength) % this.blockSize;
- if (partialBytes > 0) {
- partialBytes = this.blockSize - partialBytes;
- }
+ if (partialBytes > 0) partialBytes = this.blockSize - partialBytes;
this._partialOutput.clear();
- for (var i = 0; i < this._ints; ++i) {
- this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);
- }
- if (partialBytes > 0) {
- input.read -= this.blockSize;
- } else {
- for (var i = 0; i < this._ints; ++i) {
- this._inBlock[i] = this._outBlock[i];
- }
- }
- if (this._partialBytes > 0) {
- this._partialOutput.getBytes(this._partialBytes);
- }
+ for (var i = 0; i < this._ints; ++i) this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);
+ if (partialBytes > 0) input.read -= this.blockSize;
+ else for (var i = 0; i < this._ints; ++i) this._inBlock[i] = this._outBlock[i];
+ if (this._partialBytes > 0) this._partialOutput.getBytes(this._partialBytes);
if (partialBytes > 0 && !finish) {
output.putBytes(this._partialOutput.getBytes(partialBytes - this._partialBytes));
this._partialBytes = partialBytes;
@@ -23781,38 +22503,23 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._partialBytes = 0;
};
modes.ctr.prototype.start = function(options) {
- if (!("iv" in options)) {
- throw new Error("Invalid IV parameter.");
- }
+ if (!("iv" in options)) throw new Error("Invalid IV parameter.");
this._iv = transformIV(options.iv, this.blockSize);
this._inBlock = this._iv.slice(0);
this._partialBytes = 0;
};
modes.ctr.prototype.encrypt = function(input, output, finish) {
var inputLength = input.length();
- if (inputLength === 0) {
- return true;
- }
+ if (inputLength === 0) return true;
this.cipher.encrypt(this._inBlock, this._outBlock);
- if (this._partialBytes === 0 && inputLength >= this.blockSize) {
- for (var i = 0; i < this._ints; ++i) {
- output.putInt32(input.getInt32() ^ this._outBlock[i]);
- }
- } else {
+ if (this._partialBytes === 0 && inputLength >= this.blockSize) for (var i = 0; i < this._ints; ++i) output.putInt32(input.getInt32() ^ this._outBlock[i]);
+ else {
var partialBytes = (this.blockSize - inputLength) % this.blockSize;
- if (partialBytes > 0) {
- partialBytes = this.blockSize - partialBytes;
- }
+ if (partialBytes > 0) partialBytes = this.blockSize - partialBytes;
this._partialOutput.clear();
- for (var i = 0; i < this._ints; ++i) {
- this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);
- }
- if (partialBytes > 0) {
- input.read -= this.blockSize;
- }
- if (this._partialBytes > 0) {
- this._partialOutput.getBytes(this._partialBytes);
- }
+ for (var i = 0; i < this._ints; ++i) this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);
+ if (partialBytes > 0) input.read -= this.blockSize;
+ if (this._partialBytes > 0) this._partialOutput.getBytes(this._partialBytes);
if (partialBytes > 0 && !finish) {
output.putBytes(this._partialOutput.getBytes(partialBytes - this._partialBytes));
this._partialBytes = partialBytes;
@@ -23838,28 +22545,18 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._R = 3774873600;
};
modes.gcm.prototype.start = function(options) {
- if (!("iv" in options)) {
- throw new Error("Invalid IV parameter.");
- }
+ if (!("iv" in options)) throw new Error("Invalid IV parameter.");
var iv = forge.util.createBuffer(options.iv);
this._cipherLength = 0;
var additionalData;
- if ("additionalData" in options) {
- additionalData = forge.util.createBuffer(options.additionalData);
- } else {
- additionalData = forge.util.createBuffer();
- }
- if ("tagLength" in options) {
- this._tagLength = options.tagLength;
- } else {
- this._tagLength = 128;
- }
+ if ("additionalData" in options) additionalData = forge.util.createBuffer(options.additionalData);
+ else additionalData = forge.util.createBuffer();
+ if ("tagLength" in options) this._tagLength = options.tagLength;
+ else this._tagLength = 128;
this._tag = null;
if (options.decrypt) {
this._tag = forge.util.createBuffer(options.tag).getBytes();
- if (this._tag.length !== this._tagLength / 8) {
- throw new Error("Authentication tag does not match tag length.");
- }
+ if (this._tag.length !== this._tagLength / 8) throw new Error("Authentication tag does not match tag length.");
}
this._hashBlock = new Array(this._ints);
this.tag = null;
@@ -23873,28 +22570,25 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.componentBits = 4;
this._m = this.generateHashTable(this._hashSubkey, this.componentBits);
var ivLength = iv.length();
- if (ivLength === 12) {
- this._j0 = [
- iv.getInt32(),
- iv.getInt32(),
- iv.getInt32(),
- 1
- ];
- } else {
+ if (ivLength === 12) this._j0 = [
+ iv.getInt32(),
+ iv.getInt32(),
+ iv.getInt32(),
+ 1
+ ];
+ else {
this._j0 = [
0,
0,
0,
0
];
- while (iv.length() > 0) {
- this._j0 = this.ghash(this._hashSubkey, this._j0, [
- iv.getInt32(),
- iv.getInt32(),
- iv.getInt32(),
- iv.getInt32()
- ]);
- }
+ while (iv.length() > 0) this._j0 = this.ghash(this._hashSubkey, this._j0, [
+ iv.getInt32(),
+ iv.getInt32(),
+ iv.getInt32(),
+ iv.getInt32()
+ ]);
this._j0 = this.ghash(this._hashSubkey, this._j0, [0, 0].concat(from64To32(ivLength * 8)));
}
this._inBlock = this._j0.slice(0);
@@ -23903,60 +22597,42 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
additionalData = forge.util.createBuffer(additionalData);
this._aDataLength = from64To32(additionalData.length() * 8);
var overflow = additionalData.length() % this.blockSize;
- if (overflow) {
- additionalData.fillWithByte(0, this.blockSize - overflow);
- }
+ if (overflow) additionalData.fillWithByte(0, this.blockSize - overflow);
this._s = [
0,
0,
0,
0
];
- while (additionalData.length() > 0) {
- this._s = this.ghash(this._hashSubkey, this._s, [
- additionalData.getInt32(),
- additionalData.getInt32(),
- additionalData.getInt32(),
- additionalData.getInt32()
- ]);
- }
+ while (additionalData.length() > 0) this._s = this.ghash(this._hashSubkey, this._s, [
+ additionalData.getInt32(),
+ additionalData.getInt32(),
+ additionalData.getInt32(),
+ additionalData.getInt32()
+ ]);
};
modes.gcm.prototype.encrypt = function(input, output, finish) {
var inputLength = input.length();
- if (inputLength === 0) {
- return true;
- }
+ if (inputLength === 0) return true;
this.cipher.encrypt(this._inBlock, this._outBlock);
if (this._partialBytes === 0 && inputLength >= this.blockSize) {
- for (var i = 0; i < this._ints; ++i) {
- output.putInt32(this._outBlock[i] ^= input.getInt32());
- }
+ for (var i = 0; i < this._ints; ++i) output.putInt32(this._outBlock[i] ^= input.getInt32());
this._cipherLength += this.blockSize;
} else {
var partialBytes = (this.blockSize - inputLength) % this.blockSize;
- if (partialBytes > 0) {
- partialBytes = this.blockSize - partialBytes;
- }
+ if (partialBytes > 0) partialBytes = this.blockSize - partialBytes;
this._partialOutput.clear();
- for (var i = 0; i < this._ints; ++i) {
- this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);
- }
+ for (var i = 0; i < this._ints; ++i) this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]);
if (partialBytes <= 0 || finish) {
if (finish) {
var overflow = inputLength % this.blockSize;
this._cipherLength += overflow;
this._partialOutput.truncate(this.blockSize - overflow);
- } else {
- this._cipherLength += this.blockSize;
- }
- for (var i = 0; i < this._ints; ++i) {
- this._outBlock[i] = this._partialOutput.getInt32();
- }
+ } else this._cipherLength += this.blockSize;
+ for (var i = 0; i < this._ints; ++i) this._outBlock[i] = this._partialOutput.getInt32();
this._partialOutput.read -= this.blockSize;
}
- if (this._partialBytes > 0) {
- this._partialOutput.getBytes(this._partialBytes);
- }
+ if (this._partialBytes > 0) this._partialOutput.getBytes(this._partialBytes);
if (partialBytes > 0 && !finish) {
input.read -= this.blockSize;
output.putBytes(this._partialOutput.getBytes(partialBytes - this._partialBytes));
@@ -23971,9 +22647,7 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
modes.gcm.prototype.decrypt = function(input, output, finish) {
var inputLength = input.length();
- if (inputLength < this.blockSize && !(finish && inputLength > 0)) {
- return true;
- }
+ if (inputLength < this.blockSize && !(finish && inputLength > 0)) return true;
this.cipher.encrypt(this._inBlock, this._outBlock);
inc32(this._inBlock);
this._hashBlock[0] = input.getInt32();
@@ -23981,32 +22655,21 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._hashBlock[2] = input.getInt32();
this._hashBlock[3] = input.getInt32();
this._s = this.ghash(this._hashSubkey, this._s, this._hashBlock);
- for (var i = 0; i < this._ints; ++i) {
- output.putInt32(this._outBlock[i] ^ this._hashBlock[i]);
- }
- if (inputLength < this.blockSize) {
- this._cipherLength += inputLength % this.blockSize;
- } else {
- this._cipherLength += this.blockSize;
- }
+ for (var i = 0; i < this._ints; ++i) output.putInt32(this._outBlock[i] ^ this._hashBlock[i]);
+ if (inputLength < this.blockSize) this._cipherLength += inputLength % this.blockSize;
+ else this._cipherLength += this.blockSize;
};
modes.gcm.prototype.afterFinish = function(output, options) {
var rval = true;
- if (options.decrypt && options.overflow) {
- output.truncate(this.blockSize - options.overflow);
- }
+ if (options.decrypt && options.overflow) output.truncate(this.blockSize - options.overflow);
this.tag = forge.util.createBuffer();
var lengths = this._aDataLength.concat(from64To32(this._cipherLength * 8));
this._s = this.ghash(this._hashSubkey, this._s, lengths);
var tag = [];
this.cipher.encrypt(this._j0, tag);
- for (var i = 0; i < this._ints; ++i) {
- this.tag.putInt32(this._s[i] ^ tag[i]);
- }
+ for (var i = 0; i < this._ints; ++i) this.tag.putInt32(this._s[i] ^ tag[i]);
this.tag.truncate(this.tag.length() % (this._tagLength / 8));
- if (options.decrypt && this.tag.bytes() !== this._tag) {
- rval = false;
- }
+ if (options.decrypt && this.tag.bytes() !== this._tag) rval = false;
return rval;
};
/**
@@ -24043,8 +22706,7 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
];
var v_i = y.slice(0);
for (var i = 0; i < 128; ++i) {
- var x_i = x[i / 32 | 0] & 1 << 31 - i % 32;
- if (x_i) {
+ if (x[i / 32 | 0] & 1 << 31 - i % 32) {
z_i[0] ^= v_i[0];
z_i[1] ^= v_i[1];
z_i[2] ^= v_i[2];
@@ -24056,13 +22718,9 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
modes.gcm.prototype.pow = function(x, out) {
var lsb = x[3] & 1;
- for (var i = 3; i > 0; --i) {
- out[i] = x[i] >>> 1 | (x[i - 1] & 1) << 31;
- }
+ for (var i = 3; i > 0; --i) out[i] = x[i] >>> 1 | (x[i - 1] & 1) << 31;
out[0] = x[0] >>> 1;
- if (lsb) {
- out[0] ^= this._R;
- }
+ if (lsb) out[0] ^= this._R;
};
modes.gcm.prototype.tableMultiply = function(x) {
var z = [
@@ -24072,8 +22730,7 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
0
];
for (var i = 0; i < 32; ++i) {
- var idx = i / 8 | 0;
- var x_i = x[idx] >>> (7 - i % 8) * 4 & 15;
+ var x_i = x[i / 8 | 0] >>> (7 - i % 8) * 4 & 15;
var ah = this._m[i][x_i];
z[0] ^= ah[0];
z[1] ^= ah[1];
@@ -24184,25 +22841,17 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
/** Utility functions */
function transformIV(iv, blockSize) {
- if (typeof iv === "string") {
- iv = forge.util.createBuffer(iv);
- }
+ if (typeof iv === "string") iv = forge.util.createBuffer(iv);
if (forge.util.isArray(iv) && iv.length > 4) {
var tmp = iv;
iv = forge.util.createBuffer();
- for (var i = 0; i < tmp.length; ++i) {
- iv.putByte(tmp[i]);
- }
- }
- if (iv.length() < blockSize) {
- throw new Error("Invalid IV length; got " + iv.length() + " bytes and expected " + blockSize + " bytes.");
+ for (var i = 0; i < tmp.length; ++i) iv.putByte(tmp[i]);
}
+ if (iv.length() < blockSize) throw new Error("Invalid IV length; got " + iv.length() + " bytes and expected " + blockSize + " bytes.");
if (!forge.util.isArray(iv)) {
var ints = [];
var blocks = blockSize / 4;
- for (var i = 0; i < blocks; ++i) {
- ints.push(iv.getInt32());
- }
+ for (var i = 0; i < blocks; ++i) ints.push(iv.getInt32());
iv = ints;
}
return iv;
@@ -24214,7 +22863,6 @@ var require_cipherModes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return [num / 4294967296 | 0, num & 4294967295];
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/aes.js
var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -24353,9 +23001,7 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the AES algorithm object.
*/
forge.aes.Algorithm = function(name, mode) {
- if (!init) {
- initialize();
- }
+ if (!init) initialize();
var self = this;
self.name = name;
self.mode = new mode({
@@ -24380,19 +23026,14 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* false for encryption.
*/
forge.aes.Algorithm.prototype.initialize = function(options) {
- if (this._init) {
- return;
- }
+ if (this._init) return;
var key = options.key;
var tmp;
- if (typeof key === "string" && (key.length === 16 || key.length === 24 || key.length === 32)) {
- key = forge.util.createBuffer(key);
- } else if (forge.util.isArray(key) && (key.length === 16 || key.length === 24 || key.length === 32)) {
+ if (typeof key === "string" && (key.length === 16 || key.length === 24 || key.length === 32)) key = forge.util.createBuffer(key);
+ else if (forge.util.isArray(key) && (key.length === 16 || key.length === 24 || key.length === 32)) {
tmp = key;
key = forge.util.createBuffer();
- for (var i = 0; i < tmp.length; ++i) {
- key.putByte(tmp[i]);
- }
+ for (var i = 0; i < tmp.length; ++i) key.putByte(tmp[i]);
}
if (!forge.util.isArray(key)) {
tmp = key;
@@ -24400,14 +23041,10 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var len = tmp.length();
if (len === 16 || len === 24 || len === 32) {
len = len >>> 2;
- for (var i = 0; i < len; ++i) {
- key.push(tmp.getInt32());
- }
+ for (var i = 0; i < len; ++i) key.push(tmp.getInt32());
}
}
- if (!forge.util.isArray(key) || !(key.length === 4 || key.length === 6 || key.length === 8)) {
- throw new Error("Invalid key parameter.");
- }
+ if (!forge.util.isArray(key) || !(key.length === 4 || key.length === 6 || key.length === 8)) throw new Error("Invalid key parameter.");
var mode = this.mode.name;
var encryptOp = [
"CFB",
@@ -24427,9 +23064,7 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the expanded key.
*/
forge.aes._expandKey = function(key, decrypt) {
- if (!init) {
- initialize();
- }
+ if (!init) initialize();
return _expandKey(key, decrypt);
};
/**
@@ -24671,9 +23306,8 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
me = me << 24 | me >>> 8;
ime = ime << 24 | ime >>> 8;
}
- if (e === 0) {
- e = ei = 1;
- } else {
+ if (e === 0) e = ei = 1;
+ else {
e = e2 ^ xtime[xtime[xtime[e2 ^ e8]]];
ei ^= xtime[xtime[ei]];
}
@@ -24707,16 +23341,13 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var w = key.slice(0);
var temp, iNk = 1;
var Nk = w.length;
- var Nr1 = Nk + 6 + 1;
- var end = Nb * Nr1;
+ var end = Nb * (Nk + 6 + 1);
for (var i = Nk; i < end; ++i) {
temp = w[i - 1];
if (i % Nk === 0) {
temp = sbox[temp >>> 16 & 255] << 24 ^ sbox[temp >>> 8 & 255] << 16 ^ sbox[temp & 255] << 8 ^ sbox[temp >>> 24] ^ rcon[iNk] << 24;
iNk++;
- } else if (Nk > 6 && i % Nk === 4) {
- temp = sbox[temp >>> 24] << 24 ^ sbox[temp >>> 16 & 255] << 16 ^ sbox[temp >>> 8 & 255] << 8 ^ sbox[temp & 255];
- }
+ } else if (Nk > 6 && i % Nk === 4) temp = sbox[temp >>> 24] << 24 ^ sbox[temp >>> 16 & 255] << 16 ^ sbox[temp >>> 8 & 255] << 8 ^ sbox[temp & 255];
w[i] = w[i - Nk] ^ temp;
}
if (decrypt) {
@@ -24727,18 +23358,14 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var m3 = imix[3];
var wnew = w.slice(0);
end = w.length;
- for (var i = 0, wi = end - Nb; i < end; i += Nb, wi -= Nb) {
- if (i === 0 || i === end - Nb) {
- wnew[i] = w[wi];
- wnew[i + 1] = w[wi + 3];
- wnew[i + 2] = w[wi + 2];
- wnew[i + 3] = w[wi + 1];
- } else {
- for (var n = 0; n < Nb; ++n) {
- tmp = w[wi + n];
- wnew[i + (3 & -n)] = m0[sbox[tmp >>> 24]] ^ m1[sbox[tmp >>> 16 & 255]] ^ m2[sbox[tmp >>> 8 & 255]] ^ m3[sbox[tmp & 255]];
- }
- }
+ for (var i = 0, wi = end - Nb; i < end; i += Nb, wi -= Nb) if (i === 0 || i === end - Nb) {
+ wnew[i] = w[wi];
+ wnew[i + 1] = w[wi + 3];
+ wnew[i + 2] = w[wi + 2];
+ wnew[i + 3] = w[wi + 1];
+ } else for (var n = 0; n < Nb; ++n) {
+ tmp = w[wi + n];
+ wnew[i + (3 & -n)] = m0[sbox[tmp >>> 24]] ^ m1[sbox[tmp >>> 16 & 255]] ^ m2[sbox[tmp >>> 8 & 255]] ^ m3[sbox[tmp & 255]];
}
w = wnew;
}
@@ -24769,11 +23396,7 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
m3 = mix[3];
sub = sbox;
}
- var a, b, c, d, a2, b2, c2;
- a = input[0] ^ w[0];
- b = input[decrypt ? 3 : 1] ^ w[1];
- c = input[2] ^ w[2];
- d = input[decrypt ? 1 : 3] ^ w[3];
+ var a = input[0] ^ w[0], b = input[decrypt ? 3 : 1] ^ w[1], c = input[2] ^ w[2], d = input[decrypt ? 1 : 3] ^ w[3], a2, b2, c2;
var i = 3;
for (var round = 1; round < Nr; ++round) {
a2 = m0[a >>> 24] ^ m1[b >>> 16 & 255] ^ m2[c >>> 8 & 255] ^ m3[d & 255] ^ w[++i];
@@ -24811,14 +23434,10 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _createCipher(options) {
options = options || {};
- var mode = (options.mode || "CBC").toUpperCase();
- var algorithm = "AES-" + mode;
+ var algorithm = "AES-" + (options.mode || "CBC").toUpperCase();
var cipher;
- if (options.decrypt) {
- cipher = forge.cipher.createDecipher(algorithm, options.key);
- } else {
- cipher = forge.cipher.createCipher(algorithm, options.key);
- }
+ if (options.decrypt) cipher = forge.cipher.createDecipher(algorithm, options.key);
+ else cipher = forge.cipher.createCipher(algorithm, options.key);
var start = cipher.start;
cipher.start = function(iv, options) {
var output = null;
@@ -24834,7 +23453,6 @@ var require_aes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return cipher;
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/oids.js
var require_oids = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -24984,7 +23602,6 @@ var require_oids = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_IN("1.3.6.1.5.5.7.3.4", "emailProtection");
_IN("1.3.6.1.5.5.7.3.8", "timeStamping");
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/asn1.js
var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -25179,11 +23796,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
asn1.create = function(tagClass, type, constructed, value, options) {
if (forge.util.isArray(value)) {
var tmp = [];
- for (var i = 0; i < value.length; ++i) {
- if (value[i] !== undefined) {
- tmp.push(value[i]);
- }
- }
+ for (var i = 0; i < value.length; ++i) if (value[i] !== void 0) tmp.push(value[i]);
value = tmp;
}
var obj = {
@@ -25212,14 +23825,10 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var copy;
if (forge.util.isArray(obj)) {
copy = [];
- for (var i = 0; i < obj.length; ++i) {
- copy.push(asn1.copy(obj[i], options));
- }
+ for (var i = 0; i < obj.length; ++i) copy.push(asn1.copy(obj[i], options));
return copy;
}
- if (typeof obj === "string") {
- return obj;
- }
+ if (typeof obj === "string") return obj;
copy = {
tagClass: obj.tagClass,
type: obj.type,
@@ -25227,9 +23836,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
composed: obj.composed,
value: asn1.copy(obj.value, options)
};
- if (options && !options.excludeBitStringContents) {
- copy.bitStringContents = obj.bitStringContents;
- }
+ if (options && !options.excludeBitStringContents) copy.bitStringContents = obj.bitStringContents;
return copy;
};
/**
@@ -25246,29 +23853,15 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
asn1.equals = function(obj1, obj2, options) {
if (forge.util.isArray(obj1)) {
- if (!forge.util.isArray(obj2)) {
- return false;
- }
- if (obj1.length !== obj2.length) {
- return false;
- }
- for (var i = 0; i < obj1.length; ++i) {
- if (!asn1.equals(obj1[i], obj2[i])) {
- return false;
- }
- }
+ if (!forge.util.isArray(obj2)) return false;
+ if (obj1.length !== obj2.length) return false;
+ for (var i = 0; i < obj1.length; ++i) if (!asn1.equals(obj1[i], obj2[i])) return false;
return true;
}
- if (typeof obj1 !== typeof obj2) {
- return false;
- }
- if (typeof obj1 === "string") {
- return obj1 === obj2;
- }
+ if (typeof obj1 !== typeof obj2) return false;
+ if (typeof obj1 === "string") return obj1 === obj2;
var equal = obj1.tagClass === obj2.tagClass && obj1.type === obj2.type && obj1.constructed === obj2.constructed && obj1.composed === obj2.composed && asn1.equals(obj1.value, obj2.value);
- if (options && options.includeBitStringContents) {
- equal = equal && obj1.bitStringContents === obj2.bitStringContents;
- }
+ if (options && options.includeBitStringContents) equal = equal && obj1.bitStringContents === obj2.bitStringContents;
return equal;
};
/**
@@ -25283,16 +23876,10 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
asn1.getBerValueLength = function(b) {
var b2 = b.getByte();
- if (b2 === 128) {
- return undefined;
- }
+ if (b2 === 128) return;
var length;
- var longForm = b2 & 128;
- if (!longForm) {
- length = b2;
- } else {
- length = b.getInt((b2 & 127) << 3);
- }
+ if (!(b2 & 128)) length = b2;
+ else length = b.getInt((b2 & 127) << 3);
return length;
};
/**
@@ -25304,7 +23891,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _checkBufferLength(bytes, remaining, n) {
if (n > remaining) {
- var error = new Error("Too few bytes to parse DER.");
+ var error = /* @__PURE__ */ new Error("Too few bytes to parse DER.");
error.available = bytes.length();
error.remaining = remaining;
error.requested = n;
@@ -25324,21 +23911,15 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var _getValueLength = function(bytes, remaining) {
var b2 = bytes.getByte();
remaining--;
- if (b2 === 128) {
- return undefined;
- }
+ if (b2 === 128) return;
var length;
- var longForm = b2 & 128;
- if (!longForm) {
- length = b2;
- } else {
+ if (!(b2 & 128)) length = b2;
+ else {
var longFormBytes = b2 & 127;
_checkBufferLength(bytes, remaining, longFormBytes);
length = bytes.getInt(longFormBytes << 3);
}
- if (length < 0) {
- throw new Error("Negative length: " + length);
- }
+ if (length < 0) throw new Error("Negative length: " + length);
return length;
};
/**
@@ -25364,36 +23945,24 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the parsed asn1 object.
*/
asn1.fromDer = function(bytes, options) {
- if (options === undefined) {
- options = {
- strict: true,
- parseAllBytes: true,
- decodeBitStrings: true
- };
- }
- if (typeof options === "boolean") {
- options = {
- strict: options,
- parseAllBytes: true,
- decodeBitStrings: true
- };
- }
- if (!("strict" in options)) {
- options.strict = true;
- }
- if (!("parseAllBytes" in options)) {
- options.parseAllBytes = true;
- }
- if (!("decodeBitStrings" in options)) {
- options.decodeBitStrings = true;
- }
- if (typeof bytes === "string") {
- bytes = forge.util.createBuffer(bytes);
- }
+ if (options === void 0) options = {
+ strict: true,
+ parseAllBytes: true,
+ decodeBitStrings: true
+ };
+ if (typeof options === "boolean") options = {
+ strict: options,
+ parseAllBytes: true,
+ decodeBitStrings: true
+ };
+ if (!("strict" in options)) options.strict = true;
+ if (!("parseAllBytes" in options)) options.parseAllBytes = true;
+ if (!("decodeBitStrings" in options)) options.decodeBitStrings = true;
+ if (typeof bytes === "string") bytes = forge.util.createBuffer(bytes);
var byteCount = bytes.length();
var value = _fromDer(bytes, bytes.length(), 0, options);
if (options.parseAllBytes && bytes.length() !== 0) {
- var error = new Error("Unparsed DER bytes remain after ASN.1 parsing.");
+ var error = /* @__PURE__ */ new Error("Unparsed DER bytes remain after ASN.1 parsing.");
error.byteCount = byteCount;
error.remaining = bytes.length();
throw error;
@@ -25420,9 +23989,9 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
start = bytes.length();
var length = _getValueLength(bytes, remaining);
remaining -= start - bytes.length();
- if (length !== undefined && length > remaining) {
+ if (length !== void 0 && length > remaining) {
if (options.strict) {
- var error = new Error("Too few bytes to read ASN.1 value.");
+ var error = /* @__PURE__ */ new Error("Too few bytes to read ASN.1 value.");
error.available = bytes.length();
error.remaining = remaining;
error.requested = length;
@@ -25435,31 +24004,26 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var constructed = (b1 & 32) === 32;
if (constructed) {
value = [];
- if (length === undefined) {
- for (;;) {
- _checkBufferLength(bytes, remaining, 2);
- if (bytes.bytes(2) === String.fromCharCode(0, 0)) {
- bytes.getBytes(2);
- remaining -= 2;
- break;
- }
- start = bytes.length();
- value.push(_fromDer(bytes, remaining, depth + 1, options));
- remaining -= start - bytes.length();
- }
- } else {
- while (length > 0) {
- start = bytes.length();
- value.push(_fromDer(bytes, length, depth + 1, options));
- remaining -= start - bytes.length();
- length -= start - bytes.length();
+ if (length === void 0) for (;;) {
+ _checkBufferLength(bytes, remaining, 2);
+ if (bytes.bytes(2) === String.fromCharCode(0, 0)) {
+ bytes.getBytes(2);
+ remaining -= 2;
+ break;
}
+ start = bytes.length();
+ value.push(_fromDer(bytes, remaining, depth + 1, options));
+ remaining -= start - bytes.length();
+ }
+ else while (length > 0) {
+ start = bytes.length();
+ value.push(_fromDer(bytes, length, depth + 1, options));
+ remaining -= start - bytes.length();
+ length -= start - bytes.length();
}
}
- if (value === undefined && tagClass === asn1.Class.UNIVERSAL && type === asn1.Type.BITSTRING) {
- bitStringContents = bytes.bytes(length);
- }
- if (value === undefined && options.decodeBitStrings && tagClass === asn1.Class.UNIVERSAL && type === asn1.Type.BITSTRING && length > 1) {
+ if (value === void 0 && tagClass === asn1.Class.UNIVERSAL && type === asn1.Type.BITSTRING) bitStringContents = bytes.bytes(length);
+ if (value === void 0 && options.decodeBitStrings && tagClass === asn1.Class.UNIVERSAL && type === asn1.Type.BITSTRING && length > 1) {
var savedRead = bytes.read;
var savedRemaining = remaining;
var unused = 0;
@@ -25468,35 +24032,26 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
unused = bytes.getByte();
remaining--;
}
- if (unused === 0) {
- try {
- start = bytes.length();
- var subOptions = {
- strict: true,
- decodeBitStrings: true
- };
- var composed = _fromDer(bytes, remaining, depth + 1, subOptions);
- var used = start - bytes.length();
- remaining -= used;
- if (type == asn1.Type.BITSTRING) {
- used++;
- }
- var tc = composed.tagClass;
- if (used === length && (tc === asn1.Class.UNIVERSAL || tc === asn1.Class.CONTEXT_SPECIFIC)) {
- value = [composed];
- }
- } catch (ex) {}
- }
- if (value === undefined) {
+ if (unused === 0) try {
+ start = bytes.length();
+ var composed = _fromDer(bytes, remaining, depth + 1, {
+ strict: true,
+ decodeBitStrings: true
+ });
+ var used = start - bytes.length();
+ remaining -= used;
+ if (type == asn1.Type.BITSTRING) used++;
+ var tc = composed.tagClass;
+ if (used === length && (tc === asn1.Class.UNIVERSAL || tc === asn1.Class.CONTEXT_SPECIFIC)) value = [composed];
+ } catch (ex) {}
+ if (value === void 0) {
bytes.read = savedRead;
remaining = savedRemaining;
}
}
- if (value === undefined) {
- if (length === undefined) {
- if (options.strict) {
- throw new Error("Non-constructed ASN.1 object of indefinite length.");
- }
+ if (value === void 0) {
+ if (length === void 0) {
+ if (options.strict) throw new Error("Non-constructed ASN.1 object of indefinite length.");
length = remaining;
}
if (type === asn1.Type.BMPSTRING) {
@@ -25511,7 +24066,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
remaining -= length;
}
}
- var asn1Options = bitStringContents === undefined ? null : { bitStringContents };
+ var asn1Options = bitStringContents === void 0 ? null : { bitStringContents };
return asn1.create(tagClass, type, constructed, value, asn1Options);
}
/**
@@ -25528,40 +24083,19 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var useBitStringContents = false;
if ("bitStringContents" in obj) {
useBitStringContents = true;
- if (obj.original) {
- useBitStringContents = asn1.equals(obj, obj.original);
- }
- }
- if (useBitStringContents) {
- value.putBytes(obj.bitStringContents);
- } else if (obj.composed) {
- if (obj.constructed) {
- b1 |= 32;
- } else {
- value.putByte(0);
- }
- for (var i = 0; i < obj.value.length; ++i) {
- if (obj.value[i] !== undefined) {
- value.putBuffer(asn1.toDer(obj.value[i]));
- }
- }
- } else {
- if (obj.type === asn1.Type.BMPSTRING) {
- for (var i = 0; i < obj.value.length; ++i) {
- value.putInt16(obj.value.charCodeAt(i));
- }
- } else {
- if (obj.type === asn1.Type.INTEGER && obj.value.length > 1 && (obj.value.charCodeAt(0) === 0 && (obj.value.charCodeAt(1) & 128) === 0 || obj.value.charCodeAt(0) === 255 && (obj.value.charCodeAt(1) & 128) === 128)) {
- value.putBytes(obj.value.substr(1));
- } else {
- value.putBytes(obj.value);
- }
- }
- }
+ if (obj.original) useBitStringContents = asn1.equals(obj, obj.original);
+ }
+ if (useBitStringContents) value.putBytes(obj.bitStringContents);
+ else if (obj.composed) {
+ if (obj.constructed) b1 |= 32;
+ else value.putByte(0);
+ for (var i = 0; i < obj.value.length; ++i) if (obj.value[i] !== void 0) value.putBuffer(asn1.toDer(obj.value[i]));
+ } else if (obj.type === asn1.Type.BMPSTRING) for (var i = 0; i < obj.value.length; ++i) value.putInt16(obj.value.charCodeAt(i));
+ else if (obj.type === asn1.Type.INTEGER && obj.value.length > 1 && (obj.value.charCodeAt(0) === 0 && (obj.value.charCodeAt(1) & 128) === 0 || obj.value.charCodeAt(0) === 255 && (obj.value.charCodeAt(1) & 128) === 128)) value.putBytes(obj.value.substr(1));
+ else value.putBytes(obj.value);
bytes.putByte(b1);
- if (value.length() <= 127) {
- bytes.putByte(value.length() & 127);
- } else {
+ if (value.length() <= 127) bytes.putByte(value.length() & 127);
+ else {
var len = value.length();
var lenBytes = "";
do {
@@ -25569,9 +24103,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
len = len >>> 8;
} while (len > 0);
bytes.putByte(lenBytes.length | 128);
- for (var i = lenBytes.length - 1; i >= 0; --i) {
- bytes.putByte(lenBytes.charCodeAt(i));
- }
+ for (var i = lenBytes.length - 1; i >= 0; --i) bytes.putByte(lenBytes.charCodeAt(i));
}
bytes.putBuffer(value);
return bytes;
@@ -25596,15 +24128,11 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
do {
b = value & 127;
value = value >>> 7;
- if (!last) {
- b |= 128;
- }
+ if (!last) b |= 128;
valueBytes.push(b);
last = false;
} while (value > 0);
- for (var n = valueBytes.length - 1; n >= 0; --n) {
- bytes.putByte(valueBytes[n]);
- }
+ for (var n = valueBytes.length - 1; n >= 0; --n) bytes.putByte(valueBytes[n]);
}
return bytes;
};
@@ -25619,18 +24147,15 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
asn1.derToOid = function(bytes) {
var oid;
- if (typeof bytes === "string") {
- bytes = forge.util.createBuffer(bytes);
- }
+ if (typeof bytes === "string") bytes = forge.util.createBuffer(bytes);
var b = bytes.getByte();
oid = Math.floor(b / 40) + "." + b % 40;
var value = 0;
while (bytes.length() > 0) {
b = bytes.getByte();
value = value << 7;
- if (b & 128) {
- value += b & 127;
- } else {
+ if (b & 128) value += b & 127;
+ else {
oid += "." + (value + b);
value = 0;
}
@@ -25648,7 +24173,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the date.
*/
asn1.utcTimeToDate = function(utc) {
- var date = new Date();
+ var date = /* @__PURE__ */ new Date();
var year = parseInt(utc.substr(0, 2), 10);
year = year >= 50 ? 1900 + year : 2e3 + year;
var MM = parseInt(utc.substr(2, 2), 10) - 1;
@@ -25673,11 +24198,8 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var mmoffset = parseInt(utc.substr(end + 4, 2), 10);
var offset = hhoffset * 60 + mmoffset;
offset *= 6e4;
- if (c === "+") {
- date.setTime(+date - offset);
- } else {
- date.setTime(+date + offset);
- }
+ if (c === "+") date.setTime(+date - offset);
+ else date.setTime(+date + offset);
}
}
return date;
@@ -25690,7 +24212,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the date.
*/
asn1.generalizedTimeToDate = function(gentime) {
- var date = new Date();
+ var date = /* @__PURE__ */ new Date();
var YYYY = parseInt(gentime.substr(0, 4), 10);
var MM = parseInt(gentime.substr(4, 2), 10) - 1;
var DD = parseInt(gentime.substr(6, 2), 10);
@@ -25700,23 +24222,17 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var fff = 0;
var offset = 0;
var isUTC = false;
- if (gentime.charAt(gentime.length - 1) === "Z") {
- isUTC = true;
- }
+ if (gentime.charAt(gentime.length - 1) === "Z") isUTC = true;
var end = gentime.length - 5, c = gentime.charAt(end);
if (c === "+" || c === "-") {
var hhoffset = parseInt(gentime.substr(end + 1, 2), 10);
var mmoffset = parseInt(gentime.substr(end + 4, 2), 10);
offset = hhoffset * 60 + mmoffset;
offset *= 6e4;
- if (c === "+") {
- offset *= -1;
- }
+ if (c === "+") offset *= -1;
isUTC = true;
}
- if (gentime.charAt(14) === ".") {
- fff = parseFloat(gentime.substr(14), 10) * 1e3;
- }
+ if (gentime.charAt(14) === ".") fff = parseFloat(gentime.substr(14), 10) * 1e3;
if (isUTC) {
date.setUTCFullYear(YYYY, MM, DD);
date.setUTCHours(hh, mm, ss, fff);
@@ -25739,9 +24255,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the UTCTime value.
*/
asn1.dateToUtcTime = function(date) {
- if (typeof date === "string") {
- return date;
- }
+ if (typeof date === "string") return date;
var rval = "";
var format = [];
format.push(("" + date.getUTCFullYear()).substr(2));
@@ -25751,9 +24265,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
format.push("" + date.getUTCMinutes());
format.push("" + date.getUTCSeconds());
for (var i = 0; i < format.length; ++i) {
- if (format[i].length < 2) {
- rval += "0";
- }
+ if (format[i].length < 2) rval += "0";
rval += format[i];
}
rval += "Z";
@@ -25767,9 +24279,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the GeneralizedTime value as a string.
*/
asn1.dateToGeneralizedTime = function(date) {
- if (typeof date === "string") {
- return date;
- }
+ if (typeof date === "string") return date;
var rval = "";
var format = [];
format.push("" + date.getUTCFullYear());
@@ -25779,9 +24289,7 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
format.push("" + date.getUTCMinutes());
format.push("" + date.getUTCSeconds());
for (var i = 0; i < format.length; ++i) {
- if (format[i].length < 2) {
- rval += "0";
- }
+ if (format[i].length < 2) rval += "0";
rval += format[i];
}
rval += "Z";
@@ -25797,19 +24305,11 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
asn1.integerToDer = function(x) {
var rval = forge.util.createBuffer();
- if (x >= -128 && x < 128) {
- return rval.putSignedInt(x, 8);
- }
- if (x >= -32768 && x < 32768) {
- return rval.putSignedInt(x, 16);
- }
- if (x >= -8388608 && x < 8388608) {
- return rval.putSignedInt(x, 24);
- }
- if (x >= -2147483648 && x < 2147483648) {
- return rval.putSignedInt(x, 32);
- }
- var error = new Error("Integer too large; max is 32-bits.");
+ if (x >= -128 && x < 128) return rval.putSignedInt(x, 8);
+ if (x >= -32768 && x < 32768) return rval.putSignedInt(x, 16);
+ if (x >= -8388608 && x < 8388608) return rval.putSignedInt(x, 24);
+ if (x >= -2147483648 && x < 2147483648) return rval.putSignedInt(x, 32);
+ var error = /* @__PURE__ */ new Error("Integer too large; max is 32-bits.");
error.integer = x;
throw error;
};
@@ -25822,13 +24322,9 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the integer.
*/
asn1.derToInteger = function(bytes) {
- if (typeof bytes === "string") {
- bytes = forge.util.createBuffer(bytes);
- }
+ if (typeof bytes === "string") bytes = forge.util.createBuffer(bytes);
var n = bytes.length() * 8;
- if (n > 32) {
- throw new Error("Integer too large; max is 32-bits.");
- }
+ if (n > 32) throw new Error("Integer too large; max is 32-bits.");
return bytes.getSignedInt(n);
};
/**
@@ -25865,50 +24361,29 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
rval = v.value[i].optional || false;
if (obj.value[j]) {
rval = asn1.validate(obj.value[j], v.value[i], capture, errors);
- if (rval) {
- ++j;
- } else if (v.value[i].optional) {
- rval = true;
- }
- }
- if (!rval && errors) {
- errors.push("[" + v.name + "] " + "Tag class \"" + v.tagClass + "\", type \"" + v.type + "\" expected value length \"" + v.value.length + "\", got \"" + obj.value.length + "\"");
+ if (rval) ++j;
+ else if (v.value[i].optional) rval = true;
}
+ if (!rval && errors) errors.push("[" + v.name + "] Tag class \"" + v.tagClass + "\", type \"" + v.type + "\" expected value length \"" + v.value.length + "\", got \"" + obj.value.length + "\"");
}
}
if (rval && capture) {
- if (v.capture) {
- capture[v.capture] = obj.value;
- }
- if (v.captureAsn1) {
- capture[v.captureAsn1] = obj;
- }
- if (v.captureBitStringContents && "bitStringContents" in obj) {
- capture[v.captureBitStringContents] = obj.bitStringContents;
- }
+ if (v.capture) capture[v.capture] = obj.value;
+ if (v.captureAsn1) capture[v.captureAsn1] = obj;
+ if (v.captureBitStringContents && "bitStringContents" in obj) capture[v.captureBitStringContents] = obj.bitStringContents;
if (v.captureBitStringValue && "bitStringContents" in obj) {
var value;
- if (obj.bitStringContents.length < 2) {
- capture[v.captureBitStringValue] = "";
- } else {
- var unused = obj.bitStringContents.charCodeAt(0);
- if (unused !== 0) {
- throw new Error("captureBitStringValue only supported for zero unused bits");
- }
+ if (obj.bitStringContents.length < 2) capture[v.captureBitStringValue] = "";
+ else {
+ if (obj.bitStringContents.charCodeAt(0) !== 0) throw new Error("captureBitStringValue only supported for zero unused bits");
capture[v.captureBitStringValue] = obj.bitStringContents.slice(1);
}
}
}
- } else if (errors) {
- errors.push("[" + v.name + "] " + "Expected constructed \"" + v.constructed + "\", got \"" + obj.constructed + "\"");
- }
+ } else if (errors) errors.push("[" + v.name + "] Expected constructed \"" + v.constructed + "\", got \"" + obj.constructed + "\"");
} else if (errors) {
- if (obj.tagClass !== v.tagClass) {
- errors.push("[" + v.name + "] " + "Expected tag class \"" + v.tagClass + "\", got \"" + obj.tagClass + "\"");
- }
- if (obj.type !== v.type) {
- errors.push("[" + v.name + "] " + "Expected type \"" + v.type + "\", got \"" + obj.type + "\"");
- }
+ if (obj.tagClass !== v.tagClass) errors.push("[" + v.name + "] Expected tag class \"" + v.tagClass + "\", got \"" + obj.tagClass + "\"");
+ if (obj.type !== v.type) errors.push("[" + v.name + "] Expected type \"" + v.type + "\", got \"" + obj.type + "\"");
}
return rval;
};
@@ -25926,13 +24401,9 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = "";
level = level || 0;
indentation = indentation || 2;
- if (level > 0) {
- rval += "\n";
- }
+ if (level > 0) rval += "\n";
var indent = "";
- for (var i = 0; i < level * indentation; ++i) {
- indent += " ";
- }
+ for (var i = 0; i < level * indentation; ++i) indent += " ";
rval += indent + "Tag: ";
switch (obj.tagClass) {
case asn1.Class.UNIVERSAL:
@@ -26015,22 +24486,16 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
rval += " (BMP String)";
break;
}
- } else {
- rval += obj.type;
- }
+ } else rval += obj.type;
rval += "\n";
rval += indent + "Constructed: " + obj.constructed + "\n";
if (obj.composed) {
var subvalues = 0;
var sub = "";
- for (var i = 0; i < obj.value.length; ++i) {
- if (obj.value[i] !== undefined) {
- subvalues += 1;
- sub += asn1.prettyPrint(obj.value[i], level + 1, indentation);
- if (i + 1 < obj.value.length) {
- sub += ",";
- }
- }
+ for (var i = 0; i < obj.value.length; ++i) if (obj.value[i] !== void 0) {
+ subvalues += 1;
+ sub += asn1.prettyPrint(obj.value[i], level + 1, indentation);
+ if (i + 1 < obj.value.length) sub += ",";
}
rval += indent + "Sub values: " + subvalues + sub;
} else {
@@ -26039,60 +24504,39 @@ var require_asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var oid = asn1.derToOid(obj.value);
rval += oid;
if (forge.pki && forge.pki.oids) {
- if (oid in forge.pki.oids) {
- rval += " (" + forge.pki.oids[oid] + ") ";
- }
+ if (oid in forge.pki.oids) rval += " (" + forge.pki.oids[oid] + ") ";
}
}
- if (obj.type === asn1.Type.INTEGER) {
- try {
- rval += asn1.derToInteger(obj.value);
- } catch (ex) {
- rval += "0x" + forge.util.bytesToHex(obj.value);
- }
- } else if (obj.type === asn1.Type.BITSTRING) {
- if (obj.value.length > 1) {
- rval += "0x" + forge.util.bytesToHex(obj.value.slice(1));
- } else {
- rval += "(none)";
- }
+ if (obj.type === asn1.Type.INTEGER) try {
+ rval += asn1.derToInteger(obj.value);
+ } catch (ex) {
+ rval += "0x" + forge.util.bytesToHex(obj.value);
+ }
+ else if (obj.type === asn1.Type.BITSTRING) {
+ if (obj.value.length > 1) rval += "0x" + forge.util.bytesToHex(obj.value.slice(1));
+ else rval += "(none)";
if (obj.value.length > 0) {
var unused = obj.value.charCodeAt(0);
- if (unused == 1) {
- rval += " (1 unused bit shown)";
- } else if (unused > 1) {
- rval += " (" + unused + " unused bits shown)";
- }
+ if (unused == 1) rval += " (1 unused bit shown)";
+ else if (unused > 1) rval += " (" + unused + " unused bits shown)";
}
} else if (obj.type === asn1.Type.OCTETSTRING) {
- if (!_nonLatinRegex.test(obj.value)) {
- rval += "(" + obj.value + ") ";
- }
- rval += "0x" + forge.util.bytesToHex(obj.value);
- } else if (obj.type === asn1.Type.UTF8) {
- try {
- rval += forge.util.decodeUtf8(obj.value);
- } catch (e) {
- if (e.message === "URI malformed") {
- rval += "0x" + forge.util.bytesToHex(obj.value) + " (malformed UTF8)";
- } else {
- throw e;
- }
- }
- } else if (obj.type === asn1.Type.PRINTABLESTRING || obj.type === asn1.Type.IA5String) {
- rval += obj.value;
- } else if (_nonLatinRegex.test(obj.value)) {
+ if (!_nonLatinRegex.test(obj.value)) rval += "(" + obj.value + ") ";
rval += "0x" + forge.util.bytesToHex(obj.value);
- } else if (obj.value.length === 0) {
- rval += "[null]";
- } else {
- rval += obj.value;
+ } else if (obj.type === asn1.Type.UTF8) try {
+ rval += forge.util.decodeUtf8(obj.value);
+ } catch (e) {
+ if (e.message === "URI malformed") rval += "0x" + forge.util.bytesToHex(obj.value) + " (malformed UTF8)";
+ else throw e;
}
+ else if (obj.type === asn1.Type.PRINTABLESTRING || obj.type === asn1.Type.IA5String) rval += obj.value;
+ else if (_nonLatinRegex.test(obj.value)) rval += "0x" + forge.util.bytesToHex(obj.value);
+ else if (obj.value.length === 0) rval += "[null]";
+ else rval += obj.value;
}
return rval;
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/md.js
var require_md = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -26107,7 +24551,6 @@ var require_md = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = forge.md = forge.md || {};
forge.md.algorithms = forge.md.algorithms || {};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/hmac.js
var require_hmac$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -26144,29 +24587,18 @@ var require_hmac$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* or null to reuse the previous key.
*/
ctx.start = function(md, key) {
- if (md !== null) {
- if (typeof md === "string") {
- md = md.toLowerCase();
- if (md in forge.md.algorithms) {
- _md = forge.md.algorithms[md].create();
- } else {
- throw new Error("Unknown hash algorithm \"" + md + "\"");
- }
- } else {
- _md = md;
- }
- }
- if (key === null) {
- key = _key;
- } else {
- if (typeof key === "string") {
- key = forge.util.createBuffer(key);
- } else if (forge.util.isArray(key)) {
+ if (md !== null) if (typeof md === "string") {
+ md = md.toLowerCase();
+ if (md in forge.md.algorithms) _md = forge.md.algorithms[md].create();
+ else throw new Error("Unknown hash algorithm \"" + md + "\"");
+ } else _md = md;
+ if (key === null) key = _key;
+ else {
+ if (typeof key === "string") key = forge.util.createBuffer(key);
+ else if (forge.util.isArray(key)) {
var tmp = key;
key = forge.util.createBuffer();
- for (var i = 0; i < tmp.length; ++i) {
- key.putByte(tmp[i]);
- }
+ for (var i = 0; i < tmp.length; ++i) key.putByte(tmp[i]);
}
var keylen = key.length();
if (keylen > _md.blockLength) {
@@ -26220,7 +24652,6 @@ var require_hmac$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return ctx;
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/md5.js
var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -26242,9 +24673,7 @@ var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return a message digest object.
*/
md5.create = function() {
- if (!_initialized) {
- _init();
- }
+ if (!_initialized) _init();
var _state = null;
var _input = forge.util.createBuffer();
var _w = new Array(16);
@@ -26265,9 +24694,7 @@ var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.messageLength = 0;
md.fullMessageLength = md.messageLength64 = [];
var int32s = md.messageLengthSize / 4;
- for (var i = 0; i < int32s; ++i) {
- md.fullMessageLength.push(0);
- }
+ for (var i = 0; i < int32s; ++i) md.fullMessageLength.push(0);
_input = forge.util.createBuffer();
_state = {
h0: 1732584193,
@@ -26289,9 +24716,7 @@ var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return this digest object.
*/
md.update = function(msg, encoding) {
- if (encoding === "utf8") {
- msg = forge.util.encodeUtf8(msg);
- }
+ if (encoding === "utf8") msg = forge.util.encodeUtf8(msg);
var len = msg.length;
md.messageLength += len;
len = [len / 4294967296 >>> 0, len >>> 0];
@@ -26303,9 +24728,7 @@ var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
_input.putBytes(msg);
_update(_state, _w, _input);
- if (_input.read > 2048 || _input.length() === 0) {
- _input.compact();
- }
+ if (_input.read > 2048 || _input.length() === 0) _input.compact();
return md;
};
/**
@@ -26316,8 +24739,7 @@ var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.digest = function() {
var finalBlock = forge.util.createBuffer();
finalBlock.putBytes(_input.bytes());
- var remaining = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize;
- var overflow = remaining & md.blockLength - 1;
+ var overflow = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize & md.blockLength - 1;
finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));
var bits, carry = 0;
for (var i = md.fullMessageLength.length - 1; i >= 0; --i) {
@@ -26485,9 +24907,7 @@ var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21
];
_k = new Array(64);
- for (var i = 0; i < 64; ++i) {
- _k[i] = Math.floor(Math.abs(Math.sin(i + 1)) * 4294967296);
- }
+ for (var i = 0; i < 64; ++i) _k[i] = Math.floor(Math.abs(Math.sin(i + 1)) * 4294967296);
_initialized = true;
}
/**
@@ -26550,7 +24970,6 @@ var require_md5$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pem.js
var require_pem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -26617,19 +25036,11 @@ var require_pem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
name: "DEK-Info",
values: [msg.dekInfo.algorithm]
};
- if (msg.dekInfo.parameters) {
- header.values.push(msg.dekInfo.parameters);
- }
+ if (msg.dekInfo.parameters) header.values.push(msg.dekInfo.parameters);
rval += foldHeader(header);
}
- if (msg.headers) {
- for (var i = 0; i < msg.headers.length; ++i) {
- rval += foldHeader(msg.headers[i]);
- }
- }
- if (msg.procType) {
- rval += "\r\n";
- }
+ if (msg.headers) for (var i = 0; i < msg.headers.length; ++i) rval += foldHeader(msg.headers[i]);
+ if (msg.procType) rval += "\r\n";
rval += forge.util.encode64(msg.body, options.maxline || 64) + "\r\n";
rval += "-----END " + msg.type + "-----\r\n";
return rval;
@@ -26649,13 +25060,9 @@ var require_pem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var match;
while (true) {
match = rMessage.exec(str);
- if (!match) {
- break;
- }
+ if (!match) break;
var type = match[1];
- if (type === "NEW CERTIFICATE REQUEST") {
- type = "CERTIFICATE REQUEST";
- }
+ if (type === "NEW CERTIFICATE REQUEST") type = "CERTIFICATE REQUEST";
var msg = {
type,
procType: null,
@@ -26665,18 +25072,14 @@ var require_pem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
body: forge.util.decode64(match[3])
};
rval.push(msg);
- if (!match[2]) {
- continue;
- }
+ if (!match[2]) continue;
var lines = match[2].split(rCRLF);
var li = 0;
while (match && li < lines.length) {
var line = lines[li].replace(/\s+$/, "");
for (var nl = li + 1; nl < lines.length; ++nl) {
var next = lines[nl];
- if (!/\s/.test(next[0])) {
- break;
- }
+ if (!/\s/.test(next[0])) break;
line += next;
li = nl;
}
@@ -26687,42 +25090,28 @@ var require_pem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
values: []
};
var values = match[2].split(",");
- for (var vi = 0; vi < values.length; ++vi) {
- header.values.push(ltrim(values[vi]));
- }
+ for (var vi = 0; vi < values.length; ++vi) header.values.push(ltrim(values[vi]));
if (!msg.procType) {
- if (header.name !== "Proc-Type") {
- throw new Error("Invalid PEM formatted message. The first " + "encapsulated header must be \"Proc-Type\".");
- } else if (header.values.length !== 2) {
- throw new Error("Invalid PEM formatted message. The \"Proc-Type\" " + "header must have two subfields.");
- }
+ if (header.name !== "Proc-Type") throw new Error("Invalid PEM formatted message. The first encapsulated header must be \"Proc-Type\".");
+ else if (header.values.length !== 2) throw new Error("Invalid PEM formatted message. The \"Proc-Type\" header must have two subfields.");
msg.procType = {
version: values[0],
type: values[1]
};
- } else if (!msg.contentDomain && header.name === "Content-Domain") {
- msg.contentDomain = values[0] || "";
- } else if (!msg.dekInfo && header.name === "DEK-Info") {
- if (header.values.length === 0) {
- throw new Error("Invalid PEM formatted message. The \"DEK-Info\" " + "header must have at least one subfield.");
- }
+ } else if (!msg.contentDomain && header.name === "Content-Domain") msg.contentDomain = values[0] || "";
+ else if (!msg.dekInfo && header.name === "DEK-Info") {
+ if (header.values.length === 0) throw new Error("Invalid PEM formatted message. The \"DEK-Info\" header must have at least one subfield.");
msg.dekInfo = {
algorithm: values[0],
parameters: values[1] || null
};
- } else {
- msg.headers.push(header);
- }
+ } else msg.headers.push(header);
}
++li;
}
- if (msg.procType === "ENCRYPTED" && !msg.dekInfo) {
- throw new Error("Invalid PEM formatted message. The \"DEK-Info\" " + "header must be present if \"Proc-Type\" is \"ENCRYPTED\".");
- }
- }
- if (rval.length === 0) {
- throw new Error("Invalid PEM formatted message.");
+ if (msg.procType === "ENCRYPTED" && !msg.dekInfo) throw new Error("Invalid PEM formatted message. The \"DEK-Info\" header must be present if \"Proc-Type\" is \"ENCRYPTED\".");
}
+ if (rval.length === 0) throw new Error("Invalid PEM formatted message.");
return rval;
};
function foldHeader(header) {
@@ -26731,35 +25120,26 @@ var require_pem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var insertSpace = function(match, $1) {
return " " + $1;
};
- for (var i = 0; i < header.values.length; ++i) {
- values.push(header.values[i].replace(/^(\S+\r\n)/, insertSpace));
- }
+ for (var i = 0; i < header.values.length; ++i) values.push(header.values[i].replace(/^(\S+\r\n)/, insertSpace));
rval += values.join(",") + "\r\n";
var length = 0;
var candidate = -1;
- for (var i = 0; i < rval.length; ++i, ++length) {
- if (length > 65 && candidate !== -1) {
- var insert = rval[candidate];
- if (insert === ",") {
- ++candidate;
- rval = rval.substr(0, candidate) + "\r\n " + rval.substr(candidate);
- } else {
- rval = rval.substr(0, candidate) + "\r\n" + insert + rval.substr(candidate + 1);
- }
- length = i - candidate - 1;
- candidate = -1;
- ++i;
- } else if (rval[i] === " " || rval[i] === " " || rval[i] === ",") {
- candidate = i;
- }
- }
+ for (var i = 0; i < rval.length; ++i, ++length) if (length > 65 && candidate !== -1) {
+ var insert = rval[candidate];
+ if (insert === ",") {
+ ++candidate;
+ rval = rval.substr(0, candidate) + "\r\n " + rval.substr(candidate);
+ } else rval = rval.substr(0, candidate) + "\r\n" + insert + rval.substr(candidate + 1);
+ length = i - candidate - 1;
+ candidate = -1;
+ ++i;
+ } else if (rval[i] === " " || rval[i] === " " || rval[i] === ",") candidate = i;
return rval;
}
function ltrim(str) {
return str.replace(/^\s+/, "");
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/des.js
var require_des = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -26936,14 +25316,10 @@ var require_des = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* false for encryption.
*/
forge.des.Algorithm.prototype.initialize = function(options) {
- if (this._init) {
- return;
- }
+ if (this._init) return;
var key = forge.util.createBuffer(options.key);
if (this.name.indexOf("3DES") === 0) {
- if (key.length() !== 24) {
- throw new Error("Invalid Triple-DES key size: " + key.length() * 8);
- }
+ if (key.length() !== 24) throw new Error("Invalid Triple-DES key size: " + key.length() * 8);
}
this._keys = _createKeys(key);
this._init = true;
@@ -27820,39 +26196,36 @@ var require_des = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _updateBlock(keys, input, output, decrypt) {
var iterations = keys.length === 32 ? 3 : 9;
var looping;
- if (iterations === 3) {
- looping = decrypt ? [
- 30,
- -2,
- -2
- ] : [
- 0,
- 32,
- 2
- ];
- } else {
- looping = decrypt ? [
- 94,
- 62,
- -2,
- 32,
- 64,
- 2,
- 30,
- -2,
- -2
- ] : [
- 0,
- 32,
- 2,
- 62,
- 30,
- -2,
- 64,
- 96,
- 2
- ];
- }
+ if (iterations === 3) looping = decrypt ? [
+ 30,
+ -2,
+ -2
+ ] : [
+ 0,
+ 32,
+ 2
+ ];
+ else looping = decrypt ? [
+ 94,
+ 62,
+ -2,
+ 32,
+ 64,
+ 2,
+ 30,
+ -2,
+ -2
+ ] : [
+ 0,
+ 32,
+ 2,
+ 62,
+ 30,
+ -2,
+ 64,
+ 96,
+ 2
+ ];
var tmp;
var left = input[0];
var right = input[1];
@@ -27928,14 +26301,10 @@ var require_des = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _createCipher(options) {
options = options || {};
- var mode = (options.mode || "CBC").toUpperCase();
- var algorithm = "DES-" + mode;
+ var algorithm = "DES-" + (options.mode || "CBC").toUpperCase();
var cipher;
- if (options.decrypt) {
- cipher = forge.cipher.createDecipher(algorithm, options.key);
- } else {
- cipher = forge.cipher.createCipher(algorithm, options.key);
- }
+ if (options.decrypt) cipher = forge.cipher.createDecipher(algorithm, options.key);
+ else cipher = forge.cipher.createCipher(algorithm, options.key);
var start = cipher.start;
cipher.start = function(iv, options) {
var output = null;
@@ -27951,7 +26320,6 @@ var require_des = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return cipher;
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pbkdf2.js
var require_pbkdf2$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -27970,9 +26338,7 @@ var require_pbkdf2$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
require_util$8();
var pkcs5 = forge.pkcs5 = forge.pkcs5 || {};
var crypto;
- if (forge.util.isNodejs && !forge.options.usePureJavaScript) {
- crypto = __require("crypto");
- }
+ if (forge.util.isNodejs && !forge.options.usePureJavaScript) crypto = __require("crypto");
/**
* Derives a key from a password.
*
@@ -27995,47 +26361,31 @@ var require_pbkdf2$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md = null;
}
if (forge.util.isNodejs && !forge.options.usePureJavaScript && crypto.pbkdf2 && (md === null || typeof md !== "object") && (crypto.pbkdf2Sync.length > 4 || !md || md === "sha1")) {
- if (typeof md !== "string") {
- md = "sha1";
- }
+ if (typeof md !== "string") md = "sha1";
p = Buffer.from(p, "binary");
s = Buffer.from(s, "binary");
if (!callback) {
- if (crypto.pbkdf2Sync.length === 4) {
- return crypto.pbkdf2Sync(p, s, c, dkLen).toString("binary");
- }
+ if (crypto.pbkdf2Sync.length === 4) return crypto.pbkdf2Sync(p, s, c, dkLen).toString("binary");
return crypto.pbkdf2Sync(p, s, c, dkLen, md).toString("binary");
}
- if (crypto.pbkdf2Sync.length === 4) {
- return crypto.pbkdf2(p, s, c, dkLen, function(err, key) {
- if (err) {
- return callback(err);
- }
- callback(null, key.toString("binary"));
- });
- }
+ if (crypto.pbkdf2Sync.length === 4) return crypto.pbkdf2(p, s, c, dkLen, function(err, key) {
+ if (err) return callback(err);
+ callback(null, key.toString("binary"));
+ });
return crypto.pbkdf2(p, s, c, dkLen, md, function(err, key) {
- if (err) {
- return callback(err);
- }
+ if (err) return callback(err);
callback(null, key.toString("binary"));
});
}
- if (typeof md === "undefined" || md === null) {
- md = "sha1";
- }
+ if (typeof md === "undefined" || md === null) md = "sha1";
if (typeof md === "string") {
- if (!(md in forge.md.algorithms)) {
- throw new Error("Unknown hash algorithm: " + md);
- }
+ if (!(md in forge.md.algorithms)) throw new Error("Unknown hash algorithm: " + md);
md = forge.md[md].create();
}
var hLen = md.digestLength;
if (dkLen > 4294967295 * hLen) {
- var err = new Error("Derived key is too long.");
- if (callback) {
- return callback(err);
- }
+ var err = /* @__PURE__ */ new Error("Derived key is too long.");
+ if (callback) return callback(err);
throw err;
}
var len = Math.ceil(dkLen / hLen);
@@ -28063,9 +26413,7 @@ var require_pbkdf2$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
var i = 1, j;
function outer() {
- if (i > len) {
- return callback(null, dk);
- }
+ if (i > len) return callback(null, dk);
prf.start(null, null);
prf.update(s);
prf.update(forge.util.int32ToBytes(i));
@@ -28090,7 +26438,6 @@ var require_pbkdf2$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
outer();
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/sha256.js
var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -28114,9 +26461,7 @@ var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return a message digest object.
*/
sha256.create = function() {
- if (!_initialized) {
- _init();
- }
+ if (!_initialized) _init();
var _state = null;
var _input = forge.util.createBuffer();
var _w = new Array(64);
@@ -28137,9 +26482,7 @@ var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.messageLength = 0;
md.fullMessageLength = md.messageLength64 = [];
var int32s = md.messageLengthSize / 4;
- for (var i = 0; i < int32s; ++i) {
- md.fullMessageLength.push(0);
- }
+ for (var i = 0; i < int32s; ++i) md.fullMessageLength.push(0);
_input = forge.util.createBuffer();
_state = {
h0: 1779033703,
@@ -28165,9 +26508,7 @@ var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return this digest object.
*/
md.update = function(msg, encoding) {
- if (encoding === "utf8") {
- msg = forge.util.encodeUtf8(msg);
- }
+ if (encoding === "utf8") msg = forge.util.encodeUtf8(msg);
var len = msg.length;
md.messageLength += len;
len = [len / 4294967296 >>> 0, len >>> 0];
@@ -28179,9 +26520,7 @@ var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
_input.putBytes(msg);
_update(_state, _w, _input);
- if (_input.read > 2048 || _input.length() === 0) {
- _input.compact();
- }
+ if (_input.read > 2048 || _input.length() === 0) _input.compact();
return md;
};
/**
@@ -28192,8 +26531,7 @@ var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.digest = function() {
var finalBlock = forge.util.createBuffer();
finalBlock.putBytes(_input.bytes());
- var remaining = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize;
- var overflow = remaining & md.blockLength - 1;
+ var overflow = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize & md.blockLength - 1;
finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));
var next, carry;
var bits = md.fullMessageLength[0] * 8;
@@ -28317,9 +26655,7 @@ var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var t1, t2, s0, s1, ch, maj, i, a, b, c, d, e, f, g, h;
var len = bytes.length();
while (len >= 64) {
- for (i = 0; i < 16; ++i) {
- w[i] = bytes.getInt32();
- }
+ for (i = 0; i < 16; ++i) w[i] = bytes.getInt32();
for (; i < 64; ++i) {
t1 = w[i - 2];
t1 = (t1 >>> 17 | t1 << 15) ^ (t1 >>> 19 | t1 << 13) ^ t1 >>> 10;
@@ -28363,7 +26699,6 @@ var require_sha256$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/prng.js
var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -28381,9 +26716,7 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var forge = require_forge();
require_util$8();
var _crypto = null;
- if (forge.util.isNodejs && !forge.options.usePureJavaScript && !process.versions["node-webkit"]) {
- _crypto = __require("crypto");
- }
+ if (forge.util.isNodejs && !forge.options.usePureJavaScript && !process.versions["node-webkit"]) _crypto = __require("crypto");
var prng = module.exports = forge.prng = forge.prng || {};
/**
* Creates a new PRNG context.
@@ -28415,9 +26748,7 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
var md = plugin.md;
var pools = new Array(32);
- for (var i = 0; i < 32; ++i) {
- pools[i] = md.create();
- }
+ for (var i = 0; i < 32; ++i) pools[i] = md.create();
ctx.pools = pools;
ctx.pool = 0;
/**
@@ -28431,9 +26762,7 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return count random bytes as a string.
*/
ctx.generate = function(count, callback) {
- if (!callback) {
- return ctx.generateSync(count);
- }
+ if (!callback) return ctx.generateSync(count);
var cipher = ctx.plugin.cipher;
var increment = ctx.plugin.increment;
var formatKey = ctx.plugin.formatKey;
@@ -28442,20 +26771,12 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ctx.key = null;
generate();
function generate(err) {
- if (err) {
- return callback(err);
- }
- if (b.length() >= count) {
- return callback(null, b.getBytes(count));
- }
- if (ctx.generated > 1048575) {
- ctx.key = null;
- }
- if (ctx.key === null) {
- return forge.util.nextTick(function() {
- _reseed(generate);
- });
- }
+ if (err) return callback(err);
+ if (b.length() >= count) return callback(null, b.getBytes(count));
+ if (ctx.generated > 1048575) ctx.key = null;
+ if (ctx.key === null) return forge.util.nextTick(function() {
+ _reseed(generate);
+ });
var bytes = cipher(ctx.key, ctx.seed);
ctx.generated += bytes.length;
b.putBytes(bytes);
@@ -28479,12 +26800,8 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ctx.key = null;
var b = forge.util.createBuffer();
while (b.length() < count) {
- if (ctx.generated > 1048575) {
- ctx.key = null;
- }
- if (ctx.key === null) {
- _reseedSync();
- }
+ if (ctx.generated > 1048575) ctx.key = null;
+ if (ctx.key === null) _reseedSync();
var bytes = cipher(ctx.key, ctx.seed);
ctx.generated += bytes.length;
b.putBytes(bytes);
@@ -28505,9 +26822,7 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
var needed = 32 - ctx.pools[0].messageLength << 5;
ctx.seedFile(needed, function(err, bytes) {
- if (err) {
- return callback(err);
- }
+ if (err) return callback(err);
ctx.collect(bytes);
_seed();
callback();
@@ -28517,9 +26832,7 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* Private function that synchronously reseeds a generator.
*/
function _reseedSync() {
- if (ctx.pools[0].messageLength >= 32) {
- return _seed();
- }
+ if (ctx.pools[0].messageLength >= 32) return _seed();
var needed = 32 - ctx.pools[0].messageLength << 5;
ctx.collect(ctx.seedFileSync(needed));
_seed();
@@ -28559,26 +26872,18 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var getRandomValues = null;
var globalScope = forge.util.globalScope;
var _crypto = globalScope.crypto || globalScope.msCrypto;
- if (_crypto && _crypto.getRandomValues) {
- getRandomValues = function(arr) {
- return _crypto.getRandomValues(arr);
- };
- }
+ if (_crypto && _crypto.getRandomValues) getRandomValues = function(arr) {
+ return _crypto.getRandomValues(arr);
+ };
var b = forge.util.createBuffer();
- if (getRandomValues) {
- while (b.length() < needed) {
- var count = Math.max(1, Math.min(needed - b.length(), 65536) / 4);
- var entropy = new Uint32Array(Math.floor(count));
- try {
- getRandomValues(entropy);
- for (var i = 0; i < entropy.length; ++i) {
- b.putInt32(entropy[i]);
- }
- } catch (e) {
- if (!(typeof QuotaExceededError !== "undefined" && e instanceof QuotaExceededError)) {
- throw e;
- }
- }
+ if (getRandomValues) while (b.length() < needed) {
+ var count = Math.max(1, Math.min(needed - b.length(), 65536) / 4);
+ var entropy = new Uint32Array(Math.floor(count));
+ try {
+ getRandomValues(entropy);
+ for (var i = 0; i < entropy.length; ++i) b.putInt32(entropy[i]);
+ } catch (e) {
+ if (!(typeof QuotaExceededError !== "undefined" && e instanceof QuotaExceededError)) throw e;
}
}
if (b.length() < needed) {
@@ -28603,9 +26908,7 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (_crypto) {
ctx.seedFile = function(needed, callback) {
_crypto.randomBytes(needed, function(err, bytes) {
- if (err) {
- return callback(err);
- }
+ if (err) return callback(err);
callback(null, bytes.toString());
});
};
@@ -28642,9 +26945,7 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
ctx.collectInt = function(i, n) {
var bytes = "";
- for (var x = 0; x < n; x += 8) {
- bytes += String.fromCharCode(i >> x & 255);
- }
+ for (var x = 0; x < n; x += 8) bytes += String.fromCharCode(i >> x & 255);
ctx.collect(bytes);
};
/**
@@ -28656,29 +26957,26 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param worker the worker to register.
*/
ctx.registerWorker = function(worker) {
- if (worker === self) {
- ctx.seedFile = function(needed, callback) {
- function listener(e) {
- var data = e.data;
- if (data.forge && data.forge.prng) {
- self.removeEventListener("message", listener);
- callback(data.forge.prng.err, data.forge.prng.bytes);
- }
- }
- self.addEventListener("message", listener);
- self.postMessage({ forge: { prng: { needed } } });
- };
- } else {
- var listener = function(e) {
+ if (worker === self) ctx.seedFile = function(needed, callback) {
+ function listener(e) {
var data = e.data;
if (data.forge && data.forge.prng) {
- ctx.seedFile(data.forge.prng.needed, function(err, bytes) {
- worker.postMessage({ forge: { prng: {
- err,
- bytes
- } } });
- });
+ self.removeEventListener("message", listener);
+ callback(data.forge.prng.err, data.forge.prng.bytes);
}
+ }
+ self.addEventListener("message", listener);
+ self.postMessage({ forge: { prng: { needed } } });
+ };
+ else {
+ var listener = function(e) {
+ var data = e.data;
+ if (data.forge && data.forge.prng) ctx.seedFile(data.forge.prng.needed, function(err, bytes) {
+ worker.postMessage({ forge: { prng: {
+ err,
+ bytes
+ } } });
+ });
};
worker.addEventListener("message", listener);
}
@@ -28686,7 +26984,6 @@ var require_prng = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return ctx;
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/random.js
var require_random = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -28789,23 +27086,17 @@ var require_random = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var getRandomValues = null;
var globalScope = forge.util.globalScope;
var _crypto = globalScope.crypto || globalScope.msCrypto;
- if (_crypto && _crypto.getRandomValues) {
- getRandomValues = function(arr) {
- return _crypto.getRandomValues(arr);
- };
- }
+ if (_crypto && _crypto.getRandomValues) getRandomValues = function(arr) {
+ return _crypto.getRandomValues(arr);
+ };
if (forge.options.usePureJavaScript || !forge.util.isNodejs && !getRandomValues) {
- if (typeof window === "undefined" || window.document === undefined) {}
- _ctx.collectInt(+new Date(), 32);
+ if (typeof window === "undefined" || window.document === void 0) {}
+ _ctx.collectInt(+/* @__PURE__ */ new Date(), 32);
if (typeof navigator !== "undefined") {
var _navBytes = "";
- for (var key in navigator) {
- try {
- if (typeof navigator[key] == "string") {
- _navBytes += navigator[key];
- }
- } catch (e) {}
- }
+ for (var key in navigator) try {
+ if (typeof navigator[key] == "string") _navBytes += navigator[key];
+ } catch (e) {}
_ctx.collect(_navBytes);
_navBytes = null;
}
@@ -28819,19 +27110,13 @@ var require_random = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
}
}
- if (!forge.random) {
- forge.random = _ctx;
- } else {
- for (var key in _ctx) {
- forge.random[key] = _ctx[key];
- }
- }
+ if (!forge.random) forge.random = _ctx;
+ else for (var key in _ctx) forge.random[key] = _ctx[key];
forge.random.createInstance = spawnPrng;
module.exports = forge.random;
})(typeof jQuery !== "undefined" ? jQuery : null);
})();
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/rc2.js
var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -29146,9 +27431,7 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the expanded RC2 key (ByteBuffer of 128 bytes)
*/
forge.rc2.expandKey = function(key, effKeyBits) {
- if (typeof key === "string") {
- key = forge.util.createBuffer(key);
- }
+ if (typeof key === "string") key = forge.util.createBuffer(key);
effKeyBits = effKeyBits || 128;
var L = key;
var T = key.length();
@@ -29156,13 +27439,9 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var T8 = Math.ceil(T1 / 8);
var TM = 255 >> (T1 & 7);
var i;
- for (i = T; i < 128; i++) {
- L.putByte(piTable[L.at(i - 1) + L.at(i - T) & 255]);
- }
+ for (i = T; i < 128; i++) L.putByte(piTable[L.at(i - 1) + L.at(i - T) & 255]);
L.setAt(128 - T8, piTable[L.at(128 - T8) & TM]);
- for (i = 127 - T8; i >= 0; i--) {
- L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]);
- }
+ for (i = 127 - T8; i >= 0; i--) L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]);
return L;
};
/**
@@ -29179,9 +27458,7 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var mixRound, mashRound;
var i, j, K = [];
key = forge.rc2.expandKey(key, bits);
- for (i = 0; i < 64; i++) {
- K.push(key.getInt16Le());
- }
+ for (i = 0; i < 64; i++) K.push(key.getInt16Le());
if (encrypt) {
/**
* Perform one mixing round "in place".
@@ -29201,9 +27478,7 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param R Array of four words to perform mashing on.
*/
mashRound = function(R) {
- for (i = 0; i < 4; i++) {
- R[i] += K[R[(i + 3) % 4] & 63];
- }
+ for (i = 0; i < 4; i++) R[i] += K[R[(i + 3) % 4] & 63];
};
} else {
/**
@@ -29224,9 +27499,7 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param R Array of four words to perform mashing on.
*/
mashRound = function(R) {
- for (i = 3; i >= 0; i--) {
- R[i] -= K[R[(i + 3) % 4] & 63];
- }
+ for (i = 3; i >= 0; i--) R[i] -= K[R[(i + 3) % 4] & 63];
};
}
/**
@@ -29246,29 +27519,15 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var R = [];
for (i = 0; i < 4; i++) {
var val = _input.getInt16Le();
- if (_iv !== null) {
- if (encrypt) {
- val ^= _iv.getInt16Le();
- } else {
- _iv.putInt16Le(val);
- }
- }
+ if (_iv !== null) if (encrypt) val ^= _iv.getInt16Le();
+ else _iv.putInt16Le(val);
R.push(val & 65535);
}
j = encrypt ? 0 : 63;
- for (var ptr = 0; ptr < plan.length; ptr++) {
- for (var ctr = 0; ctr < plan[ptr][0]; ctr++) {
- plan[ptr][1](R);
- }
- }
+ for (var ptr = 0; ptr < plan.length; ptr++) for (var ctr = 0; ctr < plan[ptr][0]; ctr++) plan[ptr][1](R);
for (i = 0; i < 4; i++) {
- if (_iv !== null) {
- if (encrypt) {
- _iv.putInt16Le(R[i]);
- } else {
- R[i] ^= _iv.getInt16Le();
- }
- }
+ if (_iv !== null) if (encrypt) _iv.putInt16Le(R[i]);
+ else R[i] ^= _iv.getInt16Le();
_output.putInt16Le(R[i]);
}
};
@@ -29276,9 +27535,7 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cipher = {
start: function(iv, output) {
if (iv) {
- if (typeof iv === "string") {
- iv = forge.util.createBuffer(iv);
- }
+ if (typeof iv === "string") iv = forge.util.createBuffer(iv);
}
_finish = false;
_input = forge.util.createBuffer();
@@ -29287,28 +27544,21 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cipher.output = _output;
},
update: function(input) {
- if (!_finish) {
- _input.putBuffer(input);
- }
- while (_input.length() >= 8) {
- runPlan([
- [5, mixRound],
- [1, mashRound],
- [6, mixRound],
- [1, mashRound],
- [5, mixRound]
- ]);
- }
+ if (!_finish) _input.putBuffer(input);
+ while (_input.length() >= 8) runPlan([
+ [5, mixRound],
+ [1, mashRound],
+ [6, mixRound],
+ [1, mashRound],
+ [5, mixRound]
+ ]);
},
finish: function(pad) {
var rval = true;
- if (encrypt) {
- if (pad) {
- rval = pad(8, _input, !encrypt);
- } else {
- var padding = _input.length() === 8 ? 8 : 8 - _input.length();
- _input.fillWithByte(padding, padding);
- }
+ if (encrypt) if (pad) rval = pad(8, _input, !encrypt);
+ else {
+ var padding = _input.length() === 8 ? 8 : 8 - _input.length();
+ _input.fillWithByte(padding, padding);
}
if (rval) {
_finish = true;
@@ -29316,18 +27566,12 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (!encrypt) {
rval = _input.length() === 0;
- if (rval) {
- if (pad) {
- rval = pad(8, _output, !encrypt);
- } else {
- var len = _output.length();
- var count = _output.at(len - 1);
- if (count > len) {
- rval = false;
- } else {
- _output.truncate(count);
- }
- }
+ if (rval) if (pad) rval = pad(8, _output, !encrypt);
+ else {
+ var len = _output.length();
+ var count = _output.at(len - 1);
+ if (count > len) rval = false;
+ else _output.truncate(count);
}
}
return rval;
@@ -29406,15 +27650,13 @@ var require_rc2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return createCipher(key, bits, false);
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/jsbn.js
var require_jsbn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var forge = require_forge();
module.exports = forge.jsbn = forge.jsbn || {};
var dbits;
- var canary = 0xdeadbeefcafe;
- var j_lm = (canary & 16777215) == 15715070;
+ var j_lm = true;
function BigInteger(a, b, c) {
this.data = [];
if (a != null) if ("number" == typeof a) this.fromNumber(a, b, c);
@@ -29479,8 +27721,7 @@ var require_jsbn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
BigInteger.prototype.F2 = 2 * dbits - BI_FP;
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
var BI_RC = new Array();
- var rr, vv;
- rr = "0".charCodeAt(0);
+ var rr = "0".charCodeAt(0), vv;
for (vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
rr = "a".charCodeAt(0);
for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
@@ -29987,18 +28228,17 @@ var require_jsbn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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);
- }
+ 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 {
+ }
+ else {
var x = new Array(), t = a & 7;
x.length = (a >> 3) + 1;
b.nextBytes(x);
@@ -30595,9 +28835,9 @@ var require_jsbn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var prng = bnGetPrng();
var a;
for (var i = 0; i < t; ++i) {
- do {
+ do
a = new BigInteger(this.bitLength(), prng);
- } while (a.compareTo(BigInteger.ONE) <= 0 || a.compareTo(n1) >= 0);
+ while (a.compareTo(BigInteger.ONE) <= 0 || a.compareTo(n1) >= 0);
var y = a.modPow(r, this);
if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
var j = 1;
@@ -30612,9 +28852,7 @@ var require_jsbn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function bnGetPrng() {
return { nextBytes: function(x) {
- for (var i = 0; i < x.length; ++i) {
- x[i] = Math.floor(Math.random() * 256);
- }
+ for (var i = 0; i < x.length; ++i) x[i] = Math.floor(Math.random() * 256);
} };
}
BigInteger.prototype.chunkSize = bnpChunkSize;
@@ -30664,7 +28902,6 @@ var require_jsbn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
BigInteger.prototype.gcd = bnGCD;
BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/sha1.js
var require_sha1$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -30686,9 +28923,7 @@ var require_sha1$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return a message digest object.
*/
sha1.create = function() {
- if (!_initialized) {
- _init();
- }
+ if (!_initialized) _init();
var _state = null;
var _input = forge.util.createBuffer();
var _w = new Array(80);
@@ -30709,9 +28944,7 @@ var require_sha1$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.messageLength = 0;
md.fullMessageLength = md.messageLength64 = [];
var int32s = md.messageLengthSize / 4;
- for (var i = 0; i < int32s; ++i) {
- md.fullMessageLength.push(0);
- }
+ for (var i = 0; i < int32s; ++i) md.fullMessageLength.push(0);
_input = forge.util.createBuffer();
_state = {
h0: 1732584193,
@@ -30734,9 +28967,7 @@ var require_sha1$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return this digest object.
*/
md.update = function(msg, encoding) {
- if (encoding === "utf8") {
- msg = forge.util.encodeUtf8(msg);
- }
+ if (encoding === "utf8") msg = forge.util.encodeUtf8(msg);
var len = msg.length;
md.messageLength += len;
len = [len / 4294967296 >>> 0, len >>> 0];
@@ -30748,9 +28979,7 @@ var require_sha1$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
_input.putBytes(msg);
_update(_state, _w, _input);
- if (_input.read > 2048 || _input.length() === 0) {
- _input.compact();
- }
+ if (_input.read > 2048 || _input.length() === 0) _input.compact();
return md;
};
/**
@@ -30761,8 +28990,7 @@ var require_sha1$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.digest = function() {
var finalBlock = forge.util.createBuffer();
finalBlock.putBytes(_input.bytes());
- var remaining = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize;
- var overflow = remaining & md.blockLength - 1;
+ var overflow = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize & md.blockLength - 1;
finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));
var next, carry;
var bits = md.fullMessageLength[0] * 8;
@@ -30898,7 +29126,6 @@ var require_sha1$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pkcs1.js
var require_pkcs1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -30977,47 +29204,35 @@ var require_pkcs1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var mgf1Md;
if (typeof options === "string") {
label = options;
- seed = arguments[3] || undefined;
- md = arguments[4] || undefined;
+ seed = arguments[3] || void 0;
+ md = arguments[4] || void 0;
} else if (options) {
- label = options.label || undefined;
- seed = options.seed || undefined;
- md = options.md || undefined;
- if (options.mgf1 && options.mgf1.md) {
- mgf1Md = options.mgf1.md;
- }
- }
- if (!md) {
- md = forge.md.sha1.create();
- } else {
- md.start();
- }
- if (!mgf1Md) {
- mgf1Md = md;
- }
+ label = options.label || void 0;
+ seed = options.seed || void 0;
+ md = options.md || void 0;
+ if (options.mgf1 && options.mgf1.md) mgf1Md = options.mgf1.md;
+ }
+ if (!md) md = forge.md.sha1.create();
+ else md.start();
+ if (!mgf1Md) mgf1Md = md;
var keyLength = Math.ceil(key.n.bitLength() / 8);
var maxLength = keyLength - 2 * md.digestLength - 2;
if (message.length > maxLength) {
- var error = new Error("RSAES-OAEP input message length is too long.");
+ var error = /* @__PURE__ */ new Error("RSAES-OAEP input message length is too long.");
error.length = message.length;
error.maxLength = maxLength;
throw error;
}
- if (!label) {
- label = "";
- }
+ if (!label) label = "";
md.update(label, "raw");
var lHash = md.digest();
var PS = "";
var PS_length = maxLength - message.length;
- for (var i = 0; i < PS_length; i++) {
- PS += "\0";
- }
+ for (var i = 0; i < PS_length; i++) PS += "\0";
var DB = lHash.getBytes() + PS + "" + message;
- if (!seed) {
- seed = forge.random.getBytes(md.digestLength);
- } else if (seed.length !== md.digestLength) {
- var error = new Error("Invalid RSAES-OAEP seed. The seed length must " + "match the digest length.");
+ if (!seed) seed = forge.random.getBytes(md.digestLength);
+ else if (seed.length !== md.digestLength) {
+ var error = /* @__PURE__ */ new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");
error.seedLength = seed.length;
error.digestLength = md.digestLength;
throw error;
@@ -31025,8 +29240,7 @@ var require_pkcs1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md);
var maskedDB = forge.util.xorBytes(DB, dbMask, DB.length);
var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md);
- var maskedSeed = forge.util.xorBytes(seed, seedMask, seed.length);
- return "\0" + maskedSeed + maskedDB;
+ return "\0" + forge.util.xorBytes(seed, seedMask, seed.length) + maskedDB;
};
/**
* Decode the given RSAES-OAEP encoded message (EM) using key, with optional
@@ -31051,68 +29265,49 @@ var require_pkcs1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var mgf1Md;
if (typeof options === "string") {
label = options;
- md = arguments[3] || undefined;
+ md = arguments[3] || void 0;
} else if (options) {
- label = options.label || undefined;
- md = options.md || undefined;
- if (options.mgf1 && options.mgf1.md) {
- mgf1Md = options.mgf1.md;
- }
+ label = options.label || void 0;
+ md = options.md || void 0;
+ if (options.mgf1 && options.mgf1.md) mgf1Md = options.mgf1.md;
}
var keyLength = Math.ceil(key.n.bitLength() / 8);
if (em.length !== keyLength) {
- var error = new Error("RSAES-OAEP encoded message length is invalid.");
+ var error = /* @__PURE__ */ new Error("RSAES-OAEP encoded message length is invalid.");
error.length = em.length;
error.expectedLength = keyLength;
throw error;
}
- if (md === undefined) {
- md = forge.md.sha1.create();
- } else {
- md.start();
- }
- if (!mgf1Md) {
- mgf1Md = md;
- }
- if (keyLength < 2 * md.digestLength + 2) {
- throw new Error("RSAES-OAEP key is too short for the hash function.");
- }
- if (!label) {
- label = "";
- }
+ if (md === void 0) md = forge.md.sha1.create();
+ else md.start();
+ if (!mgf1Md) mgf1Md = md;
+ if (keyLength < 2 * md.digestLength + 2) throw new Error("RSAES-OAEP key is too short for the hash function.");
+ if (!label) label = "";
md.update(label, "raw");
var lHash = md.digest().getBytes();
var y = em.charAt(0);
var maskedSeed = em.substring(1, md.digestLength + 1);
var maskedDB = em.substring(1 + md.digestLength);
var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md);
- var seed = forge.util.xorBytes(maskedSeed, seedMask, maskedSeed.length);
- var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md);
+ var dbMask = rsa_mgf1(forge.util.xorBytes(maskedSeed, seedMask, maskedSeed.length), keyLength - md.digestLength - 1, mgf1Md);
var db = forge.util.xorBytes(maskedDB, dbMask, maskedDB.length);
var lHashPrime = db.substring(0, md.digestLength);
var error = y !== "\0";
- for (var i = 0; i < md.digestLength; ++i) {
- error |= lHash.charAt(i) !== lHashPrime.charAt(i);
- }
+ for (var i = 0; i < md.digestLength; ++i) error |= lHash.charAt(i) !== lHashPrime.charAt(i);
var in_ps = 1;
var index = md.digestLength;
for (var j = md.digestLength; j < db.length; j++) {
var code = db.charCodeAt(j);
var is_0 = code & 1 ^ 1;
- var error_mask = in_ps ? 65534 : 0;
- error |= code & error_mask;
+ error |= code & (in_ps ? 65534 : 0);
in_ps = in_ps & is_0;
index += in_ps;
}
- if (error || db.charCodeAt(index) !== 1) {
- throw new Error("Invalid RSAES-OAEP padding.");
- }
+ if (error || db.charCodeAt(index) !== 1) throw new Error("Invalid RSAES-OAEP padding.");
return db.substring(index + 1);
};
function rsa_mgf1(seed, maskLength, hash) {
- if (!hash) {
- hash = forge.md.sha1.create();
- }
+ if (!hash) hash = forge.md.sha1.create();
var t = "";
var count = Math.ceil(maskLength / hash.digestLength);
for (var i = 0; i < count; ++i) {
@@ -31124,7 +29319,6 @@ var require_pkcs1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return t.substring(0, maskLength);
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/prime.js
var require_prime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -31197,102 +29391,70 @@ var require_prime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
options = options || {};
var algorithm = options.algorithm || "PRIMEINC";
- if (typeof algorithm === "string") {
- algorithm = { name: algorithm };
- }
+ if (typeof algorithm === "string") algorithm = { name: algorithm };
algorithm.options = algorithm.options || {};
var prng = options.prng || forge.random;
var rng = { nextBytes: function(x) {
var b = prng.getBytesSync(x.length);
- for (var i = 0; i < x.length; ++i) {
- x[i] = b.charCodeAt(i);
- }
+ for (var i = 0; i < x.length; ++i) x[i] = b.charCodeAt(i);
} };
- if (algorithm.name === "PRIMEINC") {
- return primeincFindPrime(bits, rng, algorithm.options, callback);
- }
+ if (algorithm.name === "PRIMEINC") return primeincFindPrime(bits, rng, algorithm.options, callback);
throw new Error("Invalid prime generation algorithm: " + algorithm.name);
};
function primeincFindPrime(bits, rng, options, callback) {
- if ("workers" in options) {
- return primeincFindPrimeWithWorkers(bits, rng, options, callback);
- }
+ if ("workers" in options) return primeincFindPrimeWithWorkers(bits, rng, options, callback);
return primeincFindPrimeWithoutWorkers(bits, rng, options, callback);
}
function primeincFindPrimeWithoutWorkers(bits, rng, options, callback) {
var num = generateRandom(bits, rng);
var deltaIdx = 0;
var mrTests = getMillerRabinTests(num.bitLength());
- if ("millerRabinTests" in options) {
- mrTests = options.millerRabinTests;
- }
+ if ("millerRabinTests" in options) mrTests = options.millerRabinTests;
var maxBlockTime = 10;
- if ("maxBlockTime" in options) {
- maxBlockTime = options.maxBlockTime;
- }
+ if ("maxBlockTime" in options) maxBlockTime = options.maxBlockTime;
_primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback);
}
function _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback) {
- var start = +new Date();
+ var start = +/* @__PURE__ */ new Date();
do {
- if (num.bitLength() > bits) {
- num = generateRandom(bits, rng);
- }
- if (num.isProbablePrime(mrTests)) {
- return callback(null, num);
- }
+ if (num.bitLength() > bits) num = generateRandom(bits, rng);
+ if (num.isProbablePrime(mrTests)) return callback(null, num);
num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0);
- } while (maxBlockTime < 0 || +new Date() - start < maxBlockTime);
+ } while (maxBlockTime < 0 || +/* @__PURE__ */ new Date() - start < maxBlockTime);
forge.util.setImmediate(function() {
_primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback);
});
}
function primeincFindPrimeWithWorkers(bits, rng, options, callback) {
- if (typeof Worker === "undefined") {
- return primeincFindPrimeWithoutWorkers(bits, rng, options, callback);
- }
+ if (typeof Worker === "undefined") return primeincFindPrimeWithoutWorkers(bits, rng, options, callback);
var num = generateRandom(bits, rng);
var numWorkers = options.workers;
var workLoad = options.workLoad || 100;
var range = workLoad * 30 / 8;
var workerScript = options.workerScript || "forge/prime.worker.js";
- if (numWorkers === -1) {
- return forge.util.estimateCores(function(err, cores) {
- if (err) {
- cores = 2;
- }
- numWorkers = cores - 1;
- generate();
- });
- }
+ if (numWorkers === -1) return forge.util.estimateCores(function(err, cores) {
+ if (err) cores = 2;
+ numWorkers = cores - 1;
+ generate();
+ });
generate();
function generate() {
numWorkers = Math.max(1, numWorkers);
var workers = [];
- for (var i = 0; i < numWorkers; ++i) {
- workers[i] = new Worker(workerScript);
- }
+ for (var i = 0; i < numWorkers; ++i) workers[i] = new Worker(workerScript);
var running = numWorkers;
- for (var i = 0; i < numWorkers; ++i) {
- workers[i].addEventListener("message", workerMessage);
- }
+ for (var i = 0; i < numWorkers; ++i) workers[i].addEventListener("message", workerMessage);
var found = false;
function workerMessage(e) {
- if (found) {
- return;
- }
+ if (found) return;
--running;
var data = e.data;
if (data.found) {
- for (var i = 0; i < workers.length; ++i) {
- workers[i].terminate();
- }
+ for (var i = 0; i < workers.length; ++i) workers[i].terminate();
found = true;
return callback(null, new BigInteger(data.prime, 16));
}
- if (num.bitLength() > bits) {
- num = generateRandom(bits, rng);
- }
+ if (num.bitLength() > bits) num = generateRandom(bits, rng);
var hex = num.toString(16);
e.target.postMessage({
hex,
@@ -31313,9 +29475,7 @@ var require_prime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function generateRandom(bits, rng) {
var num = new BigInteger(bits, rng);
var bits1 = bits - 1;
- if (!num.testBit(bits1)) {
- num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, num);
- }
+ if (!num.testBit(bits1)) num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, num);
num.dAddOffset(31 - num.mod(THIRTY).byteValue(), 0);
return num;
}
@@ -31345,7 +29505,6 @@ var require_prime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
})();
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/rsa.js
var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -31420,9 +29579,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
require_prime();
require_random();
require_util$8();
- if (typeof BigInteger === "undefined") {
- var BigInteger = forge.jsbn.BigInteger;
- }
+ if (typeof BigInteger === "undefined") var BigInteger = forge.jsbn.BigInteger;
var _crypto = forge.util.isNodejs ? __require("crypto") : null;
var asn1 = forge.asn1;
var util = forge.util;
@@ -31648,10 +29805,9 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var emsaPkcs1v15encode = function(md) {
var oid;
- if (md.algorithm in pki.oids) {
- oid = pki.oids[md.algorithm];
- } else {
- var error = new Error("Unknown message digest algorithm.");
+ if (md.algorithm in pki.oids) oid = pki.oids[md.algorithm];
+ else {
+ var error = /* @__PURE__ */ new Error("Unknown message digest algorithm.");
error.algorithm = md.algorithm;
throw error;
}
@@ -31675,31 +29831,19 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the result of x^c mod n.
*/
var _modPow = function(x, key, pub) {
- if (pub) {
- return x.modPow(key.e, key.n);
- }
- if (!key.p || !key.q) {
- return x.modPow(key.d, key.n);
- }
- if (!key.dP) {
- key.dP = key.d.mod(key.p.subtract(BigInteger.ONE));
- }
- if (!key.dQ) {
- key.dQ = key.d.mod(key.q.subtract(BigInteger.ONE));
- }
- if (!key.qInv) {
- key.qInv = key.q.modInverse(key.p);
- }
+ if (pub) return x.modPow(key.e, key.n);
+ if (!key.p || !key.q) return x.modPow(key.d, key.n);
+ if (!key.dP) key.dP = key.d.mod(key.p.subtract(BigInteger.ONE));
+ if (!key.dQ) key.dQ = key.d.mod(key.q.subtract(BigInteger.ONE));
+ if (!key.qInv) key.qInv = key.q.modInverse(key.p);
var r;
- do {
+ do
r = new BigInteger(forge.util.bytesToHex(forge.random.getBytes(key.n.bitLength() / 8)), 16);
- } while (r.compareTo(key.n) >= 0 || !r.gcd(key.n).equals(BigInteger.ONE));
+ while (r.compareTo(key.n) >= 0 || !r.gcd(key.n).equals(BigInteger.ONE));
x = x.multiply(r.modPow(key.e, key.n)).mod(key.n);
var xp = x.mod(key.p).modPow(key.dP, key.p);
var xq = x.mod(key.q).modPow(key.dQ, key.q);
- while (xp.compareTo(xq) < 0) {
- xp = xp.add(key.p);
- }
+ while (xp.compareTo(xq) < 0) xp = xp.add(key.p);
var y = xp.subtract(xq).multiply(key.qInv).mod(key.p).multiply(key.q).add(xq);
y = y.multiply(r.modInverse(key.n)).mod(key.n);
return y;
@@ -31739,9 +29883,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
eb = forge.util.createBuffer();
eb.putBytes(m);
}
- var x = new BigInteger(eb.toHex(), 16);
- var y = _modPow(x, key, pub);
- var yhex = y.toString(16);
+ var yhex = _modPow(new BigInteger(eb.toHex(), 16), key, pub).toString(16);
var ed = forge.util.createBuffer();
var zeros = k - Math.ceil(yhex.length / 2);
while (zeros > 0) {
@@ -31772,17 +29914,14 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.rsa.decrypt = function(ed, key, pub, ml) {
var k = Math.ceil(key.n.bitLength() / 8);
if (ed.length !== k) {
- var error = new Error("Encrypted message length is invalid.");
+ var error = /* @__PURE__ */ new Error("Encrypted message length is invalid.");
error.length = ed.length;
error.expected = k;
throw error;
}
var y = new BigInteger(forge.util.createBuffer(ed).toHex(), 16);
- if (y.compareTo(key.n) >= 0) {
- throw new Error("Encrypted message is invalid.");
- }
- var x = _modPow(y, key, pub);
- var xhex = x.toString(16);
+ if (y.compareTo(key.n) >= 0) throw new Error("Encrypted message is invalid.");
+ var xhex = _modPow(y, key, pub).toString(16);
var eb = forge.util.createBuffer();
var zeros = k - Math.ceil(xhex.length / 2);
while (zeros > 0) {
@@ -31790,9 +29929,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
--zeros;
}
eb.putBytes(forge.util.hexToBytes(xhex));
- if (ml !== false) {
- return _decodePkcs1_v1_5(eb.getBytes(), key, pub);
- }
+ if (ml !== false) return _decodePkcs1_v1_5(eb.getBytes(), key, pub);
return eb.getBytes();
};
/**
@@ -31810,17 +29947,13 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the state object to use to generate the key-pair.
*/
pki.rsa.createKeyPairGenerationState = function(bits, e, options) {
- if (typeof bits === "string") {
- bits = parseInt(bits, 10);
- }
+ if (typeof bits === "string") bits = parseInt(bits, 10);
bits = bits || 2048;
options = options || {};
var prng = options.prng || forge.random;
var rng = { nextBytes: function(x) {
var b = prng.getBytesSync(x.length);
- for (var i = 0; i < x.length; ++i) {
- x[i] = b.charCodeAt(i);
- }
+ for (var i = 0; i < x.length; ++i) x[i] = b.charCodeAt(i);
} };
var algorithm = options.algorithm || "PRIMEINC";
var rval;
@@ -31841,9 +29974,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
keys: null
};
rval.e.fromInt(rval.eInt);
- } else {
- throw new Error("Invalid key generation algorithm: " + algorithm);
- }
+ } else throw new Error("Invalid key generation algorithm: " + algorithm);
return rval;
};
/**
@@ -31876,16 +30007,14 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return true if the key-generation completed, false if not.
*/
pki.rsa.stepKeyPairGenerationState = function(state, n) {
- if (!("algorithm" in state)) {
- state.algorithm = "PRIMEINC";
- }
+ if (!("algorithm" in state)) state.algorithm = "PRIMEINC";
var THIRTY = new BigInteger(null);
THIRTY.fromInt(30);
var deltaIdx = 0;
var op_or = function(x, y) {
return x | y;
};
- var t1 = +new Date();
+ var t1 = +/* @__PURE__ */ new Date();
var t2;
var total = 0;
while (state.keys === null && (n <= 0 || total < n)) {
@@ -31894,32 +30023,19 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var bits1 = bits - 1;
if (state.pqState === 0) {
state.num = new BigInteger(bits, state.rng);
- if (!state.num.testBit(bits1)) {
- state.num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, state.num);
- }
+ if (!state.num.testBit(bits1)) state.num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, state.num);
state.num.dAddOffset(31 - state.num.mod(THIRTY).byteValue(), 0);
deltaIdx = 0;
++state.pqState;
- } else if (state.pqState === 1) {
- if (state.num.bitLength() > bits) {
- state.pqState = 0;
- } else if (state.num.isProbablePrime(_getMillerRabinTests(state.num.bitLength()))) {
- ++state.pqState;
- } else {
- state.num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0);
- }
- } else if (state.pqState === 2) {
- state.pqState = state.num.subtract(BigInteger.ONE).gcd(state.e).compareTo(BigInteger.ONE) === 0 ? 3 : 0;
- } else if (state.pqState === 3) {
+ } else if (state.pqState === 1) if (state.num.bitLength() > bits) state.pqState = 0;
+ else if (state.num.isProbablePrime(_getMillerRabinTests(state.num.bitLength()))) ++state.pqState;
+ else state.num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0);
+ else if (state.pqState === 2) state.pqState = state.num.subtract(BigInteger.ONE).gcd(state.e).compareTo(BigInteger.ONE) === 0 ? 3 : 0;
+ else if (state.pqState === 3) {
state.pqState = 0;
- if (state.p === null) {
- state.p = state.num;
- } else {
- state.q = state.num;
- }
- if (state.p !== null && state.q !== null) {
- ++state.state;
- }
+ if (state.p === null) state.p = state.num;
+ else state.q = state.num;
+ if (state.p !== null && state.q !== null) ++state.state;
state.num = null;
}
} else if (state.state === 1) {
@@ -31934,19 +30050,16 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
state.q1 = state.q.subtract(BigInteger.ONE);
state.phi = state.p1.multiply(state.q1);
++state.state;
- } else if (state.state === 3) {
- if (state.phi.gcd(state.e).compareTo(BigInteger.ONE) === 0) {
- ++state.state;
- } else {
- state.p = null;
- state.q = null;
- state.state = 0;
- }
- } else if (state.state === 4) {
+ } else if (state.state === 3) if (state.phi.gcd(state.e).compareTo(BigInteger.ONE) === 0) ++state.state;
+ else {
+ state.p = null;
+ state.q = null;
+ state.state = 0;
+ }
+ else if (state.state === 4) {
state.n = state.p.multiply(state.q);
- if (state.n.bitLength() === state.bits) {
- ++state.state;
- } else {
+ if (state.n.bitLength() === state.bits) ++state.state;
+ else {
state.q = null;
state.state = 0;
}
@@ -31957,7 +30070,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
publicKey: pki.rsa.setPublicKey(state.n, state.e)
};
}
- t2 = +new Date();
+ t2 = +/* @__PURE__ */ new Date();
total += t2 - t1;
t1 = t2;
}
@@ -31997,89 +30110,76 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (arguments.length === 1) {
if (typeof bits === "object") {
options = bits;
- bits = undefined;
+ bits = void 0;
} else if (typeof bits === "function") {
callback = bits;
- bits = undefined;
+ bits = void 0;
}
- } else if (arguments.length === 2) {
- if (typeof bits === "number") {
- if (typeof e === "function") {
- callback = e;
- e = undefined;
- } else if (typeof e !== "number") {
- options = e;
- e = undefined;
- }
- } else {
- options = bits;
+ } else if (arguments.length === 2) if (typeof bits === "number") {
+ if (typeof e === "function") {
callback = e;
- bits = undefined;
- e = undefined;
+ e = void 0;
+ } else if (typeof e !== "number") {
+ options = e;
+ e = void 0;
}
- } else if (arguments.length === 3) {
- if (typeof e === "number") {
- if (typeof options === "function") {
- callback = options;
- options = undefined;
- }
- } else {
+ } else {
+ options = bits;
+ callback = e;
+ bits = void 0;
+ e = void 0;
+ }
+ else if (arguments.length === 3) if (typeof e === "number") {
+ if (typeof options === "function") {
callback = options;
- options = e;
- e = undefined;
+ options = void 0;
}
+ } else {
+ callback = options;
+ options = e;
+ e = void 0;
}
options = options || {};
- if (bits === undefined) {
- bits = options.bits || 2048;
- }
- if (e === undefined) {
- e = options.e || 65537;
- }
+ if (bits === void 0) bits = options.bits || 2048;
+ if (e === void 0) e = options.e || 65537;
if (!forge.options.usePureJavaScript && !options.prng && bits >= 256 && bits <= 16384 && (e === 65537 || e === 3)) {
if (callback) {
- if (_detectNodeCrypto("generateKeyPair")) {
- return _crypto.generateKeyPair("rsa", {
- modulusLength: bits,
- publicExponent: e,
- publicKeyEncoding: {
- type: "spki",
- format: "pem"
- },
- privateKeyEncoding: {
- type: "pkcs8",
- format: "pem"
- }
- }, function(err, pub, priv) {
- if (err) {
- return callback(err);
- }
+ if (_detectNodeCrypto("generateKeyPair")) return _crypto.generateKeyPair("rsa", {
+ modulusLength: bits,
+ publicExponent: e,
+ publicKeyEncoding: {
+ type: "spki",
+ format: "pem"
+ },
+ privateKeyEncoding: {
+ type: "pkcs8",
+ format: "pem"
+ }
+ }, function(err, pub, priv) {
+ if (err) return callback(err);
+ callback(null, {
+ privateKey: pki.privateKeyFromPem(priv),
+ publicKey: pki.publicKeyFromPem(pub)
+ });
+ });
+ if (_detectSubtleCrypto("generateKey") && _detectSubtleCrypto("exportKey")) return util.globalScope.crypto.subtle.generateKey({
+ name: "RSASSA-PKCS1-v1_5",
+ modulusLength: bits,
+ publicExponent: _intToUint8Array(e),
+ hash: { name: "SHA-256" }
+ }, true, ["sign", "verify"]).then(function(pair) {
+ return util.globalScope.crypto.subtle.exportKey("pkcs8", pair.privateKey);
+ }).then(void 0, function(err) {
+ callback(err);
+ }).then(function(pkcs8) {
+ if (pkcs8) {
+ var privateKey = pki.privateKeyFromAsn1(asn1.fromDer(forge.util.createBuffer(pkcs8)));
callback(null, {
- privateKey: pki.privateKeyFromPem(priv),
- publicKey: pki.publicKeyFromPem(pub)
+ privateKey,
+ publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e)
});
- });
- }
- if (_detectSubtleCrypto("generateKey") && _detectSubtleCrypto("exportKey")) {
- return util.globalScope.crypto.subtle.generateKey({
- name: "RSASSA-PKCS1-v1_5",
- modulusLength: bits,
- publicExponent: _intToUint8Array(e),
- hash: { name: "SHA-256" }
- }, true, ["sign", "verify"]).then(function(pair) {
- return util.globalScope.crypto.subtle.exportKey("pkcs8", pair.privateKey);
- }).then(undefined, function(err) {
- callback(err);
- }).then(function(pkcs8) {
- if (pkcs8) {
- var privateKey = pki.privateKeyFromAsn1(asn1.fromDer(forge.util.createBuffer(pkcs8)));
- callback(null, {
- privateKey,
- publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e)
- });
- }
- });
- }
+ }
+ });
if (_detectSubtleMsCrypto("generateKey") && _detectSubtleMsCrypto("exportKey")) {
var genOp = util.globalScope.msCrypto.subtle.generateKey({
name: "RSASSA-PKCS1-v1_5",
@@ -32107,25 +30207,23 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
return;
}
- } else {
- if (_detectNodeCrypto("generateKeyPairSync")) {
- var keypair = _crypto.generateKeyPairSync("rsa", {
- modulusLength: bits,
- publicExponent: e,
- publicKeyEncoding: {
- type: "spki",
- format: "pem"
- },
- privateKeyEncoding: {
- type: "pkcs8",
- format: "pem"
- }
- });
- return {
- privateKey: pki.privateKeyFromPem(keypair.privateKey),
- publicKey: pki.publicKeyFromPem(keypair.publicKey)
- };
- }
+ } else if (_detectNodeCrypto("generateKeyPairSync")) {
+ var keypair = _crypto.generateKeyPairSync("rsa", {
+ modulusLength: bits,
+ publicExponent: e,
+ publicKeyEncoding: {
+ type: "spki",
+ format: "pem"
+ },
+ privateKeyEncoding: {
+ type: "pkcs8",
+ format: "pem"
+ }
+ });
+ return {
+ privateKey: pki.privateKeyFromPem(keypair.privateKey),
+ publicKey: pki.publicKeyFromPem(keypair.publicKey)
+ };
}
}
var state = pki.rsa.createKeyPairGenerationState(bits, e, options);
@@ -32166,31 +30264,23 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the encrypted byte string.
*/
key.encrypt = function(data, scheme, schemeOptions) {
- if (typeof scheme === "string") {
- scheme = scheme.toUpperCase();
- } else if (scheme === undefined) {
- scheme = "RSAES-PKCS1-V1_5";
- }
- if (scheme === "RSAES-PKCS1-V1_5") {
- scheme = { encode: function(m, key, pub) {
- return _encodePkcs1_v1_5(m, key, 2).getBytes();
- } };
- } else if (scheme === "RSA-OAEP" || scheme === "RSAES-OAEP") {
- scheme = { encode: function(m, key) {
- return forge.pkcs1.encode_rsa_oaep(key, m, schemeOptions);
- } };
- } else if ([
+ if (typeof scheme === "string") scheme = scheme.toUpperCase();
+ else if (scheme === void 0) scheme = "RSAES-PKCS1-V1_5";
+ if (scheme === "RSAES-PKCS1-V1_5") scheme = { encode: function(m, key, pub) {
+ return _encodePkcs1_v1_5(m, key, 2).getBytes();
+ } };
+ else if (scheme === "RSA-OAEP" || scheme === "RSAES-OAEP") scheme = { encode: function(m, key) {
+ return forge.pkcs1.encode_rsa_oaep(key, m, schemeOptions);
+ } };
+ else if ([
"RAW",
"NONE",
"NULL",
null
- ].indexOf(scheme) !== -1) {
- scheme = { encode: function(e) {
- return e;
- } };
- } else if (typeof scheme === "string") {
- throw new Error("Unsupported encryption scheme: \"" + scheme + "\".");
- }
+ ].indexOf(scheme) !== -1) scheme = { encode: function(e) {
+ return e;
+ } };
+ else if (typeof scheme === "string") throw new Error("Unsupported encryption scheme: \"" + scheme + "\".");
var e = scheme.encode(data, key, true);
return pki.rsa.encrypt(e, key, true);
};
@@ -32230,47 +30320,35 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return true if the signature was verified, false if not.
*/
key.verify = function(digest, signature, scheme, options) {
- if (typeof scheme === "string") {
- scheme = scheme.toUpperCase();
- } else if (scheme === undefined) {
- scheme = "RSASSA-PKCS1-V1_5";
- }
- if (options === undefined) {
- options = { _parseAllDigestBytes: true };
- }
- if (!("_parseAllDigestBytes" in options)) {
- options._parseAllDigestBytes = true;
- }
- if (scheme === "RSASSA-PKCS1-V1_5") {
- scheme = { verify: function(digest, d) {
- d = _decodePkcs1_v1_5(d, key, true);
- var obj = asn1.fromDer(d, { parseAllBytes: options._parseAllDigestBytes });
- var capture = {};
- var errors = [];
- if (!asn1.validate(obj, digestInfoValidator, capture, errors)) {
- var error = new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 " + "DigestInfo value.");
- error.errors = errors;
- throw error;
- }
- var oid = asn1.derToOid(capture.algorithmIdentifier);
- if (!(oid === forge.oids.md2 || oid === forge.oids.md5 || oid === forge.oids.sha1 || oid === forge.oids.sha224 || oid === forge.oids.sha256 || oid === forge.oids.sha384 || oid === forge.oids.sha512 || oid === forge.oids["sha512-224"] || oid === forge.oids["sha512-256"])) {
- var error = new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");
- error.oid = oid;
- throw error;
- }
- if (oid === forge.oids.md2 || oid === forge.oids.md5) {
- if (!("parameters" in capture)) {
- throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 " + "DigestInfo value. " + "Missing algorithm identifer NULL parameters.");
- }
- }
- return digest === capture.digest;
- } };
- } else if (scheme === "NONE" || scheme === "NULL" || scheme === null) {
- scheme = { verify: function(digest, d) {
- d = _decodePkcs1_v1_5(d, key, true);
- return digest === d;
- } };
- }
+ if (typeof scheme === "string") scheme = scheme.toUpperCase();
+ else if (scheme === void 0) scheme = "RSASSA-PKCS1-V1_5";
+ if (options === void 0) options = { _parseAllDigestBytes: true };
+ if (!("_parseAllDigestBytes" in options)) options._parseAllDigestBytes = true;
+ if (scheme === "RSASSA-PKCS1-V1_5") scheme = { verify: function(digest, d) {
+ d = _decodePkcs1_v1_5(d, key, true);
+ var obj = asn1.fromDer(d, { parseAllBytes: options._parseAllDigestBytes });
+ var capture = {};
+ var errors = [];
+ if (!asn1.validate(obj, digestInfoValidator, capture, errors)) {
+ var error = /* @__PURE__ */ new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");
+ error.errors = errors;
+ throw error;
+ }
+ var oid = asn1.derToOid(capture.algorithmIdentifier);
+ if (!(oid === forge.oids.md2 || oid === forge.oids.md5 || oid === forge.oids.sha1 || oid === forge.oids.sha224 || oid === forge.oids.sha256 || oid === forge.oids.sha384 || oid === forge.oids.sha512 || oid === forge.oids["sha512-224"] || oid === forge.oids["sha512-256"])) {
+ var error = /* @__PURE__ */ new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");
+ error.oid = oid;
+ throw error;
+ }
+ if (oid === forge.oids.md2 || oid === forge.oids.md5) {
+ if (!("parameters" in capture)) throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");
+ }
+ return digest === capture.digest;
+ } };
+ else if (scheme === "NONE" || scheme === "NULL" || scheme === null) scheme = { verify: function(digest, d) {
+ d = _decodePkcs1_v1_5(d, key, true);
+ return digest === d;
+ } };
var d = pki.rsa.decrypt(signature, key, true, false);
return scheme.verify(digest, d, key.n.bitLength());
};
@@ -32316,30 +30394,22 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the decrypted byte string.
*/
key.decrypt = function(data, scheme, schemeOptions) {
- if (typeof scheme === "string") {
- scheme = scheme.toUpperCase();
- } else if (scheme === undefined) {
- scheme = "RSAES-PKCS1-V1_5";
- }
+ if (typeof scheme === "string") scheme = scheme.toUpperCase();
+ else if (scheme === void 0) scheme = "RSAES-PKCS1-V1_5";
var d = pki.rsa.decrypt(data, key, false, false);
- if (scheme === "RSAES-PKCS1-V1_5") {
- scheme = { decode: _decodePkcs1_v1_5 };
- } else if (scheme === "RSA-OAEP" || scheme === "RSAES-OAEP") {
- scheme = { decode: function(d, key) {
- return forge.pkcs1.decode_rsa_oaep(key, d, schemeOptions);
- } };
- } else if ([
+ if (scheme === "RSAES-PKCS1-V1_5") scheme = { decode: _decodePkcs1_v1_5 };
+ else if (scheme === "RSA-OAEP" || scheme === "RSAES-OAEP") scheme = { decode: function(d, key) {
+ return forge.pkcs1.decode_rsa_oaep(key, d, schemeOptions);
+ } };
+ else if ([
"RAW",
"NONE",
"NULL",
null
- ].indexOf(scheme) !== -1) {
- scheme = { decode: function(d) {
- return d;
- } };
- } else {
- throw new Error("Unsupported encryption scheme: \"" + scheme + "\".");
- }
+ ].indexOf(scheme) !== -1) scheme = { decode: function(d) {
+ return d;
+ } };
+ else throw new Error("Unsupported encryption scheme: \"" + scheme + "\".");
return scheme.decode(d, key, false);
};
/**
@@ -32363,10 +30433,8 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
key.sign = function(md, scheme) {
var bt = false;
- if (typeof scheme === "string") {
- scheme = scheme.toUpperCase();
- }
- if (scheme === undefined || scheme === "RSASSA-PKCS1-V1_5") {
+ if (typeof scheme === "string") scheme = scheme.toUpperCase();
+ if (scheme === void 0 || scheme === "RSASSA-PKCS1-V1_5") {
scheme = { encode: emsaPkcs1v15encode };
bt = 1;
} else if (scheme === "NONE" || scheme === "NULL" || scheme === null) {
@@ -32405,25 +30473,15 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.privateKeyFromAsn1 = function(obj) {
var capture = {};
var errors = [];
- if (asn1.validate(obj, privateKeyValidator, capture, errors)) {
- obj = asn1.fromDer(forge.util.createBuffer(capture.privateKey));
- }
+ if (asn1.validate(obj, privateKeyValidator, capture, errors)) obj = asn1.fromDer(forge.util.createBuffer(capture.privateKey));
capture = {};
errors = [];
if (!asn1.validate(obj, rsaPrivateKeyValidator, capture, errors)) {
- var error = new Error("Cannot read private key. " + "ASN.1 object does not contain an RSAPrivateKey.");
+ var error = /* @__PURE__ */ new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");
error.errors = errors;
throw error;
}
- var n, e, d, p, q, dP, dQ, qInv;
- n = forge.util.createBuffer(capture.privateKeyModulus).toHex();
- e = forge.util.createBuffer(capture.privateKeyPublicExponent).toHex();
- d = forge.util.createBuffer(capture.privateKeyPrivateExponent).toHex();
- p = forge.util.createBuffer(capture.privateKeyPrime1).toHex();
- q = forge.util.createBuffer(capture.privateKeyPrime2).toHex();
- dP = forge.util.createBuffer(capture.privateKeyExponent1).toHex();
- dQ = forge.util.createBuffer(capture.privateKeyExponent2).toHex();
- qInv = forge.util.createBuffer(capture.privateKeyCoefficient).toHex();
+ var n = forge.util.createBuffer(capture.privateKeyModulus).toHex(), e = forge.util.createBuffer(capture.privateKeyPublicExponent).toHex(), d = forge.util.createBuffer(capture.privateKeyPrivateExponent).toHex(), p = forge.util.createBuffer(capture.privateKeyPrime1).toHex(), q = forge.util.createBuffer(capture.privateKeyPrime2).toHex(), dP = forge.util.createBuffer(capture.privateKeyExponent1).toHex(), dQ = forge.util.createBuffer(capture.privateKeyExponent2).toHex(), qInv = forge.util.createBuffer(capture.privateKeyCoefficient).toHex();
return pki.setRsaPrivateKey(new BigInteger(n, 16), new BigInteger(e, 16), new BigInteger(d, 16), new BigInteger(p, 16), new BigInteger(q, 16), new BigInteger(dP, 16), new BigInteger(dQ, 16), new BigInteger(qInv, 16));
};
/**
@@ -32459,7 +30517,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (asn1.validate(obj, publicKeyValidator, capture, errors)) {
var oid = asn1.derToOid(capture.publicKeyOid);
if (oid !== pki.oids.rsaEncryption) {
- var error = new Error("Cannot read public key. Unknown OID.");
+ var error = /* @__PURE__ */ new Error("Cannot read public key. Unknown OID.");
error.oid = oid;
throw error;
}
@@ -32467,7 +30525,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
errors = [];
if (!asn1.validate(obj, rsaPublicKeyValidator, capture, errors)) {
- var error = new Error("Cannot read public key. " + "ASN.1 object does not contain an RSAPublicKey.");
+ var error = /* @__PURE__ */ new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");
error.errors = errors;
throw error;
}
@@ -32509,7 +30567,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var eb = forge.util.createBuffer();
var k = Math.ceil(key.n.bitLength() / 8);
if (m.length > k - 11) {
- var error = new Error("Message is too long for PKCS#1 v1.5 padding.");
+ var error = /* @__PURE__ */ new Error("Message is too long for PKCS#1 v1.5 padding.");
error.length = m.length;
error.max = k - 11;
throw error;
@@ -32520,23 +30578,16 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var padByte;
if (bt === 0 || bt === 1) {
padByte = bt === 0 ? 0 : 255;
+ for (var i = 0; i < padNum; ++i) eb.putByte(padByte);
+ } else while (padNum > 0) {
+ var numZeros = 0;
+ var padBytes = forge.random.getBytes(padNum);
for (var i = 0; i < padNum; ++i) {
- eb.putByte(padByte);
- }
- } else {
- while (padNum > 0) {
- var numZeros = 0;
- var padBytes = forge.random.getBytes(padNum);
- for (var i = 0; i < padNum; ++i) {
- padByte = padBytes.charCodeAt(i);
- if (padByte === 0) {
- ++numZeros;
- } else {
- eb.putByte(padByte);
- }
- }
- padNum = numZeros;
+ padByte = padBytes.charCodeAt(i);
+ if (padByte === 0) ++numZeros;
+ else eb.putByte(padByte);
}
+ padNum = numZeros;
}
eb.putByte(0);
eb.putBytes(m);
@@ -32557,17 +30608,11 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var eb = forge.util.createBuffer(em);
var first = eb.getByte();
var bt = eb.getByte();
- if (first !== 0 || pub && bt !== 0 && bt !== 1 || !pub && bt != 2 || pub && bt === 0 && typeof ml === "undefined") {
- throw new Error("Encryption block is invalid.");
- }
+ if (first !== 0 || pub && bt !== 0 && bt !== 1 || !pub && bt != 2 || pub && bt === 0 && typeof ml === "undefined") throw new Error("Encryption block is invalid.");
var padNum = 0;
if (bt === 0) {
padNum = k - 3 - ml;
- for (var i = 0; i < padNum; ++i) {
- if (eb.getByte() !== 0) {
- throw new Error("Encryption block is invalid.");
- }
- }
+ for (var i = 0; i < padNum; ++i) if (eb.getByte() !== 0) throw new Error("Encryption block is invalid.");
} else if (bt === 1) {
padNum = 0;
while (eb.length() > 1) {
@@ -32587,10 +30632,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
++padNum;
}
}
- var zero = eb.getByte();
- if (zero !== 0 || padNum !== k - 3 - eb.length()) {
- throw new Error("Encryption block is invalid.");
- }
+ if (eb.getByte() !== 0 || padNum !== k - 3 - eb.length()) throw new Error("Encryption block is invalid.");
return eb.getBytes();
}
/**
@@ -32621,19 +30663,13 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
workerScript: options.workerScript
}
} };
- if ("prng" in options) {
- opts.prng = options.prng;
- }
+ if ("prng" in options) opts.prng = options.prng;
generate();
function generate() {
getPrime(state.pBits, function(err, num) {
- if (err) {
- return callback(err);
- }
+ if (err) return callback(err);
state.p = num;
- if (state.q !== null) {
- return finish(err, state.q);
- }
+ if (state.q !== null) return finish(err, state.q);
getPrime(state.qBits, finish);
});
}
@@ -32641,9 +30677,7 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
forge.prime.generateProbablePrime(bits, opts, callback);
}
function finish(err, num) {
- if (err) {
- return callback(err);
- }
+ if (err) return callback(err);
state.q = num;
if (state.p.compareTo(state.q) < 0) {
var tmp = state.p;
@@ -32691,13 +30725,9 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _bnToBytes(b) {
var hex = b.toString(16);
- if (hex[0] >= "8") {
- hex = "00" + hex;
- }
+ if (hex[0] >= "8") hex = "00" + hex;
var bytes = forge.util.hexToBytes(hex);
- if (bytes.length > 1 && (bytes.charCodeAt(0) === 0 && (bytes.charCodeAt(1) & 128) === 0 || bytes.charCodeAt(0) === 255 && (bytes.charCodeAt(1) & 128) === 128)) {
- return bytes.substr(1);
- }
+ if (bytes.length > 1 && (bytes.charCodeAt(0) === 0 && (bytes.charCodeAt(1) & 128) === 0 || bytes.charCodeAt(0) === 255 && (bytes.charCodeAt(1) & 128) === 128)) return bytes.substr(1);
return bytes;
}
/**
@@ -32759,28 +30789,10 @@ var require_rsa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _intToUint8Array(x) {
var bytes = forge.util.hexToBytes(x.toString(16));
var buffer = new Uint8Array(bytes.length);
- for (var i = 0; i < bytes.length; ++i) {
- buffer[i] = bytes.charCodeAt(i);
- }
+ for (var i = 0; i < bytes.length; ++i) buffer[i] = bytes.charCodeAt(i);
return buffer;
}
- function _privateKeyFromJwk(jwk) {
- if (jwk.kty !== "RSA") {
- throw new Error("Unsupported key algorithm \"" + jwk.kty + "\"; algorithm must be \"RSA\".");
- }
- return pki.setRsaPrivateKey(_base64ToBigInt(jwk.n), _base64ToBigInt(jwk.e), _base64ToBigInt(jwk.d), _base64ToBigInt(jwk.p), _base64ToBigInt(jwk.q), _base64ToBigInt(jwk.dp), _base64ToBigInt(jwk.dq), _base64ToBigInt(jwk.qi));
- }
- function _publicKeyFromJwk(jwk) {
- if (jwk.kty !== "RSA") {
- throw new Error("Key algorithm must be \"RSA\".");
- }
- return pki.setRsaPublicKey(_base64ToBigInt(jwk.n), _base64ToBigInt(jwk.e));
- }
- function _base64ToBigInt(b64) {
- return new BigInteger(forge.util.bytesToHex(forge.util.decode64(b64)), 16);
- }
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pbe.js
var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -32815,9 +30827,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
require_rc2();
require_rsa();
require_util$8();
- if (typeof BigInteger === "undefined") {
- var BigInteger = forge.jsbn.BigInteger;
- }
+ if (typeof BigInteger === "undefined") var BigInteger = forge.jsbn.BigInteger;
var asn1 = forge.asn1;
var pki = forge.pki = forge.pki || {};
module.exports = pki.pbe = forge.pbe = forge.pbe || {};
@@ -33032,7 +31042,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cipherFn = forge.des.createEncryptionCipher;
break;
default:
- var error = new Error("Cannot encrypt private key. Unknown encryption algorithm.");
+ var error = /* @__PURE__ */ new Error("Cannot encrypt private key. Unknown encryption algorithm.");
error.algorithm = options.algorithm;
throw error;
}
@@ -33059,12 +31069,11 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
encryptedData = cipher.output.getBytes();
encryptionAlgorithm = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, countBytes.getBytes())])]);
} else {
- var error = new Error("Cannot encrypt private key. Unknown encryption algorithm.");
+ var error = /* @__PURE__ */ new Error("Cannot encrypt private key. Unknown encryption algorithm.");
error.algorithm = options.algorithm;
throw error;
}
- var rval = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [encryptionAlgorithm, asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, encryptedData)]);
- return rval;
+ return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [encryptionAlgorithm, asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, encryptedData)]);
};
/**
* Decrypts a ASN.1 PrivateKeyInfo object.
@@ -33079,7 +31088,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(obj, encryptedPrivateKeyValidator, capture, errors)) {
- var error = new Error("Cannot read encrypted private key. " + "ASN.1 object is not a supported EncryptedPrivateKeyInfo.");
+ var error = /* @__PURE__ */ new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");
error.errors = errors;
throw error;
}
@@ -33087,9 +31096,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var cipher = pki.pbe.getCipher(oid, capture.encryptionParams, password);
var encrypted = forge.util.createBuffer(capture.encryptedData);
cipher.update(encrypted);
- if (cipher.finish()) {
- rval = asn1.fromDer(cipher.output);
- }
+ if (cipher.finish()) rval = asn1.fromDer(cipher.output);
return rval;
};
/**
@@ -33118,13 +31125,11 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.encryptedPrivateKeyFromPem = function(pem) {
var msg = forge.pem.decode(pem)[0];
if (msg.type !== "ENCRYPTED PRIVATE KEY") {
- var error = new Error("Could not convert encrypted private key from PEM; " + "PEM header type is \"ENCRYPTED PRIVATE KEY\".");
+ var error = /* @__PURE__ */ new Error("Could not convert encrypted private key from PEM; PEM header type is \"ENCRYPTED PRIVATE KEY\".");
error.headerType = msg.type;
throw error;
}
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert encrypted private key from PEM; " + "PEM is encrypted.");
- }
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");
return asn1.fromDer(msg.body);
};
/**
@@ -33196,7 +31201,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cipherFn = forge.des.createEncryptionCipher;
break;
default:
- var error = new Error("Could not encrypt RSA private key; unsupported " + "encryption algorithm \"" + options.algorithm + "\".");
+ var error = /* @__PURE__ */ new Error("Could not encrypt RSA private key; unsupported encryption algorithm \"" + options.algorithm + "\".");
error.algorithm = options.algorithm;
throw error;
}
@@ -33231,7 +31236,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = null;
var msg = forge.pem.decode(pem)[0];
if (msg.type !== "ENCRYPTED PRIVATE KEY" && msg.type !== "PRIVATE KEY" && msg.type !== "RSA PRIVATE KEY") {
- var error = new Error("Could not convert private key from PEM; PEM header type " + "is not \"ENCRYPTED PRIVATE KEY\", \"PRIVATE KEY\", or \"RSA PRIVATE KEY\".");
+ var error = /* @__PURE__ */ new Error("Could not convert private key from PEM; PEM header type is not \"ENCRYPTED PRIVATE KEY\", \"PRIVATE KEY\", or \"RSA PRIVATE KEY\".");
error.headerType = error;
throw error;
}
@@ -33278,7 +31283,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
break;
default:
- var error = new Error("Could not decrypt private key; unsupported " + "encryption algorithm \"" + msg.dekInfo.algorithm + "\".");
+ var error = /* @__PURE__ */ new Error("Could not decrypt private key; unsupported encryption algorithm \"" + msg.dekInfo.algorithm + "\".");
error.algorithm = msg.dekInfo.algorithm;
throw error;
}
@@ -33287,22 +31292,12 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var cipher = cipherFn(dk);
cipher.start(iv);
cipher.update(forge.util.createBuffer(msg.body));
- if (cipher.finish()) {
- rval = cipher.output.getBytes();
- } else {
- return rval;
- }
- } else {
- rval = msg.body;
- }
- if (msg.type === "ENCRYPTED PRIVATE KEY") {
- rval = pki.decryptPrivateKeyInfo(asn1.fromDer(rval), password);
- } else {
- rval = asn1.fromDer(rval);
- }
- if (rval !== null) {
- rval = pki.privateKeyFromAsn1(rval);
- }
+ if (cipher.finish()) rval = cipher.output.getBytes();
+ else return rval;
+ } else rval = msg.body;
+ if (msg.type === "ENCRYPTED PRIVATE KEY") rval = pki.decryptPrivateKeyInfo(asn1.fromDer(rval), password);
+ else rval = asn1.fromDer(rval);
+ if (rval !== null) rval = pki.privateKeyFromAsn1(rval);
return rval;
};
/**
@@ -33321,19 +31316,15 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.pbe.generatePkcs12Key = function(password, salt, id, iter, n, md) {
var j, l;
if (typeof md === "undefined" || md === null) {
- if (!("sha1" in forge.md)) {
- throw new Error("\"sha1\" hash algorithm unavailable.");
- }
+ if (!("sha1" in forge.md)) throw new Error("\"sha1\" hash algorithm unavailable.");
md = forge.md.sha1.create();
}
var u = md.digestLength;
var v = md.blockLength;
var result = new forge.util.ByteBuffer();
var passBuf = new forge.util.ByteBuffer();
- if (password !== null && password !== undefined) {
- for (l = 0; l < password.length; l++) {
- passBuf.putInt16(password.charCodeAt(l));
- }
+ if (password !== null && password !== void 0) {
+ for (l = 0; l < password.length; l++) passBuf.putInt16(password.charCodeAt(l));
passBuf.putInt16(0);
}
var p = passBuf.length();
@@ -33342,14 +31333,10 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
D.fillWithByte(id, v);
var Slen = v * Math.ceil(s / v);
var S = new forge.util.ByteBuffer();
- for (l = 0; l < Slen; l++) {
- S.putByte(salt.at(l % s));
- }
+ for (l = 0; l < Slen; l++) S.putByte(salt.at(l % s));
var Plen = v * Math.ceil(p / v);
var P = new forge.util.ByteBuffer();
- for (l = 0; l < Plen; l++) {
- P.putByte(passBuf.at(l % p));
- }
+ for (l = 0; l < Plen; l++) P.putByte(passBuf.at(l % p));
var I = S;
I.putBuffer(P);
var c = Math.ceil(n / u);
@@ -33363,9 +31350,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
buf = md.digest();
}
var B = new forge.util.ByteBuffer();
- for (l = 0; l < v; l++) {
- B.putByte(buf.at(l % u));
- }
+ for (l = 0; l < v; l++) B.putByte(buf.at(l % u));
var k = Math.ceil(s / v) + Math.ceil(p / v);
var Inew = new forge.util.ByteBuffer();
for (j = 0; j < k; j++) {
@@ -33399,7 +31384,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case pki.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:
case pki.oids["pbewithSHAAnd40BitRC2-CBC"]: return pki.pbe.getCipherForPKCS12PBE(oid, params, password);
default:
- var error = new Error("Cannot read encrypted PBE data block. Unsupported OID.");
+ var error = /* @__PURE__ */ new Error("Cannot read encrypted PBE data block. Unsupported OID.");
error.oid = oid;
error.supportedOids = [
"pkcs5PBES2",
@@ -33425,20 +31410,20 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(params, PBES2AlgorithmsValidator, capture, errors)) {
- var error = new Error("Cannot read password-based-encryption algorithm " + "parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");
+ var error = /* @__PURE__ */ new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");
error.errors = errors;
throw error;
}
oid = asn1.derToOid(capture.kdfOid);
if (oid !== pki.oids["pkcs5PBKDF2"]) {
- var error = new Error("Cannot read encrypted private key. " + "Unsupported key derivation function OID.");
+ var error = /* @__PURE__ */ new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");
error.oid = oid;
error.supportedOids = ["pkcs5PBKDF2"];
throw error;
}
oid = asn1.derToOid(capture.encOid);
if (oid !== pki.oids["aes128-CBC"] && oid !== pki.oids["aes192-CBC"] && oid !== pki.oids["aes256-CBC"] && oid !== pki.oids["des-EDE3-CBC"] && oid !== pki.oids["desCBC"]) {
- var error = new Error("Cannot read encrypted private key. " + "Unsupported encryption scheme OID.");
+ var error = /* @__PURE__ */ new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");
error.oid = oid;
error.supportedOids = [
"aes128-CBC",
@@ -33499,7 +31484,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(params, pkcs12PbeParamsValidator, capture, errors)) {
- var error = new Error("Cannot read password-based-encryption algorithm " + "parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");
+ var error = /* @__PURE__ */ new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");
error.errors = errors;
throw error;
}
@@ -33523,7 +31508,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
break;
default:
- var error = new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");
error.oid = oid;
throw error;
}
@@ -33546,18 +31531,12 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
pki.pbe.opensslDeriveBytes = function(password, salt, dkLen, md) {
if (typeof md === "undefined" || md === null) {
- if (!("md5" in forge.md)) {
- throw new Error("\"md5\" hash algorithm unavailable.");
- }
+ if (!("md5" in forge.md)) throw new Error("\"md5\" hash algorithm unavailable.");
md = forge.md.md5.create();
}
- if (salt === null) {
- salt = "";
- }
+ if (salt === null) salt = "";
var digests = [hash(md, password + salt)];
- for (var length = 16, i = 1; length < dkLen; ++i, length += 16) {
- digests.push(hash(md, digests[i - 1] + password + salt));
- }
+ for (var length = 16, i = 1; length < dkLen; ++i, length += 16) digests.push(hash(md, digests[i - 1] + password + salt));
return digests.join("").substr(0, dkLen);
};
function hash(md, bytes) {
@@ -33565,12 +31544,11 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function prfOidToMessageDigest(prfOid) {
var prfAlgorithm;
- if (!prfOid) {
- prfAlgorithm = "hmacWithSHA1";
- } else {
+ if (!prfOid) prfAlgorithm = "hmacWithSHA1";
+ else {
prfAlgorithm = pki.oids[asn1.derToOid(prfOid)];
if (!prfAlgorithm) {
- var error = new Error("Unsupported PRF OID.");
+ var error = /* @__PURE__ */ new Error("Unsupported PRF OID.");
error.oid = prfOid;
error.supported = [
"hmacWithSHA1",
@@ -33595,7 +31573,7 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
prfAlgorithm = prfAlgorithm.substr(8).toLowerCase();
break;
default:
- var error = new Error("Unsupported PRF algorithm.");
+ var error = /* @__PURE__ */ new Error("Unsupported PRF algorithm.");
error.algorithm = prfAlgorithm;
error.supported = [
"hmacWithSHA1",
@@ -33606,20 +31584,15 @@ var require_pbe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
];
throw error;
}
- if (!factory || !(prfAlgorithm in factory)) {
- throw new Error("Unknown hash algorithm: " + prfAlgorithm);
- }
+ if (!factory || !(prfAlgorithm in factory)) throw new Error("Unknown hash algorithm: " + prfAlgorithm);
return factory[prfAlgorithm].create();
}
function createPbkdf2Params(salt, countBytes, dkLen, prfAlgorithm) {
var params = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, countBytes.getBytes())]);
- if (prfAlgorithm !== "hmacWithSHA1") {
- params.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, forge.util.hexToBytes(dkLen.toString(16))), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids[prfAlgorithm]).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")]));
- }
+ if (prfAlgorithm !== "hmacWithSHA1") params.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, forge.util.hexToBytes(dkLen.toString(16))), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids[prfAlgorithm]).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")]));
return params;
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pkcs7asn1.js
var require_pkcs7asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -34019,7 +31992,6 @@ var require_pkcs7asn1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
]
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/mgf1.js
var require_mgf1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -34044,7 +32016,7 @@ var require_mgf1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return a mask generation function object.
*/
mgf1.create = function(md) {
- var mgf = { generate: function(seed, maskLen) {
+ return { generate: function(seed, maskLen) {
var t = new forge.util.ByteBuffer();
var len = Math.ceil(maskLen / md.digestLength);
for (var i = 0; i < len; i++) {
@@ -34057,10 +32029,8 @@ var require_mgf1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
t.truncate(t.length() - maskLen);
return t.getBytes();
} };
- return mgf;
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/mgf.js
var require_mgf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -34076,7 +32046,6 @@ var require_mgf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = forge.mgf = forge.mgf || {};
forge.mgf.mgf1 = forge.mgf1;
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pss.js
var require_pss = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -34111,31 +32080,21 @@ var require_pss = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return a signature scheme object.
*/
pss.create = function(options) {
- if (arguments.length === 3) {
- options = {
- md: arguments[0],
- mgf: arguments[1],
- saltLength: arguments[2]
- };
- }
+ if (arguments.length === 3) options = {
+ md: arguments[0],
+ mgf: arguments[1],
+ saltLength: arguments[2]
+ };
var hash = options.md;
var mgf = options.mgf;
var hLen = hash.digestLength;
var salt_ = options.salt || null;
- if (typeof salt_ === "string") {
- salt_ = forge.util.createBuffer(salt_);
- }
+ if (typeof salt_ === "string") salt_ = forge.util.createBuffer(salt_);
var sLen;
- if ("saltLength" in options) {
- sLen = options.saltLength;
- } else if (salt_ !== null) {
- sLen = salt_.length();
- } else {
- throw new Error("Salt length not specified or specific salt not given.");
- }
- if (salt_ !== null && salt_.length() !== sLen) {
- throw new Error("Given salt length does not match length of given salt.");
- }
+ if ("saltLength" in options) sLen = options.saltLength;
+ else if (salt_ !== null) sLen = salt_.length();
+ else throw new Error("Salt length not specified or specific salt not given.");
+ if (salt_ !== null && salt_.length() !== sLen) throw new Error("Given salt length does not match length of given salt.");
var prng = options.prng || forge.random;
var pssobj = {};
/**
@@ -34154,15 +32113,10 @@ var require_pss = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var emBits = modBits - 1;
var emLen = Math.ceil(emBits / 8);
var mHash = md.digest().getBytes();
- if (emLen < hLen + sLen + 2) {
- throw new Error("Message is too long to encrypt.");
- }
+ if (emLen < hLen + sLen + 2) throw new Error("Message is too long to encrypt.");
var salt;
- if (salt_ === null) {
- salt = prng.getBytesSync(sLen);
- } else {
- salt = salt_.bytes();
- }
+ if (salt_ === null) salt = prng.getBytesSync(sLen);
+ else salt = salt_.bytes();
var m_ = new forge.util.ByteBuffer();
m_.fillWithByte(0, 8);
m_.putBytes(mHash);
@@ -34178,9 +32132,7 @@ var require_pss = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var maskLen = emLen - hLen - 1;
var dbMask = mgf.generate(h, maskLen);
var maskedDB = "";
- for (i = 0; i < maskLen; i++) {
- maskedDB += String.fromCharCode(db.charCodeAt(i) ^ dbMask.charCodeAt(i));
- }
+ for (i = 0; i < maskLen; i++) maskedDB += String.fromCharCode(db.charCodeAt(i) ^ dbMask.charCodeAt(i));
var mask = 65280 >> 8 * emLen - emBits & 255;
maskedDB = String.fromCharCode(maskedDB.charCodeAt(0) & ~mask) + maskedDB.substr(1);
return maskedDB + h + String.fromCharCode(188);
@@ -34203,34 +32155,20 @@ var require_pss = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var emBits = modBits - 1;
var emLen = Math.ceil(emBits / 8);
em = em.substr(-emLen);
- if (emLen < hLen + sLen + 2) {
- throw new Error("Inconsistent parameters to PSS signature verification.");
- }
- if (em.charCodeAt(emLen - 1) !== 188) {
- throw new Error("Encoded message does not end in 0xBC.");
- }
+ if (emLen < hLen + sLen + 2) throw new Error("Inconsistent parameters to PSS signature verification.");
+ if (em.charCodeAt(emLen - 1) !== 188) throw new Error("Encoded message does not end in 0xBC.");
var maskLen = emLen - hLen - 1;
var maskedDB = em.substr(0, maskLen);
var h = em.substr(maskLen, hLen);
var mask = 65280 >> 8 * emLen - emBits & 255;
- if ((maskedDB.charCodeAt(0) & mask) !== 0) {
- throw new Error("Bits beyond keysize not zero as expected.");
- }
+ if ((maskedDB.charCodeAt(0) & mask) !== 0) throw new Error("Bits beyond keysize not zero as expected.");
var dbMask = mgf.generate(h, maskLen);
var db = "";
- for (i = 0; i < maskLen; i++) {
- db += String.fromCharCode(maskedDB.charCodeAt(i) ^ dbMask.charCodeAt(i));
- }
+ for (i = 0; i < maskLen; i++) db += String.fromCharCode(maskedDB.charCodeAt(i) ^ dbMask.charCodeAt(i));
db = String.fromCharCode(db.charCodeAt(0) & ~mask) + db.substr(1);
var checkLen = emLen - hLen - sLen - 2;
- for (i = 0; i < checkLen; i++) {
- if (db.charCodeAt(i) !== 0) {
- throw new Error("Leftmost octets not zero as expected");
- }
- }
- if (db.charCodeAt(checkLen) !== 1) {
- throw new Error("Inconsistent PSS signature, 0x01 marker not found");
- }
+ for (i = 0; i < checkLen; i++) if (db.charCodeAt(i) !== 0) throw new Error("Leftmost octets not zero as expected");
+ if (db.charCodeAt(checkLen) !== 1) throw new Error("Inconsistent PSS signature, 0x01 marker not found");
var salt = db.substr(-sLen);
var m_ = new forge.util.ByteBuffer();
m_.fillWithByte(0, 8);
@@ -34238,13 +32176,11 @@ var require_pss = /* @__PURE__ */ __commonJSMin(((exports, module) => {
m_.putBytes(salt);
hash.start();
hash.update(m_.getBytes());
- var h_ = hash.digest().getBytes();
- return h === h_;
+ return h === hash.digest().getBytes();
};
return pssobj;
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/x509.js
var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -34749,9 +32685,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
obj.valueTagClass = attr.value[1].type;
if (obj.type in oids) {
obj.name = oids[obj.type];
- if (obj.name in _shortNames) {
- obj.shortName = _shortNames[obj.name];
- }
+ if (obj.name in _shortNames) obj.shortName = _shortNames[obj.name];
}
if (md) {
md.update(obj.type);
@@ -34781,15 +32715,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
obj.valueTagClass = values[vi].type;
if (obj.type in oids) {
obj.name = oids[obj.type];
- if (obj.name in _shortNames) {
- obj.shortName = _shortNames[obj.name];
- }
+ if (obj.name in _shortNames) obj.shortName = _shortNames[obj.name];
}
if (obj.type === oids.extensionRequest) {
obj.extensions = [];
- for (var ei = 0; ei < obj.value.length; ++ei) {
- obj.extensions.push(pki.certificateExtensionFromAsn1(obj.value[ei]));
- }
+ for (var ei = 0; ei < obj.value.length; ++ei) obj.extensions.push(pki.certificateExtensionFromAsn1(obj.value[ei]));
}
rval.push(obj);
}
@@ -34808,20 +32738,14 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the attribute.
*/
function _getAttribute(obj, options) {
- if (typeof options === "string") {
- options = { shortName: options };
- }
+ if (typeof options === "string") options = { shortName: options };
var rval = null;
var attr;
for (var i = 0; rval === null && i < obj.attributes.length; ++i) {
attr = obj.attributes[i];
- if (options.type && options.type === attr.type) {
- rval = attr;
- } else if (options.name && options.name === attr.name) {
- rval = attr;
- } else if (options.shortName && options.shortName === attr.shortName) {
- rval = attr;
- }
+ if (options.type && options.type === attr.type) rval = attr;
+ else if (options.name && options.name === attr.name) rval = attr;
+ else if (options.shortName && options.shortName === attr.shortName) rval = attr;
}
return rval;
}
@@ -34856,39 +32780,33 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var _readSignatureParameters = function(oid, obj, fillDefaults) {
var params = {};
- if (oid !== oids["RSASSA-PSS"]) {
- return params;
- }
- if (fillDefaults) {
- params = {
- hash: { algorithmOid: oids["sha1"] },
- mgf: {
- algorithmOid: oids["mgf1"],
- hash: { algorithmOid: oids["sha1"] }
- },
- saltLength: 20
- };
- }
+ if (oid !== oids["RSASSA-PSS"]) return params;
+ if (fillDefaults) params = {
+ hash: { algorithmOid: oids["sha1"] },
+ mgf: {
+ algorithmOid: oids["mgf1"],
+ hash: { algorithmOid: oids["sha1"] }
+ },
+ saltLength: 20
+ };
var capture = {};
var errors = [];
if (!asn1.validate(obj, rsassaPssParameterValidator, capture, errors)) {
- var error = new Error("Cannot read RSASSA-PSS parameter block.");
+ var error = /* @__PURE__ */ new Error("Cannot read RSASSA-PSS parameter block.");
error.errors = errors;
throw error;
}
- if (capture.hashOid !== undefined) {
+ if (capture.hashOid !== void 0) {
params.hash = params.hash || {};
params.hash.algorithmOid = asn1.derToOid(capture.hashOid);
}
- if (capture.maskGenOid !== undefined) {
+ if (capture.maskGenOid !== void 0) {
params.mgf = params.mgf || {};
params.mgf.algorithmOid = asn1.derToOid(capture.maskGenOid);
params.mgf.hash = params.mgf.hash || {};
params.mgf.hash.algorithmOid = asn1.derToOid(capture.maskGenHashOid);
}
- if (capture.saltLength !== undefined) {
- params.saltLength = capture.saltLength.charCodeAt(0);
- }
+ if (capture.saltLength !== void 0) params.saltLength = capture.saltLength.charCodeAt(0);
return params;
};
/**
@@ -34909,7 +32827,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case "sha512WithRSAEncryption": return forge.md.sha512.create();
case "RSASSA-PSS": return forge.md.sha256.create();
default:
- var error = new Error("Could not compute " + options.type + " digest. " + "Unknown signature OID.");
+ var error = /* @__PURE__ */ new Error("Could not compute " + options.type + " digest. Unknown signature OID.");
error.signatureOid = options.signatureOid;
throw error;
}
@@ -34930,25 +32848,24 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case oids.sha1WithRSAEncryption:
case oids.sha1WithRSASignature: break;
case oids["RSASSA-PSS"]:
- var hash, mgf;
- hash = oids[cert.signatureParameters.mgf.hash.algorithmOid];
- if (hash === undefined || forge.md[hash] === undefined) {
- var error = new Error("Unsupported MGF hash function.");
+ var hash = oids[cert.signatureParameters.mgf.hash.algorithmOid], mgf;
+ if (hash === void 0 || forge.md[hash] === void 0) {
+ var error = /* @__PURE__ */ new Error("Unsupported MGF hash function.");
error.oid = cert.signatureParameters.mgf.hash.algorithmOid;
error.name = hash;
throw error;
}
mgf = oids[cert.signatureParameters.mgf.algorithmOid];
- if (mgf === undefined || forge.mgf[mgf] === undefined) {
- var error = new Error("Unsupported MGF function.");
+ if (mgf === void 0 || forge.mgf[mgf] === void 0) {
+ var error = /* @__PURE__ */ new Error("Unsupported MGF function.");
error.oid = cert.signatureParameters.mgf.algorithmOid;
error.name = mgf;
throw error;
}
mgf = forge.mgf[mgf].create(forge.md[hash].create());
hash = oids[cert.signatureParameters.hash.algorithmOid];
- if (hash === undefined || forge.md[hash] === undefined) {
- var error = new Error("Unsupported RSASSA-PSS hash function.");
+ if (hash === void 0 || forge.md[hash] === void 0) {
+ var error = /* @__PURE__ */ new Error("Unsupported RSASSA-PSS hash function.");
error.oid = cert.signatureParameters.hash.algorithmOid;
error.name = hash;
throw error;
@@ -34976,13 +32893,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.certificateFromPem = function(pem, computeHash, strict) {
var msg = forge.pem.decode(pem)[0];
if (msg.type !== "CERTIFICATE" && msg.type !== "X509 CERTIFICATE" && msg.type !== "TRUSTED CERTIFICATE") {
- var error = new Error("Could not convert certificate from PEM; PEM header type " + "is not \"CERTIFICATE\", \"X509 CERTIFICATE\", or \"TRUSTED CERTIFICATE\".");
+ var error = /* @__PURE__ */ new Error("Could not convert certificate from PEM; PEM header type is not \"CERTIFICATE\", \"X509 CERTIFICATE\", or \"TRUSTED CERTIFICATE\".");
error.headerType = msg.type;
throw error;
}
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert certificate from PEM; PEM is encrypted.");
- }
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert certificate from PEM; PEM is encrypted.");
var obj = asn1.fromDer(msg.body, strict);
return pki.certificateFromAsn1(obj, computeHash);
};
@@ -35011,13 +32926,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.publicKeyFromPem = function(pem) {
var msg = forge.pem.decode(pem)[0];
if (msg.type !== "PUBLIC KEY" && msg.type !== "RSA PUBLIC KEY") {
- var error = new Error("Could not convert public key from PEM; PEM header " + "type is not \"PUBLIC KEY\" or \"RSA PUBLIC KEY\".");
+ var error = /* @__PURE__ */ new Error("Could not convert public key from PEM; PEM header type is not \"PUBLIC KEY\" or \"RSA PUBLIC KEY\".");
error.headerType = msg.type;
throw error;
}
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert public key from PEM; PEM is encrypted.");
- }
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert public key from PEM; PEM is encrypted.");
var obj = asn1.fromDer(msg.body);
return pki.publicKeyFromAsn1(obj);
};
@@ -35084,15 +32997,10 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var digest = md.digest();
if (options.encoding === "hex") {
var hex = digest.toHex();
- if (options.delimiter) {
- return hex.match(/.{2}/g).join(options.delimiter);
- }
+ if (options.delimiter) return hex.match(/.{2}/g).join(options.delimiter);
return hex;
- } else if (options.encoding === "binary") {
- return digest.getBytes();
- } else if (options.encoding) {
- throw new Error("Unknown encoding \"" + options.encoding + "\".");
- }
+ } else if (options.encoding === "binary") return digest.getBytes();
+ else if (options.encoding) throw new Error("Unknown encoding \"" + options.encoding + "\".");
return digest;
};
/**
@@ -35113,13 +33021,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.certificationRequestFromPem = function(pem, computeHash, strict) {
var msg = forge.pem.decode(pem)[0];
if (msg.type !== "CERTIFICATE REQUEST") {
- var error = new Error("Could not convert certification request from PEM; " + "PEM header type is not \"CERTIFICATE REQUEST\".");
+ var error = /* @__PURE__ */ new Error("Could not convert certification request from PEM; PEM header type is not \"CERTIFICATE REQUEST\".");
error.headerType = msg.type;
throw error;
}
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert certification request from PEM; " + "PEM is encrypted.");
- }
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert certification request from PEM; PEM is encrypted.");
var obj = asn1.fromDer(msg.body, strict);
return pki.certificationRequestFromAsn1(obj, computeHash);
};
@@ -35152,8 +33058,8 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cert.siginfo = {};
cert.siginfo.algorithmOid = null;
cert.validity = {};
- cert.validity.notBefore = new Date();
- cert.validity.notAfter = new Date();
+ cert.validity.notBefore = /* @__PURE__ */ new Date();
+ cert.validity.notAfter = /* @__PURE__ */ new Date();
cert.issuer = {};
cert.issuer.getField = function(sn) {
return _getAttribute(cert.issuer, sn);
@@ -35187,9 +33093,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_fillMissingFields(attrs);
cert.subject.attributes = attrs;
delete cert.subject.uniqueId;
- if (uniqueId) {
- cert.subject.uniqueId = uniqueId;
- }
+ if (uniqueId) cert.subject.uniqueId = uniqueId;
cert.subject.hash = null;
};
/**
@@ -35202,9 +33106,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_fillMissingFields(attrs);
cert.issuer.attributes = attrs;
delete cert.issuer.uniqueId;
- if (uniqueId) {
- cert.issuer.uniqueId = uniqueId;
- }
+ if (uniqueId) cert.issuer.uniqueId = uniqueId;
cert.issuer.hash = null;
};
/**
@@ -35213,9 +33115,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param exts the array of extensions to use.
*/
cert.setExtensions = function(exts) {
- for (var i = 0; i < exts.length; ++i) {
- _fillMissingExtensionFields(exts[i], { cert });
- }
+ for (var i = 0; i < exts.length; ++i) _fillMissingExtensionFields(exts[i], { cert });
cert.extensions = exts;
};
/**
@@ -35228,18 +33128,13 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the extension or null if not found.
*/
cert.getExtension = function(options) {
- if (typeof options === "string") {
- options = { name: options };
- }
+ if (typeof options === "string") options = { name: options };
var rval = null;
var ext;
for (var i = 0; rval === null && i < cert.extensions.length; ++i) {
ext = cert.extensions[i];
- if (options.id && ext.id === options.id) {
- rval = ext;
- } else if (options.name && ext.name === options.name) {
- rval = ext;
- }
+ if (options.id && ext.id === options.id) rval = ext;
+ else if (options.name && ext.name === options.name) rval = ext;
}
return rval;
};
@@ -35253,7 +33148,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cert.md = md || forge.md.sha1.create();
var algorithmOid = oids[cert.md.algorithm + "WithRSAEncryption"];
if (!algorithmOid) {
- var error = new Error("Could not compute certificate digest. " + "Unknown message digest algorithm OID.");
+ var error = /* @__PURE__ */ new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");
error.algorithm = cert.md.algorithm;
throw error;
}
@@ -35276,7 +33171,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (!cert.issued(child)) {
var issuer = child.issuer;
var subject = cert.subject;
- var error = new Error("The parent certificate did not issue the given child " + "certificate; the child certificate's issuer does not match the " + "parent's subject.");
+ var error = /* @__PURE__ */ new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
error.expectedIssuer = subject.attributes;
error.actualIssuer = issuer.attributes;
throw error;
@@ -35291,13 +33186,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var bytes = asn1.toDer(tbsCertificate);
md.update(bytes.getBytes());
}
- if (md !== null) {
- rval = _verifySignature({
- certificate: cert,
- md,
- signature: child.signature
- });
- }
+ if (md !== null) rval = _verifySignature({
+ certificate: cert,
+ md,
+ signature: child.signature
+ });
return rval;
};
/**
@@ -35313,17 +33206,14 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = false;
var i = cert.issuer;
var s = parent.subject;
- if (i.hash && s.hash) {
- rval = i.hash === s.hash;
- } else if (i.attributes.length === s.attributes.length) {
+ if (i.hash && s.hash) rval = i.hash === s.hash;
+ else if (i.attributes.length === s.attributes.length) {
rval = true;
var iattr, sattr;
for (var n = 0; rval && n < i.attributes.length; ++n) {
iattr = i.attributes[n];
sattr = s.attributes[n];
- if (iattr.type !== sattr.type || iattr.value !== sattr.value) {
- rval = false;
- }
+ if (iattr.type !== sattr.type || iattr.value !== sattr.value) rval = false;
}
}
return rval;
@@ -35385,42 +33275,26 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(obj, x509CertificateValidator, capture, errors)) {
- var error = new Error("Cannot read X.509 certificate. " + "ASN.1 object is not an X509v3 Certificate.");
+ var error = /* @__PURE__ */ new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");
error.errors = errors;
throw error;
}
- var oid = asn1.derToOid(capture.publicKeyOid);
- if (oid !== pki.oids.rsaEncryption) {
- throw new Error("Cannot read public key. OID is not RSA.");
- }
+ if (asn1.derToOid(capture.publicKeyOid) !== pki.oids.rsaEncryption) throw new Error("Cannot read public key. OID is not RSA.");
var cert = pki.createCertificate();
cert.version = capture.certVersion ? capture.certVersion.charCodeAt(0) : 0;
- var serial = forge.util.createBuffer(capture.certSerialNumber);
- cert.serialNumber = serial.toHex();
+ cert.serialNumber = forge.util.createBuffer(capture.certSerialNumber).toHex();
cert.signatureOid = forge.asn1.derToOid(capture.certSignatureOid);
cert.signatureParameters = _readSignatureParameters(cert.signatureOid, capture.certSignatureParams, true);
cert.siginfo.algorithmOid = forge.asn1.derToOid(capture.certinfoSignatureOid);
cert.siginfo.parameters = _readSignatureParameters(cert.siginfo.algorithmOid, capture.certinfoSignatureParams, false);
cert.signature = capture.certSignature;
var validity = [];
- if (capture.certValidity1UTCTime !== undefined) {
- validity.push(asn1.utcTimeToDate(capture.certValidity1UTCTime));
- }
- if (capture.certValidity2GeneralizedTime !== undefined) {
- validity.push(asn1.generalizedTimeToDate(capture.certValidity2GeneralizedTime));
- }
- if (capture.certValidity3UTCTime !== undefined) {
- validity.push(asn1.utcTimeToDate(capture.certValidity3UTCTime));
- }
- if (capture.certValidity4GeneralizedTime !== undefined) {
- validity.push(asn1.generalizedTimeToDate(capture.certValidity4GeneralizedTime));
- }
- if (validity.length > 2) {
- throw new Error("Cannot read notBefore/notAfter validity times; more " + "than two times were provided in the certificate.");
- }
- if (validity.length < 2) {
- throw new Error("Cannot read notBefore/notAfter validity times; they " + "were not provided as either UTCTime or GeneralizedTime.");
- }
+ if (capture.certValidity1UTCTime !== void 0) validity.push(asn1.utcTimeToDate(capture.certValidity1UTCTime));
+ if (capture.certValidity2GeneralizedTime !== void 0) validity.push(asn1.generalizedTimeToDate(capture.certValidity2GeneralizedTime));
+ if (capture.certValidity3UTCTime !== void 0) validity.push(asn1.utcTimeToDate(capture.certValidity3UTCTime));
+ if (capture.certValidity4GeneralizedTime !== void 0) validity.push(asn1.generalizedTimeToDate(capture.certValidity4GeneralizedTime));
+ if (validity.length > 2) throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");
+ if (validity.length < 2) throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
cert.validity.notBefore = validity[0];
cert.validity.notAfter = validity[1];
cert.tbsCertificate = capture.tbsCertificate;
@@ -35443,9 +33317,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cert.issuer.attributes.push(attr);
};
cert.issuer.attributes = pki.RDNAttributesAsArray(capture.certIssuer);
- if (capture.certIssuerUniqueId) {
- cert.issuer.uniqueId = capture.certIssuerUniqueId;
- }
+ if (capture.certIssuerUniqueId) cert.issuer.uniqueId = capture.certIssuerUniqueId;
cert.issuer.hash = imd.digest().toHex();
var smd = forge.md.sha1.create();
var sbytes = asn1.toDer(capture.certSubject);
@@ -35458,15 +33330,10 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cert.subject.attributes.push(attr);
};
cert.subject.attributes = pki.RDNAttributesAsArray(capture.certSubject);
- if (capture.certSubjectUniqueId) {
- cert.subject.uniqueId = capture.certSubjectUniqueId;
- }
+ if (capture.certSubjectUniqueId) cert.subject.uniqueId = capture.certSubjectUniqueId;
cert.subject.hash = smd.digest().toHex();
- if (capture.certExtensions) {
- cert.extensions = pki.certificateExtensionsFromAsn1(capture.certExtensions);
- } else {
- cert.extensions = [];
- }
+ if (capture.certExtensions) cert.extensions = pki.certificateExtensionsFromAsn1(capture.certExtensions);
+ else cert.extensions = [];
cert.publicKey = pki.publicKeyFromAsn1(capture.subjectPublicKeyInfo);
return cert;
};
@@ -35529,9 +33396,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = [];
for (var i = 0; i < exts.value.length; ++i) {
var extseq = exts.value[i];
- for (var ei = 0; ei < extseq.value.length; ++ei) {
- rval.push(pki.certificateExtensionFromAsn1(extseq.value[ei]));
- }
+ for (var ei = 0; ei < extseq.value.length; ++ei) rval.push(pki.certificateExtensionFromAsn1(extseq.value[ei]));
}
return rval;
};
@@ -35549,9 +33414,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (ext.value[1].type === asn1.Type.BOOLEAN) {
e.critical = ext.value[1].value.charCodeAt(0) !== 0;
e.value = ext.value[2].value;
- } else {
- e.value = ext.value[1].value;
- }
+ } else e.value = ext.value[1].value;
if (e.id in oids) {
e.name = oids[e.id];
if (e.name === "keyUsage") {
@@ -35573,36 +33436,23 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
e.decipherOnly = (b3 & 128) === 128;
} else if (e.name === "basicConstraints") {
var ev = asn1.fromDer(e.value);
- if (ev.value.length > 0 && ev.value[0].type === asn1.Type.BOOLEAN) {
- e.cA = ev.value[0].value.charCodeAt(0) !== 0;
- } else {
- e.cA = false;
- }
+ if (ev.value.length > 0 && ev.value[0].type === asn1.Type.BOOLEAN) e.cA = ev.value[0].value.charCodeAt(0) !== 0;
+ else e.cA = false;
var value = null;
- if (ev.value.length > 0 && ev.value[0].type === asn1.Type.INTEGER) {
- value = ev.value[0].value;
- } else if (ev.value.length > 1) {
- value = ev.value[1].value;
- }
- if (value !== null) {
- e.pathLenConstraint = asn1.derToInteger(value);
- }
+ if (ev.value.length > 0 && ev.value[0].type === asn1.Type.INTEGER) value = ev.value[0].value;
+ else if (ev.value.length > 1) value = ev.value[1].value;
+ if (value !== null) e.pathLenConstraint = asn1.derToInteger(value);
} else if (e.name === "extKeyUsage") {
var ev = asn1.fromDer(e.value);
for (var vi = 0; vi < ev.value.length; ++vi) {
var oid = asn1.derToOid(ev.value[vi].value);
- if (oid in oids) {
- e[oids[oid]] = true;
- } else {
- e[oid] = true;
- }
+ if (oid in oids) e[oids[oid]] = true;
+ else e[oid] = true;
}
} else if (e.name === "nsCertType") {
var ev = asn1.fromDer(e.value);
var b2 = 0;
- if (ev.value.length > 1) {
- b2 = ev.value.charCodeAt(1);
- }
+ if (ev.value.length > 1) b2 = ev.value.charCodeAt(1);
e.client = (b2 & 128) === 128;
e.server = (b2 & 64) === 64;
e.email = (b2 & 32) === 32;
@@ -35659,14 +33509,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(obj, certificationRequestValidator, capture, errors)) {
- var error = new Error("Cannot read PKCS#10 certificate request. " + "ASN.1 object is not a PKCS#10 CertificationRequest.");
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");
error.errors = errors;
throw error;
}
- var oid = asn1.derToOid(capture.publicKeyOid);
- if (oid !== pki.oids.rsaEncryption) {
- throw new Error("Cannot read public key. OID is not RSA.");
- }
+ if (asn1.derToOid(capture.publicKeyOid) !== pki.oids.rsaEncryption) throw new Error("Cannot read public key. OID is not RSA.");
var csr = pki.createCertificationRequest();
csr.version = capture.csrVersion ? capture.csrVersion.charCodeAt(0) : 0;
csr.signatureOid = forge.asn1.derToOid(capture.csrSignatureOid);
@@ -35767,7 +33614,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
csr.md = md || forge.md.sha1.create();
var algorithmOid = oids[csr.md.algorithm + "WithRSAEncryption"];
if (!algorithmOid) {
- var error = new Error("Could not compute certification request digest. " + "Unknown message digest algorithm OID.");
+ var error = /* @__PURE__ */ new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");
error.algorithm = csr.md.algorithm;
throw error;
}
@@ -35800,13 +33647,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var bytes = asn1.toDer(cri);
md.update(bytes.getBytes());
}
- if (md !== null) {
- rval = _verifySignature({
- certificate: csr,
- md,
- signature: csr.signature
- });
- }
+ if (md !== null) rval = _verifySignature({
+ certificate: csr,
+ md,
+ signature: csr.signature
+ });
return rval;
};
return csr;
@@ -35828,9 +33673,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var valueTagClass = asn1.Type.PRINTABLESTRING;
if ("valueTagClass" in attr) {
valueTagClass = attr.valueTagClass;
- if (valueTagClass === asn1.Type.UTF8) {
- value = forge.util.encodeUtf8(value);
- }
+ if (valueTagClass === asn1.Type.UTF8) value = forge.util.encodeUtf8(value);
}
set = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(attr.type).getBytes()), asn1.create(asn1.Class.UNIVERSAL, valueTagClass, false, value)])]);
rval.value.push(set);
@@ -35838,34 +33681,6 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return rval;
}
/**
- * Gets all printable attributes (typically of an issuer or subject) in a
- * simplified JSON format for display.
- *
- * @param attrs the attributes.
- *
- * @return the JSON for display.
- */
- function _getAttributesAsJson(attrs) {
- var rval = {};
- for (var i = 0; i < attrs.length; ++i) {
- var attr = attrs[i];
- if (attr.shortName && (attr.valueTagClass === asn1.Type.UTF8 || attr.valueTagClass === asn1.Type.PRINTABLESTRING || attr.valueTagClass === asn1.Type.IA5STRING)) {
- var value = attr.value;
- if (attr.valueTagClass === asn1.Type.UTF8) {
- value = forge.util.encodeUtf8(attr.value);
- }
- if (!(attr.shortName in rval)) {
- rval[attr.shortName] = value;
- } else if (forge.util.isArray(rval[attr.shortName])) {
- rval[attr.shortName].push(value);
- } else {
- rval[attr.shortName] = [rval[attr.shortName], value];
- }
- }
- }
- return rval;
- }
- /**
* Fills in missing fields in attributes.
*
* @param attrs the attributes to fill missing fields in.
@@ -35875,38 +33690,28 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (var i = 0; i < attrs.length; ++i) {
attr = attrs[i];
if (typeof attr.name === "undefined") {
- if (attr.type && attr.type in pki.oids) {
- attr.name = pki.oids[attr.type];
- } else if (attr.shortName && attr.shortName in _shortNames) {
- attr.name = pki.oids[_shortNames[attr.shortName]];
- }
+ if (attr.type && attr.type in pki.oids) attr.name = pki.oids[attr.type];
+ else if (attr.shortName && attr.shortName in _shortNames) attr.name = pki.oids[_shortNames[attr.shortName]];
}
- if (typeof attr.type === "undefined") {
- if (attr.name && attr.name in pki.oids) {
- attr.type = pki.oids[attr.name];
- } else {
- var error = new Error("Attribute type not specified.");
- error.attribute = attr;
- throw error;
- }
+ if (typeof attr.type === "undefined") if (attr.name && attr.name in pki.oids) attr.type = pki.oids[attr.name];
+ else {
+ var error = /* @__PURE__ */ new Error("Attribute type not specified.");
+ error.attribute = attr;
+ throw error;
}
if (typeof attr.shortName === "undefined") {
- if (attr.name && attr.name in _shortNames) {
- attr.shortName = _shortNames[attr.name];
- }
+ if (attr.name && attr.name in _shortNames) attr.shortName = _shortNames[attr.name];
}
if (attr.type === oids.extensionRequest) {
attr.valueConstructed = true;
attr.valueTagClass = asn1.Type.SEQUENCE;
if (!attr.value && attr.extensions) {
attr.value = [];
- for (var ei = 0; ei < attr.extensions.length; ++ei) {
- attr.value.push(pki.certificateExtensionToAsn1(_fillMissingExtensionFields(attr.extensions[ei])));
- }
+ for (var ei = 0; ei < attr.extensions.length; ++ei) attr.value.push(pki.certificateExtensionToAsn1(_fillMissingExtensionFields(attr.extensions[ei])));
}
}
if (typeof attr.value === "undefined") {
- var error = new Error("Attribute value not specified.");
+ var error = /* @__PURE__ */ new Error("Attribute value not specified.");
error.attribute = attr;
throw error;
}
@@ -35924,22 +33729,15 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _fillMissingExtensionFields(e, options) {
options = options || {};
if (typeof e.name === "undefined") {
- if (e.id && e.id in pki.oids) {
- e.name = pki.oids[e.id];
- }
- }
- if (typeof e.id === "undefined") {
- if (e.name && e.name in pki.oids) {
- e.id = pki.oids[e.name];
- } else {
- var error = new Error("Extension ID not specified.");
- error.extension = e;
- throw error;
- }
+ if (e.id && e.id in pki.oids) e.name = pki.oids[e.id];
}
- if (typeof e.value !== "undefined") {
- return e;
+ if (typeof e.id === "undefined") if (e.name && e.name in pki.oids) e.id = pki.oids[e.name];
+ else {
+ var error = /* @__PURE__ */ new Error("Extension ID not specified.");
+ error.extension = e;
+ throw error;
}
+ if (typeof e.value !== "undefined") return e;
if (e.name === "keyUsage") {
var unused = 0;
var b2 = 0;
@@ -35981,32 +33779,20 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
unused = 7;
}
var value = String.fromCharCode(unused);
- if (b3 !== 0) {
- value += String.fromCharCode(b2) + String.fromCharCode(b3);
- } else if (b2 !== 0) {
- value += String.fromCharCode(b2);
- }
+ if (b3 !== 0) value += String.fromCharCode(b2) + String.fromCharCode(b3);
+ else if (b2 !== 0) value += String.fromCharCode(b2);
e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, value);
} else if (e.name === "basicConstraints") {
e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
- if (e.cA) {
- e.value.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BOOLEAN, false, String.fromCharCode(255)));
- }
- if ("pathLenConstraint" in e) {
- e.value.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(e.pathLenConstraint).getBytes()));
- }
+ if (e.cA) e.value.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BOOLEAN, false, String.fromCharCode(255)));
+ if ("pathLenConstraint" in e) e.value.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(e.pathLenConstraint).getBytes()));
} else if (e.name === "extKeyUsage") {
e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
var seq = e.value.value;
for (var key in e) {
- if (e[key] !== true) {
- continue;
- }
- if (key in oids) {
- seq.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(oids[key]).getBytes()));
- } else if (key.indexOf(".") !== -1) {
- seq.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(key).getBytes()));
- }
+ if (e[key] !== true) continue;
+ if (key in oids) seq.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(oids[key]).getBytes()));
+ else if (key.indexOf(".") !== -1) seq.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(key).getBytes()));
}
} else if (e.name === "nsCertType") {
var unused = 0;
@@ -36044,9 +33830,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
unused = 0;
}
var value = String.fromCharCode(unused);
- if (b2 !== 0) {
- value += String.fromCharCode(b2);
- }
+ if (b2 !== 0) value += String.fromCharCode(b2);
e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, value);
} else if (e.name === "subjectAltName" || e.name === "issuerAltName") {
e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
@@ -36057,23 +33841,16 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (altName.type === 7 && altName.ip) {
value = forge.util.bytesFromIP(altName.ip);
if (value === null) {
- var error = new Error("Extension \"ip\" value is not a valid IPv4 or IPv6 address.");
+ var error = /* @__PURE__ */ new Error("Extension \"ip\" value is not a valid IPv4 or IPv6 address.");
error.extension = e;
throw error;
}
- } else if (altName.type === 8) {
- if (altName.oid) {
- value = asn1.oidToDer(asn1.oidToDer(altName.oid));
- } else {
- value = asn1.oidToDer(value);
- }
- }
+ } else if (altName.type === 8) if (altName.oid) value = asn1.oidToDer(asn1.oidToDer(altName.oid));
+ else value = asn1.oidToDer(value);
e.value.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, altName.type, false, value));
}
} else if (e.name === "nsComment" && options.cert) {
- if (!/^[\x00-\x7F]*$/.test(e.comment) || e.comment.length < 1 || e.comment.length > 128) {
- throw new Error("Invalid \"nsComment\" content.");
- }
+ if (!/^[\x00-\x7F]*$/.test(e.comment) || e.comment.length < 1 || e.comment.length > 128) throw new Error("Invalid \"nsComment\" content.");
e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.IA5STRING, false, e.comment);
} else if (e.name === "subjectKeyIdentifier" && options.cert) {
var ski = options.cert.generateSubjectKeyIdentifier();
@@ -36106,24 +33883,19 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (altName.type === 7 && altName.ip) {
value = forge.util.bytesFromIP(altName.ip);
if (value === null) {
- var error = new Error("Extension \"ip\" value is not a valid IPv4 or IPv6 address.");
+ var error = /* @__PURE__ */ new Error("Extension \"ip\" value is not a valid IPv4 or IPv6 address.");
error.extension = e;
throw error;
}
- } else if (altName.type === 8) {
- if (altName.oid) {
- value = asn1.oidToDer(asn1.oidToDer(altName.oid));
- } else {
- value = asn1.oidToDer(value);
- }
- }
+ } else if (altName.type === 8) if (altName.oid) value = asn1.oidToDer(asn1.oidToDer(altName.oid));
+ else value = asn1.oidToDer(value);
fullNameGeneralNames.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, altName.type, false, value));
}
subSeq.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [fullNameGeneralNames]));
seq.push(subSeq);
}
if (typeof e.value === "undefined") {
- var error = new Error("Extension value not specified.");
+ var error = /* @__PURE__ */ new Error("Extension value not specified.");
error.extension = e;
throw error;
}
@@ -36140,15 +33912,9 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
switch (oid) {
case oids["RSASSA-PSS"]:
var parts = [];
- if (params.hash.algorithmOid !== undefined) {
- parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(params.hash.algorithmOid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")])]));
- }
- if (params.mgf.algorithmOid !== undefined) {
- parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(params.mgf.algorithmOid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(params.mgf.hash.algorithmOid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")])])]));
- }
- if (params.saltLength !== undefined) {
- parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(params.saltLength).getBytes())]));
- }
+ if (params.hash.algorithmOid !== void 0) parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(params.hash.algorithmOid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")])]));
+ if (params.mgf.algorithmOid !== void 0) parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(params.mgf.algorithmOid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(params.mgf.hash.algorithmOid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")])])]));
+ if (params.saltLength !== void 0) parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(params.saltLength).getBytes())]));
return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, parts);
default: return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "");
}
@@ -36163,31 +33929,23 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _CRIAttributesToAsn1(csr) {
var rval = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, []);
- if (csr.attributes.length === 0) {
- return rval;
- }
+ if (csr.attributes.length === 0) return rval;
var attrs = csr.attributes;
for (var i = 0; i < attrs.length; ++i) {
var attr = attrs[i];
var value = attr.value;
var valueTagClass = asn1.Type.UTF8;
- if ("valueTagClass" in attr) {
- valueTagClass = attr.valueTagClass;
- }
- if (valueTagClass === asn1.Type.UTF8) {
- value = forge.util.encodeUtf8(value);
- }
+ if ("valueTagClass" in attr) valueTagClass = attr.valueTagClass;
+ if (valueTagClass === asn1.Type.UTF8) value = forge.util.encodeUtf8(value);
var valueConstructed = false;
- if ("valueConstructed" in attr) {
- valueConstructed = attr.valueConstructed;
- }
+ if ("valueConstructed" in attr) valueConstructed = attr.valueConstructed;
var seq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(attr.type).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [asn1.create(asn1.Class.UNIVERSAL, valueTagClass, valueConstructed, value)])]);
rval.value.push(seq);
}
return rval;
}
- var jan_1_1950 = new Date("1950-01-01T00:00:00Z");
- var jan_1_2050 = new Date("2050-01-01T00:00:00Z");
+ var jan_1_1950 = /* @__PURE__ */ new Date("1950-01-01T00:00:00Z");
+ var jan_1_2050 = /* @__PURE__ */ new Date("2050-01-01T00:00:00Z");
/**
* Converts a Date object to ASN.1
* Handles the different format before and after 1st January 2050
@@ -36197,11 +33955,8 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the ASN.1 object representing the date.
*/
function _dateToAsn1(date) {
- if (date >= jan_1_1950 && date < jan_1_2050) {
- return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false, asn1.dateToUtcTime(date));
- } else {
- return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.GENERALIZEDTIME, false, asn1.dateToGeneralizedTime(date));
- }
+ if (date >= jan_1_1950 && date < jan_1_2050) return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false, asn1.dateToUtcTime(date));
+ else return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.GENERALIZEDTIME, false, asn1.dateToGeneralizedTime(date));
}
/**
* Gets the ASN.1 TBSCertificate part of an X.509v3 certificate.
@@ -36222,15 +33977,9 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_dnToAsn1(cert.subject),
pki.publicKeyToAsn1(cert.publicKey)
]);
- if (cert.issuer.uniqueId) {
- tbs.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, String.fromCharCode(0) + cert.issuer.uniqueId)]));
- }
- if (cert.subject.uniqueId) {
- tbs.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, String.fromCharCode(0) + cert.subject.uniqueId)]));
- }
- if (cert.extensions.length > 0) {
- tbs.value.push(pki.certificateExtensionsToAsn1(cert.extensions));
- }
+ if (cert.issuer.uniqueId) tbs.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, String.fromCharCode(0) + cert.issuer.uniqueId)]));
+ if (cert.subject.uniqueId) tbs.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, String.fromCharCode(0) + cert.subject.uniqueId)]));
+ if (cert.extensions.length > 0) tbs.value.push(pki.certificateExtensionsToAsn1(cert.extensions));
return tbs;
};
/**
@@ -36242,13 +33991,12 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the asn1 CertificationRequestInfo.
*/
pki.getCertificationRequestInfo = function(csr) {
- var cri = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
+ return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(csr.version).getBytes()),
_dnToAsn1(csr.subject),
pki.publicKeyToAsn1(csr.publicKey),
_CRIAttributesToAsn1(csr)
]);
- return cri;
};
/**
* Converts a DistinguishedName (subject or issuer) to an ASN.1 object.
@@ -36286,9 +34034,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 3, true, []);
var seq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
rval.value.push(seq);
- for (var i = 0; i < exts.length; ++i) {
- seq.value.push(pki.certificateExtensionToAsn1(exts[i]));
- }
+ for (var i = 0; i < exts.length; ++i) seq.value.push(pki.certificateExtensionToAsn1(exts[i]));
return rval;
};
/**
@@ -36301,13 +34047,9 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.certificateExtensionToAsn1 = function(ext) {
var extseq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
extseq.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(ext.id).getBytes()));
- if (ext.critical) {
- extseq.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BOOLEAN, false, String.fromCharCode(255)));
- }
+ if (ext.critical) extseq.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BOOLEAN, false, String.fromCharCode(255)));
var value = ext.value;
- if (typeof ext.value !== "string") {
- value = asn1.toDer(value).getBytes();
- }
+ if (typeof ext.value !== "string") value = asn1.toDer(value).getBytes();
extseq.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, value));
return extseq;
};
@@ -36345,8 +34087,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the parent certificate or null if none was found.
*/
caStore.getIssuer = function(cert) {
- var rval = getBySubject(cert.issuer);
- return rval;
+ return getBySubject(cert.issuer);
};
/**
* Adds a trusted certificate to the store.
@@ -36355,22 +34096,14 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* pki.certificate object or a PEM-formatted certificate).
*/
caStore.addCertificate = function(cert) {
- if (typeof cert === "string") {
- cert = forge.pki.certificateFromPem(cert);
- }
+ if (typeof cert === "string") cert = forge.pki.certificateFromPem(cert);
ensureSubjectHasHash(cert.subject);
- if (!caStore.hasCertificate(cert)) {
- if (cert.subject.hash in caStore.certs) {
- var tmp = caStore.certs[cert.subject.hash];
- if (!forge.util.isArray(tmp)) {
- tmp = [tmp];
- }
- tmp.push(cert);
- caStore.certs[cert.subject.hash] = tmp;
- } else {
- caStore.certs[cert.subject.hash] = cert;
- }
- }
+ if (!caStore.hasCertificate(cert)) if (cert.subject.hash in caStore.certs) {
+ var tmp = caStore.certs[cert.subject.hash];
+ if (!forge.util.isArray(tmp)) tmp = [tmp];
+ tmp.push(cert);
+ caStore.certs[cert.subject.hash] = tmp;
+ } else caStore.certs[cert.subject.hash] = cert;
};
/**
* Checks to see if the given certificate is in the store.
@@ -36381,23 +34114,12 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return true if the certificate is in the store, false if not.
*/
caStore.hasCertificate = function(cert) {
- if (typeof cert === "string") {
- cert = forge.pki.certificateFromPem(cert);
- }
+ if (typeof cert === "string") cert = forge.pki.certificateFromPem(cert);
var match = getBySubject(cert.subject);
- if (!match) {
- return false;
- }
- if (!forge.util.isArray(match)) {
- match = [match];
- }
+ if (!match) return false;
+ if (!forge.util.isArray(match)) match = [match];
var der1 = asn1.toDer(pki.certificateToAsn1(cert)).getBytes();
- for (var i = 0; i < match.length; ++i) {
- var der2 = asn1.toDer(pki.certificateToAsn1(match[i])).getBytes();
- if (der1 === der2) {
- return true;
- }
- }
+ for (var i = 0; i < match.length; ++i) if (der1 === asn1.toDer(pki.certificateToAsn1(match[i])).getBytes()) return true;
return false;
};
/**
@@ -36407,17 +34129,10 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
caStore.listAllCertificates = function() {
var certList = [];
- for (var hash in caStore.certs) {
- if (caStore.certs.hasOwnProperty(hash)) {
- var value = caStore.certs[hash];
- if (!forge.util.isArray(value)) {
- certList.push(value);
- } else {
- for (var i = 0; i < value.length; ++i) {
- certList.push(value[i]);
- }
- }
- }
+ for (var hash in caStore.certs) if (caStore.certs.hasOwnProperty(hash)) {
+ var value = caStore.certs[hash];
+ if (!forge.util.isArray(value)) certList.push(value);
+ else for (var i = 0; i < value.length; ++i) certList.push(value[i]);
}
return certList;
};
@@ -36432,13 +34147,9 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
caStore.removeCertificate = function(cert) {
var result;
- if (typeof cert === "string") {
- cert = forge.pki.certificateFromPem(cert);
- }
+ if (typeof cert === "string") cert = forge.pki.certificateFromPem(cert);
ensureSubjectHasHash(cert.subject);
- if (!caStore.hasCertificate(cert)) {
- return null;
- }
+ if (!caStore.hasCertificate(cert)) return null;
var match = getBySubject(cert.subject);
if (!forge.util.isArray(match)) {
result = caStore.certs[cert.subject.hash];
@@ -36446,16 +34157,11 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return result;
}
var der1 = asn1.toDer(pki.certificateToAsn1(cert)).getBytes();
- for (var i = 0; i < match.length; ++i) {
- var der2 = asn1.toDer(pki.certificateToAsn1(match[i])).getBytes();
- if (der1 === der2) {
- result = match[i];
- match.splice(i, 1);
- }
- }
- if (match.length === 0) {
- delete caStore.certs[cert.subject.hash];
+ for (var i = 0; i < match.length; ++i) if (der1 === asn1.toDer(pki.certificateToAsn1(match[i])).getBytes()) {
+ result = match[i];
+ match.splice(i, 1);
}
+ if (match.length === 0) delete caStore.certs[cert.subject.hash];
return result;
};
function getBySubject(subject) {
@@ -36469,11 +34175,9 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
subject.hash = md.digest().toHex();
}
}
- if (certs) {
- for (var i = 0; i < certs.length; ++i) {
- var cert = certs[i];
- caStore.addCertificate(cert);
- }
+ if (certs) for (var i = 0; i < certs.length; ++i) {
+ var cert = certs[i];
+ caStore.addCertificate(cert);
}
return caStore;
};
@@ -36518,16 +34222,12 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return true if successful, error thrown if not.
*/
pki.verifyCertificateChain = function(caStore, chain, options) {
- if (typeof options === "function") {
- options = { verify: options };
- }
+ if (typeof options === "function") options = { verify: options };
options = options || {};
chain = chain.slice(0);
var certs = chain.slice(0);
var validityCheckDate = options.validityCheckDate;
- if (typeof validityCheckDate === "undefined") {
- validityCheckDate = new Date();
- }
+ if (typeof validityCheckDate === "undefined") validityCheckDate = /* @__PURE__ */ new Date();
var first = true;
var error = null;
var depth = 0;
@@ -36536,15 +34236,13 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var parent = null;
var selfSigned = false;
if (validityCheckDate) {
- if (validityCheckDate < cert.validity.notBefore || validityCheckDate > cert.validity.notAfter) {
- error = {
- message: "Certificate is not valid yet or has expired.",
- error: pki.certificateError.certificate_expired,
- notBefore: cert.validity.notBefore,
- notAfter: cert.validity.notAfter,
- now: validityCheckDate
- };
- }
+ if (validityCheckDate < cert.validity.notBefore || validityCheckDate > cert.validity.notAfter) error = {
+ message: "Certificate is not valid yet or has expired.",
+ error: pki.certificateError.certificate_expired,
+ notBefore: cert.validity.notBefore,
+ notAfter: cert.validity.notAfter,
+ now: validityCheckDate
+ };
}
if (error === null) {
parent = chain[0] || caStore.getIssuer(cert);
@@ -36556,9 +34254,7 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (parent) {
var parents = parent;
- if (!forge.util.isArray(parents)) {
- parents = [parents];
- }
+ if (!forge.util.isArray(parents)) parents = [parents];
var verified = false;
while (!verified && parents.length > 0) {
parent = parents.shift();
@@ -36566,26 +34262,20 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
verified = parent.verify(cert);
} catch (ex) {}
}
- if (!verified) {
- error = {
- message: "Certificate signature is invalid.",
- error: pki.certificateError.bad_certificate
- };
- }
- }
- if (error === null && (!parent || selfSigned) && !caStore.hasCertificate(cert)) {
- error = {
- message: "Certificate is not trusted.",
- error: pki.certificateError.unknown_ca
+ if (!verified) error = {
+ message: "Certificate signature is invalid.",
+ error: pki.certificateError.bad_certificate
};
}
- }
- if (error === null && parent && !cert.isIssuer(parent)) {
- error = {
- message: "Certificate issuer is invalid.",
- error: pki.certificateError.bad_certificate
+ if (error === null && (!parent || selfSigned) && !caStore.hasCertificate(cert)) error = {
+ message: "Certificate is not trusted.",
+ error: pki.certificateError.unknown_ca
};
}
+ if (error === null && parent && !cert.isIssuer(parent)) error = {
+ message: "Certificate issuer is invalid.",
+ error: pki.certificateError.bad_certificate
+ };
if (error === null) {
var se = {
keyUsage: true,
@@ -36593,63 +34283,45 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
for (var i = 0; error === null && i < cert.extensions.length; ++i) {
var ext = cert.extensions[i];
- if (ext.critical && !(ext.name in se)) {
- error = {
- message: "Certificate has an unsupported critical extension.",
- error: pki.certificateError.unsupported_certificate
- };
- }
+ if (ext.critical && !(ext.name in se)) error = {
+ message: "Certificate has an unsupported critical extension.",
+ error: pki.certificateError.unsupported_certificate
+ };
}
}
if (error === null && (!first || chain.length === 0 && (!parent || selfSigned))) {
var bcExt = cert.getExtension("basicConstraints");
var keyUsageExt = cert.getExtension("keyUsage");
if (keyUsageExt !== null) {
- if (!keyUsageExt.keyCertSign || bcExt === null) {
- error = {
- message: "Certificate keyUsage or basicConstraints conflict " + "or indicate that the certificate is not a CA. " + "If the certificate is the only one in the chain or " + "isn't the first then the certificate must be a " + "valid CA.",
- error: pki.certificateError.bad_certificate
- };
- }
- }
- if (error === null && bcExt !== null && !bcExt.cA) {
- error = {
- message: "Certificate basicConstraints indicates the certificate " + "is not a CA.",
+ if (!keyUsageExt.keyCertSign || bcExt === null) error = {
+ message: "Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",
error: pki.certificateError.bad_certificate
};
}
+ if (error === null && bcExt !== null && !bcExt.cA) error = {
+ message: "Certificate basicConstraints indicates the certificate is not a CA.",
+ error: pki.certificateError.bad_certificate
+ };
if (error === null && keyUsageExt !== null && "pathLenConstraint" in bcExt) {
- var pathLen = depth - 1;
- if (pathLen > bcExt.pathLenConstraint) {
- error = {
- message: "Certificate basicConstraints pathLenConstraint violated.",
- error: pki.certificateError.bad_certificate
- };
- }
+ if (depth - 1 > bcExt.pathLenConstraint) error = {
+ message: "Certificate basicConstraints pathLenConstraint violated.",
+ error: pki.certificateError.bad_certificate
+ };
}
}
var vfd = error === null ? true : error.error;
var ret = options.verify ? options.verify(vfd, depth, certs) : vfd;
- if (ret === true) {
- error = null;
- } else {
- if (vfd === true) {
- error = {
- message: "The application rejected the certificate.",
- error: pki.certificateError.bad_certificate
- };
- }
+ if (ret === true) error = null;
+ else {
+ if (vfd === true) error = {
+ message: "The application rejected the certificate.",
+ error: pki.certificateError.bad_certificate
+ };
if (ret || ret === 0) {
if (typeof ret === "object" && !forge.util.isArray(ret)) {
- if (ret.message) {
- error.message = ret.message;
- }
- if (ret.error) {
- error.error = ret.error;
- }
- } else if (typeof ret === "string") {
- error.error = ret;
- }
+ if (ret.message) error.message = ret.message;
+ if (ret.error) error.error = ret.error;
+ } else if (typeof ret === "string") error.error = ret;
}
throw error;
}
@@ -36659,7 +34331,6 @@ var require_x509 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return true;
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pkcs12.js
var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -36946,20 +34617,14 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _getBagsByAttribute(safeContents, attrName, attrValue, bagType) {
var result = [];
- for (var i = 0; i < safeContents.length; i++) {
- for (var j = 0; j < safeContents[i].safeBags.length; j++) {
- var bag = safeContents[i].safeBags[j];
- if (bagType !== undefined && bag.type !== bagType) {
- continue;
- }
- if (attrName === null) {
- result.push(bag);
- continue;
- }
- if (bag.attributes[attrName] !== undefined && bag.attributes[attrName].indexOf(attrValue) >= 0) {
- result.push(bag);
- }
+ for (var i = 0; i < safeContents.length; i++) for (var j = 0; j < safeContents[i].safeBags.length; j++) {
+ var bag = safeContents[i].safeBags[j];
+ if (bagType !== void 0 && bag.type !== bagType) continue;
+ if (attrName === null) {
+ result.push(bag);
+ continue;
}
+ if (bag.attributes[attrName] !== void 0 && bag.attributes[attrName].indexOf(attrValue) >= 0) result.push(bag);
}
return result;
}
@@ -36976,13 +34641,10 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (typeof strict === "string") {
password = strict;
strict = true;
- } else if (strict === undefined) {
- strict = true;
- }
+ } else if (strict === void 0) strict = true;
var capture = {};
- var errors = [];
- if (!asn1.validate(obj, pfxValidator, capture, errors)) {
- var error = new Error("Cannot read PKCS#12 PFX. " + "ASN.1 object is not an PKCS#12 PFX.");
+ if (!asn1.validate(obj, pfxValidator, capture, [])) {
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");
error.errors = error;
throw error;
}
@@ -36992,20 +34654,11 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
getBags: function(filter) {
var rval = {};
var localKeyId;
- if ("localKeyId" in filter) {
- localKeyId = filter.localKeyId;
- } else if ("localKeyIdHex" in filter) {
- localKeyId = forge.util.hexToBytes(filter.localKeyIdHex);
- }
- if (localKeyId === undefined && !("friendlyName" in filter) && "bagType" in filter) {
- rval[filter.bagType] = _getBagsByAttribute(pfx.safeContents, null, null, filter.bagType);
- }
- if (localKeyId !== undefined) {
- rval.localKeyId = _getBagsByAttribute(pfx.safeContents, "localKeyId", localKeyId, filter.bagType);
- }
- if ("friendlyName" in filter) {
- rval.friendlyName = _getBagsByAttribute(pfx.safeContents, "friendlyName", filter.friendlyName, filter.bagType);
- }
+ if ("localKeyId" in filter) localKeyId = filter.localKeyId;
+ else if ("localKeyIdHex" in filter) localKeyId = forge.util.hexToBytes(filter.localKeyIdHex);
+ if (localKeyId === void 0 && !("friendlyName" in filter) && "bagType" in filter) rval[filter.bagType] = _getBagsByAttribute(pfx.safeContents, null, null, filter.bagType);
+ if (localKeyId !== void 0) rval.localKeyId = _getBagsByAttribute(pfx.safeContents, "localKeyId", localKeyId, filter.bagType);
+ if ("friendlyName" in filter) rval.friendlyName = _getBagsByAttribute(pfx.safeContents, "friendlyName", filter.friendlyName, filter.bagType);
return rval;
},
getBagsByFriendlyName: function(friendlyName, bagType) {
@@ -37016,19 +34669,17 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
if (capture.version.charCodeAt(0) !== 3) {
- var error = new Error("PKCS#12 PFX of version other than 3 not supported.");
+ var error = /* @__PURE__ */ new Error("PKCS#12 PFX of version other than 3 not supported.");
error.version = capture.version.charCodeAt(0);
throw error;
}
if (asn1.derToOid(capture.contentType) !== pki.oids.data) {
- var error = new Error("Only PKCS#12 PFX in password integrity mode supported.");
+ var error = /* @__PURE__ */ new Error("Only PKCS#12 PFX in password integrity mode supported.");
error.oid = asn1.derToOid(capture.contentType);
throw error;
}
var data = capture.content.value[0];
- if (data.tagClass !== asn1.Class.UNIVERSAL || data.type !== asn1.Type.OCTETSTRING) {
- throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");
- }
+ if (data.tagClass !== asn1.Class.UNIVERSAL || data.type !== asn1.Type.OCTETSTRING) throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");
data = _decodePkcs7Data(data);
if (capture.mac) {
var md = null;
@@ -37056,19 +34707,14 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
macKeyBytes = 16;
break;
}
- if (md === null) {
- throw new Error("PKCS#12 uses unsupported MAC algorithm: " + macAlgorithm);
- }
+ if (md === null) throw new Error("PKCS#12 uses unsupported MAC algorithm: " + macAlgorithm);
var macSalt = new forge.util.ByteBuffer(capture.macSalt);
var macIterations = "macIterations" in capture ? parseInt(forge.util.bytesToHex(capture.macIterations), 16) : 1;
var macKey = p12.generateKey(password, macSalt, 3, macIterations, macKeyBytes, md);
var mac = forge.hmac.create();
mac.start(md, macKey);
mac.update(data.value);
- var macValue = mac.getMac();
- if (macValue.getBytes() !== capture.macDigest) {
- throw new Error("PKCS#12 MAC could not be verified. Invalid password?");
- }
+ if (mac.getMac().getBytes() !== capture.macDigest) throw new Error("PKCS#12 MAC could not be verified. Invalid password?");
}
_decodeAuthenticatedSafe(pfx, data.value, strict, password);
return pfx;
@@ -37088,9 +34734,7 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _decodePkcs7Data(data) {
if (data.composed || data.constructed) {
var value = forge.util.createBuffer();
- for (var i = 0; i < data.value.length; ++i) {
- value.putBytes(data.value[i].value);
- }
+ for (var i = 0; i < data.value.length; ++i) value.putBytes(data.value[i].value);
data.composed = data.constructed = false;
data.value = value.getBytes();
}
@@ -37108,15 +34752,13 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _decodeAuthenticatedSafe(pfx, authSafe, strict, password) {
authSafe = asn1.fromDer(authSafe, strict);
- if (authSafe.tagClass !== asn1.Class.UNIVERSAL || authSafe.type !== asn1.Type.SEQUENCE || authSafe.constructed !== true) {
- throw new Error("PKCS#12 AuthenticatedSafe expected to be a " + "SEQUENCE OF ContentInfo");
- }
+ if (authSafe.tagClass !== asn1.Class.UNIVERSAL || authSafe.type !== asn1.Type.SEQUENCE || authSafe.constructed !== true) throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
for (var i = 0; i < authSafe.value.length; i++) {
var contentInfo = authSafe.value[i];
var capture = {};
var errors = [];
if (!asn1.validate(contentInfo, contentInfoValidator, capture, errors)) {
- var error = new Error("Cannot read ContentInfo.");
+ var error = /* @__PURE__ */ new Error("Cannot read ContentInfo.");
error.errors = errors;
throw error;
}
@@ -37125,9 +34767,7 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var data = capture.content.value[0];
switch (asn1.derToOid(capture.contentType)) {
case pki.oids.data:
- if (data.tagClass !== asn1.Class.UNIVERSAL || data.type !== asn1.Type.OCTETSTRING) {
- throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");
- }
+ if (data.tagClass !== asn1.Class.UNIVERSAL || data.type !== asn1.Type.OCTETSTRING) throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");
safeContents = _decodePkcs7Data(data).value;
break;
case pki.oids.encryptedData:
@@ -37135,7 +34775,7 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
obj.encrypted = true;
break;
default:
- var error = new Error("Unsupported PKCS#12 contentType.");
+ var error = /* @__PURE__ */ new Error("Unsupported PKCS#12 contentType.");
error.contentType = asn1.derToOid(capture.contentType);
throw error;
}
@@ -37155,13 +34795,13 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {
- var error = new Error("Cannot read EncryptedContentInfo.");
+ var error = /* @__PURE__ */ new Error("Cannot read EncryptedContentInfo.");
error.errors = errors;
throw error;
}
var oid = asn1.derToOid(capture.contentType);
if (oid !== pki.oids.data) {
- var error = new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");
+ var error = /* @__PURE__ */ new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");
error.oid = oid;
throw error;
}
@@ -37170,9 +34810,7 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);
var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);
cipher.update(encrypted);
- if (!cipher.finish()) {
- throw new Error("Failed to decrypt PKCS#12 SafeContents.");
- }
+ if (!cipher.finish()) throw new Error("Failed to decrypt PKCS#12 SafeContents.");
return cipher.output.getBytes();
}
/**
@@ -37187,20 +34825,16 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return {Array} Array of Bag objects.
*/
function _decodeSafeContents(safeContents, strict, password) {
- if (!strict && safeContents.length === 0) {
- return [];
- }
+ if (!strict && safeContents.length === 0) return [];
safeContents = asn1.fromDer(safeContents, strict);
- if (safeContents.tagClass !== asn1.Class.UNIVERSAL || safeContents.type !== asn1.Type.SEQUENCE || safeContents.constructed !== true) {
- throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");
- }
+ if (safeContents.tagClass !== asn1.Class.UNIVERSAL || safeContents.type !== asn1.Type.SEQUENCE || safeContents.constructed !== true) throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");
var res = [];
for (var i = 0; i < safeContents.value.length; i++) {
var safeBag = safeContents.value[i];
var capture = {};
var errors = [];
if (!asn1.validate(safeBag, safeBagValidator, capture, errors)) {
- var error = new Error("Cannot read SafeBag.");
+ var error = /* @__PURE__ */ new Error("Cannot read SafeBag.");
error.errors = errors;
throw error;
}
@@ -37214,9 +34848,7 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
switch (bag.type) {
case pki.oids.pkcs8ShroudedKeyBag:
bagAsn1 = pki.decryptPrivateKeyInfo(bagAsn1, password);
- if (bagAsn1 === null) {
- throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");
- }
+ if (bagAsn1 === null) throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");
case pki.oids.keyBag:
try {
bag.key = pki.privateKeyFromAsn1(bagAsn1);
@@ -37229,7 +34861,7 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
validator = certBagValidator;
decoder = function() {
if (asn1.derToOid(capture.certId) !== pki.oids.x509Certificate) {
- var error = new Error("Unsupported certificate type, only X.509 supported.");
+ var error = /* @__PURE__ */ new Error("Unsupported certificate type, only X.509 supported.");
error.oid = asn1.derToOid(capture.certId);
throw error;
}
@@ -37243,12 +34875,12 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
break;
default:
- var error = new Error("Unsupported PKCS#12 SafeBag type.");
+ var error = /* @__PURE__ */ new Error("Unsupported PKCS#12 SafeBag type.");
error.oid = bag.type;
throw error;
}
- if (validator !== undefined && !asn1.validate(bagAsn1, validator, capture, errors)) {
- var error = new Error("Cannot read PKCS#12 " + validator.name);
+ if (validator !== void 0 && !asn1.validate(bagAsn1, validator, capture, errors)) {
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS#12 " + validator.name);
error.errors = errors;
throw error;
}
@@ -37265,24 +34897,18 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _decodeBagAttributes(attributes) {
var decodedAttrs = {};
- if (attributes !== undefined) {
- for (var i = 0; i < attributes.length; ++i) {
- var capture = {};
- var errors = [];
- if (!asn1.validate(attributes[i], attributeValidator, capture, errors)) {
- var error = new Error("Cannot read PKCS#12 BagAttribute.");
- error.errors = errors;
- throw error;
- }
- var oid = asn1.derToOid(capture.oid);
- if (pki.oids[oid] === undefined) {
- continue;
- }
- decodedAttrs[pki.oids[oid]] = [];
- for (var j = 0; j < capture.values.length; ++j) {
- decodedAttrs[pki.oids[oid]].push(capture.values[j].value);
- }
+ if (attributes !== void 0) for (var i = 0; i < attributes.length; ++i) {
+ var capture = {};
+ var errors = [];
+ if (!asn1.validate(attributes[i], attributeValidator, capture, errors)) {
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS#12 BagAttribute.");
+ error.errors = errors;
+ throw error;
}
+ var oid = asn1.derToOid(capture.oid);
+ if (pki.oids[oid] === void 0) continue;
+ decodedAttrs[pki.oids[oid]] = [];
+ for (var j = 0; j < capture.values.length; ++j) decodedAttrs[pki.oids[oid]].push(capture.values[j].value);
}
return decodedAttrs;
}
@@ -37320,58 +34946,32 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
options.saltSize = options.saltSize || 8;
options.count = options.count || 2048;
options.algorithm = options.algorithm || options.encAlgorithm || "aes128";
- if (!("useMac" in options)) {
- options.useMac = true;
- }
- if (!("localKeyId" in options)) {
- options.localKeyId = null;
- }
- if (!("generateLocalKeyId" in options)) {
- options.generateLocalKeyId = true;
- }
+ if (!("useMac" in options)) options.useMac = true;
+ if (!("localKeyId" in options)) options.localKeyId = null;
+ if (!("generateLocalKeyId" in options)) options.generateLocalKeyId = true;
var localKeyId = options.localKeyId;
var bagAttrs;
- if (localKeyId !== null) {
- localKeyId = forge.util.hexToBytes(localKeyId);
- } else if (options.generateLocalKeyId) {
- if (cert) {
- var pairedCert = forge.util.isArray(cert) ? cert[0] : cert;
- if (typeof pairedCert === "string") {
- pairedCert = pki.certificateFromPem(pairedCert);
- }
- var sha1 = forge.md.sha1.create();
- sha1.update(asn1.toDer(pki.certificateToAsn1(pairedCert)).getBytes());
- localKeyId = sha1.digest().getBytes();
- } else {
- localKeyId = forge.random.getBytes(20);
- }
- }
+ if (localKeyId !== null) localKeyId = forge.util.hexToBytes(localKeyId);
+ else if (options.generateLocalKeyId) if (cert) {
+ var pairedCert = forge.util.isArray(cert) ? cert[0] : cert;
+ if (typeof pairedCert === "string") pairedCert = pki.certificateFromPem(pairedCert);
+ var sha1 = forge.md.sha1.create();
+ sha1.update(asn1.toDer(pki.certificateToAsn1(pairedCert)).getBytes());
+ localKeyId = sha1.digest().getBytes();
+ } else localKeyId = forge.random.getBytes(20);
var attrs = [];
- if (localKeyId !== null) {
- attrs.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.localKeyId).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, localKeyId)])]));
- }
- if ("friendlyName" in options) {
- attrs.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.friendlyName).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BMPSTRING, false, options.friendlyName)])]));
- }
- if (attrs.length > 0) {
- bagAttrs = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, attrs);
- }
+ if (localKeyId !== null) attrs.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.localKeyId).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, localKeyId)])]));
+ if ("friendlyName" in options) attrs.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.friendlyName).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BMPSTRING, false, options.friendlyName)])]));
+ if (attrs.length > 0) bagAttrs = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, attrs);
var contents = [];
var chain = [];
- if (cert !== null) {
- if (forge.util.isArray(cert)) {
- chain = cert;
- } else {
- chain = [cert];
- }
- }
+ if (cert !== null) if (forge.util.isArray(cert)) chain = cert;
+ else chain = [cert];
var certSafeBags = [];
for (var i = 0; i < chain.length; ++i) {
cert = chain[i];
- if (typeof cert === "string") {
- cert = pki.certificateFromPem(cert);
- }
- var certBagAttrs = i === 0 ? bagAttrs : undefined;
+ if (typeof cert === "string") cert = pki.certificateFromPem(cert);
+ var certBagAttrs = i === 0 ? bagAttrs : void 0;
var certAsn1 = pki.certificateToAsn1(cert);
var certSafeBag = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.certBag).getBytes()),
@@ -37388,19 +34988,16 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var keyBag = null;
if (key !== null) {
var pkAsn1 = pki.wrapRsaPrivateKey(pki.privateKeyToAsn1(key));
- if (password === null) {
- keyBag = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
- asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.keyBag).getBytes()),
- asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [pkAsn1]),
- bagAttrs
- ]);
- } else {
- keyBag = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
- asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.pkcs8ShroudedKeyBag).getBytes()),
- asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [pki.encryptPrivateKeyInfo(pkAsn1, password, options)]),
- bagAttrs
- ]);
- }
+ if (password === null) keyBag = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
+ asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.keyBag).getBytes()),
+ asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [pkAsn1]),
+ bagAttrs
+ ]);
+ else keyBag = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
+ asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.pkcs8ShroudedKeyBag).getBytes()),
+ asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [pki.encryptPrivateKeyInfo(pkAsn1, password, options)]),
+ bagAttrs
+ ]);
var keySafeContents = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [keyBag]);
var keyCI = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(pki.oids.data).getBytes()), asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, asn1.toDer(keySafeContents).getBytes())])]);
contents.push(keyCI);
@@ -37443,7 +35040,6 @@ var require_pkcs12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
p12.generateKey = forge.pbe.generatePkcs12Key;
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pki.js
var require_pki = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -37479,9 +35075,7 @@ var require_pki = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
pki.pemToDer = function(pem) {
var msg = forge.pem.decode(pem)[0];
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert PEM to DER; PEM is encrypted.");
- }
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert PEM to DER; PEM is encrypted.");
return forge.util.createBuffer(msg.body);
};
/**
@@ -37494,13 +35088,11 @@ var require_pki = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pki.privateKeyFromPem = function(pem) {
var msg = forge.pem.decode(pem)[0];
if (msg.type !== "PRIVATE KEY" && msg.type !== "RSA PRIVATE KEY") {
- var error = new Error("Could not convert private key from PEM; PEM " + "header type is not \"PRIVATE KEY\" or \"RSA PRIVATE KEY\".");
+ var error = /* @__PURE__ */ new Error("Could not convert private key from PEM; PEM header type is not \"PRIVATE KEY\" or \"RSA PRIVATE KEY\".");
error.headerType = msg.type;
throw error;
}
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert private key from PEM; PEM is encrypted.");
- }
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert private key from PEM; PEM is encrypted.");
var obj = asn1.fromDer(msg.body);
return pki.privateKeyFromAsn1(obj);
};
@@ -37535,7 +35127,6 @@ var require_pki = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return forge.pem.encode(msg, { maxline });
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/tls.js
var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -38012,7 +35603,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* Maximum fragment size. True maximum is 16384, but we fragment before that
* to allow for unusual small increases during compression.
*/
- tls.MaxFragment = 16384 - 1024;
+ tls.MaxFragment = 15360;
/**
* Whether this entity is considered the "client" or "server".
* enum { server, client } ConnectionEnd;
@@ -38211,17 +35802,14 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param record the record.
*/
tls.handleUnexpected = function(c, record) {
- var ignore = !c.open && c.entity === tls.ConnectionEnd.client;
- if (!ignore) {
- c.error(c, {
- message: "Unexpected message. Received TLS record out of order.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.unexpected_message
- }
- });
- }
+ if (!(!c.open && c.entity === tls.ConnectionEnd.client)) c.error(c, {
+ message: "Unexpected message. Received TLS record out of order.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.unexpected_message
+ }
+ });
};
/**
* Called when a client receives a HelloRequest record.
@@ -38250,16 +35838,15 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
tls.parseHelloMessage = function(c, record, length) {
var msg = null;
var client = c.entity === tls.ConnectionEnd.client;
- if (length < 38) {
- c.error(c, {
- message: client ? "Invalid ServerHello message. Message too short." : "Invalid ClientHello message. Message too short.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.illegal_parameter
- }
- });
- } else {
+ if (length < 38) c.error(c, {
+ message: client ? "Invalid ServerHello message. Message too short." : "Invalid ClientHello message. Message too short.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.illegal_parameter
+ }
+ });
+ else {
var b = record.fragment;
var remaining = b.length();
msg = {
@@ -38281,67 +35868,50 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
remaining = length - (remaining - b.length());
if (remaining > 0) {
var exts = readVector(b, 2);
- while (exts.length() > 0) {
- msg.extensions.push({
- type: [exts.getByte(), exts.getByte()],
- data: readVector(exts, 2)
- });
- }
- if (!client) {
- for (var i = 0; i < msg.extensions.length; ++i) {
- var ext = msg.extensions[i];
- if (ext.type[0] === 0 && ext.type[1] === 0) {
- var snl = readVector(ext.data, 2);
- while (snl.length() > 0) {
- var snType = snl.getByte();
- if (snType !== 0) {
- break;
- }
- c.session.extensions.server_name.serverNameList.push(readVector(snl, 2).getBytes());
- }
+ while (exts.length() > 0) msg.extensions.push({
+ type: [exts.getByte(), exts.getByte()],
+ data: readVector(exts, 2)
+ });
+ if (!client) for (var i = 0; i < msg.extensions.length; ++i) {
+ var ext = msg.extensions[i];
+ if (ext.type[0] === 0 && ext.type[1] === 0) {
+ var snl = readVector(ext.data, 2);
+ while (snl.length() > 0) {
+ if (snl.getByte() !== 0) break;
+ c.session.extensions.server_name.serverNameList.push(readVector(snl, 2).getBytes());
}
}
}
}
if (c.session.version) {
- if (msg.version.major !== c.session.version.major || msg.version.minor !== c.session.version.minor) {
- return c.error(c, {
- message: "TLS version change is disallowed during renegotiation.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.protocol_version
- }
- });
- }
- }
- if (client) {
- c.session.cipherSuite = tls.getCipherSuite(msg.cipher_suite);
- } else {
- var tmp = forge.util.createBuffer(msg.cipher_suites.bytes());
- while (tmp.length() > 0) {
- c.session.cipherSuite = tls.getCipherSuite(tmp.getBytes(2));
- if (c.session.cipherSuite !== null) {
- break;
- }
- }
- }
- if (c.session.cipherSuite === null) {
- return c.error(c, {
- message: "No cipher suites in common.",
+ if (msg.version.major !== c.session.version.major || msg.version.minor !== c.session.version.minor) return c.error(c, {
+ message: "TLS version change is disallowed during renegotiation.",
send: true,
alert: {
level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.handshake_failure
- },
- cipherSuite: forge.util.bytesToHex(msg.cipher_suite)
+ description: tls.Alert.Description.protocol_version
+ }
});
}
- if (client) {
- c.session.compressionMethod = msg.compression_method;
- } else {
- c.session.compressionMethod = tls.CompressionMethod.none;
+ if (client) c.session.cipherSuite = tls.getCipherSuite(msg.cipher_suite);
+ else {
+ var tmp = forge.util.createBuffer(msg.cipher_suites.bytes());
+ while (tmp.length() > 0) {
+ c.session.cipherSuite = tls.getCipherSuite(tmp.getBytes(2));
+ if (c.session.cipherSuite !== null) break;
+ }
}
+ if (c.session.cipherSuite === null) return c.error(c, {
+ message: "No cipher suites in common.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.handshake_failure
+ },
+ cipherSuite: forge.util.bytesToHex(msg.cipher_suite)
+ });
+ if (client) c.session.compressionMethod = msg.compression_method;
+ else c.session.compressionMethod = tls.CompressionMethod.none;
}
return msg;
};
@@ -38405,21 +35975,16 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
tls.handleServerHello = function(c, record, length) {
var msg = tls.parseHelloMessage(c, record, length);
- if (c.fail) {
- return;
- }
- if (msg.version.minor <= c.version.minor) {
- c.version.minor = msg.version.minor;
- } else {
- return c.error(c, {
- message: "Incompatible TLS version.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.protocol_version
- }
- });
- }
+ if (c.fail) return;
+ if (msg.version.minor <= c.version.minor) c.version.minor = msg.version.minor;
+ else return c.error(c, {
+ message: "Incompatible TLS version.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.protocol_version
+ }
+ });
c.session.version = c.version;
var sessionId = msg.session_id.bytes();
if (sessionId.length > 0 && sessionId === c.session.id) {
@@ -38449,23 +36014,18 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
tls.handleClientHello = function(c, record, length) {
var msg = tls.parseHelloMessage(c, record, length);
- if (c.fail) {
- return;
- }
+ if (c.fail) return;
var sessionId = msg.session_id.bytes();
var session = null;
if (c.sessionCache) {
session = c.sessionCache.getSession(sessionId);
- if (session === null) {
- sessionId = "";
- } else if (session.version.major !== msg.version.major || session.version.minor > msg.version.minor) {
+ if (session === null) sessionId = "";
+ else if (session.version.major !== msg.version.major || session.version.minor > msg.version.minor) {
session = null;
sessionId = "";
}
}
- if (sessionId.length === 0) {
- sessionId = forge.random.getBytes(32);
- }
+ if (sessionId.length === 0) sessionId = forge.random.getBytes(32);
c.session.id = sessionId;
c.session.clientHelloVersion = msg.version;
c.session.sp = {};
@@ -38476,9 +36036,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var version;
for (var i = 1; i < tls.SupportedVersions.length; ++i) {
version = tls.SupportedVersions[i];
- if (version.minor <= msg.version.minor) {
- break;
- }
+ if (version.minor <= msg.version.minor) break;
}
c.version = {
major: version.major,
@@ -38521,12 +36079,10 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
type: tls.ContentType.handshake,
data: tls.createServerKeyExchange(c)
}));
- if (c.verifyClient !== false) {
- tls.queue(c, tls.createRecord(c, {
- type: tls.ContentType.handshake,
- data: tls.createCertificateRequest(c)
- }));
- }
+ if (c.verifyClient !== false) tls.queue(c, tls.createRecord(c, {
+ type: tls.ContentType.handshake,
+ data: tls.createCertificateRequest(c)
+ }));
tls.queue(c, tls.createRecord(c, {
type: tls.ContentType.handshake,
data: tls.createServerHelloDone(c)
@@ -38562,16 +36118,14 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param length the length of the handshake message.
*/
tls.handleCertificate = function(c, record, length) {
- if (length < 3) {
- return c.error(c, {
- message: "Invalid Certificate message. Message too short.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.illegal_parameter
- }
- });
- }
+ if (length < 3) return c.error(c, {
+ message: "Invalid Certificate message. Message too short.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.illegal_parameter
+ }
+ });
var b = record.fragment;
var msg = { certificate_list: readVector(b, 3) };
var cert, asn1;
@@ -38595,26 +36149,19 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
}
var client = c.entity === tls.ConnectionEnd.client;
- if ((client || c.verifyClient === true) && certs.length === 0) {
- c.error(c, {
- message: client ? "No server certificate provided." : "No client certificate provided.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.illegal_parameter
- }
- });
- } else if (certs.length === 0) {
- c.expect = client ? SKE : CKE;
- } else {
- if (client) {
- c.session.serverCertificate = certs[0];
- } else {
- c.session.clientCertificate = certs[0];
- }
- if (tls.verifyCertificateChain(c, certs)) {
- c.expect = client ? SKE : CKE;
+ if ((client || c.verifyClient === true) && certs.length === 0) c.error(c, {
+ message: client ? "No server certificate provided." : "No client certificate provided.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.illegal_parameter
}
+ });
+ else if (certs.length === 0) c.expect = client ? SKE : CKE;
+ else {
+ if (client) c.session.serverCertificate = certs[0];
+ else c.session.clientCertificate = certs[0];
+ if (tls.verifyCertificateChain(c, certs)) c.expect = client ? SKE : CKE;
}
c.process();
};
@@ -38671,16 +36218,14 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param length the length of the handshake message.
*/
tls.handleServerKeyExchange = function(c, record, length) {
- if (length > 0) {
- return c.error(c, {
- message: "Invalid key parameters. Only RSA is supported.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.unsupported_certificate
- }
- });
- }
+ if (length > 0) return c.error(c, {
+ message: "Invalid key parameters. Only RSA is supported.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.unsupported_certificate
+ }
+ });
c.expect = SCR;
c.process();
};
@@ -38692,38 +36237,24 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param length the length of the handshake message.
*/
tls.handleClientKeyExchange = function(c, record, length) {
- if (length < 48) {
- return c.error(c, {
- message: "Invalid key parameters. Only RSA is supported.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.unsupported_certificate
- }
- });
- }
+ if (length < 48) return c.error(c, {
+ message: "Invalid key parameters. Only RSA is supported.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.unsupported_certificate
+ }
+ });
var b = record.fragment;
var msg = { enc_pre_master_secret: readVector(b, 2).getBytes() };
var privateKey = null;
- if (c.getPrivateKey) {
- try {
- privateKey = c.getPrivateKey(c, c.session.serverCertificate);
- privateKey = forge.pki.privateKeyFromPem(privateKey);
- } catch (ex) {
- c.error(c, {
- message: "Could not get private key.",
- cause: ex,
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.internal_error
- }
- });
- }
- }
- if (privateKey === null) {
- return c.error(c, {
- message: "No private key set.",
+ if (c.getPrivateKey) try {
+ privateKey = c.getPrivateKey(c, c.session.serverCertificate);
+ privateKey = forge.pki.privateKeyFromPem(privateKey);
+ } catch (ex) {
+ c.error(c, {
+ message: "Could not get private key.",
+ cause: ex,
send: true,
alert: {
level: tls.Alert.Level.fatal,
@@ -38731,20 +36262,24 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
});
}
+ if (privateKey === null) return c.error(c, {
+ message: "No private key set.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.internal_error
+ }
+ });
try {
var sp = c.session.sp;
sp.pre_master_secret = privateKey.decrypt(msg.enc_pre_master_secret);
var version = c.session.clientHelloVersion;
- if (version.major !== sp.pre_master_secret.charCodeAt(0) || version.minor !== sp.pre_master_secret.charCodeAt(1)) {
- throw new Error("TLS version rollback attack detected.");
- }
+ if (version.major !== sp.pre_master_secret.charCodeAt(0) || version.minor !== sp.pre_master_secret.charCodeAt(1)) throw new Error("TLS version rollback attack detected.");
} catch (ex) {
sp.pre_master_secret = forge.random.getBytes(48);
}
c.expect = CCC;
- if (c.session.clientCertificate !== null) {
- c.expect = CCV;
- }
+ if (c.session.clientCertificate !== null) c.expect = CCV;
c.process();
};
/**
@@ -38775,16 +36310,14 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param length the length of the handshake message.
*/
tls.handleCertificateRequest = function(c, record, length) {
- if (length < 3) {
- return c.error(c, {
- message: "Invalid CertificateRequest. Message too short.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.illegal_parameter
- }
- });
- }
+ if (length < 3) return c.error(c, {
+ message: "Invalid CertificateRequest. Message too short.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.illegal_parameter
+ }
+ });
var b = record.fragment;
var msg = {
certificate_types: readVector(b, 1),
@@ -38802,16 +36335,14 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param length the length of the handshake message.
*/
tls.handleCertificateVerify = function(c, record, length) {
- if (length < 2) {
- return c.error(c, {
- message: "Invalid CertificateVerify. Message too short.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.illegal_parameter
- }
- });
- }
+ if (length < 2) return c.error(c, {
+ message: "Invalid CertificateVerify. Message too short.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.illegal_parameter
+ }
+ });
var b = record.fragment;
b.read -= 4;
var msgBytes = b.bytes();
@@ -38822,10 +36353,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
verify.putBuffer(c.session.sha1.digest());
verify = verify.getBytes();
try {
- var cert = c.session.clientCertificate;
- if (!cert.publicKey.verify(verify, msg.signature, "NONE")) {
- throw new Error("CertificateVerify signature does not match.");
- }
+ if (!c.session.clientCertificate.publicKey.verify(verify, msg.signature, "NONE")) throw new Error("CertificateVerify signature does not match.");
c.session.md5.update(msgBytes);
c.session.sha1.update(msgBytes);
} catch (ex) {
@@ -38865,16 +36393,14 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param length the length of the handshake message.
*/
tls.handleServerHelloDone = function(c, record, length) {
- if (length > 0) {
- return c.error(c, {
- message: "Invalid ServerHelloDone message. Invalid length.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.record_overflow
- }
- });
- }
+ if (length > 0) return c.error(c, {
+ message: "Invalid ServerHelloDone message. Invalid length.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.record_overflow
+ }
+ });
if (c.serverCertificate === null) {
var error = {
message: "No server certificate provided. Not enough security.",
@@ -38884,20 +36410,13 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
description: tls.Alert.Description.insufficient_security
}
};
- var depth = 0;
- var ret = c.verify(c, error.alert.description, depth, []);
+ var ret = c.verify(c, error.alert.description, 0, []);
if (ret !== true) {
if (ret || ret === 0) {
if (typeof ret === "object" && !forge.util.isArray(ret)) {
- if (ret.message) {
- error.message = ret.message;
- }
- if (ret.alert) {
- error.alert.description = ret.alert;
- }
- } else if (typeof ret === "number") {
- error.alert.description = ret;
- }
+ if (ret.message) error.message = ret.message;
+ if (ret.alert) error.alert.description = ret.alert;
+ } else if (typeof ret === "number") error.alert.description = ret;
}
return c.error(c, error);
}
@@ -38916,12 +36435,10 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
tls.queue(c, record);
c.expect = SER;
var callback = function(c, signature) {
- if (c.session.certificateRequest !== null && c.session.clientCertificate !== null) {
- tls.queue(c, tls.createRecord(c, {
- type: tls.ContentType.handshake,
- data: tls.createCertificateVerify(c, signature)
- }));
- }
+ if (c.session.certificateRequest !== null && c.session.clientCertificate !== null) tls.queue(c, tls.createRecord(c, {
+ type: tls.ContentType.handshake,
+ data: tls.createCertificateVerify(c, signature)
+ }));
tls.queue(c, tls.createRecord(c, {
type: tls.ContentType.change_cipher_spec,
data: tls.createChangeCipherSpec()
@@ -38936,9 +36453,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
tls.flush(c);
c.process();
};
- if (c.session.certificateRequest === null || c.session.clientCertificate === null) {
- return callback(c, null);
- }
+ if (c.session.certificateRequest === null || c.session.clientCertificate === null) return callback(c, null);
tls.getClientSignature(c, callback);
};
/**
@@ -38948,24 +36463,18 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param record the record.
*/
tls.handleChangeCipherSpec = function(c, record) {
- if (record.fragment.getByte() !== 1) {
- return c.error(c, {
- message: "Invalid ChangeCipherSpec message received.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.illegal_parameter
- }
- });
- }
+ if (record.fragment.getByte() !== 1) return c.error(c, {
+ message: "Invalid ChangeCipherSpec message received.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.illegal_parameter
+ }
+ });
var client = c.entity === tls.ConnectionEnd.client;
- if (c.session.resuming && client || !c.session.resuming && !client) {
- c.state.pending = tls.createConnectionState(c);
- }
+ if (c.session.resuming && client || !c.session.resuming && !client) c.state.pending = tls.createConnectionState(c);
c.state.current.read = c.state.pending.read;
- if (!c.session.resuming && client || c.session.resuming && !client) {
- c.state.pending = null;
- }
+ if (!c.session.resuming && client || c.session.resuming && !client) c.state.pending = null;
c.expect = client ? SFI : CFI;
c.process();
};
@@ -39020,19 +36529,15 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var client = c.entity === tls.ConnectionEnd.client;
var label = client ? "server finished" : "client finished";
var sp = c.session.sp;
- var vdl = 12;
- var prf = prf_TLS1;
- b = prf(sp.master_secret, label, b.getBytes(), vdl);
- if (b.getBytes() !== vd) {
- return c.error(c, {
- message: "Invalid verify_data in Finished message.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.decrypt_error
- }
- });
- }
+ b = prf_TLS1(sp.master_secret, label, b.getBytes(), 12);
+ if (b.getBytes() !== vd) return c.error(c, {
+ message: "Invalid verify_data in Finished message.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.decrypt_error
+ }
+ });
c.session.md5.update(msgBytes);
c.session.sha1.update(msgBytes);
if (c.session.resuming && client || !c.session.resuming && !client) {
@@ -39143,9 +36648,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
msg = "Unknown error.";
break;
}
- if (alert.description === tls.Alert.Description.close_notify) {
- return c.close();
- }
+ if (alert.description === tls.Alert.Description.close_notify) return c.close();
c.error(c, {
message: msg,
send: false,
@@ -39193,9 +36696,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
c.session.sha1.update(bytes);
}
hsTable[c.entity][c.expect][type](c, record, length);
- } else {
- tls.handleUnexpected(c, record);
- }
+ } else tls.handleUnexpected(c, record);
};
/**
* Called when an ApplicationData record is received.
@@ -39220,21 +36721,15 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var length = b.getInt16();
var payload = b.getBytes(length);
if (type === tls.HeartbeatMessageType.heartbeat_request) {
- if (c.handshaking || length > payload.length) {
- return c.process();
- }
+ if (c.handshaking || length > payload.length) return c.process();
tls.queue(c, tls.createRecord(c, {
type: tls.ContentType.heartbeat,
data: tls.createHeartbeat(tls.HeartbeatMessageType.heartbeat_response, payload)
}));
tls.flush(c);
} else if (type === tls.HeartbeatMessageType.heartbeat_response) {
- if (payload !== c.expectedHeartbeatPayload) {
- return c.process();
- }
- if (c.heartbeatReceived) {
- c.heartbeatReceived(c, forge.util.createBuffer(payload));
- }
+ if (payload !== c.expectedHeartbeatPayload) return c.process();
+ if (c.heartbeatReceived) c.heartbeatReceived(c, forge.util.createBuffer(payload));
}
c.process();
};
@@ -39930,9 +37425,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
random = sp.server_random + sp.client_random;
var length = 2 * sp.mac_key_length + 2 * sp.enc_key_length;
var tls10 = c.version.major === tls.Versions.TLS_1_0.major && c.version.minor === tls.Versions.TLS_1_0.minor;
- if (tls10) {
- length += 2 * sp.fixed_iv_length;
- }
+ if (tls10) length += 2 * sp.fixed_iv_length;
var km = prf(sp.master_secret, "key expansion", random, length);
var rval = {
client_write_MAC_key: km.getBytes(sp.mac_key_length),
@@ -39996,9 +37489,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (mode.sequenceNumber[1] === 4294967295) {
mode.sequenceNumber[1] = 0;
++mode.sequenceNumber[0];
- } else {
- ++mode.sequenceNumber[1];
- }
+ } else ++mode.sequenceNumber[1];
}
};
return mode;
@@ -40008,47 +37499,41 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
write: createMode()
};
state.read.update = function(c, record) {
- if (!state.read.cipherFunction(record, state.read)) {
- c.error(c, {
- message: "Could not decrypt record or bad MAC.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.bad_record_mac
- }
- });
- } else if (!state.read.compressFunction(c, record, state.read)) {
- c.error(c, {
- message: "Could not decompress record.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.decompression_failure
- }
- });
- }
+ if (!state.read.cipherFunction(record, state.read)) c.error(c, {
+ message: "Could not decrypt record or bad MAC.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.bad_record_mac
+ }
+ });
+ else if (!state.read.compressFunction(c, record, state.read)) c.error(c, {
+ message: "Could not decompress record.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.decompression_failure
+ }
+ });
return !c.fail;
};
state.write.update = function(c, record) {
- if (!state.write.compressFunction(c, record, state.write)) {
- c.error(c, {
- message: "Could not compress record.",
- send: false,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.internal_error
- }
- });
- } else if (!state.write.cipherFunction(record, state.write)) {
- c.error(c, {
- message: "Could not encrypt record.",
- send: false,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.internal_error
- }
- });
- }
+ if (!state.write.compressFunction(c, record, state.write)) c.error(c, {
+ message: "Could not compress record.",
+ send: false,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.internal_error
+ }
+ });
+ else if (!state.write.cipherFunction(record, state.write)) c.error(c, {
+ message: "Could not encrypt record.",
+ send: false,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.internal_error
+ }
+ });
return !c.fail;
};
if (c.session) {
@@ -40091,7 +37576,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the Random structure as a byte array.
*/
tls.createRandom = function() {
- var d = new Date();
+ var d = /* @__PURE__ */ new Date();
var utc = +d + d.getTimezoneOffset() * 6e4;
var rval = forge.util.createBuffer();
rval.putInt32(utc);
@@ -40109,10 +37594,8 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the created record.
*/
tls.createRecord = function(c, options) {
- if (!options.data) {
- return null;
- }
- var record = {
+ if (!options.data) return null;
+ return {
type: options.type,
version: {
major: c.version.major,
@@ -40121,7 +37604,6 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
length: options.data.length(),
fragment: options.data
};
- return record;
};
/**
* Creates a TLS alert record.
@@ -40217,9 +37699,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
extensions.putBuffer(ext);
}
var extLength = extensions.length();
- if (extLength > 0) {
- extLength += 2;
- }
+ if (extLength > 0) extLength += 2;
var sessionId = c.session.id;
var length = sessionId.length + 1 + 2 + 4 + 28 + 2 + cSuites + 1 + cMethods + extLength;
var rval = forge.util.createBuffer();
@@ -40231,9 +37711,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
writeVector(rval, 1, forge.util.createBuffer(sessionId));
writeVector(rval, 2, cipherSuites);
writeVector(rval, 1, compressionMethods);
- if (extLength > 0) {
- writeVector(rval, 2, extensions);
- }
+ if (extLength > 0) writeVector(rval, 2, extensions);
return rval;
};
/**
@@ -40285,55 +37763,41 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var cert = null;
if (c.getCertificate) {
var hint;
- if (client) {
- hint = c.session.certificateRequest;
- } else {
- hint = c.session.extensions.server_name.serverNameList;
- }
+ if (client) hint = c.session.certificateRequest;
+ else hint = c.session.extensions.server_name.serverNameList;
cert = c.getCertificate(c, hint);
}
var certList = forge.util.createBuffer();
- if (cert !== null) {
- try {
- if (!forge.util.isArray(cert)) {
- cert = [cert];
- }
- var asn1 = null;
- for (var i = 0; i < cert.length; ++i) {
- var msg = forge.pem.decode(cert[i])[0];
- if (msg.type !== "CERTIFICATE" && msg.type !== "X509 CERTIFICATE" && msg.type !== "TRUSTED CERTIFICATE") {
- var error = new Error("Could not convert certificate from PEM; PEM " + "header type is not \"CERTIFICATE\", \"X509 CERTIFICATE\", or " + "\"TRUSTED CERTIFICATE\".");
- error.headerType = msg.type;
- throw error;
- }
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert certificate from PEM; PEM is encrypted.");
- }
- var der = forge.util.createBuffer(msg.body);
- if (asn1 === null) {
- asn1 = forge.asn1.fromDer(der.bytes(), false);
- }
- var certBuffer = forge.util.createBuffer();
- writeVector(certBuffer, 3, der);
- certList.putBuffer(certBuffer);
- }
- cert = forge.pki.certificateFromAsn1(asn1);
- if (client) {
- c.session.clientCertificate = cert;
- } else {
- c.session.serverCertificate = cert;
+ if (cert !== null) try {
+ if (!forge.util.isArray(cert)) cert = [cert];
+ var asn1 = null;
+ for (var i = 0; i < cert.length; ++i) {
+ var msg = forge.pem.decode(cert[i])[0];
+ if (msg.type !== "CERTIFICATE" && msg.type !== "X509 CERTIFICATE" && msg.type !== "TRUSTED CERTIFICATE") {
+ var error = /* @__PURE__ */ new Error("Could not convert certificate from PEM; PEM header type is not \"CERTIFICATE\", \"X509 CERTIFICATE\", or \"TRUSTED CERTIFICATE\".");
+ error.headerType = msg.type;
+ throw error;
}
- } catch (ex) {
- return c.error(c, {
- message: "Could not send certificate list.",
- cause: ex,
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.bad_certificate
- }
- });
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert certificate from PEM; PEM is encrypted.");
+ var der = forge.util.createBuffer(msg.body);
+ if (asn1 === null) asn1 = forge.asn1.fromDer(der.bytes(), false);
+ var certBuffer = forge.util.createBuffer();
+ writeVector(certBuffer, 3, der);
+ certList.putBuffer(certBuffer);
}
+ cert = forge.pki.certificateFromAsn1(asn1);
+ if (client) c.session.clientCertificate = cert;
+ else c.session.serverCertificate = cert;
+ } catch (ex) {
+ return c.error(c, {
+ message: "Could not send certificate list.",
+ cause: ex,
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.bad_certificate
+ }
+ });
}
var length = 3 + certList.length();
var rval = forge.util.createBuffer();
@@ -40398,8 +37862,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
b.putBytes(forge.random.getBytes(46));
var sp = c.session.sp;
sp.pre_master_secret = b.getBytes();
- var key = c.session.serverCertificate.publicKey;
- b = key.encrypt(sp.pre_master_secret);
+ b = c.session.serverCertificate.publicKey.encrypt(sp.pre_master_secret);
var length = b.length + 2;
var rval = forge.util.createBuffer();
rval.putByte(tls.HandshakeType.client_key_exchange);
@@ -40438,34 +37901,29 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
b = b.getBytes();
c.getSignature = c.getSignature || function(c, b, callback) {
var privateKey = null;
- if (c.getPrivateKey) {
- try {
- privateKey = c.getPrivateKey(c, c.session.clientCertificate);
- privateKey = forge.pki.privateKeyFromPem(privateKey);
- } catch (ex) {
- c.error(c, {
- message: "Could not get private key.",
- cause: ex,
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.internal_error
- }
- });
- }
- }
- if (privateKey === null) {
+ if (c.getPrivateKey) try {
+ privateKey = c.getPrivateKey(c, c.session.clientCertificate);
+ privateKey = forge.pki.privateKeyFromPem(privateKey);
+ } catch (ex) {
c.error(c, {
- message: "No private key set.",
+ message: "Could not get private key.",
+ cause: ex,
send: true,
alert: {
level: tls.Alert.Level.fatal,
description: tls.Alert.Description.internal_error
}
});
- } else {
- b = privateKey.sign(b, null);
}
+ if (privateKey === null) c.error(c, {
+ message: "No private key set.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.internal_error
+ }
+ });
+ else b = privateKey.sign(b, null);
callback(c, b);
};
c.getSignature(c, b, callback);
@@ -40686,9 +38144,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the HeartbeatRequest byte buffer.
*/
tls.createHeartbeat = function(type, payload, payloadLength) {
- if (typeof payloadLength === "undefined") {
- payloadLength = payload.length;
- }
+ if (typeof payloadLength === "undefined") payloadLength = payload.length;
var rval = forge.util.createBuffer();
rval.putByte(type);
rval.putInt16(payloadLength);
@@ -40705,13 +38161,9 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param record the record to queue.
*/
tls.queue = function(c, record) {
- if (!record) {
- return;
- }
+ if (!record) return;
if (record.fragment.length() === 0) {
- if (record.type === tls.ContentType.handshake || record.type === tls.ContentType.alert || record.type === tls.ContentType.change_cipher_spec) {
- return;
- }
+ if (record.type === tls.ContentType.handshake || record.type === tls.ContentType.alert || record.type === tls.ContentType.change_cipher_spec) return;
}
if (record.type === tls.ContentType.handshake) {
var bytes = record.fragment.bytes();
@@ -40720,9 +38172,8 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
bytes = null;
}
var records;
- if (record.fragment.length() <= tls.MaxFragment) {
- records = [record];
- } else {
+ if (record.fragment.length() <= tls.MaxFragment) records = [record];
+ else {
records = [];
var data = record.fragment.bytes();
while (data.length > tls.MaxFragment) {
@@ -40732,19 +38183,14 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));
data = data.slice(tls.MaxFragment);
}
- if (data.length > 0) {
- records.push(tls.createRecord(c, {
- type: record.type,
- data: forge.util.createBuffer(data)
- }));
- }
+ if (data.length > 0) records.push(tls.createRecord(c, {
+ type: record.type,
+ data: forge.util.createBuffer(data)
+ }));
}
for (var i = 0; i < records.length && !c.fail; ++i) {
var rec = records[i];
- var s = c.state.current.write;
- if (s.update(c, rec)) {
- c.records.push(rec);
- }
+ if (c.state.current.write.update(c, rec)) c.records.push(rec);
}
};
/**
@@ -40818,55 +38264,41 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
tls.verifyCertificateChain = function(c, chain) {
try {
var options = {};
- for (var key in c.verifyOptions) {
- options[key] = c.verifyOptions[key];
- }
+ for (var key in c.verifyOptions) options[key] = c.verifyOptions[key];
options.verify = function(vfd, depth, chain) {
var desc = _certErrorToAlertDesc(vfd);
var ret = c.verify(c, vfd, depth, chain);
if (ret !== true) {
if (typeof ret === "object" && !forge.util.isArray(ret)) {
- var error = new Error("The application rejected the certificate.");
+ var error = /* @__PURE__ */ new Error("The application rejected the certificate.");
error.send = true;
error.alert = {
level: tls.Alert.Level.fatal,
description: tls.Alert.Description.bad_certificate
};
- if (ret.message) {
- error.message = ret.message;
- }
- if (ret.alert) {
- error.alert.description = ret.alert;
- }
+ if (ret.message) error.message = ret.message;
+ if (ret.alert) error.alert.description = ret.alert;
throw error;
}
- if (ret !== vfd) {
- ret = _alertDescToCertError(ret);
- }
+ if (ret !== vfd) ret = _alertDescToCertError(ret);
}
return ret;
};
forge.pki.verifyCertificateChain(c.caStore, chain, options);
} catch (ex) {
var err = ex;
- if (typeof err !== "object" || forge.util.isArray(err)) {
- err = {
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: _certErrorToAlertDesc(ex)
- }
- };
- }
- if (!("send" in err)) {
- err.send = true;
- }
- if (!("alert" in err)) {
- err.alert = {
+ if (typeof err !== "object" || forge.util.isArray(err)) err = {
+ send: true,
+ alert: {
level: tls.Alert.Level.fatal,
- description: _certErrorToAlertDesc(err.error)
- };
- }
+ description: _certErrorToAlertDesc(ex)
+ }
+ };
+ if (!("send" in err)) err.send = true;
+ if (!("alert" in err)) err.alert = {
+ level: tls.Alert.Level.fatal,
+ description: _certErrorToAlertDesc(err.error)
+ };
c.error(c, err);
}
return !c.fail;
@@ -40881,36 +38313,25 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
tls.createSessionCache = function(cache, capacity) {
var rval = null;
- if (cache && cache.getSession && cache.setSession && cache.order) {
- rval = cache;
- } else {
+ if (cache && cache.getSession && cache.setSession && cache.order) rval = cache;
+ else {
rval = {};
rval.cache = cache || {};
rval.capacity = Math.max(capacity || 100, 1);
rval.order = [];
- for (var key in cache) {
- if (rval.order.length <= capacity) {
- rval.order.push(key);
- } else {
- delete cache[key];
- }
- }
+ for (var key in cache) if (rval.order.length <= capacity) rval.order.push(key);
+ else delete cache[key];
rval.getSession = function(sessionId) {
var session = null;
var key = null;
- if (sessionId) {
- key = forge.util.bytesToHex(sessionId);
- } else if (rval.order.length > 0) {
- key = rval.order[0];
- }
+ if (sessionId) key = forge.util.bytesToHex(sessionId);
+ else if (rval.order.length > 0) key = rval.order[0];
if (key !== null && key in rval.cache) {
session = rval.cache[key];
delete rval.cache[key];
- for (var i in rval.order) {
- if (rval.order[i] === key) {
- rval.order.splice(i, 1);
- break;
- }
+ for (var i in rval.order) if (rval.order[i] === key) {
+ rval.order.splice(i, 1);
+ break;
}
}
return session;
@@ -40938,21 +38359,13 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
tls.createConnection = function(options) {
var caStore = null;
- if (options.caStore) {
- if (forge.util.isArray(options.caStore)) {
- caStore = forge.pki.createCaStore(options.caStore);
- } else {
- caStore = options.caStore;
- }
- } else {
- caStore = forge.pki.createCaStore();
- }
+ if (options.caStore) if (forge.util.isArray(options.caStore)) caStore = forge.pki.createCaStore(options.caStore);
+ else caStore = options.caStore;
+ else caStore = forge.pki.createCaStore();
var cipherSuites = options.cipherSuites || null;
if (cipherSuites === null) {
cipherSuites = [];
- for (var key in tls.CipherSuites) {
- cipherSuites.push(tls.CipherSuites[key]);
- }
+ for (var key in tls.CipherSuites) cipherSuites.push(tls.CipherSuites[key]);
}
var entity = options.server || false ? tls.ConnectionEnd.server : tls.ConnectionEnd.client;
var sessionCache = options.sessionCache ? tls.createSessionCache(options.sessionCache) : null;
@@ -40990,13 +38403,9 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
tls.flush(c);
}
var fatal = ex.fatal !== false;
- if (fatal) {
- c.fail = true;
- }
+ if (fatal) c.fail = true;
options.error(c, ex);
- if (fatal) {
- c.close(false);
- }
+ if (fatal) c.close(false);
},
deflate: options.deflate || null,
inflate: options.inflate || null
@@ -41041,11 +38450,8 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var _update = function(c, record) {
var aligned = record.type - tls.ContentType.change_cipher_spec;
var handlers = ctTable[c.entity][c.expect];
- if (aligned in handlers) {
- handlers[aligned](c, record);
- } else {
- tls.handleUnexpected(c, record);
- }
+ if (aligned in handlers) handlers[aligned](c, record);
+ else tls.handleUnexpected(c, record);
};
/**
* Reads the record header and initializes the next record on the given
@@ -41060,9 +38466,8 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = 0;
var b = c.input;
var len = b.length();
- if (len < 5) {
- rval = 5 - len;
- } else {
+ if (len < 5) rval = 5 - len;
+ else {
c.record = {
type: b.getByte(),
version: {
@@ -41074,19 +38479,15 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ready: false
};
var compatibleVersion = c.record.version.major === c.version.major;
- if (compatibleVersion && c.session && c.session.version) {
- compatibleVersion = c.record.version.minor === c.version.minor;
- }
- if (!compatibleVersion) {
- c.error(c, {
- message: "Incompatible TLS version.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.protocol_version
- }
- });
- }
+ if (compatibleVersion && c.session && c.session.version) compatibleVersion = c.record.version.minor === c.version.minor;
+ if (!compatibleVersion) c.error(c, {
+ message: "Incompatible TLS version.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.protocol_version
+ }
+ });
}
return rval;
};
@@ -41103,28 +38504,22 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var rval = 0;
var b = c.input;
var len = b.length();
- if (len < c.record.length) {
- rval = c.record.length - len;
- } else {
+ if (len < c.record.length) rval = c.record.length - len;
+ else {
c.record.fragment.putBytes(b.getBytes(c.record.length));
b.compact();
- var s = c.state.current.read;
- if (s.update(c, c.record)) {
- if (c.fragmented !== null) {
- if (c.fragmented.type === c.record.type) {
- c.fragmented.fragment.putBuffer(c.record.fragment);
- c.record = c.fragmented;
- } else {
- c.error(c, {
- message: "Invalid fragmented record.",
- send: true,
- alert: {
- level: tls.Alert.Level.fatal,
- description: tls.Alert.Description.unexpected_message
- }
- });
+ if (c.state.current.read.update(c, c.record)) {
+ if (c.fragmented !== null) if (c.fragmented.type === c.record.type) {
+ c.fragmented.fragment.putBuffer(c.record.fragment);
+ c.record = c.fragmented;
+ } else c.error(c, {
+ message: "Invalid fragmented record.",
+ send: true,
+ alert: {
+ level: tls.Alert.Level.fatal,
+ description: tls.Alert.Description.unexpected_message
}
- }
+ });
c.record.ready = true;
}
}
@@ -41138,36 +38533,26 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param sessionId the session ID to use, null to start a new one.
*/
c.handshake = function(sessionId) {
- if (c.entity !== tls.ConnectionEnd.client) {
- c.error(c, {
- message: "Cannot initiate handshake as a server.",
- fatal: false
- });
- } else if (c.handshaking) {
- c.error(c, {
- message: "Handshake already in progress.",
- fatal: false
- });
- } else {
- if (c.fail && !c.open && c.handshakes === 0) {
- c.fail = false;
- }
+ if (c.entity !== tls.ConnectionEnd.client) c.error(c, {
+ message: "Cannot initiate handshake as a server.",
+ fatal: false
+ });
+ else if (c.handshaking) c.error(c, {
+ message: "Handshake already in progress.",
+ fatal: false
+ });
+ else {
+ if (c.fail && !c.open && c.handshakes === 0) c.fail = false;
c.handshaking = true;
sessionId = sessionId || "";
var session = null;
if (sessionId.length > 0) {
- if (c.sessionCache) {
- session = c.sessionCache.getSession(sessionId);
- }
- if (session === null) {
- sessionId = "";
- }
+ if (c.sessionCache) session = c.sessionCache.getSession(sessionId);
+ if (session === null) sessionId = "";
}
if (sessionId.length === 0 && c.sessionCache) {
session = c.sessionCache.getSession();
- if (session !== null) {
- sessionId = session.id;
- }
+ if (session !== null) sessionId = session.id;
}
c.session = {
id: sessionId,
@@ -41205,22 +38590,12 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
c.process = function(data) {
var rval = 0;
- if (data) {
- c.input.putBytes(data);
- }
+ if (data) c.input.putBytes(data);
if (!c.fail) {
- if (c.record !== null && c.record.ready && c.record.fragment.isEmpty()) {
- c.record = null;
- }
- if (c.record === null) {
- rval = _readRecordHeader(c);
- }
- if (!c.fail && c.record !== null && !c.record.ready) {
- rval = _readRecord(c);
- }
- if (!c.fail && c.record !== null && c.record.ready) {
- _update(c, c.record);
- }
+ if (c.record !== null && c.record.ready && c.record.fragment.isEmpty()) c.record = null;
+ if (c.record === null) rval = _readRecordHeader(c);
+ if (!c.fail && c.record !== null && !c.record.ready) rval = _readRecord(c);
+ if (!c.fail && c.record !== null && c.record.ready) _update(c, c.record);
}
return rval;
};
@@ -41258,12 +38633,8 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return true on success, false on failure.
*/
c.prepareHeartbeatRequest = function(payload, payloadLength) {
- if (payload instanceof forge.util.ByteBuffer) {
- payload = payload.bytes();
- }
- if (typeof payloadLength === "undefined") {
- payloadLength = payload.length;
- }
+ if (payload instanceof forge.util.ByteBuffer) payload = payload.bytes();
+ if (typeof payloadLength === "undefined") payloadLength = payload.length;
c.expectedHeartbeatPayload = payload;
tls.queue(c, tls.createRecord(c, {
type: tls.ContentType.heartbeat,
@@ -41304,11 +38675,7 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return c;
};
module.exports = forge.tls = forge.tls || {};
- for (var key in tls) {
- if (typeof tls[key] !== "function") {
- forge.tls[key] = tls[key];
- }
- }
+ for (var key in tls) if (typeof tls[key] !== "function") forge.tls[key] = tls[key];
forge.tls.prf_tls1 = prf_TLS1;
forge.tls.hmac_sha1 = hmac_sha1;
forge.tls.createSessionCache = tls.createSessionCache;
@@ -41415,7 +38782,6 @@ var require_tls = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
forge.tls.createConnection = tls.createConnection;
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/aesCipherSuites.js
var require_aesCipherSuites = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -41498,17 +38864,12 @@ var require_aesCipherSuites = /* @__PURE__ */ __commonJSMin(((exports, module) =
record.fragment.putBytes(mac);
s.updateSequenceNumber();
var iv;
- if (record.version.minor === tls.Versions.TLS_1_0.minor) {
- iv = s.cipherState.init ? null : s.cipherState.iv;
- } else {
- iv = forge.random.getBytesSync(16);
- }
+ if (record.version.minor === tls.Versions.TLS_1_0.minor) iv = s.cipherState.init ? null : s.cipherState.iv;
+ else iv = forge.random.getBytesSync(16);
s.cipherState.init = true;
var cipher = s.cipherState.cipher;
cipher.start({ iv });
- if (record.version.minor >= tls.Versions.TLS_1_1.minor) {
- cipher.output.putBytes(iv);
- }
+ if (record.version.minor >= tls.Versions.TLS_1_1.minor) cipher.output.putBytes(iv);
cipher.update(record.fragment);
if (cipher.finish(encrypt_aes_cbc_sha1_padding)) {
record.fragment = cipher.output;
@@ -41547,12 +38908,8 @@ var require_aesCipherSuites = /* @__PURE__ */ __commonJSMin(((exports, module) =
if (decrypt) {
var len = output.length();
var paddingLength = output.last();
- for (var i = len - 1 - paddingLength; i < len - 1; ++i) {
- rval = rval && output.at(i) == paddingLength;
- }
- if (rval) {
- output.truncate(paddingLength + 1);
- }
+ for (var i = len - 1 - paddingLength; i < len - 1; ++i) rval = rval && output.at(i) == paddingLength;
+ if (rval) output.truncate(paddingLength + 1);
}
return rval;
}
@@ -41568,11 +38925,8 @@ var require_aesCipherSuites = /* @__PURE__ */ __commonJSMin(((exports, module) =
function decrypt_aes_cbc_sha1(record, s) {
var rval = false;
var iv;
- if (record.version.minor === tls.Versions.TLS_1_0.minor) {
- iv = s.cipherState.init ? null : s.cipherState.iv;
- } else {
- iv = record.fragment.getBytes(16);
- }
+ if (record.version.minor === tls.Versions.TLS_1_0.minor) iv = s.cipherState.init ? null : s.cipherState.iv;
+ else iv = record.fragment.getBytes(16);
s.cipherState.init = true;
var cipher = s.cipherState.cipher;
cipher.start({ iv });
@@ -41584,9 +38938,7 @@ var require_aesCipherSuites = /* @__PURE__ */ __commonJSMin(((exports, module) =
if (len >= macLen) {
record.fragment = cipher.output.getBytes(len - macLen);
mac = cipher.output.getBytes(macLen);
- } else {
- record.fragment = cipher.output.getBytes();
- }
+ } else record.fragment = cipher.output.getBytes();
record.fragment = forge.util.createBuffer(record.fragment);
record.length = record.fragment.length();
var mac2 = s.macFunction(s.macKey, s.sequenceNumber, record);
@@ -41619,7 +38971,6 @@ var require_aesCipherSuites = /* @__PURE__ */ __commonJSMin(((exports, module) =
return mac1 === mac2;
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/sha512.js
var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -41662,22 +39013,14 @@ var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return a message digest object.
*/
sha512.create = function(algorithm) {
- if (!_initialized) {
- _init();
- }
- if (typeof algorithm === "undefined") {
- algorithm = "SHA-512";
- }
- if (!(algorithm in _states)) {
- throw new Error("Invalid SHA-512 algorithm: " + algorithm);
- }
+ if (!_initialized) _init();
+ if (typeof algorithm === "undefined") algorithm = "SHA-512";
+ if (!(algorithm in _states)) throw new Error("Invalid SHA-512 algorithm: " + algorithm);
var _state = _states[algorithm];
var _h = null;
var _input = forge.util.createBuffer();
var _w = new Array(80);
- for (var wi = 0; wi < 80; ++wi) {
- _w[wi] = new Array(2);
- }
+ for (var wi = 0; wi < 80; ++wi) _w[wi] = new Array(2);
var digestLength = 64;
switch (algorithm) {
case "SHA-384":
@@ -41707,14 +39050,10 @@ var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.messageLength = 0;
md.fullMessageLength = md.messageLength128 = [];
var int32s = md.messageLengthSize / 4;
- for (var i = 0; i < int32s; ++i) {
- md.fullMessageLength.push(0);
- }
+ for (var i = 0; i < int32s; ++i) md.fullMessageLength.push(0);
_input = forge.util.createBuffer();
_h = new Array(_state.length);
- for (var i = 0; i < _state.length; ++i) {
- _h[i] = _state[i].slice(0);
- }
+ for (var i = 0; i < _state.length; ++i) _h[i] = _state[i].slice(0);
return md;
};
md.start();
@@ -41729,9 +39068,7 @@ var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return this digest object.
*/
md.update = function(msg, encoding) {
- if (encoding === "utf8") {
- msg = forge.util.encodeUtf8(msg);
- }
+ if (encoding === "utf8") msg = forge.util.encodeUtf8(msg);
var len = msg.length;
md.messageLength += len;
len = [len / 4294967296 >>> 0, len >>> 0];
@@ -41743,9 +39080,7 @@ var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
_input.putBytes(msg);
_update(_h, _w, _input);
- if (_input.read > 2048 || _input.length() === 0) {
- _input.compact();
- }
+ if (_input.read > 2048 || _input.length() === 0) _input.compact();
return md;
};
/**
@@ -41756,8 +39091,7 @@ var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
md.digest = function() {
var finalBlock = forge.util.createBuffer();
finalBlock.putBytes(_input.bytes());
- var remaining = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize;
- var overflow = remaining & md.blockLength - 1;
+ var overflow = md.fullMessageLength[md.fullMessageLength.length - 1] + md.messageLengthSize & md.blockLength - 1;
finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow));
var next, carry;
var bits = md.fullMessageLength[0] * 8;
@@ -41770,24 +39104,16 @@ var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
finalBlock.putInt32(bits);
var h = new Array(_h.length);
- for (var i = 0; i < _h.length; ++i) {
- h[i] = _h[i].slice(0);
- }
+ for (var i = 0; i < _h.length; ++i) h[i] = _h[i].slice(0);
_update(h, _w, finalBlock);
var rval = forge.util.createBuffer();
var hlen;
- if (algorithm === "SHA-512") {
- hlen = h.length;
- } else if (algorithm === "SHA-384") {
- hlen = h.length - 2;
- } else {
- hlen = h.length - 4;
- }
+ if (algorithm === "SHA-512") hlen = h.length;
+ else if (algorithm === "SHA-384") hlen = h.length - 2;
+ else hlen = h.length - 4;
for (var i = 0; i < hlen; ++i) {
rval.putInt32(h[i][0]);
- if (i !== hlen - 1 || algorithm !== "SHA-512/224") {
- rval.putInt32(h[i][1]);
- }
+ if (i !== hlen - 1 || algorithm !== "SHA-512/224") rval.putInt32(h[i][1]);
}
return rval;
};
@@ -42052,7 +39378,6 @@ var require_sha512$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/asn1-validator.js
var require_asn1_validator = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -42124,7 +39449,6 @@ var require_asn1_validator = /* @__PURE__ */ __commonJSMin(((exports) => {
}]
};
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/ed25519.js
var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -42146,9 +39470,7 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var asn1Validator = require_asn1_validator();
var publicKeyValidator = asn1Validator.publicKeyValidator;
var privateKeyValidator = asn1Validator.privateKeyValidator;
- if (typeof BigInteger === "undefined") {
- var BigInteger = forge.jsbn.BigInteger;
- }
+ if (typeof BigInteger === "undefined") var BigInteger = forge.jsbn.BigInteger;
var ByteBuffer = forge.util.ByteBuffer;
var NativeBuffer = typeof Buffer === "undefined" ? Uint8Array : Buffer;
forge.pki = forge.pki || {};
@@ -42163,24 +39485,17 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ed25519.generateKeyPair = function(options) {
options = options || {};
var seed = options.seed;
- if (seed === undefined) {
- seed = forge.random.getBytesSync(ed25519.constants.SEED_BYTE_LENGTH);
- } else if (typeof seed === "string") {
- if (seed.length !== ed25519.constants.SEED_BYTE_LENGTH) {
- throw new TypeError("\"seed\" must be " + ed25519.constants.SEED_BYTE_LENGTH + " bytes in length.");
- }
- } else if (!(seed instanceof Uint8Array)) {
- throw new TypeError("\"seed\" must be a node.js Buffer, Uint8Array, or a binary string.");
- }
+ if (seed === void 0) seed = forge.random.getBytesSync(ed25519.constants.SEED_BYTE_LENGTH);
+ else if (typeof seed === "string") {
+ if (seed.length !== ed25519.constants.SEED_BYTE_LENGTH) throw new TypeError("\"seed\" must be " + ed25519.constants.SEED_BYTE_LENGTH + " bytes in length.");
+ } else if (!(seed instanceof Uint8Array)) throw new TypeError("\"seed\" must be a node.js Buffer, Uint8Array, or a binary string.");
seed = messageToNativeBuffer({
message: seed,
encoding: "binary"
});
var pk = new NativeBuffer(ed25519.constants.PUBLIC_KEY_BYTE_LENGTH);
var sk = new NativeBuffer(ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);
- for (var i = 0; i < 32; ++i) {
- sk[i] = seed[i];
- }
+ for (var i = 0; i < 32; ++i) sk[i] = seed[i];
crypto_sign_keypair(pk, sk);
return {
publicKey: pk,
@@ -42198,23 +39513,19 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ed25519.privateKeyFromAsn1 = function(obj) {
var capture = {};
var errors = [];
- var valid = forge.asn1.validate(obj, privateKeyValidator, capture, errors);
- if (!valid) {
- var error = new Error("Invalid Key.");
+ if (!forge.asn1.validate(obj, privateKeyValidator, capture, errors)) {
+ var error = /* @__PURE__ */ new Error("Invalid Key.");
error.errors = errors;
throw error;
}
var oid = forge.asn1.derToOid(capture.privateKeyOid);
var ed25519Oid = forge.oids.EdDSA25519;
- if (oid !== ed25519Oid) {
- throw new Error("Invalid OID \"" + oid + "\"; OID must be \"" + ed25519Oid + "\".");
- }
+ if (oid !== ed25519Oid) throw new Error("Invalid OID \"" + oid + "\"; OID must be \"" + ed25519Oid + "\".");
var privateKey = capture.privateKey;
- var privateKeyBytes = messageToNativeBuffer({
+ return { privateKeyBytes: messageToNativeBuffer({
message: forge.asn1.fromDer(privateKey).value,
encoding: "binary"
- });
- return { privateKeyBytes };
+ }) };
};
/**
* Converts a public key from a RFC8410 ASN.1 encoding.
@@ -42226,21 +39537,16 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ed25519.publicKeyFromAsn1 = function(obj) {
var capture = {};
var errors = [];
- var valid = forge.asn1.validate(obj, publicKeyValidator, capture, errors);
- if (!valid) {
- var error = new Error("Invalid Key.");
+ if (!forge.asn1.validate(obj, publicKeyValidator, capture, errors)) {
+ var error = /* @__PURE__ */ new Error("Invalid Key.");
error.errors = errors;
throw error;
}
var oid = forge.asn1.derToOid(capture.publicKeyOid);
var ed25519Oid = forge.oids.EdDSA25519;
- if (oid !== ed25519Oid) {
- throw new Error("Invalid OID \"" + oid + "\"; OID must be \"" + ed25519Oid + "\".");
- }
+ if (oid !== ed25519Oid) throw new Error("Invalid OID \"" + oid + "\"; OID must be \"" + ed25519Oid + "\".");
var publicKeyBytes = capture.ed25519PublicKey;
- if (publicKeyBytes.length !== ed25519.constants.PUBLIC_KEY_BYTE_LENGTH) {
- throw new Error("Key length is invalid.");
- }
+ if (publicKeyBytes.length !== ed25519.constants.PUBLIC_KEY_BYTE_LENGTH) throw new Error("Key length is invalid.");
return messageToNativeBuffer({
message: publicKeyBytes,
encoding: "binary"
@@ -42252,13 +39558,9 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
message: options.privateKey,
encoding: "binary"
});
- if (privateKey.length !== ed25519.constants.PRIVATE_KEY_BYTE_LENGTH) {
- throw new TypeError("\"options.privateKey\" must have a byte length of " + ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);
- }
+ if (privateKey.length !== ed25519.constants.PRIVATE_KEY_BYTE_LENGTH) throw new TypeError("\"options.privateKey\" must have a byte length of " + ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);
var pk = new NativeBuffer(ed25519.constants.PUBLIC_KEY_BYTE_LENGTH);
- for (var i = 0; i < pk.length; ++i) {
- pk[i] = privateKey[32 + i];
- }
+ for (var i = 0; i < pk.length; ++i) pk[i] = privateKey[32 + i];
return pk;
};
ed25519.sign = function(options) {
@@ -42268,80 +39570,50 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
message: options.privateKey,
encoding: "binary"
});
- if (privateKey.length === ed25519.constants.SEED_BYTE_LENGTH) {
- var keyPair = ed25519.generateKeyPair({ seed: privateKey });
- privateKey = keyPair.privateKey;
- } else if (privateKey.length !== ed25519.constants.PRIVATE_KEY_BYTE_LENGTH) {
- throw new TypeError("\"options.privateKey\" must have a byte length of " + ed25519.constants.SEED_BYTE_LENGTH + " or " + ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);
- }
+ if (privateKey.length === ed25519.constants.SEED_BYTE_LENGTH) privateKey = ed25519.generateKeyPair({ seed: privateKey }).privateKey;
+ else if (privateKey.length !== ed25519.constants.PRIVATE_KEY_BYTE_LENGTH) throw new TypeError("\"options.privateKey\" must have a byte length of " + ed25519.constants.SEED_BYTE_LENGTH + " or " + ed25519.constants.PRIVATE_KEY_BYTE_LENGTH);
var signedMsg = new NativeBuffer(ed25519.constants.SIGN_BYTE_LENGTH + msg.length);
crypto_sign(signedMsg, msg, msg.length, privateKey);
var sig = new NativeBuffer(ed25519.constants.SIGN_BYTE_LENGTH);
- for (var i = 0; i < sig.length; ++i) {
- sig[i] = signedMsg[i];
- }
+ for (var i = 0; i < sig.length; ++i) sig[i] = signedMsg[i];
return sig;
};
ed25519.verify = function(options) {
options = options || {};
var msg = messageToNativeBuffer(options);
- if (options.signature === undefined) {
- throw new TypeError("\"options.signature\" must be a node.js Buffer, a Uint8Array, a forge " + "ByteBuffer, or a binary string.");
- }
+ if (options.signature === void 0) throw new TypeError("\"options.signature\" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.");
var sig = messageToNativeBuffer({
message: options.signature,
encoding: "binary"
});
- if (sig.length !== ed25519.constants.SIGN_BYTE_LENGTH) {
- throw new TypeError("\"options.signature\" must have a byte length of " + ed25519.constants.SIGN_BYTE_LENGTH);
- }
+ if (sig.length !== ed25519.constants.SIGN_BYTE_LENGTH) throw new TypeError("\"options.signature\" must have a byte length of " + ed25519.constants.SIGN_BYTE_LENGTH);
var publicKey = messageToNativeBuffer({
message: options.publicKey,
encoding: "binary"
});
- if (publicKey.length !== ed25519.constants.PUBLIC_KEY_BYTE_LENGTH) {
- throw new TypeError("\"options.publicKey\" must have a byte length of " + ed25519.constants.PUBLIC_KEY_BYTE_LENGTH);
- }
+ if (publicKey.length !== ed25519.constants.PUBLIC_KEY_BYTE_LENGTH) throw new TypeError("\"options.publicKey\" must have a byte length of " + ed25519.constants.PUBLIC_KEY_BYTE_LENGTH);
var sm = new NativeBuffer(ed25519.constants.SIGN_BYTE_LENGTH + msg.length);
var m = new NativeBuffer(ed25519.constants.SIGN_BYTE_LENGTH + msg.length);
var i;
- for (i = 0; i < ed25519.constants.SIGN_BYTE_LENGTH; ++i) {
- sm[i] = sig[i];
- }
- for (i = 0; i < msg.length; ++i) {
- sm[i + ed25519.constants.SIGN_BYTE_LENGTH] = msg[i];
- }
+ for (i = 0; i < ed25519.constants.SIGN_BYTE_LENGTH; ++i) sm[i] = sig[i];
+ for (i = 0; i < msg.length; ++i) sm[i + ed25519.constants.SIGN_BYTE_LENGTH] = msg[i];
return crypto_sign_open(m, sm, sm.length, publicKey) >= 0;
};
function messageToNativeBuffer(options) {
var message = options.message;
- if (message instanceof Uint8Array || message instanceof NativeBuffer) {
- return message;
- }
+ if (message instanceof Uint8Array || message instanceof NativeBuffer) return message;
var encoding = options.encoding;
- if (message === undefined) {
- if (options.md) {
- message = options.md.digest().getBytes();
- encoding = "binary";
- } else {
- throw new TypeError("\"options.message\" or \"options.md\" not specified.");
- }
- }
- if (typeof message === "string" && !encoding) {
- throw new TypeError("\"options.encoding\" must be \"binary\" or \"utf8\".");
- }
+ if (message === void 0) if (options.md) {
+ message = options.md.digest().getBytes();
+ encoding = "binary";
+ } else throw new TypeError("\"options.message\" or \"options.md\" not specified.");
+ if (typeof message === "string" && !encoding) throw new TypeError("\"options.encoding\" must be \"binary\" or \"utf8\".");
if (typeof message === "string") {
- if (typeof Buffer !== "undefined") {
- return Buffer.from(message, encoding);
- }
+ if (typeof Buffer !== "undefined") return Buffer.from(message, encoding);
message = new ByteBuffer(message, encoding);
- } else if (!(message instanceof ByteBuffer)) {
- throw new TypeError("\"options.message\" must be a node.js Buffer, a Uint8Array, a forge " + "ByteBuffer, or a string with \"options.encoding\" specifying its " + "encoding.");
- }
+ } else if (!(message instanceof ByteBuffer)) throw new TypeError("\"options.message\" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with \"options.encoding\" specifying its encoding.");
var buffer = new NativeBuffer(message.length());
- for (var i = 0; i < buffer.length; ++i) {
- buffer[i] = message.at(i);
- }
+ for (var i = 0; i < buffer.length; ++i) buffer[i] = message.at(i);
return buffer;
}
var gf0 = gf();
@@ -42475,13 +39747,9 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var buffer = new ByteBuffer(msg);
md.update(buffer.getBytes(msgLen), "binary");
var hash = md.digest().getBytes();
- if (typeof Buffer !== "undefined") {
- return Buffer.from(hash, "binary");
- }
+ if (typeof Buffer !== "undefined") return Buffer.from(hash, "binary");
var out = new NativeBuffer(ed25519.constants.HASH_BYTE_LENGTH);
- for (var i = 0; i < 64; ++i) {
- out[i] = hash.charCodeAt(i);
- }
+ for (var i = 0; i < 64; ++i) out[i] = hash.charCodeAt(i);
return out;
}
function crypto_sign_keypair(pk, sk) {
@@ -42498,9 +39766,7 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
d[31] |= 64;
scalarbase(p, d);
pack(pk, p);
- for (i = 0; i < 32; ++i) {
- sk[i + 32] = pk[i];
- }
+ for (i = 0; i < 32; ++i) sk[i + 32] = pk[i];
return 0;
}
function crypto_sign(sm, m, n, sk) {
@@ -42516,32 +39782,18 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
d[31] &= 127;
d[31] |= 64;
var smlen = n + 64;
- for (i = 0; i < n; ++i) {
- sm[64 + i] = m[i];
- }
- for (i = 0; i < 32; ++i) {
- sm[32 + i] = d[32 + i];
- }
+ for (i = 0; i < n; ++i) sm[64 + i] = m[i];
+ for (i = 0; i < 32; ++i) sm[32 + i] = d[32 + i];
var r = sha512(sm.subarray(32), n + 32);
reduce(r);
scalarbase(p, r);
pack(sm, p);
- for (i = 32; i < 64; ++i) {
- sm[i] = sk[i];
- }
+ for (i = 32; i < 64; ++i) sm[i] = sk[i];
var h = sha512(sm, n + 64);
reduce(h);
- for (i = 32; i < 64; ++i) {
- x[i] = 0;
- }
- for (i = 0; i < 32; ++i) {
- x[i] = r[i];
- }
- for (i = 0; i < 32; ++i) {
- for (j = 0; j < 32; j++) {
- x[i + j] += h[i] * d[j];
- }
- }
+ for (i = 32; i < 64; ++i) x[i] = 0;
+ for (i = 0; i < 32; ++i) x[i] = r[i];
+ for (i = 0; i < 32; ++i) for (j = 0; j < 32; j++) x[i + j] += h[i] * d[j];
modL(sm.subarray(32), x);
return smlen;
}
@@ -42560,18 +39812,10 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
gf()
];
mlen = -1;
- if (n < 64) {
- return -1;
- }
- if (unpackneg(q, pk)) {
- return -1;
- }
- for (i = 0; i < n; ++i) {
- m[i] = sm[i];
- }
- for (i = 0; i < 32; ++i) {
- m[i + 32] = pk[i];
- }
+ if (n < 64) return -1;
+ if (unpackneg(q, pk)) return -1;
+ for (i = 0; i < n; ++i) m[i] = sm[i];
+ for (i = 0; i < 32; ++i) m[i + 32] = pk[i];
var h = sha512(m, n);
reduce(h);
scalarmult(p, q, h);
@@ -42580,14 +39824,10 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pack(t, p);
n -= 64;
if (crypto_verify_32(sm, 0, t, 0)) {
- for (i = 0; i < n; ++i) {
- m[i] = 0;
- }
+ for (i = 0; i < n; ++i) m[i] = 0;
return -1;
}
- for (i = 0; i < n; ++i) {
- m[i] = sm[i + 64];
- }
+ for (i = 0; i < n; ++i) m[i] = sm[i + 64];
mlen = n;
return mlen;
}
@@ -42609,9 +39849,7 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
carry = x[j] >> 8;
x[j] &= 255;
}
- for (j = 0; j < 32; ++j) {
- x[j] -= carry * L[j];
- }
+ for (j = 0; j < 32; ++j) x[j] -= carry * L[j];
for (i = 0; i < 32; ++i) {
x[i + 1] += x[i] >> 8;
r[i] = x[i] & 255;
@@ -42647,9 +39885,7 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
M(p[3], e, h);
}
function cswap(p, q, b) {
- for (var i = 0; i < 4; ++i) {
- sel25519(p[i], q[i], b);
- }
+ for (var i = 0; i < 4; ++i) sel25519(p[i], q[i], b);
}
function pack(r, p) {
var tx = gf(), ty = gf(), zi = gf();
@@ -42662,9 +39898,7 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function pack25519(o, n) {
var i, j, b;
var m = gf(), t = gf();
- for (i = 0; i < 16; ++i) {
- t[i] = n[i];
- }
+ for (i = 0; i < 16; ++i) t[i] = n[i];
car25519(t);
car25519(t);
car25519(t);
@@ -42704,42 +39938,28 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
M(r[0], t, den);
S(chk, r[0]);
M(chk, chk, den);
- if (neq25519(chk, num)) {
- M(r[0], r[0], I);
- }
+ if (neq25519(chk, num)) M(r[0], r[0], I);
S(chk, r[0]);
M(chk, chk, den);
- if (neq25519(chk, num)) {
- return -1;
- }
- if (par25519(r[0]) === p[31] >> 7) {
- Z(r[0], gf0, r[0]);
- }
+ if (neq25519(chk, num)) return -1;
+ if (par25519(r[0]) === p[31] >> 7) Z(r[0], gf0, r[0]);
M(r[3], r[0], r[1]);
return 0;
}
function unpack25519(o, n) {
var i;
- for (i = 0; i < 16; ++i) {
- o[i] = n[2 * i] + (n[2 * i + 1] << 8);
- }
+ for (i = 0; i < 16; ++i) o[i] = n[2 * i] + (n[2 * i + 1] << 8);
o[15] &= 32767;
}
function pow2523(o, i) {
var c = gf();
var a;
- for (a = 0; a < 16; ++a) {
- c[a] = i[a];
- }
+ for (a = 0; a < 16; ++a) c[a] = i[a];
for (a = 250; a >= 0; --a) {
S(c, c);
- if (a !== 1) {
- M(c, c, i);
- }
- }
- for (a = 0; a < 16; ++a) {
- o[a] = c[a];
+ if (a !== 1) M(c, c, i);
}
+ for (a = 0; a < 16; ++a) o[a] = c[a];
}
function neq25519(a, b) {
var c = new NativeBuffer(32);
@@ -42753,9 +39973,7 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function vn(x, xi, y, yi, n) {
var i, d = 0;
- for (i = 0; i < n; ++i) {
- d |= x[xi + i] ^ y[yi + i];
- }
+ for (i = 0; i < n; ++i) d |= x[xi + i] ^ y[yi + i];
return (1 & d - 1 >>> 8) - 1;
}
function par25519(a) {
@@ -42792,25 +40010,17 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function set25519(r, a) {
var i;
- for (i = 0; i < 16; i++) {
- r[i] = a[i] | 0;
- }
+ for (i = 0; i < 16; i++) r[i] = a[i] | 0;
}
function inv25519(o, i) {
var c = gf();
var a;
- for (a = 0; a < 16; ++a) {
- c[a] = i[a];
- }
+ for (a = 0; a < 16; ++a) c[a] = i[a];
for (a = 253; a >= 0; --a) {
S(c, c);
- if (a !== 2 && a !== 4) {
- M(c, c, i);
- }
- }
- for (a = 0; a < 16; ++a) {
- o[a] = c[a];
+ if (a !== 2 && a !== 4) M(c, c, i);
}
+ for (a = 0; a < 16; ++a) o[a] = c[a];
}
function car25519(o) {
var i, v, c = 1;
@@ -42831,22 +40041,14 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function gf(init) {
var i, r = new Float64Array(16);
- if (init) {
- for (i = 0; i < init.length; ++i) {
- r[i] = init[i];
- }
- }
+ if (init) for (i = 0; i < init.length; ++i) r[i] = init[i];
return r;
}
function A(o, a, b) {
- for (var i = 0; i < 16; ++i) {
- o[i] = a[i] + b[i];
- }
+ for (var i = 0; i < 16; ++i) o[i] = a[i] + b[i];
}
function Z(o, a, b) {
- for (var i = 0; i < 16; ++i) {
- o[i] = a[i] - b[i];
- }
+ for (var i = 0; i < 16; ++i) o[i] = a[i] - b[i];
}
function S(o, a) {
M(o, a, a);
@@ -43258,7 +40460,6 @@ var require_ed25519 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
o[15] = t15;
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/kem.js
var require_kem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -43313,19 +40514,15 @@ var require_kem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
kem.encrypt = function(publicKey, keyLength) {
var byteLength = Math.ceil(publicKey.n.bitLength() / 8);
var r;
- do {
+ do
r = new BigInteger(forge.util.bytesToHex(prng.getBytesSync(byteLength)), 16).mod(publicKey.n);
- } while (r.compareTo(BigInteger.ONE) <= 0);
+ while (r.compareTo(BigInteger.ONE) <= 0);
r = forge.util.hexToBytes(r.toString(16));
var zeros = byteLength - r.length;
- if (zeros > 0) {
- r = forge.util.fillString(String.fromCharCode(0), zeros) + r;
- }
- var encapsulation = publicKey.encrypt(r, "NONE");
- var key = kdf.generate(r, keyLength);
+ if (zeros > 0) r = forge.util.fillString(String.fromCharCode(0), zeros) + r;
return {
- encapsulation,
- key
+ encapsulation: publicKey.encrypt(r, "NONE"),
+ key: kdf.generate(r, keyLength)
};
};
/**
@@ -43402,7 +40599,6 @@ var require_kem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/log.js
var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -43449,13 +40645,13 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* set the level such that only critical messages are seen but more verbose
* messages are needed for debugging or other purposes.
*/
- forge.log.LEVEL_LOCKED = 1 << 1;
+ forge.log.LEVEL_LOCKED = 2;
/**
* Always call log function. By default, the logging system will check the
* message level against logger.level before calling the log function. This
* flag allows the function to do its own check.
*/
- forge.log.NO_LEVEL_CHECK = 1 << 2;
+ forge.log.NO_LEVEL_CHECK = 4;
/**
* Perform message interpolation with the passed arguments. "%" style
* fields in log messages will be replaced by arguments as needed. Some
@@ -43463,7 +40659,7 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* message will be available as 'message' and the interpolated version will
* be available as 'fullMessage'.
*/
- forge.log.INTERPOLATE = 1 << 3;
+ forge.log.INTERPOLATE = 8;
for (var i = 0; i < forge.log.levels.length; ++i) {
var level = forge.log.levels[i];
sLevelInfo[level] = {
@@ -43480,14 +40676,8 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var messageLevelIndex = sLevelInfo[message.level].index;
for (var i = 0; i < sLoggers.length; ++i) {
var logger = sLoggers[i];
- if (logger.flags & forge.log.NO_LEVEL_CHECK) {
- logger.f(message);
- } else {
- var loggerLevelIndex = sLevelInfo[logger.level].index;
- if (messageLevelIndex <= loggerLevelIndex) {
- logger.f(logger, message);
- }
- }
+ if (logger.flags & forge.log.NO_LEVEL_CHECK) logger.f(message);
+ else if (messageLevelIndex <= sLevelInfo[logger.level].index) logger.f(logger, message);
}
};
/**
@@ -43497,9 +40687,7 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param message a message log object
*/
forge.log.prepareStandard = function(message) {
- if (!("standard" in message)) {
- message.standard = sLevelInfo[message.level].name + " [" + message.category + "] " + message.message;
- }
+ if (!("standard" in message)) message.standard = sLevelInfo[message.level].name + " [" + message.category + "] " + message.message;
};
/**
* Sets the 'full' key on a message object to the original message
@@ -43510,7 +40698,7 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
forge.log.prepareFull = function(message) {
if (!("full" in message)) {
var args = [message.message];
- args = args.concat([] || message["arguments"]);
+ args = args.concat([]);
message.full = forge.util.format.apply(this, args);
}
};
@@ -43526,30 +40714,26 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
message.standardFull = message.standard;
}
};
- if (true) {
- var levels = [
- "error",
- "warning",
- "info",
- "debug",
- "verbose"
- ];
- for (var i = 0; i < levels.length; ++i) {
- (function(level) {
- forge.log[level] = function(category, message) {
- var args = Array.prototype.slice.call(arguments).slice(2);
- var msg = {
- timestamp: new Date(),
- level,
- category,
- message,
- "arguments": args
- };
- forge.log.logMessage(msg);
- };
- })(levels[i]);
- }
- }
+ var levels = [
+ "error",
+ "warning",
+ "info",
+ "debug",
+ "verbose"
+ ];
+ for (var i = 0; i < levels.length; ++i) (function(level) {
+ forge.log[level] = function(category, message) {
+ var args = Array.prototype.slice.call(arguments).slice(2);
+ var msg = {
+ timestamp: /* @__PURE__ */ new Date(),
+ level,
+ category,
+ message,
+ "arguments": args
+ };
+ forge.log.logMessage(msg);
+ };
+ })(levels[i]);
/**
* Creates a new logger with specified custom logging function.
*
@@ -43587,13 +40771,10 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
forge.log.setLevel = function(logger, level) {
var rval = false;
if (logger && !(logger.flags & forge.log.LEVEL_LOCKED)) {
- for (var i = 0; i < forge.log.levels.length; ++i) {
- var aValidLevel = forge.log.levels[i];
- if (level == aValidLevel) {
- logger.level = level;
- rval = true;
- break;
- }
+ for (var i = 0; i < forge.log.levels.length; ++i) if (level == forge.log.levels[i]) {
+ logger.level = level;
+ rval = true;
+ break;
}
}
return rval;
@@ -43605,11 +40786,8 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param lock boolean lock value, default to true.
*/
forge.log.lock = function(logger, lock) {
- if (typeof lock === "undefined" || lock) {
- logger.flags |= forge.log.LEVEL_LOCKED;
- } else {
- logger.flags &= ~forge.log.LEVEL_LOCKED;
- }
+ if (typeof lock === "undefined" || lock) logger.flags |= forge.log.LEVEL_LOCKED;
+ else logger.flags &= ~forge.log.LEVEL_LOCKED;
};
/**
* Adds a logger.
@@ -43647,24 +40825,16 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports, module) => {
forge.log.setLevel(logger, "debug");
forge.log.addLogger(logger);
sConsoleLogger = logger;
- } else {
- console = { log: function() {} };
- }
+ } else console = { log: function() {} };
if (sConsoleLogger !== null && typeof window !== "undefined" && window.location) {
var query = new URL(window.location.href).searchParams;
- if (query.has("console.level")) {
- forge.log.setLevel(sConsoleLogger, query.get("console.level").slice(-1)[0]);
- }
+ if (query.has("console.level")) forge.log.setLevel(sConsoleLogger, query.get("console.level").slice(-1)[0]);
if (query.has("console.lock")) {
- var lock = query.get("console.lock").slice(-1)[0];
- if (lock == "true") {
- forge.log.lock(sConsoleLogger);
- }
+ if (query.get("console.lock").slice(-1)[0] == "true") forge.log.lock(sConsoleLogger);
}
}
forge.log.consoleLogger = sConsoleLogger;
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/md.all.js
var require_md_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -43681,7 +40851,6 @@ var require_md_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
require_sha256$1();
require_sha512$1();
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/pkcs7.js
var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -43725,13 +40894,11 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
p7.messageFromPem = function(pem) {
var msg = forge.pem.decode(pem)[0];
if (msg.type !== "PKCS7") {
- var error = new Error("Could not convert PKCS#7 message from PEM; PEM " + "header type is not \"PKCS#7\".");
+ var error = /* @__PURE__ */ new Error("Could not convert PKCS#7 message from PEM; PEM header type is not \"PKCS#7\".");
error.headerType = msg.type;
throw error;
}
- if (msg.procType && msg.procType.type === "ENCRYPTED") {
- throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");
- }
+ if (msg.procType && msg.procType.type === "ENCRYPTED") throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");
var obj = asn1.fromDer(msg.body);
return p7.messageFromAsn1(obj);
};
@@ -43761,7 +40928,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(obj, p7.asn1.contentInfoValidator, capture, errors)) {
- var error = new Error("Cannot read PKCS#7 message. " + "ASN.1 object is not an PKCS#7 ContentInfo.");
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");
error.errors = errors;
throw error;
}
@@ -43802,31 +40969,21 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
msg.signerInfos = [];
if (msg.rawCapture.certificates) {
var certs = msg.rawCapture.certificates.value;
- for (var i = 0; i < certs.length; ++i) {
- msg.certificates.push(forge.pki.certificateFromAsn1(certs[i]));
- }
+ for (var i = 0; i < certs.length; ++i) msg.certificates.push(forge.pki.certificateFromAsn1(certs[i]));
}
},
toAsn1: function() {
- if (!msg.contentInfo) {
- msg.sign();
- }
+ if (!msg.contentInfo) msg.sign();
var certs = [];
- for (var i = 0; i < msg.certificates.length; ++i) {
- certs.push(forge.pki.certificateToAsn1(msg.certificates[i]));
- }
+ for (var i = 0; i < msg.certificates.length; ++i) certs.push(forge.pki.certificateToAsn1(msg.certificates[i]));
var crls = [];
var signedData = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(msg.version).getBytes()),
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, msg.digestAlgorithmIdentifiers),
msg.contentInfo
])]);
- if (certs.length > 0) {
- signedData.value[0].value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, certs));
- }
- if (crls.length > 0) {
- signedData.value[0].value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, crls));
- }
+ if (certs.length > 0) signedData.value[0].value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, certs));
+ if (crls.length > 0) signedData.value[0].value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, crls));
signedData.value[0].value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, msg.signerInfos));
return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(msg.type).getBytes()), signedData]);
},
@@ -43835,19 +40992,13 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var serialNumber = signer.serialNumber;
if (signer.certificate) {
var cert = signer.certificate;
- if (typeof cert === "string") {
- cert = forge.pki.certificateFromPem(cert);
- }
+ if (typeof cert === "string") cert = forge.pki.certificateFromPem(cert);
issuer = cert.issuer.attributes;
serialNumber = cert.serialNumber;
}
var key = signer.key;
- if (!key) {
- throw new Error("Could not add PKCS#7 signer; no private key specified.");
- }
- if (typeof key === "string") {
- key = forge.pki.privateKeyFromPem(key);
- }
+ if (!key) throw new Error("Could not add PKCS#7 signer; no private key specified.");
+ if (typeof key === "string") key = forge.pki.privateKeyFromPem(key);
var digestAlgorithm = signer.digestAlgorithm || forge.pki.oids.sha1;
switch (digestAlgorithm) {
case forge.pki.oids.sha1:
@@ -43865,22 +41016,16 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var attr = authenticatedAttributes[i];
if (!contentType && attr.type === forge.pki.oids.contentType) {
contentType = true;
- if (messageDigest) {
- break;
- }
+ if (messageDigest) break;
continue;
}
if (!messageDigest && attr.type === forge.pki.oids.messageDigest) {
messageDigest = true;
- if (contentType) {
- break;
- }
+ if (contentType) break;
continue;
}
}
- if (!contentType || !messageDigest) {
- throw new Error("Invalid signer.authenticatedAttributes. If " + "signer.authenticatedAttributes is specified, then it must " + "contain at least two attributes, PKCS #9 content-type and " + "PKCS #9 message-digest.");
- }
+ if (!contentType || !messageDigest) throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");
}
msg.signers.push({
key,
@@ -43900,31 +41045,20 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
msg.contentInfo = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(forge.pki.oids.data).getBytes())]);
if ("content" in msg) {
var content;
- if (msg.content instanceof forge.util.ByteBuffer) {
- content = msg.content.bytes();
- } else if (typeof msg.content === "string") {
- content = forge.util.encodeUtf8(msg.content);
- }
- if (options.detached) {
- msg.detachedContent = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, content);
- } else {
- msg.contentInfo.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, content)]));
- }
+ if (msg.content instanceof forge.util.ByteBuffer) content = msg.content.bytes();
+ else if (typeof msg.content === "string") content = forge.util.encodeUtf8(msg.content);
+ if (options.detached) msg.detachedContent = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, content);
+ else msg.contentInfo.value.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, content)]));
}
}
- if (msg.signers.length === 0) {
- return;
- }
- var mds = addDigestAlgorithmIds();
- addSignerInfos(mds);
+ if (msg.signers.length === 0) return;
+ addSignerInfos(addDigestAlgorithmIds());
},
verify: function() {
throw new Error("PKCS#7 signature verification not yet implemented.");
},
addCertificate: function(cert) {
- if (typeof cert === "string") {
- cert = forge.pki.certificateFromPem(cert);
- }
+ if (typeof cert === "string") cert = forge.pki.certificateFromPem(cert);
msg.certificates.push(cert);
},
addCertificateRevokationList: function(crl) {
@@ -43937,58 +41071,41 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (var i = 0; i < msg.signers.length; ++i) {
var signer = msg.signers[i];
var oid = signer.digestAlgorithm;
- if (!(oid in mds)) {
- mds[oid] = forge.md[forge.pki.oids[oid]].create();
- }
- if (signer.authenticatedAttributes.length === 0) {
- signer.md = mds[oid];
- } else {
- signer.md = forge.md[forge.pki.oids[oid]].create();
- }
+ if (!(oid in mds)) mds[oid] = forge.md[forge.pki.oids[oid]].create();
+ if (signer.authenticatedAttributes.length === 0) signer.md = mds[oid];
+ else signer.md = forge.md[forge.pki.oids[oid]].create();
}
msg.digestAlgorithmIdentifiers = [];
- for (var oid in mds) {
- msg.digestAlgorithmIdentifiers.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(oid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")]));
- }
+ for (var oid in mds) msg.digestAlgorithmIdentifiers.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(oid).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")]));
return mds;
}
function addSignerInfos(mds) {
var content;
- if (msg.detachedContent) {
- content = msg.detachedContent;
- } else {
+ if (msg.detachedContent) content = msg.detachedContent;
+ else {
content = msg.contentInfo.value[1];
content = content.value[0];
}
- if (!content) {
- throw new Error("Could not sign PKCS#7 message; there is no content to sign.");
- }
+ if (!content) throw new Error("Could not sign PKCS#7 message; there is no content to sign.");
var contentType = asn1.derToOid(msg.contentInfo.value[0].value);
var bytes = asn1.toDer(content);
bytes.getByte();
asn1.getBerValueLength(bytes);
bytes = bytes.getBytes();
- for (var oid in mds) {
- mds[oid].start().update(bytes);
- }
- var signingTime = new Date();
+ for (var oid in mds) mds[oid].start().update(bytes);
+ var signingTime = /* @__PURE__ */ new Date();
for (var i = 0; i < msg.signers.length; ++i) {
var signer = msg.signers[i];
if (signer.authenticatedAttributes.length === 0) {
- if (contentType !== forge.pki.oids.data) {
- throw new Error("Invalid signer; authenticatedAttributes must be present " + "when the ContentInfo content type is not PKCS#7 Data.");
- }
+ if (contentType !== forge.pki.oids.data) throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
} else {
signer.authenticatedAttributesAsn1 = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, []);
var attrsAsn1 = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, []);
for (var ai = 0; ai < signer.authenticatedAttributes.length; ++ai) {
var attr = signer.authenticatedAttributes[ai];
- if (attr.type === forge.pki.oids.messageDigest) {
- attr.value = mds[signer.digestAlgorithm].digest();
- } else if (attr.type === forge.pki.oids.signingTime) {
- if (!attr.value) {
- attr.value = signingTime;
- }
+ if (attr.type === forge.pki.oids.messageDigest) attr.value = mds[signer.digestAlgorithm].digest();
+ else if (attr.type === forge.pki.oids.signingTime) {
+ if (!attr.value) attr.value = signingTime;
}
attrsAsn1.value.push(_attributeToAsn1(attr));
signer.authenticatedAttributesAsn1.value.push(_attributeToAsn1(attr));
@@ -44016,9 +41133,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_fromAsn1(msg, obj, p7.asn1.encryptedDataValidator);
},
decrypt: function(key) {
- if (key !== undefined) {
- msg.encryptedContent.key = key;
- }
+ if (key !== void 0) msg.encryptedContent.key = key;
_decryptContent(msg);
}
};
@@ -44052,35 +41167,25 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (var i = 0; i < msg.recipients.length; ++i) {
var r = msg.recipients[i];
var rAttr = r.issuer;
- if (r.serialNumber !== cert.serialNumber) {
- continue;
- }
- if (rAttr.length !== sAttr.length) {
- continue;
- }
+ if (r.serialNumber !== cert.serialNumber) continue;
+ if (rAttr.length !== sAttr.length) continue;
var match = true;
- for (var j = 0; j < sAttr.length; ++j) {
- if (rAttr[j].type !== sAttr[j].type || rAttr[j].value !== sAttr[j].value) {
- match = false;
- break;
- }
- }
- if (match) {
- return r;
+ for (var j = 0; j < sAttr.length; ++j) if (rAttr[j].type !== sAttr[j].type || rAttr[j].value !== sAttr[j].value) {
+ match = false;
+ break;
}
+ if (match) return r;
}
return null;
},
decrypt: function(recipient, privKey) {
- if (msg.encryptedContent.key === undefined && recipient !== undefined && privKey !== undefined) {
- switch (recipient.encryptedContent.algorithm) {
- case forge.pki.oids.rsaEncryption:
- case forge.pki.oids.desCBC:
- var key = privKey.decrypt(recipient.encryptedContent.content);
- msg.encryptedContent.key = forge.util.createBuffer(key);
- break;
- default: throw new Error("Unsupported asymmetric cipher, " + "OID " + recipient.encryptedContent.algorithm);
- }
+ if (msg.encryptedContent.key === void 0 && recipient !== void 0 && privKey !== void 0) switch (recipient.encryptedContent.algorithm) {
+ case forge.pki.oids.rsaEncryption:
+ case forge.pki.oids.desCBC:
+ var key = privKey.decrypt(recipient.encryptedContent.content);
+ msg.encryptedContent.key = forge.util.createBuffer(key);
+ break;
+ default: throw new Error("Unsupported asymmetric cipher, OID " + recipient.encryptedContent.algorithm);
}
_decryptContent(msg);
},
@@ -44096,7 +41201,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
},
encrypt: function(key, cipher) {
- if (msg.encryptedContent.content === undefined) {
+ if (msg.encryptedContent.content === void 0) {
cipher = cipher || msg.encryptedContent.algorithm;
key = key || msg.encryptedContent.key;
var keyLen, ivLen, ciphFn;
@@ -44123,27 +41228,20 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
break;
default: throw new Error("Unsupported symmetric cipher, OID " + cipher);
}
- if (key === undefined) {
- key = forge.util.createBuffer(forge.random.getBytes(keyLen));
- } else if (key.length() != keyLen) {
- throw new Error("Symmetric key has wrong length; " + "got " + key.length() + " bytes, expected " + keyLen + ".");
- }
+ if (key === void 0) key = forge.util.createBuffer(forge.random.getBytes(keyLen));
+ else if (key.length() != keyLen) throw new Error("Symmetric key has wrong length; got " + key.length() + " bytes, expected " + keyLen + ".");
msg.encryptedContent.algorithm = cipher;
msg.encryptedContent.key = key;
msg.encryptedContent.parameter = forge.util.createBuffer(forge.random.getBytes(ivLen));
var ciph = ciphFn(key);
ciph.start(msg.encryptedContent.parameter.copy());
ciph.update(msg.content);
- if (!ciph.finish()) {
- throw new Error("Symmetric encryption failed.");
- }
+ if (!ciph.finish()) throw new Error("Symmetric encryption failed.");
msg.encryptedContent.content = ciph.output;
}
for (var i = 0; i < msg.recipients.length; ++i) {
var recipient = msg.recipients[i];
- if (recipient.encryptedContent.content !== undefined) {
- continue;
- }
+ if (recipient.encryptedContent.content !== void 0) continue;
switch (recipient.encryptedContent.algorithm) {
case forge.pki.oids.rsaEncryption:
recipient.encryptedContent.content = recipient.encryptedContent.key.encrypt(msg.encryptedContent.key.data);
@@ -44166,7 +41264,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var capture = {};
var errors = [];
if (!asn1.validate(obj, p7.asn1.recipientInfoValidator, capture, errors)) {
- var error = new Error("Cannot read PKCS#7 RecipientInfo. " + "ASN.1 object is not an PKCS#7 RecipientInfo.");
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");
error.errors = errors;
throw error;
}
@@ -44176,7 +41274,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
serialNumber: forge.util.createBuffer(capture.serial).toHex(),
encryptedContent: {
algorithm: asn1.derToOid(capture.encAlgorithm),
- parameter: capture.encParameter ? capture.encParameter.value : undefined,
+ parameter: capture.encParameter ? capture.encParameter.value : void 0,
content: capture.encKey
}
};
@@ -44205,9 +41303,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _recipientsFromAsn1(infos) {
var ret = [];
- for (var i = 0; i < infos.length; ++i) {
- ret.push(_recipientFromAsn1(infos[i]));
- }
+ for (var i = 0; i < infos.length; ++i) ret.push(_recipientFromAsn1(infos[i]));
return ret;
}
/**
@@ -44219,41 +41315,10 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _recipientsToAsn1(recipients) {
var ret = [];
- for (var i = 0; i < recipients.length; ++i) {
- ret.push(_recipientToAsn1(recipients[i]));
- }
+ for (var i = 0; i < recipients.length; ++i) ret.push(_recipientToAsn1(recipients[i]));
return ret;
}
/**
- * Converts a single signer from an ASN.1 object.
- *
- * @param obj the ASN.1 representation of a SignerInfo.
- *
- * @return the signer object.
- */
- function _signerFromAsn1(obj) {
- var capture = {};
- var errors = [];
- if (!asn1.validate(obj, p7.asn1.signerInfoValidator, capture, errors)) {
- var error = new Error("Cannot read PKCS#7 SignerInfo. " + "ASN.1 object is not an PKCS#7 SignerInfo.");
- error.errors = errors;
- throw error;
- }
- var rval = {
- version: capture.version.charCodeAt(0),
- issuer: forge.pki.RDNAttributesAsArray(capture.issuer),
- serialNumber: forge.util.createBuffer(capture.serial).toHex(),
- digestAlgorithm: asn1.derToOid(capture.digestAlgorithm),
- signatureAlgorithm: asn1.derToOid(capture.signatureAlgorithm),
- signature: capture.signature,
- authenticatedAttributes: [],
- unauthenticatedAttributes: []
- };
- var authenticatedAttributes = capture.authenticatedAttributes || [];
- var unauthenticatedAttributes = capture.unauthenticatedAttributes || [];
- return rval;
- }
- /**
* Converts a single signerInfo object to an ASN.1 object.
*
* @param obj the signerInfo object.
@@ -44266,9 +41331,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [forge.pki.distinguishedNameToAsn1({ attributes: obj.issuer }), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, forge.util.hexToBytes(obj.serialNumber))]),
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(obj.digestAlgorithm).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")])
]);
- if (obj.authenticatedAttributesAsn1) {
- rval.value.push(obj.authenticatedAttributesAsn1);
- }
+ if (obj.authenticatedAttributesAsn1) rval.value.push(obj.authenticatedAttributesAsn1);
rval.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(obj.signatureAlgorithm).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, "")]));
rval.value.push(asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, obj.signature));
if (obj.unauthenticatedAttributes.length > 0) {
@@ -44282,20 +41345,6 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return rval;
}
/**
- * Map a set of SignerInfo ASN.1 objects to an array of signer objects.
- *
- * @param signerInfoAsn1s an array of ASN.1 SignerInfos (i.e. SET OF).
- *
- * @return an array of signers objects.
- */
- function _signersFromAsn1(signerInfoAsn1s) {
- var ret = [];
- for (var i = 0; i < signerInfoAsn1s.length; ++i) {
- ret.push(_signerFromAsn1(signerInfoAsn1s[i]));
- }
- return ret;
- }
- /**
* Map an array of signer objects to ASN.1 objects.
*
* @param signers an array of signer objects.
@@ -44304,9 +41353,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _signersToAsn1(signers) {
var ret = [];
- for (var i = 0; i < signers.length; ++i) {
- ret.push(_signerToAsn1(signers[i]));
- }
+ for (var i = 0; i < signers.length; ++i) ret.push(_signerToAsn1(signers[i]));
return ret;
}
/**
@@ -44318,29 +41365,20 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _attributeToAsn1(attr) {
var value;
- if (attr.type === forge.pki.oids.contentType) {
- value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(attr.value).getBytes());
- } else if (attr.type === forge.pki.oids.messageDigest) {
- value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, attr.value.bytes());
- } else if (attr.type === forge.pki.oids.signingTime) {
- var jan_1_1950 = new Date("1950-01-01T00:00:00Z");
- var jan_1_2050 = new Date("2050-01-01T00:00:00Z");
+ if (attr.type === forge.pki.oids.contentType) value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(attr.value).getBytes());
+ else if (attr.type === forge.pki.oids.messageDigest) value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, attr.value.bytes());
+ else if (attr.type === forge.pki.oids.signingTime) {
+ var jan_1_1950 = /* @__PURE__ */ new Date("1950-01-01T00:00:00Z");
+ var jan_1_2050 = /* @__PURE__ */ new Date("2050-01-01T00:00:00Z");
var date = attr.value;
if (typeof date === "string") {
var timestamp = Date.parse(date);
- if (!isNaN(timestamp)) {
- date = new Date(timestamp);
- } else if (date.length === 13) {
- date = asn1.utcTimeToDate(date);
- } else {
- date = asn1.generalizedTimeToDate(date);
- }
- }
- if (date >= jan_1_1950 && date < jan_1_2050) {
- value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false, asn1.dateToUtcTime(date));
- } else {
- value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.GENERALIZEDTIME, false, asn1.dateToGeneralizedTime(date));
+ if (!isNaN(timestamp)) date = new Date(timestamp);
+ else if (date.length === 13) date = asn1.utcTimeToDate(date);
+ else date = asn1.generalizedTimeToDate(date);
}
+ if (date >= jan_1_1950 && date < jan_1_2050) value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false, asn1.dateToUtcTime(date));
+ else value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.GENERALIZEDTIME, false, asn1.dateToGeneralizedTime(date));
}
return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(attr.type).getBytes()), asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [value])]);
}
@@ -44354,7 +41392,7 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _encryptedContentToAsn1(ec) {
return [
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(forge.pki.oids.data).getBytes()),
- asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(ec.algorithm).getBytes()), !ec.parameter ? undefined : asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, ec.parameter.getBytes())]),
+ asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(ec.algorithm).getBytes()), !ec.parameter ? void 0 : asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, ec.parameter.getBytes())]),
asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, ec.content.getBytes())])
];
}
@@ -44377,28 +41415,19 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _fromAsn1(msg, obj, validator) {
var capture = {};
- var errors = [];
- if (!asn1.validate(obj, validator, capture, errors)) {
- var error = new Error("Cannot read PKCS#7 message. " + "ASN.1 object is not a supported PKCS#7 message.");
+ if (!asn1.validate(obj, validator, capture, [])) {
+ var error = /* @__PURE__ */ new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");
error.errors = error;
throw error;
}
- var contentType = asn1.derToOid(capture.contentType);
- if (contentType !== forge.pki.oids.data) {
- throw new Error("Unsupported PKCS#7 message. " + "Only wrapped ContentType Data supported.");
- }
+ if (asn1.derToOid(capture.contentType) !== forge.pki.oids.data) throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");
if (capture.encryptedContent) {
var content = "";
- if (forge.util.isArray(capture.encryptedContent)) {
- for (var i = 0; i < capture.encryptedContent.length; ++i) {
- if (capture.encryptedContent[i].type !== asn1.Type.OCTETSTRING) {
- throw new Error("Malformed PKCS#7 message, expecting encrypted " + "content constructed of only OCTET STRING objects.");
- }
- content += capture.encryptedContent[i].value;
- }
- } else {
- content = capture.encryptedContent;
+ if (forge.util.isArray(capture.encryptedContent)) for (var i = 0; i < capture.encryptedContent.length; ++i) {
+ if (capture.encryptedContent[i].type !== asn1.Type.OCTETSTRING) throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");
+ content += capture.encryptedContent[i].value;
}
+ else content = capture.encryptedContent;
msg.encryptedContent = {
algorithm: asn1.derToOid(capture.encAlgorithm),
parameter: forge.util.createBuffer(capture.encParameter.value),
@@ -44407,16 +41436,11 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (capture.content) {
var content = "";
- if (forge.util.isArray(capture.content)) {
- for (var i = 0; i < capture.content.length; ++i) {
- if (capture.content[i].type !== asn1.Type.OCTETSTRING) {
- throw new Error("Malformed PKCS#7 message, expecting " + "content constructed of only OCTET STRING objects.");
- }
- content += capture.content[i].value;
- }
- } else {
- content = capture.content;
+ if (forge.util.isArray(capture.content)) for (var i = 0; i < capture.content.length; ++i) {
+ if (capture.content[i].type !== asn1.Type.OCTETSTRING) throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
+ content += capture.content[i].value;
}
+ else content = capture.content;
msg.content = forge.util.createBuffer(content);
}
msg.version = capture.version.charCodeAt(0);
@@ -44434,10 +41458,8 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param The PKCS#7 message object.
*/
function _decryptContent(msg) {
- if (msg.encryptedContent.key === undefined) {
- throw new Error("Symmetric key not available.");
- }
- if (msg.content === undefined) {
+ if (msg.encryptedContent.key === void 0) throw new Error("Symmetric key not available.");
+ if (msg.content === void 0) {
var ciph;
switch (msg.encryptedContent.algorithm) {
case forge.pki.oids["aes128-CBC"]:
@@ -44453,14 +41475,11 @@ var require_pkcs7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
ciph.start(msg.encryptedContent.parameter);
ciph.update(msg.encryptedContent.content);
- if (!ciph.finish()) {
- throw new Error("Symmetric decryption failed.");
- }
+ if (!ciph.finish()) throw new Error("Symmetric decryption failed.");
msg.content = ciph.output;
}
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/ssh.js
var require_ssh = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -44512,9 +41531,8 @@ var require_ssh = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_addBigIntegerToBuffer(privbuffer, privateKey.q);
_addBigIntegerToBuffer(privbuffer, privateKey.qInv);
var priv;
- if (!passphrase) {
- priv = forge.util.encode64(privbuffer.bytes(), 64);
- } else {
+ if (!passphrase) priv = forge.util.encode64(privbuffer.bytes(), 64);
+ else {
var encLen = privbuffer.length() + 16 - 1;
encLen -= encLen % 16;
var padding = _sha1(privbuffer.bytes());
@@ -44575,9 +41593,7 @@ var require_ssh = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return the public key in OpenSSH format.
*/
ssh.privateKeyToOpenSSH = function(privateKey, passphrase) {
- if (!passphrase) {
- return forge.pki.privateKeyToPem(privateKey);
- }
+ if (!passphrase) return forge.pki.privateKeyToPem(privateKey);
return forge.pki.encryptRsaPrivateKey(privateKey, passphrase, {
legacy: true,
algorithm: "aes128"
@@ -44608,15 +41624,10 @@ var require_ssh = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var digest = md.digest();
if (options.encoding === "hex") {
var hex = digest.toHex();
- if (options.delimiter) {
- return hex.match(/.{2}/g).join(options.delimiter);
- }
+ if (options.delimiter) return hex.match(/.{2}/g).join(options.delimiter);
return hex;
- } else if (options.encoding === "binary") {
- return digest.getBytes();
- } else if (options.encoding) {
- throw new Error("Unknown encoding \"" + options.encoding + "\".");
- }
+ } else if (options.encoding === "binary") return digest.getBytes();
+ else if (options.encoding) throw new Error("Unknown encoding \"" + options.encoding + "\".");
return digest;
};
/**
@@ -44627,9 +41638,7 @@ var require_ssh = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function _addBigIntegerToBuffer(buffer, val) {
var hexVal = val.toString(16);
- if (hexVal[0] >= "8") {
- hexVal = "00" + hexVal;
- }
+ if (hexVal[0] >= "8") hexVal = "00" + hexVal;
var bytes = forge.util.hexToBytes(hexVal);
buffer.putInt32(bytes.length);
buffer.putBytes(bytes);
@@ -44652,13 +41661,10 @@ var require_ssh = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _sha1() {
var sha = forge.md.sha1.create();
var num = arguments.length;
- for (var i = 0; i < num; ++i) {
- sha.update(arguments[i]);
- }
+ for (var i = 0; i < num; ++i) sha.update(arguments[i]);
return sha.digest();
}
}));
-
//#endregion
//#region ../node_modules/node-forge/lib/index.js
var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -44696,7 +41702,6 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
require_tls();
require_util$8();
}));
-
//#endregion
//#region ../node_modules/minipass/dist/esm/index.js
var import_lib = /* @__PURE__ */ __toESM(require_lib$3(), 1);
@@ -44849,9 +41854,7 @@ var Minipass = class extends EventEmitter$1 {
constructor(...args) {
const options = args[0] || {};
super();
- if (options.objectMode && typeof options.encoding === "string") {
- throw new TypeError("Encoding and objectMode may not be used together");
- }
+ if (options.objectMode && typeof options.encoding === "string") throw new TypeError("Encoding and objectMode may not be used together");
if (isObjectModeOptions(options)) {
this[OBJECTMODE] = true;
this[ENCODING] = null;
@@ -44864,20 +41867,13 @@ var Minipass = class extends EventEmitter$1 {
}
this[ASYNC] = !!options.async;
this[DECODER] = this[ENCODING] ? new StringDecoder(this[ENCODING]) : null;
- if (options && options.debugExposeBuffer === true) {
- Object.defineProperty(this, "buffer", { get: () => this[BUFFER] });
- }
- if (options && options.debugExposePipes === true) {
- Object.defineProperty(this, "pipes", { get: () => this[PIPES] });
- }
+ if (options && options.debugExposeBuffer === true) Object.defineProperty(this, "buffer", { get: () => this[BUFFER] });
+ if (options && options.debugExposePipes === true) Object.defineProperty(this, "pipes", { get: () => this[PIPES] });
const { signal } = options;
if (signal) {
this[SIGNAL] = signal;
- if (signal.aborted) {
- this[ABORT]();
- } else {
- signal.addEventListener("abort", () => this[ABORT]());
- }
+ if (signal.aborted) this[ABORT]();
+ else signal.addEventListener("abort", () => this[ABORT]());
}
}
/**
@@ -44958,7 +41954,7 @@ var Minipass = class extends EventEmitter$1 {
if (this[ABORTED]) return false;
if (this[EOF]) throw new Error("write after end");
if (this[DESTROYED]) {
- this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" }));
+ this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" }));
return true;
}
if (typeof encoding === "function") {
@@ -44968,13 +41964,9 @@ var Minipass = class extends EventEmitter$1 {
if (!encoding) encoding = "utf8";
const fn = this[ASYNC] ? defer$1 : nodefer;
if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
- if (isArrayBufferView$1(chunk)) {
- chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
- } else if (isArrayBufferLike(chunk)) {
- chunk = Buffer.from(chunk);
- } else if (typeof chunk !== "string") {
- throw new Error("Non-contiguous data written to non-objectMode stream");
- }
+ if (isArrayBufferView$1(chunk)) chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
+ else if (isArrayBufferLike(chunk)) chunk = Buffer.from(chunk);
+ else if (typeof chunk !== "string") throw new Error("Non-contiguous data written to non-objectMode stream");
}
if (this[OBJECTMODE]) {
/* c8 ignore start */
@@ -44991,12 +41983,8 @@ var Minipass = class extends EventEmitter$1 {
if (cb) fn(cb);
return this[FLOWING];
}
- if (typeof chunk === "string" && !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
- chunk = Buffer.from(chunk, encoding);
- }
- if (Buffer.isBuffer(chunk) && this[ENCODING]) {
- chunk = this[DECODER].write(chunk);
- }
+ if (typeof chunk === "string" && !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) chunk = Buffer.from(chunk, encoding);
+ if (Buffer.isBuffer(chunk) && this[ENCODING]) chunk = this[DECODER].write(chunk);
if (this[FLOWING] && this[BUFFERLENGTH] !== 0) this[FLUSH](true);
if (this[FLOWING]) this.emit("data", chunk);
else this[BUFFERPUSH](chunk);
@@ -45025,9 +42013,7 @@ var Minipass = class extends EventEmitter$1 {
return null;
}
if (this[OBJECTMODE]) n = null;
- if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {
- this[BUFFER] = [this[ENCODING] ? this[BUFFER].join("") : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])];
- }
+ if (this[BUFFER].length > 1 && !this[OBJECTMODE]) this[BUFFER] = [this[ENCODING] ? this[BUFFER].join("") : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])];
const ret = this[READ](n || null, this[BUFFER][0]);
this[MAYBE_EMIT_END]();
return ret;
@@ -45054,13 +42040,13 @@ var Minipass = class extends EventEmitter$1 {
end(chunk, encoding, cb) {
if (typeof chunk === "function") {
cb = chunk;
- chunk = undefined;
+ chunk = void 0;
}
if (typeof encoding === "function") {
cb = encoding;
encoding = "utf8";
}
- if (chunk !== undefined) this.write(chunk, encoding);
+ if (chunk !== void 0) this.write(chunk, encoding);
if (cb) this.once("end", cb);
this[EOF] = true;
this.writable = false;
@@ -45069,9 +42055,7 @@ var Minipass = class extends EventEmitter$1 {
}
[RESUME]() {
if (this[DESTROYED]) return;
- if (!this[DATALISTENERS] && !this[PIPES].length) {
- this[DISCARDED] = true;
- }
+ if (!this[DATALISTENERS] && !this[PIPES].length) this[DISCARDED] = true;
this[PAUSED] = false;
this[FLOWING] = true;
this.emit("resume");
@@ -45129,7 +42113,8 @@ var Minipass = class extends EventEmitter$1 {
return this[BUFFER].shift();
}
[FLUSH](noDrain = false) {
- do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
+ do ;
+while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit("drain");
}
[FLUSHCHUNK](chunk) {
@@ -45170,9 +42155,7 @@ var Minipass = class extends EventEmitter$1 {
const p = this[PIPES].find((p) => p.dest === dest);
if (p) {
if (this[PIPES].length === 1) {
- if (this[FLOWING] && this[DATALISTENERS] === 0) {
- this[FLOWING] = false;
- }
+ if (this[FLOWING] && this[DATALISTENERS] === 0) this[FLOWING] = false;
this[PIPES] = [];
} else this[PIPES].splice(this[PIPES].indexOf(p), 1);
p.unpipe();
@@ -45206,12 +42189,9 @@ var Minipass = class extends EventEmitter$1 {
if (ev === "data") {
this[DISCARDED] = false;
this[DATALISTENERS]++;
- if (!this[PIPES].length && !this[FLOWING]) {
- this[RESUME]();
- }
- } else if (ev === "readable" && this[BUFFERLENGTH] !== 0) {
- super.emit("readable");
- } else if (isEndish(ev) && this[EMITTED_END]) {
+ if (!this[PIPES].length && !this[FLOWING]) this[RESUME]();
+ } else if (ev === "readable" && this[BUFFERLENGTH] !== 0) super.emit("readable");
+ else if (isEndish(ev) && this[EMITTED_END]) {
super.emit(ev);
this.removeAllListeners(ev);
} else if (ev === "error" && this[EMITTED_ERROR]) {
@@ -45239,9 +42219,7 @@ var Minipass = class extends EventEmitter$1 {
const ret = super.off(ev, handler);
if (ev === "data") {
this[DATALISTENERS] = this.listeners("data").length;
- if (this[DATALISTENERS] === 0 && !this[DISCARDED] && !this[PIPES].length) {
- this[FLOWING] = false;
- }
+ if (this[DATALISTENERS] === 0 && !this[DISCARDED] && !this[PIPES].length) this[FLOWING] = false;
}
return ret;
}
@@ -45255,11 +42233,9 @@ var Minipass = class extends EventEmitter$1 {
*/
removeAllListeners(ev) {
const ret = super.removeAllListeners(ev);
- if (ev === "data" || ev === undefined) {
+ if (ev === "data" || ev === void 0) {
this[DATALISTENERS] = 0;
- if (!this[DISCARDED] && !this[PIPES].length) {
- this[FLOWING] = false;
- }
+ if (!this[DISCARDED] && !this[PIPES].length) this[FLOWING] = false;
}
return ret;
}
@@ -45305,13 +42281,10 @@ var Minipass = class extends EventEmitter$1 {
*/
emit(ev, ...args) {
const data = args[0];
- if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) {
- return false;
- } else if (ev === "data") {
- return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? (defer$1(() => this[EMITDATA](data)), true) : this[EMITDATA](data);
- } else if (ev === "end") {
- return this[EMITEND]();
- } else if (ev === "close") {
+ if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) return false;
+ else if (ev === "data") return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? (defer$1(() => this[EMITDATA](data)), true) : this[EMITDATA](data);
+ else if (ev === "end") return this[EMITEND]();
+ else if (ev === "close") {
this[CLOSED] = true;
if (!this[EMITTED_END] && !this[DESTROYED]) return false;
const ret = super.emit("close");
@@ -45337,9 +42310,7 @@ var Minipass = class extends EventEmitter$1 {
return ret;
}
[EMITDATA](data) {
- for (const p of this[PIPES]) {
- if (p.dest.write(data) === false) this.pause();
- }
+ for (const p of this[PIPES]) if (p.dest.write(data) === false) this.pause();
const ret = this[DISCARDED] ? false : super.emit("data", data);
this[MAYBE_EMIT_END]();
return ret;
@@ -45354,15 +42325,11 @@ var Minipass = class extends EventEmitter$1 {
if (this[DECODER]) {
const data = this[DECODER].end();
if (data) {
- for (const p of this[PIPES]) {
- p.dest.write(data);
- }
+ for (const p of this[PIPES]) p.dest.write(data);
if (!this[DISCARDED]) super.emit("data", data);
}
}
- for (const p of this[PIPES]) {
- p.end();
- }
+ for (const p of this[PIPES]) p.end();
const ret = super.emit("end");
this.removeAllListeners("end");
return ret;
@@ -45389,9 +42356,7 @@ var Minipass = class extends EventEmitter$1 {
* Not allowed on objectMode streams.
*/
async concat() {
- if (this[OBJECTMODE]) {
- throw new Error("cannot concat in objectMode");
- }
+ if (this[OBJECTMODE]) throw new Error("cannot concat in objectMode");
const buf = await this.collect();
return this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
}
@@ -45400,7 +42365,7 @@ var Minipass = class extends EventEmitter$1 {
*/
async promise() {
return new Promise((resolve, reject) => {
- this.on(DESTROYED, () => reject(new Error("stream destroyed")));
+ this.on(DESTROYED, () => reject(/* @__PURE__ */ new Error("stream destroyed")));
this.on("error", (er) => reject(er));
this.on("end", () => resolve());
});
@@ -45417,7 +42382,7 @@ var Minipass = class extends EventEmitter$1 {
this.pause();
stopped = true;
return {
- value: undefined,
+ value: void 0,
done: true
};
};
@@ -45455,10 +42420,10 @@ var Minipass = class extends EventEmitter$1 {
stop();
resolve({
done: true,
- value: undefined
+ value: void 0
});
};
- const ondestroy = () => onerr(new Error("stream destroyed"));
+ const ondestroy = () => onerr(/* @__PURE__ */ new Error("stream destroyed"));
return new Promise((res, rej) => {
reject = rej;
resolve = res;
@@ -45494,7 +42459,7 @@ var Minipass = class extends EventEmitter$1 {
stopped = true;
return {
done: true,
- value: undefined
+ value: void 0
};
};
const next = () => {
@@ -45556,7 +42521,6 @@ var Minipass = class extends EventEmitter$1 {
return isStream$1;
}
};
-
//#endregion
//#region ../node_modules/minizlib/dist/esm/constants.js
/* c8 ignore start */
@@ -45670,10 +42634,9 @@ const constants$1 = Object.freeze(Object.assign(Object.create(null), {
BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
BROTLI_DECODER_ERROR_UNREACHABLE: -31
}, realZlibConstants));
-
//#endregion
//#region ../node_modules/minizlib/dist/esm/index.js
-var esm_exports$1 = /* @__PURE__ */ __exportAll({
+var esm_exports$2 = /* @__PURE__ */ __exportAll({
BrotliCompress: () => BrotliCompress,
BrotliDecompress: () => BrotliDecompress,
Deflate: () => Deflate,
@@ -45692,7 +42655,7 @@ var esm_exports$1 = /* @__PURE__ */ __exportAll({
const OriginalBufferConcat = Buffer$1.concat;
const desc = Object.getOwnPropertyDescriptor(Buffer$1, "concat");
const noop$2 = (args) => args;
-const passthroughBufferConcat = desc?.writable === true || desc?.set !== undefined ? (makeNoOp) => {
+const passthroughBufferConcat = desc?.writable === true || desc?.set !== void 0 ? (makeNoOp) => {
Buffer$1.concat = makeNoOp ? noop$2 : OriginalBufferConcat;
} : (_) => {};
const _superWrite = Symbol("_superWrite");
@@ -45740,9 +42703,7 @@ var ZlibBase = class extends Minipass {
this.#finishFlushFlag = opts.finishFlush ?? 0;
this.#fullFlushFlag = opts.fullFlushFlag ?? 0;
/* c8 ignore stop */
- if (typeof realZlib[mode] !== "function") {
- throw new TypeError("Compression method not supported: " + mode);
- }
+ if (typeof realZlib[mode] !== "function") throw new TypeError("Compression method not supported: " + mode);
try {
this.#handle = new realZlib[mode](opts);
} catch (er) {
@@ -45760,7 +42721,7 @@ var ZlibBase = class extends Minipass {
close() {
if (this.#handle) {
this.#handle.close();
- this.#handle = undefined;
+ this.#handle = void 0;
this.emit("close");
}
}
@@ -45779,18 +42740,16 @@ var ZlibBase = class extends Minipass {
/* c8 ignore start */
if (typeof chunk === "function") {
cb = chunk;
- encoding = undefined;
- chunk = undefined;
+ encoding = void 0;
+ chunk = void 0;
}
if (typeof encoding === "function") {
cb = encoding;
- encoding = undefined;
+ encoding = void 0;
}
/* c8 ignore stop */
- if (chunk) {
- if (encoding) this.write(chunk, encoding);
- else this.write(chunk);
- }
+ if (chunk) if (encoding) this.write(chunk, encoding);
+ else this.write(chunk);
this.flush(this.#finishFlushFlag);
this.#ended = true;
return super.end(cb);
@@ -45812,7 +42771,7 @@ var ZlibBase = class extends Minipass {
const originalClose = this.#handle.close;
this.#handle.close = () => {};
passthroughBufferConcat(true);
- let result = undefined;
+ let result = void 0;
try {
const flushFlag = typeof chunk[_flushFlag] === "number" ? chunk[_flushFlag] : this.#flushFlag;
result = this.#handle._processChunk(chunk, flushFlag);
@@ -45822,7 +42781,6 @@ var ZlibBase = class extends Minipass {
this.#onError(new ZlibError(err, this.write));
} finally {
if (this.#handle) {
- ;
this.#handle._handle = nativeHandle;
nativeHandle.close = originalNativeClose;
this.#handle.close = originalClose;
@@ -45831,17 +42789,11 @@ var ZlibBase = class extends Minipass {
}
if (this.#handle) this.#handle.on("error", (er) => this.#onError(new ZlibError(er, this.write)));
let writeReturn;
- if (result) {
- if (Array.isArray(result) && result.length > 0) {
- const r = result[0];
- writeReturn = this[_superWrite](Buffer$1.from(r));
- for (let i = 1; i < result.length; i++) {
- writeReturn = this[_superWrite](result[i]);
- }
- } else {
- writeReturn = this[_superWrite](Buffer$1.from(result));
- }
- }
+ if (result) if (Array.isArray(result) && result.length > 0) {
+ const r = result[0];
+ writeReturn = this[_superWrite](Buffer$1.from(r));
+ for (let i = 1; i < result.length; i++) writeReturn = this[_superWrite](result[i]);
+ } else writeReturn = this[_superWrite](Buffer$1.from(result));
if (cb) cb();
return writeReturn;
}
@@ -45879,7 +42831,6 @@ var Zlib = class extends ZlibBase {
cb?.();
};
try {
- ;
this.handle.params(level, strategy);
} finally {
this.handle.flush = origFlush;
@@ -45973,1029 +42924,1979 @@ var ZstdDecompress = class extends Zstd {
super(opts, "ZstdDecompress");
}
};
-
//#endregion
-//#region ../node_modules/lodash/lodash.js
-var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
+//#region ../node_modules/lru-cache/dist/mjs/index.js
+/**
+* @module LRUCache
+*/
+const perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
+const warned = /* @__PURE__ */ new Set();
+/* c8 ignore start */
+const PROCESS = typeof process === "object" && !!process ? process : {};
+/* c8 ignore start */
+const emitWarning = (msg, type, code, fn) => {
+ typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`);
+};
+let AC = globalThis.AbortController;
+let AS = globalThis.AbortSignal;
+/* c8 ignore start */
+if (typeof AC === "undefined") {
+ AS = class AbortSignal {
+ onabort;
+ _onabort = [];
+ reason;
+ aborted = false;
+ addEventListener(_, fn) {
+ this._onabort.push(fn);
+ }
+ };
+ AC = class AbortController {
+ constructor() {
+ warnACPolyfill();
+ }
+ signal = new AS();
+ abort(reason) {
+ if (this.signal.aborted) return;
+ this.signal.reason = reason;
+ this.signal.aborted = true;
+ for (const fn of this.signal._onabort) fn(reason);
+ this.signal.onabort?.(reason);
+ }
+ };
+ let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
+ const warnACPolyfill = () => {
+ if (!printACPolyfillWarning) return;
+ printACPolyfillWarning = false;
+ emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill);
+ };
+}
+/* c8 ignore stop */
+const shouldWarn = (code) => !warned.has(code);
+const TYPE = Symbol("type");
+const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
+/* c8 ignore start */
+const getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
+/* c8 ignore stop */
+var ZeroArray = class extends Array {
+ constructor(size) {
+ super(size);
+ this.fill(0);
+ }
+};
+var Stack = class Stack {
+ heap;
+ length;
+ static #constructing = false;
+ static create(max) {
+ const HeapCls = getUintArray(max);
+ if (!HeapCls) return [];
+ Stack.#constructing = true;
+ const s = new Stack(max, HeapCls);
+ Stack.#constructing = false;
+ return s;
+ }
+ constructor(max, HeapCls) {
+ /* c8 ignore start */
+ if (!Stack.#constructing) throw new TypeError("instantiate Stack using Stack.create(n)");
+ /* c8 ignore stop */
+ this.heap = new HeapCls(max);
+ this.length = 0;
+ }
+ push(n) {
+ this.heap[this.length++] = n;
+ }
+ pop() {
+ return this.heap[--this.length];
+ }
+};
+/**
+* Default export, the thing you're using this module to get.
+*
+* All properties from the options object (with the exception of
+* {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as
+* normal public members. (`max` and `maxBase` are read-only getters.)
+* Changing any of these will alter the defaults for subsequent method calls,
+* but is otherwise safe.
+*/
+var LRUCache = class LRUCache {
+ #max;
+ #maxSize;
+ #dispose;
+ #disposeAfter;
+ #fetchMethod;
/**
- * @license
- * Lodash
- * Copyright OpenJS Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * {@link LRUCache.OptionsBase.ttl}
*/
- ;
- (function() {
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined;
- /** Used as the semantic version number. */
- var VERSION = "4.17.21";
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
- /** Error message constants. */
- var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
- /** Used as the maximum memoize cache size. */
- var MAX_MEMOIZE_SIZE = 500;
- /** Used as the internal argument placeholder. */
- var PLACEHOLDER = "__lodash_placeholder__";
- /** Used to compose bitmasks for cloning. */
- var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
- /** Used to compose bitmasks for function metadata. */
- var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
- /** Used as default options for `_.truncate`. */
- var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
- var HOT_COUNT = 800, HOT_SPAN = 16;
- /** Used to indicate the type of lazy iteratees. */
- var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
- /** Used as references for the maximum length and index of an array. */
- var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
- /** Used to associate wrap methods with their bit flags. */
- var wrapFlags = [
- ["ary", WRAP_ARY_FLAG],
- ["bind", WRAP_BIND_FLAG],
- ["bindKey", WRAP_BIND_KEY_FLAG],
- ["curry", WRAP_CURRY_FLAG],
- ["curryRight", WRAP_CURRY_RIGHT_FLAG],
- ["flip", WRAP_FLIP_FLAG],
- ["partial", WRAP_PARTIAL_FLAG],
- ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
- ["rearg", WRAP_REARG_FLAG]
- ];
- /** `Object#toString` result references. */
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
- var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
- /** Used to match empty string literals in compiled template source. */
- var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
- /** Used to match HTML entities and HTML characters. */
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
- /** Used to match template delimiters. */
- var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
- /** Used to match leading whitespace. */
- var reTrimStart = /^\s+/;
- /** Used to match a single whitespace character. */
- var reWhitespace = /\s/;
- /** Used to match wrap detail comments. */
- var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
- /** Used to match words composed of alphanumeric characters. */
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
- /**
- * Used to validate the `validate` option in `_.template` variable.
- *
- * Forbids characters which could potentially change the meaning of the function argument definition:
- * - "()," (modification of function parameters)
- * - "=" (default value)
- * - "[]{}" (destructuring of function parameters)
- * - "/" (beginning of a comment)
- * - whitespace
- */
- var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
- /**
- * Used to match
- * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
- */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
- /** Used to match Latin Unicode letters (excluding mathematical operators). */
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
- /** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
- /** Used to compose unicode character classes. */
- var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
- /** Used to compose unicode capture groups. */
- var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
- /** Used to compose unicode regexes. */
- var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
- rsNonAstral,
- rsRegional,
- rsSurrPair
- ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
- rsDingbat,
- rsRegional,
- rsSurrPair
- ].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [
- rsNonAstral + rsCombo + "?",
- rsCombo,
- rsRegional,
- rsSurrPair,
- rsAstral
- ].join("|") + ")";
- /** Used to match apostrophes. */
- var reApos = RegExp(rsApos, "g");
- /**
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
- */
- var reComboMark = RegExp(rsCombo, "g");
- /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
- var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
- /** Used to match complex or compound words. */
- var reUnicodeWord = RegExp([
- rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [
- rsBreak,
- rsUpper,
- "$"
- ].join("|") + ")",
- rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [
- rsBreak,
- rsUpper + rsMiscLower,
- "$"
- ].join("|") + ")",
- rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
- rsUpper + "+" + rsOptContrUpper,
- rsOrdUpper,
- rsOrdLower,
- rsDigits,
- rsEmoji
- ].join("|"), "g");
- /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
- var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
- /** Used to detect strings that need a more robust regexp to match words. */
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
- /** Used to assign default `context` object properties. */
- var contextProps = [
- "Array",
- "Buffer",
- "DataView",
- "Date",
- "Error",
- "Float32Array",
- "Float64Array",
- "Function",
- "Int8Array",
- "Int16Array",
- "Int32Array",
- "Map",
- "Math",
- "Object",
- "Promise",
- "RegExp",
- "Set",
- "String",
- "Symbol",
- "TypeError",
- "Uint8Array",
- "Uint8ClampedArray",
- "Uint16Array",
- "Uint32Array",
- "WeakMap",
- "_",
- "clearTimeout",
- "isFinite",
- "parseInt",
- "setTimeout"
- ];
- /** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1;
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
- /** Used to map Latin Unicode letters to basic Latin letters. */
- var deburredLetters = {
- "À": "A",
- "Á": "A",
- "Â": "A",
- "Ã": "A",
- "Ä": "A",
- "Å": "A",
- "à": "a",
- "á": "a",
- "â": "a",
- "ã": "a",
- "ä": "a",
- "å": "a",
- "Ç": "C",
- "ç": "c",
- "Ð": "D",
- "ð": "d",
- "È": "E",
- "É": "E",
- "Ê": "E",
- "Ë": "E",
- "è": "e",
- "é": "e",
- "ê": "e",
- "ë": "e",
- "Ì": "I",
- "Í": "I",
- "Î": "I",
- "Ï": "I",
- "ì": "i",
- "í": "i",
- "î": "i",
- "ï": "i",
- "Ñ": "N",
- "ñ": "n",
- "Ò": "O",
- "Ó": "O",
- "Ô": "O",
- "Õ": "O",
- "Ö": "O",
- "Ø": "O",
- "ò": "o",
- "ó": "o",
- "ô": "o",
- "õ": "o",
- "ö": "o",
- "ø": "o",
- "Ù": "U",
- "Ú": "U",
- "Û": "U",
- "Ü": "U",
- "ù": "u",
- "ú": "u",
- "û": "u",
- "ü": "u",
- "Ý": "Y",
- "ý": "y",
- "ÿ": "y",
- "Æ": "Ae",
- "æ": "ae",
- "Þ": "Th",
- "þ": "th",
- "ß": "ss",
- "Ā": "A",
- "Ă": "A",
- "Ą": "A",
- "ā": "a",
- "ă": "a",
- "ą": "a",
- "Ć": "C",
- "Ĉ": "C",
- "Ċ": "C",
- "Č": "C",
- "ć": "c",
- "ĉ": "c",
- "ċ": "c",
- "č": "c",
- "Ď": "D",
- "Đ": "D",
- "ď": "d",
- "đ": "d",
- "Ē": "E",
- "Ĕ": "E",
- "Ė": "E",
- "Ę": "E",
- "Ě": "E",
- "ē": "e",
- "ĕ": "e",
- "ė": "e",
- "ę": "e",
- "ě": "e",
- "Ĝ": "G",
- "Ğ": "G",
- "Ġ": "G",
- "Ģ": "G",
- "ĝ": "g",
- "ğ": "g",
- "ġ": "g",
- "ģ": "g",
- "Ĥ": "H",
- "Ħ": "H",
- "ĥ": "h",
- "ħ": "h",
- "Ĩ": "I",
- "Ī": "I",
- "Ĭ": "I",
- "Į": "I",
- "İ": "I",
- "ĩ": "i",
- "ī": "i",
- "ĭ": "i",
- "į": "i",
- "ı": "i",
- "Ĵ": "J",
- "ĵ": "j",
- "Ķ": "K",
- "ķ": "k",
- "ĸ": "k",
- "Ĺ": "L",
- "Ļ": "L",
- "Ľ": "L",
- "Ŀ": "L",
- "Ł": "L",
- "ĺ": "l",
- "ļ": "l",
- "ľ": "l",
- "ŀ": "l",
- "ł": "l",
- "Ń": "N",
- "Ņ": "N",
- "Ň": "N",
- "Ŋ": "N",
- "ń": "n",
- "ņ": "n",
- "ň": "n",
- "ŋ": "n",
- "Ō": "O",
- "Ŏ": "O",
- "Ő": "O",
- "ō": "o",
- "ŏ": "o",
- "ő": "o",
- "Ŕ": "R",
- "Ŗ": "R",
- "Ř": "R",
- "ŕ": "r",
- "ŗ": "r",
- "ř": "r",
- "Ś": "S",
- "Ŝ": "S",
- "Ş": "S",
- "Š": "S",
- "ś": "s",
- "ŝ": "s",
- "ş": "s",
- "š": "s",
- "Ţ": "T",
- "Ť": "T",
- "Ŧ": "T",
- "ţ": "t",
- "ť": "t",
- "ŧ": "t",
- "Ũ": "U",
- "Ū": "U",
- "Ŭ": "U",
- "Ů": "U",
- "Ű": "U",
- "Ų": "U",
- "ũ": "u",
- "ū": "u",
- "ŭ": "u",
- "ů": "u",
- "ű": "u",
- "ų": "u",
- "Ŵ": "W",
- "ŵ": "w",
- "Ŷ": "Y",
- "ŷ": "y",
- "Ÿ": "Y",
- "Ź": "Z",
- "Ż": "Z",
- "Ž": "Z",
- "ź": "z",
- "ż": "z",
- "ž": "z",
- "IJ": "IJ",
- "ij": "ij",
- "Œ": "Oe",
- "œ": "oe",
- "ʼn": "'n",
- "ſ": "s"
- };
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- "&": "&",
- "<": "<",
- ">": ">",
- "\"": """,
- "'": "'"
- };
- /** Used to map HTML entities to characters. */
- var htmlUnescapes = {
- "&": "&",
- "<": "<",
- ">": ">",
- """: "\"",
- "'": "'"
- };
- /** Used to escape characters for inclusion in compiled string literals. */
- var stringEscapes = {
- "\\": "\\",
- "'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029"
+ ttl;
+ /**
+ * {@link LRUCache.OptionsBase.ttlResolution}
+ */
+ ttlResolution;
+ /**
+ * {@link LRUCache.OptionsBase.ttlAutopurge}
+ */
+ ttlAutopurge;
+ /**
+ * {@link LRUCache.OptionsBase.updateAgeOnGet}
+ */
+ updateAgeOnGet;
+ /**
+ * {@link LRUCache.OptionsBase.updateAgeOnHas}
+ */
+ updateAgeOnHas;
+ /**
+ * {@link LRUCache.OptionsBase.allowStale}
+ */
+ allowStale;
+ /**
+ * {@link LRUCache.OptionsBase.noDisposeOnSet}
+ */
+ noDisposeOnSet;
+ /**
+ * {@link LRUCache.OptionsBase.noUpdateTTL}
+ */
+ noUpdateTTL;
+ /**
+ * {@link LRUCache.OptionsBase.maxEntrySize}
+ */
+ maxEntrySize;
+ /**
+ * {@link LRUCache.OptionsBase.sizeCalculation}
+ */
+ sizeCalculation;
+ /**
+ * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
+ */
+ noDeleteOnFetchRejection;
+ /**
+ * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
+ */
+ noDeleteOnStaleGet;
+ /**
+ * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
+ */
+ allowStaleOnFetchAbort;
+ /**
+ * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
+ */
+ allowStaleOnFetchRejection;
+ /**
+ * {@link LRUCache.OptionsBase.ignoreFetchAbort}
+ */
+ ignoreFetchAbort;
+ #size;
+ #calculatedSize;
+ #keyMap;
+ #keyList;
+ #valList;
+ #next;
+ #prev;
+ #head;
+ #tail;
+ #free;
+ #disposed;
+ #sizes;
+ #starts;
+ #ttls;
+ #hasDispose;
+ #hasFetchMethod;
+ #hasDisposeAfter;
+ /**
+ * Do not call this method unless you need to inspect the
+ * inner workings of the cache. If anything returned by this
+ * object is modified in any way, strange breakage may occur.
+ *
+ * These fields are private for a reason!
+ *
+ * @internal
+ */
+ static unsafeExposeInternals(c) {
+ return {
+ starts: c.#starts,
+ ttls: c.#ttls,
+ sizes: c.#sizes,
+ keyMap: c.#keyMap,
+ keyList: c.#keyList,
+ valList: c.#valList,
+ next: c.#next,
+ prev: c.#prev,
+ get head() {
+ return c.#head;
+ },
+ get tail() {
+ return c.#tail;
+ },
+ free: c.#free,
+ isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
+ backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
+ moveToTail: (index) => c.#moveToTail(index),
+ indexes: (options) => c.#indexes(options),
+ rindexes: (options) => c.#rindexes(options),
+ isStale: (index) => c.#isStale(index)
};
- /** Built-in method references without a dependency on `root`. */
- var freeParseFloat = parseFloat, freeParseInt = parseInt;
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
- /** Detect free variable `self`. */
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function("return this")();
- /** Detect free variable `exports`. */
- var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
- /** Detect free variable `process` from Node.js. */
- var freeProcess = moduleExports && freeGlobal.process;
- /** Used to access faster Node.js helpers. */
- var nodeUtil = function() {
- try {
- var types = freeModule && freeModule.require && freeModule.require("util").types;
- if (types) {
- return types;
- }
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
- } catch (e) {}
- }();
- var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
- /**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
- function apply(func, thisArg, args) {
- switch (args.length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
+ }
+ /**
+ * {@link LRUCache.OptionsBase.max} (read-only)
+ */
+ get max() {
+ return this.#max;
+ }
+ /**
+ * {@link LRUCache.OptionsBase.maxSize} (read-only)
+ */
+ get maxSize() {
+ return this.#maxSize;
+ }
+ /**
+ * The total computed size of items in the cache (read-only)
+ */
+ get calculatedSize() {
+ return this.#calculatedSize;
+ }
+ /**
+ * The number of items stored in the cache (read-only)
+ */
+ get size() {
+ return this.#size;
+ }
+ /**
+ * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
+ */
+ get fetchMethod() {
+ return this.#fetchMethod;
+ }
+ /**
+ * {@link LRUCache.OptionsBase.dispose} (read-only)
+ */
+ get dispose() {
+ return this.#dispose;
+ }
+ /**
+ * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
+ */
+ get disposeAfter() {
+ return this.#disposeAfter;
+ }
+ constructor(options) {
+ const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
+ if (max !== 0 && !isPosInt(max)) throw new TypeError("max option must be a nonnegative integer");
+ const UintArray = max ? getUintArray(max) : Array;
+ if (!UintArray) throw new Error("invalid max value: " + max);
+ this.#max = max;
+ this.#maxSize = maxSize;
+ this.maxEntrySize = maxEntrySize || this.#maxSize;
+ this.sizeCalculation = sizeCalculation;
+ if (this.sizeCalculation) {
+ if (!this.#maxSize && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
+ if (typeof this.sizeCalculation !== "function") throw new TypeError("sizeCalculation set to non-function");
}
- /**
- * A specialized version of `baseAggregator` for arrays.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform keys.
- * @param {Object} accumulator The initial aggregated object.
- * @returns {Function} Returns `accumulator`.
- */
- function arrayAggregator(array, setter, iteratee, accumulator) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) {
- var value = array[index];
- setter(accumulator, value, iteratee(value), array);
- }
- return accumulator;
+ if (fetchMethod !== void 0 && typeof fetchMethod !== "function") throw new TypeError("fetchMethod must be a function if specified");
+ this.#fetchMethod = fetchMethod;
+ this.#hasFetchMethod = !!fetchMethod;
+ this.#keyMap = /* @__PURE__ */ new Map();
+ this.#keyList = new Array(max).fill(void 0);
+ this.#valList = new Array(max).fill(void 0);
+ this.#next = new UintArray(max);
+ this.#prev = new UintArray(max);
+ this.#head = 0;
+ this.#tail = 0;
+ this.#free = Stack.create(max);
+ this.#size = 0;
+ this.#calculatedSize = 0;
+ if (typeof dispose === "function") this.#dispose = dispose;
+ if (typeof disposeAfter === "function") {
+ this.#disposeAfter = disposeAfter;
+ this.#disposed = [];
+ } else {
+ this.#disposeAfter = void 0;
+ this.#disposed = void 0;
}
- /**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
+ this.#hasDispose = !!this.#dispose;
+ this.#hasDisposeAfter = !!this.#disposeAfter;
+ this.noDisposeOnSet = !!noDisposeOnSet;
+ this.noUpdateTTL = !!noUpdateTTL;
+ this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
+ this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
+ this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
+ this.ignoreFetchAbort = !!ignoreFetchAbort;
+ if (this.maxEntrySize !== 0) {
+ if (this.#maxSize !== 0) {
+ if (!isPosInt(this.#maxSize)) throw new TypeError("maxSize must be a positive integer if specified");
}
- return array;
+ if (!isPosInt(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
+ this.#initializeSizeTracking();
}
- /**
- * A specialized version of `_.forEachRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEachRight(array, iteratee) {
- var length = array == null ? 0 : array.length;
- while (length--) {
- if (iteratee(array[length], length, array) === false) {
- break;
- }
+ this.allowStale = !!allowStale;
+ this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
+ this.updateAgeOnGet = !!updateAgeOnGet;
+ this.updateAgeOnHas = !!updateAgeOnHas;
+ this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
+ this.ttlAutopurge = !!ttlAutopurge;
+ this.ttl = ttl || 0;
+ if (this.ttl) {
+ if (!isPosInt(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
+ this.#initializeTTLTracking();
+ }
+ if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
+ if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
+ const code = "LRU_CACHE_UNBOUNDED";
+ if (shouldWarn(code)) {
+ warned.add(code);
+ emitWarning("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", code, LRUCache);
}
- return array;
}
- /**
- * A specialized version of `_.every` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- */
- function arrayEvery(array, predicate) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) {
- if (!predicate(array[index], index, array)) {
- return false;
- }
+ }
+ /**
+ * Return the remaining TTL time for a given entry key
+ */
+ getRemainingTTL(key) {
+ return this.#keyMap.has(key) ? Infinity : 0;
+ }
+ #initializeTTLTracking() {
+ const ttls = new ZeroArray(this.#max);
+ const starts = new ZeroArray(this.#max);
+ this.#ttls = ttls;
+ this.#starts = starts;
+ this.#setItemTTL = (index, ttl, start = perf.now()) => {
+ starts[index] = ttl !== 0 ? start : 0;
+ ttls[index] = ttl;
+ if (ttl !== 0 && this.ttlAutopurge) {
+ const t = setTimeout(() => {
+ if (this.#isStale(index)) this.delete(this.#keyList[index]);
+ }, ttl + 1);
+ /* c8 ignore start */
+ if (t.unref) t.unref();
}
- return true;
- }
- /**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[resIndex++] = value;
- }
+ };
+ this.#updateItemAge = (index) => {
+ starts[index] = ttls[index] !== 0 ? perf.now() : 0;
+ };
+ this.#statusTTL = (status, index) => {
+ if (ttls[index]) {
+ const ttl = ttls[index];
+ const start = starts[index];
+ status.ttl = ttl;
+ status.start = start;
+ status.now = cachedNow || getNow();
+ status.remainingTTL = ttl - (status.now - start);
}
- return result;
+ };
+ let cachedNow = 0;
+ const getNow = () => {
+ const n = perf.now();
+ if (this.ttlResolution > 0) {
+ cachedNow = n;
+ const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
+ /* c8 ignore start */
+ if (t.unref) t.unref();
+ }
+ return n;
+ };
+ this.getRemainingTTL = (key) => {
+ const index = this.#keyMap.get(key);
+ if (index === void 0) return 0;
+ const ttl = ttls[index];
+ const start = starts[index];
+ if (ttl === 0 || start === 0) return Infinity;
+ return ttl - ((cachedNow || getNow()) - start);
+ };
+ this.#isStale = (index) => {
+ return ttls[index] !== 0 && starts[index] !== 0 && (cachedNow || getNow()) - starts[index] > ttls[index];
+ };
+ }
+ #updateItemAge = () => {};
+ #statusTTL = () => {};
+ #setItemTTL = () => {};
+ /* c8 ignore stop */
+ #isStale = () => false;
+ #initializeSizeTracking() {
+ const sizes = new ZeroArray(this.#max);
+ this.#calculatedSize = 0;
+ this.#sizes = sizes;
+ this.#removeItemSize = (index) => {
+ this.#calculatedSize -= sizes[index];
+ sizes[index] = 0;
+ };
+ this.#requireSize = (k, v, size, sizeCalculation) => {
+ if (this.#isBackgroundFetch(v)) return 0;
+ if (!isPosInt(size)) if (sizeCalculation) {
+ if (typeof sizeCalculation !== "function") throw new TypeError("sizeCalculation must be a function");
+ size = sizeCalculation(v, k);
+ if (!isPosInt(size)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
+ } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
+ return size;
+ };
+ this.#addItemSize = (index, size, status) => {
+ sizes[index] = size;
+ if (this.#maxSize) {
+ const maxSize = this.#maxSize - sizes[index];
+ while (this.#calculatedSize > maxSize) this.#evict(true);
+ }
+ this.#calculatedSize += sizes[index];
+ if (status) {
+ status.entrySize = size;
+ status.totalCalculatedSize = this.#calculatedSize;
+ }
+ };
+ }
+ #removeItemSize = (_i) => {};
+ #addItemSize = (_i, _s, _st) => {};
+ #requireSize = (_k, _v, size, sizeCalculation) => {
+ if (size || sizeCalculation) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
+ return 0;
+ };
+ *#indexes({ allowStale = this.allowStale } = {}) {
+ if (this.#size) for (let i = this.#tail;;) {
+ if (!this.#isValidIndex(i)) break;
+ if (allowStale || !this.#isStale(i)) yield i;
+ if (i === this.#head) break;
+ else i = this.#prev[i];
}
- /**
- * A specialized version of `_.includes` for arrays without support for
- * specifying an index to search from.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludes(array, value) {
- var length = array == null ? 0 : array.length;
- return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+ *#rindexes({ allowStale = this.allowStale } = {}) {
+ if (this.#size) for (let i = this.#head;;) {
+ if (!this.#isValidIndex(i)) break;
+ if (allowStale || !this.#isStale(i)) yield i;
+ if (i === this.#tail) break;
+ else i = this.#next[i];
}
- /**
- * This function is like `arrayIncludes` except that it accepts a comparator.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludesWith(array, value, comparator) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) {
- if (comparator(value, array[index])) {
- return true;
- }
- }
- return false;
+ }
+ #isValidIndex(index) {
+ return index !== void 0 && this.#keyMap.get(this.#keyList[index]) === index;
+ }
+ /**
+ * Return a generator yielding `[key, value]` pairs,
+ * in order from most recently used to least recently used.
+ */
+ *entries() {
+ for (const i of this.#indexes()) if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) yield [this.#keyList[i], this.#valList[i]];
+ }
+ /**
+ * Inverse order version of {@link LRUCache.entries}
+ *
+ * Return a generator yielding `[key, value]` pairs,
+ * in order from least recently used to most recently used.
+ */
+ *rentries() {
+ for (const i of this.#rindexes()) if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) yield [this.#keyList[i], this.#valList[i]];
+ }
+ /**
+ * Return a generator yielding the keys in the cache,
+ * in order from most recently used to least recently used.
+ */
+ *keys() {
+ for (const i of this.#indexes()) {
+ const k = this.#keyList[i];
+ if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) yield k;
}
- /**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
+ }
+ /**
+ * Inverse order version of {@link LRUCache.keys}
+ *
+ * Return a generator yielding the keys in the cache,
+ * in order from least recently used to most recently used.
+ */
+ *rkeys() {
+ for (const i of this.#rindexes()) {
+ const k = this.#keyList[i];
+ if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) yield k;
}
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1, length = values.length, offset = array.length;
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
+ }
+ /**
+ * Return a generator yielding the values in the cache,
+ * in order from most recently used to least recently used.
+ */
+ *values() {
+ for (const i of this.#indexes()) if (this.#valList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) yield this.#valList[i];
+ }
+ /**
+ * Inverse order version of {@link LRUCache.values}
+ *
+ * Return a generator yielding the values in the cache,
+ * in order from least recently used to most recently used.
+ */
+ *rvalues() {
+ for (const i of this.#rindexes()) if (this.#valList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) yield this.#valList[i];
+ }
+ /**
+ * Iterating over the cache itself yields the same results as
+ * {@link LRUCache.entries}
+ */
+ [Symbol.iterator]() {
+ return this.entries();
+ }
+ /**
+ * Find a value for which the supplied fn method returns a truthy value,
+ * similar to Array.find(). fn is called as fn(value, key, cache).
+ */
+ find(fn, getOptions = {}) {
+ for (const i of this.#indexes()) {
+ const v = this.#valList[i];
+ const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+ if (value === void 0) continue;
+ if (fn(value, this.#keyList[i], this)) return this.get(this.#keyList[i], getOptions);
}
- /**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1, length = array == null ? 0 : array.length;
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
+ }
+ /**
+ * Call the supplied function on each item in the cache, in order from
+ * most recently used to least recently used. fn is called as
+ * fn(value, key, cache). Does not update age or recenty of use.
+ * Does not iterate over stale values.
+ */
+ forEach(fn, thisp = this) {
+ for (const i of this.#indexes()) {
+ const v = this.#valList[i];
+ const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+ if (value === void 0) continue;
+ fn.call(thisp, value, this.#keyList[i], this);
}
- /**
- * A specialized version of `_.reduceRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the last element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduceRight(array, iteratee, accumulator, initAccum) {
- var length = array == null ? 0 : array.length;
- if (initAccum && length) {
- accumulator = array[--length];
- }
- while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ /**
+ * The same as {@link LRUCache.forEach} but items are iterated over in
+ * reverse order. (ie, less recently used items are iterated over first.)
+ */
+ rforEach(fn, thisp = this) {
+ for (const i of this.#rindexes()) {
+ const v = this.#valList[i];
+ const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+ if (value === void 0) continue;
+ fn.call(thisp, value, this.#keyList[i], this);
+ }
+ }
+ /**
+ * Delete any stale entries. Returns true if anything was removed,
+ * false otherwise.
+ */
+ purgeStale() {
+ let deleted = false;
+ for (const i of this.#rindexes({ allowStale: true })) if (this.#isStale(i)) {
+ this.delete(this.#keyList[i]);
+ deleted = true;
+ }
+ return deleted;
+ }
+ /**
+ * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
+ * passed to cache.load()
+ */
+ dump() {
+ const arr = [];
+ for (const i of this.#indexes({ allowStale: true })) {
+ const key = this.#keyList[i];
+ const v = this.#valList[i];
+ const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+ if (value === void 0 || key === void 0) continue;
+ const entry = { value };
+ if (this.#ttls && this.#starts) {
+ entry.ttl = this.#ttls[i];
+ const age = perf.now() - this.#starts[i];
+ entry.start = Math.floor(Date.now() - age);
}
- return accumulator;
+ if (this.#sizes) entry.size = this.#sizes[i];
+ arr.unshift([key, entry]);
}
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
+ return arr;
+ }
+ /**
+ * Reset the cache and load in the items in entries in the order listed.
+ * Note that the shape of the resulting cache may be different if the
+ * same options are not used in both caches.
+ */
+ load(arr) {
+ this.clear();
+ for (const [key, entry] of arr) {
+ if (entry.start) {
+ const age = Date.now() - entry.start;
+ entry.start = perf.now() - age;
}
- return false;
+ this.set(key, entry.value, entry);
}
- /**
- * Gets the size of an ASCII `string`.
- *
- * @private
- * @param {string} string The string inspect.
- * @returns {number} Returns the string size.
- */
- var asciiSize = baseProperty("length");
- /**
- * Converts an ASCII `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
- function asciiToArray(string) {
- return string.split("");
+ }
+ /**
+ * Add a value to the cache.
+ *
+ * Note: if `undefined` is specified as a value, this is an alias for
+ * {@link LRUCache#delete}
+ */
+ set(k, v, setOptions = {}) {
+ if (v === void 0) {
+ this.delete(k);
+ return this;
}
- /**
- * Splits an ASCII `string` into an array of its words.
- *
- * @private
- * @param {string} The string to inspect.
- * @returns {Array} Returns the words of `string`.
- */
- function asciiWords(string) {
- return string.match(reAsciiWord) || [];
+ const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
+ let { noUpdateTTL = this.noUpdateTTL } = setOptions;
+ const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
+ if (this.maxEntrySize && size > this.maxEntrySize) {
+ if (status) {
+ status.set = "miss";
+ status.maxEntrySizeExceeded = true;
+ }
+ this.delete(k);
+ return this;
}
- /**
- * The base implementation of methods like `_.findKey` and `_.findLastKey`,
- * without support for iteratee shorthands, which iterates over `collection`
- * using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the found element or its key, else `undefined`.
- */
- function baseFindKey(collection, predicate, eachFunc) {
- var result;
- eachFunc(collection, function(value, key, collection) {
- if (predicate(value, key, collection)) {
- result = key;
- return false;
+ let index = this.#size === 0 ? void 0 : this.#keyMap.get(k);
+ if (index === void 0) {
+ index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
+ this.#keyList[index] = k;
+ this.#valList[index] = v;
+ this.#keyMap.set(k, index);
+ this.#next[this.#tail] = index;
+ this.#prev[index] = this.#tail;
+ this.#tail = index;
+ this.#size++;
+ this.#addItemSize(index, size, status);
+ if (status) status.set = "add";
+ noUpdateTTL = false;
+ } else {
+ this.#moveToTail(index);
+ const oldVal = this.#valList[index];
+ if (v !== oldVal) {
+ if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) oldVal.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
+ else if (!noDisposeOnSet) {
+ if (this.#hasDispose) this.#dispose?.(oldVal, k, "set");
+ if (this.#hasDisposeAfter) this.#disposed?.push([
+ oldVal,
+ k,
+ "set"
+ ]);
}
- });
- return result;
- }
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
- var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
- while (fromRight ? index-- : ++index < length) {
- if (predicate(array[index], index, array)) {
- return index;
+ this.#removeItemSize(index);
+ this.#addItemSize(index, size, status);
+ this.#valList[index] = v;
+ if (status) {
+ status.set = "replace";
+ const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
+ if (oldValue !== void 0) status.oldValue = oldValue;
}
- }
- return -1;
+ } else if (status) status.set = "update";
}
- /**
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
+ if (ttl !== 0 && !this.#ttls) this.#initializeTTLTracking();
+ if (this.#ttls) {
+ if (!noUpdateTTL) this.#setItemTTL(index, ttl, start);
+ if (status) this.#statusTTL(status, index);
}
- /**
- * This function is like `baseIndexOf` except that it accepts a comparator.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOfWith(array, value, fromIndex, comparator) {
- var index = fromIndex - 1, length = array.length;
- while (++index < length) {
- if (comparator(array[index], value)) {
- return index;
- }
- }
- return -1;
+ if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
+ const dt = this.#disposed;
+ let task;
+ while (task = dt?.shift()) this.#disposeAfter?.(...task);
}
- /**
- * The base implementation of `_.isNaN` without support for number objects.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- */
- function baseIsNaN(value) {
- return value !== value;
+ return this;
+ }
+ /**
+ * Evict the least recently used item, returning its value or
+ * `undefined` if cache is empty.
+ */
+ pop() {
+ try {
+ while (this.#size) {
+ const val = this.#valList[this.#head];
+ this.#evict(true);
+ if (this.#isBackgroundFetch(val)) {
+ if (val.__staleWhileFetching) return val.__staleWhileFetching;
+ } else if (val !== void 0) return val;
+ }
+ } finally {
+ if (this.#hasDisposeAfter && this.#disposed) {
+ const dt = this.#disposed;
+ let task;
+ while (task = dt?.shift()) this.#disposeAfter?.(...task);
+ }
}
- /**
- * The base implementation of `_.mean` and `_.meanBy` without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the mean.
- */
- function baseMean(array, iteratee) {
- var length = array == null ? 0 : array.length;
- return length ? baseSum(array, iteratee) / length : NAN;
+ }
+ #evict(free) {
+ const head = this.#head;
+ const k = this.#keyList[head];
+ const v = this.#valList[head];
+ if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) v.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
+ else if (this.#hasDispose || this.#hasDisposeAfter) {
+ if (this.#hasDispose) this.#dispose?.(v, k, "evict");
+ if (this.#hasDisposeAfter) this.#disposed?.push([
+ v,
+ k,
+ "evict"
+ ]);
}
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
+ this.#removeItemSize(head);
+ if (free) {
+ this.#keyList[head] = void 0;
+ this.#valList[head] = void 0;
+ this.#free.push(head);
}
- /**
- * The base implementation of `_.propertyOf` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new accessor function.
- */
- function basePropertyOf(object) {
- return function(key) {
- return object == null ? undefined : object[key];
- };
+ if (this.#size === 1) {
+ this.#head = this.#tail = 0;
+ this.#free.length = 0;
+ } else this.#head = this.#next[head];
+ this.#keyMap.delete(k);
+ this.#size--;
+ return head;
+ }
+ /**
+ * Check if a key is in the cache, without updating the recency of use.
+ * Will return false if the item is stale, even though it is technically
+ * in the cache.
+ *
+ * Will not update item age unless
+ * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
+ */
+ has(k, hasOptions = {}) {
+ const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
+ const index = this.#keyMap.get(k);
+ if (index !== void 0) {
+ const v = this.#valList[index];
+ if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === void 0) return false;
+ if (!this.#isStale(index)) {
+ if (updateAgeOnHas) this.#updateItemAge(index);
+ if (status) {
+ status.has = "hit";
+ this.#statusTTL(status, index);
+ }
+ return true;
+ } else if (status) {
+ status.has = "stale";
+ this.#statusTTL(status, index);
+ }
+ } else if (status) status.has = "miss";
+ return false;
+ }
+ /**
+ * Like {@link LRUCache#get} but doesn't update recency or delete stale
+ * items.
+ *
+ * Returns `undefined` if the item is stale, unless
+ * {@link LRUCache.OptionsBase.allowStale} is set.
+ */
+ peek(k, peekOptions = {}) {
+ const { allowStale = this.allowStale } = peekOptions;
+ const index = this.#keyMap.get(k);
+ if (index !== void 0 && (allowStale || !this.#isStale(index))) {
+ const v = this.#valList[index];
+ return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
}
- /**
- * The base implementation of `_.reduce` and `_.reduceRight`, without support
- * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initAccum Specify using the first or last element of
- * `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection);
+ }
+ #backgroundFetch(k, index, options, context) {
+ const v = index === void 0 ? void 0 : this.#valList[index];
+ if (this.#isBackgroundFetch(v)) return v;
+ const ac = new AC();
+ const { signal } = options;
+ signal?.addEventListener("abort", () => ac.abort(signal.reason), { signal: ac.signal });
+ const fetchOpts = {
+ signal: ac.signal,
+ options,
+ context
+ };
+ const cb = (v, updateCache = false) => {
+ const { aborted } = ac.signal;
+ const ignoreAbort = options.ignoreFetchAbort && v !== void 0;
+ if (options.status) if (aborted && !updateCache) {
+ options.status.fetchAborted = true;
+ options.status.fetchError = ac.signal.reason;
+ if (ignoreAbort) options.status.fetchAbortIgnored = true;
+ } else options.status.fetchResolved = true;
+ if (aborted && !ignoreAbort && !updateCache) return fetchFail(ac.signal.reason);
+ const bf = p;
+ if (this.#valList[index] === p) if (v === void 0) if (bf.__staleWhileFetching) this.#valList[index] = bf.__staleWhileFetching;
+ else this.delete(k);
+ else {
+ if (options.status) options.status.fetchUpdated = true;
+ this.set(k, v, fetchOpts.options);
+ }
+ return v;
+ };
+ const eb = (er) => {
+ if (options.status) {
+ options.status.fetchRejected = true;
+ options.status.fetchError = er;
+ }
+ return fetchFail(er);
+ };
+ const fetchFail = (er) => {
+ const { aborted } = ac.signal;
+ const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
+ const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
+ const noDelete = allowStale || options.noDeleteOnFetchRejection;
+ const bf = p;
+ if (this.#valList[index] === p) {
+ if (!noDelete || bf.__staleWhileFetching === void 0) this.delete(k);
+ else if (!allowStaleAborted) this.#valList[index] = bf.__staleWhileFetching;
+ }
+ if (allowStale) {
+ if (options.status && bf.__staleWhileFetching !== void 0) options.status.returnedStale = true;
+ return bf.__staleWhileFetching;
+ } else if (bf.__returned === bf) throw er;
+ };
+ const pcall = (res, rej) => {
+ const fmp = this.#fetchMethod?.(k, v, fetchOpts);
+ if (fmp && fmp instanceof Promise) fmp.then((v) => res(v), rej);
+ ac.signal.addEventListener("abort", () => {
+ if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
+ res();
+ if (options.allowStaleOnFetchAbort) res = (v) => cb(v, true);
+ }
+ });
+ };
+ if (options.status) options.status.fetchDispatched = true;
+ const p = new Promise(pcall).then(cb, eb);
+ const bf = Object.assign(p, {
+ __abortController: ac,
+ __staleWhileFetching: v,
+ __returned: void 0
+ });
+ if (index === void 0) {
+ this.set(k, bf, {
+ ...fetchOpts.options,
+ status: void 0
+ });
+ index = this.#keyMap.get(k);
+ } else this.#valList[index] = bf;
+ return bf;
+ }
+ #isBackgroundFetch(p) {
+ if (!this.#hasFetchMethod) return false;
+ const b = p;
+ return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
+ }
+ async fetch(k, fetchOptions = {}) {
+ const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal } = fetchOptions;
+ if (!this.#hasFetchMethod) {
+ if (status) status.fetch = "get";
+ return this.get(k, {
+ allowStale,
+ updateAgeOnGet,
+ noDeleteOnStaleGet,
+ status
});
- return accumulator;
}
- /**
- * The base implementation of `_.sortBy` which uses `comparer` to define the
- * sort order of `array` and replaces criteria objects with their corresponding
- * values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
- function baseSortBy(array, comparer) {
- var length = array.length;
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
+ const options = {
+ allowStale,
+ updateAgeOnGet,
+ noDeleteOnStaleGet,
+ ttl,
+ noDisposeOnSet,
+ size,
+ sizeCalculation,
+ noUpdateTTL,
+ noDeleteOnFetchRejection,
+ allowStaleOnFetchRejection,
+ allowStaleOnFetchAbort,
+ ignoreFetchAbort,
+ status,
+ signal
+ };
+ let index = this.#keyMap.get(k);
+ if (index === void 0) {
+ if (status) status.fetch = "miss";
+ const p = this.#backgroundFetch(k, index, options, context);
+ return p.__returned = p;
+ } else {
+ const v = this.#valList[index];
+ if (this.#isBackgroundFetch(v)) {
+ const stale = allowStale && v.__staleWhileFetching !== void 0;
+ if (status) {
+ status.fetch = "inflight";
+ if (stale) status.returnedStale = true;
+ }
+ return stale ? v.__staleWhileFetching : v.__returned = v;
}
- return array;
+ const isStale = this.#isStale(index);
+ if (!forceRefresh && !isStale) {
+ if (status) status.fetch = "hit";
+ this.#moveToTail(index);
+ if (updateAgeOnGet) this.#updateItemAge(index);
+ if (status) this.#statusTTL(status, index);
+ return v;
+ }
+ const p = this.#backgroundFetch(k, index, options, context);
+ const staleVal = p.__staleWhileFetching !== void 0 && allowStale;
+ if (status) {
+ status.fetch = isStale ? "stale" : "refresh";
+ if (staleVal && isStale) status.returnedStale = true;
+ }
+ return staleVal ? p.__staleWhileFetching : p.__returned = p;
}
- /**
- * The base implementation of `_.sum` and `_.sumBy` without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function baseSum(array, iteratee) {
- var result, index = -1, length = array.length;
- while (++index < length) {
- var current = iteratee(array[index]);
- if (current !== undefined) {
- result = result === undefined ? current : result + current;
+ }
+ /**
+ * Return a value from the cache. Will update the recency of the cache
+ * entry found.
+ *
+ * If the key is not found, get() will return `undefined`.
+ */
+ get(k, getOptions = {}) {
+ const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
+ const index = this.#keyMap.get(k);
+ if (index !== void 0) {
+ const value = this.#valList[index];
+ const fetching = this.#isBackgroundFetch(value);
+ if (status) this.#statusTTL(status, index);
+ if (this.#isStale(index)) {
+ if (status) status.get = "stale";
+ if (!fetching) {
+ if (!noDeleteOnStaleGet) this.delete(k);
+ if (status && allowStale) status.returnedStale = true;
+ return allowStale ? value : void 0;
+ } else {
+ if (status && allowStale && value.__staleWhileFetching !== void 0) status.returnedStale = true;
+ return allowStale ? value.__staleWhileFetching : void 0;
}
+ } else {
+ if (status) status.get = "hit";
+ if (fetching) return value.__staleWhileFetching;
+ this.#moveToTail(index);
+ if (updateAgeOnGet) this.#updateItemAge(index);
+ return value;
}
- return result;
+ } else if (status) status.get = "miss";
+ }
+ #connect(p, n) {
+ this.#prev[n] = p;
+ this.#next[p] = n;
+ }
+ #moveToTail(index) {
+ if (index !== this.#tail) {
+ if (index === this.#head) this.#head = this.#next[index];
+ else this.#connect(this.#prev[index], this.#next[index]);
+ this.#connect(this.#tail, index);
+ this.#tail = index;
}
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1, result = Array(n);
- while (++index < n) {
- result[index] = iteratee(index);
+ }
+ /**
+ * Deletes a key out of the cache.
+ * Returns true if the key was deleted, false otherwise.
+ */
+ delete(k) {
+ let deleted = false;
+ if (this.#size !== 0) {
+ const index = this.#keyMap.get(k);
+ if (index !== void 0) {
+ deleted = true;
+ if (this.#size === 1) this.clear();
+ else {
+ this.#removeItemSize(index);
+ const v = this.#valList[index];
+ if (this.#isBackgroundFetch(v)) v.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
+ else if (this.#hasDispose || this.#hasDisposeAfter) {
+ if (this.#hasDispose) this.#dispose?.(v, k, "delete");
+ if (this.#hasDisposeAfter) this.#disposed?.push([
+ v,
+ k,
+ "delete"
+ ]);
+ }
+ this.#keyMap.delete(k);
+ this.#keyList[index] = void 0;
+ this.#valList[index] = void 0;
+ if (index === this.#tail) this.#tail = this.#prev[index];
+ else if (index === this.#head) this.#head = this.#next[index];
+ else {
+ this.#next[this.#prev[index]] = this.#next[index];
+ this.#prev[this.#next[index]] = this.#prev[index];
+ }
+ this.#size--;
+ this.#free.push(index);
+ }
}
- return result;
- }
- /**
- * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
- * of key-value pairs for `object` corresponding to the property names of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the key-value pairs.
- */
- function baseToPairs(object, props) {
- return arrayMap(props, function(key) {
- return [key, object[key]];
- });
}
- /**
- * The base implementation of `_.trim`.
- *
- * @private
- * @param {string} string The string to trim.
- * @returns {string} Returns the trimmed string.
- */
- function baseTrim(string) {
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
+ if (this.#hasDisposeAfter && this.#disposed?.length) {
+ const dt = this.#disposed;
+ let task;
+ while (task = dt?.shift()) this.#disposeAfter?.(...task);
}
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
+ return deleted;
+ }
+ /**
+ * Clear the cache entirely, throwing away all values.
+ */
+ clear() {
+ for (const index of this.#rindexes({ allowStale: true })) {
+ const v = this.#valList[index];
+ if (this.#isBackgroundFetch(v)) v.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
+ else {
+ const k = this.#keyList[index];
+ if (this.#hasDispose) this.#dispose?.(v, k, "delete");
+ if (this.#hasDisposeAfter) this.#disposed?.push([
+ v,
+ k,
+ "delete"
+ ]);
+ }
}
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- return arrayMap(props, function(key) {
- return object[key];
- });
+ this.#keyMap.clear();
+ this.#valList.fill(void 0);
+ this.#keyList.fill(void 0);
+ if (this.#ttls && this.#starts) {
+ this.#ttls.fill(0);
+ this.#starts.fill(0);
}
- /**
- * Checks if a `cache` value for `key` exists.
- *
- * @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function cacheHas(cache, key) {
- return cache.has(key);
+ if (this.#sizes) this.#sizes.fill(0);
+ this.#head = 0;
+ this.#tail = 0;
+ this.#free.length = 0;
+ this.#calculatedSize = 0;
+ this.#size = 0;
+ if (this.#hasDisposeAfter && this.#disposed) {
+ const dt = this.#disposed;
+ let task;
+ while (task = dt?.shift()) this.#disposeAfter?.(...task);
}
+ }
+};
+//#endregion
+//#region ../node_modules/lodash/lodash.js
+var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
+ (function() {
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+ /** Used as the semantic version number. */
+ var VERSION = "4.17.21";
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+ /** Error message constants. */
+ var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
+ /** Used as the maximum memoize cache size. */
+ var MAX_MEMOIZE_SIZE = 500;
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = "__lodash_placeholder__";
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 800, HOT_SPAN = 16;
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
+ /** Used as references for various `Number` constants. */
+ var INFINITY = Infinity, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = NaN;
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+ /** Used to associate wrap methods with their bit flags. */
+ var wrapFlags = [
+ ["ary", WRAP_ARY_FLAG],
+ ["bind", WRAP_BIND_FLAG],
+ ["bindKey", WRAP_BIND_KEY_FLAG],
+ ["curry", WRAP_CURRY_FLAG],
+ ["curryRight", WRAP_CURRY_RIGHT_FLAG],
+ ["flip", WRAP_FLIP_FLAG],
+ ["partial", WRAP_PARTIAL_FLAG],
+ ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
+ ["rearg", WRAP_REARG_FLAG]
+ ];
+ /** `Object#toString` result references. */
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/**
- * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
- * that is not found in the character symbols.
- *
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the first unmatched string symbol.
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
- function charsStartIndex(strSymbols, chrSymbols) {
- var index = -1, length = strSymbols.length;
- while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
+ /** Used to match leading whitespace. */
+ var reTrimStart = /^\s+/;
+ /** Used to match a single whitespace character. */
+ var reWhitespace = /\s/;
+ /** Used to match wrap detail comments. */
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
+ /** Used to match words composed of alphanumeric characters. */
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
/**
- * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
- * that is not found in the character symbols.
+ * Used to validate the `validate` option in `_.template` variable.
*
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the last unmatched string symbol.
+ * Forbids characters which could potentially change the meaning of the function argument definition:
+ * - "()," (modification of function parameters)
+ * - "=" (default value)
+ * - "[]{}" (destructuring of function parameters)
+ * - "/" (beginning of a comment)
+ * - whitespace
*/
- function charsEndIndex(strSymbols, chrSymbols) {
- var index = strSymbols.length;
- while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
+ var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
/**
- * Gets the number of `placeholder` occurrences in `array`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} placeholder The placeholder to search for.
- * @returns {number} Returns the placeholder count.
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
*/
- function countHolders(array, placeholder) {
- var length = array.length, result = 0;
- while (length--) {
- if (array[length] === placeholder) {
- ++result;
- }
- }
- return result;
- }
- /**
- * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
- * letters to basic Latin letters.
- *
- * @private
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = "\\ud800-\\udfff", rsComboRange = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
+ /** Used to compose unicode regexes. */
+ var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
+ rsNonAstral,
+ rsRegional,
+ rsSurrPair
+ ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
+ rsDingbat,
+ rsRegional,
+ rsSurrPair
+ ].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [
+ rsNonAstral + rsCombo + "?",
+ rsCombo,
+ rsRegional,
+ rsSurrPair,
+ rsAstral
+ ].join("|") + ")";
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, "g");
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, "g");
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
+ /** Used to match complex or compound words. */
+ var reUnicodeWord = RegExp([
+ rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [
+ rsBreak,
+ rsUpper,
+ "$"
+ ].join("|") + ")",
+ rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [
+ rsBreak,
+ rsUpper + rsMiscLower,
+ "$"
+ ].join("|") + ")",
+ rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
+ rsUpper + "+" + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+ ].join("|"), "g");
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+ var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ "Array",
+ "Buffer",
+ "DataView",
+ "Date",
+ "Error",
+ "Float32Array",
+ "Float64Array",
+ "Function",
+ "Int8Array",
+ "Int16Array",
+ "Int32Array",
+ "Map",
+ "Math",
+ "Object",
+ "Promise",
+ "RegExp",
+ "Set",
+ "String",
+ "Symbol",
+ "TypeError",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Uint16Array",
+ "Uint32Array",
+ "WeakMap",
+ "_",
+ "clearTimeout",
+ "isFinite",
+ "parseInt",
+ "setTimeout"
+ ];
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
+ /** Used to map Latin Unicode letters to basic Latin letters. */
+ var deburredLetters = {
+ "À": "A",
+ "Á": "A",
+ "Â": "A",
+ "Ã": "A",
+ "Ä": "A",
+ "Å": "A",
+ "à": "a",
+ "á": "a",
+ "â": "a",
+ "ã": "a",
+ "ä": "a",
+ "å": "a",
+ "Ç": "C",
+ "ç": "c",
+ "Ð": "D",
+ "ð": "d",
+ "È": "E",
+ "É": "E",
+ "Ê": "E",
+ "Ë": "E",
+ "è": "e",
+ "é": "e",
+ "ê": "e",
+ "ë": "e",
+ "Ì": "I",
+ "Í": "I",
+ "Î": "I",
+ "Ï": "I",
+ "ì": "i",
+ "í": "i",
+ "î": "i",
+ "ï": "i",
+ "Ñ": "N",
+ "ñ": "n",
+ "Ò": "O",
+ "Ó": "O",
+ "Ô": "O",
+ "Õ": "O",
+ "Ö": "O",
+ "Ø": "O",
+ "ò": "o",
+ "ó": "o",
+ "ô": "o",
+ "õ": "o",
+ "ö": "o",
+ "ø": "o",
+ "Ù": "U",
+ "Ú": "U",
+ "Û": "U",
+ "Ü": "U",
+ "ù": "u",
+ "ú": "u",
+ "û": "u",
+ "ü": "u",
+ "Ý": "Y",
+ "ý": "y",
+ "ÿ": "y",
+ "Æ": "Ae",
+ "æ": "ae",
+ "Þ": "Th",
+ "þ": "th",
+ "ß": "ss",
+ "Ā": "A",
+ "Ă": "A",
+ "Ą": "A",
+ "ā": "a",
+ "ă": "a",
+ "ą": "a",
+ "Ć": "C",
+ "Ĉ": "C",
+ "Ċ": "C",
+ "Č": "C",
+ "ć": "c",
+ "ĉ": "c",
+ "ċ": "c",
+ "č": "c",
+ "Ď": "D",
+ "Đ": "D",
+ "ď": "d",
+ "đ": "d",
+ "Ē": "E",
+ "Ĕ": "E",
+ "Ė": "E",
+ "Ę": "E",
+ "Ě": "E",
+ "ē": "e",
+ "ĕ": "e",
+ "ė": "e",
+ "ę": "e",
+ "ě": "e",
+ "Ĝ": "G",
+ "Ğ": "G",
+ "Ġ": "G",
+ "Ģ": "G",
+ "ĝ": "g",
+ "ğ": "g",
+ "ġ": "g",
+ "ģ": "g",
+ "Ĥ": "H",
+ "Ħ": "H",
+ "ĥ": "h",
+ "ħ": "h",
+ "Ĩ": "I",
+ "Ī": "I",
+ "Ĭ": "I",
+ "Į": "I",
+ "İ": "I",
+ "ĩ": "i",
+ "ī": "i",
+ "ĭ": "i",
+ "į": "i",
+ "ı": "i",
+ "Ĵ": "J",
+ "ĵ": "j",
+ "Ķ": "K",
+ "ķ": "k",
+ "ĸ": "k",
+ "Ĺ": "L",
+ "Ļ": "L",
+ "Ľ": "L",
+ "Ŀ": "L",
+ "Ł": "L",
+ "ĺ": "l",
+ "ļ": "l",
+ "ľ": "l",
+ "ŀ": "l",
+ "ł": "l",
+ "Ń": "N",
+ "Ņ": "N",
+ "Ň": "N",
+ "Ŋ": "N",
+ "ń": "n",
+ "ņ": "n",
+ "ň": "n",
+ "ŋ": "n",
+ "Ō": "O",
+ "Ŏ": "O",
+ "Ő": "O",
+ "ō": "o",
+ "ŏ": "o",
+ "ő": "o",
+ "Ŕ": "R",
+ "Ŗ": "R",
+ "Ř": "R",
+ "ŕ": "r",
+ "ŗ": "r",
+ "ř": "r",
+ "Ś": "S",
+ "Ŝ": "S",
+ "Ş": "S",
+ "Š": "S",
+ "ś": "s",
+ "ŝ": "s",
+ "ş": "s",
+ "š": "s",
+ "Ţ": "T",
+ "Ť": "T",
+ "Ŧ": "T",
+ "ţ": "t",
+ "ť": "t",
+ "ŧ": "t",
+ "Ũ": "U",
+ "Ū": "U",
+ "Ŭ": "U",
+ "Ů": "U",
+ "Ű": "U",
+ "Ų": "U",
+ "ũ": "u",
+ "ū": "u",
+ "ŭ": "u",
+ "ů": "u",
+ "ű": "u",
+ "ų": "u",
+ "Ŵ": "W",
+ "ŵ": "w",
+ "Ŷ": "Y",
+ "ŷ": "y",
+ "Ÿ": "Y",
+ "Ź": "Z",
+ "Ż": "Z",
+ "Ž": "Z",
+ "ź": "z",
+ "ż": "z",
+ "ž": "z",
+ "IJ": "IJ",
+ "ij": "ij",
+ "Œ": "Oe",
+ "œ": "oe",
+ "ʼn": "'n",
+ "ſ": "s"
+ };
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ "\"": """,
+ "'": "'"
+ };
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ """: "\"",
+ "'": "'"
+ };
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ "\\": "\\",
+ "'": "'",
+ "\n": "n",
+ "\r": "r",
+ "\u2028": "u2028",
+ "\u2029": "u2029"
+ };
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat, freeParseInt = parseInt;
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function("return this")();
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = function() {
+ try {
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
+ if (types) return types;
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
+ } catch (e) {}
+ }();
+ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1, length = array == null ? 0 : array.length;
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1, length = array == null ? 0 : array.length;
+ while (++index < length) if (iteratee(array[index], index, array) === false) break;
+ return array;
+ }
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ while (length--) if (iteratee(array[length], length, array) === false) break;
+ return array;
+ }
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1, length = array == null ? 0 : array.length;
+ while (++index < length) if (!predicate(array[index], index, array)) return false;
+ return true;
+ }
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) result[resIndex++] = value;
+ }
+ return result;
+ }
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ return !!(array == null ? 0 : array.length) && baseIndexOf(array, value, 0) > -1;
+ }
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1, length = array == null ? 0 : array.length;
+ while (++index < length) if (comparator(value, array[index])) return true;
+ return false;
+ }
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
+ while (++index < length) result[index] = iteratee(array[index], index, array);
+ return result;
+ }
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1, length = values.length, offset = array.length;
+ while (++index < length) array[offset + index] = values[index];
+ return array;
+ }
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1, length = array == null ? 0 : array.length;
+ if (initAccum && length) accumulator = array[++index];
+ while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
+ return accumulator;
+ }
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) accumulator = array[--length];
+ while (length--) accumulator = iteratee(accumulator, array[length], length, array);
+ return accumulator;
+ }
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1, length = array == null ? 0 : array.length;
+ while (++index < length) if (predicate(array[index], index, array)) return true;
+ return false;
+ }
+ /**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ var asciiSize = baseProperty("length");
+ /**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function asciiToArray(string) {
+ return string.split("");
+ }
+ /**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+ }
+ /**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+ }
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
+ while (fromRight ? index-- : ++index < length) if (predicate(array[index], index, array)) return index;
+ return -1;
+ }
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1, length = array.length;
+ while (++index < length) if (comparator(array[index], value)) return index;
+ return -1;
+ }
+ /**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+ function baseIsNaN(value) {
+ return value !== value;
+ }
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSum(array, iteratee) / length : NAN;
+ }
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+ array.sort(comparer);
+ while (length--) array[length] = array[length].value;
+ return array;
+ }
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result, index = -1, length = array.length;
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) result = result === undefined ? current : result + current;
+ }
+ return result;
+ }
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1, result = Array(n);
+ while (++index < n) result[index] = iteratee(index);
+ return result;
+ }
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+ /**
+ * The base implementation of `_.trim`.
+ *
+ * @private
+ * @param {string} string The string to trim.
+ * @returns {string} Returns the trimmed string.
+ */
+ function baseTrim(string) {
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
+ }
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+ /**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+ /**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+ function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1, length = strSymbols.length;
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1);
+ return index;
+ }
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+ function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1);
+ return index;
+ }
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length, result = 0;
+ while (length--) if (array[length] === placeholder) ++result;
+ return result;
+ }
+ /**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
* @param {string} letter The matched letter to deburr.
* @returns {string} Returns the deburred letter.
*/
@@ -47058,9 +44959,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function iteratorToArray(iterator) {
var data, result = [];
- while (!(data = iterator.next()).done) {
- result.push(data.value);
- }
+ while (!(data = iterator.next()).done) result.push(data.value);
return result;
}
/**
@@ -47150,11 +45049,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1, length = array.length;
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
+ while (++index < length) if (array[index] === value) return index;
return -1;
}
/**
@@ -47169,11 +45064,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function strictLastIndexOf(array, value, fromIndex) {
var index = fromIndex + 1;
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
+ while (index--) if (array[index] === value) return index;
return index;
}
/**
@@ -47206,7 +45097,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function trimmedEndIndex(string) {
var index = string.length;
- while (index-- && reWhitespace.test(string.charAt(index))) {}
+ while (index-- && reWhitespace.test(string.charAt(index)));
return index;
}
/**
@@ -47226,9 +45117,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
- while (reUnicode.test(string)) {
- ++result;
- }
+ while (reUnicode.test(string)) ++result;
return result;
}
/**
@@ -47251,36 +45140,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function unicodeWords(string) {
return string.match(reUnicodeWord) || [];
}
- /**
- * Create a new pristine `lodash` function using the `context` object.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Util
- * @param {Object} [context=root] The context object.
- * @returns {Function} Returns a new `lodash` function.
- * @example
- *
- * _.mixin({ 'foo': _.constant('foo') });
- *
- * var lodash = _.runInContext();
- * lodash.mixin({ 'bar': lodash.constant('bar') });
- *
- * _.isFunction(_.foo);
- * // => true
- * _.isFunction(_.bar);
- * // => false
- *
- * lodash.isFunction(lodash.foo);
- * // => false
- * lodash.isFunction(lodash.bar);
- * // => true
- *
- * // Create a suped-up `defer` in Node.js.
- * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
- */
- var runInContext = (function runInContext(context) {
+ var _ = (function runInContext(context) {
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
/** Built-in constructor references. */
var Array = context.Array, Date = context.Date, Error = context.Error, Function = context.Function, Math = context.Math, Object = context.Object, RegExp = context.RegExp, String = context.String, TypeError = context.TypeError;
@@ -47451,12 +45311,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function lodash(value) {
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
- if (value instanceof LodashWrapper) {
- return value;
- }
- if (hasOwnProperty.call(value, "__wrapped__")) {
- return wrapperClone(value);
- }
+ if (value instanceof LodashWrapper) return value;
+ if (hasOwnProperty.call(value, "__wrapped__")) return wrapperClone(value);
}
return new LodashWrapper(value);
}
@@ -47471,12 +45327,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var baseCreate = function() {
function object() {}
return function(proto) {
- if (!isObject(proto)) {
- return {};
- }
- if (objectCreate) {
- return objectCreate(proto);
- }
+ if (!isObject(proto)) return {};
+ if (objectCreate) return objectCreate(proto);
object.prototype = proto;
var result = new object();
object.prototype = undefined;
@@ -47586,24 +45438,16 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function lazyValue() {
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
- if (!isArr || !isRight && arrLength == length && takeCount == length) {
- return baseWrapperValue(array, this.__actions__);
- }
+ if (!isArr || !isRight && arrLength == length && takeCount == length) return baseWrapperValue(array, this.__actions__);
var result = [];
outer: while (length-- && resIndex < takeCount) {
index += dir;
var iterIndex = -1, value = array[index];
while (++iterIndex < iterLength) {
var data = iteratees[iterIndex], iteratee = data.iteratee, type = data.type, computed = iteratee(value);
- if (type == LAZY_MAP_FLAG) {
- value = computed;
- } else if (!computed) {
- if (type == LAZY_FILTER_FLAG) {
- continue outer;
- } else {
- break outer;
- }
- }
+ if (type == LAZY_MAP_FLAG) value = computed;
+ else if (!computed) if (type == LAZY_FILTER_FLAG) continue outer;
+ else break outer;
}
result[resIndex++] = value;
}
@@ -47740,15 +45584,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
+ if (index < 0) return false;
+ if (index == data.length - 1) data.pop();
+ else splice.call(data, index, 1);
--this.size;
return true;
}
@@ -47792,9 +45630,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (index < 0) {
++this.size;
data.push([key, value]);
- } else {
- data[index][1] = value;
- }
+ } else data[index][1] = value;
return this;
}
ListCache.prototype.clear = listCacheClear;
@@ -47902,9 +45738,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function SetCache(values) {
var index = -1, length = values == null ? 0 : values.length;
this.__data__ = new MapCache();
- while (++index < length) {
- this.add(values[index]);
- }
+ while (++index < length) this.add(values[index]);
}
/**
* Adds `value` to the array cache.
@@ -47942,8 +45776,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
- var data = this.__data__ = new ListCache(entries);
- this.size = data.size;
+ this.size = (this.__data__ = new ListCache(entries)).size;
}
/**
* Removes all key-value entries from the stack.
@@ -48034,11 +45867,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
- result.push(key);
- }
- }
+ for (var key in value) if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
return result;
}
/**
@@ -48083,9 +45912,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
- if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {
- baseAssignValue(object, key, value);
- }
+ if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) baseAssignValue(object, key, value);
}
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
@@ -48099,9 +45926,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function assignValue(object, key, value) {
var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
- baseAssignValue(object, key, value);
- }
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) baseAssignValue(object, key, value);
}
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
@@ -48113,11 +45938,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function assocIndexOf(array, key) {
var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
+ while (length--) if (eq(array[length][0], key)) return length;
return -1;
}
/**
@@ -48171,16 +45992,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
- if (key == "__proto__" && defineProperty) {
- defineProperty(object, key, {
- "configurable": true,
- "enumerable": true,
- "value": value,
- "writable": true
- });
- } else {
- object[key] = value;
- }
+ if (key == "__proto__" && defineProperty) defineProperty(object, key, {
+ "configurable": true,
+ "enumerable": true,
+ "value": value,
+ "writable": true
+ });
+ else object[key] = value;
}
/**
* The base implementation of `_.at` without support for individual paths.
@@ -48192,9 +46010,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseAt(object, paths) {
var index = -1, length = paths.length, result = Array(length), skip = object == null;
- while (++index < length) {
- result[index] = skip ? undefined : get(object, paths[index]);
- }
+ while (++index < length) result[index] = skip ? undefined : get(object, paths[index]);
return result;
}
/**
@@ -48208,12 +46024,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseClamp(number, lower, upper) {
if (number === number) {
- if (upper !== undefined) {
- number = number <= upper ? number : upper;
- }
- if (lower !== undefined) {
- number = number >= lower ? number : lower;
- }
+ if (upper !== undefined) number = number <= upper ? number : upper;
+ if (lower !== undefined) number = number >= lower ? number : lower;
}
return number;
}
@@ -48235,55 +46047,35 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseClone(value, bitmask, customizer, key, object, stack) {
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
+ if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
+ if (result !== undefined) return result;
+ if (!isObject(value)) return value;
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
+ if (!isDeep) return copyArray(value, result);
} else {
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
+ if (isBuffer(value)) return cloneBuffer(value, isDeep);
if (tag == objectTag || tag == argsTag || isFunc && !object) {
result = isFlat || isFunc ? {} : initCloneObject(value);
- if (!isDeep) {
- return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
- }
+ if (!isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
} else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
+ if (!cloneableTags[tag]) return object ? value : {};
result = initCloneByTag(value, tag, isDeep);
}
}
stack || (stack = new Stack());
var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
+ if (stacked) return stacked;
stack.set(value, result);
- if (isSet(value)) {
- value.forEach(function(subValue) {
- result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
- });
- } else if (isMap(value)) {
- value.forEach(function(subValue, key) {
- result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
- });
- }
- var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
- var props = isArr ? undefined : keysFunc(value);
+ if (isSet(value)) value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ else if (isMap(value)) value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ var props = isArr ? undefined : (isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys)(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
@@ -48316,15 +46108,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseConformsTo(object, source, props) {
var length = props.length;
- if (object == null) {
- return !length;
- }
+ if (object == null) return !length;
object = Object(object);
while (length--) {
var key = props[length], predicate = source[key], value = object[key];
- if (value === undefined && !(key in object) || !predicate(value)) {
- return false;
- }
+ if (value === undefined && !(key in object) || !predicate(value)) return false;
}
return true;
}
@@ -48339,9 +46127,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {number|Object} Returns the timer id or timeout object.
*/
function baseDelay(func, wait, args) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
return setTimeout(function() {
func.apply(undefined, args);
}, wait);
@@ -48359,12 +46145,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length;
- if (!length) {
- return result;
- }
- if (iteratee) {
- values = arrayMap(values, baseUnary(iteratee));
- }
+ if (!length) return result;
+ if (iteratee) values = arrayMap(values, baseUnary(iteratee));
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
@@ -48378,15 +46160,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === computed) {
- continue outer;
- }
- }
+ while (valuesIndex--) if (values[valuesIndex] === computed) continue outer;
result.push(value);
- } else if (!includes(values, computed, comparator)) {
- result.push(value);
- }
+ } else if (!includes(values, computed, comparator)) result.push(value);
}
return result;
}
@@ -48439,9 +46215,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var index = -1, length = array.length;
while (++index < length) {
var value = array[index], current = iteratee(value);
- if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) {
- var computed = current, result = value;
- }
+ if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) var computed = current, result = value;
}
return result;
}
@@ -48458,17 +46232,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
- if (start < 0) {
- start = -start > length ? 0 : length + start;
- }
+ if (start < 0) start = -start > length ? 0 : length + start;
end = end === undefined || end > length ? length : toInteger(end);
- if (end < 0) {
- end += length;
- }
+ if (end < 0) end += length;
end = start > end ? 0 : toLength(end);
- while (start < end) {
- array[start++] = value;
- }
+ while (start < end) array[start++] = value;
return array;
}
/**
@@ -48482,9 +46250,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
+ if (predicate(value, index, collection)) result.push(value);
});
return result;
}
@@ -48505,15 +46271,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
result || (result = []);
while (++index < length) {
var value = array[index];
- if (depth > 0 && predicate(value)) {
- if (depth > 1) {
- baseFlatten(value, depth - 1, predicate, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
+ if (depth > 0 && predicate(value)) if (depth > 1) baseFlatten(value, depth - 1, predicate, isStrict, result);
+ else arrayPush(result, value);
+ else if (!isStrict) result[result.length] = value;
}
return result;
}
@@ -48587,9 +46347,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function baseGet(object, path) {
path = castPath(path, object);
var index = 0, length = path.length;
- while (object != null && index < length) {
- object = object[toKey(path[index++])];
- }
+ while (object != null && index < length) object = object[toKey(path[index++])];
return index && index == length ? object : undefined;
}
/**
@@ -48615,9 +46373,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
+ if (value == null) return value === undefined ? undefinedTag : nullTag;
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
/**
@@ -48680,9 +46436,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var includes = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = [];
while (othIndex--) {
var array = arrays[othIndex];
- if (othIndex && iteratee) {
- array = arrayMap(array, baseUnary(iteratee));
- }
+ if (othIndex && iteratee) array = arrayMap(array, baseUnary(iteratee));
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined;
}
@@ -48695,13 +46449,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
- if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator))) {
- continue outer;
- }
- }
- if (seen) {
- seen.push(computed);
+ if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator))) continue outer;
}
+ if (seen) seen.push(computed);
result.push(value);
}
}
@@ -48785,12 +46535,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
- return value !== value && other !== other;
- }
+ if (value === other) return true;
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) return value !== value && other !== other;
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
/**
@@ -48813,9 +46559,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
- if (!isBuffer(other)) {
- return false;
- }
+ if (!isBuffer(other)) return false;
objIsArr = true;
objIsObj = false;
}
@@ -48831,9 +46575,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
- if (!isSameTag) {
- return false;
- }
+ if (!isSameTag) return false;
stack || (stack = new Stack());
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
@@ -48859,31 +46601,21 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
- if (object == null) {
- return !length;
- }
+ if (object == null) return !length;
object = Object(object);
while (index--) {
var data = matchData[index];
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
- return false;
- }
+ if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return false;
}
while (++index < length) {
data = matchData[index];
var key = data[0], objValue = object[key], srcValue = data[1];
if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
+ if (objValue === undefined && !(key in object)) return false;
} else {
var stack = new Stack();
- if (customizer) {
- var result = customizer(objValue, srcValue, key, object, source, stack);
- }
- if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
- return false;
- }
+ if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
+ if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) return false;
}
}
return true;
@@ -48897,11 +46629,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* else `false`.
*/
function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
+ if (!isObject(value) || isMasked(value)) return false;
+ return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
}
/**
* The base implementation of `_.isRegExp` without Node.js optimizations.
@@ -48941,15 +46670,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
- if (typeof value == "function") {
- return value;
- }
- if (value == null) {
- return identity;
- }
- if (typeof value == "object") {
- return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
- }
+ if (typeof value == "function") return value;
+ if (value == null) return identity;
+ if (typeof value == "object") return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
return property(value);
}
/**
@@ -48960,15 +46683,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
+ if (!isPrototype(object)) return nativeKeys(object);
var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != "constructor") {
- result.push(key);
- }
- }
+ for (var key in Object(object)) if (hasOwnProperty.call(object, key) && key != "constructor") result.push(key);
return result;
}
/**
@@ -48979,15 +46696,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
- if (!isObject(object)) {
- return nativeKeysIn(object);
- }
+ if (!isObject(object)) return nativeKeysIn(object);
var isProto = isPrototype(object), result = [];
- for (var key in object) {
- if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
+ for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) result.push(key);
return result;
}
/**
@@ -49026,9 +46737,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseMatches(source) {
var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
- }
+ if (matchData.length == 1 && matchData[0][2]) return matchesStrictComparable(matchData[0][0], matchData[0][1]);
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
@@ -49042,9 +46751,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
- if (isKey(path) && isStrictComparable(srcValue)) {
- return matchesStrictComparable(toKey(path), srcValue);
- }
+ if (isKey(path) && isStrictComparable(srcValue)) return matchesStrictComparable(toKey(path), srcValue);
return function(object) {
var objValue = get(object, path);
return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
@@ -49062,18 +46769,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* counterparts.
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) {
- return;
- }
+ if (object === source) return;
baseFor(source, function(srcValue, key) {
stack || (stack = new Stack());
- if (isObject(srcValue)) {
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
- } else {
+ if (isObject(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ else {
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined;
- if (newValue === undefined) {
- newValue = srcValue;
- }
+ if (newValue === undefined) newValue = srcValue;
assignMergeValue(object, key, newValue);
}
}, keysIn);
@@ -49104,30 +46806,20 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (isCommon) {
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
- if (isArr || isBuff || isTyped) {
- if (isArray(objValue)) {
- newValue = objValue;
- } else if (isArrayLikeObject(objValue)) {
- newValue = copyArray(objValue);
- } else if (isBuff) {
- isCommon = false;
- newValue = cloneBuffer(srcValue, true);
- } else if (isTyped) {
- isCommon = false;
- newValue = cloneTypedArray(srcValue, true);
- } else {
- newValue = [];
- }
- } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- newValue = objValue;
- if (isArguments(objValue)) {
- newValue = toPlainObject(objValue);
- } else if (!isObject(objValue) || isFunction(objValue)) {
- newValue = initCloneObject(srcValue);
- }
- } else {
+ if (isArr || isBuff || isTyped) if (isArray(objValue)) newValue = objValue;
+ else if (isArrayLikeObject(objValue)) newValue = copyArray(objValue);
+ else if (isBuff) {
isCommon = false;
- }
+ newValue = cloneBuffer(srcValue, true);
+ } else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ } else newValue = [];
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) newValue = toPlainObject(objValue);
+ else if (!isObject(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
+ } else isCommon = false;
}
if (isCommon) {
stack.set(srcValue, newValue);
@@ -49146,9 +46838,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseNth(array, n) {
var length = array.length;
- if (!length) {
- return;
- }
+ if (!length) return;
n += n < 0 ? length : 0;
return isIndex(n, length) ? array[n] : undefined;
}
@@ -49162,21 +46852,16 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
- if (iteratees.length) {
- iteratees = arrayMap(iteratees, function(iteratee) {
- if (isArray(iteratee)) {
- return function(value) {
- return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
- };
- }
- return iteratee;
- });
- } else {
- iteratees = [identity];
- }
+ if (iteratees.length) iteratees = arrayMap(iteratees, function(iteratee) {
+ if (isArray(iteratee)) return function(value) {
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ };
+ return iteratee;
+ });
+ else iteratees = [identity];
var index = -1;
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
- var result = baseMap(collection, function(value, key, collection) {
+ return baseSortBy(baseMap(collection, function(value, key, collection) {
var criteria = arrayMap(iteratees, function(iteratee) {
return iteratee(value);
});
@@ -49185,8 +46870,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"index": ++index,
"value": value
};
- });
- return baseSortBy(result, function(object, other) {
+ }), function(object, other) {
return compareMultiple(object, other, orders);
});
}
@@ -49217,9 +46901,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var index = -1, length = paths.length, result = {};
while (++index < length) {
var path = paths[index], value = baseGet(object, path);
- if (predicate(value, path)) {
- baseSet(result, castPath(path, object), value);
- }
+ if (predicate(value, path)) baseSet(result, castPath(path, object), value);
}
return result;
}
@@ -49248,18 +46930,12 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function basePullAll(array, values, iteratee, comparator) {
var indexOf = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values.length, seen = array;
- if (array === values) {
- values = copyArray(values);
- }
- if (iteratee) {
- seen = arrayMap(array, baseUnary(iteratee));
- }
+ if (array === values) values = copyArray(values);
+ if (iteratee) seen = arrayMap(array, baseUnary(iteratee));
while (++index < length) {
var fromIndex = 0, value = values[index], computed = iteratee ? iteratee(value) : value;
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
- if (seen !== array) {
- splice.call(seen, fromIndex, 1);
- }
+ if (seen !== array) splice.call(seen, fromIndex, 1);
splice.call(array, fromIndex, 1);
}
}
@@ -49280,11 +46956,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var index = indexes[length];
if (length == lastIndex || index !== previous) {
var previous = index;
- if (isIndex(index)) {
- splice.call(array, index, 1);
- } else {
- baseUnset(array, index);
- }
+ if (isIndex(index)) splice.call(array, index, 1);
+ else baseUnset(array, index);
}
}
return array;
@@ -49330,17 +47003,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseRepeat(string, n) {
var result = "";
- if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
- return result;
- }
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) return result;
do {
- if (n % 2) {
- result += string;
- }
+ if (n % 2) result += string;
n = nativeFloor(n / 2);
- if (n) {
- string += string;
- }
+ if (n) string += string;
} while (n);
return result;
}
@@ -49388,22 +47055,16 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Object} Returns `object`.
*/
function baseSet(object, path, value, customizer) {
- if (!isObject(object)) {
- return object;
- }
+ if (!isObject(object)) return object;
path = castPath(path, object);
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]), newValue = value;
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
- return object;
- }
+ if (key === "__proto__" || key === "constructor" || key === "prototype") return object;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
- if (newValue === undefined) {
- newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
- }
+ if (newValue === undefined) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
}
assignValue(nested, key, newValue);
nested = nested[key];
@@ -49459,19 +47120,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseSlice(array, start, end) {
var index = -1, length = array.length;
- if (start < 0) {
- start = -start > length ? 0 : length + start;
- }
+ if (start < 0) start = -start > length ? 0 : length + start;
end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
+ if (end < 0) end += length;
length = start > end ? 0 : end - start >>> 0;
start >>>= 0;
var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
+ while (++index < length) result[index] = array[index + start];
return result;
}
/**
@@ -49508,11 +47163,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = low + high >>> 1, computed = array[mid];
- if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
- low = mid + 1;
- } else {
- high = mid;
- }
+ if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) low = mid + 1;
+ else high = mid;
}
return high;
}
@@ -49533,31 +47185,19 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseSortedIndexBy(array, value, iteratee, retHighest) {
var low = 0, high = array == null ? 0 : array.length;
- if (high === 0) {
- return 0;
- }
+ if (high === 0) return 0;
value = iteratee(value);
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined;
while (low < high) {
var mid = nativeFloor((low + high) / 2), computed = iteratee(array[mid]), othIsDefined = computed !== undefined, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
- if (valIsNaN) {
- var setLow = retHighest || othIsReflexive;
- } else if (valIsUndefined) {
- setLow = othIsReflexive && (retHighest || othIsDefined);
- } else if (valIsNull) {
- setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
- } else if (valIsSymbol) {
- setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
- } else if (othIsNull || othIsSymbol) {
- setLow = false;
- } else {
- setLow = retHighest ? computed <= value : computed < value;
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
+ if (valIsNaN) var setLow = retHighest || othIsReflexive;
+ else if (valIsUndefined) setLow = othIsReflexive && (retHighest || othIsDefined);
+ else if (valIsNull) setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ else if (valIsSymbol) setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ else if (othIsNull || othIsSymbol) setLow = false;
+ else setLow = retHighest ? computed <= value : computed < value;
+ if (setLow) low = mid + 1;
+ else high = mid;
}
return nativeMin(high, MAX_ARRAY_INDEX);
}
@@ -49590,12 +47230,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {number} Returns the number.
*/
function baseToNumber(value) {
- if (typeof value == "number") {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
+ if (typeof value == "number") return value;
+ if (isSymbol(value)) return NAN;
return +value;
}
/**
@@ -49607,15 +47243,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {string} Returns the string.
*/
function baseToString(value) {
- if (typeof value == "string") {
- return value;
- }
- if (isArray(value)) {
- return arrayMap(value, baseToString) + "";
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : "";
- }
+ if (typeof value == "string") return value;
+ if (isArray(value)) return arrayMap(value, baseToString) + "";
+ if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
@@ -49635,33 +47265,21 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
includes = arrayIncludesWith;
} else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
- if (set) {
- return setToArray(set);
- }
+ if (set) return setToArray(set);
isCommon = false;
includes = cacheHas;
seen = new SetCache();
- } else {
- seen = iteratee ? [] : result;
- }
+ } else seen = iteratee ? [] : result;
outer: while (++index < length) {
var value = array[index], computed = iteratee ? iteratee(value) : value;
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
- }
+ while (seenIndex--) if (seen[seenIndex] === computed) continue outer;
+ if (iteratee) seen.push(computed);
result.push(value);
} else if (!includes(seen, computed, comparator)) {
- if (seen !== result) {
- seen.push(computed);
- }
+ if (seen !== result) seen.push(computed);
result.push(value);
}
}
@@ -49706,7 +47324,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseWhile(array, predicate, isDrop, fromRight) {
var length = array.length, index = fromRight ? length : -1;
- while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}
+ while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array));
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
}
/**
@@ -49721,9 +47339,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseWrapperValue(value, actions) {
var result = value;
- if (result instanceof LazyWrapper) {
- result = result.value();
- }
+ if (result instanceof LazyWrapper) result = result.value();
return arrayReduce(actions, function(result, action) {
return action.func.apply(action.thisArg, arrayPush([result], action.args));
}, result);
@@ -49740,17 +47356,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function baseXor(arrays, iteratee, comparator) {
var length = arrays.length;
- if (length < 2) {
- return length ? baseUniq(arrays[0]) : [];
- }
+ if (length < 2) return length ? baseUniq(arrays[0]) : [];
var index = -1, result = Array(length);
while (++index < length) {
var array = arrays[index], othIndex = -1;
- while (++othIndex < length) {
- if (othIndex != index) {
- result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
- }
- }
+ while (++othIndex < length) if (othIndex != index) result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
}
return baseUniq(baseFlatten(result, 1), iteratee, comparator);
}
@@ -49800,9 +47410,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
- if (isArray(value)) {
- return value;
- }
+ if (isArray(value)) return value;
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
/**
@@ -49847,9 +47455,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
+ if (isDeep) return buffer.slice();
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
@@ -49924,12 +47530,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (value !== other) {
var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
- if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
- return 1;
- }
- if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
- return -1;
- }
+ if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) return 1;
+ if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) return -1;
}
return 0;
}
@@ -49952,11 +47554,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * (order == "desc" ? -1 : 1);
+ if (index >= ordersLength) return result;
+ return result * (orders[index] == "desc" ? -1 : 1);
}
}
return object.index - other.index;
@@ -49974,17 +47573,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function composeArgs(args, partials, holders, isCurried) {
var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried;
- while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex];
- }
- while (++argsIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[holders[argsIndex]] = args[argsIndex];
- }
- }
- while (rangeLength--) {
- result[leftIndex++] = args[argsIndex++];
- }
+ while (++leftIndex < leftLength) result[leftIndex] = partials[leftIndex];
+ while (++argsIndex < holdersLength) if (isUncurried || argsIndex < argsLength) result[holders[argsIndex]] = args[argsIndex];
+ while (rangeLength--) result[leftIndex++] = args[argsIndex++];
return result;
}
/**
@@ -50000,18 +47591,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried;
- while (++argsIndex < rangeLength) {
- result[argsIndex] = args[argsIndex];
- }
+ while (++argsIndex < rangeLength) result[argsIndex] = args[argsIndex];
var offset = argsIndex;
- while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex];
- }
- while (++holdersIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++];
- }
- }
+ while (++rightIndex < rightLength) result[offset + rightIndex] = partials[rightIndex];
+ while (++holdersIndex < holdersLength) if (isUncurried || argsIndex < argsLength) result[offset + holders[holdersIndex]] = args[argsIndex++];
return result;
}
/**
@@ -50025,9 +47608,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function copyArray(source, array) {
var index = -1, length = source.length;
array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
+ while (++index < length) array[index] = source[index];
return array;
}
/**
@@ -50047,14 +47628,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
while (++index < length) {
var key = props[index];
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
- if (newValue === undefined) {
- newValue = source[key];
- }
- if (isNew) {
- baseAssignValue(object, key, newValue);
- } else {
- assignValue(object, key, newValue);
- }
+ if (newValue === undefined) newValue = source[key];
+ if (isNew) baseAssignValue(object, key, newValue);
+ else assignValue(object, key, newValue);
}
return object;
}
@@ -50112,9 +47688,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
object = Object(object);
while (++index < length) {
var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
- }
+ if (source) assigner(object, source, index, customizer);
}
return object;
});
@@ -50129,18 +47703,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
+ if (collection == null) return collection;
+ if (!isArrayLike(collection)) return eachFunc(collection, iteratee);
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
- while (fromRight ? index-- : ++index < length) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
+ while (fromRight ? index-- : ++index < length) if (iteratee(iterable[index], index, iterable) === false) break;
return collection;
};
}
@@ -50156,9 +47722,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
+ if (iteratee(iterable[key], key, iterable) === false) break;
}
return object;
};
@@ -50176,8 +47740,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
function wrapper() {
- var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, arguments);
+ return (this && this !== root && this instanceof wrapper ? Ctor : func).apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
@@ -50247,16 +47810,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var Ctor = createCtor(func);
function wrapper() {
var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper);
- while (index--) {
- args[index] = arguments[index];
- }
+ while (index--) args[index] = arguments[index];
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
length -= holders.length;
- if (length < arity) {
- return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length);
- }
- var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
- return apply(fn, this, args);
+ if (length < arity) return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length);
+ return apply(this && this !== root && this instanceof wrapper ? Ctor : func, this, args);
}
return wrapper;
}
@@ -50291,37 +47849,24 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function createFlow(fromRight) {
return flatRest(function(funcs) {
var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
- if (fromRight) {
- funcs.reverse();
- }
+ if (fromRight) funcs.reverse();
while (index--) {
var func = funcs[index];
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (prereq && !wrapper && getFuncName(func) == "wrapper") {
- var wrapper = new LodashWrapper([], true);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
+ if (prereq && !wrapper && getFuncName(func) == "wrapper") var wrapper = new LodashWrapper([], true);
}
index = wrapper ? index : length;
while (++index < length) {
func = funcs[index];
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined;
- if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
- } else {
- wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
- }
+ if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ else wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
}
return function() {
var args = arguments, value = args[0];
- if (wrapper && args.length == 1 && isArray(value)) {
- return wrapper.plant(value).value();
- }
+ if (wrapper && args.length == 1 && isArray(value)) return wrapper.plant(value).value();
var index = 0, result = length ? funcs[index].apply(this, args) : value;
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
+ while (++index < length) result = funcs[index].call(this, result);
return result;
};
});
@@ -50349,18 +47894,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func);
function wrapper() {
var length = arguments.length, args = Array(length), index = length;
- while (index--) {
- args[index] = arguments[index];
- }
- if (isCurried) {
- var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
- }
- if (partials) {
- args = composeArgs(args, partials, holders, isCurried);
- }
- if (partialsRight) {
- args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
- }
+ while (index--) args[index] = arguments[index];
+ if (isCurried) var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
+ if (partials) args = composeArgs(args, partials, holders, isCurried);
+ if (partialsRight) args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
length -= holdersCount;
if (isCurried && length < arity) {
var newHolders = replaceHolders(args, placeholder);
@@ -50368,17 +47905,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
length = args.length;
- if (argPos) {
- args = reorder(args, argPos);
- } else if (isFlip && length > 1) {
- args.reverse();
- }
- if (isAry && ary < length) {
- args.length = ary;
- }
- if (this && this !== root && this instanceof wrapper) {
- fn = Ctor || createCtor(fn);
- }
+ if (argPos) args = reorder(args, argPos);
+ else if (isFlip && length > 1) args.reverse();
+ if (isAry && ary < length) args.length = ary;
+ if (this && this !== root && this instanceof wrapper) fn = Ctor || createCtor(fn);
return fn.apply(thisBinding, args);
}
return wrapper;
@@ -50407,16 +47937,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function createMathOperation(operator, defaultValue) {
return function(value, other) {
var result;
- if (value === undefined && other === undefined) {
- return defaultValue;
- }
- if (value !== undefined) {
- result = value;
- }
+ if (value === undefined && other === undefined) return defaultValue;
+ if (value !== undefined) result = value;
if (other !== undefined) {
- if (result === undefined) {
- return other;
- }
+ if (result === undefined) return other;
if (typeof value == "string" || typeof other == "string") {
value = baseToString(value);
other = baseToString(other);
@@ -50459,9 +47983,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function createPadding(length, chars) {
chars = chars === undefined ? " " : baseToString(chars);
var charsLength = chars.length;
- if (charsLength < 2) {
- return charsLength ? baseRepeat(chars, length) : chars;
- }
+ if (charsLength < 2) return charsLength ? baseRepeat(chars, length) : chars;
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join("") : result.slice(0, length);
}
@@ -50481,12 +48003,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
function wrapper() {
var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func;
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
+ while (++leftIndex < leftLength) args[leftIndex] = partials[leftIndex];
+ while (argsLength--) args[leftIndex++] = arguments[++argsIndex];
return apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
@@ -50500,16 +48018,12 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function createRange(fromRight) {
return function(start, end, step) {
- if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
- end = step = undefined;
- }
+ if (step && typeof step != "number" && isIterateeCall(start, end, step)) end = step = undefined;
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
- } else {
- end = toFinite(end);
- }
+ } else end = toFinite(end);
step = step === undefined ? start < end ? 1 : -1 : toFinite(step);
return baseRange(start, end, step, fromRight);
};
@@ -50551,9 +48065,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials;
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
- if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
- bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
- }
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
var newData = [
func,
bitmask,
@@ -50567,9 +48079,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
arity
];
var result = wrapFunc.apply(undefined, newData);
- if (isLaziable(func)) {
- setData(result, newData);
- }
+ if (isLaziable(func)) setData(result, newData);
result.placeholder = placeholder;
return setWrapToString(result, func, bitmask);
}
@@ -50586,8 +48096,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision && nativeIsFinite(number)) {
- var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
- pair = (toString(value) + "e").split("e");
+ var pair = (toString(number) + "e").split("e");
+ pair = (toString(func(pair[0] + "e" + (+pair[1] + precision))) + "e").split("e");
return +(pair[0] + "e" + (+pair[1] - precision));
}
return func(number);
@@ -50613,12 +48123,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function createToPairs(keysFunc) {
return function(object) {
var tag = getTag(object);
- if (tag == mapTag) {
- return mapToArray(object);
- }
- if (tag == setTag) {
- return setToPairs(object);
- }
+ if (tag == mapTag) return mapToArray(object);
+ if (tag == setTag) return setToPairs(object);
return baseToPairs(object, keysFunc(object));
};
}
@@ -50649,9 +48155,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
- if (!isBindKey && typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (!isBindKey && typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
var length = partials ? partials.length : 0;
if (!length) {
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
@@ -50677,29 +48181,19 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ary,
arity
];
- if (data) {
- mergeData(newData, data);
- }
+ if (data) mergeData(newData, data);
func = newData[0];
bitmask = newData[1];
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
arity = newData[9] = newData[9] === undefined ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
- if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
- bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
- }
- if (!bitmask || bitmask == WRAP_BIND_FLAG) {
- var result = createBind(func, bitmask, thisArg);
- } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
- result = createCurry(func, bitmask, arity);
- } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
- result = createPartial(func, bitmask, thisArg, partials);
- } else {
- result = createHybrid.apply(undefined, newData);
- }
- var setter = data ? baseSetData : setData;
- return setWrapToString(setter(result, newData), func, bitmask);
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) var result = createBind(func, bitmask, thisArg);
+ else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) result = createCurry(func, bitmask, arity);
+ else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) result = createPartial(func, bitmask, thisArg, partials);
+ else result = createHybrid.apply(undefined, newData);
+ return setWrapToString((data ? baseSetData : setData)(result, newData), func, bitmask);
}
/**
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
@@ -50714,9 +48208,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {*} Returns the value to assign.
*/
function customDefaultsAssignIn(objValue, srcValue, key, object) {
- if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
- return srcValue;
- }
+ if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) return srcValue;
return objValue;
}
/**
@@ -50768,34 +48260,24 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) return false;
var arrStacked = stack.get(array);
var othStacked = stack.get(other);
- if (arrStacked && othStacked) {
- return arrStacked == other && othStacked == array;
- }
+ if (arrStacked && othStacked) return arrStacked == other && othStacked == array;
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
stack.set(array, other);
stack.set(other, array);
while (++index < arrLength) {
var arrValue = array[index], othValue = other[index];
- if (customizer) {
- var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
- }
+ if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
if (compared !== undefined) {
- if (compared) {
- continue;
- }
+ if (compared) continue;
result = false;
break;
}
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
- if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
})) {
result = false;
break;
@@ -50829,15 +48311,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
- return false;
- }
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return false;
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
- return false;
- }
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) return false;
return true;
case boolTag:
case dateTag:
@@ -50849,21 +48327,15 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
- if (object.size != other.size && !isPartial) {
- return false;
- }
+ if (object.size != other.size && !isPartial) return false;
var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
+ if (stacked) return stacked == other;
bitmask |= COMPARE_UNORDERED_FLAG;
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack["delete"](object);
return result;
- case symbolTag: if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
+ case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
}
return false;
}
@@ -50881,22 +48353,16 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
- if (objLength != othLength && !isPartial) {
- return false;
- }
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length;
+ if (objLength != getAllKeys(other).length && !isPartial) return false;
var index = objLength;
while (index--) {
var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) return false;
}
var objStacked = stack.get(object);
var othStacked = stack.get(other);
- if (objStacked && othStacked) {
- return objStacked == other && othStacked == object;
- }
+ if (objStacked && othStacked) return objStacked == other && othStacked == object;
var result = true;
stack.set(object, other);
stack.set(other, object);
@@ -50904,9 +48370,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
while (++index < objLength) {
key = objProps[index];
var objValue = object[key], othValue = other[key];
- if (customizer) {
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
- }
+ if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
result = false;
break;
@@ -50915,9 +48379,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (result && !skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
- if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
- result = false;
- }
+ if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) result = false;
}
stack["delete"](object);
stack["delete"](other);
@@ -50975,9 +48437,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var result = func.name + "", array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length], otherFunc = data.func;
- if (otherFunc == null || otherFunc == func) {
- return data.name;
- }
+ if (otherFunc == null || otherFunc == func) return data.name;
}
return result;
}
@@ -50989,8 +48449,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {*} Returns the placeholder value.
*/
function getHolder(func) {
- var object = hasOwnProperty.call(lodash, "placeholder") ? lodash : func;
- return object.placeholder;
+ return (hasOwnProperty.call(lodash, "placeholder") ? lodash : func).placeholder;
}
/**
* Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
@@ -51065,13 +48524,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
+ if (unmasked) if (isOwn) value[symToStringTag] = tag;
+ else delete value[symToStringTag];
return result;
}
/**
@@ -51082,9 +48536,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
- if (object == null) {
- return [];
- }
+ if (object == null) return [];
object = Object(object);
return arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
@@ -51113,21 +48565,17 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {string} Returns the `toStringTag`.
*/
var getTag = baseGetTag;
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
- getTag = function(value) {
- var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : "";
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
+ if (DataView && getTag(new DataView(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) getTag = function(value) {
+ var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : "";
+ if (ctorString) switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ return result;
+ };
/**
* Gets the view, applying any `transforms` to the `start` and `end` positions.
*
@@ -51187,14 +48635,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var index = -1, length = path.length, result = false;
while (++index < length) {
var key = toKey(path[index]);
- if (!(result = object != null && hasFunc(object, key))) {
- break;
- }
+ if (!(result = object != null && hasFunc(object, key))) break;
object = object[key];
}
- if (result || ++index != length) {
- return result;
- }
+ if (result || ++index != length) return result;
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}
@@ -51269,9 +48713,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function insertWrapDetails(source, details) {
var length = details.length;
- if (!length) {
- return source;
- }
+ if (!length) return source;
var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
details = details.join(length > 2 ? ", " : " ");
@@ -51311,13 +48753,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* else `false`.
*/
function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
+ if (!isObject(object)) return false;
var type = typeof index;
- if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
- return eq(object[index], value);
- }
+ if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
return false;
}
/**
@@ -51329,13 +48767,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
- if (isArray(value)) {
- return false;
- }
+ if (isArray(value)) return false;
var type = typeof value;
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
- return true;
- }
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
/**
@@ -51359,12 +48793,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function isLaziable(func) {
var funcName = getFuncName(func), other = lodash[funcName];
- if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
- return false;
- }
- if (func === other) {
- return true;
- }
+ if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) return false;
+ if (func === other) return true;
var data = getData(other);
return !!data && func === data[0];
}
@@ -51394,8 +48824,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
- return value === proto;
+ var Ctor = value && value.constructor;
+ return value === (typeof Ctor == "function" && Ctor.prototype || objectProto);
}
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
@@ -51419,9 +48849,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
- if (object == null) {
- return false;
- }
+ if (object == null) return false;
return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
};
}
@@ -51435,9 +48863,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function memoizeCapped(func) {
var result = memoize(func, function(key) {
- if (cache.size === MAX_MEMOIZE_SIZE) {
- cache.clear();
- }
+ if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
return key;
});
var cache = result.cache;
@@ -51462,9 +48888,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function mergeData(data, source) {
var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
- if (!(isCommon || isCombo)) {
- return data;
- }
+ if (!(isCommon || isCombo)) return data;
if (srcBitmask & WRAP_BIND_FLAG) {
data[2] = source[2];
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
@@ -51482,15 +48906,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
}
value = source[7];
- if (value) {
- data[7] = value;
- }
- if (srcBitmask & WRAP_ARY_FLAG) {
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
- }
- if (data[9] == null) {
- data[9] = source[9];
- }
+ if (value) data[7] = value;
+ if (srcBitmask & WRAP_ARY_FLAG) data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ if (data[9] == null) data[9] = source[9];
data[0] = source[0];
data[1] = newBitmask;
return data;
@@ -51506,11 +48924,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function nativeKeysIn(object) {
var result = [];
- if (object != null) {
- for (var key in Object(object)) {
- result.push(key);
- }
- }
+ if (object != null) for (var key in Object(object)) result.push(key);
return result;
}
/**
@@ -51536,14 +48950,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
return function() {
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
- while (++index < length) {
- array[index] = args[start + index];
- }
+ while (++index < length) array[index] = args[start + index];
index = -1;
var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
+ while (++index < start) otherArgs[index] = args[index];
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
@@ -51586,12 +48996,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {*} Returns the property value.
*/
function safeGet(object, key) {
- if (key === "constructor" && typeof object[key] === "function") {
- return;
- }
- if (key == "__proto__") {
- return;
- }
+ if (key === "constructor" && typeof object[key] === "function") return;
+ if (key == "__proto__") return;
return object[key];
}
/**
@@ -51658,12 +49064,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return arguments[0];
- }
- } else {
- count = 0;
- }
+ if (++count >= HOT_COUNT) return arguments[0];
+ } else count = 0;
return func.apply(undefined, arguments);
};
}
@@ -51695,9 +49097,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
- if (string.charCodeAt(0) === 46) {
- result.push("");
- }
+ if (string.charCodeAt(0) === 46) result.push("");
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
});
@@ -51711,9 +49111,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
- if (typeof value == "string" || isSymbol(value)) {
- return value;
- }
+ if (typeof value == "string" || isSymbol(value)) return value;
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
@@ -51746,9 +49144,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function updateWrapDetails(details, bitmask) {
arrayEach(wrapFlags, function(pair) {
var value = "_." + pair[0];
- if (bitmask & pair[1] && !arrayIncludes(details, value)) {
- details.push(value);
- }
+ if (bitmask & pair[1] && !arrayIncludes(details, value)) details.push(value);
});
return details.sort();
}
@@ -51760,9 +49156,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {Object} Returns the cloned wrapper.
*/
function wrapperClone(wrapper) {
- if (wrapper instanceof LazyWrapper) {
- return wrapper.clone();
- }
+ if (wrapper instanceof LazyWrapper) return wrapper.clone();
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
@@ -51791,19 +49185,12 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [['a', 'b', 'c'], ['d']]
*/
function chunk(array, size, guard) {
- if (guard ? isIterateeCall(array, size, guard) : size === undefined) {
- size = 1;
- } else {
- size = nativeMax(toInteger(size), 0);
- }
+ if (guard ? isIterateeCall(array, size, guard) : size === undefined) size = 1;
+ else size = nativeMax(toInteger(size), 0);
var length = array == null ? 0 : array.length;
- if (!length || size < 1) {
- return [];
- }
+ if (!length || size < 1) return [];
var index = 0, resIndex = 0, result = Array(nativeCeil(length / size));
- while (index < length) {
- result[resIndex++] = baseSlice(array, index, index += size);
- }
+ while (index < length) result[resIndex++] = baseSlice(array, index, index += size);
return result;
}
/**
@@ -51825,9 +49212,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
while (++index < length) {
var value = array[index];
- if (value) {
- result[resIndex++] = value;
- }
+ if (value) result[resIndex++] = value;
}
return result;
}
@@ -51855,13 +49240,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function concat() {
var length = arguments.length;
- if (!length) {
- return [];
- }
+ if (!length) return [];
var args = Array(length - 1), array = arguments[0], index = length;
- while (index--) {
- args[index - 1] = arguments[index];
- }
+ while (index--) args[index - 1] = arguments[index];
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
/**
@@ -51916,9 +49297,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var differenceBy = baseRest(function(array, values) {
var iteratee = last(values);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
+ if (isArrayLikeObject(iteratee)) iteratee = undefined;
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) : [];
});
/**
@@ -51946,9 +49325,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var differenceWith = baseRest(function(array, values) {
var comparator = last(values);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
+ if (isArrayLikeObject(comparator)) comparator = undefined;
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) : [];
});
/**
@@ -51978,9 +49355,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function drop(array, n, guard) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
+ if (!length) return [];
n = guard || n === undefined ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
}
@@ -52011,9 +49386,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function dropRight(array, n, guard) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
+ if (!length) return [];
n = guard || n === undefined ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, 0, n < 0 ? 0 : n);
@@ -52125,9 +49498,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function fill(array, value, start, end) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
+ if (!length) return [];
if (start && typeof start != "number" && isIterateeCall(array, value, start)) {
start = 0;
end = length;
@@ -52171,13 +49542,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
+ if (!length) return -1;
var index = fromIndex == null ? 0 : toInteger(fromIndex);
- if (index < 0) {
- index = nativeMax(length + index, 0);
- }
+ if (index < 0) index = nativeMax(length + index, 0);
return baseFindIndex(array, getIteratee(predicate, 3), index);
}
/**
@@ -52217,9 +49584,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function findLastIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
+ if (!length) return -1;
var index = length - 1;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
@@ -52242,8 +49607,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [1, 2, [3, [4]], 5]
*/
function flatten(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseFlatten(array, 1) : [];
+ return (array == null ? 0 : array.length) ? baseFlatten(array, 1) : [];
}
/**
* Recursively flattens `array`.
@@ -52260,8 +49624,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [1, 2, 3, 4, 5]
*/
function flattenDeep(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseFlatten(array, INFINITY) : [];
+ return (array == null ? 0 : array.length) ? baseFlatten(array, INFINITY) : [];
}
/**
* Recursively flatten `array` up to `depth` times.
@@ -52284,10 +49647,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [1, 2, 3, [4], 5]
*/
function flattenDepth(array, depth) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
+ if (!(array == null ? 0 : array.length)) return [];
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(array, depth);
}
@@ -52360,13 +49720,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function indexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
+ if (!length) return -1;
var index = fromIndex == null ? 0 : toInteger(fromIndex);
- if (index < 0) {
- index = nativeMax(length + index, 0);
- }
+ if (index < 0) index = nativeMax(length + index, 0);
return baseIndexOf(array, value, index);
}
/**
@@ -52384,8 +49740,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [1, 2]
*/
function initial(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseSlice(array, 0, -1) : [];
+ return (array == null ? 0 : array.length) ? baseSlice(array, 0, -1) : [];
}
/**
* Creates an array of unique values that are included in all given arrays
@@ -52433,11 +49788,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var intersectionBy = baseRest(function(arrays) {
var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
- if (iteratee === last(mapped)) {
- iteratee = undefined;
- } else {
- mapped.pop();
- }
+ if (iteratee === last(mapped)) iteratee = undefined;
+ else mapped.pop();
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee, 2)) : [];
});
/**
@@ -52464,9 +49816,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var intersectionWith = baseRest(function(arrays) {
var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
comparator = typeof comparator == "function" ? comparator : undefined;
- if (comparator) {
- mapped.pop();
- }
+ if (comparator) mapped.pop();
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined, comparator) : [];
});
/**
@@ -52528,9 +49878,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
+ if (!length) return -1;
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
@@ -52722,9 +50070,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function remove(array, predicate) {
var result = [];
- if (!(array && array.length)) {
- return result;
- }
+ if (!(array && array.length)) return result;
var index = -1, indexes = [], length = array.length;
predicate = getIteratee(predicate, 3);
while (++index < length) {
@@ -52781,9 +50127,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function slice(array, start, end) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
+ if (!length) return [];
if (end && typeof end != "number" && isIterateeCall(array, start, end)) {
start = 0;
end = length;
@@ -52861,9 +50205,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value);
- if (index < length && eq(array[index], value)) {
- return index;
- }
+ if (index < length && eq(array[index], value)) return index;
}
return -1;
}
@@ -52933,12 +50275,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 3
*/
function sortedLastIndexOf(array, value) {
- var length = array == null ? 0 : array.length;
- if (length) {
+ if (array == null ? 0 : array.length) {
var index = baseSortedIndex(array, value, true) - 1;
- if (eq(array[index], value)) {
- return index;
- }
+ if (eq(array[index], value)) return index;
}
return -1;
}
@@ -53023,9 +50362,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => []
*/
function take(array, n, guard) {
- if (!(array && array.length)) {
- return [];
- }
+ if (!(array && array.length)) return [];
n = guard || n === undefined ? 1 : toInteger(n);
return baseSlice(array, 0, n < 0 ? 0 : n);
}
@@ -53056,9 +50393,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function takeRight(array, n, guard) {
var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
+ if (!length) return [];
n = guard || n === undefined ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, n < 0 ? 0 : n, length);
@@ -53183,9 +50518,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var unionBy = baseRest(function(arrays) {
var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
+ if (isArrayLikeObject(iteratee)) iteratee = undefined;
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
});
/**
@@ -53305,9 +50638,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [['a', 'b'], [1, 2], [true, false]]
*/
function unzip(array) {
- if (!(array && array.length)) {
- return [];
- }
+ if (!(array && array.length)) return [];
var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
@@ -53341,13 +50672,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [3, 30, 300]
*/
function unzipWith(array, iteratee) {
- if (!(array && array.length)) {
- return [];
- }
+ if (!(array && array.length)) return [];
var result = unzip(array);
- if (iteratee == null) {
- return result;
- }
+ if (iteratee == null) return result;
return arrayMap(result, function(group) {
return apply(iteratee, undefined, group);
});
@@ -53421,9 +50748,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var xorBy = baseRest(function(arrays) {
var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
+ if (isArrayLikeObject(iteratee)) iteratee = undefined;
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
});
/**
@@ -53638,9 +50963,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
return baseAt(object, paths);
};
- if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
- return this.thru(interceptor);
- }
+ if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) return this.thru(interceptor);
value = value.slice(start, +start + (length ? 1 : 0));
value.__actions__.push({
"func": thru,
@@ -53648,9 +50971,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"thisArg": undefined
});
return new LodashWrapper(value, this.__chain__).thru(function(array) {
- if (length && !array.length) {
- array.push(undefined);
- }
+ if (length && !array.length) array.push(undefined);
return array;
});
});
@@ -53736,9 +51057,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => { 'done': true, 'value': undefined }
*/
function wrapperNext() {
- if (this.__values__ === undefined) {
- this.__values__ = toArray(this.value());
- }
+ if (this.__values__ === undefined) this.__values__ = toArray(this.value());
var done = this.__index__ >= this.__values__.length, value = done ? undefined : this.__values__[this.__index__++];
return {
"done": done,
@@ -53796,11 +51115,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var clone = wrapperClone(parent);
clone.__index__ = 0;
clone.__values__ = undefined;
- if (result) {
- previous.__wrapped__ = clone;
- } else {
- result = clone;
- }
+ if (result) previous.__wrapped__ = clone;
+ else result = clone;
var previous = clone;
parent = parent.__wrapped__;
}
@@ -53831,9 +51147,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var value = this.__wrapped__;
if (value instanceof LazyWrapper) {
var wrapped = value;
- if (this.__actions__.length) {
- wrapped = new LazyWrapper(this);
- }
+ if (this.__actions__.length) wrapped = new LazyWrapper(this);
wrapped = wrapped.reverse();
wrapped.__actions__.push({
"func": thru,
@@ -53884,11 +51198,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => { '3': 2, '5': 1 }
*/
var countBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- ++result[key];
- } else {
- baseAssignValue(result, key, 1);
- }
+ if (hasOwnProperty.call(result, key)) ++result[key];
+ else baseAssignValue(result, key, 1);
});
/**
* Checks if `predicate` returns truthy for **all** elements of `collection`.
@@ -53933,9 +51244,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function every(collection, predicate, guard) {
var func = isArray(collection) ? arrayEvery : baseEvery;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
+ if (guard && isIterateeCall(collection, predicate, guard)) predicate = undefined;
return func(collection, getIteratee(predicate, 3));
}
/**
@@ -53980,8 +51289,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => objects for ['fred', 'barney']
*/
function filter(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- return func(collection, getIteratee(predicate, 3));
+ return (isArray(collection) ? arrayFilter : baseFilter)(collection, getIteratee(predicate, 3));
}
/**
* Iterates over elements of `collection`, returning the first element
@@ -54143,8 +51451,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
- var func = isArray(collection) ? arrayEach : baseEach;
- return func(collection, getIteratee(iteratee, 3));
+ return (isArray(collection) ? arrayEach : baseEach)(collection, getIteratee(iteratee, 3));
}
/**
* This method is like `_.forEach` except that it iterates over elements of
@@ -54167,8 +51474,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => Logs `2` then `1`.
*/
function forEachRight(collection, iteratee) {
- var func = isArray(collection) ? arrayEachRight : baseEachRight;
- return func(collection, getIteratee(iteratee, 3));
+ return (isArray(collection) ? arrayEachRight : baseEachRight)(collection, getIteratee(iteratee, 3));
}
/**
* Creates an object composed of keys generated from the results of running
@@ -54194,11 +51500,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => { '3': ['one', 'two'], '5': ['three'] }
*/
var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- baseAssignValue(result, key, [value]);
- }
+ if (hasOwnProperty.call(result, key)) result[key].push(value);
+ else baseAssignValue(result, key, [value]);
});
/**
* Checks if `value` is in `collection`. If `collection` is a string, it's
@@ -54234,9 +51537,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
collection = isArrayLike(collection) ? collection : values(collection);
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
var length = collection.length;
- if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0);
- }
+ if (fromIndex < 0) fromIndex = nativeMax(length + fromIndex, 0);
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
}
/**
@@ -54343,8 +51644,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
- var func = isArray(collection) ? arrayMap : baseMap;
- return func(collection, getIteratee(iteratee, 3));
+ return (isArray(collection) ? arrayMap : baseMap)(collection, getIteratee(iteratee, 3));
}
/**
* This method is like `_.sortBy` except that it allows specifying the sort
@@ -54376,16 +51676,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
function orderBy(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
+ if (collection == null) return [];
+ if (!isArray(iteratees)) iteratees = iteratees == null ? [] : [iteratees];
orders = guard ? undefined : orders;
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
+ if (!isArray(orders)) orders = orders == null ? [] : [orders];
return baseOrderBy(collection, iteratees, orders);
}
/**
@@ -54531,8 +51825,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => objects for ['barney']
*/
function reject(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- return func(collection, negate(getIteratee(predicate, 3)));
+ return (isArray(collection) ? arrayFilter : baseFilter)(collection, negate(getIteratee(predicate, 3)));
}
/**
* Gets a random element from `collection`.
@@ -54549,8 +51842,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 2
*/
function sample(collection) {
- var func = isArray(collection) ? arraySample : baseSample;
- return func(collection);
+ return (isArray(collection) ? arraySample : baseSample)(collection);
}
/**
* Gets `n` random elements at unique keys from `collection` up to the
@@ -54573,13 +51865,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [2, 3, 1]
*/
function sampleSize(collection, n, guard) {
- if (guard ? isIterateeCall(collection, n, guard) : n === undefined) {
- n = 1;
- } else {
- n = toInteger(n);
- }
- var func = isArray(collection) ? arraySampleSize : baseSampleSize;
- return func(collection, n);
+ if (guard ? isIterateeCall(collection, n, guard) : n === undefined) n = 1;
+ else n = toInteger(n);
+ return (isArray(collection) ? arraySampleSize : baseSampleSize)(collection, n);
}
/**
* Creates an array of shuffled values, using a version of the
@@ -54597,8 +51885,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [4, 1, 3, 2]
*/
function shuffle(collection) {
- var func = isArray(collection) ? arrayShuffle : baseShuffle;
- return func(collection);
+ return (isArray(collection) ? arrayShuffle : baseShuffle)(collection);
}
/**
* Gets the size of `collection` by returning its length for array-like
@@ -54622,16 +51909,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 7
*/
function size(collection) {
- if (collection == null) {
- return 0;
- }
- if (isArrayLike(collection)) {
- return isString(collection) ? stringSize(collection) : collection.length;
- }
+ if (collection == null) return 0;
+ if (isArrayLike(collection)) return isString(collection) ? stringSize(collection) : collection.length;
var tag = getTag(collection);
- if (tag == mapTag || tag == setTag) {
- return collection.size;
- }
+ if (tag == mapTag || tag == setTag) return collection.size;
return baseKeys(collection).length;
}
/**
@@ -54672,9 +51953,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function some(collection, predicate, guard) {
var func = isArray(collection) ? arraySome : baseSome;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
+ if (guard && isIterateeCall(collection, predicate, guard)) predicate = undefined;
return func(collection, getIteratee(predicate, 3));
}
/**
@@ -54707,15 +51986,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
*/
var sortBy = baseRest(function(collection, iteratees) {
- if (collection == null) {
- return [];
- }
+ if (collection == null) return [];
var length = iteratees.length;
- if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
- iteratees = [];
- } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
- iteratees = [iteratees[0]];
- }
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) iteratees = [];
+ else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) iteratees = [iteratees[0]];
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
/**
@@ -54762,14 +52036,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => Logs 'done saving!' after the two async saves have completed.
*/
function after(n, func) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
n = toInteger(n);
return function() {
- if (--n < 1) {
- return func.apply(this, arguments);
- }
+ if (--n < 1) return func.apply(this, arguments);
};
}
/**
@@ -54813,17 +52083,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function before(n, func) {
var result;
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
n = toInteger(n);
return function() {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
+ if (--n > 0) result = func.apply(this, arguments);
+ if (n <= 1) func = undefined;
return result;
};
}
@@ -55070,9 +52334,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function debounce(func, wait, options) {
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
@@ -55102,23 +52364,17 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function timerExpired() {
var time = now();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
- }
+ if (shouldInvoke(time)) return trailingEdge(time);
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
- if (trailing && lastArgs) {
- return invokeFunc(time);
- }
+ if (trailing && lastArgs) return invokeFunc(time);
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
- }
+ if (timerId !== undefined) clearTimeout(timerId);
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
@@ -55131,18 +52387,14 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
lastThis = this;
lastCallTime = time;
if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
+ if (timerId === undefined) return leadingEdge(lastCallTime);
if (maxing) {
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
+ if (timerId === undefined) timerId = setTimeout(timerExpired, wait);
return result;
}
debounced.cancel = cancel;
@@ -55258,14 +52510,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
- if (typeof func != "function" || resolver != null && typeof resolver != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
- if (cache.has(key)) {
- return cache.get(key);
- }
+ if (cache.has(key)) return cache.get(key);
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
@@ -55295,9 +52543,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [1, 3, 5]
*/
function negate(predicate) {
- if (typeof predicate != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof predicate != "function") throw new TypeError(FUNC_ERROR_TEXT);
return function() {
var args = arguments;
switch (args.length) {
@@ -55366,9 +52612,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var funcsLength = transforms.length;
return baseRest(function(args) {
var index = -1, length = nativeMin(args.length, funcsLength);
- while (++index < length) {
- args[index] = transforms[index].call(this, args[index]);
- }
+ while (++index < length) args[index] = transforms[index].call(this, args[index]);
return apply(func, this, args);
});
});
@@ -55406,8 +52650,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 'hi fred'
*/
var partial = baseRest(function(func, partials) {
- var holders = replaceHolders(partials, getHolder(partial));
- return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, replaceHolders(partials, getHolder(partial)));
});
/**
* This method is like `_.partial` except that partially applied arguments
@@ -55442,8 +52685,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 'hello fred'
*/
var partialRight = baseRest(function(func, partials) {
- var holders = replaceHolders(partials, getHolder(partialRight));
- return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, replaceHolders(partials, getHolder(partialRight)));
});
/**
* Creates a function that invokes `func` with arguments arranged according
@@ -55496,9 +52738,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 'hello fred, barney, & pebbles'
*/
function rest(func, start) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
start = start === undefined ? start : toInteger(start);
return baseRest(func, start);
}
@@ -55537,15 +52777,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => a Promise of 76
*/
function spread(func, start) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start], otherArgs = castSlice(args, 0, start);
- if (array) {
- arrayPush(otherArgs, array);
- }
+ if (array) arrayPush(otherArgs, array);
return apply(func, this, otherArgs);
});
}
@@ -55595,9 +52831,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function throttle(func, wait, options) {
var leading = true, trailing = true;
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
if (isObject(options)) {
leading = "leading" in options ? !!options.leading : leading;
trailing = "trailing" in options ? !!options.trailing : trailing;
@@ -55685,9 +52919,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => true
*/
function castArray() {
- if (!arguments.length) {
- return [];
- }
+ if (!arguments.length) return [];
var value = arguments[0];
return isArray(value) ? value : [value];
}
@@ -56151,24 +53383,12 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => false
*/
function isEmpty(value) {
- if (value == null) {
- return true;
- }
- if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
- return !value.length;
- }
+ if (value == null) return true;
+ if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) return !value.length;
var tag = getTag(value);
- if (tag == mapTag || tag == setTag) {
- return !value.size;
- }
- if (isPrototype(value)) {
- return !baseKeys(value).length;
- }
- for (var key in value) {
- if (hasOwnProperty.call(value, key)) {
- return false;
- }
- }
+ if (tag == mapTag || tag == setTag) return !value.size;
+ if (isPrototype(value)) return !baseKeys(value).length;
+ for (var key in value) if (hasOwnProperty.call(value, key)) return false;
return true;
}
/**
@@ -56258,9 +53478,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => false
*/
function isError(value) {
- if (!isObjectLike(value)) {
- return false;
- }
+ if (!isObjectLike(value)) return false;
var tag = baseGetTag(value);
return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value);
}
@@ -56311,9 +53529,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => false
*/
function isFunction(value) {
- if (!isObject(value)) {
- return false;
- }
+ if (!isObject(value)) return false;
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
@@ -56574,9 +53790,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => false
*/
function isNative(value) {
- if (isMaskable(value)) {
- throw new Error(CORE_ERROR_TEXT);
- }
+ if (isMaskable(value)) throw new Error(CORE_ERROR_TEXT);
return baseIsNative(value);
}
/**
@@ -56680,13 +53894,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => true
*/
function isPlainObject(value) {
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
- return false;
- }
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) return false;
var proto = getPrototype(value);
- if (proto === null) {
- return true;
- }
+ if (proto === null) return true;
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
}
@@ -56948,17 +54158,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => []
*/
function toArray(value) {
- if (!value) {
- return [];
- }
- if (isArrayLike(value)) {
- return isString(value) ? stringToArray(value) : copyArray(value);
- }
- if (symIterator && value[symIterator]) {
- return iteratorToArray(value[symIterator]());
- }
- var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
- return func(value);
+ if (!value) return [];
+ if (isArrayLike(value)) return isString(value) ? stringToArray(value) : copyArray(value);
+ if (symIterator && value[symIterator]) return iteratorToArray(value[symIterator]());
+ var tag = getTag(value);
+ return (tag == mapTag ? mapToArray : tag == setTag ? setToArray : values)(value);
}
/**
* Converts `value` to a finite number.
@@ -56984,14 +54188,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 3.2
*/
function toFinite(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
+ if (!value) return value === 0 ? value : 0;
value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = value < 0 ? -1 : 1;
- return sign * MAX_INTEGER;
- }
+ if (value === INFINITY || value === -INFINITY) return (value < 0 ? -1 : 1) * MAX_INTEGER;
return value === value ? value : 0;
}
/**
@@ -57078,19 +54277,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => 3.2
*/
function toNumber(value) {
- if (typeof value == "number") {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
+ if (typeof value == "number") return value;
+ if (isSymbol(value)) return NAN;
if (isObject(value)) {
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
value = isObject(other) ? other + "" : other;
}
- if (typeof value != "string") {
- return value === 0 ? value : +value;
- }
+ if (typeof value != "string") return value === 0 ? value : +value;
value = baseTrim(value);
var isBinary = reIsBinary.test(value);
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
@@ -57210,11 +54403,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
copyObject(source, keys(source), object);
return;
}
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- assignValue(object, key, source[key]);
- }
- }
+ for (var key in source) if (hasOwnProperty.call(source, key)) assignValue(object, key, source[key]);
});
/**
* This method is like `_.assign` except that it iterates over own and
@@ -57395,9 +54584,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var index = -1;
var length = sources.length;
var guard = length > 2 ? sources[2] : undefined;
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- length = 1;
- }
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) length = 1;
while (++index < length) {
var source = sources[index];
var props = keysIn(source);
@@ -57406,9 +54593,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
while (++propsIndex < propsLength) {
var key = props[propsIndex];
var value = object[key];
- if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {
- object[key] = source[key];
- }
+ if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) object[key] = source[key];
}
}
return object;
@@ -57791,9 +54976,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => { '1': 'c', '2': 'b' }
*/
var invert = createInverter(function(result, value, key) {
- if (value != null && typeof value.toString != "function") {
- value = nativeObjectToString.call(value);
- }
+ if (value != null && typeof value.toString != "function") value = nativeObjectToString.call(value);
result[value] = key;
}, constant(identity));
/**
@@ -57823,14 +55006,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
*/
var invertBy = createInverter(function(result, value, key) {
- if (value != null && typeof value.toString != "function") {
- value = nativeObjectToString.call(value);
- }
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
+ if (value != null && typeof value.toString != "function") value = nativeObjectToString.call(value);
+ if (hasOwnProperty.call(result, value)) result[value].push(key);
+ else result[value] = [key];
}, getIteratee);
/**
* Invokes the method at `path` of `object`.
@@ -58063,9 +55241,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var omit = flatRest(function(object, paths) {
var result = {};
- if (object == null) {
- return result;
- }
+ if (object == null) return result;
var isDeep = false;
paths = arrayMap(paths, function(path) {
path = castPath(path, object);
@@ -58073,13 +55249,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return path;
});
copyObject(object, getAllKeysIn(object), result);
- if (isDeep) {
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
- }
+ if (isDeep) result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
var length = paths.length;
- while (length--) {
- baseUnset(result, paths[length]);
- }
+ while (length--) baseUnset(result, paths[length]);
return result;
});
/**
@@ -58144,9 +55316,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => { 'a': 1, 'c': 3 }
*/
function pickBy(object, predicate) {
- if (object == null) {
- return {};
- }
+ if (object == null) return {};
var props = arrayMap(getAllKeysIn(object), function(prop) {
return [prop];
});
@@ -58345,13 +55515,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
iteratee = getIteratee(iteratee, 4);
if (accumulator == null) {
var Ctor = object && object.constructor;
- if (isArrLike) {
- accumulator = isArr ? new Ctor() : [];
- } else if (isObject(object)) {
- accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
- } else {
- accumulator = {};
- }
+ if (isArrLike) accumulator = isArr ? new Ctor() : [];
+ else if (isObject(object)) accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ else accumulator = {};
}
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
return iteratee(accumulator, value, index, object);
@@ -58579,9 +55745,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (end === undefined) {
end = start;
start = 0;
- } else {
- end = toFinite(end);
- }
+ } else end = toFinite(end);
number = toNumber(number);
return baseInRange(number, start, end);
}
@@ -58617,9 +55781,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => a floating-point number between 1.2 and 5.2
*/
function random(lower, upper, floating) {
- if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
- upper = floating = undefined;
- }
+ if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) upper = floating = undefined;
if (floating === undefined) {
if (typeof upper == "boolean") {
floating = upper;
@@ -58637,9 +55799,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (upper === undefined) {
upper = lower;
lower = 0;
- } else {
- upper = toFinite(upper);
- }
+ } else upper = toFinite(upper);
}
if (lower > upper) {
var temp = lower;
@@ -58891,9 +56051,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
- if (!length || strLength >= length) {
- return string;
- }
+ if (!length || strLength >= length) return string;
var mid = (length - strLength) / 2;
return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
}
@@ -58980,11 +56138,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => [6, 8, 10]
*/
function parseInt(string, radix, guard) {
- if (guard || radix == null) {
- radix = 0;
- } else if (radix) {
- radix = +radix;
- }
+ if (guard || radix == null) radix = 0;
+ else if (radix) radix = +radix;
return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
}
/**
@@ -59010,11 +56165,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => ''
*/
function repeat(string, n, guard) {
- if (guard ? isIterateeCall(string, n, guard) : n === undefined) {
- n = 1;
- } else {
- n = toInteger(n);
- }
+ if (guard ? isIterateeCall(string, n, guard) : n === undefined) n = 1;
+ else n = toInteger(n);
return baseRepeat(toString(string), n);
}
/**
@@ -59084,19 +56236,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => ['a', 'b']
*/
function split(string, separator, limit) {
- if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
- separator = limit = undefined;
- }
+ if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) separator = limit = undefined;
limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
- if (!limit) {
- return [];
- }
+ if (!limit) return [];
string = toString(string);
if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) {
separator = baseToString(separator);
- if (!separator && hasUnicode(string)) {
- return castSlice(stringToArray(string), 0, limit);
- }
+ if (!separator && hasUnicode(string)) return castSlice(stringToArray(string), 0, limit);
}
return string.split(separator, limit);
}
@@ -59259,9 +56405,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function template(string, options, guard) {
var settings = lodash.templateSettings;
- if (guard && isIterateeCall(string, options, guard)) {
- options = undefined;
- }
+ if (guard && isIterateeCall(string, options, guard)) options = undefined;
string = toString(string);
options = assignInWith({}, options, settings, customDefaultsAssignIn);
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
@@ -59279,28 +56423,21 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
isEvaluating = true;
source += "';\n" + evaluateValue + ";\n__p += '";
}
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
+ if (interpolateValue) source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
index = offset + match.length;
return match;
});
source += "';\n";
var variable = hasOwnProperty.call(options, "variable") && options.variable;
- if (!variable) {
- source = "with (obj) {\n" + source + "\n}\n";
- } else if (reForbiddenIdentifierChars.test(variable)) {
- throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
- }
+ if (!variable) source = "with (obj) {\n" + source + "\n}\n";
+ else if (reForbiddenIdentifierChars.test(variable)) throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
- source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\n" + "function print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
+ source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
var result = attempt(function() {
return Function(importsKeys, sourceURL + "return " + source).apply(undefined, importsValues);
});
result.source = source;
- if (isError(result)) {
- throw result;
- }
+ if (isError(result)) throw result;
return result;
}
/**
@@ -59375,14 +56512,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function trim(string, chars, guard) {
string = toString(string);
- if (string && (guard || chars === undefined)) {
- return baseTrim(string);
- }
- if (!string || !(chars = baseToString(chars))) {
- return string;
- }
- var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
- return castSlice(strSymbols, start, end).join("");
+ if (string && (guard || chars === undefined)) return baseTrim(string);
+ if (!string || !(chars = baseToString(chars))) return string;
+ var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars);
+ return castSlice(strSymbols, charsStartIndex(strSymbols, chrSymbols), charsEndIndex(strSymbols, chrSymbols) + 1).join("");
}
/**
* Removes trailing whitespace or specified characters from `string`.
@@ -59405,14 +56538,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function trimEnd(string, chars, guard) {
string = toString(string);
- if (string && (guard || chars === undefined)) {
- return string.slice(0, trimmedEndIndex(string) + 1);
- }
- if (!string || !(chars = baseToString(chars))) {
- return string;
- }
- var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
- return castSlice(strSymbols, 0, end).join("");
+ if (string && (guard || chars === undefined)) return string.slice(0, trimmedEndIndex(string) + 1);
+ if (!string || !(chars = baseToString(chars))) return string;
+ var strSymbols = stringToArray(string);
+ return castSlice(strSymbols, 0, charsEndIndex(strSymbols, stringToArray(chars)) + 1).join("");
}
/**
* Removes leading whitespace or specified characters from `string`.
@@ -59435,14 +56564,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function trimStart(string, chars, guard) {
string = toString(string);
- if (string && (guard || chars === undefined)) {
- return string.replace(reTrimStart, "");
- }
- if (!string || !(chars = baseToString(chars))) {
- return string;
- }
- var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
- return castSlice(strSymbols, start).join("");
+ if (string && (guard || chars === undefined)) return string.replace(reTrimStart, "");
+ if (!string || !(chars = baseToString(chars))) return string;
+ var strSymbols = stringToArray(string);
+ return castSlice(strSymbols, charsStartIndex(strSymbols, stringToArray(chars))).join("");
}
/**
* Truncates `string` if it's longer than the given maximum string length.
@@ -59494,37 +56619,23 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var strSymbols = stringToArray(string);
strLength = strSymbols.length;
}
- if (length >= strLength) {
- return string;
- }
+ if (length >= strLength) return string;
var end = length - stringSize(omission);
- if (end < 1) {
- return omission;
- }
+ if (end < 1) return omission;
var result = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
- if (separator === undefined) {
- return result + omission;
- }
- if (strSymbols) {
- end += result.length - end;
- }
+ if (separator === undefined) return result + omission;
+ if (strSymbols) end += result.length - end;
if (isRegExp(separator)) {
if (string.slice(end).search(separator)) {
var match, substring = result;
- if (!separator.global) {
- separator = RegExp(separator.source, toString(reFlags.exec(separator)) + "g");
- }
+ if (!separator.global) separator = RegExp(separator.source, toString(reFlags.exec(separator)) + "g");
separator.lastIndex = 0;
- while (match = separator.exec(substring)) {
- var newEnd = match.index;
- }
+ while (match = separator.exec(substring)) var newEnd = match.index;
result = result.slice(0, newEnd === undefined ? end : newEnd);
}
} else if (string.indexOf(baseToString(separator), end) != end) {
var index = result.lastIndexOf(separator);
- if (index > -1) {
- result = result.slice(0, index);
- }
+ if (index > -1) result = result.slice(0, index);
}
return result + omission;
}
@@ -59614,9 +56725,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function words(string, pattern, guard) {
string = toString(string);
pattern = guard ? undefined : pattern;
- if (pattern === undefined) {
- return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
- }
+ if (pattern === undefined) return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
return string.match(pattern) || [];
}
/**
@@ -59713,18 +56822,14 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function cond(pairs) {
var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
pairs = !length ? [] : arrayMap(pairs, function(pair) {
- if (typeof pair[1] != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
+ if (typeof pair[1] != "function") throw new TypeError(FUNC_ERROR_TEXT);
return [toIteratee(pair[0]), pair[1]];
});
return baseRest(function(args) {
var index = -1;
while (++index < length) {
var pair = pairs[index];
- if (apply(pair[0], this, args)) {
- return apply(pair[1], this, args);
- }
+ if (apply(pair[0], this, args)) return apply(pair[1], this, args);
}
});
}
@@ -60090,22 +57195,20 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
arrayEach(methodNames, function(methodName) {
var func = source[methodName];
object[methodName] = func;
- if (isFunc) {
- object.prototype[methodName] = function() {
- var chainAll = this.__chain__;
- if (chain || chainAll) {
- var result = object(this.__wrapped__), actions = result.__actions__ = copyArray(this.__actions__);
- actions.push({
- "func": func,
- "args": arguments,
- "thisArg": object
- });
- result.__chain__ = chainAll;
- return result;
- }
- return func.apply(object, arrayPush([this.value()], arguments));
- };
- }
+ if (isFunc) object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__);
+ (result.__actions__ = copyArray(this.__actions__)).push({
+ "func": func,
+ "args": arguments,
+ "thisArg": object
+ });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
});
return object;
}
@@ -60123,9 +57226,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* var lodash = _.noConflict();
*/
function noConflict() {
- if (root._ === this) {
- root._ = oldDash;
- }
+ if (root._ === this) root._ = oldDash;
return this;
}
/**
@@ -60488,16 +57589,12 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function times(n, iteratee) {
n = toInteger(n);
- if (n < 1 || n > MAX_SAFE_INTEGER) {
- return [];
- }
+ if (n < 1 || n > MAX_SAFE_INTEGER) return [];
var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
iteratee = getIteratee(iteratee);
n -= MAX_ARRAY_LENGTH;
var result = baseTimes(length, iteratee);
- while (++index < n) {
- iteratee(index);
- }
+ while (++index < n) iteratee(index);
return result;
}
/**
@@ -60518,9 +57615,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* // => ['a', '0', 'b', 'c']
*/
function toPath(value) {
- if (isArray(value)) {
- return arrayMap(value, toKey);
- }
+ if (isArray(value)) return arrayMap(value, toKey);
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
}
/**
@@ -61171,9 +58266,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
mixin(lodash, function() {
var source = {};
baseForOwn(lodash, function(func, methodName) {
- if (!hasOwnProperty.call(lodash.prototype, methodName)) {
- source[methodName] = func;
- }
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) source[methodName] = func;
});
return source;
}(), { "chain": false });
@@ -61199,14 +58292,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
LazyWrapper.prototype[methodName] = function(n) {
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
- if (result.__filtered__) {
- result.__takeCount__ = nativeMin(n, result.__takeCount__);
- } else {
- result.__views__.push({
- "size": nativeMin(n, MAX_ARRAY_LENGTH),
- "type": methodName + (result.__dir__ < 0 ? "Right" : "")
- });
- }
+ if (result.__filtered__) result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ else result.__views__.push({
+ "size": nativeMin(n, MAX_ARRAY_LENGTH),
+ "type": methodName + (result.__dir__ < 0 ? "Right" : "")
+ });
return result;
};
LazyWrapper.prototype[methodName + "Right"] = function(n) {
@@ -61251,9 +58341,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this.reverse().find(predicate);
};
LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
- if (typeof path == "function") {
- return new LazyWrapper(this);
- }
+ if (typeof path == "function") return new LazyWrapper(this);
return this.map(function(value) {
return baseInvoke(value, path, args);
});
@@ -61264,14 +58352,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
LazyWrapper.prototype.slice = function(start, end) {
start = toInteger(start);
var result = this;
- if (result.__filtered__ && (start > 0 || end < 0)) {
- return new LazyWrapper(result);
- }
- if (start < 0) {
- result = result.takeRight(-start);
- } else if (start) {
- result = result.drop(start);
- }
+ if (result.__filtered__ && (start > 0 || end < 0)) return new LazyWrapper(result);
+ if (start < 0) result = result.takeRight(-start);
+ else if (start) result = result.drop(start);
if (end !== undefined) {
end = toInteger(end);
result = end < 0 ? result.dropRight(-end) : result.take(end - start);
@@ -61286,18 +58369,14 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
- if (!lodashFunc) {
- return;
- }
+ if (!lodashFunc) return;
lodash.prototype[methodName] = function() {
var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee = args[0], useLazy = isLazy || isArray(value);
var interceptor = function(value) {
var result = lodashFunc.apply(lodash, arrayPush([value], args));
return isTaker && chainAll ? result[0] : result;
};
- if (useLazy && checkIteratee && typeof iteratee == "function" && iteratee.length != 1) {
- isLazy = useLazy = false;
- }
+ if (useLazy && checkIteratee && typeof iteratee == "function" && iteratee.length != 1) isLazy = useLazy = false;
var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
if (!retUnwrapped && useLazy) {
value = onlyLazy ? value : new LazyWrapper(this);
@@ -61309,9 +58388,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
return new LodashWrapper(result, chainAll);
}
- if (isUnwrapped && onlyLazy) {
- return func.apply(this, args);
- }
+ if (isUnwrapped && onlyLazy) return func.apply(this, args);
result = this.thru(interceptor);
return isUnwrapped ? isTaker ? result.value()[0] : result.value() : result;
};
@@ -61340,9 +58417,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var lodashFunc = lodash[methodName];
if (lodashFunc) {
var key = lodashFunc.name + "";
- if (!hasOwnProperty.call(realNames, key)) {
- realNames[key] = [];
- }
+ if (!hasOwnProperty.call(realNames, key)) realNames[key] = [];
realNames[key].push({
"name": methodName,
"func": lodashFunc
@@ -61364,12 +58439,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
lodash.prototype.reverse = wrapperReverse;
lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
lodash.prototype.first = lodash.prototype.head;
- if (symIterator) {
- lodash.prototype[symIterator] = wrapperToIterator;
- }
+ if (symIterator) lodash.prototype[symIterator] = wrapperToIterator;
return lodash;
- });
- var _ = runInContext();
+ })();
if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
root._ = _;
define(function() {
@@ -61378,12 +58450,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} else if (freeModule) {
(freeModule.exports = _)._ = _;
freeExports._ = _;
- } else {
- root._ = _;
- }
+ } else root._ = _;
}).call(exports);
}));
-
//#endregion
//#region ../utils/natsort.js
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
@@ -61489,7 +58558,6 @@ const naturalCompare = naturalCompareFactory({
desc: false,
insensitive: true
});
-
//#endregion
//#region ../utils/utils.js
var utils_exports$1 = /* @__PURE__ */ __exportAll({
@@ -61515,7 +58583,7 @@ function getTitleLength(title) {
return title.length;
}
function getNowTime$1() {
- return new Date().getTime();
+ return (/* @__PURE__ */ new Date()).getTime();
}
async function sleep$2(ms) {
return new Promise((resolve) => {
@@ -61526,7 +58594,7 @@ async function sleep$2(ms) {
}
function sleepSync$1(ms) {
const end = Date.now() + ms;
- while (Date.now() < end) {}
+ while (Date.now() < end);
}
/**
* 计算文件内容的 hash 值
@@ -61571,11 +58639,8 @@ const urljoin2$1 = urljoin$2;
const joinUrl$1 = urljoin$2;
const updateQueryString = (originalUrl, newQuery) => {
const parsedUrl = new URL(originalUrl);
- if (newQuery === "" || newQuery === "?") {
- return parsedUrl.href;
- }
- const newQueryParams = new URLSearchParams(newQuery.slice(1));
- newQueryParams.forEach((value, key) => {
+ if (newQuery === "" || newQuery === "?") return parsedUrl.href;
+ new URLSearchParams(newQuery.slice(1)).forEach((value, key) => {
parsedUrl.searchParams.append(key, value);
});
return decodeURIComponent(parsedUrl.href);
@@ -61586,13 +58651,9 @@ function naturalSort$1(arr, key, customOrder = []) {
const bValue = b[key];
const aIndex = customOrder.findIndex((item) => aValue.includes(item));
const bIndex = customOrder.findIndex((item) => bValue.includes(item));
- if (aIndex !== -1 && bIndex !== -1) {
- return aIndex - bIndex;
- } else if (aIndex !== -1) {
- return -1;
- } else if (bIndex !== -1) {
- return 1;
- }
+ if (aIndex !== -1 && bIndex !== -1) return aIndex - bIndex;
+ else if (aIndex !== -1) return -1;
+ else if (bIndex !== -1) return 1;
return naturalCompare(aValue, bValue);
});
}
@@ -61659,9 +58720,7 @@ function createBasicAuthHeaders$1(username, password) {
return { "Authorization": `Basic ${credentials}` };
}
function get_size$1(sz) {
- if (sz <= 0) {
- return "";
- }
+ if (sz <= 0) return "";
let filesize = "";
if (sz > 1024 * 1024 * 1024 * 1024) {
sz /= 1024 * 1024 * 1024 * 1024;
@@ -61675,15 +58734,10 @@ function get_size$1(sz) {
} else if (sz > 1024) {
sz /= 1024;
filesize = "KB";
- } else {
- filesize = "B";
- }
- let sizeStr = sz.toFixed(2) + filesize, index = sizeStr.indexOf("."), dou = sizeStr.substr(index + 1, 2);
- if (dou === "00") {
- return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2);
- } else {
- return sizeStr;
- }
+ } else filesize = "B";
+ let sizeStr = sz.toFixed(2) + filesize, index = sizeStr.indexOf(".");
+ if (sizeStr.substr(index + 1, 2) === "00") return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2);
+ else return sizeStr;
}
const $js$1 = { toString(func) {
let strfun = func.toString();
@@ -61692,7 +58746,6 @@ const $js$1 = { toString(func) {
strfun = strfun.replace(/^js:\s*/, "js:").replace(/\s*$/, "");
return strfun;
} };
-
//#endregion
//#region ../utils/misc.js
var misc_exports = /* @__PURE__ */ __exportAll({
@@ -61756,7 +58809,7 @@ function rand(min, max) {
*/
function randStr$1(len, withNum, onlyNum) {
var _str = "";
- let containsNum = withNum === undefined ? true : withNum;
+ let containsNum = withNum === void 0 ? true : withNum;
for (var i = 0; i < len; i++) {
let idx = onlyNum ? rand(charStr$1.length - 10, charStr$1.length - 1) : rand(0, containsNum ? charStr$1.length - 1 : charStr$1.length - 11);
_str += charStr$1[idx];
@@ -62099,14 +59152,11 @@ function randDevice() {
let brandIdx = rand(0, deviceBrands.length - 1);
let brand = deviceBrands[brandIdx];
let modelIdx = rand(0, deviceModels[brandIdx].length / 2 - 1);
- let model = deviceModels[brandIdx][modelIdx * 2 + 1];
- let release = rand(8, 13);
- let buildId = randStr$1(3, false).toUpperCase() + rand(11, 99) + randStr$1(1, false).toUpperCase();
return {
brand,
- model,
- release,
- buildId
+ model: deviceModels[brandIdx][modelIdx * 2 + 1],
+ release: rand(8, 13),
+ buildId: randStr$1(3, false).toUpperCase() + rand(11, 99) + randStr$1(1, false).toUpperCase()
};
}
/**
@@ -62142,9 +59192,7 @@ const MAC_UA = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,
* formatPlayUrl('http://example.com', '《电影名称》http://example.com'); // 返回 "电影名称"
*/
function formatPlayUrl(src, name) {
- if (src.trim() == name.trim()) {
- return name;
- }
+ if (src.trim() == name.trim()) return name;
return name.trim().replaceAll(src, "").replace(/<|>|《|》/g, "").replace(/\$|#/g, " ").trim();
}
/**
@@ -62161,9 +59209,7 @@ function formatPlayUrl(src, name) {
*/
function formatPlayUrl2(src, name) {
var idx = name.indexOf("$");
- if (idx <= 0) {
- return formatPlayUrl(src, name);
- }
+ if (idx <= 0) return formatPlayUrl(src, name);
return formatPlayUrl(src, name.substring(0, idx)) + name.substring(idx);
}
/**
@@ -62197,12 +59243,8 @@ function fixUrl(base, src) {
try {
if (src.startsWith("//")) {
let parse = new URL(base);
- let host = src.substring(2, src.indexOf("/", 2));
- if (!host.includes(".")) {
- src = parse.protocol + "://" + parse.host + src.substring(1);
- } else {
- src = parse.protocol + ":" + src;
- }
+ if (!src.substring(2, src.indexOf("/", 2)).includes(".")) src = parse.protocol + "://" + parse.host + src.substring(1);
+ else src = parse.protocol + ":" + src;
} else if (!src.includes("://")) {
let parse = new URL(base);
src = parse.protocol + "://" + parse.host + src;
@@ -62233,21 +59275,13 @@ function fixUrl(base, src) {
function jsonParse(input, json) {
try {
let url = json.url || "";
- if (url.startsWith("//")) {
- url = "https:" + url;
- }
- if (!url.startsWith("http")) {
- return {};
- }
+ if (url.startsWith("//")) url = "https:" + url;
+ if (!url.startsWith("http")) return {};
let headers = json["headers"] || {};
let ua = (json["user-agent"] || "").trim();
- if (ua.length > 0) {
- headers["User-Agent"] = ua;
- }
+ if (ua.length > 0) headers["User-Agent"] = ua;
let referer = (json["referer"] || "").trim();
- if (referer.length > 0) {
- headers["Referer"] = referer;
- }
+ if (referer.length > 0) headers["Referer"] = referer;
return {
header: headers,
url
@@ -62257,7 +59291,6 @@ function jsonParse(input, json) {
}
return {};
}
-
//#endregion
//#region ../utils/cookieManager.js
/**
@@ -62354,8 +59387,7 @@ function parse$7(input, options) {
const key = str.slice(keyStartIdx, keyEndIdx);
let valStartIdx = startIndex(str, eqIdx + 1, endIdx);
let valEndIdx = endIndex(str, endIdx, valStartIdx);
- const value = dec(str.slice(valStartIdx, valEndIdx));
- obj[key] = value;
+ obj[key] = dec(str.slice(valStartIdx, valEndIdx));
index = endIdx + 1;
} while (index < len);
}
@@ -62383,78 +59415,54 @@ function endIndex(str, index, min) {
*/
function serialize$2(name, val, options) {
const enc = options?.encode || encodeURIComponent;
- if (!cookieNameRegExp.test(name)) {
- throw new TypeError(`argument name is invalid: ${name}`);
- }
+ if (!cookieNameRegExp.test(name)) throw new TypeError(`argument name is invalid: ${name}`);
const value = enc(val);
- if (!cookieValueRegExp.test(value)) {
- throw new TypeError(`argument val is invalid: ${val}`);
- }
+ if (!cookieValueRegExp.test(value)) throw new TypeError(`argument val is invalid: ${val}`);
let str = name + "=" + value;
if (!options) return str;
- if (options.maxAge !== undefined) {
- if (!Number.isInteger(options.maxAge)) {
- throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);
- }
+ if (options.maxAge !== void 0) {
+ if (!Number.isInteger(options.maxAge)) throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);
str += "; Max-Age=" + options.maxAge;
}
if (options.domain) {
- if (!domainValueRegExp.test(options.domain)) {
- throw new TypeError(`option domain is invalid: ${options.domain}`);
- }
+ if (!domainValueRegExp.test(options.domain)) throw new TypeError(`option domain is invalid: ${options.domain}`);
str += "; Domain=" + options.domain;
}
if (options.path) {
- if (!pathValueRegExp.test(options.path)) {
- throw new TypeError(`option path is invalid: ${options.path}`);
- }
+ if (!pathValueRegExp.test(options.path)) throw new TypeError(`option path is invalid: ${options.path}`);
str += "; Path=" + options.path;
}
if (options.expires) {
- if (!isDate$2(options.expires) || !Number.isFinite(options.expires.valueOf())) {
- throw new TypeError(`option expires is invalid: ${options.expires}`);
- }
+ if (!isDate$2(options.expires) || !Number.isFinite(options.expires.valueOf())) throw new TypeError(`option expires is invalid: ${options.expires}`);
str += "; Expires=" + options.expires.toUTCString();
}
- if (options.httpOnly) {
- str += "; HttpOnly";
- }
- if (options.secure) {
- str += "; Secure";
- }
- if (options.partitioned) {
- str += "; Partitioned";
- }
- if (options.priority) {
- const priority = typeof options.priority === "string" ? options.priority.toLowerCase() : undefined;
- switch (priority) {
- case "low":
- str += "; Priority=Low";
- break;
- case "medium":
- str += "; Priority=Medium";
- break;
- case "high":
- str += "; Priority=High";
- break;
- default: throw new TypeError(`option priority is invalid: ${options.priority}`);
- }
+ if (options.httpOnly) str += "; HttpOnly";
+ if (options.secure) str += "; Secure";
+ if (options.partitioned) str += "; Partitioned";
+ if (options.priority) switch (typeof options.priority === "string" ? options.priority.toLowerCase() : void 0) {
+ case "low":
+ str += "; Priority=Low";
+ break;
+ case "medium":
+ str += "; Priority=Medium";
+ break;
+ case "high":
+ str += "; Priority=High";
+ break;
+ default: throw new TypeError(`option priority is invalid: ${options.priority}`);
}
- if (options.sameSite) {
- const sameSite = typeof options.sameSite === "string" ? options.sameSite.toLowerCase() : options.sameSite;
- switch (sameSite) {
- case true:
- case "strict":
- str += "; SameSite=Strict";
- break;
- case "lax":
- str += "; SameSite=Lax";
- break;
- case "none":
- str += "; SameSite=None";
- break;
- default: throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);
- }
+ if (options.sameSite) switch (typeof options.sameSite === "string" ? options.sameSite.toLowerCase() : options.sameSite) {
+ case true:
+ case "strict":
+ str += "; SameSite=Strict";
+ break;
+ case "lax":
+ str += "; SameSite=Lax";
+ break;
+ case "none":
+ str += "; SameSite=None";
+ break;
+ default: throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);
}
return str;
}
@@ -62483,7 +59491,6 @@ const COOKIE = {
serialize: serialize$2,
stringify: stringify$4
};
-
//#endregion
//#region ../node_modules/axios/lib/helpers/bind.js
function bind$1(fn, thisArg) {
@@ -62491,7 +59498,6 @@ function bind$1(fn, thisArg) {
return fn.apply(thisArg, arguments);
};
}
-
//#endregion
//#region ../node_modules/axios/lib/utils.js
const { toString: toString$3 } = Object.prototype;
@@ -62549,11 +59555,8 @@ const isArrayBuffer$2 = kindOfTest("ArrayBuffer");
*/
function isArrayBufferView(val) {
let result;
- if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
- result = ArrayBuffer.isView(val);
- } else {
- result = val && val.buffer && isArrayBuffer$2(val.buffer);
- }
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) result = ArrayBuffer.isView(val);
+ else result = val && val.buffer && isArrayBuffer$2(val.buffer);
return result;
}
/**
@@ -62602,9 +59605,7 @@ const isBoolean$1 = (thing) => thing === true || thing === false;
* @returns {boolean} True if value is a plain Object, otherwise false
*/
const isPlainObject = (val) => {
- if (kindOf(val) !== "object") {
- return false;
- }
+ if (kindOf(val) !== "object") return false;
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
};
@@ -62616,9 +59617,7 @@ const isPlainObject = (val) => {
* @returns {boolean} True if value is an empty object, otherwise false
*/
const isEmptyObject = (val) => {
- if (!isObject$1(val) || isBuffer(val)) {
- return false;
- }
+ if (!isObject$1(val) || isBuffer(val)) return false;
try {
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
} catch (e) {
@@ -62714,22 +59713,13 @@ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\
* @returns {any}
*/
function forEach(obj, fn, { allOwnKeys = false } = {}) {
- if (obj === null || typeof obj === "undefined") {
- return;
- }
+ if (obj === null || typeof obj === "undefined") return;
let i;
let l;
- if (typeof obj !== "object") {
- obj = [obj];
- }
- if (isArray$1(obj)) {
- for (i = 0, l = obj.length; i < l; i++) {
- fn.call(null, obj[i], i, obj);
- }
- } else {
- if (isBuffer(obj)) {
- return;
- }
+ if (typeof obj !== "object") obj = [obj];
+ if (isArray$1(obj)) for (i = 0, l = obj.length; i < l; i++) fn.call(null, obj[i], i, obj);
+ else {
+ if (isBuffer(obj)) return;
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const len = keys.length;
let key;
@@ -62740,18 +59730,14 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
}
}
function findKey$1(obj, key) {
- if (isBuffer(obj)) {
- return null;
- }
+ if (isBuffer(obj)) return null;
key = key.toLowerCase();
const keys = Object.keys(obj);
let i = keys.length;
let _key;
while (i-- > 0) {
_key = keys[i];
- if (key === _key.toLowerCase()) {
- return _key;
- }
+ if (key === _key.toLowerCase()) return _key;
}
return null;
}
@@ -62783,19 +59769,12 @@ function merge$1() {
const result = {};
const assignValue = (val, key) => {
const targetKey = caseless && findKey$1(result, key) || key;
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
- result[targetKey] = merge$1(result[targetKey], val);
- } else if (isPlainObject(val)) {
- result[targetKey] = merge$1({}, val);
- } else if (isArray$1(val)) {
- result[targetKey] = val.slice();
- } else if (!skipUndefined || !isUndefined$1(val)) {
- result[targetKey] = val;
- }
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) result[targetKey] = merge$1(result[targetKey], val);
+ else if (isPlainObject(val)) result[targetKey] = merge$1({}, val);
+ else if (isArray$1(val)) result[targetKey] = val.slice();
+ else if (!skipUndefined || !isUndefined$1(val)) result[targetKey] = val;
};
- for (let i = 0, l = arguments.length; i < l; i++) {
- arguments[i] && forEach(arguments[i], assignValue);
- }
+ for (let i = 0, l = arguments.length; i < l; i++) arguments[i] && forEach(arguments[i], assignValue);
return result;
}
/**
@@ -62810,11 +59789,8 @@ function merge$1() {
*/
const extend$1 = (a, b, thisArg, { allOwnKeys } = {}) => {
forEach(b, (val, key) => {
- if (thisArg && isFunction$3(val)) {
- a[key] = bind$1(val, thisArg);
- } else {
- a[key] = val;
- }
+ if (thisArg && isFunction$3(val)) a[key] = bind$1(val, thisArg);
+ else a[key] = val;
}, { allOwnKeys });
return a;
};
@@ -62826,9 +59802,7 @@ const extend$1 = (a, b, thisArg, { allOwnKeys } = {}) => {
* @returns {string} content value without BOM
*/
const stripBOM = (content) => {
- if (content.charCodeAt(0) === 65279) {
- content = content.slice(1);
- }
+ if (content.charCodeAt(0) === 65279) content = content.slice(1);
return content;
};
/**
@@ -62887,9 +59861,7 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
*/
const endsWith = (str, searchString, position) => {
str = String(str);
- if (position === undefined || position > str.length) {
- position = str.length;
- }
+ if (position === void 0 || position > str.length) position = str.length;
position -= searchString.length;
const lastIndex = str.indexOf(searchString, position);
return lastIndex !== -1 && lastIndex === position;
@@ -62907,9 +59879,7 @@ const toArray$2 = (thing) => {
let i = thing.length;
if (!isNumber$4(i)) return null;
const arr = new Array(i);
- while (i-- > 0) {
- arr[i] = thing[i];
- }
+ while (i-- > 0) arr[i] = thing[i];
return arr;
};
/**
@@ -62934,8 +59904,7 @@ const isTypedArray$2 = ((TypedArray) => {
* @returns {void}
*/
const forEachEntry = (obj, fn) => {
- const generator = obj && obj[iterator];
- const _iterator = generator.call(obj);
+ const _iterator = (obj && obj[iterator]).call(obj);
let result;
while ((result = _iterator.next()) && !result.done) {
const pair = result.value;
@@ -62953,9 +59922,7 @@ const forEachEntry = (obj, fn) => {
const matchAll = (regExp, str) => {
let matches;
const arr = [];
- while ((matches = regExp.exec(str)) !== null) {
- arr.push(matches);
- }
+ while ((matches = regExp.exec(str)) !== null) arr.push(matches);
return arr;
};
const isHTMLForm = kindOfTest("HTMLFormElement");
@@ -62978,9 +59945,7 @@ const reduceDescriptors = (obj, reducer) => {
const reducedDescriptors = {};
forEach(descriptors, (descriptor, name) => {
let ret;
- if ((ret = reducer(descriptor, name, obj)) !== false) {
- reducedDescriptors[name] = ret || descriptor;
- }
+ if ((ret = reducer(descriptor, name, obj)) !== false) reducedDescriptors[name] = ret || descriptor;
});
Object.defineProperties(obj, reducedDescriptors);
};
@@ -62994,9 +59959,7 @@ const freezeMethods = (obj) => {
"arguments",
"caller",
"callee"
- ].indexOf(name) !== -1) {
- return false;
- }
+ ].indexOf(name) !== -1) return false;
const value = obj[name];
if (!isFunction$3(value)) return;
descriptor.enumerable = false;
@@ -63004,11 +59967,9 @@ const freezeMethods = (obj) => {
descriptor.writable = false;
return;
}
- if (!descriptor.set) {
- descriptor.set = () => {
- throw Error("Can not rewrite read-only method '" + name + "'");
- };
- }
+ if (!descriptor.set) descriptor.set = () => {
+ throw Error("Can not rewrite read-only method '" + name + "'");
+ };
});
};
const toObjectSet = (arrayOrString, delimiter) => {
@@ -63039,12 +60000,8 @@ const toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
if (isObject$1(source)) {
- if (stack.indexOf(source) >= 0) {
- return;
- }
- if (isBuffer(source)) {
- return source;
- }
+ if (stack.indexOf(source) >= 0) return;
+ if (isBuffer(source)) return source;
if (!("toJSON" in source)) {
stack[i] = source;
const target = isArray$1(source) ? [] : {};
@@ -63052,7 +60009,7 @@ const toJSONObject = (obj) => {
const reducedValue = visit(value, i + 1);
!isUndefined$1(reducedValue) && (target[key] = reducedValue);
});
- stack[i] = undefined;
+ stack[i] = void 0;
return target;
}
}
@@ -63063,14 +60020,10 @@ const toJSONObject = (obj) => {
const isAsyncFn = kindOfTest("AsyncFunction");
const isThenable = (thing) => thing && (isObject$1(thing) || isFunction$3(thing)) && isFunction$3(thing.then) && isFunction$3(thing.catch);
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
- if (setImmediateSupported) {
- return setImmediate;
- }
+ if (setImmediateSupported) return setImmediate;
return postMessageSupported ? ((token, callbacks) => {
_global.addEventListener("message", ({ source, data }) => {
- if (source === _global && data === token) {
- callbacks.length && callbacks.shift()();
- }
+ if (source === _global && data === token) callbacks.length && callbacks.shift()();
}, false);
return (cb) => {
callbacks.push(cb);
@@ -63139,7 +60092,6 @@ var utils_default = {
asap,
isIterable
};
-
//#endregion
//#region ../node_modules/axios/lib/core/AxiosError.js
/**
@@ -63155,11 +60107,8 @@ var utils_default = {
*/
function AxiosError$1(message, code, config, request, response) {
Error.call(this);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- } else {
- this.stack = new Error().stack;
- }
+ if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
+ else this.stack = (/* @__PURE__ */ new Error()).stack;
this.message = message;
this.name = "AxiosError";
code && (this.code = code);
@@ -63215,17 +60164,14 @@ AxiosError$1.from = (error, code, config, request, response, customProps) => {
const msg = error && error.message ? error.message : "Error";
const errCode = code == null && error ? error.code : code;
AxiosError$1.call(axiosError, msg, errCode, config, request, response);
- if (error && axiosError.cause == null) {
- Object.defineProperty(axiosError, "cause", {
- value: error,
- configurable: true
- });
- }
+ if (error && axiosError.cause == null) Object.defineProperty(axiosError, "cause", {
+ value: error,
+ configurable: true
+ });
axiosError.name = error && error.name || "Error";
customProps && Object.assign(axiosError, customProps);
return axiosError;
};
-
//#endregion
//#region ../node_modules/delayed-stream/lib/delayed_stream.js
var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -63245,9 +60191,7 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
DelayedStream.create = function(source, options) {
var delayedStream = new this();
options = options || {};
- for (var option in options) {
- delayedStream[option] = options[option];
- }
+ for (var option in options) delayedStream[option] = options[option];
delayedStream.source = source;
var realEmit = source.emit;
source.emit = function() {
@@ -63255,9 +60199,7 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return realEmit.apply(source, arguments);
};
source.on("error", function() {});
- if (delayedStream.pauseStream) {
- source.pause();
- }
+ if (delayedStream.pauseStream) source.pause();
return delayedStream;
};
Object.defineProperty(DelayedStream.prototype, "readable", {
@@ -63271,9 +60213,7 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return this.source.setEncoding.apply(this.source, arguments);
};
DelayedStream.prototype.resume = function() {
- if (!this._released) {
- this.release();
- }
+ if (!this._released) this.release();
this.source.resume();
};
DelayedStream.prototype.pause = function() {
@@ -63303,18 +60243,13 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
this._bufferedEvents.push(args);
};
DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
- if (this._maxDataSizeExceeded) {
- return;
- }
- if (this.dataSize <= this.maxDataSize) {
- return;
- }
+ 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));
};
}));
-
//#endregion
//#region ../node_modules/combined-stream/lib/combined_stream.js
var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -63338,17 +60273,14 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
CombinedStream.create = function(options) {
var combinedStream = new this();
options = options || {};
- for (var option in options) {
- combinedStream[option] = options[option];
- }
+ for (var option in options) combinedStream[option] = options[option];
return combinedStream;
};
CombinedStream.isStreamLike = function(stream) {
return typeof stream !== "function" && typeof stream !== "string" && typeof stream !== "boolean" && typeof stream !== "number" && !Buffer.isBuffer(stream);
};
CombinedStream.prototype.append = function(stream) {
- var isStreamLike = CombinedStream.isStreamLike(stream);
- if (isStreamLike) {
+ if (CombinedStream.isStreamLike(stream)) {
if (!(stream instanceof DelayedStream)) {
var newStream = DelayedStream.create(stream, {
maxDataSize: Infinity,
@@ -63358,9 +60290,7 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
stream = newStream;
}
this._handleErrors(stream);
- if (this.pauseStreams) {
- stream.pause();
- }
+ if (this.pauseStreams) stream.pause();
}
this._streams.push(stream);
return this;
@@ -63396,10 +60326,8 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
this._pipeNext(stream);
return;
}
- var getStream = stream;
- getStream(function(stream) {
- var isStreamLike = CombinedStream.isStreamLike(stream);
- if (isStreamLike) {
+ stream(function(stream) {
+ if (CombinedStream.isStreamLike(stream)) {
stream.on("data", this._checkDataSize.bind(this));
this._handleErrors(stream);
}
@@ -63408,8 +60336,7 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
};
CombinedStream.prototype._pipeNext = function(stream) {
this._currentStream = stream;
- var isStreamLike = CombinedStream.isStreamLike(stream);
- if (isStreamLike) {
+ if (CombinedStream.isStreamLike(stream)) {
stream.on("end", this._getNext.bind(this));
stream.pipe(this, { end: false });
return;
@@ -63428,9 +60355,7 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
this.emit("data", data);
};
CombinedStream.prototype.pause = function() {
- if (!this.pauseStreams) {
- return;
- }
+ if (!this.pauseStreams) return;
if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") this._currentStream.pause();
this.emit("pause");
};
@@ -63458,9 +60383,7 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
};
CombinedStream.prototype._checkDataSize = function() {
this._updateDataSize();
- if (this.dataSize <= this.maxDataSize) {
- return;
- }
+ if (this.dataSize <= this.maxDataSize) return;
var message = "DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded.";
this._emitError(new Error(message));
};
@@ -63468,21 +60391,16 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
this.dataSize = 0;
var self = this;
this._streams.forEach(function(stream) {
- if (!stream.dataSize) {
- return;
- }
+ if (!stream.dataSize) return;
self.dataSize += stream.dataSize;
});
- if (this._currentStream && this._currentStream.dataSize) {
- this.dataSize += this._currentStream.dataSize;
- }
+ if (this._currentStream && this._currentStream.dataSize) this.dataSize += this._currentStream.dataSize;
};
CombinedStream.prototype._emitError = function(err) {
this._reset();
this.emit("error", err);
};
}));
-
//#endregion
//#region ../node_modules/mime-db/db.json
var require_db = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70528,7 +67446,6 @@ var require_db = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"x-shader/x-vertex": { "compressible": true }
};
}));
-
//#endregion
//#region ../node_modules/mime-db/index.js
var require_mime_db = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70543,7 +67460,6 @@ var require_mime_db = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
module.exports = require_db();
}));
-
//#endregion
//#region ../node_modules/mime-types/index.js
/*!
@@ -70584,17 +67500,11 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
* @return {boolean|string}
*/
function charset(type) {
- if (!type || typeof type !== "string") {
- return false;
- }
+ 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";
- }
+ if (mime && mime.charset) return mime.charset;
+ if (match && TEXT_TYPE_REGEXP.test(match[1])) return "UTF-8";
return false;
}
/**
@@ -70604,13 +67514,9 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
* @return {boolean|string}
*/
function contentType(str) {
- if (!str || typeof str !== "string") {
- return false;
- }
+ if (!str || typeof str !== "string") return false;
var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str;
- if (!mime) {
- return false;
- }
+ if (!mime) return false;
if (mime.indexOf("charset") === -1) {
var charset = exports.charset(mime);
if (charset) mime += "; charset=" + charset.toLowerCase();
@@ -70624,14 +67530,10 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
* @return {boolean|string}
*/
function extension(type) {
- if (!type || typeof type !== "string") {
- return false;
- }
+ if (!type || typeof type !== "string") return false;
var match = EXTRACT_TYPE_REGEXP.exec(type);
var exts = match && exports.extensions[match[1].toLowerCase()];
- if (!exts || !exts.length) {
- return false;
- }
+ if (!exts || !exts.length) return false;
return exts[0];
}
/**
@@ -70641,13 +67543,9 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
* @return {boolean|string}
*/
function lookup(path) {
- if (!path || typeof path !== "string") {
- return false;
- }
+ if (!path || typeof path !== "string") return false;
var extension = extname("x." + path).toLowerCase().substr(1);
- if (!extension) {
- return false;
- }
+ if (!extension) return false;
return exports.types[extension] || false;
}
/**
@@ -70658,31 +67556,26 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
var preference = [
"nginx",
"apache",
- undefined,
+ void 0,
"iana"
];
Object.keys(db).forEach(function forEachMimeType(type) {
var mime = db[type];
var exts = mime.extensions;
- if (!exts || !exts.length) {
- return;
- }
+ if (!exts || !exts.length) return;
extensions[type] = exts;
for (var i = 0; i < exts.length; i++) {
var extension = exts[i];
if (types[extension]) {
var from = preference.indexOf(db[types[extension]].source);
var to = preference.indexOf(mime.source);
- if (types[extension] !== "application/octet-stream" && (from > to || from === to && types[extension].substr(0, 12) === "application/")) {
- continue;
- }
+ if (types[extension] !== "application/octet-stream" && (from > to || from === to && types[extension].substr(0, 12) === "application/")) continue;
}
types[extension] = type;
}
});
}
}));
-
//#endregion
//#region ../node_modules/asynckit/lib/defer.js
var require_defer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70694,14 +67587,10 @@ var require_defer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
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);
- }
+ if (nextTick) nextTick(fn);
+ else setTimeout(fn, 0);
}
}));
-
//#endregion
//#region ../node_modules/asynckit/lib/async.js
var require_async = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70720,17 +67609,13 @@ var require_async = /* @__PURE__ */ __commonJSMin(((exports, module) => {
isAsync = true;
});
return function async_callback(err, result) {
- if (isAsync) {
+ if (isAsync) callback(err, result);
+ else defer(function nextTick_callback() {
callback(err, result);
- } else {
- defer(function nextTick_callback() {
- callback(err, result);
- });
- }
+ });
};
}
}));
-
//#endregion
//#region ../node_modules/asynckit/lib/abort.js
var require_abort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70751,12 +67636,9 @@ var require_abort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param {string|number} key - job id to abort
*/
function clean(key) {
- if (typeof this.jobs[key] == "function") {
- this.jobs[key]();
- }
+ if (typeof this.jobs[key] == "function") this.jobs[key]();
}
}));
-
//#endregion
//#region ../node_modules/asynckit/lib/iterate.js
var require_iterate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70773,15 +67655,10 @@ var require_iterate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
- }
+ if (!(key in state.jobs)) return;
delete state.jobs[key];
- if (error) {
- abort(state);
- } else {
- state.results[key] = output;
- }
+ if (error) abort(state);
+ else state.results[key] = output;
callback(error, state.results);
});
}
@@ -70796,15 +67673,11 @@ var require_iterate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function runJob(iterator, key, item, callback) {
var aborter;
- if (iterator.length == 2) {
- aborter = iterator(item, async(callback));
- } else {
- aborter = iterator(item, key, async(callback));
- }
+ if (iterator.length == 2) aborter = iterator(item, async(callback));
+ else aborter = iterator(item, key, async(callback));
return aborter;
}
}));
-
//#endregion
//#region ../node_modules/asynckit/lib/state.js
var require_state = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70826,15 +67699,12 @@ var require_state = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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]);
- });
- }
+ if (sortMethod) initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) {
+ return sortMethod(list[a], list[b]);
+ });
return initState;
}
}));
-
//#endregion
//#region ../node_modules/asynckit/lib/terminator.js
var require_terminator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70847,15 +67717,12 @@ var require_terminator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param {function} callback - final callback to invoke after termination
*/
function terminator(callback) {
- if (!Object.keys(this.jobs).length) {
- return;
- }
+ if (!Object.keys(this.jobs).length) return;
this.index = this.size;
abort(this);
async(callback)(null, this.results);
}
}));
-
//#endregion
//#region ../node_modules/asynckit/parallel.js
var require_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70887,7 +67754,6 @@ var require_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return terminator.bind(state, callback);
}
}));
-
//#endregion
//#region ../node_modules/asynckit/serialOrdered.js
var require_serialOrdered = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70941,7 +67807,6 @@ var require_serialOrdered = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return -1 * ascending(a, b);
}
}));
-
//#endregion
//#region ../node_modules/asynckit/serial.js
var require_serial = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70959,7 +67824,6 @@ var require_serial = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return serialOrdered(list, iterator, null, callback);
}
}));
-
//#endregion
//#region ../node_modules/asynckit/index.js
var require_asynckit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -70969,105 +67833,90 @@ var require_asynckit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
serialOrdered: require_serialOrdered()
};
}));
-
//#endregion
//#region ../node_modules/es-object-atoms/index.js
var require_es_object_atoms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('.')} */
module.exports = Object;
}));
-
//#endregion
//#region ../node_modules/es-errors/index.js
var require_es_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('.')} */
module.exports = Error;
}));
-
//#endregion
//#region ../node_modules/es-errors/eval.js
var require_eval = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./eval')} */
module.exports = EvalError;
}));
-
//#endregion
//#region ../node_modules/es-errors/range.js
var require_range$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./range')} */
module.exports = RangeError;
}));
-
//#endregion
//#region ../node_modules/es-errors/ref.js
var require_ref$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./ref')} */
module.exports = ReferenceError;
}));
-
//#endregion
//#region ../node_modules/es-errors/syntax.js
var require_syntax = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./syntax')} */
module.exports = SyntaxError;
}));
-
//#endregion
//#region ../node_modules/es-errors/type.js
var require_type$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./type')} */
module.exports = TypeError;
}));
-
//#endregion
//#region ../node_modules/es-errors/uri.js
var require_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./uri')} */
module.exports = URIError;
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/abs.js
var require_abs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./abs')} */
module.exports = Math.abs;
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/floor.js
var require_floor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./floor')} */
module.exports = Math.floor;
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/max.js
var require_max = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./max')} */
module.exports = Math.max;
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/min.js
var require_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./min')} */
module.exports = Math.min;
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/pow.js
var require_pow = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./pow')} */
module.exports = Math.pow;
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/round.js
var require_round = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./round')} */
module.exports = Math.round;
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/isNaN.js
var require_isNaN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71076,109 +67925,75 @@ var require_isNaN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return a !== a;
};
}));
-
//#endregion
//#region ../node_modules/math-intrinsics/sign.js
var require_sign = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var $isNaN = require_isNaN();
/** @type {import('./sign')} */
module.exports = function sign(number) {
- if ($isNaN(number) || number === 0) {
- return number;
- }
- return number < 0 ? -1 : +1;
+ if ($isNaN(number) || number === 0) return number;
+ return number < 0 ? -1 : 1;
};
}));
-
//#endregion
//#region ../node_modules/gopd/gOPD.js
var require_gOPD = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./gOPD')} */
module.exports = Object.getOwnPropertyDescriptor;
}));
-
//#endregion
//#region ../node_modules/gopd/index.js
var require_gopd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('.')} */
var $gOPD = require_gOPD();
- if ($gOPD) {
- try {
- $gOPD([], "length");
- } catch (e) {
- $gOPD = null;
- }
+ if ($gOPD) try {
+ $gOPD([], "length");
+ } catch (e) {
+ $gOPD = null;
}
module.exports = $gOPD;
}));
-
//#endregion
//#region ../node_modules/es-define-property/index.js
var require_es_define_property = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('.')} */
var $defineProperty = Object.defineProperty || false;
- if ($defineProperty) {
- try {
- $defineProperty({}, "a", { value: 1 });
- } catch (e) {
- $defineProperty = false;
- }
+ if ($defineProperty) try {
+ $defineProperty({}, "a", { value: 1 });
+ } catch (e) {
+ $defineProperty = false;
}
module.exports = $defineProperty;
}));
-
//#endregion
//#region ../node_modules/has-symbols/shams.js
var require_shams$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./shams')} */
module.exports = function hasSymbols() {
- if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
- return false;
- }
- if (typeof Symbol.iterator === "symbol") {
- return true;
- }
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") return false;
+ if (typeof Symbol.iterator === "symbol") return true;
/** @type {{ [k in symbol]?: unknown }} */
var obj = {};
var sym = Symbol("test");
var symObj = Object(sym);
- if (typeof sym === "string") {
- return false;
- }
- if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
- return false;
- }
- if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
- return false;
- }
+ if (typeof sym === "string") return false;
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") return false;
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") return false;
var symVal = 42;
obj[sym] = symVal;
- for (var _ in obj) {
- return false;
- }
- if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
- return false;
- }
- if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
- return false;
- }
+ for (var _ in obj) return false;
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) return false;
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) return false;
var syms = Object.getOwnPropertySymbols(obj);
- if (syms.length !== 1 || syms[0] !== sym) {
- return false;
- }
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
- return false;
- }
+ if (syms.length !== 1 || syms[0] !== sym) return false;
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) return false;
if (typeof Object.getOwnPropertyDescriptor === "function") {
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
- if (descriptor.value !== symVal || descriptor.enumerable !== true) {
- return false;
- }
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) return false;
}
return true;
};
}));
-
//#endregion
//#region ../node_modules/has-symbols/index.js
var require_has_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71186,37 +68001,25 @@ var require_has_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var hasSymbolSham = require_shams$1();
/** @type {import('.')} */
module.exports = function hasNativeSymbols() {
- if (typeof origSymbol !== "function") {
- return false;
- }
- if (typeof Symbol !== "function") {
- return false;
- }
- if (typeof origSymbol("foo") !== "symbol") {
- return false;
- }
- if (typeof Symbol("bar") !== "symbol") {
- return false;
- }
+ if (typeof origSymbol !== "function") return false;
+ if (typeof Symbol !== "function") return false;
+ if (typeof origSymbol("foo") !== "symbol") return false;
+ if (typeof Symbol("bar") !== "symbol") return false;
return hasSymbolSham();
};
}));
-
//#endregion
//#region ../node_modules/get-proto/Reflect.getPrototypeOf.js
var require_Reflect_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./Reflect.getPrototypeOf')} */
module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
}));
-
//#endregion
//#region ../node_modules/get-proto/Object.getPrototypeOf.js
var require_Object_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- var $Object = require_es_object_atoms();
/** @type {import('./Object.getPrototypeOf')} */
- module.exports = $Object.getPrototypeOf || null;
+ module.exports = require_es_object_atoms().getPrototypeOf || null;
}));
-
//#endregion
//#region ../node_modules/function-bind/implementation.js
var require_implementation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71226,53 +68029,39 @@ var require_implementation = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var funcType = "[object Function]";
var concatty = function concatty(a, b) {
var arr = [];
- for (var i = 0; i < a.length; i += 1) {
- arr[i] = a[i];
- }
- for (var j = 0; j < b.length; j += 1) {
- arr[j + a.length] = b[j];
- }
+ for (var i = 0; i < a.length; i += 1) arr[i] = a[i];
+ for (var j = 0; j < b.length; j += 1) arr[j + a.length] = b[j];
return arr;
};
var slicy = function slicy(arrLike, offset) {
var arr = [];
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
- arr[j] = arrLike[i];
- }
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) arr[j] = arrLike[i];
return arr;
};
var joiny = function(arr, joiner) {
var str = "";
for (var i = 0; i < arr.length; i += 1) {
str += arr[i];
- if (i + 1 < arr.length) {
- str += joiner;
- }
+ if (i + 1 < arr.length) str += joiner;
}
return str;
};
module.exports = function bind(that) {
var target = this;
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
- throw new TypeError(ERROR_MESSAGE + target);
- }
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) throw new TypeError(ERROR_MESSAGE + target);
var args = slicy(arguments, 1);
var bound;
var binder = function() {
if (this instanceof bound) {
var result = target.apply(this, concatty(args, arguments));
- if (Object(result) === result) {
- return result;
- }
+ if (Object(result) === result) return result;
return this;
}
return target.apply(that, concatty(args, arguments));
};
var boundLength = max(0, target.length - args.length);
var boundArgs = [];
- for (var i = 0; i < boundLength; i++) {
- boundArgs[i] = "$" + i;
- }
+ for (var i = 0; i < boundLength; i++) boundArgs[i] = "$" + i;
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
if (target.prototype) {
var Empty = function Empty() {};
@@ -71283,46 +68072,39 @@ var require_implementation = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return bound;
};
}));
-
//#endregion
//#region ../node_modules/function-bind/index.js
var require_function_bind = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var implementation = require_implementation();
module.exports = Function.prototype.bind || implementation;
}));
-
//#endregion
//#region ../node_modules/call-bind-apply-helpers/functionCall.js
var require_functionCall = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./functionCall')} */
module.exports = Function.prototype.call;
}));
-
//#endregion
//#region ../node_modules/call-bind-apply-helpers/functionApply.js
var require_functionApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./functionApply')} */
module.exports = Function.prototype.apply;
}));
-
//#endregion
//#region ../node_modules/call-bind-apply-helpers/reflectApply.js
var require_reflectApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
/** @type {import('./reflectApply')} */
module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
}));
-
//#endregion
//#region ../node_modules/call-bind-apply-helpers/actualApply.js
var require_actualApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var bind = require_function_bind();
var $apply = require_functionApply();
var $call = require_functionCall();
- var $reflectApply = require_reflectApply();
/** @type {import('./actualApply')} */
- module.exports = $reflectApply || bind.call($call, $apply);
+ module.exports = require_reflectApply() || bind.call($call, $apply);
}));
-
//#endregion
//#region ../node_modules/call-bind-apply-helpers/index.js
var require_call_bind_apply_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71332,13 +68114,10 @@ var require_call_bind_apply_helpers = /* @__PURE__ */ __commonJSMin(((exports, m
var $actualApply = require_actualApply();
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
module.exports = function callBindBasic(args) {
- if (args.length < 1 || typeof args[0] !== "function") {
- throw new $TypeError("a function is required");
- }
+ if (args.length < 1 || typeof args[0] !== "function") throw new $TypeError("a function is required");
return $actualApply(bind, $call, args);
};
}));
-
//#endregion
//#region ../node_modules/dunder-proto/get.js
var require_get = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71348,9 +68127,7 @@ var require_get = /* @__PURE__ */ __commonJSMin(((exports, module) => {
try {
hasProtoAccessor = [].__proto__ === Array.prototype;
} catch (e) {
- if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
- throw e;
- }
+ if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") throw e;
}
var desc = !!hasProtoAccessor && gOPD && gOPD(
Object.prototype,
@@ -71364,7 +68141,6 @@ var require_get = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return $getPrototypeOf(value == null ? value : $Object(value));
} : false;
}));
-
//#endregion
//#region ../node_modules/get-proto/index.js
var require_get_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71375,25 +68151,20 @@ var require_get_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = reflectGetProto ? function getProto(O) {
return reflectGetProto(O);
} : originalGetProto ? function getProto(O) {
- if (!O || typeof O !== "object" && typeof O !== "function") {
- throw new TypeError("getProto: not an object");
- }
+ if (!O || typeof O !== "object" && typeof O !== "function") throw new TypeError("getProto: not an object");
return originalGetProto(O);
} : getDunderProto ? function getProto(O) {
return getDunderProto(O);
} : null;
}));
-
//#endregion
//#region ../node_modules/hasown/index.js
var require_hasown = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var call = Function.prototype.call;
var $hasOwn = Object.prototype.hasOwnProperty;
- var bind = require_function_bind();
/** @type {import('.')} */
- module.exports = bind.call(call, $hasOwn);
+ module.exports = require_function_bind().call(call, $hasOwn);
}));
-
//#endregion
//#region ../node_modules/get-intrinsic/index.js
var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71483,7 +68254,7 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
"%JSON%": typeof JSON === "object" ? JSON : undefined,
"%Map%": typeof Map === "undefined" ? undefined : Map,
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
"%Math%": Math,
"%Number%": Number,
"%Object%": $Object,
@@ -71497,7 +68268,7 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"%Reflect%": typeof Reflect === "undefined" ? undefined : Reflect,
"%RegExp%": RegExp,
"%Set%": typeof Set === "undefined" ? undefined : Set,
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined : SharedArrayBuffer,
"%String%": String,
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined,
@@ -71527,32 +68298,22 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
"%Math.sign%": sign,
"%Reflect.getPrototypeOf%": $ReflectGPO
};
- if (getProto) {
- try {
- null.error;
- } catch (e) {
- var errorProto = getProto(getProto(e));
- INTRINSICS["%Error.prototype%"] = errorProto;
- }
+ if (getProto) try {
+ null.error;
+ } catch (e) {
+ INTRINSICS["%Error.prototype%"] = getProto(getProto(e));
}
var doEval = function doEval(name) {
var value;
- if (name === "%AsyncFunction%") {
- value = getEvalledConstructor("async function () {}");
- } else if (name === "%GeneratorFunction%") {
- value = getEvalledConstructor("function* () {}");
- } else if (name === "%AsyncGeneratorFunction%") {
- value = getEvalledConstructor("async function* () {}");
- } else if (name === "%AsyncGenerator%") {
+ if (name === "%AsyncFunction%") value = getEvalledConstructor("async function () {}");
+ else if (name === "%GeneratorFunction%") value = getEvalledConstructor("function* () {}");
+ else if (name === "%AsyncGeneratorFunction%") value = getEvalledConstructor("async function* () {}");
+ else if (name === "%AsyncGenerator%") {
var fn = doEval("%AsyncGeneratorFunction%");
- if (fn) {
- value = fn.prototype;
- }
+ if (fn) value = fn.prototype;
} else if (name === "%AsyncIteratorPrototype%") {
var gen = doEval("%AsyncGenerator%");
- if (gen && getProto) {
- value = getProto(gen.prototype);
- }
+ if (gen && getProto) value = getProto(gen.prototype);
}
INTRINSICS[name] = value;
return value;
@@ -71659,11 +68420,8 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var stringToPath = function stringToPath(string) {
var first = $strSlice(string, 0, 1);
var last = $strSlice(string, -1);
- if (first === "%" && last !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
- } else if (last === "%" && first !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
- }
+ if (first === "%" && last !== "%") throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
+ else if (last === "%" && first !== "%") throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
var result = [];
$replace(string, rePropName, function(match, number, quote, subString) {
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
@@ -71679,12 +68437,8 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
if (hasOwn(INTRINSICS, intrinsicName)) {
var value = INTRINSICS[intrinsicName];
- if (value === needsEval) {
- value = doEval(intrinsicName);
- }
- if (typeof value === "undefined" && !allowMissing) {
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
- }
+ if (value === needsEval) value = doEval(intrinsicName);
+ if (typeof value === "undefined" && !allowMissing) throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
return {
alias,
name: intrinsicName,
@@ -71694,15 +68448,9 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
throw new $SyntaxError("intrinsic " + name + " does not exist!");
};
module.exports = function GetIntrinsic(name, allowMissing) {
- if (typeof name !== "string" || name.length === 0) {
- throw new $TypeError("intrinsic name must be a non-empty string");
- }
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
- throw new $TypeError("\"allowMissing\" argument must be a boolean");
- }
- if ($exec(/^%?[^%]*%?$/, name) === null) {
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
- }
+ if (typeof name !== "string" || name.length === 0) throw new $TypeError("intrinsic name must be a non-empty string");
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") throw new $TypeError("\"allowMissing\" argument must be a boolean");
+ if ($exec(/^%?[^%]*%?$/, name) === null) throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
var parts = stringToPath(name);
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
@@ -71718,44 +68466,31 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var part = parts[i];
var first = $strSlice(part, 0, 1);
var last = $strSlice(part, -1);
- if ((first === "\"" || first === "'" || first === "`" || last === "\"" || last === "'" || last === "`") && first !== last) {
- throw new $SyntaxError("property names with quotes must have matching quotes");
- }
- if (part === "constructor" || !isOwn) {
- skipFurtherCaching = true;
- }
+ if ((first === "\"" || first === "'" || first === "`" || last === "\"" || last === "'" || last === "`") && first !== last) throw new $SyntaxError("property names with quotes must have matching quotes");
+ if (part === "constructor" || !isOwn) skipFurtherCaching = true;
intrinsicBaseName += "." + part;
intrinsicRealName = "%" + intrinsicBaseName + "%";
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
- value = INTRINSICS[intrinsicRealName];
- } else if (value != null) {
+ if (hasOwn(INTRINSICS, intrinsicRealName)) value = INTRINSICS[intrinsicRealName];
+ else if (value != null) {
if (!(part in value)) {
- if (!allowMissing) {
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
- }
- return void undefined;
+ if (!allowMissing) throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
+ return;
}
if ($gOPD && i + 1 >= parts.length) {
var desc = $gOPD(value, part);
isOwn = !!desc;
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
- value = desc.get;
- } else {
- value = value[part];
- }
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) value = desc.get;
+ else value = value[part];
} else {
isOwn = hasOwn(value, part);
value = value[part];
}
- if (isOwn && !skipFurtherCaching) {
- INTRINSICS[intrinsicRealName] = value;
- }
+ if (isOwn && !skipFurtherCaching) INTRINSICS[intrinsicRealName] = value;
}
}
return value;
};
}));
-
//#endregion
//#region ../node_modules/has-tostringtag/shams.js
var require_shams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71765,12 +68500,10 @@ var require_shams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return hasSymbols() && !!Symbol.toStringTag;
};
}));
-
//#endregion
//#region ../node_modules/es-set-tostringtag/index.js
var require_es_set_tostringtag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- var GetIntrinsic = require_get_intrinsic();
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
+ var $defineProperty = require_get_intrinsic()("%Object.defineProperty%", true);
var hasToStringTag = require_shams()();
var hasOwn = require_hasown();
var $TypeError = require_type$1();
@@ -71779,24 +68512,16 @@ var require_es_set_tostringtag = /* @__PURE__ */ __commonJSMin(((exports, module
module.exports = function setToStringTag(object, value) {
var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
- if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") {
- throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
- }
- if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
- if ($defineProperty) {
- $defineProperty(object, toStringTag, {
- configurable: !nonConfigurable,
- enumerable: false,
- value,
- writable: false
- });
- } else {
- object[toStringTag] = value;
- }
- }
+ if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
+ if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) if ($defineProperty) $defineProperty(object, toStringTag, {
+ configurable: !nonConfigurable,
+ enumerable: false,
+ value,
+ writable: false
+ });
+ else object[toStringTag] = value;
};
}));
-
//#endregion
//#region ../node_modules/form-data/lib/populate.js
var require_populate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71807,7 +68532,6 @@ var require_populate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return dst;
};
}));
-
//#endregion
//#region ../node_modules/form-data/lib/form_data.js
var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71834,32 +68558,24 @@ var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @param {object} options - Properties to be added/overriden for FormData and CombinedStream
*/
function FormData(options) {
- if (!(this instanceof FormData)) {
- return new FormData(options);
- }
+ if (!(this instanceof FormData)) return new FormData(options);
this._overheadLength = 0;
this._valueLength = 0;
this._valuesToMeasure = [];
CombinedStream.call(this);
options = options || {};
- for (var option in options) {
- this[option] = options[option];
- }
+ for (var option in options) this[option] = options[option];
}
util$10.inherits(FormData, CombinedStream);
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 };
- }
+ if (typeof options === "string") options = { filename: options };
var append = CombinedStream.prototype.append.bind(this);
- if (typeof value === "number" || value == null) {
- value = String(value);
- }
+ if (typeof value === "number" || value == null) value = String(value);
if (Array.isArray(value)) {
- this._error(new Error("Arrays are not supported."));
+ this._error(/* @__PURE__ */ new Error("Arrays are not supported."));
return;
}
var header = this._multiPartHeader(field, value, options);
@@ -71871,52 +68587,34 @@ var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
FormData.prototype._trackLength = function(header, value, options) {
var valueLength = 0;
- if (options.knownLength != null) {
- valueLength += Number(options.knownLength);
- } else if (Buffer.isBuffer(value)) {
- valueLength = value.length;
- } else if (typeof value === "string") {
- valueLength = Buffer.byteLength(value);
- }
+ if (options.knownLength != null) valueLength += Number(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 && hasOwn(value, "httpVersion")) && !(value instanceof Stream$2)) {
- return;
- }
- if (!options.knownLength) {
- this._valuesToMeasure.push(value);
- }
+ if (!value || !value.path && !(value.readable && hasOwn(value, "httpVersion")) && !(value instanceof Stream$2)) return;
+ if (!options.knownLength) this._valuesToMeasure.push(value);
};
FormData.prototype._lengthRetriever = function(value, callback) {
- if (hasOwn(value, "fd")) {
- if (value.end != undefined && value.end != Infinity && value.start != undefined) {
- callback(null, value.end + 1 - (value.start ? value.start : 0));
- } else {
- fs$5.stat(value.path, function(err, stat) {
- if (err) {
- callback(err);
- return;
- }
- var fileSize = stat.size - (value.start ? value.start : 0);
- callback(null, fileSize);
- });
+ if (hasOwn(value, "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$5.stat(value.path, function(err, stat) {
+ if (err) {
+ callback(err);
+ return;
}
- } else if (hasOwn(value, "httpVersion")) {
- callback(null, Number(value.headers["content-length"]));
- } else if (hasOwn(value, "httpModule")) {
+ callback(null, stat.size - (value.start ? value.start : 0));
+ });
+ else if (hasOwn(value, "httpVersion")) callback(null, Number(value.headers["content-length"]));
+ else if (hasOwn(value, "httpModule")) {
value.on("response", function(response) {
value.pause();
callback(null, Number(response.headers["content-length"]));
});
value.resume();
- } else {
- callback("Unknown stream");
- }
+ } else callback("Unknown stream");
};
FormData.prototype._multiPartHeader = function(field, value, options) {
- if (typeof options.header === "string") {
- return options.header;
- }
+ if (typeof options.header === "string") return options.header;
var contentDisposition = this._getContentDisposition(value, options);
var contentType = this._getContentType(value, options);
var contents = "";
@@ -71924,65 +68622,36 @@ var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"Content-Disposition": ["form-data", "name=\"" + field + "\""].concat(contentDisposition || []),
"Content-Type": [].concat(contentType || [])
};
- if (typeof options.header === "object") {
- populate(headers, options.header);
- }
+ if (typeof options.header === "object") populate(headers, options.header);
var header;
- for (var prop in headers) {
- if (hasOwn(headers, prop)) {
- header = headers[prop];
- if (header == null) {
- continue;
- }
- if (!Array.isArray(header)) {
- header = [header];
- }
- if (header.length) {
- contents += prop + ": " + header.join("; ") + FormData.LINE_BREAK;
- }
- }
+ for (var prop in headers) if (hasOwn(headers, prop)) {
+ 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;
- if (typeof options.filepath === "string") {
- filename = path$6.normalize(options.filepath).replace(/\\/g, "/");
- } else if (options.filename || value && (value.name || value.path)) {
- filename = path$6.basename(options.filename || value && (value.name || value.path));
- } else if (value && value.readable && hasOwn(value, "httpVersion")) {
- filename = path$6.basename(value.client._httpMessage.path || "");
- }
- if (filename) {
- return "filename=\"" + filename + "\"";
- }
+ if (typeof options.filepath === "string") filename = path$6.normalize(options.filepath).replace(/\\/g, "/");
+ else if (options.filename || value && (value.name || value.path)) filename = path$6.basename(options.filename || value && (value.name || value.path));
+ else if (value && value.readable && hasOwn(value, "httpVersion")) filename = path$6.basename(value.client._httpMessage.path || "");
+ if (filename) return "filename=\"" + filename + "\"";
};
FormData.prototype._getContentType = function(value, options) {
var contentType = options.contentType;
- if (!contentType && value && value.name) {
- contentType = mime.lookup(value.name);
- }
- if (!contentType && value && value.path) {
- contentType = mime.lookup(value.path);
- }
- if (!contentType && value && value.readable && hasOwn(value, "httpVersion")) {
- contentType = value.headers["content-type"];
- }
- if (!contentType && (options.filepath || options.filename)) {
- contentType = mime.lookup(options.filepath || options.filename);
- }
- if (!contentType && value && typeof value === "object") {
- contentType = FormData.DEFAULT_CONTENT_TYPE;
- }
+ if (!contentType && value && value.name) contentType = mime.lookup(value.name);
+ if (!contentType && value && value.path) contentType = mime.lookup(value.path);
+ if (!contentType && value && value.readable && hasOwn(value, "httpVersion")) contentType = value.headers["content-type"];
+ if (!contentType && (options.filepath || options.filename)) contentType = mime.lookup(options.filepath || options.filename);
+ if (!contentType && value && 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();
- }
+ if (this._streams.length === 0) footer += this._lastBoundary();
next(footer);
}.bind(this);
};
@@ -71992,39 +68661,24 @@ var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
FormData.prototype.getHeaders = function(userHeaders) {
var header;
var formHeaders = { "content-type": "multipart/form-data; boundary=" + this.getBoundary() };
- for (header in userHeaders) {
- if (hasOwn(userHeaders, header)) {
- formHeaders[header.toLowerCase()] = userHeaders[header];
- }
- }
+ for (header in userHeaders) if (hasOwn(userHeaders, header)) formHeaders[header.toLowerCase()] = userHeaders[header];
return formHeaders;
};
FormData.prototype.setBoundary = function(boundary) {
- if (typeof boundary !== "string") {
- throw new TypeError("FormData boundary must be a string");
- }
+ if (typeof boundary !== "string") throw new TypeError("FormData boundary must be a string");
this._boundary = boundary;
};
FormData.prototype.getBoundary = function() {
- if (!this._boundary) {
- this._generateBoundary();
- }
+ if (!this._boundary) this._generateBoundary();
return this._boundary;
};
FormData.prototype.getBuffer = function() {
var dataBuffer = new Buffer.alloc(0);
var boundary = this.getBoundary();
- for (var i = 0, len = this._streams.length; i < len; i++) {
- if (typeof this._streams[i] !== "function") {
- if (Buffer.isBuffer(this._streams[i])) {
- dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
- } else {
- dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
- }
- if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) {
- dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]);
- }
- }
+ for (var i = 0, len = this._streams.length; i < len; i++) if (typeof this._streams[i] !== "function") {
+ if (Buffer.isBuffer(this._streams[i])) dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
+ else dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
+ if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]);
}
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
};
@@ -72033,26 +68687,18 @@ var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
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."));
- }
+ if (this._streams.length) knownLength += this._lastBoundary().length;
+ if (!this.hasKnownLength()) this._error(/* @__PURE__ */ new Error("Cannot calculate proper length in synchronous way."));
return knownLength;
};
FormData.prototype.hasKnownLength = function() {
var hasKnownLength = true;
- if (this._valuesToMeasure.length) {
- hasKnownLength = false;
- }
+ 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._streams.length) knownLength += this._lastBoundary().length;
if (!this._valuesToMeasure.length) {
process.nextTick(cb.bind(this, null, knownLength));
return;
@@ -72082,24 +68728,17 @@ var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}, defaults);
} else {
options = populate(params, defaults);
- if (!options.port) {
- options.port = options.protocol === "https:" ? 443 : 80;
- }
+ if (!options.port) options.port = options.protocol === "https:" ? 443 : 80;
}
options.headers = this.getHeaders(params.headers);
- if (options.protocol === "https:") {
- request = https$5.request(options);
- } else {
- request = http$10.request(options);
- }
+ if (options.protocol === "https:") request = https$5.request(options);
+ else request = http$10.request(options);
this.getLength(function(err, length) {
if (err && err !== "Unknown stream") {
this._error(err);
return;
}
- if (length) {
- request.setHeader("Content-Length", length);
- }
+ if (length) request.setHeader("Content-Length", length);
this.pipe(request);
if (cb) {
var onResponse;
@@ -72128,12 +68767,10 @@ var require_form_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
setToStringTag(FormData, "FormData");
module.exports = FormData;
}));
-
//#endregion
//#region ../node_modules/axios/lib/platform/node/classes/FormData.js
var import_form_data = /* @__PURE__ */ __toESM(require_form_data$1(), 1);
var FormData_default = import_form_data.default;
-
//#endregion
//#region ../node_modules/axios/lib/helpers/toFormData.js
/**
@@ -72208,9 +68845,7 @@ const predicates = utils_default.toFlatObject(utils_default, {}, null, function
* @returns
*/
function toFormData$1(obj, formData, options) {
- if (!utils_default.isObject(obj)) {
- throw new TypeError("target must be an object");
- }
+ if (!utils_default.isObject(obj)) throw new TypeError("target must be an object");
formData = formData || new (FormData_default || FormData)();
options = utils_default.toFlatObject(options, {
metaTokens: true,
@@ -72223,25 +68858,14 @@ function toFormData$1(obj, formData, options) {
const visitor = options.visitor || defaultVisitor;
const dots = options.dots;
const indexes = options.indexes;
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
- const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
- if (!utils_default.isFunction(visitor)) {
- throw new TypeError("visitor must be a function");
- }
+ const useBlob = (options.Blob || typeof Blob !== "undefined" && Blob) && utils_default.isSpecCompliantForm(formData);
+ if (!utils_default.isFunction(visitor)) throw new TypeError("visitor must be a function");
function convertValue(value) {
if (value === null) return "";
- if (utils_default.isDate(value)) {
- return value.toISOString();
- }
- if (utils_default.isBoolean(value)) {
- return value.toString();
- }
- if (!useBlob && utils_default.isBlob(value)) {
- throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
- }
- if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
- }
+ if (utils_default.isDate(value)) return value.toISOString();
+ if (utils_default.isBoolean(value)) return value.toString();
+ if (!useBlob && utils_default.isBlob(value)) throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
+ if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
return value;
}
/**
@@ -72268,9 +68892,7 @@ function toFormData$1(obj, formData, options) {
return false;
}
}
- if (isVisitable(value)) {
- return true;
- }
+ if (isVisitable(value)) return true;
formData.append(renderKey(path, key, dots), convertValue(value));
return false;
}
@@ -72282,25 +68904,17 @@ function toFormData$1(obj, formData, options) {
});
function build(value, path) {
if (utils_default.isUndefined(value)) return;
- if (stack.indexOf(value) !== -1) {
- throw Error("Circular reference detected in " + path.join("."));
- }
+ if (stack.indexOf(value) !== -1) throw Error("Circular reference detected in " + path.join("."));
stack.push(value);
utils_default.forEach(value, function each(el, key) {
- const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers);
- if (result === true) {
- build(el, path ? path.concat(key) : [key]);
- }
+ if ((!(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers)) === true) build(el, path ? path.concat(key) : [key]);
});
stack.pop();
}
- if (!utils_default.isObject(obj)) {
- throw new TypeError("data must be an object");
- }
+ if (!utils_default.isObject(obj)) throw new TypeError("data must be an object");
build(obj);
return formData;
}
-
//#endregion
//#region ../node_modules/axios/lib/helpers/AxiosURLSearchParams.js
/**
@@ -72349,7 +68963,6 @@ prototype.toString = function toString(encoder) {
return _encode(pair[0]) + "=" + _encode(pair[1]);
}, "").join("&");
};
-
//#endregion
//#region ../node_modules/axios/lib/helpers/buildURL.js
/**
@@ -72373,30 +68986,20 @@ function encode$1(val) {
* @returns {string} The formatted url
*/
function buildURL(url, params, options) {
- if (!params) {
- return url;
- }
+ if (!params) return url;
const _encode = options && options.encode || encode$1;
- if (utils_default.isFunction(options)) {
- options = { serialize: options };
- }
+ if (utils_default.isFunction(options)) options = { serialize: options };
const serializeFn = options && options.serialize;
let serializedParams;
- if (serializeFn) {
- serializedParams = serializeFn(params, options);
- } else {
- serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
- }
+ if (serializeFn) serializedParams = serializeFn(params, options);
+ else serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
if (serializedParams) {
const hashmarkIndex = url.indexOf("#");
- if (hashmarkIndex !== -1) {
- url = url.slice(0, hashmarkIndex);
- }
+ if (hashmarkIndex !== -1) url = url.slice(0, hashmarkIndex);
url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
}
return url;
}
-
//#endregion
//#region ../node_modules/axios/lib/core/InterceptorManager.js
var InterceptorManager = class {
@@ -72428,9 +69031,7 @@ var InterceptorManager = class {
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
*/
eject(id) {
- if (this.handlers[id]) {
- this.handlers[id] = null;
- }
+ if (this.handlers[id]) this.handlers[id] = null;
}
/**
* Clear all interceptors from the stack
@@ -72438,9 +69039,7 @@ var InterceptorManager = class {
* @returns {void}
*/
clear() {
- if (this.handlers) {
- this.handlers = [];
- }
+ if (this.handlers) this.handlers = [];
}
/**
* Iterate over all the registered interceptors
@@ -72454,13 +69053,10 @@ var InterceptorManager = class {
*/
forEach(fn) {
utils_default.forEach(this.handlers, function forEachHandler(h) {
- if (h !== null) {
- fn(h);
- }
+ if (h !== null) fn(h);
});
}
};
-
//#endregion
//#region ../node_modules/axios/lib/defaults/transitional.js
var transitional_default = {
@@ -72468,11 +69064,9 @@ var transitional_default = {
forcedJSONParsing: true,
clarifyTimeoutError: false
};
-
//#endregion
//#region ../node_modules/axios/lib/platform/node/classes/URLSearchParams.js
var URLSearchParams_default = url.URLSearchParams;
-
//#endregion
//#region ../node_modules/axios/lib/platform/node/index.js
const ALPHA = "abcdefghijklmnopqrstuvwxyz";
@@ -72487,9 +69081,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
const { length } = alphabet;
const randomValues = new Uint32Array(size);
crypto$1.randomFillSync(randomValues);
- for (let i = 0; i < size; i++) {
- str += alphabet[randomValues[i] % length];
- }
+ for (let i = 0; i < size; i++) str += alphabet[randomValues[i] % length];
return str;
};
var node_default$1 = {
@@ -72508,7 +69100,6 @@ var node_default$1 = {
"data"
]
};
-
//#endregion
//#region ../node_modules/axios/lib/platform/common/utils.js
var utils_exports = /* @__PURE__ */ __exportAll({
@@ -72519,7 +69110,7 @@ var utils_exports = /* @__PURE__ */ __exportAll({
origin: () => origin
});
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
-const _navigator = typeof navigator === "object" && navigator || undefined;
+const _navigator = typeof navigator === "object" && navigator || void 0;
/**
* Determine if we're running in a standard browser environment
*
@@ -72551,18 +69142,14 @@ const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
* This leads to a problem when axios post `FormData` in webWorker
*/
-const hasStandardBrowserWebWorkerEnv = (() => {
- return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
-})();
+const hasStandardBrowserWebWorkerEnv = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
const origin = hasBrowserEnv && window.location.href || "http://localhost";
-
//#endregion
//#region ../node_modules/axios/lib/platform/index.js
var platform_default = {
...utils_exports,
...node_default$1
};
-
//#endregion
//#region ../node_modules/axios/lib/helpers/toURLEncodedForm.js
function toURLEncodedForm(data, options) {
@@ -72577,7 +69164,6 @@ function toURLEncodedForm(data, options) {
...options
});
}
-
//#endregion
//#region ../node_modules/axios/lib/helpers/formDataToJSON.js
/**
@@ -72626,20 +69212,12 @@ function formDataToJSON(formData) {
const isLast = index >= path.length;
name = !name && utils_default.isArray(target) ? target.length : name;
if (isLast) {
- if (utils_default.hasOwnProp(target, name)) {
- target[name] = [target[name], value];
- } else {
- target[name] = value;
- }
+ if (utils_default.hasOwnProp(target, name)) target[name] = [target[name], value];
+ else target[name] = value;
return !isNumericKey;
}
- if (!target[name] || !utils_default.isObject(target[name])) {
- target[name] = [];
- }
- const result = buildPath(path, value, target[name], index);
- if (result && utils_default.isArray(target[name])) {
- target[name] = arrayToObject(target[name]);
- }
+ if (!target[name] || !utils_default.isObject(target[name])) target[name] = [];
+ if (buildPath(path, value, target[name], index) && utils_default.isArray(target[name])) target[name] = arrayToObject(target[name]);
return !isNumericKey;
}
if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
@@ -72651,7 +69229,6 @@ function formDataToJSON(formData) {
}
return null;
}
-
//#endregion
//#region ../node_modules/axios/lib/defaults/index.js
/**
@@ -72665,15 +69242,11 @@ function formDataToJSON(formData) {
* @returns {string} A stringified version of the rawValue.
*/
function stringifySafely(rawValue, parser, encoder) {
- if (utils_default.isString(rawValue)) {
- try {
- (parser || JSON.parse)(rawValue);
- return utils_default.trim(rawValue);
- } catch (e) {
- if (e.name !== "SyntaxError") {
- throw e;
- }
- }
+ if (utils_default.isString(rawValue)) try {
+ (parser || JSON.parse)(rawValue);
+ return utils_default.trim(rawValue);
+ } catch (e) {
+ if (e.name !== "SyntaxError") throw e;
}
return (encoder || JSON.stringify)(rawValue);
}
@@ -72688,28 +69261,17 @@ const defaults$1 = {
const contentType = headers.getContentType() || "";
const hasJSONContentType = contentType.indexOf("application/json") > -1;
const isObjectPayload = utils_default.isObject(data);
- if (isObjectPayload && utils_default.isHTMLForm(data)) {
- data = new FormData(data);
- }
- const isFormData = utils_default.isFormData(data);
- if (isFormData) {
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
- }
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
- return data;
- }
- if (utils_default.isArrayBufferView(data)) {
- return data.buffer;
- }
+ if (isObjectPayload && utils_default.isHTMLForm(data)) data = new FormData(data);
+ if (utils_default.isFormData(data)) return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) return data;
+ if (utils_default.isArrayBufferView(data)) return data.buffer;
if (utils_default.isURLSearchParams(data)) {
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
return data.toString();
}
let isFileList;
if (isObjectPayload) {
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
- return toURLEncodedForm(data, this.formSerializer).toString();
- }
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) return toURLEncodedForm(data, this.formSerializer).toString();
if ((isFileList = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
const _FormData = this.env && this.env.FormData;
return toFormData$1(isFileList ? { "files[]": data } : data, _FormData && new _FormData(), this.formSerializer);
@@ -72725,19 +69287,14 @@ const defaults$1 = {
const transitional = this.transitional || defaults$1.transitional;
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
const JSONRequested = this.responseType === "json";
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
- return data;
- }
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) return data;
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
+ const strictJSONParsing = !(transitional && transitional.silentJSONParsing) && JSONRequested;
try {
return JSON.parse(data, this.parseReviver);
} catch (e) {
if (strictJSONParsing) {
- if (e.name === "SyntaxError") {
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
- }
+ if (e.name === "SyntaxError") throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
throw e;
}
}
@@ -72758,7 +69315,7 @@ const defaults$1 = {
},
headers: { common: {
"Accept": "application/json, text/plain, */*",
- "Content-Type": undefined
+ "Content-Type": void 0
} }
};
utils_default.forEach([
@@ -72771,7 +69328,6 @@ utils_default.forEach([
], (method) => {
defaults$1.headers[method] = {};
});
-
//#endregion
//#region ../node_modules/axios/lib/helpers/parseHeaders.js
const ignoreDuplicateOf = utils_default.toObjectSet([
@@ -72816,22 +69372,13 @@ var parseHeaders_default = (rawHeaders) => {
i = line.indexOf(":");
key = line.substring(0, i).trim().toLowerCase();
val = line.substring(i + 1).trim();
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
- return;
- }
- if (key === "set-cookie") {
- if (parsed[key]) {
- parsed[key].push(val);
- } else {
- parsed[key] = [val];
- }
- } else {
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
- }
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) return;
+ if (key === "set-cookie") if (parsed[key]) parsed[key].push(val);
+ else parsed[key] = [val];
+ else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
});
return parsed;
};
-
//#endregion
//#region ../node_modules/axios/lib/core/AxiosHeaders.js
const $internals = Symbol("internals");
@@ -72839,35 +69386,23 @@ function normalizeHeader(header) {
return header && String(header).trim().toLowerCase();
}
function normalizeValue(value) {
- if (value === false || value == null) {
- return value;
- }
+ if (value === false || value == null) return value;
return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
}
function parseTokens(str) {
const tokens = Object.create(null);
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let match;
- while (match = tokensRE.exec(str)) {
- tokens[match[1]] = match[2];
- }
+ while (match = tokensRE.exec(str)) tokens[match[1]] = match[2];
return tokens;
}
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
- if (utils_default.isFunction(filter)) {
- return filter.call(this, value, header);
- }
- if (isHeaderNameFilter) {
- value = header;
- }
+ if (utils_default.isFunction(filter)) return filter.call(this, value, header);
+ if (isHeaderNameFilter) value = header;
if (!utils_default.isString(value)) return;
- if (utils_default.isString(filter)) {
- return value.indexOf(filter) !== -1;
- }
- if (utils_default.isRegExp(filter)) {
- return filter.test(value);
- }
+ if (utils_default.isString(filter)) return value.indexOf(filter) !== -1;
+ if (utils_default.isRegExp(filter)) return filter.test(value);
}
function formatHeader(header) {
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
@@ -72897,31 +69432,21 @@ var AxiosHeaders$1 = class {
const self = this;
function setHeader(_value, _header, _rewrite) {
const lHeader = normalizeHeader(_header);
- if (!lHeader) {
- throw new Error("header name must be a non-empty string");
- }
+ if (!lHeader) throw new Error("header name must be a non-empty string");
const key = utils_default.findKey(self, lHeader);
- if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
- self[key || _header] = normalizeValue(_value);
- }
+ if (!key || self[key] === void 0 || _rewrite === true || _rewrite === void 0 && self[key] !== false) self[key || _header] = normalizeValue(_value);
}
const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
- if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
- setHeaders(header, valueOrRewrite);
- } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
- setHeaders(parseHeaders_default(header), valueOrRewrite);
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
+ if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
+ else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite);
+ else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
let obj = {}, dest, key;
for (const entry of header) {
- if (!utils_default.isArray(entry)) {
- throw TypeError("Object iterator must return a key-value pair");
- }
+ if (!utils_default.isArray(entry)) throw TypeError("Object iterator must return a key-value pair");
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
}
setHeaders(obj, valueOrRewrite);
- } else {
- header != null && setHeader(valueOrRewrite, header, rewrite);
- }
+ } else header != null && setHeader(valueOrRewrite, header, rewrite);
return this;
}
get(header, parser) {
@@ -72930,18 +69455,10 @@ var AxiosHeaders$1 = class {
const key = utils_default.findKey(this, header);
if (key) {
const value = this[key];
- if (!parser) {
- return value;
- }
- if (parser === true) {
- return parseTokens(value);
- }
- if (utils_default.isFunction(parser)) {
- return parser.call(this, value, key);
- }
- if (utils_default.isRegExp(parser)) {
- return parser.exec(value);
- }
+ if (!parser) return value;
+ if (parser === true) return parseTokens(value);
+ if (utils_default.isFunction(parser)) return parser.call(this, value, key);
+ if (utils_default.isRegExp(parser)) return parser.exec(value);
throw new TypeError("parser must be boolean|regexp|function");
}
}
@@ -72950,7 +69467,7 @@ var AxiosHeaders$1 = class {
header = normalizeHeader(header);
if (header) {
const key = utils_default.findKey(this, header);
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
}
return false;
}
@@ -72967,11 +69484,8 @@ var AxiosHeaders$1 = class {
}
}
}
- if (utils_default.isArray(header)) {
- header.forEach(deleteHeader);
- } else {
- deleteHeader(header);
- }
+ if (utils_default.isArray(header)) header.forEach(deleteHeader);
+ else deleteHeader(header);
return deleted;
}
clear(matcher) {
@@ -72998,9 +69512,7 @@ var AxiosHeaders$1 = class {
return;
}
const normalized = format ? formatHeader(header) : String(header).trim();
- if (normalized !== header) {
- delete self[header];
- }
+ if (normalized !== header) delete self[header];
self[normalized] = normalizeValue(value);
headers[normalized] = true;
});
@@ -73037,8 +69549,7 @@ var AxiosHeaders$1 = class {
return computed;
}
static accessor(header) {
- const internals = this[$internals] = this[$internals] = { accessors: {} };
- const accessors = internals.accessors;
+ const accessors = (this[$internals] = this[$internals] = { accessors: {} }).accessors;
const prototype = this.prototype;
function defineAccessor(_header) {
const lHeader = normalizeHeader(_header);
@@ -73069,7 +69580,6 @@ utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
};
});
utils_default.freezeMethods(AxiosHeaders$1);
-
//#endregion
//#region ../node_modules/axios/lib/core/transformData.js
/**
@@ -73086,18 +69596,16 @@ function transformData(fns, response) {
const headers = AxiosHeaders$1.from(context.headers);
let data = context.data;
utils_default.forEach(fns, function transform(fn) {
- data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
+ data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
});
headers.normalize();
return data;
}
-
//#endregion
//#region ../node_modules/axios/lib/cancel/isCancel.js
function isCancel$1(value) {
return !!(value && value.__CANCEL__);
}
-
//#endregion
//#region ../node_modules/axios/lib/cancel/CanceledError.js
/**
@@ -73114,7 +69622,6 @@ function CanceledError$1(message, config, request) {
this.name = "CanceledError";
}
utils_default.inherits(CanceledError$1, AxiosError$1, { __CANCEL__: true });
-
//#endregion
//#region ../node_modules/axios/lib/core/settle.js
/**
@@ -73128,13 +69635,9 @@ utils_default.inherits(CanceledError$1, AxiosError$1, { __CANCEL__: true });
*/
function settle(resolve, reject, response) {
const validateStatus = response.config.validateStatus;
- if (!response.status || !validateStatus || validateStatus(response.status)) {
- resolve(response);
- } else {
- reject(new AxiosError$1("Request failed with status code " + response.status, [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
- }
+ if (!response.status || !validateStatus || validateStatus(response.status)) resolve(response);
+ else reject(new AxiosError$1("Request failed with status code " + response.status, [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
}
-
//#endregion
//#region ../node_modules/axios/lib/helpers/isAbsoluteURL.js
/**
@@ -73147,7 +69650,6 @@ function settle(resolve, reject, response) {
function isAbsoluteURL(url) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
-
//#endregion
//#region ../node_modules/axios/lib/helpers/combineURLs.js
/**
@@ -73161,7 +69663,6 @@ function isAbsoluteURL(url) {
function combineURLs(baseURL, relativeURL) {
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
}
-
//#endregion
//#region ../node_modules/axios/lib/core/buildFullPath.js
/**
@@ -73176,12 +69677,9 @@ function combineURLs(baseURL, relativeURL) {
*/
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
let isRelativeUrl = !isAbsoluteURL(requestedURL);
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
- return combineURLs(baseURL, requestedURL);
- }
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) return combineURLs(baseURL, requestedURL);
return requestedURL;
}
-
//#endregion
//#region ../node_modules/proxy-from-env/index.js
var require_proxy_from_env = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -73207,19 +69705,13 @@ var require_proxy_from_env = /* @__PURE__ */ __commonJSMin(((exports) => {
var proto = parsedUrl.protocol;
var hostname = parsedUrl.host;
var port = parsedUrl.port;
- if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
- return "";
- }
+ if (typeof hostname !== "string" || !hostname || typeof proto !== "string") return "";
proto = proto.split(":", 1)[0];
hostname = hostname.replace(/:\d*$/, "");
port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
- if (!shouldProxy(hostname, port)) {
- return "";
- }
+ if (!shouldProxy(hostname, port)) return "";
var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
- if (proxy && proxy.indexOf("://") === -1) {
- proxy = proto + "://" + proxy;
- }
+ if (proxy && proxy.indexOf("://") === -1) proxy = proto + "://" + proxy;
return proxy;
}
/**
@@ -73232,28 +69724,16 @@ var require_proxy_from_env = /* @__PURE__ */ __commonJSMin(((exports) => {
*/
function shouldProxy(hostname, port) {
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
- if (!NO_PROXY) {
- return true;
- }
- if (NO_PROXY === "*") {
- return false;
- }
+ if (!NO_PROXY) return true;
+ if (NO_PROXY === "*") return false;
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
- if (!proxy) {
- return true;
- }
+ if (!proxy) return true;
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
- if (parsedProxyPort && parsedProxyPort !== port) {
- return true;
- }
- if (!/^[.*]/.test(parsedProxyHostname)) {
- return hostname !== parsedProxyHostname;
- }
- if (parsedProxyHostname.charAt(0) === "*") {
- parsedProxyHostname = parsedProxyHostname.slice(1);
- }
+ if (parsedProxyPort && parsedProxyPort !== port) return true;
+ if (!/^[.*]/.test(parsedProxyHostname)) return hostname !== parsedProxyHostname;
+ if (parsedProxyHostname.charAt(0) === "*") parsedProxyHostname = parsedProxyHostname.slice(1);
return !stringEndsWith.call(hostname, parsedProxyHostname);
});
}
@@ -73269,7 +69749,6 @@ var require_proxy_from_env = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.getProxyForUrl = getProxyForUrl;
}));
-
//#endregion
//#region ../node_modules/ms/index.js
var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -73298,11 +69777,8 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = function(val, options) {
options = options || {};
var type = typeof val;
- if (type === "string" && val.length > 0) {
- return parse(val);
- } else if (type === "number" && isFinite(val)) {
- return options.long ? fmtLong(val) : fmtShort(val);
- }
+ if (type === "string" && val.length > 0) return parse(val);
+ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
};
/**
@@ -73314,16 +69790,11 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function parse(str) {
str = String(str);
- if (str.length > 100) {
- return;
- }
+ if (str.length > 100) return;
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
- if (!match) {
- return;
- }
+ if (!match) return;
var n = parseFloat(match[1]);
- var type = (match[2] || "ms").toLowerCase();
- switch (type) {
+ switch ((match[2] || "ms").toLowerCase()) {
case "years":
case "year":
case "yrs":
@@ -73355,7 +69826,7 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case "msecs":
case "msec":
case "ms": return n;
- default: return undefined;
+ default: return;
}
}
/**
@@ -73367,18 +69838,10 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function fmtShort(ms) {
var msAbs = Math.abs(ms);
- if (msAbs >= d) {
- return Math.round(ms / d) + "d";
- }
- if (msAbs >= h) {
- return Math.round(ms / h) + "h";
- }
- if (msAbs >= m) {
- return Math.round(ms / m) + "m";
- }
- if (msAbs >= s) {
- return Math.round(ms / s) + "s";
- }
+ if (msAbs >= d) return Math.round(ms / d) + "d";
+ if (msAbs >= h) return Math.round(ms / h) + "h";
+ if (msAbs >= m) return Math.round(ms / m) + "m";
+ if (msAbs >= s) return Math.round(ms / s) + "s";
return ms + "ms";
}
/**
@@ -73390,18 +69853,10 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function fmtLong(ms) {
var msAbs = Math.abs(ms);
- if (msAbs >= d) {
- return plural(ms, msAbs, d, "day");
- }
- if (msAbs >= h) {
- return plural(ms, msAbs, h, "hour");
- }
- if (msAbs >= m) {
- return plural(ms, msAbs, m, "minute");
- }
- if (msAbs >= s) {
- return plural(ms, msAbs, s, "second");
- }
+ if (msAbs >= d) return plural(ms, msAbs, d, "day");
+ if (msAbs >= h) return plural(ms, msAbs, h, "hour");
+ if (msAbs >= m) return plural(ms, msAbs, m, "minute");
+ if (msAbs >= s) return plural(ms, msAbs, s, "second");
return ms + " ms";
}
/**
@@ -73412,7 +69867,6 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
}
}));
-
//#endregion
//#region ../node_modules/debug/src/common.js
var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -73471,25 +69925,18 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let namespacesCache;
let enabledCache;
function debug(...args) {
- if (!debug.enabled) {
- return;
- }
+ if (!debug.enabled) return;
const self = debug;
- const curr = Number(new Date());
- const ms = curr - (prevTime || curr);
- self.diff = ms;
+ const curr = Number(/* @__PURE__ */ new Date());
+ self.diff = curr - (prevTime || curr);
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
- if (typeof args[0] !== "string") {
- args.unshift("%O");
- }
+ if (typeof args[0] !== "string") args.unshift("%O");
let index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
- if (match === "%%") {
- return "%";
- }
+ if (match === "%%") return "%";
index++;
const formatter = createDebug.formatters[format];
if (typeof formatter === "function") {
@@ -73501,8 +69948,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return match;
});
createDebug.formatArgs.call(self, args);
- const logFn = self.log || createDebug.log;
- logFn.apply(self, args);
+ (self.log || createDebug.log).apply(self, args);
}
debug.namespace = namespace;
debug.useColors = createDebug.useColors();
@@ -73513,9 +69959,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
enumerable: true,
configurable: false,
get: () => {
- if (enableOverride !== null) {
- return enableOverride;
- }
+ if (enableOverride !== null) return enableOverride;
if (namespacesCache !== createDebug.namespaces) {
namespacesCache = createDebug.namespaces;
enabledCache = createDebug.enabled(namespace);
@@ -73526,9 +69970,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
enableOverride = v;
}
});
- if (typeof createDebug.init === "function") {
- createDebug.init(debug);
- }
+ if (typeof createDebug.init === "function") createDebug.init(debug);
return debug;
}
function extend(namespace, delimiter) {
@@ -73549,13 +69991,8 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
createDebug.names = [];
createDebug.skips = [];
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
- for (const ns of split) {
- if (ns[0] === "-") {
- createDebug.skips.push(ns.slice(1));
- } else {
- createDebug.names.push(ns);
- }
- }
+ for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1));
+ else createDebug.names.push(ns);
}
/**
* Checks if the given string matches a namespace template, honoring
@@ -73570,27 +70007,20 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let templateIndex = 0;
let starIndex = -1;
let matchIndex = 0;
- while (searchIndex < search.length) {
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
- if (template[templateIndex] === "*") {
- starIndex = templateIndex;
- matchIndex = searchIndex;
- templateIndex++;
- } else {
- searchIndex++;
- templateIndex++;
- }
- } else if (starIndex !== -1) {
- templateIndex = starIndex + 1;
- matchIndex++;
- searchIndex = matchIndex;
- } else {
- return false;
- }
- }
- while (templateIndex < template.length && template[templateIndex] === "*") {
+ while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
+ starIndex = templateIndex;
+ matchIndex = searchIndex;
+ templateIndex++;
+ } else {
+ searchIndex++;
templateIndex++;
}
+ else if (starIndex !== -1) {
+ templateIndex = starIndex + 1;
+ matchIndex++;
+ searchIndex = matchIndex;
+ } else return false;
+ while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
return templateIndex === template.length;
}
/**
@@ -73612,16 +70042,8 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @api public
*/
function enabled(name) {
- for (const skip of createDebug.skips) {
- if (matchesTemplate(name, skip)) {
- return false;
- }
- }
- for (const ns of createDebug.names) {
- if (matchesTemplate(name, ns)) {
- return true;
- }
- }
+ for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false;
+ for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true;
return false;
}
/**
@@ -73632,9 +70054,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @api private
*/
function coerce(val) {
- if (val instanceof Error) {
- return val.stack || val.message;
- }
+ if (val instanceof Error) return val.stack || val.message;
return val;
}
/**
@@ -73649,7 +70069,6 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = setup;
}));
-
//#endregion
//#region ../node_modules/debug/src/browser.js
var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -73759,12 +70178,8 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
function useColors() {
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
- return true;
- }
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
- return false;
- }
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true;
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
let m;
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
@@ -73775,21 +70190,15 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function formatArgs(args) {
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
- if (!this.useColors) {
- return;
- }
+ if (!this.useColors) return;
const c = "color: " + this.color;
args.splice(1, 0, c, "color: inherit");
let index = 0;
let lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, (match) => {
- if (match === "%%") {
- return;
- }
+ if (match === "%%") return;
index++;
- if (match === "%c") {
- lastC = index;
- }
+ if (match === "%c") lastC = index;
});
args.splice(lastC, 0, c);
}
@@ -73810,11 +70219,8 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function save(namespaces) {
try {
- if (namespaces) {
- exports.storage.setItem("debug", namespaces);
- } else {
- exports.storage.removeItem("debug");
- }
+ if (namespaces) exports.storage.setItem("debug", namespaces);
+ else exports.storage.removeItem("debug");
} catch (error) {}
}
/**
@@ -73828,9 +70234,7 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
try {
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
} catch (error) {}
- if (!r && typeof process !== "undefined" && "env" in process) {
- r = process.env.DEBUG;
- }
+ if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG;
return r;
}
/**
@@ -73861,7 +70265,6 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
}));
-
//#endregion
//#region ../node_modules/supports-color/index.js
var supports_color_exports = /* @__PURE__ */ __exportAll({
@@ -73875,33 +70278,21 @@ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
}
function envForceColor() {
- if (!("FORCE_COLOR" in env)) {
- return;
- }
- if (env.FORCE_COLOR === "true") {
- return 1;
- }
- if (env.FORCE_COLOR === "false") {
- return 0;
- }
- if (env.FORCE_COLOR.length === 0) {
- return 1;
- }
+ if (!("FORCE_COLOR" in env)) return;
+ if (env.FORCE_COLOR === "true") return 1;
+ if (env.FORCE_COLOR === "false") return 0;
+ if (env.FORCE_COLOR.length === 0) return 1;
const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
if (![
0,
1,
2,
3
- ].includes(level)) {
- return;
- }
+ ].includes(level)) return;
return level;
}
function translateLevel(level) {
- if (level === 0) {
- return false;
- }
+ if (level === 0) return false;
return {
level,
hasBasic: true,
@@ -73911,36 +70302,20 @@ function translateLevel(level) {
}
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
const noFlagForceColor = envForceColor();
- if (noFlagForceColor !== undefined) {
- flagForceColor = noFlagForceColor;
- }
+ if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
- if (forceColor === 0) {
- return 0;
- }
+ if (forceColor === 0) return 0;
if (sniffFlags) {
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
- return 3;
- }
- if (hasFlag("color=256")) {
- return 2;
- }
- }
- if ("TF_BUILD" in env && "AGENT_NAME" in env) {
- return 1;
- }
- if (haveStream && !streamIsTTY && forceColor === undefined) {
- return 0;
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
+ if (hasFlag("color=256")) return 2;
}
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
+ if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
const min = forceColor || 0;
- if (env.TERM === "dumb") {
- return min;
- }
+ if (env.TERM === "dumb") return min;
if (process$1.platform === "win32") {
const osRelease = os.release().split(".");
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
- }
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
return 1;
}
if ("CI" in env) {
@@ -73948,79 +70323,49 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
"GITHUB_ACTIONS",
"GITEA_ACTIONS",
"CIRCLECI"
- ].some((key) => key in env)) {
- return 3;
- }
+ ].some((key) => key in env)) return 3;
if ([
"TRAVIS",
"APPVEYOR",
"GITLAB_CI",
"BUILDKITE",
"DRONE"
- ].some((sign) => sign in env) || env.CI_NAME === "codeship") {
- return 1;
- }
+ ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
return min;
}
- if ("TEAMCITY_VERSION" in env) {
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
- }
- if (env.COLORTERM === "truecolor") {
- return 3;
- }
- if (env.TERM === "xterm-kitty") {
- return 3;
- }
- if (env.TERM === "xterm-ghostty") {
- return 3;
- }
- if (env.TERM === "wezterm") {
- return 3;
- }
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ if (env.COLORTERM === "truecolor") return 3;
+ if (env.TERM === "xterm-kitty") return 3;
+ if (env.TERM === "xterm-ghostty") return 3;
+ if (env.TERM === "wezterm") return 3;
if ("TERM_PROGRAM" in env) {
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (env.TERM_PROGRAM) {
- case "iTerm.app": {
- return version >= 3 ? 3 : 2;
- }
- case "Apple_Terminal": {
- return 2;
- }
+ case "iTerm.app": return version >= 3 ? 3 : 2;
+ case "Apple_Terminal": return 2;
}
}
- if (/-256(color)?$/i.test(env.TERM)) {
- return 2;
- }
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
- return 1;
- }
- if ("COLORTERM" in env) {
- return 1;
- }
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
+ if ("COLORTERM" in env) return 1;
return min;
}
function createSupportsColor(stream, options = {}) {
- const level = _supportsColor(stream, {
+ return translateLevel(_supportsColor(stream, {
streamIsTTY: stream && stream.isTTY,
...options
- });
- return translateLevel(level);
+ }));
}
var env, flagForceColor, supportsColor;
var init_supports_color = __esmMin((() => {
({env} = process$1);
- ;
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
- flagForceColor = 0;
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
- flagForceColor = 1;
- }
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
supportsColor = {
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
};
}));
-
//#endregion
//#region ../node_modules/debug/src/node.js
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -74052,86 +70397,84 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
];
try {
const supportsColor = (init_supports_color(), __toCommonJS(supports_color_exports));
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
- exports.colors = [
- 20,
- 21,
- 26,
- 27,
- 32,
- 33,
- 38,
- 39,
- 40,
- 41,
- 42,
- 43,
- 44,
- 45,
- 56,
- 57,
- 62,
- 63,
- 68,
- 69,
- 74,
- 75,
- 76,
- 77,
- 78,
- 79,
- 80,
- 81,
- 92,
- 93,
- 98,
- 99,
- 112,
- 113,
- 128,
- 129,
- 134,
- 135,
- 148,
- 149,
- 160,
- 161,
- 162,
- 163,
- 164,
- 165,
- 166,
- 167,
- 168,
- 169,
- 170,
- 171,
- 172,
- 173,
- 178,
- 179,
- 184,
- 185,
- 196,
- 197,
- 198,
- 199,
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 209,
- 214,
- 215,
- 220,
- 221
- ];
- }
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
} catch (error) {}
/**
* Build up the default `inspectOpts` object from the environment variables.
@@ -74145,15 +70488,10 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return k.toUpperCase();
});
let val = process.env[key];
- if (/^(yes|on|true|enabled)$/i.test(val)) {
- val = true;
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
- val = false;
- } else if (val === "null") {
- val = null;
- } else {
- val = Number(val);
- }
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === "null") val = null;
+ else val = Number(val);
obj[prop] = val;
return obj;
}, {});
@@ -74176,15 +70514,11 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
- } else {
- args[0] = getDate() + name + " " + args[0];
- }
+ } else args[0] = getDate() + name + " " + args[0];
}
function getDate() {
- if (exports.inspectOpts.hideDate) {
- return "";
- }
- return new Date().toISOString() + " ";
+ if (exports.inspectOpts.hideDate) return "";
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
}
/**
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
@@ -74199,11 +70533,8 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @api private
*/
function save(namespaces) {
- if (namespaces) {
- process.env.DEBUG = namespaces;
- } else {
- delete process.env.DEBUG;
- }
+ if (namespaces) process.env.DEBUG = namespaces;
+ else delete process.env.DEBUG;
}
/**
* Load `namespaces`.
@@ -74223,9 +70554,7 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function init(debug) {
debug.inspectOpts = {};
const keys = Object.keys(exports.inspectOpts);
- for (let i = 0; i < keys.length; i++) {
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
- }
+ for (let i = 0; i < keys.length; i++) debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
module.exports = require_common()(exports);
const { formatters } = module.exports;
@@ -74244,7 +70573,6 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return util$9.inspect(v, this.inspectOpts);
};
}));
-
//#endregion
//#region ../node_modules/debug/src/index.js
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -74252,13 +70580,9 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* Detect Electron renderer / nwjs process, which is node, but we should
* treat as a browser.
*/
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
- module.exports = require_browser();
- } else {
- module.exports = require_node$1();
- }
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module.exports = require_browser();
+ else module.exports = require_node$1();
}));
-
//#endregion
//#region ../node_modules/follow-redirects/debug.js
var require_debug$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -74268,14 +70592,11 @@ var require_debug$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
try {
debug = require_src()("follow-redirects");
} catch (error) {}
- if (typeof debug !== "function") {
- debug = function() {};
- }
+ if (typeof debug !== "function") debug = function() {};
}
debug.apply(null, arguments);
};
}));
-
//#endregion
//#region ../node_modules/follow-redirects/index.js
var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -74291,9 +70612,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
var looksLikeNode = typeof process !== "undefined";
var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
var looksLikeV8 = isFunction(Error.captureStackTrace);
- if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
- console.warn("The follow-redirects package should be excluded from browser builds.");
- }
+ if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) console.warn("The follow-redirects package should be excluded from browser builds.");
})();
var useNativeURL = false;
try {
@@ -74345,9 +70664,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
this._redirects = [];
this._requestBodyLength = 0;
this._requestBodyBuffers = [];
- if (responseCallback) {
- this.on("response", responseCallback);
- }
+ if (responseCallback) this.on("response", responseCallback);
var self = this;
this._onNativeResponse = function(response) {
try {
@@ -74370,20 +70687,14 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
return this;
};
RedirectableRequest.prototype.write = function(data, encoding, callback) {
- if (this._ending) {
- throw new WriteAfterEndError();
- }
- if (!isString(data) && !isBuffer(data)) {
- throw new TypeError("data should be a string, Buffer or Uint8Array");
- }
+ if (this._ending) throw new WriteAfterEndError();
+ if (!isString(data) && !isBuffer(data)) throw new TypeError("data should be a string, Buffer or Uint8Array");
if (isFunction(encoding)) {
callback = encoding;
encoding = null;
}
if (data.length === 0) {
- if (callback) {
- callback();
- }
+ if (callback) callback();
return;
}
if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
@@ -74435,9 +70746,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
socket.addListener("timeout", socket.destroy);
}
function startTimer(socket) {
- if (self._timeout) {
- clearTimeout(self._timeout);
- }
+ if (self._timeout) clearTimeout(self._timeout);
self._timeout = setTimeout(function() {
self.emit("timeout");
clearTimer();
@@ -74453,21 +70762,12 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
self.removeListener("error", clearTimer);
self.removeListener("response", clearTimer);
self.removeListener("close", clearTimer);
- if (callback) {
- self.removeListener("timeout", callback);
- }
- if (!self.socket) {
- self._currentRequest.removeListener("socket", startTimer);
- }
- }
- if (callback) {
- this.on("timeout", callback);
- }
- if (this.socket) {
- startTimer(this.socket);
- } else {
- this._currentRequest.once("socket", startTimer);
+ if (callback) self.removeListener("timeout", callback);
+ if (!self.socket) self._currentRequest.removeListener("socket", startTimer);
}
+ if (callback) this.on("timeout", callback);
+ if (this.socket) startTimer(this.socket);
+ else this._currentRequest.once("socket", startTimer);
this.on("socket", destroyOnTimeout);
this.on("abort", clearTimer);
this.on("error", clearTimer);
@@ -74495,20 +70795,15 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
} });
});
RedirectableRequest.prototype._sanitizeOptions = function(options) {
- if (!options.headers) {
- options.headers = {};
- }
+ if (!options.headers) options.headers = {};
if (options.host) {
- if (!options.hostname) {
- options.hostname = options.host;
- }
+ if (!options.hostname) options.hostname = options.host;
delete options.host;
}
if (!options.pathname && options.path) {
var searchPos = options.path.indexOf("?");
- if (searchPos < 0) {
- options.pathname = options.path;
- } else {
+ if (searchPos < 0) options.pathname = options.path;
+ else {
options.pathname = options.path.substring(0, searchPos);
options.search = options.path.substring(searchPos);
}
@@ -74517,18 +70812,14 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
RedirectableRequest.prototype._performRequest = function() {
var protocol = this._options.protocol;
var nativeProtocol = this._options.nativeProtocols[protocol];
- if (!nativeProtocol) {
- throw new TypeError("Unsupported protocol " + protocol);
- }
+ if (!nativeProtocol) throw new TypeError("Unsupported protocol " + protocol);
if (this._options.agents) {
var scheme = protocol.slice(0, -1);
this._options.agent = this._options.agents[scheme];
}
var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
request._redirectable = this;
- for (var event of events) {
- request.on(event, eventHandlers[event]);
- }
+ for (var event of events) request.on(event, eventHandlers[event]);
this._currentUrl = /^\//.test(this._options.path) ? url$1.format(this._options) : this._options.path;
if (this._isRedirect) {
var i = 0;
@@ -74538,30 +70829,23 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
// istanbul ignore else
if (request === self._currentRequest) {
// istanbul ignore if
- if (error) {
- self.emit("error", error);
- } else if (i < buffers.length) {
+ if (error) self.emit("error", error);
+ else if (i < buffers.length) {
var buffer = buffers[i++];
// istanbul ignore else
- if (!request.finished) {
- request.write(buffer.data, buffer.encoding, writeNext);
- }
- } else if (self._ended) {
- request.end();
- }
+ if (!request.finished) request.write(buffer.data, buffer.encoding, writeNext);
+ } else if (self._ended) request.end();
}
})();
}
};
RedirectableRequest.prototype._processResponse = function(response) {
var statusCode = response.statusCode;
- if (this._options.trackRedirects) {
- this._redirects.push({
- url: this._currentUrl,
- headers: response.headers,
- statusCode
- });
- }
+ if (this._options.trackRedirects) this._redirects.push({
+ url: this._currentUrl,
+ headers: response.headers,
+ statusCode
+ });
var location = response.headers.location;
if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) {
response.responseUrl = this._currentUrl;
@@ -74572,14 +70856,10 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
}
destroyRequest(this._currentRequest);
response.destroy();
- if (++this._redirectCount > this._options.maxRedirects) {
- throw new TooManyRedirectsError();
- }
+ if (++this._redirectCount > this._options.maxRedirects) throw new TooManyRedirectsError();
var requestHeaders;
var beforeRedirect = this._options.beforeRedirect;
- if (beforeRedirect) {
- requestHeaders = Object.assign({ Host: response.req.getHeader("host") }, this._options.headers);
- }
+ if (beforeRedirect) requestHeaders = Object.assign({ Host: response.req.getHeader("host") }, this._options.headers);
var method = this._options.method;
if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
this._options.method = "GET";
@@ -74594,9 +70874,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
debug("redirecting to", redirectUrl.href);
this._isRedirect = true;
spreadUrlObject(redirectUrl, this._options);
- if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
- }
+ if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
if (isFunction(beforeRedirect)) {
var responseDetails = {
headers: response.headers,
@@ -74623,11 +70901,9 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
var wrappedProtocol = exports$7[scheme] = Object.create(nativeProtocol);
function request(input, options, callback) {
- if (isURL(input)) {
- input = spreadUrlObject(input);
- } else if (isString(input)) {
- input = spreadUrlObject(parseUrl(input));
- } else {
+ if (isURL(input)) input = spreadUrlObject(input);
+ else if (isString(input)) input = spreadUrlObject(parseUrl(input));
+ else {
callback = options;
options = validateUrl(input);
input = { protocol };
@@ -74641,9 +70917,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
maxBodyLength: exports$7.maxBodyLength
}, input, options);
options.nativeProtocols = nativeProtocols;
- if (!isString(options.host) && !isString(options.hostname)) {
- options.hostname = "::1";
- }
+ if (!isString(options.host) && !isString(options.hostname)) options.hostname = "::1";
assert$44.equal(options.protocol, protocol, "protocol mismatch");
debug("options", options);
return new RedirectableRequest(options, callback);
@@ -74674,13 +70948,10 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
function parseUrl(input) {
var parsed;
// istanbul ignore else
- if (useNativeURL) {
- parsed = new URL(input);
- } else {
+ if (useNativeURL) parsed = new URL(input);
+ else {
parsed = validateUrl(url$1.parse(input));
- if (!isString(parsed.protocol)) {
- throw new InvalidUrlError({ input });
- }
+ if (!isString(parsed.protocol)) throw new InvalidUrlError({ input });
}
return parsed;
}
@@ -74689,44 +70960,30 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
return useNativeURL ? new URL(relative, base) : parseUrl(url$1.resolve(base, relative));
}
function validateUrl(input) {
- if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
- throw new InvalidUrlError({ input: input.href || input });
- }
- if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
- throw new InvalidUrlError({ input: input.href || input });
- }
+ if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) throw new InvalidUrlError({ input: input.href || input });
+ if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) throw new InvalidUrlError({ input: input.href || input });
return input;
}
function spreadUrlObject(urlObject, target) {
var spread = target || {};
- for (var key of preservedUrlFields) {
- spread[key] = urlObject[key];
- }
- if (spread.hostname.startsWith("[")) {
- spread.hostname = spread.hostname.slice(1, -1);
- }
- if (spread.port !== "") {
- spread.port = Number(spread.port);
- }
+ for (var key of preservedUrlFields) spread[key] = urlObject[key];
+ if (spread.hostname.startsWith("[")) spread.hostname = spread.hostname.slice(1, -1);
+ if (spread.port !== "") spread.port = Number(spread.port);
spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
return spread;
}
function removeMatchingHeaders(regex, headers) {
var lastValue;
- for (var header in headers) {
- if (regex.test(header)) {
- lastValue = headers[header];
- delete headers[header];
- }
+ for (var header in headers) if (regex.test(header)) {
+ lastValue = headers[header];
+ delete headers[header];
}
- return lastValue === null || typeof lastValue === "undefined" ? undefined : String(lastValue).trim();
+ return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
}
function createErrorType(code, message, baseClass) {
function CustomError(properties) {
// istanbul ignore else
- if (isFunction(Error.captureStackTrace)) {
- Error.captureStackTrace(this, this.constructor);
- }
+ if (isFunction(Error.captureStackTrace)) Error.captureStackTrace(this, this.constructor);
Object.assign(this, properties || {});
this.code = code;
this.message = this.cause ? message + ": " + this.cause.message : message;
@@ -74745,9 +71002,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
return CustomError;
}
function destroyRequest(request, error) {
- for (var event of events) {
- request.removeListener(event, eventHandlers[event]);
- }
+ for (var event of events) request.removeListener(event, eventHandlers[event]);
request.on("error", noop);
request.destroy(error);
}
@@ -74774,20 +71029,17 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
});
module.exports.wrap = wrap;
}));
-
//#endregion
//#region ../node_modules/axios/lib/env/data.js
var import_follow_redirects = /* @__PURE__ */ __toESM(require_follow_redirects(), 1);
var import_proxy_from_env = /* @__PURE__ */ __toESM(require_proxy_from_env(), 1);
const VERSION$2 = "1.12.2";
-
//#endregion
//#region ../node_modules/axios/lib/helpers/parseProtocol.js
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
return match && match[1] || "";
}
-
//#endregion
//#region ../node_modules/axios/lib/helpers/fromDataURI.js
const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
@@ -74804,30 +71056,23 @@ const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
function fromDataURI(uri, asBlob, options) {
const _Blob = options && options.Blob || platform_default.classes.Blob;
const protocol = parseProtocol(uri);
- if (asBlob === undefined && _Blob) {
- asBlob = true;
- }
+ if (asBlob === void 0 && _Blob) asBlob = true;
if (protocol === "data") {
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
const match = DATA_URL_PATTERN.exec(uri);
- if (!match) {
- throw new AxiosError$1("Invalid URL", AxiosError$1.ERR_INVALID_URL);
- }
+ if (!match) throw new AxiosError$1("Invalid URL", AxiosError$1.ERR_INVALID_URL);
const mime = match[1];
const isBase64 = match[2];
const body = match[3];
const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8");
if (asBlob) {
- if (!_Blob) {
- throw new AxiosError$1("Blob is not supported", AxiosError$1.ERR_NOT_SUPPORT);
- }
+ if (!_Blob) throw new AxiosError$1("Blob is not supported", AxiosError$1.ERR_NOT_SUPPORT);
return new _Blob([buffer], { type: mime });
}
return buffer;
}
throw new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_NOT_SUPPORT);
}
-
//#endregion
//#region ../node_modules/axios/lib/helpers/AxiosTransformStream.js
const kInternals = Symbol("internals");
@@ -74858,17 +71103,13 @@ var AxiosTransformStream = class extends stream.Transform {
};
this.on("newListener", (event) => {
if (event === "progress") {
- if (!internals.isCaptured) {
- internals.isCaptured = true;
- }
+ if (!internals.isCaptured) internals.isCaptured = true;
}
});
}
_read(size) {
const internals = this[kInternals];
- if (internals.onReadCallback) {
- internals.onReadCallback();
- }
+ if (internals.onReadCallback) internals.onReadCallback();
return super._read(size);
}
_transform(chunk, encoding, callback) {
@@ -74876,22 +71117,18 @@ var AxiosTransformStream = class extends stream.Transform {
const maxRate = internals.maxRate;
const readableHighWaterMark = this.readableHighWaterMark;
const timeWindow = internals.timeWindow;
- const divider = 1e3 / timeWindow;
- const bytesThreshold = maxRate / divider;
+ const bytesThreshold = maxRate / (1e3 / timeWindow);
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * .01) : 0;
const pushChunk = (_chunk, _callback) => {
const bytes = Buffer.byteLength(_chunk);
internals.bytesSeen += bytes;
internals.bytes += bytes;
internals.isCaptured && this.emit("progress", internals.bytesSeen);
- if (this.push(_chunk)) {
+ if (this.push(_chunk)) process.nextTick(_callback);
+ else internals.onReadCallback = () => {
+ internals.onReadCallback = null;
process.nextTick(_callback);
- } else {
- internals.onReadCallback = () => {
- internals.onReadCallback = null;
- process.nextTick(_callback);
- };
- }
+ };
};
const transformChunk = (_chunk, _callback) => {
const chunkSize = Buffer.byteLength(_chunk);
@@ -74910,14 +71147,10 @@ var AxiosTransformStream = class extends stream.Transform {
bytesLeft = bytesThreshold - internals.bytes;
}
if (maxRate) {
- if (bytesLeft <= 0) {
- return setTimeout(() => {
- _callback(null, _chunk);
- }, timeWindow - passed);
- }
- if (bytesLeft < maxChunkSize) {
- maxChunkSize = bytesLeft;
- }
+ if (bytesLeft <= 0) return setTimeout(() => {
+ _callback(null, _chunk);
+ }, timeWindow - passed);
+ if (bytesLeft < maxChunkSize) maxChunkSize = bytesLeft;
}
if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
chunkRemainder = _chunk.subarray(maxChunkSize);
@@ -74928,5497 +71161,3784 @@ var AxiosTransformStream = class extends stream.Transform {
} : _callback);
};
transformChunk(chunk, function transformNextChunk(err, _chunk) {
- if (err) {
- return callback(err);
- }
- if (_chunk) {
- transformChunk(_chunk, transformNextChunk);
- } else {
- callback(null);
- }
- });
- }
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/readBlob.js
-const { asyncIterator } = Symbol;
-const readBlob = async function* (blob) {
- if (blob.stream) {
- yield* blob.stream();
- } else if (blob.arrayBuffer) {
- yield await blob.arrayBuffer();
- } else if (blob[asyncIterator]) {
- yield* blob[asyncIterator]();
- } else {
- yield blob;
- }
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/formDataToStream.js
-const BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
-const textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
-const CRLF = "\r\n";
-const CRLF_BYTES = textEncoder.encode(CRLF);
-const CRLF_BYTES_COUNT = 2;
-var FormDataPart = class {
- constructor(name, value) {
- const { escapeName } = this.constructor;
- const isStringValue = utils_default.isString(value);
- let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
- if (isStringValue) {
- value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
- } else {
- headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
- }
- this.headers = textEncoder.encode(headers + CRLF);
- this.contentLength = isStringValue ? value.byteLength : value.size;
- this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
- this.name = name;
- this.value = value;
- }
- async *encode() {
- yield this.headers;
- const { value } = this;
- if (utils_default.isTypedArray(value)) {
- yield value;
- } else {
- yield* readBlob(value);
- }
- yield CRLF_BYTES;
- }
- static escapeName(name) {
- return String(name).replace(/[\r\n"]/g, (match) => ({
- "\r": "%0D",
- "\n": "%0A",
- "\"": "%22"
- })[match]);
- }
-};
-const formDataToStream = (form, headersHandler, options) => {
- const { tag = "form-data-boundary", size = 25, boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {};
- if (!utils_default.isFormData(form)) {
- throw TypeError("FormData instance required");
- }
- if (boundary.length < 1 || boundary.length > 70) {
- throw Error("boundary must be 10-70 characters long");
- }
- const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
- const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
- let contentLength = footerBytes.byteLength;
- const parts = Array.from(form.entries()).map(([name, value]) => {
- const part = new FormDataPart(name, value);
- contentLength += part.size;
- return part;
- });
- contentLength += boundaryBytes.byteLength * parts.length;
- contentLength = utils_default.toFiniteNumber(contentLength);
- const computedHeaders = { "Content-Type": `multipart/form-data; boundary=${boundary}` };
- if (Number.isFinite(contentLength)) {
- computedHeaders["Content-Length"] = contentLength;
- }
- headersHandler && headersHandler(computedHeaders);
- return Readable.from((async function* () {
- for (const part of parts) {
- yield boundaryBytes;
- yield* part.encode();
- }
- yield footerBytes;
- })());
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
-var ZlibHeaderTransformStream = class extends stream.Transform {
- __transform(chunk, encoding, callback) {
- this.push(chunk);
- callback();
- }
- _transform(chunk, encoding, callback) {
- if (chunk.length !== 0) {
- this._transform = this.__transform;
- if (chunk[0] !== 120) {
- const header = Buffer.alloc(2);
- header[0] = 120;
- header[1] = 156;
- this.push(header, encoding);
- }
- }
- this.__transform(chunk, encoding, callback);
- }
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/callbackify.js
-const callbackify = (fn, reducer) => {
- return utils_default.isAsyncFn(fn) ? function(...args) {
- const cb = args.pop();
- fn.apply(this, args).then((value) => {
- try {
- reducer ? cb(null, ...reducer(value)) : cb(null, value);
- } catch (err) {
- cb(err);
- }
- }, cb);
- } : fn;
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/speedometer.js
-/**
-* Calculate data maxRate
-* @param {Number} [samplesCount= 10]
-* @param {Number} [min= 1000]
-* @returns {Function}
-*/
-function speedometer(samplesCount, min) {
- samplesCount = samplesCount || 10;
- const bytes = new Array(samplesCount);
- const timestamps = new Array(samplesCount);
- let head = 0;
- let tail = 0;
- let firstSampleTS;
- min = min !== undefined ? min : 1e3;
- return function push(chunkLength) {
- const now = Date.now();
- const startedAt = timestamps[tail];
- if (!firstSampleTS) {
- firstSampleTS = now;
- }
- bytes[head] = chunkLength;
- timestamps[head] = now;
- let i = tail;
- let bytesCount = 0;
- while (i !== head) {
- bytesCount += bytes[i++];
- i = i % samplesCount;
- }
- head = (head + 1) % samplesCount;
- if (head === tail) {
- tail = (tail + 1) % samplesCount;
- }
- if (now - firstSampleTS < min) {
- return;
- }
- const passed = startedAt && now - startedAt;
- return passed ? Math.round(bytesCount * 1e3 / passed) : undefined;
- };
-}
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/throttle.js
-/**
-* Throttle decorator
-* @param {Function} fn
-* @param {Number} freq
-* @return {Function}
-*/
-function throttle$1(fn, freq) {
- let timestamp = 0;
- let threshold = 1e3 / freq;
- let lastArgs;
- let timer;
- const invoke = (args, now = Date.now()) => {
- timestamp = now;
- lastArgs = null;
- if (timer) {
- clearTimeout(timer);
- timer = null;
- }
- fn(...args);
- };
- const throttled = (...args) => {
- const now = Date.now();
- const passed = now - timestamp;
- if (passed >= threshold) {
- invoke(args, now);
- } else {
- lastArgs = args;
- if (!timer) {
- timer = setTimeout(() => {
- timer = null;
- invoke(lastArgs);
- }, threshold - passed);
- }
- }
- };
- const flush = () => lastArgs && invoke(lastArgs);
- return [throttled, flush];
-}
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/progressEventReducer.js
-const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
- let bytesNotified = 0;
- const _speedometer = speedometer(50, 250);
- return throttle$1((e) => {
- const loaded = e.loaded;
- const total = e.lengthComputable ? e.total : undefined;
- const progressBytes = loaded - bytesNotified;
- const rate = _speedometer(progressBytes);
- const inRange = loaded <= total;
- bytesNotified = loaded;
- const data = {
- loaded,
- total,
- progress: total ? loaded / total : undefined,
- bytes: progressBytes,
- rate: rate ? rate : undefined,
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
- event: e,
- lengthComputable: total != null,
- [isDownloadStream ? "download" : "upload"]: true
- };
- listener(data);
- }, freq);
-};
-const progressEventDecorator = (total, throttled) => {
- const lengthComputable = total != null;
- return [(loaded) => throttled[0]({
- lengthComputable,
- total,
- loaded
- }), throttled[1]];
-};
-const asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
-/**
-* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
-* - For base64: compute exact decoded size using length and padding;
-* handle %XX at the character-count level (no string allocation).
-* - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
-*
-* @param {string} url
-* @returns {number}
-*/
-function estimateDataURLDecodedBytes(url) {
- if (!url || typeof url !== "string") return 0;
- if (!url.startsWith("data:")) return 0;
- const comma = url.indexOf(",");
- if (comma < 0) return 0;
- const meta = url.slice(5, comma);
- const body = url.slice(comma + 1);
- const isBase64 = /;base64/i.test(meta);
- if (isBase64) {
- let effectiveLen = body.length;
- const len = body.length;
- for (let i = 0; i < len; i++) {
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
- const a = body.charCodeAt(i + 1);
- const b = body.charCodeAt(i + 2);
- const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
- if (isHex) {
- effectiveLen -= 2;
- i += 2;
- }
- }
- }
- let pad = 0;
- let idx = len - 1;
- const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && body.charCodeAt(j - 1) === 51 && (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
- if (idx >= 0) {
- if (body.charCodeAt(idx) === 61) {
- pad++;
- idx--;
- } else if (tailIsPct3D(idx)) {
- pad++;
- idx -= 3;
- }
- }
- if (pad === 1 && idx >= 0) {
- if (body.charCodeAt(idx) === 61) {
- pad++;
- } else if (tailIsPct3D(idx)) {
- pad++;
- }
- }
- const groups = Math.floor(effectiveLen / 4);
- const bytes = groups * 3 - (pad || 0);
- return bytes > 0 ? bytes : 0;
- }
- return Buffer.byteLength(body, "utf8");
-}
-
-//#endregion
-//#region ../node_modules/axios/lib/adapters/http.js
-const zlibOptions = {
- flush: zlib.constants.Z_SYNC_FLUSH,
- finishFlush: zlib.constants.Z_SYNC_FLUSH
-};
-const brotliOptions = {
- flush: zlib.constants.BROTLI_OPERATION_FLUSH,
- finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
-};
-const isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
-const { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
-const isHttps = /https:?/;
-const supportedProtocols = platform_default.protocols.map((protocol) => {
- return protocol + ":";
-});
-const flushOnFinish = (stream, [throttled, flush]) => {
- stream.on("end", flush).on("error", flush);
- return throttled;
-};
-/**
-* If the proxy or config beforeRedirects functions are defined, call them with the options
-* object.
-*
-* @param {Object} options - The options object that was passed to the request.
-*
-* @returns {Object}
-*/
-function dispatchBeforeRedirect(options, responseDetails) {
- if (options.beforeRedirects.proxy) {
- options.beforeRedirects.proxy(options);
- }
- if (options.beforeRedirects.config) {
- options.beforeRedirects.config(options, responseDetails);
- }
-}
-/**
-* If the proxy or config afterRedirects functions are defined, call them with the options
-*
-* @param {http.ClientRequestArgs} options
-* @param {AxiosProxyConfig} configProxy configuration from Axios options object
-* @param {string} location
-*
-* @returns {http.ClientRequestArgs}
-*/
-function setProxy(options, configProxy, location) {
- let proxy = configProxy;
- if (!proxy && proxy !== false) {
- const proxyUrl = import_proxy_from_env.getProxyForUrl(location);
- if (proxyUrl) {
- proxy = new URL(proxyUrl);
- }
- }
- if (proxy) {
- if (proxy.username) {
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
- }
- if (proxy.auth) {
- if (proxy.auth.username || proxy.auth.password) {
- proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
- }
- const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
- options.headers["Proxy-Authorization"] = "Basic " + base64;
- }
- options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
- const proxyHost = proxy.hostname || proxy.host;
- options.hostname = proxyHost;
- options.host = proxyHost;
- options.port = proxy.port;
- options.path = location;
- if (proxy.protocol) {
- options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
- }
- }
- options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
- setProxy(redirectOptions, configProxy, redirectOptions.href);
- };
-}
-const isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
-const wrapAsync = (asyncExecutor) => {
- return new Promise((resolve, reject) => {
- let onDone;
- let isDone;
- const done = (value, isRejected) => {
- if (isDone) return;
- isDone = true;
- onDone && onDone(value, isRejected);
- };
- const _resolve = (value) => {
- done(value);
- resolve(value);
- };
- const _reject = (reason) => {
- done(reason, true);
- reject(reason);
- };
- asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
- });
-};
-const resolveFamily = ({ address, family }) => {
- if (!utils_default.isString(address)) {
- throw TypeError("address must be a string");
- }
- return {
- address,
- family: family || (address.indexOf(".") < 0 ? 6 : 4)
- };
-};
-const buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : {
- address,
- family
-});
-var http_default = isHttpAdapterSupported && function httpAdapter(config) {
- return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
- let { data, lookup, family } = config;
- const { responseType, responseEncoding } = config;
- const method = config.method.toUpperCase();
- let isDone;
- let rejected = false;
- let req;
- if (lookup) {
- const _lookup = callbackify(lookup, (value) => utils_default.isArray(value) ? value : [value]);
- lookup = (hostname, opt, cb) => {
- _lookup(hostname, opt, (err, arg0, arg1) => {
- if (err) {
- return cb(err);
- }
- const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
- });
- };
- }
- const emitter = new EventEmitter();
- const onFinished = () => {
- if (config.cancelToken) {
- config.cancelToken.unsubscribe(abort);
- }
- if (config.signal) {
- config.signal.removeEventListener("abort", abort);
- }
- emitter.removeAllListeners();
- };
- onDone((value, isRejected) => {
- isDone = true;
- if (isRejected) {
- rejected = true;
- onFinished();
- }
- });
- function abort(reason) {
- emitter.emit("abort", !reason || reason.type ? new CanceledError$1(null, config, req) : reason);
- }
- emitter.once("abort", reject);
- if (config.cancelToken || config.signal) {
- config.cancelToken && config.cancelToken.subscribe(abort);
- if (config.signal) {
- config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
- }
- }
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : undefined);
- const protocol = parsed.protocol || supportedProtocols[0];
- if (protocol === "data:") {
- if (config.maxContentLength > -1) {
- const dataUrl = String(config.url || fullPath || "");
- const estimated = estimateDataURLDecodedBytes(dataUrl);
- if (estimated > config.maxContentLength) {
- return reject(new AxiosError$1("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config));
- }
- }
- let convertedData;
- if (method !== "GET") {
- return settle(resolve, reject, {
- status: 405,
- statusText: "method not allowed",
- headers: {},
- config
- });
- }
- try {
- convertedData = fromDataURI(config.url, responseType === "blob", { Blob: config.env && config.env.Blob });
- } catch (err) {
- throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config);
- }
- if (responseType === "text") {
- convertedData = convertedData.toString(responseEncoding);
- if (!responseEncoding || responseEncoding === "utf8") {
- convertedData = utils_default.stripBOM(convertedData);
- }
- } else if (responseType === "stream") {
- convertedData = stream.Readable.from(convertedData);
- }
- return settle(resolve, reject, {
- data: convertedData,
- status: 200,
- statusText: "OK",
- headers: new AxiosHeaders$1(),
- config
- });
- }
- if (supportedProtocols.indexOf(protocol) === -1) {
- return reject(new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_BAD_REQUEST, config));
- }
- const headers = AxiosHeaders$1.from(config.headers).normalize();
- headers.set("User-Agent", "axios/" + VERSION$2, false);
- const { onUploadProgress, onDownloadProgress } = config;
- const maxRate = config.maxRate;
- let maxUploadRate = undefined;
- let maxDownloadRate = undefined;
- if (utils_default.isSpecCompliantForm(data)) {
- const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
- data = formDataToStream(data, (formHeaders) => {
- headers.set(formHeaders);
- }, {
- tag: `axios-${VERSION$2}-boundary`,
- boundary: userBoundary && userBoundary[1] || undefined
- });
- } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
- headers.set(data.getHeaders());
- if (!headers.hasContentLength()) {
- try {
- const knownLength = await util.promisify(data.getLength).call(data);
- Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
- } catch (e) {}
- }
- } else if (utils_default.isBlob(data) || utils_default.isFile(data)) {
- data.size && headers.setContentType(data.type || "application/octet-stream");
- headers.setContentLength(data.size || 0);
- data = stream.Readable.from(readBlob(data));
- } else if (data && !utils_default.isStream(data)) {
- if (Buffer.isBuffer(data)) {} else if (utils_default.isArrayBuffer(data)) {
- data = Buffer.from(new Uint8Array(data));
- } else if (utils_default.isString(data)) {
- data = Buffer.from(data, "utf-8");
- } else {
- return reject(new AxiosError$1("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError$1.ERR_BAD_REQUEST, config));
- }
- headers.setContentLength(data.length, false);
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
- return reject(new AxiosError$1("Request body larger than maxBodyLength limit", AxiosError$1.ERR_BAD_REQUEST, config));
- }
- }
- const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
- if (utils_default.isArray(maxRate)) {
- maxUploadRate = maxRate[0];
- maxDownloadRate = maxRate[1];
- } else {
- maxUploadRate = maxDownloadRate = maxRate;
- }
- if (data && (onUploadProgress || maxUploadRate)) {
- if (!utils_default.isStream(data)) {
- data = stream.Readable.from(data, { objectMode: false });
- }
- data = stream.pipeline([data, new AxiosTransformStream({ maxRate: utils_default.toFiniteNumber(maxUploadRate) })], utils_default.noop);
- onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
- }
- let auth = undefined;
- if (config.auth) {
- const username = config.auth.username || "";
- const password = config.auth.password || "";
- auth = username + ":" + password;
- }
- if (!auth && parsed.username) {
- const urlUsername = parsed.username;
- const urlPassword = parsed.password;
- auth = urlUsername + ":" + urlPassword;
- }
- auth && headers.delete("authorization");
- let path;
- try {
- path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
- } catch (err) {
- const customErr = new Error(err.message);
- customErr.config = config;
- customErr.url = config.url;
- customErr.exists = true;
- return reject(customErr);
- }
- headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
- const options = {
- path,
- method,
- headers: headers.toJSON(),
- agents: {
- http: config.httpAgent,
- https: config.httpsAgent
- },
- auth,
- protocol,
- family,
- beforeRedirect: dispatchBeforeRedirect,
- beforeRedirects: {}
- };
- !utils_default.isUndefined(lookup) && (options.lookup = lookup);
- if (config.socketPath) {
- options.socketPath = config.socketPath;
- } else {
- options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
- options.port = parsed.port;
- setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
- }
- let transport;
- const isHttpsRequest = isHttps.test(options.protocol);
- options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
- if (config.transport) {
- transport = config.transport;
- } else if (config.maxRedirects === 0) {
- transport = isHttpsRequest ? https : http;
- } else {
- if (config.maxRedirects) {
- options.maxRedirects = config.maxRedirects;
- }
- if (config.beforeRedirect) {
- options.beforeRedirects.config = config.beforeRedirect;
- }
- transport = isHttpsRequest ? httpsFollow : httpFollow;
- }
- if (config.maxBodyLength > -1) {
- options.maxBodyLength = config.maxBodyLength;
- } else {
- options.maxBodyLength = Infinity;
- }
- if (config.insecureHTTPParser) {
- options.insecureHTTPParser = config.insecureHTTPParser;
- }
- req = transport.request(options, function handleResponse(res) {
- if (req.destroyed) return;
- const streams = [res];
- const responseLength = +res.headers["content-length"];
- if (onDownloadProgress || maxDownloadRate) {
- const transformStream = new AxiosTransformStream({ maxRate: utils_default.toFiniteNumber(maxDownloadRate) });
- onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
- streams.push(transformStream);
- }
- let responseStream = res;
- const lastRequest = res.req || req;
- if (config.decompress !== false && res.headers["content-encoding"]) {
- if (method === "HEAD" || res.statusCode === 204) {
- delete res.headers["content-encoding"];
- }
- switch ((res.headers["content-encoding"] || "").toLowerCase()) {
- case "gzip":
- case "x-gzip":
- case "compress":
- case "x-compress":
- streams.push(zlib.createUnzip(zlibOptions));
- delete res.headers["content-encoding"];
- break;
- case "deflate":
- streams.push(new ZlibHeaderTransformStream());
- streams.push(zlib.createUnzip(zlibOptions));
- delete res.headers["content-encoding"];
- break;
- case "br": if (isBrotliSupported) {
- streams.push(zlib.createBrotliDecompress(brotliOptions));
- delete res.headers["content-encoding"];
- }
- }
- }
- responseStream = streams.length > 1 ? stream.pipeline(streams, utils_default.noop) : streams[0];
- const offListeners = stream.finished(responseStream, () => {
- offListeners();
- onFinished();
- });
- const response = {
- status: res.statusCode,
- statusText: res.statusMessage,
- headers: new AxiosHeaders$1(res.headers),
- config,
- request: lastRequest
- };
- if (responseType === "stream") {
- response.data = responseStream;
- settle(resolve, reject, response);
- } else {
- const responseBuffer = [];
- let totalResponseBytes = 0;
- responseStream.on("data", function handleStreamData(chunk) {
- responseBuffer.push(chunk);
- totalResponseBytes += chunk.length;
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
- rejected = true;
- responseStream.destroy();
- reject(new AxiosError$1("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, lastRequest));
- }
- });
- responseStream.on("aborted", function handlerStreamAborted() {
- if (rejected) {
- return;
- }
- const err = new AxiosError$1("stream has been aborted", AxiosError$1.ERR_BAD_RESPONSE, config, lastRequest);
- responseStream.destroy(err);
- reject(err);
- });
- responseStream.on("error", function handleStreamError(err) {
- if (req.destroyed) return;
- reject(AxiosError$1.from(err, null, config, lastRequest));
- });
- responseStream.on("end", function handleStreamEnd() {
- try {
- let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
- if (responseType !== "arraybuffer") {
- responseData = responseData.toString(responseEncoding);
- if (!responseEncoding || responseEncoding === "utf8") {
- responseData = utils_default.stripBOM(responseData);
- }
- }
- response.data = responseData;
- } catch (err) {
- return reject(AxiosError$1.from(err, null, config, response.request, response));
- }
- settle(resolve, reject, response);
- });
- }
- emitter.once("abort", (err) => {
- if (!responseStream.destroyed) {
- responseStream.emit("error", err);
- responseStream.destroy();
- }
- });
- });
- emitter.once("abort", (err) => {
- reject(err);
- req.destroy(err);
- });
- req.on("error", function handleRequestError(err) {
- reject(AxiosError$1.from(err, null, config, req));
+ if (err) return callback(err);
+ if (_chunk) transformChunk(_chunk, transformNextChunk);
+ else callback(null);
});
- req.on("socket", function handleRequestSocket(socket) {
- socket.setKeepAlive(true, 1e3 * 60);
- });
- if (config.timeout) {
- const timeout = parseInt(config.timeout, 10);
- if (Number.isNaN(timeout)) {
- reject(new AxiosError$1("error trying to parse `config.timeout` to int", AxiosError$1.ERR_BAD_OPTION_VALUE, config, req));
- return;
- }
- req.setTimeout(timeout, function handleRequestTimeout() {
- if (isDone) return;
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
- const transitional = config.transitional || transitional_default;
- if (config.timeoutErrorMessage) {
- timeoutErrorMessage = config.timeoutErrorMessage;
- }
- reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, req));
- abort();
- });
- }
- if (utils_default.isStream(data)) {
- let ended = false;
- let errored = false;
- data.on("end", () => {
- ended = true;
- });
- data.once("error", (err) => {
- errored = true;
- req.destroy(err);
- });
- data.on("close", () => {
- if (!ended && !errored) {
- abort(new CanceledError$1("Request stream has been aborted", config, req));
- }
- });
- data.pipe(req);
- } else {
- req.end(data);
- }
- });
-};
-const __setProxy = setProxy;
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/isURLSameOrigin.js
-var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
- url = new URL(url, platform_default.origin);
- return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
-})(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/cookies.js
-var cookies_default = platform_default.hasStandardBrowserEnv ? {
- write(name, value, expires, path, domain, secure) {
- const cookie = [name + "=" + encodeURIComponent(value)];
- utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
- utils_default.isString(path) && cookie.push("path=" + path);
- utils_default.isString(domain) && cookie.push("domain=" + domain);
- secure === true && cookie.push("secure");
- document.cookie = cookie.join("; ");
- },
- read(name) {
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
- return match ? decodeURIComponent(match[3]) : null;
- },
- remove(name) {
- this.write(name, "", Date.now() - 864e5);
- }
-} : {
- write() {},
- read() {
- return null;
- },
- remove() {}
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/core/mergeConfig.js
-const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
-/**
-* Config-specific merge-function which creates a new config-object
-* by merging two configuration objects together.
-*
-* @param {Object} config1
-* @param {Object} config2
-*
-* @returns {Object} New object resulting from merging config2 to config1
-*/
-function mergeConfig$1(config1, config2) {
- config2 = config2 || {};
- const config = {};
- function getMergedValue(target, source, prop, caseless) {
- if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
- return utils_default.merge.call({ caseless }, target, source);
- } else if (utils_default.isPlainObject(source)) {
- return utils_default.merge({}, source);
- } else if (utils_default.isArray(source)) {
- return source.slice();
- }
- return source;
- }
- function mergeDeepProperties(a, b, prop, caseless) {
- if (!utils_default.isUndefined(b)) {
- return getMergedValue(a, b, prop, caseless);
- } else if (!utils_default.isUndefined(a)) {
- return getMergedValue(undefined, a, prop, caseless);
- }
- }
- function valueFromConfig2(a, b) {
- if (!utils_default.isUndefined(b)) {
- return getMergedValue(undefined, b);
- }
- }
- function defaultToConfig2(a, b) {
- if (!utils_default.isUndefined(b)) {
- return getMergedValue(undefined, b);
- } else if (!utils_default.isUndefined(a)) {
- return getMergedValue(undefined, a);
- }
- }
- function mergeDirectKeys(a, b, prop) {
- if (prop in config2) {
- return getMergedValue(a, b);
- } else if (prop in config1) {
- return getMergedValue(undefined, a);
- }
- }
- const mergeMap = {
- url: valueFromConfig2,
- method: valueFromConfig2,
- data: valueFromConfig2,
- baseURL: defaultToConfig2,
- transformRequest: defaultToConfig2,
- transformResponse: defaultToConfig2,
- paramsSerializer: defaultToConfig2,
- timeout: defaultToConfig2,
- timeoutMessage: defaultToConfig2,
- withCredentials: defaultToConfig2,
- withXSRFToken: defaultToConfig2,
- adapter: defaultToConfig2,
- responseType: defaultToConfig2,
- xsrfCookieName: defaultToConfig2,
- xsrfHeaderName: defaultToConfig2,
- onUploadProgress: defaultToConfig2,
- onDownloadProgress: defaultToConfig2,
- decompress: defaultToConfig2,
- maxContentLength: defaultToConfig2,
- maxBodyLength: defaultToConfig2,
- beforeRedirect: defaultToConfig2,
- transport: defaultToConfig2,
- httpAgent: defaultToConfig2,
- httpsAgent: defaultToConfig2,
- cancelToken: defaultToConfig2,
- socketPath: defaultToConfig2,
- responseEncoding: defaultToConfig2,
- validateStatus: mergeDirectKeys,
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
- };
- utils_default.forEach(Object.keys({
- ...config1,
- ...config2
- }), function computeConfigValue(prop) {
- const merge = mergeMap[prop] || mergeDeepProperties;
- const configValue = merge(config1[prop], config2[prop], prop);
- utils_default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
- });
- return config;
-}
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/resolveConfig.js
-var resolveConfig_default = (config) => {
- const newConfig = mergeConfig$1({}, config);
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
- newConfig.headers = headers = AxiosHeaders$1.from(headers);
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
- if (auth) {
- headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
- }
- if (utils_default.isFormData(data)) {
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
- headers.setContentType(undefined);
- } else if (utils_default.isFunction(data.getHeaders)) {
- const formHeaders = data.getHeaders();
- const allowedHeaders = ["content-type", "content-length"];
- Object.entries(formHeaders).forEach(([key, val]) => {
- if (allowedHeaders.includes(key.toLowerCase())) {
- headers.set(key, val);
- }
- });
- }
- }
- if (platform_default.hasStandardBrowserEnv) {
- withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
- const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
- if (xsrfValue) {
- headers.set(xsrfHeaderName, xsrfValue);
- }
- }
- }
- return newConfig;
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/adapters/xhr.js
-const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
-var xhr_default = isXHRAdapterSupported && function(config) {
- return new Promise(function dispatchXhrRequest(resolve, reject) {
- const _config = resolveConfig_default(config);
- let requestData = _config.data;
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
- let { responseType, onUploadProgress, onDownloadProgress } = _config;
- let onCanceled;
- let uploadThrottled, downloadThrottled;
- let flushUpload, flushDownload;
- function done() {
- flushUpload && flushUpload();
- flushDownload && flushDownload();
- _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
- _config.signal && _config.signal.removeEventListener("abort", onCanceled);
- }
- let request = new XMLHttpRequest();
- request.open(_config.method.toUpperCase(), _config.url, true);
- request.timeout = _config.timeout;
- function onloadend() {
- if (!request) {
- return;
- }
- const responseHeaders = AxiosHeaders$1.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
- const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
- const response = {
- data: responseData,
- status: request.status,
- statusText: request.statusText,
- headers: responseHeaders,
- config,
- request
- };
- settle(function _resolve(value) {
- resolve(value);
- done();
- }, function _reject(err) {
- reject(err);
- done();
- }, response);
- request = null;
- }
- if ("onloadend" in request) {
- request.onloadend = onloadend;
- } else {
- request.onreadystatechange = function handleLoad() {
- if (!request || request.readyState !== 4) {
- return;
- }
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
- return;
- }
- setTimeout(onloadend);
- };
- }
- request.onabort = function handleAbort() {
- if (!request) {
- return;
- }
- reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
- request = null;
- };
- request.onerror = function handleError(event) {
- const msg = event && event.message ? event.message : "Network Error";
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
- err.event = event || null;
- reject(err);
- request = null;
- };
- request.ontimeout = function handleTimeout() {
- let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
- const transitional = _config.transitional || transitional_default;
- if (_config.timeoutErrorMessage) {
- timeoutErrorMessage = _config.timeoutErrorMessage;
- }
- reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, request));
- request = null;
- };
- requestData === undefined && requestHeaders.setContentType(null);
- if ("setRequestHeader" in request) {
- utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
- request.setRequestHeader(key, val);
- });
- }
- if (!utils_default.isUndefined(_config.withCredentials)) {
- request.withCredentials = !!_config.withCredentials;
- }
- if (responseType && responseType !== "json") {
- request.responseType = _config.responseType;
- }
- if (onDownloadProgress) {
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
- request.addEventListener("progress", downloadThrottled);
- }
- if (onUploadProgress && request.upload) {
- [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
- request.upload.addEventListener("progress", uploadThrottled);
- request.upload.addEventListener("loadend", flushUpload);
- }
- if (_config.cancelToken || _config.signal) {
- onCanceled = (cancel) => {
- if (!request) {
- return;
- }
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
- request.abort();
- request = null;
- };
- _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
- if (_config.signal) {
- _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
- }
- }
- const protocol = parseProtocol(_config.url);
- if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
- reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
- return;
- }
- request.send(requestData || null);
- });
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/composeSignals.js
-const composeSignals = (signals, timeout) => {
- const { length } = signals = signals ? signals.filter(Boolean) : [];
- if (timeout || length) {
- let controller = new AbortController();
- let aborted;
- const onabort = function(reason) {
- if (!aborted) {
- aborted = true;
- unsubscribe();
- const err = reason instanceof Error ? reason : this.reason;
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
- }
- };
- let timer = timeout && setTimeout(() => {
- timer = null;
- onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
- }, timeout);
- const unsubscribe = () => {
- if (signals) {
- timer && clearTimeout(timer);
- timer = null;
- signals.forEach((signal) => {
- signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener("abort", onabort);
- });
- signals = null;
- }
- };
- signals.forEach((signal) => signal.addEventListener("abort", onabort));
- const { signal } = controller;
- signal.unsubscribe = () => utils_default.asap(unsubscribe);
- return signal;
- }
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/trackStream.js
-const streamChunk = function* (chunk, chunkSize) {
- let len = chunk.byteLength;
- if (!chunkSize || len < chunkSize) {
- yield chunk;
- return;
- }
- let pos = 0;
- let end;
- while (pos < len) {
- end = pos + chunkSize;
- yield chunk.slice(pos, end);
- pos = end;
- }
-};
-const readBytes = async function* (iterable, chunkSize) {
- for await (const chunk of readStream(iterable)) {
- yield* streamChunk(chunk, chunkSize);
- }
-};
-const readStream = async function* (stream) {
- if (stream[Symbol.asyncIterator]) {
- yield* stream;
- return;
}
- const reader = stream.getReader();
- try {
- for (;;) {
- const { done, value } = await reader.read();
- if (done) {
- break;
- }
- yield value;
- }
- } finally {
- await reader.cancel();
- }
-};
-const trackStream = (stream, chunkSize, onProgress, onFinish) => {
- const iterator = readBytes(stream, chunkSize);
- let bytes = 0;
- let done;
- let _onFinish = (e) => {
- if (!done) {
- done = true;
- onFinish && onFinish(e);
- }
- };
- return new ReadableStream({
- async pull(controller) {
- try {
- const { done, value } = await iterator.next();
- if (done) {
- _onFinish();
- controller.close();
- return;
- }
- let len = value.byteLength;
- if (onProgress) {
- let loadedBytes = bytes += len;
- onProgress(loadedBytes);
- }
- controller.enqueue(new Uint8Array(value));
- } catch (err) {
- _onFinish(err);
- throw err;
- }
- },
- cancel(reason) {
- _onFinish(reason);
- return iterator.return();
- }
- }, { highWaterMark: 2 });
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/adapters/fetch.js
-const DEFAULT_CHUNK_SIZE = 64 * 1024;
-const { isFunction: isFunction$2 } = utils_default;
-const globalFetchAPI = (({ Request, Response }) => ({
- Request,
- Response
-}))(utils_default.global);
-const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$2 } = utils_default.global;
-const test = (fn, ...args) => {
- try {
- return !!fn(...args);
- } catch (e) {
- return false;
- }
-};
-const factory = (env) => {
- env = utils_default.merge.call({ skipUndefined: true }, globalFetchAPI, env);
- const { fetch: envFetch, Request, Response } = env;
- const isFetchSupported = envFetch ? isFunction$2(envFetch) : typeof fetch === "function";
- const isRequestSupported = isFunction$2(Request);
- const isResponseSupported = isFunction$2(Response);
- if (!isFetchSupported) {
- return false;
- }
- const isReadableStreamSupported = isFetchSupported && isFunction$2(ReadableStream$1);
- const encodeText = isFetchSupported && (typeof TextEncoder$2 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder$2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
- const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
- let duplexAccessed = false;
- const hasContentType = new Request(platform_default.origin, {
- body: new ReadableStream$1(),
- method: "POST",
- get duplex() {
- duplexAccessed = true;
- return "half";
- }
- }).headers.has("Content-Type");
- return duplexAccessed && !hasContentType;
- });
- const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
- const resolvers = { stream: supportsResponseStream && ((res) => res.body) };
- isFetchSupported && (() => {
- [
- "text",
- "arrayBuffer",
- "blob",
- "formData",
- "stream"
- ].forEach((type) => {
- !resolvers[type] && (resolvers[type] = (res, config) => {
- let method = res && res[type];
- if (method) {
- return method.call(res);
- }
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
- });
- });
- })();
- const getBodyLength = async (body) => {
- if (body == null) {
- return 0;
- }
- if (utils_default.isBlob(body)) {
- return body.size;
- }
- if (utils_default.isSpecCompliantForm(body)) {
- const _request = new Request(platform_default.origin, {
- method: "POST",
- body
- });
- return (await _request.arrayBuffer()).byteLength;
- }
- if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
- return body.byteLength;
- }
- if (utils_default.isURLSearchParams(body)) {
- body = body + "";
- }
- if (utils_default.isString(body)) {
- return (await encodeText(body)).byteLength;
- }
- };
- const resolveBodyLength = async (headers, body) => {
- const length = utils_default.toFiniteNumber(headers.getContentLength());
- return length == null ? getBodyLength(body) : length;
- };
- return async (config) => {
- let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions } = resolveConfig_default(config);
- let _fetch = envFetch || fetch;
- responseType = responseType ? (responseType + "").toLowerCase() : "text";
- let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
- let request = null;
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
- composedSignal.unsubscribe();
- });
- let requestContentLength;
- try {
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
- let _request = new Request(url, {
- method: "POST",
- body: data,
- duplex: "half"
- });
- let contentTypeHeader;
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
- headers.setContentType(contentTypeHeader);
- }
- if (_request.body) {
- const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
- }
- }
- if (!utils_default.isString(withCredentials)) {
- withCredentials = withCredentials ? "include" : "omit";
- }
- const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
- const resolvedOptions = {
- ...fetchOptions,
- signal: composedSignal,
- method: method.toUpperCase(),
- headers: headers.normalize().toJSON(),
- body: data,
- duplex: "half",
- credentials: isCredentialsSupported ? withCredentials : undefined
- };
- request = isRequestSupported && new Request(url, resolvedOptions);
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
- const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
- const options = {};
- [
- "status",
- "statusText",
- "headers"
- ].forEach((prop) => {
- options[prop] = response[prop];
- });
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
- response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
- flush && flush();
- unsubscribe && unsubscribe();
- }), options);
- }
- responseType = responseType || "text";
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
- !isStreamResponse && unsubscribe && unsubscribe();
- return await new Promise((resolve, reject) => {
- settle(resolve, reject, {
- data: responseData,
- headers: AxiosHeaders$1.from(response.headers),
- status: response.status,
- statusText: response.statusText,
- config,
- request
- });
- });
- } catch (err) {
- unsubscribe && unsubscribe();
- if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
- throw Object.assign(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request), { cause: err.cause || err });
- }
- throw AxiosError$1.from(err, err && err.code, config, request);
- }
- };
-};
-const seedCache = new Map();
-const getFetch = (config) => {
- let env = config ? config.env : {};
- const { fetch, Request, Response } = env;
- const seeds = [
- Request,
- Response,
- fetch
- ];
- let len = seeds.length, i = len, seed, target, map = seedCache;
- while (i--) {
- seed = seeds[i];
- target = map.get(seed);
- target === undefined && map.set(seed, target = i ? new Map() : factory(env));
- map = target;
- }
- return target;
-};
-const adapter$1 = getFetch();
-
-//#endregion
-//#region ../node_modules/axios/lib/adapters/adapters.js
-const knownAdapters = {
- http: http_default,
- xhr: xhr_default,
- fetch: { get: getFetch }
-};
-utils_default.forEach(knownAdapters, (fn, value) => {
- if (fn) {
- try {
- Object.defineProperty(fn, "name", { value });
- } catch (e) {}
- Object.defineProperty(fn, "adapterName", { value });
- }
-});
-const renderReason = (reason) => `- ${reason}`;
-const isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
-var adapters_default = {
- getAdapter: (adapters, config) => {
- adapters = utils_default.isArray(adapters) ? adapters : [adapters];
- const { length } = adapters;
- let nameOrAdapter;
- let adapter;
- const rejectedReasons = {};
- for (let i = 0; i < length; i++) {
- nameOrAdapter = adapters[i];
- let id;
- adapter = nameOrAdapter;
- if (!isResolvedHandle(nameOrAdapter)) {
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
- if (adapter === undefined) {
- throw new AxiosError$1(`Unknown adapter '${id}'`);
- }
- }
- if (adapter && (utils_default.isFunction(adapter) || (adapter = adapter.get(config)))) {
- break;
- }
- rejectedReasons[id || "#" + i] = adapter;
- }
- if (!adapter) {
- const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
- let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
- throw new AxiosError$1(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
- }
- return adapter;
- },
- adapters: knownAdapters
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/core/dispatchRequest.js
-/**
-* Throws a `CanceledError` if cancellation has been requested.
-*
-* @param {Object} config The config that is to be used for the request
-*
-* @returns {void}
-*/
-function throwIfCancellationRequested(config) {
- if (config.cancelToken) {
- config.cancelToken.throwIfRequested();
- }
- if (config.signal && config.signal.aborted) {
- throw new CanceledError$1(null, config);
- }
-}
-/**
-* Dispatch a request to the server using the configured adapter.
-*
-* @param {object} config The config that is to be used for the request
-*
-* @returns {Promise} The Promise to be fulfilled
-*/
-function dispatchRequest(config) {
- throwIfCancellationRequested(config);
- config.headers = AxiosHeaders$1.from(config.headers);
- config.data = transformData.call(config, config.transformRequest);
- if ([
- "post",
- "put",
- "patch"
- ].indexOf(config.method) !== -1) {
- config.headers.setContentType("application/x-www-form-urlencoded", false);
- }
- const adapter = adapters_default.getAdapter(config.adapter || defaults$1.adapter, config);
- return adapter(config).then(function onAdapterResolution(response) {
- throwIfCancellationRequested(config);
- response.data = transformData.call(config, config.transformResponse, response);
- response.headers = AxiosHeaders$1.from(response.headers);
- return response;
- }, function onAdapterRejection(reason) {
- if (!isCancel$1(reason)) {
- throwIfCancellationRequested(config);
- if (reason && reason.response) {
- reason.response.data = transformData.call(config, config.transformResponse, reason.response);
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
- }
- }
- return Promise.reject(reason);
- });
-}
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/validator.js
-const validators$1 = {};
-[
- "object",
- "boolean",
- "number",
- "function",
- "string",
- "symbol"
-].forEach((type, i) => {
- validators$1[type] = function validator(thing) {
- return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
- };
-});
-const deprecatedWarnings = {};
-/**
-* Transitional option validator
-*
-* @param {function|boolean?} validator - set to false if the transitional option has been removed
-* @param {string?} version - deprecated version / removed since version
-* @param {string?} message - some message with additional info
-*
-* @returns {function}
-*/
-validators$1.transitional = function transitional(validator, version, message) {
- function formatMessage(opt, desc) {
- return "[Axios v" + VERSION$2 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
- }
- return (value, opt, opts) => {
- if (validator === false) {
- throw new AxiosError$1(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError$1.ERR_DEPRECATED);
- }
- if (version && !deprecatedWarnings[opt]) {
- deprecatedWarnings[opt] = true;
- console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
- }
- return validator ? validator(value, opt, opts) : true;
- };
-};
-validators$1.spelling = function spelling(correctSpelling) {
- return (value, opt) => {
- console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
- return true;
- };
-};
-/**
-* Assert object's properties type
-*
-* @param {object} options
-* @param {object} schema
-* @param {boolean?} allowUnknown
-*
-* @returns {object}
-*/
-function assertOptions(options, schema, allowUnknown) {
- if (typeof options !== "object") {
- throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
- }
- const keys = Object.keys(options);
- let i = keys.length;
- while (i-- > 0) {
- const opt = keys[i];
- const validator = schema[opt];
- if (validator) {
- const value = options[opt];
- const result = value === undefined || validator(value, opt, options);
- if (result !== true) {
- throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
- }
- continue;
- }
- if (allowUnknown !== true) {
- throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
- }
- }
-}
-var validator_default = {
- assertOptions,
- validators: validators$1
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/core/Axios.js
-const validators = validator_default.validators;
-/**
-* Create a new instance of Axios
-*
-* @param {Object} instanceConfig The default config for the instance
-*
-* @return {Axios} A new instance of Axios
-*/
-var Axios$1 = class {
- constructor(instanceConfig) {
- this.defaults = instanceConfig || {};
- this.interceptors = {
- request: new InterceptorManager(),
- response: new InterceptorManager()
- };
- }
- /**
- * Dispatch a request
- *
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
- * @param {?Object} config
- *
- * @returns {Promise} The Promise to be fulfilled
- */
- async request(configOrUrl, config) {
- try {
- return await this._request(configOrUrl, config);
- } catch (err) {
- if (err instanceof Error) {
- let dummy = {};
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
- try {
- if (!err.stack) {
- err.stack = stack;
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
- err.stack += "\n" + stack;
- }
- } catch (e) {}
- }
- throw err;
- }
- }
- _request(configOrUrl, config) {
- if (typeof configOrUrl === "string") {
- config = config || {};
- config.url = configOrUrl;
- } else {
- config = configOrUrl || {};
- }
- config = mergeConfig$1(this.defaults, config);
- const { transitional, paramsSerializer, headers } = config;
- if (transitional !== undefined) {
- validator_default.assertOptions(transitional, {
- silentJSONParsing: validators.transitional(validators.boolean),
- forcedJSONParsing: validators.transitional(validators.boolean),
- clarifyTimeoutError: validators.transitional(validators.boolean)
- }, false);
- }
- if (paramsSerializer != null) {
- if (utils_default.isFunction(paramsSerializer)) {
- config.paramsSerializer = { serialize: paramsSerializer };
- } else {
- validator_default.assertOptions(paramsSerializer, {
- encode: validators.function,
- serialize: validators.function
- }, true);
- }
- }
- if (config.allowAbsoluteUrls !== undefined) {} else if (this.defaults.allowAbsoluteUrls !== undefined) {
- config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
- } else {
- config.allowAbsoluteUrls = true;
- }
- validator_default.assertOptions(config, {
- baseUrl: validators.spelling("baseURL"),
- withXsrfToken: validators.spelling("withXSRFToken")
- }, true);
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
- let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
- headers && utils_default.forEach([
- "delete",
- "get",
- "head",
- "post",
- "put",
- "patch",
- "common"
- ], (method) => {
- delete headers[method];
- });
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
- const requestInterceptorChain = [];
- let synchronousRequestInterceptors = true;
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
- if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
- return;
- }
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
- });
- const responseInterceptorChain = [];
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
- });
- let promise;
- let i = 0;
- let len;
- if (!synchronousRequestInterceptors) {
- const chain = [dispatchRequest.bind(this), undefined];
- chain.unshift(...requestInterceptorChain);
- chain.push(...responseInterceptorChain);
- len = chain.length;
- promise = Promise.resolve(config);
- while (i < len) {
- promise = promise.then(chain[i++], chain[i++]);
- }
- return promise;
- }
- len = requestInterceptorChain.length;
- let newConfig = config;
- while (i < len) {
- const onFulfilled = requestInterceptorChain[i++];
- const onRejected = requestInterceptorChain[i++];
- try {
- newConfig = onFulfilled(newConfig);
- } catch (error) {
- onRejected.call(this, error);
- break;
- }
- }
- try {
- promise = dispatchRequest.call(this, newConfig);
- } catch (error) {
- return Promise.reject(error);
- }
- i = 0;
- len = responseInterceptorChain.length;
- while (i < len) {
- promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
- }
- return promise;
- }
- getUri(config) {
- config = mergeConfig$1(this.defaults, config);
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
- return buildURL(fullPath, config.params, config.paramsSerializer);
- }
-};
-utils_default.forEach([
- "delete",
- "get",
- "head",
- "options"
-], function forEachMethodNoData(method) {
- Axios$1.prototype[method] = function(url, config) {
- return this.request(mergeConfig$1(config || {}, {
- method,
- url,
- data: (config || {}).data
- }));
- };
-});
-utils_default.forEach([
- "post",
- "put",
- "patch"
-], function forEachMethodWithData(method) {
- function generateHTTPMethod(isForm) {
- return function httpMethod(url, data, config) {
- return this.request(mergeConfig$1(config || {}, {
- method,
- headers: isForm ? { "Content-Type": "multipart/form-data" } : {},
- url,
- data
- }));
- };
- }
- Axios$1.prototype[method] = generateHTTPMethod();
- Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
-});
-
-//#endregion
-//#region ../node_modules/axios/lib/cancel/CancelToken.js
-/**
-* A `CancelToken` is an object that can be used to request cancellation of an operation.
-*
-* @param {Function} executor The executor function.
-*
-* @returns {CancelToken}
-*/
-var CancelToken$1 = class CancelToken$1 {
- constructor(executor) {
- if (typeof executor !== "function") {
- throw new TypeError("executor must be a function.");
- }
- let resolvePromise;
- this.promise = new Promise(function promiseExecutor(resolve) {
- resolvePromise = resolve;
- });
- const token = this;
- this.promise.then((cancel) => {
- if (!token._listeners) return;
- let i = token._listeners.length;
- while (i-- > 0) {
- token._listeners[i](cancel);
- }
- token._listeners = null;
- });
- this.promise.then = (onfulfilled) => {
- let _resolve;
- const promise = new Promise((resolve) => {
- token.subscribe(resolve);
- _resolve = resolve;
- }).then(onfulfilled);
- promise.cancel = function reject() {
- token.unsubscribe(_resolve);
- };
- return promise;
- };
- executor(function cancel(message, config, request) {
- if (token.reason) {
- return;
- }
- token.reason = new CanceledError$1(message, config, request);
- resolvePromise(token.reason);
- });
- }
- /**
- * Throws a `CanceledError` if cancellation has been requested.
- */
- throwIfRequested() {
- if (this.reason) {
- throw this.reason;
- }
- }
- /**
- * Subscribe to the cancel signal
- */
- subscribe(listener) {
- if (this.reason) {
- listener(this.reason);
- return;
- }
- if (this._listeners) {
- this._listeners.push(listener);
- } else {
- this._listeners = [listener];
- }
- }
- /**
- * Unsubscribe from the cancel signal
- */
- unsubscribe(listener) {
- if (!this._listeners) {
- return;
- }
- const index = this._listeners.indexOf(listener);
- if (index !== -1) {
- this._listeners.splice(index, 1);
- }
- }
- toAbortSignal() {
- const controller = new AbortController();
- const abort = (err) => {
- controller.abort(err);
- };
- this.subscribe(abort);
- controller.signal.unsubscribe = () => this.unsubscribe(abort);
- return controller.signal;
- }
- /**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
- static source() {
- let cancel;
- const token = new CancelToken$1(function executor(c) {
- cancel = c;
- });
- return {
- token,
- cancel
- };
- }
-};
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/spread.js
-/**
-* Syntactic sugar for invoking a function and expanding an array for arguments.
-*
-* Common use case would be to use `Function.prototype.apply`.
-*
-* ```js
-* function f(x, y, z) {}
-* var args = [1, 2, 3];
-* f.apply(null, args);
-* ```
-*
-* With `spread` this example can be re-written.
-*
-* ```js
-* spread(function(x, y, z) {})([1, 2, 3]);
-* ```
-*
-* @param {Function} callback
-*
-* @returns {Function}
-*/
-function spread$1(callback) {
- return function wrap(arr) {
- return callback.apply(null, arr);
- };
-}
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/isAxiosError.js
-/**
-* Determines whether the payload is an error thrown by Axios
-*
-* @param {*} payload The value to test
-*
-* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
-*/
-function isAxiosError$1(payload) {
- return utils_default.isObject(payload) && payload.isAxiosError === true;
-}
-
-//#endregion
-//#region ../node_modules/axios/lib/helpers/HttpStatusCode.js
-const HttpStatusCode$1 = {
- Continue: 100,
- SwitchingProtocols: 101,
- Processing: 102,
- EarlyHints: 103,
- Ok: 200,
- Created: 201,
- Accepted: 202,
- NonAuthoritativeInformation: 203,
- NoContent: 204,
- ResetContent: 205,
- PartialContent: 206,
- MultiStatus: 207,
- AlreadyReported: 208,
- ImUsed: 226,
- MultipleChoices: 300,
- MovedPermanently: 301,
- Found: 302,
- SeeOther: 303,
- NotModified: 304,
- UseProxy: 305,
- Unused: 306,
- TemporaryRedirect: 307,
- PermanentRedirect: 308,
- BadRequest: 400,
- Unauthorized: 401,
- PaymentRequired: 402,
- Forbidden: 403,
- NotFound: 404,
- MethodNotAllowed: 405,
- NotAcceptable: 406,
- ProxyAuthenticationRequired: 407,
- RequestTimeout: 408,
- Conflict: 409,
- Gone: 410,
- LengthRequired: 411,
- PreconditionFailed: 412,
- PayloadTooLarge: 413,
- UriTooLong: 414,
- UnsupportedMediaType: 415,
- RangeNotSatisfiable: 416,
- ExpectationFailed: 417,
- ImATeapot: 418,
- MisdirectedRequest: 421,
- UnprocessableEntity: 422,
- Locked: 423,
- FailedDependency: 424,
- TooEarly: 425,
- UpgradeRequired: 426,
- PreconditionRequired: 428,
- TooManyRequests: 429,
- RequestHeaderFieldsTooLarge: 431,
- UnavailableForLegalReasons: 451,
- InternalServerError: 500,
- NotImplemented: 501,
- BadGateway: 502,
- ServiceUnavailable: 503,
- GatewayTimeout: 504,
- HttpVersionNotSupported: 505,
- VariantAlsoNegotiates: 506,
- InsufficientStorage: 507,
- LoopDetected: 508,
- NotExtended: 510,
- NetworkAuthenticationRequired: 511
-};
-Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
- HttpStatusCode$1[value] = key;
-});
-
-//#endregion
-//#region ../node_modules/axios/lib/axios.js
-/**
-* Create an instance of Axios
-*
-* @param {Object} defaultConfig The default config for the instance
-*
-* @returns {Axios} A new instance of Axios
-*/
-function createInstance$1(defaultConfig) {
- const context = new Axios$1(defaultConfig);
- const instance = bind$1(Axios$1.prototype.request, context);
- utils_default.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
- utils_default.extend(instance, context, null, { allOwnKeys: true });
- instance.create = function create(instanceConfig) {
- return createInstance$1(mergeConfig$1(defaultConfig, instanceConfig));
- };
- return instance;
-}
-const axios$1 = createInstance$1(defaults$1);
-axios$1.Axios = Axios$1;
-axios$1.CanceledError = CanceledError$1;
-axios$1.CancelToken = CancelToken$1;
-axios$1.isCancel = isCancel$1;
-axios$1.VERSION = VERSION$2;
-axios$1.toFormData = toFormData$1;
-axios$1.AxiosError = AxiosError$1;
-axios$1.Cancel = axios$1.CanceledError;
-axios$1.all = function all(promises) {
- return Promise.all(promises);
-};
-axios$1.spread = spread$1;
-axios$1.isAxiosError = isAxiosError$1;
-axios$1.mergeConfig = mergeConfig$1;
-axios$1.AxiosHeaders = AxiosHeaders$1;
-axios$1.formToJSON = (thing) => formDataToJSON(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
-axios$1.getAdapter = adapters_default.getAdapter;
-axios$1.HttpStatusCode = HttpStatusCode$1;
-axios$1.default = axios$1;
-
-//#endregion
-//#region ../node_modules/axios/index.js
-const { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION: VERSION$1, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios$1;
-
-//#endregion
-//#region ../utils/ai/SparkAI.js
-/**
-* SparkAI 客户端 - 讯飞星火认知大模型接口封装
-*
-* 功能说明:
-* - 封装讯飞星火认知大模型的 API 调用
-* - 支持多用户上下文管理
-* - 自动维护对话历史记录
-* - 提供简洁的问答接口
-*
-* 相关链接:
-* - 服务控制台: https://console.xfyun.cn/services/bm4
-* - 私有数据集: https://xinghuo.xfyun.cn/botcenter/private-dataset
-*/
-/**
-* SparkAI 客户端类
-*
-* @class SparkAI
-* @description 提供与讯飞星火认知大模型服务的交互接口,支持多用户上下文管理
-*/
-var SparkAI = class {
- /**
- * 构造函数
- *
- * @param {Object} config - 配置对象
- * @param {string} config.authKey - 讯飞星火的认证密钥(必需)
- * @param {string} [config.baseURL='https://spark-api-open.xf-yun.com'] - API 基础地址
- * @throws {Error} 当缺少必需的 authKey 参数时抛出错误
- */
- constructor({ authKey, baseURL }) {
- if (!authKey) {
- throw new Error("Missing required configuration parameters.");
- }
- /** @type {string} 认证密钥 */
- this.authKey = authKey;
- /** @type {string} API 基础地址 */
- this.baseURL = baseURL || "https://spark-api-open.xf-yun.com";
- /** @type {Object} 存储每个用户的对话上下文 */
- this.userContexts = {};
- }
- /**
- * 初始化用户上下文
- *
- * @param {string} userId - 用户唯一标识符
- * @description 为新用户创建初始对话上下文,包含系统提示词
- */
- initUserContext(userId) {
- if (!this.userContexts[userId]) {
- this.userContexts[userId] = [{
- role: "system",
- content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
- }];
- }
- }
- /**
- * 更新用户上下文
- *
- * @param {string} userId - 用户唯一标识符
- * @param {Object} message - 要添加的消息对象
- * @param {string} message.role - 消息角色('user' 或 'assistant')
- * @param {string} message.content - 消息内容
- * @description 将新消息添加到用户上下文中,并自动管理上下文长度(最多保留20条消息)
- */
- updateUserContext(userId, message) {
- this.userContexts[userId].push(message);
- if (this.userContexts[userId].length > 20) {
- const systemMessage = this.userContexts[userId][0];
- const recentMessages = this.userContexts[userId].slice(-19);
- this.userContexts[userId] = [systemMessage, ...recentMessages];
- }
- }
- /**
- * 向讯飞星火 AI 发送问题并获取回答
- *
- * @param {string} userId - 用户唯一标识符
- * @param {string} prompt - 用户的问题或提示
- * @param {Object} [options={}] - 可选参数
- * @param {number} [options.temperature] - 回答的随机性(0-1)
- * @param {number} [options.max_tokens] - 最大回答长度
- * @param {string} [options.model] - 使用的模型名称
- * @param {number} [options.top_p] - 核采样参数
- * @returns {Promise} AI 的回答内容
- * @throws {Error} 当 API 调用失败时抛出错误
- *
- * @example
- * const sparkAI = new SparkAI({ authKey: 'your-auth-key' });
- * const answer = await sparkAI.ask('user123', '请介绍一下人工智能的发展历程');
- * console.log(answer);
- */
- async ask(userId, prompt, options = {}) {
- this.initUserContext(userId);
- const payload = {
- model: options.model || "4.0Ultra",
- messages: this.userContexts[userId].concat([{
- role: "user",
- content: prompt
- }]),
- ...options
- };
- console.log("SparkAI API Request Payload:", payload);
- try {
- const response = await axios$1.post(`${this.baseURL}/v1/chat/completions`, payload, { headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${this.authKey}`
- } });
- if (response.data && response.data.choices && response.data.choices.length > 0) {
- const assistantMessage = response.data.choices[0].message;
- this.updateUserContext(userId, assistantMessage);
- return assistantMessage.content;
- } else {
- throw new Error(`Error from Spark AI: ${response.data.error || "No valid response received"}`);
- }
- } catch (error) {
- console.error("Error while communicating with Spark AI:", error.message);
- if (error.response) {
- const errorMsg = error.response.data?.error?.message || error.response.statusText;
- throw new Error(`Spark AI API Error (${error.response.status}): ${errorMsg}`);
- }
- throw error;
- }
- }
-};
-
-//#endregion
-//#region ../utils/ai/DeepSeek.js
-/**
-* DeepSeek AI 客户端 - DeepSeek AI 接口封装
-*
-* 功能说明:
-* - 封装 DeepSeek AI 的 API 调用
-* - 支持多用户上下文管理
-* - 自动维护对话历史记录
-* - 提供简洁的问答接口
-*
-* 相关链接:
-* - 使用统计: https://platform.deepseek.com/usage
-* - API Keys: https://platform.deepseek.com/api_keys
-*/
-/**
-* DeepSeek AI 客户端类
-*
-* @class DeepSeek
-* @description 提供与 DeepSeek AI 服务的交互接口,支持多用户上下文管理
-*/
-var DeepSeek = class {
- /**
- * 构造函数
- *
- * @param {Object} config - 配置对象
- * @param {string} config.apiKey - DeepSeek AI 的 API 密钥(必需)
- * @param {string} [config.baseURL='https://api.deepseek.com'] - API 基础地址
- * @throws {Error} 当缺少必需的 apiKey 参数时抛出错误
- */
- constructor({ apiKey, baseURL }) {
- if (!apiKey) {
- throw new Error("Missing required configuration parameters.");
- }
- /** @type {string} API 密钥 */
- this.apiKey = apiKey;
- /** @type {string} API 基础地址 */
- this.baseURL = baseURL || "https://api.deepseek.com";
- /** @type {Object} 存储每个用户的对话上下文 */
- this.userContexts = {};
- }
- /**
- * 初始化用户上下文
- *
- * @param {string} userId - 用户唯一标识符
- * @description 为新用户创建初始对话上下文,包含系统提示词
- */
- initUserContext(userId) {
- if (!this.userContexts[userId]) {
- this.userContexts[userId] = [{
- role: "system",
- content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
- }];
- }
- }
- /**
- * 更新用户上下文
- *
- * @param {string} userId - 用户唯一标识符
- * @param {Object} message - 要添加的消息对象
- * @param {string} message.role - 消息角色('user' 或 'assistant')
- * @param {string} message.content - 消息内容
- * @description 将新消息添加到用户上下文中,并自动管理上下文长度(最多保留20条消息)
- */
- updateUserContext(userId, message) {
- this.userContexts[userId].push(message);
- if (this.userContexts[userId].length > 20) {
- const systemMessage = this.userContexts[userId][0];
- const recentMessages = this.userContexts[userId].slice(-19);
- this.userContexts[userId] = [systemMessage, ...recentMessages];
- }
- }
- /**
- * 向 DeepSeek AI 发送问题并获取回答
- *
- * @param {string} userId - 用户唯一标识符
- * @param {string} prompt - 用户的问题或提示
- * @param {Object} [options={}] - 可选参数
- * @param {number} [options.temperature] - 回答的随机性(0-2)
- * @param {number} [options.max_tokens] - 最大回答长度
- * @param {string} [options.model] - 使用的模型名称
- * @param {number} [options.top_p] - 核采样参数
- * @returns {Promise} AI 的回答内容
- * @throws {Error} 当 API 调用失败时抛出错误
- *
- * @example
- * const deepseek = new DeepSeek({ apiKey: 'your-api-key' });
- * const answer = await deepseek.ask('user123', '解释一下深度学习的原理');
- * console.log(answer);
- */
- async ask(userId, prompt, options = {}) {
- this.initUserContext(userId);
- const payload = {
- model: options.model || "deepseek-chat",
- messages: this.userContexts[userId].concat([{
- role: "user",
- content: prompt
- }]),
- ...options
- };
- console.log("DeepSeek API Request Payload:", payload);
- try {
- const response = await axios$1.post(`${this.baseURL}/chat/completions`, payload, { headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${this.apiKey}`
- } });
- if (response.data && response.data.choices && response.data.choices.length > 0) {
- const assistantMessage = response.data.choices[0].message;
- this.updateUserContext(userId, assistantMessage);
- return assistantMessage.content;
- } else {
- throw new Error(`Error from DeepSeek AI: ${response.data.error || "No valid response received"}`);
- }
- } catch (error) {
- console.error("Error while communicating with DeepSeek AI:", error.message);
- if (error.response) {
- const errorMsg = error.response.data?.error?.message || error.response.statusText;
- throw new Error(`DeepSeek AI API Error (${error.response.status}): ${errorMsg}`);
- }
- throw error;
- }
- }
-};
-
-//#endregion
-//#region ../utils/ai/SparkAIBot.js
-var SparkAIBot = class {
- constructor(appId, uid, assistantId, apiKey) {
- if (!appId || !assistantId) {
- throw new Error("Missing required configuration parameters.");
- }
- this.appId = appId;
- this.uid = uid || "道长";
- this.assistantId = assistantId;
- this.apiKey = apiKey;
- this.wsUrl = `wss://spark-openapi.cn-huabei-1.xf-yun.com/v1/assistants/${assistantId}`;
- this.userContexts = {};
- }
- generateSignature() {
- const timestamp = Math.floor(Date.now() / 1e3);
- const signature = `${this.appId}${timestamp}${this.apiKey}`;
- const hash = crypto$1.createHash("sha256");
- hash.update(signature);
- return hash.digest("hex");
- }
- initUserContext(userId) {
- if (!this.userContexts[userId]) {
- this.userContexts[userId] = [{
- role: "system",
- content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
- }];
- }
- }
- updateUserContext(userId, message) {
- this.userContexts[userId].push(message);
- if (this.userContexts[userId].length > 20) {
- this.userContexts[userId] = this.userContexts[userId].slice(-20);
- }
- }
- connectToAssistant() {
- const ws = new wrapper_default(this.wsUrl, { headers: {
- "x-signature": this.generateSignature(),
- "x-app-id": this.appId
- } });
- ws.on("open", () => {});
- return ws;
- }
- sendMessage(ws, userId, prompt) {
- const requestPayload = {
- header: {
- app_id: this.appId,
- uid: userId
- },
- parameter: { chat: {
- domain: "general",
- temperature: .5,
- top_k: 4,
- max_tokens: 2028
- } },
- payload: { message: { text: this.userContexts[userId].concat([{
- role: "user",
- content: prompt
- }]) } }
- };
- ws.send(JSON.stringify(requestPayload));
- }
- ask(userId, prompt) {
- return new Promise((resolve, reject) => {
- this.initUserContext(userId);
- const ws = this.connectToAssistant();
- let fullResponse = "";
- ws.on("message", (data) => {
- const response = JSON.parse(data);
- if (response && response.payload && response.payload.choices) {
- response.payload.choices.text.forEach((choice) => {
- fullResponse += choice.content;
- });
- }
- });
- ws.on("open", () => {
- this.sendMessage(ws, userId, prompt);
- });
- ws.on("close", () => {
- this.updateUserContext(userId, {
- role: "assistant",
- content: fullResponse
- });
- resolve(fullResponse);
- });
- ws.on("error", (error) => {
- console.error("WebSocket error:", error);
- reject(error);
- });
- });
- }
-};
-
-//#endregion
-//#region ../utils/ai/Kimi.js
-/**
-* Kimi AI 客户端 - 月之暗面 Moonshot AI 接口封装
-*
-* 功能说明:
-* - 封装 Moonshot AI (Kimi) 的 API 调用
-* - 支持多用户上下文管理
-* - 自动维护对话历史记录
-* - 提供简洁的问答接口
-*
-* 相关链接:
-* - API Keys: https://platform.moonshot.cn/console/api-keys
-* - 使用限制: https://platform.moonshot.cn/console/limits
-*/
-/**
-* Kimi AI 客户端类
-*
-* @class Kimi
-* @description 提供与 Moonshot AI 服务的交互接口,支持多用户上下文管理
-*/
-var Kimi = class {
- /**
- * 构造函数
- *
- * @param {Object} config - 配置对象
- * @param {string} config.apiKey - Moonshot AI 的 API 密钥(必需)
- * @param {string} [config.baseURL='https://api.moonshot.cn/v1'] - API 基础地址
- * @throws {Error} 当缺少必需的 apiKey 参数时抛出错误
- */
- constructor({ apiKey, baseURL }) {
- if (!apiKey) {
- throw new Error("Missing required configuration parameters.");
- }
- /** @type {string} API 密钥 */
- this.apiKey = apiKey;
- /** @type {string} API 基础地址 */
- this.baseURL = baseURL || "https://api.moonshot.cn/v1";
- /** @type {Object} 存储每个用户的对话上下文 */
- this.userContexts = {};
- }
- /**
- * 初始化用户上下文
- *
- * @param {string} userId - 用户唯一标识符
- * @description 为新用户创建初始对话上下文,包含系统提示词
- */
- initUserContext(userId) {
- if (!this.userContexts[userId]) {
- this.userContexts[userId] = [{
- role: "system",
- content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
- }];
- }
- }
- /**
- * 更新用户上下文
- *
- * @param {string} userId - 用户唯一标识符
- * @param {Object} message - 要添加的消息对象
- * @param {string} message.role - 消息角色('user' 或 'assistant')
- * @param {string} message.content - 消息内容
- * @description 将新消息添加到用户上下文中,并自动管理上下文长度(最多保留20条消息)
- */
- updateUserContext(userId, message) {
- this.userContexts[userId].push(message);
- if (this.userContexts[userId].length > 20) {
- const systemMessage = this.userContexts[userId][0];
- const recentMessages = this.userContexts[userId].slice(-19);
- this.userContexts[userId] = [systemMessage, ...recentMessages];
- }
- }
- /**
- * 向 Kimi AI 发送问题并获取回答
- *
- * @param {string} userId - 用户唯一标识符
- * @param {string} prompt - 用户的问题或提示
- * @param {Object} [options={}] - 可选参数
- * @param {number} [options.temperature] - 回答的随机性(0-1)
- * @param {number} [options.max_tokens] - 最大回答长度
- * @param {string} [options.model] - 使用的模型名称
- * @returns {Promise} AI 的回答内容
- * @throws {Error} 当 API 调用失败时抛出错误
- *
- * @example
- * const kimi = new Kimi({ apiKey: 'your-api-key' });
- * const answer = await kimi.ask('user123', '什么是人工智能?');
- * console.log(answer);
- */
- async ask(userId, prompt, options = {}) {
- this.initUserContext(userId);
- const payload = {
- model: options.model || "moonshot-v1-8k",
- messages: this.userContexts[userId].concat([{
- role: "user",
- content: prompt
- }]),
- ...options
- };
- console.log("Kimi API Request Payload:", payload);
- try {
- const response = await axios$1.post(`${this.baseURL}/chat/completions`, payload, { headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${this.apiKey}`
- } });
- if (response.data && response.data.choices && response.data.choices.length > 0) {
- const assistantMessage = response.data.choices[0].message;
- this.updateUserContext(userId, assistantMessage);
- return assistantMessage.content;
- } else {
- throw new Error(`Error from Kimi AI: ${response.data.error || "No valid response received"}`);
- }
- } catch (error) {
- console.error("Error while communicating with Kimi AI:", error.message);
- if (error.response) {
- const errorMsg = error.response.data?.error?.message || error.response.statusText;
- throw new Error(`Kimi AI API Error (${error.response.status}): ${errorMsg}`);
- }
- throw error;
- }
- }
-};
-
-//#endregion
-//#region ../utils/ais.js
-/**
-* AI服务模块集合
-* 统一导入和导出各种AI服务提供商的实现
-*
-* 支持的AI服务:
-* - SparkAI: 讯飞星火AI服务
-* - DeepSeek: DeepSeek AI服务
-* - SparkAIBot: 讯飞星火AI机器人服务
-* - Kimi: Kimi AI服务
-*
-* @example
-* import ais from './ais.js';
-* const sparkAI = new ais.SparkAI(config);
-* const response = await sparkAI.chat('你好');
-*/
-var ais_default = {
- SparkAI,
- DeepSeek,
- SparkAIBot,
- Kimi
-};
-
-//#endregion
-//#region ../node_modules/dayjs/dayjs.min.js
-var require_dayjs_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- !function(t, e) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
- }(exports, (function() {
- "use strict";
- var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
- name: "en",
- weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
- months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
- ordinal: function(t) {
- var e = [
- "th",
- "st",
- "nd",
- "rd"
- ], n = t % 100;
- return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
- }
- }, m = function(t, e, n) {
- var r = String(t);
- return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
- }, v = {
- s: m,
- z: function(t) {
- var e = -t.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), i = n % 60;
- return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
- },
- m: function t(e, n) {
- if (e.date() < n.date()) return -t(n, e);
- var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), i = e.clone().add(r, c), s = n - i < 0, u = e.clone().add(r + (s ? -1 : 1), c);
- return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
- },
- a: function(t) {
- return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
- },
- p: function(t) {
- return {
- M: c,
- y: h,
- w: o,
- d: a,
- D: d,
- h: u,
- m: s,
- s: i,
- ms: r,
- Q: f
- }[t] || String(t || "").toLowerCase().replace(/s$/, "");
- },
- u: function(t) {
- return void 0 === t;
- }
- }, g = "en", D = {};
- D[g] = M;
- var p = "$isDayjsObject", S = function(t) {
- return t instanceof _ || !(!t || !t[p]);
- }, w = function t(e, n, r) {
- var i;
- if (!e) return g;
- if ("string" == typeof e) {
- var s = e.toLowerCase();
- D[s] && (i = s), n && (D[s] = n, i = s);
- var u = e.split("-");
- if (!i && u.length > 1) return t(u[0]);
- } else {
- var a = e.name;
- D[a] = e, i = a;
- }
- return !r && i && (g = i), i || !r && g;
- }, O = function(t, e) {
- if (S(t)) return t.clone();
- var n = "object" == typeof e ? e : {};
- return n.date = t, n.args = arguments, new _(n);
- }, b = v;
- b.l = w, b.i = S, b.w = function(t, e) {
- return O(t, {
- locale: e.$L,
- utc: e.$u,
- x: e.$x,
- $offset: e.$offset
- });
- };
- var _ = function() {
- function M(t) {
- this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0;
- }
- var m = M.prototype;
- return m.parse = function(t) {
- this.$d = function(t) {
- var e = t.date, n = t.utc;
- if (null === e) return new Date(NaN);
- if (b.u(e)) return new Date();
- if (e instanceof Date) return new Date(e);
- if ("string" == typeof e && !/Z$/i.test(e)) {
- var r = e.match($);
- if (r) {
- var i = r[2] - 1 || 0, s = (r[7] || "0").substring(0, 3);
- return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
- }
- }
- return new Date(e);
- }(t), this.init();
- }, m.init = function() {
- var t = this.$d;
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
- }, m.$utils = function() {
- return b;
- }, m.isValid = function() {
- return !(this.$d.toString() === l);
- }, m.isSame = function(t, e) {
- var n = O(t);
- return this.startOf(e) <= n && n <= this.endOf(e);
- }, m.isAfter = function(t, e) {
- return O(t) < this.startOf(e);
- }, m.isBefore = function(t, e) {
- return this.endOf(e) < O(t);
- }, m.$g = function(t, e, n) {
- return b.u(t) ? this[e] : this.set(n, t);
- }, m.unix = function() {
- return Math.floor(this.valueOf() / 1e3);
- }, m.valueOf = function() {
- return this.$d.getTime();
- }, m.startOf = function(t, e) {
- var n = this, r = !!b.u(e) || e, f = b.p(t), l = function(t, e) {
- var i = b.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
- return r ? i : i.endOf(a);
- }, $ = function(t, e) {
- return b.w(n.toDate()[t].apply(n.toDate("s"), (r ? [
- 0,
- 0,
- 0,
- 0
- ] : [
- 23,
- 59,
- 59,
- 999
- ]).slice(e)), n);
- }, y = this.$W, M = this.$M, m = this.$D, v = "set" + (this.$u ? "UTC" : "");
- switch (f) {
- case h: return r ? l(1, 0) : l(31, 11);
- case c: return r ? l(1, M) : l(0, M + 1);
- case o:
- var g = this.$locale().weekStart || 0, D = (y < g ? y + 7 : y) - g;
- return l(r ? m - D : m + (6 - D), M);
- case a:
- case d: return $(v + "Hours", 0);
- case u: return $(v + "Minutes", 1);
- case s: return $(v + "Seconds", 2);
- case i: return $(v + "Milliseconds", 3);
- default: return this.clone();
- }
- }, m.endOf = function(t) {
- return this.startOf(t, !1);
- }, m.$set = function(t, e) {
- var n, o = b.p(t), f = "set" + (this.$u ? "UTC" : ""), l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[s] = f + "Minutes", n[i] = f + "Seconds", n[r] = f + "Milliseconds", n)[o], $ = o === a ? this.$D + (e - this.$W) : e;
- if (o === c || o === h) {
- var y = this.clone().set(d, 1);
- y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
- } else l && this.$d[l]($);
- return this.init(), this;
- }, m.set = function(t, e) {
- return this.clone().$set(t, e);
- }, m.get = function(t) {
- return this[b.p(t)]();
- }, m.add = function(r, f) {
- var d, l = this;
- r = Number(r);
- var $ = b.p(f), y = function(t) {
- var e = O(l);
- return b.w(e.date(e.date() + Math.round(t * r)), l);
- };
- if ($ === c) return this.set(c, this.$M + r);
- if ($ === h) return this.set(h, this.$y + r);
- if ($ === a) return y(1);
- if ($ === o) return y(7);
- var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1, m = this.$d.getTime() + r * M;
- return b.w(m, this);
- }, m.subtract = function(t, e) {
- return this.add(-1 * t, e);
- }, m.format = function(t) {
- var e = this, n = this.$locale();
- if (!this.isValid()) return n.invalidDate || l;
- var r = t || "YYYY-MM-DDTHH:mm:ssZ", i = b.z(this), s = this.$H, u = this.$m, a = this.$M, o = n.weekdays, c = n.months, f = n.meridiem, h = function(t, n, i, s) {
- return t && (t[n] || t(e, r)) || i[n].slice(0, s);
- }, d = function(t) {
- return b.s(s % 12 || 12, t, "0");
- }, $ = f || function(t, e, n) {
- var r = t < 12 ? "AM" : "PM";
- return n ? r.toLowerCase() : r;
- };
- return r.replace(y, (function(t, r) {
- return r || function(t) {
- switch (t) {
- case "YY": return String(e.$y).slice(-2);
- case "YYYY": return b.s(e.$y, 4, "0");
- case "M": return a + 1;
- case "MM": return b.s(a + 1, 2, "0");
- case "MMM": return h(n.monthsShort, a, c, 3);
- case "MMMM": return h(c, a);
- case "D": return e.$D;
- case "DD": return b.s(e.$D, 2, "0");
- case "d": return String(e.$W);
- case "dd": return h(n.weekdaysMin, e.$W, o, 2);
- case "ddd": return h(n.weekdaysShort, e.$W, o, 3);
- case "dddd": return o[e.$W];
- case "H": return String(s);
- case "HH": return b.s(s, 2, "0");
- case "h": return d(1);
- case "hh": return d(2);
- case "a": return $(s, u, !0);
- case "A": return $(s, u, !1);
- case "m": return String(u);
- case "mm": return b.s(u, 2, "0");
- case "s": return String(e.$s);
- case "ss": return b.s(e.$s, 2, "0");
- case "SSS": return b.s(e.$ms, 3, "0");
- case "Z": return i;
- }
- return null;
- }(t) || i.replace(":", "");
- }));
- }, m.utcOffset = function() {
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
- }, m.diff = function(r, d, l) {
- var $, y = this, M = b.p(d), m = O(r), v = (m.utcOffset() - this.utcOffset()) * e, g = this - m, D = function() {
- return b.m(y, m);
- };
- switch (M) {
- case h:
- $ = D() / 12;
- break;
- case c:
- $ = D();
- break;
- case f:
- $ = D() / 3;
- break;
- case o:
- $ = (g - v) / 6048e5;
- break;
- case a:
- $ = (g - v) / 864e5;
- break;
- case u:
- $ = g / n;
- break;
- case s:
- $ = g / e;
- break;
- case i:
- $ = g / t;
- break;
- default: $ = g;
- }
- return l ? $ : b.a($);
- }, m.daysInMonth = function() {
- return this.endOf(c).$D;
- }, m.$locale = function() {
- return D[this.$L];
- }, m.locale = function(t, e) {
- if (!t) return this.$L;
- var n = this.clone(), r = w(t, e, !0);
- return r && (n.$L = r), n;
- }, m.clone = function() {
- return b.w(this.$d, this);
- }, m.toDate = function() {
- return new Date(this.valueOf());
- }, m.toJSON = function() {
- return this.isValid() ? this.toISOString() : null;
- }, m.toISOString = function() {
- return this.$d.toISOString();
- }, m.toString = function() {
- return this.$d.toUTCString();
- }, M;
- }(), k = _.prototype;
- return O.prototype = k, [
- ["$ms", r],
- ["$s", i],
- ["$m", s],
- ["$H", u],
- ["$W", a],
- ["$M", c],
- ["$y", h],
- ["$D", d]
- ].forEach((function(t) {
- k[t[1]] = function(e) {
- return this.$g(e, t[0], t[1]);
- };
- })), O.extend = function(t, e) {
- return t.$i || (t(e, _, O), t.$i = !0), O;
- }, O.locale = w, O.isDayjs = S, O.unix = function(t) {
- return O(1e3 * t);
- }, O.en = D[g], O.Ls = D, O.p = {}, O;
- }));
-}));
-
+};
//#endregion
-//#region ../node_modules/quick-lru/index.js
-var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
-var QuickLRU = class extends Map {
- #size = 0;
- #cache = new Map();
- #oldCache = new Map();
- #maxSize;
- #maxAge;
- #onEviction;
- constructor(options = {}) {
- super();
- if (!(options.maxSize && options.maxSize > 0)) {
- throw new TypeError("`maxSize` must be a number greater than 0");
- }
- if (typeof options.maxAge === "number" && options.maxAge === 0) {
- throw new TypeError("`maxAge` must be a number greater than 0");
- }
- this.#maxSize = options.maxSize;
- this.#maxAge = options.maxAge || Number.POSITIVE_INFINITY;
- this.#onEviction = options.onEviction;
+//#region ../node_modules/axios/lib/helpers/readBlob.js
+const { asyncIterator } = Symbol;
+const readBlob = async function* (blob) {
+ if (blob.stream) yield* blob.stream();
+ else if (blob.arrayBuffer) yield await blob.arrayBuffer();
+ else if (blob[asyncIterator]) yield* blob[asyncIterator]();
+ else yield blob;
+};
+//#endregion
+//#region ../node_modules/axios/lib/helpers/formDataToStream.js
+const BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
+const textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
+const CRLF = "\r\n";
+const CRLF_BYTES = textEncoder.encode(CRLF);
+const CRLF_BYTES_COUNT = 2;
+var FormDataPart = class {
+ constructor(name, value) {
+ const { escapeName } = this.constructor;
+ const isStringValue = utils_default.isString(value);
+ let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
+ if (isStringValue) value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
+ else headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
+ this.headers = textEncoder.encode(headers + CRLF);
+ this.contentLength = isStringValue ? value.byteLength : value.size;
+ this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
+ this.name = name;
+ this.value = value;
}
- get __oldCache() {
- return this.#oldCache;
+ async *encode() {
+ yield this.headers;
+ const { value } = this;
+ if (utils_default.isTypedArray(value)) yield value;
+ else yield* readBlob(value);
+ yield CRLF_BYTES;
}
- #emitEvictions(cache) {
- if (typeof this.#onEviction !== "function") {
- return;
- }
- for (const [key, item] of cache) {
- this.#onEviction(key, item.value);
+ static escapeName(name) {
+ return String(name).replace(/[\r\n"]/g, (match) => ({
+ "\r": "%0D",
+ "\n": "%0A",
+ "\"": "%22"
+ })[match]);
+ }
+};
+const formDataToStream = (form, headersHandler, options) => {
+ const { tag = "form-data-boundary", size = 25, boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {};
+ if (!utils_default.isFormData(form)) throw TypeError("FormData instance required");
+ if (boundary.length < 1 || boundary.length > 70) throw Error("boundary must be 10-70 characters long");
+ const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
+ const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
+ let contentLength = footerBytes.byteLength;
+ const parts = Array.from(form.entries()).map(([name, value]) => {
+ const part = new FormDataPart(name, value);
+ contentLength += part.size;
+ return part;
+ });
+ contentLength += boundaryBytes.byteLength * parts.length;
+ contentLength = utils_default.toFiniteNumber(contentLength);
+ const computedHeaders = { "Content-Type": `multipart/form-data; boundary=${boundary}` };
+ if (Number.isFinite(contentLength)) computedHeaders["Content-Length"] = contentLength;
+ headersHandler && headersHandler(computedHeaders);
+ return Readable.from((async function* () {
+ for (const part of parts) {
+ yield boundaryBytes;
+ yield* part.encode();
}
+ yield footerBytes;
+ })());
+};
+//#endregion
+//#region ../node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
+var ZlibHeaderTransformStream = class extends stream.Transform {
+ __transform(chunk, encoding, callback) {
+ this.push(chunk);
+ callback();
}
- #deleteIfExpired(key, item) {
- if (typeof item.expiry === "number" && item.expiry <= Date.now()) {
- if (typeof this.#onEviction === "function") {
- this.#onEviction(key, item.value);
+ _transform(chunk, encoding, callback) {
+ if (chunk.length !== 0) {
+ this._transform = this.__transform;
+ if (chunk[0] !== 120) {
+ const header = Buffer.alloc(2);
+ header[0] = 120;
+ header[1] = 156;
+ this.push(header, encoding);
}
- return this.delete(key);
}
- return false;
+ this.__transform(chunk, encoding, callback);
}
- #getOrDeleteIfExpired(key, item) {
- const deleted = this.#deleteIfExpired(key, item);
- if (deleted === false) {
- return item.value;
+};
+//#endregion
+//#region ../node_modules/axios/lib/helpers/callbackify.js
+const callbackify = (fn, reducer) => {
+ return utils_default.isAsyncFn(fn) ? function(...args) {
+ const cb = args.pop();
+ fn.apply(this, args).then((value) => {
+ try {
+ reducer ? cb(null, ...reducer(value)) : cb(null, value);
+ } catch (err) {
+ cb(err);
+ }
+ }, cb);
+ } : fn;
+};
+//#endregion
+//#region ../node_modules/axios/lib/helpers/speedometer.js
+/**
+* Calculate data maxRate
+* @param {Number} [samplesCount= 10]
+* @param {Number} [min= 1000]
+* @returns {Function}
+*/
+function speedometer(samplesCount, min) {
+ samplesCount = samplesCount || 10;
+ const bytes = new Array(samplesCount);
+ const timestamps = new Array(samplesCount);
+ let head = 0;
+ let tail = 0;
+ let firstSampleTS;
+ min = min !== void 0 ? min : 1e3;
+ return function push(chunkLength) {
+ const now = Date.now();
+ const startedAt = timestamps[tail];
+ if (!firstSampleTS) firstSampleTS = now;
+ bytes[head] = chunkLength;
+ timestamps[head] = now;
+ let i = tail;
+ let bytesCount = 0;
+ while (i !== head) {
+ bytesCount += bytes[i++];
+ i = i % samplesCount;
}
- }
- #getItemValue(key, item) {
- return item.expiry ? this.#getOrDeleteIfExpired(key, item) : item.value;
- }
- #peek(key, cache) {
- const item = cache.get(key);
- return this.#getItemValue(key, item);
- }
- #set(key, value) {
- this.#cache.set(key, value);
- this.#size++;
- if (this.#size >= this.#maxSize) {
- this.#size = 0;
- this.#emitEvictions(this.#oldCache);
- this.#oldCache = this.#cache;
- this.#cache = new Map();
+ head = (head + 1) % samplesCount;
+ if (head === tail) tail = (tail + 1) % samplesCount;
+ if (now - firstSampleTS < min) return;
+ const passed = startedAt && now - startedAt;
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
+ };
+}
+//#endregion
+//#region ../node_modules/axios/lib/helpers/throttle.js
+/**
+* Throttle decorator
+* @param {Function} fn
+* @param {Number} freq
+* @return {Function}
+*/
+function throttle$1(fn, freq) {
+ let timestamp = 0;
+ let threshold = 1e3 / freq;
+ let lastArgs;
+ let timer;
+ const invoke = (args, now = Date.now()) => {
+ timestamp = now;
+ lastArgs = null;
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
}
- }
- #moveToRecent(key, item) {
- this.#oldCache.delete(key);
- this.#set(key, item);
- }
- *#entriesAscending() {
- for (const item of this.#oldCache) {
- const [key, value] = item;
- if (!this.#cache.has(key)) {
- const deleted = this.#deleteIfExpired(key, value);
- if (deleted === false) {
- yield item;
- }
+ fn(...args);
+ };
+ const throttled = (...args) => {
+ const now = Date.now();
+ const passed = now - timestamp;
+ if (passed >= threshold) invoke(args, now);
+ else {
+ lastArgs = args;
+ if (!timer) timer = setTimeout(() => {
+ timer = null;
+ invoke(lastArgs);
+ }, threshold - passed);
+ }
+ };
+ const flush = () => lastArgs && invoke(lastArgs);
+ return [throttled, flush];
+}
+//#endregion
+//#region ../node_modules/axios/lib/helpers/progressEventReducer.js
+const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
+ let bytesNotified = 0;
+ const _speedometer = speedometer(50, 250);
+ return throttle$1((e) => {
+ const loaded = e.loaded;
+ const total = e.lengthComputable ? e.total : void 0;
+ const progressBytes = loaded - bytesNotified;
+ const rate = _speedometer(progressBytes);
+ const inRange = loaded <= total;
+ bytesNotified = loaded;
+ listener({
+ loaded,
+ total,
+ progress: total ? loaded / total : void 0,
+ bytes: progressBytes,
+ rate: rate ? rate : void 0,
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
+ event: e,
+ lengthComputable: total != null,
+ [isDownloadStream ? "download" : "upload"]: true
+ });
+ }, freq);
+};
+const progressEventDecorator = (total, throttled) => {
+ const lengthComputable = total != null;
+ return [(loaded) => throttled[0]({
+ lengthComputable,
+ total,
+ loaded
+ }), throttled[1]];
+};
+const asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
+//#endregion
+//#region ../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
+/**
+* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
+* - For base64: compute exact decoded size using length and padding;
+* handle %XX at the character-count level (no string allocation).
+* - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
+*
+* @param {string} url
+* @returns {number}
+*/
+function estimateDataURLDecodedBytes(url) {
+ if (!url || typeof url !== "string") return 0;
+ if (!url.startsWith("data:")) return 0;
+ const comma = url.indexOf(",");
+ if (comma < 0) return 0;
+ const meta = url.slice(5, comma);
+ const body = url.slice(comma + 1);
+ if (/;base64/i.test(meta)) {
+ let effectiveLen = body.length;
+ const len = body.length;
+ for (let i = 0; i < len; i++) if (body.charCodeAt(i) === 37 && i + 2 < len) {
+ const a = body.charCodeAt(i + 1);
+ const b = body.charCodeAt(i + 2);
+ if ((a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102)) {
+ effectiveLen -= 2;
+ i += 2;
}
}
- for (const item of this.#cache) {
- const [key, value] = item;
- const deleted = this.#deleteIfExpired(key, value);
- if (deleted === false) {
- yield item;
+ let pad = 0;
+ let idx = len - 1;
+ const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && body.charCodeAt(j - 1) === 51 && (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
+ if (idx >= 0) {
+ if (body.charCodeAt(idx) === 61) {
+ pad++;
+ idx--;
+ } else if (tailIsPct3D(idx)) {
+ pad++;
+ idx -= 3;
}
}
+ if (pad === 1 && idx >= 0) {
+ if (body.charCodeAt(idx) === 61) pad++;
+ else if (tailIsPct3D(idx)) pad++;
+ }
+ const bytes = Math.floor(effectiveLen / 4) * 3 - (pad || 0);
+ return bytes > 0 ? bytes : 0;
}
- get(key) {
- if (this.#cache.has(key)) {
- const item = this.#cache.get(key);
- return this.#getItemValue(key, item);
+ return Buffer.byteLength(body, "utf8");
+}
+//#endregion
+//#region ../node_modules/axios/lib/adapters/http.js
+const zlibOptions = {
+ flush: zlib.constants.Z_SYNC_FLUSH,
+ finishFlush: zlib.constants.Z_SYNC_FLUSH
+};
+const brotliOptions = {
+ flush: zlib.constants.BROTLI_OPERATION_FLUSH,
+ finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
+};
+const isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
+const { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
+const isHttps = /https:?/;
+const supportedProtocols = platform_default.protocols.map((protocol) => {
+ return protocol + ":";
+});
+const flushOnFinish = (stream, [throttled, flush]) => {
+ stream.on("end", flush).on("error", flush);
+ return throttled;
+};
+/**
+* If the proxy or config beforeRedirects functions are defined, call them with the options
+* object.
+*
+* @param {Object} options - The options object that was passed to the request.
+*
+* @returns {Object}
+*/
+function dispatchBeforeRedirect(options, responseDetails) {
+ if (options.beforeRedirects.proxy) options.beforeRedirects.proxy(options);
+ if (options.beforeRedirects.config) options.beforeRedirects.config(options, responseDetails);
+}
+/**
+* If the proxy or config afterRedirects functions are defined, call them with the options
+*
+* @param {http.ClientRequestArgs} options
+* @param {AxiosProxyConfig} configProxy configuration from Axios options object
+* @param {string} location
+*
+* @returns {http.ClientRequestArgs}
+*/
+function setProxy(options, configProxy, location) {
+ let proxy = configProxy;
+ if (!proxy && proxy !== false) {
+ const proxyUrl = import_proxy_from_env.getProxyForUrl(location);
+ if (proxyUrl) proxy = new URL(proxyUrl);
+ }
+ if (proxy) {
+ if (proxy.username) proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
+ if (proxy.auth) {
+ if (proxy.auth.username || proxy.auth.password) proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
+ const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
+ options.headers["Proxy-Authorization"] = "Basic " + base64;
}
- if (this.#oldCache.has(key)) {
- const item = this.#oldCache.get(key);
- if (this.#deleteIfExpired(key, item) === false) {
- this.#moveToRecent(key, item);
- return item.value;
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
+ const proxyHost = proxy.hostname || proxy.host;
+ options.hostname = proxyHost;
+ options.host = proxyHost;
+ options.port = proxy.port;
+ options.path = location;
+ if (proxy.protocol) options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
+ }
+ options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
+ setProxy(redirectOptions, configProxy, redirectOptions.href);
+ };
+}
+const isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
+const wrapAsync = (asyncExecutor) => {
+ return new Promise((resolve, reject) => {
+ let onDone;
+ let isDone;
+ const done = (value, isRejected) => {
+ if (isDone) return;
+ isDone = true;
+ onDone && onDone(value, isRejected);
+ };
+ const _resolve = (value) => {
+ done(value);
+ resolve(value);
+ };
+ const _reject = (reason) => {
+ done(reason, true);
+ reject(reason);
+ };
+ asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
+ });
+};
+const resolveFamily = ({ address, family }) => {
+ if (!utils_default.isString(address)) throw TypeError("address must be a string");
+ return {
+ address,
+ family: family || (address.indexOf(".") < 0 ? 6 : 4)
+ };
+};
+const buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : {
+ address,
+ family
+});
+var http_default = isHttpAdapterSupported && function httpAdapter(config) {
+ return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
+ let { data, lookup, family } = config;
+ const { responseType, responseEncoding } = config;
+ const method = config.method.toUpperCase();
+ let isDone;
+ let rejected = false;
+ let req;
+ if (lookup) {
+ const _lookup = callbackify(lookup, (value) => utils_default.isArray(value) ? value : [value]);
+ lookup = (hostname, opt, cb) => {
+ _lookup(hostname, opt, (err, arg0, arg1) => {
+ if (err) return cb(err);
+ const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
+ });
+ };
+ }
+ const emitter = new EventEmitter();
+ const onFinished = () => {
+ if (config.cancelToken) config.cancelToken.unsubscribe(abort);
+ if (config.signal) config.signal.removeEventListener("abort", abort);
+ emitter.removeAllListeners();
+ };
+ onDone((value, isRejected) => {
+ isDone = true;
+ if (isRejected) {
+ rejected = true;
+ onFinished();
}
+ });
+ function abort(reason) {
+ emitter.emit("abort", !reason || reason.type ? new CanceledError$1(null, config, req) : reason);
}
- }
- set(key, value, { maxAge = this.#maxAge } = {}) {
- const expiry = typeof maxAge === "number" && maxAge !== Number.POSITIVE_INFINITY ? Date.now() + maxAge : undefined;
- if (this.#cache.has(key)) {
- this.#cache.set(key, {
- value,
- expiry
+ emitter.once("abort", reject);
+ if (config.cancelToken || config.signal) {
+ config.cancelToken && config.cancelToken.subscribe(abort);
+ if (config.signal) config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
+ }
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
+ const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
+ const protocol = parsed.protocol || supportedProtocols[0];
+ if (protocol === "data:") {
+ if (config.maxContentLength > -1) {
+ if (estimateDataURLDecodedBytes(String(config.url || fullPath || "")) > config.maxContentLength) return reject(new AxiosError$1("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config));
+ }
+ let convertedData;
+ if (method !== "GET") return settle(resolve, reject, {
+ status: 405,
+ statusText: "method not allowed",
+ headers: {},
+ config
});
- } else {
- this.#set(key, {
- value,
- expiry
+ try {
+ convertedData = fromDataURI(config.url, responseType === "blob", { Blob: config.env && config.env.Blob });
+ } catch (err) {
+ throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config);
+ }
+ if (responseType === "text") {
+ convertedData = convertedData.toString(responseEncoding);
+ if (!responseEncoding || responseEncoding === "utf8") convertedData = utils_default.stripBOM(convertedData);
+ } else if (responseType === "stream") convertedData = stream.Readable.from(convertedData);
+ return settle(resolve, reject, {
+ data: convertedData,
+ status: 200,
+ statusText: "OK",
+ headers: new AxiosHeaders$1(),
+ config
});
}
- return this;
- }
- has(key) {
- if (this.#cache.has(key)) {
- return !this.#deleteIfExpired(key, this.#cache.get(key));
+ if (supportedProtocols.indexOf(protocol) === -1) return reject(new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_BAD_REQUEST, config));
+ const headers = AxiosHeaders$1.from(config.headers).normalize();
+ headers.set("User-Agent", "axios/1.12.2", false);
+ const { onUploadProgress, onDownloadProgress } = config;
+ const maxRate = config.maxRate;
+ let maxUploadRate = void 0;
+ let maxDownloadRate = void 0;
+ if (utils_default.isSpecCompliantForm(data)) {
+ const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
+ data = formDataToStream(data, (formHeaders) => {
+ headers.set(formHeaders);
+ }, {
+ tag: `axios-1.12.2-boundary`,
+ boundary: userBoundary && userBoundary[1] || void 0
+ });
+ } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
+ headers.set(data.getHeaders());
+ if (!headers.hasContentLength()) try {
+ const knownLength = await util.promisify(data.getLength).call(data);
+ Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
+ } catch (e) {}
+ } else if (utils_default.isBlob(data) || utils_default.isFile(data)) {
+ data.size && headers.setContentType(data.type || "application/octet-stream");
+ headers.setContentLength(data.size || 0);
+ data = stream.Readable.from(readBlob(data));
+ } else if (data && !utils_default.isStream(data)) {
+ if (Buffer.isBuffer(data)) {} else if (utils_default.isArrayBuffer(data)) data = Buffer.from(new Uint8Array(data));
+ else if (utils_default.isString(data)) data = Buffer.from(data, "utf-8");
+ else return reject(new AxiosError$1("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError$1.ERR_BAD_REQUEST, config));
+ headers.setContentLength(data.length, false);
+ if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) return reject(new AxiosError$1("Request body larger than maxBodyLength limit", AxiosError$1.ERR_BAD_REQUEST, config));
}
- if (this.#oldCache.has(key)) {
- return !this.#deleteIfExpired(key, this.#oldCache.get(key));
+ const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
+ if (utils_default.isArray(maxRate)) {
+ maxUploadRate = maxRate[0];
+ maxDownloadRate = maxRate[1];
+ } else maxUploadRate = maxDownloadRate = maxRate;
+ if (data && (onUploadProgress || maxUploadRate)) {
+ if (!utils_default.isStream(data)) data = stream.Readable.from(data, { objectMode: false });
+ data = stream.pipeline([data, new AxiosTransformStream({ maxRate: utils_default.toFiniteNumber(maxUploadRate) })], utils_default.noop);
+ onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
}
- return false;
- }
- peek(key) {
- if (this.#cache.has(key)) {
- return this.#peek(key, this.#cache);
+ let auth = void 0;
+ if (config.auth) {
+ const username = config.auth.username || "";
+ const password = config.auth.password || "";
+ auth = username + ":" + password;
}
- if (this.#oldCache.has(key)) {
- return this.#peek(key, this.#oldCache);
+ if (!auth && parsed.username) {
+ const urlUsername = parsed.username;
+ const urlPassword = parsed.password;
+ auth = urlUsername + ":" + urlPassword;
}
- }
- expiresIn(key) {
- const item = this.#cache.get(key) ?? this.#oldCache.get(key);
- if (item) {
- return item.expiry ? item.expiry - Date.now() : Number.POSITIVE_INFINITY;
+ auth && headers.delete("authorization");
+ let path;
+ try {
+ path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
+ } catch (err) {
+ const customErr = new Error(err.message);
+ customErr.config = config;
+ customErr.url = config.url;
+ customErr.exists = true;
+ return reject(customErr);
}
- }
- delete(key) {
- const deleted = this.#cache.delete(key);
- if (deleted) {
- this.#size--;
+ headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
+ const options = {
+ path,
+ method,
+ headers: headers.toJSON(),
+ agents: {
+ http: config.httpAgent,
+ https: config.httpsAgent
+ },
+ auth,
+ protocol,
+ family,
+ beforeRedirect: dispatchBeforeRedirect,
+ beforeRedirects: {}
+ };
+ !utils_default.isUndefined(lookup) && (options.lookup = lookup);
+ if (config.socketPath) options.socketPath = config.socketPath;
+ else {
+ options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
+ options.port = parsed.port;
+ setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
}
- return this.#oldCache.delete(key) || deleted;
+ let transport;
+ const isHttpsRequest = isHttps.test(options.protocol);
+ options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
+ if (config.transport) transport = config.transport;
+ else if (config.maxRedirects === 0) transport = isHttpsRequest ? https : http;
+ else {
+ if (config.maxRedirects) options.maxRedirects = config.maxRedirects;
+ if (config.beforeRedirect) options.beforeRedirects.config = config.beforeRedirect;
+ transport = isHttpsRequest ? httpsFollow : httpFollow;
+ }
+ if (config.maxBodyLength > -1) options.maxBodyLength = config.maxBodyLength;
+ else options.maxBodyLength = Infinity;
+ if (config.insecureHTTPParser) options.insecureHTTPParser = config.insecureHTTPParser;
+ req = transport.request(options, function handleResponse(res) {
+ if (req.destroyed) return;
+ const streams = [res];
+ const responseLength = +res.headers["content-length"];
+ if (onDownloadProgress || maxDownloadRate) {
+ const transformStream = new AxiosTransformStream({ maxRate: utils_default.toFiniteNumber(maxDownloadRate) });
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
+ streams.push(transformStream);
+ }
+ let responseStream = res;
+ const lastRequest = res.req || req;
+ if (config.decompress !== false && res.headers["content-encoding"]) {
+ if (method === "HEAD" || res.statusCode === 204) delete res.headers["content-encoding"];
+ switch ((res.headers["content-encoding"] || "").toLowerCase()) {
+ case "gzip":
+ case "x-gzip":
+ case "compress":
+ case "x-compress":
+ streams.push(zlib.createUnzip(zlibOptions));
+ delete res.headers["content-encoding"];
+ break;
+ case "deflate":
+ streams.push(new ZlibHeaderTransformStream());
+ streams.push(zlib.createUnzip(zlibOptions));
+ delete res.headers["content-encoding"];
+ break;
+ case "br": if (isBrotliSupported) {
+ streams.push(zlib.createBrotliDecompress(brotliOptions));
+ delete res.headers["content-encoding"];
+ }
+ }
+ }
+ responseStream = streams.length > 1 ? stream.pipeline(streams, utils_default.noop) : streams[0];
+ const offListeners = stream.finished(responseStream, () => {
+ offListeners();
+ onFinished();
+ });
+ const response = {
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: new AxiosHeaders$1(res.headers),
+ config,
+ request: lastRequest
+ };
+ if (responseType === "stream") {
+ response.data = responseStream;
+ settle(resolve, reject, response);
+ } else {
+ const responseBuffer = [];
+ let totalResponseBytes = 0;
+ responseStream.on("data", function handleStreamData(chunk) {
+ responseBuffer.push(chunk);
+ totalResponseBytes += chunk.length;
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
+ rejected = true;
+ responseStream.destroy();
+ reject(new AxiosError$1("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, lastRequest));
+ }
+ });
+ responseStream.on("aborted", function handlerStreamAborted() {
+ if (rejected) return;
+ const err = new AxiosError$1("stream has been aborted", AxiosError$1.ERR_BAD_RESPONSE, config, lastRequest);
+ responseStream.destroy(err);
+ reject(err);
+ });
+ responseStream.on("error", function handleStreamError(err) {
+ if (req.destroyed) return;
+ reject(AxiosError$1.from(err, null, config, lastRequest));
+ });
+ responseStream.on("end", function handleStreamEnd() {
+ try {
+ let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
+ if (responseType !== "arraybuffer") {
+ responseData = responseData.toString(responseEncoding);
+ if (!responseEncoding || responseEncoding === "utf8") responseData = utils_default.stripBOM(responseData);
+ }
+ response.data = responseData;
+ } catch (err) {
+ return reject(AxiosError$1.from(err, null, config, response.request, response));
+ }
+ settle(resolve, reject, response);
+ });
+ }
+ emitter.once("abort", (err) => {
+ if (!responseStream.destroyed) {
+ responseStream.emit("error", err);
+ responseStream.destroy();
+ }
+ });
+ });
+ emitter.once("abort", (err) => {
+ reject(err);
+ req.destroy(err);
+ });
+ req.on("error", function handleRequestError(err) {
+ reject(AxiosError$1.from(err, null, config, req));
+ });
+ req.on("socket", function handleRequestSocket(socket) {
+ socket.setKeepAlive(true, 1e3 * 60);
+ });
+ if (config.timeout) {
+ const timeout = parseInt(config.timeout, 10);
+ if (Number.isNaN(timeout)) {
+ reject(new AxiosError$1("error trying to parse `config.timeout` to int", AxiosError$1.ERR_BAD_OPTION_VALUE, config, req));
+ return;
+ }
+ req.setTimeout(timeout, function handleRequestTimeout() {
+ if (isDone) return;
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
+ const transitional = config.transitional || transitional_default;
+ if (config.timeoutErrorMessage) timeoutErrorMessage = config.timeoutErrorMessage;
+ reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, req));
+ abort();
+ });
+ }
+ if (utils_default.isStream(data)) {
+ let ended = false;
+ let errored = false;
+ data.on("end", () => {
+ ended = true;
+ });
+ data.once("error", (err) => {
+ errored = true;
+ req.destroy(err);
+ });
+ data.on("close", () => {
+ if (!ended && !errored) abort(new CanceledError$1("Request stream has been aborted", config, req));
+ });
+ data.pipe(req);
+ } else req.end(data);
+ });
+};
+const __setProxy = setProxy;
+//#endregion
+//#region ../node_modules/axios/lib/helpers/isURLSameOrigin.js
+var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
+ url = new URL(url, platform_default.origin);
+ return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
+})(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
+//#endregion
+//#region ../node_modules/axios/lib/helpers/cookies.js
+var cookies_default = platform_default.hasStandardBrowserEnv ? {
+ write(name, value, expires, path, domain, secure) {
+ const cookie = [name + "=" + encodeURIComponent(value)];
+ utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
+ utils_default.isString(path) && cookie.push("path=" + path);
+ utils_default.isString(domain) && cookie.push("domain=" + domain);
+ secure === true && cookie.push("secure");
+ document.cookie = cookie.join("; ");
+ },
+ read(name) {
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
+ return match ? decodeURIComponent(match[3]) : null;
+ },
+ remove(name) {
+ this.write(name, "", Date.now() - 864e5);
}
- clear() {
- this.#cache.clear();
- this.#oldCache.clear();
- this.#size = 0;
+} : {
+ write() {},
+ read() {
+ return null;
+ },
+ remove() {}
+};
+//#endregion
+//#region ../node_modules/axios/lib/core/mergeConfig.js
+const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
+/**
+* Config-specific merge-function which creates a new config-object
+* by merging two configuration objects together.
+*
+* @param {Object} config1
+* @param {Object} config2
+*
+* @returns {Object} New object resulting from merging config2 to config1
+*/
+function mergeConfig$1(config1, config2) {
+ config2 = config2 || {};
+ const config = {};
+ function getMergedValue(target, source, prop, caseless) {
+ if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) return utils_default.merge.call({ caseless }, target, source);
+ else if (utils_default.isPlainObject(source)) return utils_default.merge({}, source);
+ else if (utils_default.isArray(source)) return source.slice();
+ return source;
}
- resize(newSize) {
- if (!(newSize && newSize > 0)) {
- throw new TypeError("`maxSize` must be a number greater than 0");
+ function mergeDeepProperties(a, b, prop, caseless) {
+ if (!utils_default.isUndefined(b)) return getMergedValue(a, b, prop, caseless);
+ else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a, prop, caseless);
+ }
+ function valueFromConfig2(a, b) {
+ if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
+ }
+ function defaultToConfig2(a, b) {
+ if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
+ else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a);
+ }
+ function mergeDirectKeys(a, b, prop) {
+ if (prop in config2) return getMergedValue(a, b);
+ else if (prop in config1) return getMergedValue(void 0, a);
+ }
+ const mergeMap = {
+ url: valueFromConfig2,
+ method: valueFromConfig2,
+ data: valueFromConfig2,
+ baseURL: defaultToConfig2,
+ transformRequest: defaultToConfig2,
+ transformResponse: defaultToConfig2,
+ paramsSerializer: defaultToConfig2,
+ timeout: defaultToConfig2,
+ timeoutMessage: defaultToConfig2,
+ withCredentials: defaultToConfig2,
+ withXSRFToken: defaultToConfig2,
+ adapter: defaultToConfig2,
+ responseType: defaultToConfig2,
+ xsrfCookieName: defaultToConfig2,
+ xsrfHeaderName: defaultToConfig2,
+ onUploadProgress: defaultToConfig2,
+ onDownloadProgress: defaultToConfig2,
+ decompress: defaultToConfig2,
+ maxContentLength: defaultToConfig2,
+ maxBodyLength: defaultToConfig2,
+ beforeRedirect: defaultToConfig2,
+ transport: defaultToConfig2,
+ httpAgent: defaultToConfig2,
+ httpsAgent: defaultToConfig2,
+ cancelToken: defaultToConfig2,
+ socketPath: defaultToConfig2,
+ responseEncoding: defaultToConfig2,
+ validateStatus: mergeDirectKeys,
+ headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
+ };
+ utils_default.forEach(Object.keys({
+ ...config1,
+ ...config2
+ }), function computeConfigValue(prop) {
+ const merge = mergeMap[prop] || mergeDeepProperties;
+ const configValue = merge(config1[prop], config2[prop], prop);
+ utils_default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
+ });
+ return config;
+}
+//#endregion
+//#region ../node_modules/axios/lib/helpers/resolveConfig.js
+var resolveConfig_default = (config) => {
+ const newConfig = mergeConfig$1({}, config);
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
+ if (auth) headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
+ if (utils_default.isFormData(data)) {
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
+ else if (utils_default.isFunction(data.getHeaders)) {
+ const formHeaders = data.getHeaders();
+ const allowedHeaders = ["content-type", "content-length"];
+ Object.entries(formHeaders).forEach(([key, val]) => {
+ if (allowedHeaders.includes(key.toLowerCase())) headers.set(key, val);
+ });
}
- const items = [...this.#entriesAscending()];
- const removeCount = items.length - newSize;
- if (removeCount < 0) {
- this.#cache = new Map(items);
- this.#oldCache = new Map();
- this.#size = items.length;
- } else {
- if (removeCount > 0) {
- this.#emitEvictions(items.slice(0, removeCount));
- }
- this.#oldCache = new Map(items.slice(removeCount));
- this.#cache = new Map();
- this.#size = 0;
+ }
+ if (platform_default.hasStandardBrowserEnv) {
+ withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
+ if (xsrfValue) headers.set(xsrfHeaderName, xsrfValue);
}
- this.#maxSize = newSize;
}
- evict(count = 1) {
- const requested = Number(count);
- if (!requested || requested <= 0) {
- return;
+ return newConfig;
+};
+//#endregion
+//#region ../node_modules/axios/lib/adapters/xhr.js
+const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
+var xhr_default = isXHRAdapterSupported && function(config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ const _config = resolveConfig_default(config);
+ let requestData = _config.data;
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
+ let onCanceled;
+ let uploadThrottled, downloadThrottled;
+ let flushUpload, flushDownload;
+ function done() {
+ flushUpload && flushUpload();
+ flushDownload && flushDownload();
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
}
- const items = [...this.#entriesAscending()];
- const evictCount = Math.trunc(Math.min(requested, Math.max(items.length - 1, 0)));
- if (evictCount <= 0) {
+ let request = new XMLHttpRequest();
+ request.open(_config.method.toUpperCase(), _config.url, true);
+ request.timeout = _config.timeout;
+ function onloadend() {
+ if (!request) return;
+ const responseHeaders = AxiosHeaders$1.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
+ settle(function _resolve(value) {
+ resolve(value);
+ done();
+ }, function _reject(err) {
+ reject(err);
+ done();
+ }, {
+ data: !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config,
+ request
+ });
+ request = null;
+ }
+ if ("onloadend" in request) request.onloadend = onloadend;
+ else request.onreadystatechange = function handleLoad() {
+ if (!request || request.readyState !== 4) return;
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) return;
+ setTimeout(onloadend);
+ };
+ request.onabort = function handleAbort() {
+ if (!request) return;
+ reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
+ request = null;
+ };
+ request.onerror = function handleError(event) {
+ const err = new AxiosError$1(event && event.message ? event.message : "Network Error", AxiosError$1.ERR_NETWORK, config, request);
+ err.event = event || null;
+ reject(err);
+ request = null;
+ };
+ request.ontimeout = function handleTimeout() {
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
+ const transitional = _config.transitional || transitional_default;
+ if (_config.timeoutErrorMessage) timeoutErrorMessage = _config.timeoutErrorMessage;
+ reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, request));
+ request = null;
+ };
+ requestData === void 0 && requestHeaders.setContentType(null);
+ if ("setRequestHeader" in request) utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+ request.setRequestHeader(key, val);
+ });
+ if (!utils_default.isUndefined(_config.withCredentials)) request.withCredentials = !!_config.withCredentials;
+ if (responseType && responseType !== "json") request.responseType = _config.responseType;
+ if (onDownloadProgress) {
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
+ request.addEventListener("progress", downloadThrottled);
+ }
+ if (onUploadProgress && request.upload) {
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
+ request.upload.addEventListener("progress", uploadThrottled);
+ request.upload.addEventListener("loadend", flushUpload);
+ }
+ if (_config.cancelToken || _config.signal) {
+ onCanceled = (cancel) => {
+ if (!request) return;
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
+ request.abort();
+ request = null;
+ };
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
+ if (_config.signal) _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
+ }
+ const protocol = parseProtocol(_config.url);
+ if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
+ reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
return;
}
- this.#emitEvictions(items.slice(0, evictCount));
- this.#oldCache = new Map(items.slice(evictCount));
- this.#cache = new Map();
- this.#size = 0;
+ request.send(requestData || null);
+ });
+};
+//#endregion
+//#region ../node_modules/axios/lib/helpers/composeSignals.js
+const composeSignals = (signals, timeout) => {
+ const { length } = signals = signals ? signals.filter(Boolean) : [];
+ if (timeout || length) {
+ let controller = new AbortController();
+ let aborted;
+ const onabort = function(reason) {
+ if (!aborted) {
+ aborted = true;
+ unsubscribe();
+ const err = reason instanceof Error ? reason : this.reason;
+ controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
+ }
+ };
+ let timer = timeout && setTimeout(() => {
+ timer = null;
+ onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
+ }, timeout);
+ const unsubscribe = () => {
+ if (signals) {
+ timer && clearTimeout(timer);
+ timer = null;
+ signals.forEach((signal) => {
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener("abort", onabort);
+ });
+ signals = null;
+ }
+ };
+ signals.forEach((signal) => signal.addEventListener("abort", onabort));
+ const { signal } = controller;
+ signal.unsubscribe = () => utils_default.asap(unsubscribe);
+ return signal;
}
- *keys() {
- for (const [key] of this) {
- yield key;
- }
+};
+//#endregion
+//#region ../node_modules/axios/lib/helpers/trackStream.js
+const streamChunk = function* (chunk, chunkSize) {
+ let len = chunk.byteLength;
+ if (!chunkSize || len < chunkSize) {
+ yield chunk;
+ return;
}
- *values() {
- for (const [, value] of this) {
+ let pos = 0;
+ let end;
+ while (pos < len) {
+ end = pos + chunkSize;
+ yield chunk.slice(pos, end);
+ pos = end;
+ }
+};
+const readBytes = async function* (iterable, chunkSize) {
+ for await (const chunk of readStream(iterable)) yield* streamChunk(chunk, chunkSize);
+};
+const readStream = async function* (stream) {
+ if (stream[Symbol.asyncIterator]) {
+ yield* stream;
+ return;
+ }
+ const reader = stream.getReader();
+ try {
+ for (;;) {
+ const { done, value } = await reader.read();
+ if (done) break;
yield value;
}
+ } finally {
+ await reader.cancel();
}
- *[Symbol.iterator]() {
- for (const item of this.#cache) {
- const [key, value] = item;
- const deleted = this.#deleteIfExpired(key, value);
- if (deleted === false) {
- yield [key, value.value];
- }
+};
+const trackStream = (stream, chunkSize, onProgress, onFinish) => {
+ const iterator = readBytes(stream, chunkSize);
+ let bytes = 0;
+ let done;
+ let _onFinish = (e) => {
+ if (!done) {
+ done = true;
+ onFinish && onFinish(e);
}
- for (const item of this.#oldCache) {
- const [key, value] = item;
- if (!this.#cache.has(key)) {
- const deleted = this.#deleteIfExpired(key, value);
- if (deleted === false) {
- yield [key, value.value];
+ };
+ return new ReadableStream({
+ async pull(controller) {
+ try {
+ const { done, value } = await iterator.next();
+ if (done) {
+ _onFinish();
+ controller.close();
+ return;
}
+ let len = value.byteLength;
+ if (onProgress) onProgress(bytes += len);
+ controller.enqueue(new Uint8Array(value));
+ } catch (err) {
+ _onFinish(err);
+ throw err;
}
+ },
+ cancel(reason) {
+ _onFinish(reason);
+ return iterator.return();
}
+ }, { highWaterMark: 2 });
+};
+//#endregion
+//#region ../node_modules/axios/lib/adapters/fetch.js
+const DEFAULT_CHUNK_SIZE = 64 * 1024;
+const { isFunction: isFunction$2 } = utils_default;
+const globalFetchAPI = (({ Request, Response }) => ({
+ Request,
+ Response
+}))(utils_default.global);
+const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$2 } = utils_default.global;
+const test = (fn, ...args) => {
+ try {
+ return !!fn(...args);
+ } catch (e) {
+ return false;
}
- *entriesDescending() {
- let items = [...this.#cache];
- for (let i = items.length - 1; i >= 0; --i) {
- const item = items[i];
- const [key, value] = item;
- const deleted = this.#deleteIfExpired(key, value);
- if (deleted === false) {
- yield [key, value.value];
+};
+const factory = (env) => {
+ env = utils_default.merge.call({ skipUndefined: true }, globalFetchAPI, env);
+ const { fetch: envFetch, Request, Response } = env;
+ const isFetchSupported = envFetch ? isFunction$2(envFetch) : typeof fetch === "function";
+ const isRequestSupported = isFunction$2(Request);
+ const isResponseSupported = isFunction$2(Response);
+ if (!isFetchSupported) return false;
+ const isReadableStreamSupported = isFetchSupported && isFunction$2(ReadableStream$1);
+ const encodeText = isFetchSupported && (typeof TextEncoder$2 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder$2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
+ let duplexAccessed = false;
+ const hasContentType = new Request(platform_default.origin, {
+ body: new ReadableStream$1(),
+ method: "POST",
+ get duplex() {
+ duplexAccessed = true;
+ return "half";
}
- }
- items = [...this.#oldCache];
- for (let i = items.length - 1; i >= 0; --i) {
- const item = items[i];
- const [key, value] = item;
- if (!this.#cache.has(key)) {
- const deleted = this.#deleteIfExpired(key, value);
- if (deleted === false) {
- yield [key, value.value];
+ }).headers.has("Content-Type");
+ return duplexAccessed && !hasContentType;
+ });
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
+ const resolvers = { stream: supportsResponseStream && ((res) => res.body) };
+ isFetchSupported && [
+ "text",
+ "arrayBuffer",
+ "blob",
+ "formData",
+ "stream"
+ ].forEach((type) => {
+ !resolvers[type] && (resolvers[type] = (res, config) => {
+ let method = res && res[type];
+ if (method) return method.call(res);
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
+ });
+ });
+ const getBodyLength = async (body) => {
+ if (body == null) return 0;
+ if (utils_default.isBlob(body)) return body.size;
+ if (utils_default.isSpecCompliantForm(body)) return (await new Request(platform_default.origin, {
+ method: "POST",
+ body
+ }).arrayBuffer()).byteLength;
+ if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) return body.byteLength;
+ if (utils_default.isURLSearchParams(body)) body = body + "";
+ if (utils_default.isString(body)) return (await encodeText(body)).byteLength;
+ };
+ const resolveBodyLength = async (headers, body) => {
+ const length = utils_default.toFiniteNumber(headers.getContentLength());
+ return length == null ? getBodyLength(body) : length;
+ };
+ return async (config) => {
+ let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions } = resolveConfig_default(config);
+ let _fetch = envFetch || fetch;
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+ let request = null;
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
+ composedSignal.unsubscribe();
+ });
+ let requestContentLength;
+ try {
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
+ let _request = new Request(url, {
+ method: "POST",
+ body: data,
+ duplex: "half"
+ });
+ let contentTypeHeader;
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
+ if (_request.body) {
+ const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
}
}
+ if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
+ const resolvedOptions = {
+ ...fetchOptions,
+ signal: composedSignal,
+ method: method.toUpperCase(),
+ headers: headers.normalize().toJSON(),
+ body: data,
+ duplex: "half",
+ credentials: isCredentialsSupported ? withCredentials : void 0
+ };
+ request = isRequestSupported && new Request(url, resolvedOptions);
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
+ const options = {};
+ [
+ "status",
+ "statusText",
+ "headers"
+ ].forEach((prop) => {
+ options[prop] = response[prop];
+ });
+ const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
+ flush && flush();
+ unsubscribe && unsubscribe();
+ }), options);
+ }
+ responseType = responseType || "text";
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
+ !isStreamResponse && unsubscribe && unsubscribe();
+ return await new Promise((resolve, reject) => {
+ settle(resolve, reject, {
+ data: responseData,
+ headers: AxiosHeaders$1.from(response.headers),
+ status: response.status,
+ statusText: response.statusText,
+ config,
+ request
+ });
+ });
+ } catch (err) {
+ unsubscribe && unsubscribe();
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request), { cause: err.cause || err });
+ throw AxiosError$1.from(err, err && err.code, config, request);
}
+ };
+};
+const seedCache = /* @__PURE__ */ new Map();
+const getFetch = (config) => {
+ let env = config ? config.env : {};
+ const { fetch, Request, Response } = env;
+ const seeds = [
+ Request,
+ Response,
+ fetch
+ ];
+ let i = seeds.length, seed, target, map = seedCache;
+ while (i--) {
+ seed = seeds[i];
+ target = map.get(seed);
+ target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
+ map = target;
}
- *entriesAscending() {
- for (const [key, value] of this.#entriesAscending()) {
- yield [key, value.value];
- }
+ return target;
+};
+const adapter$1 = getFetch();
+//#endregion
+//#region ../node_modules/axios/lib/adapters/adapters.js
+const knownAdapters = {
+ http: http_default,
+ xhr: xhr_default,
+ fetch: { get: getFetch }
+};
+utils_default.forEach(knownAdapters, (fn, value) => {
+ if (fn) {
+ try {
+ Object.defineProperty(fn, "name", { value });
+ } catch (e) {}
+ Object.defineProperty(fn, "adapterName", { value });
}
- get size() {
- if (!this.#size) {
- return this.#oldCache.size;
- }
- let oldCacheSize = 0;
- for (const key of this.#oldCache.keys()) {
- if (!this.#cache.has(key)) {
- oldCacheSize++;
+});
+const renderReason = (reason) => `- ${reason}`;
+const isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
+var adapters_default = {
+ getAdapter: (adapters, config) => {
+ adapters = utils_default.isArray(adapters) ? adapters : [adapters];
+ const { length } = adapters;
+ let nameOrAdapter;
+ let adapter;
+ const rejectedReasons = {};
+ for (let i = 0; i < length; i++) {
+ nameOrAdapter = adapters[i];
+ let id;
+ adapter = nameOrAdapter;
+ if (!isResolvedHandle(nameOrAdapter)) {
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+ if (adapter === void 0) throw new AxiosError$1(`Unknown adapter '${id}'`);
}
+ if (adapter && (utils_default.isFunction(adapter) || (adapter = adapter.get(config)))) break;
+ rejectedReasons[id || "#" + i] = adapter;
}
- return Math.min(this.#size + oldCacheSize, this.#maxSize);
- }
- get maxSize() {
- return this.#maxSize;
- }
- get maxAge() {
- return this.#maxAge;
- }
- entries() {
- return this.entriesAscending();
- }
- forEach(callbackFunction, thisArgument = this) {
- for (const [key, value] of this.entriesAscending()) {
- callbackFunction.call(thisArgument, value, key, this);
+ if (!adapter) {
+ const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
+ throw new AxiosError$1(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
}
- }
- get [Symbol.toStringTag]() {
- return "QuickLRU";
- }
- toString() {
- return `QuickLRU(${this.size}/${this.maxSize})`;
- }
- [Symbol.for("nodejs.util.inspect.custom")]() {
- return this.toString();
- }
+ return adapter;
+ },
+ adapters: knownAdapters
};
-
//#endregion
-//#region ../node_modules/weald/node_modules/ms/dist/index.js
-const e$2 = 1e3, t$2 = e$2 * 60, n$1 = t$2 * 60, r$1 = n$1 * 24, i$1 = r$1 * 7, a$1 = r$1 * 365.25, o$1 = a$1 / 12;
-function s$1(e, t) {
- if (typeof e == `string`) return l$1(e);
- if (typeof e == `number`) return p$1(e, t);
- throw Error(`Value provided to ms() must be a string or number. value=${JSON.stringify(e)}`);
-}
-var c$1 = s$1;
-function l$1(s) {
- if (typeof s != `string` || s.length === 0 || s.length > 100) throw Error(`Value provided to ms.parse() must be a string with length between 1 and 99. value=${JSON.stringify(s)}`);
- let c = /^(?-?\d*\.?\d+) *(?milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|months?|mo|years?|yrs?|y)?$/i.exec(s);
- if (!c?.groups) return NaN;
- let { value: l, unit: u = `ms` } = c.groups, d = parseFloat(l), f = u.toLowerCase();
- switch (f) {
- case `years`:
- case `year`:
- case `yrs`:
- case `yr`:
- case `y`: return d * a$1;
- case `months`:
- case `month`:
- case `mo`: return d * o$1;
- case `weeks`:
- case `week`:
- case `w`: return d * i$1;
- case `days`:
- case `day`:
- case `d`: return d * r$1;
- case `hours`:
- case `hour`:
- case `hrs`:
- case `hr`:
- case `h`: return d * n$1;
- case `minutes`:
- case `minute`:
- case `mins`:
- case `min`:
- case `m`: return d * t$2;
- case `seconds`:
- case `second`:
- case `secs`:
- case `sec`:
- case `s`: return d * e$2;
- case `milliseconds`:
- case `millisecond`:
- case `msecs`:
- case `msec`:
- case `ms`: return d;
- default: throw Error(`Unknown unit "${f}" provided to ms.parse(). value=${JSON.stringify(s)}`);
- }
-}
-function u$1(e) {
- return l$1(e);
-}
-function d$1(s) {
- let c = Math.abs(s);
- return c >= a$1 ? `${Math.round(s / a$1)}y` : c >= o$1 ? `${Math.round(s / o$1)}mo` : c >= i$1 ? `${Math.round(s / i$1)}w` : c >= r$1 ? `${Math.round(s / r$1)}d` : c >= n$1 ? `${Math.round(s / n$1)}h` : c >= t$2 ? `${Math.round(s / t$2)}m` : c >= e$2 ? `${Math.round(s / e$2)}s` : `${s}ms`;
-}
-function f$1(s) {
- let c = Math.abs(s);
- return c >= a$1 ? m$1(s, c, a$1, `year`) : c >= o$1 ? m$1(s, c, o$1, `month`) : c >= i$1 ? m$1(s, c, i$1, `week`) : c >= r$1 ? m$1(s, c, r$1, `day`) : c >= n$1 ? m$1(s, c, n$1, `hour`) : c >= t$2 ? m$1(s, c, t$2, `minute`) : c >= e$2 ? m$1(s, c, e$2, `second`) : `${s} ms`;
+//#region ../node_modules/axios/lib/core/dispatchRequest.js
+/**
+* Throws a `CanceledError` if cancellation has been requested.
+*
+* @param {Object} config The config that is to be used for the request
+*
+* @returns {void}
+*/
+function throwIfCancellationRequested(config) {
+ if (config.cancelToken) config.cancelToken.throwIfRequested();
+ if (config.signal && config.signal.aborted) throw new CanceledError$1(null, config);
}
-function p$1(e, t) {
- if (typeof e != `number` || !Number.isFinite(e)) throw Error(`Value provided to ms.format() must be of type number.`);
- return t?.long ? f$1(e) : d$1(e);
+/**
+* Dispatch a request to the server using the configured adapter.
+*
+* @param {object} config The config that is to be used for the request
+*
+* @returns {Promise} The Promise to be fulfilled
+*/
+function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+ config.headers = AxiosHeaders$1.from(config.headers);
+ config.data = transformData.call(config, config.transformRequest);
+ if ([
+ "post",
+ "put",
+ "patch"
+ ].indexOf(config.method) !== -1) config.headers.setContentType("application/x-www-form-urlencoded", false);
+ return adapters_default.getAdapter(config.adapter || defaults$1.adapter, config)(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+ response.data = transformData.call(config, config.transformResponse, response);
+ response.headers = AxiosHeaders$1.from(response.headers);
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel$1(reason)) {
+ throwIfCancellationRequested(config);
+ if (reason && reason.response) {
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
+ }
+ }
+ return Promise.reject(reason);
+ });
}
-function m$1(e, t, n, r) {
- let i = t >= n * 1.5;
- return `${Math.round(e / n)} ${r}${i ? `s` : ``}`;
+//#endregion
+//#region ../node_modules/axios/lib/helpers/validator.js
+const validators$1 = {};
+[
+ "object",
+ "boolean",
+ "number",
+ "function",
+ "string",
+ "symbol"
+].forEach((type, i) => {
+ validators$1[type] = function validator(thing) {
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
+ };
+});
+const deprecatedWarnings = {};
+/**
+* Transitional option validator
+*
+* @param {function|boolean?} validator - set to false if the transitional option has been removed
+* @param {string?} version - deprecated version / removed since version
+* @param {string?} message - some message with additional info
+*
+* @returns {function}
+*/
+validators$1.transitional = function transitional(validator, version, message) {
+ function formatMessage(opt, desc) {
+ return "[Axios v" + VERSION$2 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
+ }
+ return (value, opt, opts) => {
+ if (validator === false) throw new AxiosError$1(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError$1.ERR_DEPRECATED);
+ if (version && !deprecatedWarnings[opt]) {
+ deprecatedWarnings[opt] = true;
+ console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
+ }
+ return validator ? validator(value, opt, opts) : true;
+ };
+};
+validators$1.spelling = function spelling(correctSpelling) {
+ return (value, opt) => {
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
+ return true;
+ };
+};
+/**
+* Assert object's properties type
+*
+* @param {object} options
+* @param {object} schema
+* @param {boolean?} allowUnknown
+*
+* @returns {object}
+*/
+function assertOptions(options, schema, allowUnknown) {
+ if (typeof options !== "object") throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
+ const keys = Object.keys(options);
+ let i = keys.length;
+ while (i-- > 0) {
+ const opt = keys[i];
+ const validator = schema[opt];
+ if (validator) {
+ const value = options[opt];
+ const result = value === void 0 || validator(value, opt, options);
+ if (result !== true) throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
+ continue;
+ }
+ if (allowUnknown !== true) throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
+ }
}
-
+var validator_default = {
+ assertOptions,
+ validators: validators$1
+};
//#endregion
-//#region ../node_modules/weald/dist/src/common.js
-init_supports_color();
+//#region ../node_modules/axios/lib/core/Axios.js
+const validators = validator_default.validators;
/**
-* This is the common logic for both the Node.js and web browser
-* implementations of `debug()`.
+* Create a new instance of Axios
+*
+* @param {Object} instanceConfig The default config for the instance
+*
+* @return {Axios} A new instance of Axios
*/
-function setup(env) {
- createDebug.debug = createDebug;
- createDebug.default = createDebug;
- createDebug.coerce = coerce;
- createDebug.disable = disable;
- createDebug.enable = enable;
- createDebug.enabled = enabled;
- createDebug.humanize = c$1;
- createDebug.destroy = destroy;
- Object.keys(env).forEach((key) => {
- createDebug[key] = env[key];
- });
- /**
- * The currently active debug mode names, and names to skip.
- */
- createDebug.names = [];
- createDebug.skips = [];
+var Axios$1 = class {
+ constructor(instanceConfig) {
+ this.defaults = instanceConfig || {};
+ this.interceptors = {
+ request: new InterceptorManager(),
+ response: new InterceptorManager()
+ };
+ }
/**
- * Map of special "%n" handling functions, for the debug "format" argument.
+ * Dispatch a request
*
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
- createDebug.formatters = {};
- /**
- * Selects a color for a debug namespace
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
+ * @param {?Object} config
*
- * @param {string} namespace - The namespace string for the debug instance to be colored
- * @returns {number | string} An ANSI color code for the given namespace
+ * @returns {Promise} The Promise to be fulfilled
*/
- function selectColor(namespace) {
- let hash = 0;
- for (let i = 0; i < namespace.length; i++) {
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
- hash |= 0;
+ async request(configOrUrl, config) {
+ try {
+ return await this._request(configOrUrl, config);
+ } catch (err) {
+ if (err instanceof Error) {
+ let dummy = {};
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error();
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
+ try {
+ if (!err.stack) err.stack = stack;
+ else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) err.stack += "\n" + stack;
+ } catch (e) {}
+ }
+ throw err;
}
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
- createDebug.selectColor = selectColor;
- /**
- * Create a debugger with the given `namespace`.
- *
- * @param {string} namespace
- * @returns {Function}
- */
- function createDebug(namespace, options) {
- let prevTime;
- let enableOverride = null;
- let namespacesCache;
- let enabledCache;
- function debug(...args) {
- if (!debug.enabled) {
- return;
- }
- const self = debug;
- const curr = Number(new Date());
- const ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
- args[0] = createDebug.coerce(args[0]);
- if (typeof args[0] !== "string") {
- args.unshift("%O");
- }
- let index = 0;
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
- if (match === "%%") {
- return "%";
- }
- index++;
- const formatter = createDebug.formatters[format];
- if (typeof formatter === "function") {
- const val = args[index];
- match = formatter.call(self, val);
- args.splice(index, 1);
- index--;
- }
- return match;
- });
- createDebug.formatArgs.call(self, args);
- if (options?.onLog != null) {
- options.onLog(...args);
- }
- const logFn = self.log || createDebug.log;
- logFn.apply(self, args);
+ _request(configOrUrl, config) {
+ if (typeof configOrUrl === "string") {
+ config = config || {};
+ config.url = configOrUrl;
+ } else config = configOrUrl || {};
+ config = mergeConfig$1(this.defaults, config);
+ const { transitional, paramsSerializer, headers } = config;
+ if (transitional !== void 0) validator_default.assertOptions(transitional, {
+ silentJSONParsing: validators.transitional(validators.boolean),
+ forcedJSONParsing: validators.transitional(validators.boolean),
+ clarifyTimeoutError: validators.transitional(validators.boolean)
+ }, false);
+ if (paramsSerializer != null) if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
+ else validator_default.assertOptions(paramsSerializer, {
+ encode: validators.function,
+ serialize: validators.function
+ }, true);
+ if (config.allowAbsoluteUrls !== void 0) {} else if (this.defaults.allowAbsoluteUrls !== void 0) config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
+ else config.allowAbsoluteUrls = true;
+ validator_default.assertOptions(config, {
+ baseUrl: validators.spelling("baseURL"),
+ withXsrfToken: validators.spelling("withXSRFToken")
+ }, true);
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
+ let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
+ headers && utils_default.forEach([
+ "delete",
+ "get",
+ "head",
+ "post",
+ "put",
+ "patch",
+ "common"
+ ], (method) => {
+ delete headers[method];
+ });
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
+ const requestInterceptorChain = [];
+ let synchronousRequestInterceptors = true;
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) return;
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+ const responseInterceptorChain = [];
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+ let promise;
+ let i = 0;
+ let len;
+ if (!synchronousRequestInterceptors) {
+ const chain = [dispatchRequest.bind(this), void 0];
+ chain.unshift(...requestInterceptorChain);
+ chain.push(...responseInterceptorChain);
+ len = chain.length;
+ promise = Promise.resolve(config);
+ while (i < len) promise = promise.then(chain[i++], chain[i++]);
+ return promise;
}
- debug.namespace = namespace;
- debug.useColors = createDebug.useColors();
- debug.color = createDebug.selectColor(namespace);
- debug.extend = extend;
- debug.destroy = createDebug.destroy;
- Object.defineProperty(debug, "enabled", {
- enumerable: true,
- configurable: false,
- get: () => {
- if (enableOverride !== null) {
- return enableOverride;
- }
- if (namespacesCache !== createDebug.namespaces) {
- namespacesCache = createDebug.namespaces;
- enabledCache = createDebug.enabled(namespace);
- }
- return enabledCache;
- },
- set: (v) => {
- enableOverride = v;
+ len = requestInterceptorChain.length;
+ let newConfig = config;
+ while (i < len) {
+ const onFulfilled = requestInterceptorChain[i++];
+ const onRejected = requestInterceptorChain[i++];
+ try {
+ newConfig = onFulfilled(newConfig);
+ } catch (error) {
+ onRejected.call(this, error);
+ break;
}
- });
- if (typeof createDebug.init === "function") {
- createDebug.init(debug);
}
- return debug;
+ try {
+ promise = dispatchRequest.call(this, newConfig);
+ } catch (error) {
+ return Promise.reject(error);
+ }
+ i = 0;
+ len = responseInterceptorChain.length;
+ while (i < len) promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
+ return promise;
}
- function extend(namespace, delimiter) {
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
- newDebug.log = this.log;
- return newDebug;
+ getUri(config) {
+ config = mergeConfig$1(this.defaults, config);
+ return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls), config.params, config.paramsSerializer);
}
- /**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {string} namespaces
- */
- function enable(namespaces) {
- createDebug.save(namespaces);
- createDebug.namespaces = namespaces;
- createDebug.names = [];
- createDebug.skips = [];
- let i;
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
- const len = split.length;
- for (i = 0; i < len; i++) {
- if (!split[i]) {
- continue;
- }
- namespaces = split[i].replace(/\*/g, ".*?");
- if (namespaces[0] === "-") {
- createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
- } else {
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
- }
- }
+};
+utils_default.forEach([
+ "delete",
+ "get",
+ "head",
+ "options"
+], function forEachMethodNoData(method) {
+ Axios$1.prototype[method] = function(url, config) {
+ return this.request(mergeConfig$1(config || {}, {
+ method,
+ url,
+ data: (config || {}).data
+ }));
+ };
+});
+utils_default.forEach([
+ "post",
+ "put",
+ "patch"
+], function forEachMethodWithData(method) {
+ function generateHTTPMethod(isForm) {
+ return function httpMethod(url, data, config) {
+ return this.request(mergeConfig$1(config || {}, {
+ method,
+ headers: isForm ? { "Content-Type": "multipart/form-data" } : {},
+ url,
+ data
+ }));
+ };
+ }
+ Axios$1.prototype[method] = generateHTTPMethod();
+ Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
+});
+//#endregion
+//#region ../node_modules/axios/lib/cancel/CancelToken.js
+/**
+* A `CancelToken` is an object that can be used to request cancellation of an operation.
+*
+* @param {Function} executor The executor function.
+*
+* @returns {CancelToken}
+*/
+var CancelToken$1 = class CancelToken$1 {
+ constructor(executor) {
+ if (typeof executor !== "function") throw new TypeError("executor must be a function.");
+ let resolvePromise;
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+ const token = this;
+ this.promise.then((cancel) => {
+ if (!token._listeners) return;
+ let i = token._listeners.length;
+ while (i-- > 0) token._listeners[i](cancel);
+ token._listeners = null;
+ });
+ this.promise.then = (onfulfilled) => {
+ let _resolve;
+ const promise = new Promise((resolve) => {
+ token.subscribe(resolve);
+ _resolve = resolve;
+ }).then(onfulfilled);
+ promise.cancel = function reject() {
+ token.unsubscribe(_resolve);
+ };
+ return promise;
+ };
+ executor(function cancel(message, config, request) {
+ if (token.reason) return;
+ token.reason = new CanceledError$1(message, config, request);
+ resolvePromise(token.reason);
+ });
}
/**
- * Disable debug output.
- *
- * @returns {string} namespaces
+ * Throws a `CanceledError` if cancellation has been requested.
*/
- function disable() {
- const namespaces = [...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)].join(",");
- createDebug.enable("");
- return namespaces;
+ throwIfRequested() {
+ if (this.reason) throw this.reason;
}
/**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {string} name
- * @returns {boolean}
+ * Subscribe to the cancel signal
*/
- function enabled(name) {
- if (name[name.length - 1] === "*") {
- return true;
- }
- let i;
- let len;
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
- if (createDebug.skips[i].test(name)) {
- return false;
- }
- }
- for (i = 0, len = createDebug.names.length; i < len; i++) {
- if (createDebug.names[i].test(name)) {
- return true;
- }
+ subscribe(listener) {
+ if (this.reason) {
+ listener(this.reason);
+ return;
}
- return false;
+ if (this._listeners) this._listeners.push(listener);
+ else this._listeners = [listener];
}
/**
- * Convert regexp to namespace
+ * Unsubscribe from the cancel signal
*/
- function toNamespace(regexp) {
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
+ unsubscribe(listener) {
+ if (!this._listeners) return;
+ const index = this._listeners.indexOf(listener);
+ if (index !== -1) this._listeners.splice(index, 1);
}
- /**
- * Coerce `val`.
- */
- function coerce(val) {
- if (val instanceof Error) {
- return val.stack ?? val.message;
- }
- return val;
+ toAbortSignal() {
+ const controller = new AbortController();
+ const abort = (err) => {
+ controller.abort(err);
+ };
+ this.subscribe(abort);
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
+ return controller.signal;
}
/**
- * XXX DO NOT USE. This is a temporary stub function.
- * XXX It WILL be removed in the next major release.
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
*/
- function destroy() {
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
+ static source() {
+ let cancel;
+ return {
+ token: new CancelToken$1(function executor(c) {
+ cancel = c;
+ }),
+ cancel
+ };
}
- createDebug.setupFormatters(createDebug.formatters);
- createDebug.enable(createDebug.load());
- return createDebug;
-}
-
+};
//#endregion
-//#region ../node_modules/weald/dist/src/node.js
+//#region ../node_modules/axios/lib/helpers/spread.js
/**
-* @packageDocumentation
+* Syntactic sugar for invoking a function and expanding an array for arguments.
*
-* This module is a fork of the [debug](https://www.npmjs.com/package/debug) module. It has been converted to TypeScript and the output is ESM.
+* Common use case would be to use `Function.prototype.apply`.
*
-* It is API compatible with no extra features or bug fixes, it should only be used if you want a 100% ESM application.
+* ```js
+* function f(x, y, z) {}
+* var args = [1, 2, 3];
+* f.apply(null, args);
+* ```
*
-* ESM should be arriving in `debug@5.x.x` so this module can be retired after that.
+* With `spread` this example can be re-written.
*
-* Please see [debug](https://www.npmjs.com/package/debug) for API details.
-*/
-/**
-* Module dependencies.
-*/
-/**
-* This is the Node.js implementation of `debug()`.
-*/
-/**
-* Colors.
-*/
-let colors = [
- 6,
- 2,
- 3,
- 4,
- 5,
- 1
-];
-if (supportsColor.stderr !== false && (supportsColor.stderr ?? supportsColor).level >= 2) {
- colors = [
- 20,
- 21,
- 26,
- 27,
- 32,
- 33,
- 38,
- 39,
- 40,
- 41,
- 42,
- 43,
- 44,
- 45,
- 56,
- 57,
- 62,
- 63,
- 68,
- 69,
- 74,
- 75,
- 76,
- 77,
- 78,
- 79,
- 80,
- 81,
- 92,
- 93,
- 98,
- 99,
- 112,
- 113,
- 128,
- 129,
- 134,
- 135,
- 148,
- 149,
- 160,
- 161,
- 162,
- 163,
- 164,
- 165,
- 166,
- 167,
- 168,
- 169,
- 170,
- 171,
- 172,
- 173,
- 178,
- 179,
- 184,
- 185,
- 196,
- 197,
- 198,
- 199,
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 209,
- 214,
- 215,
- 220,
- 221
- ];
-}
-/**
-* Build up the default `inspectOpts` object from the environment variables.
+* ```js
+* spread(function(x, y, z) {})([1, 2, 3]);
+* ```
*
-* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
-*/
-const inspectOpts = Object.keys(process.env).filter((key) => {
- return /^debug_/i.test(key);
-}).reduce((obj, key) => {
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
- return k.toUpperCase();
- });
- let val = process.env[key];
- if (/^(yes|on|true|enabled)$/i.test(val)) {
- val = true;
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
- val = false;
- } else if (val === "null") {
- val = null;
- } else {
- val = Number(val);
- }
- obj[prop] = val;
- return obj;
-}, {});
-/**
-* Is stdout a TTY? Colored output is enabled when `true`.
-*/
-function useColors() {
- return "colors" in inspectOpts ? Boolean(inspectOpts.colors) : tty.isatty(process.stderr.fd);
-}
-/**
-* Adds ANSI color escape codes if enabled.
-*/
-function formatArgs(args) {
- const { namespace: name, useColors } = this;
- if (useColors === true) {
- const c = this.color;
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
- args.push(colorCode + "m+" + c$1(this.diff) + "\x1B[0m");
- } else {
- args[0] = getDate() + name + " " + args[0];
- }
-}
-function getDate() {
- if (inspectOpts.hideDate != null) {
- return "";
- }
- return new Date().toISOString() + " ";
-}
-/**
-* Invokes `util.format()` with the specified arguments and writes to stderr.
-*/
-function log$2(...args) {
- return process.stderr.write(util$1.format(...args) + "\n");
-}
-/**
-* Save `namespaces`.
+* @param {Function} callback
*
-* @param {string} namespaces
+* @returns {Function}
*/
-function save(namespaces) {
- if (namespaces != null) {
- process.env.DEBUG = namespaces;
- } else {
- delete process.env.DEBUG;
- }
+function spread$1(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
}
+//#endregion
+//#region ../node_modules/axios/lib/helpers/isAxiosError.js
/**
-* Load `namespaces`.
+* Determines whether the payload is an error thrown by Axios
*
-* @returns {string} returns the previously persisted debug modes
-*/
-function load$1() {
- return process.env.DEBUG;
-}
-/**
-* Init logic for `debug` instances.
+* @param {*} payload The value to test
*
-* Create a new `inspectOpts` object in case `useColors` is set
-* differently for a particular `debug` instance.
+* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
*/
-function init$3(debug) {
- debug.inspectOpts = {};
- const keys = Object.keys(inspectOpts);
- for (let i = 0; i < keys.length; i++) {
- debug.inspectOpts[keys[i]] = inspectOpts[keys[i]];
- }
-}
-function setupFormatters(formatters) {
- /**
- * Map %o to `util.inspect()`, all on a single line.
- */
- formatters.o = function(v) {
- this.inspectOpts.colors = this.useColors;
- return util$1.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
- };
- /**
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
- */
- formatters.O = function(v) {
- this.inspectOpts.colors = this.useColors;
- return util$1.inspect(v, this.inspectOpts);
- };
+function isAxiosError$1(payload) {
+ return utils_default.isObject(payload) && payload.isAxiosError === true;
}
-var node_default = setup({
- init: init$3,
- log: log$2,
- formatArgs,
- save,
- load: load$1,
- useColors,
- setupFormatters,
- colors,
- inspectOpts
+//#endregion
+//#region ../node_modules/axios/lib/helpers/HttpStatusCode.js
+const HttpStatusCode$1 = {
+ Continue: 100,
+ SwitchingProtocols: 101,
+ Processing: 102,
+ EarlyHints: 103,
+ Ok: 200,
+ Created: 201,
+ Accepted: 202,
+ NonAuthoritativeInformation: 203,
+ NoContent: 204,
+ ResetContent: 205,
+ PartialContent: 206,
+ MultiStatus: 207,
+ AlreadyReported: 208,
+ ImUsed: 226,
+ MultipleChoices: 300,
+ MovedPermanently: 301,
+ Found: 302,
+ SeeOther: 303,
+ NotModified: 304,
+ UseProxy: 305,
+ Unused: 306,
+ TemporaryRedirect: 307,
+ PermanentRedirect: 308,
+ BadRequest: 400,
+ Unauthorized: 401,
+ PaymentRequired: 402,
+ Forbidden: 403,
+ NotFound: 404,
+ MethodNotAllowed: 405,
+ NotAcceptable: 406,
+ ProxyAuthenticationRequired: 407,
+ RequestTimeout: 408,
+ Conflict: 409,
+ Gone: 410,
+ LengthRequired: 411,
+ PreconditionFailed: 412,
+ PayloadTooLarge: 413,
+ UriTooLong: 414,
+ UnsupportedMediaType: 415,
+ RangeNotSatisfiable: 416,
+ ExpectationFailed: 417,
+ ImATeapot: 418,
+ MisdirectedRequest: 421,
+ UnprocessableEntity: 422,
+ Locked: 423,
+ FailedDependency: 424,
+ TooEarly: 425,
+ UpgradeRequired: 426,
+ PreconditionRequired: 428,
+ TooManyRequests: 429,
+ RequestHeaderFieldsTooLarge: 431,
+ UnavailableForLegalReasons: 451,
+ InternalServerError: 500,
+ NotImplemented: 501,
+ BadGateway: 502,
+ ServiceUnavailable: 503,
+ GatewayTimeout: 504,
+ HttpVersionNotSupported: 505,
+ VariantAlsoNegotiates: 506,
+ InsufficientStorage: 507,
+ LoopDetected: 508,
+ NotExtended: 510,
+ NetworkAuthenticationRequired: 511
+};
+Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
+ HttpStatusCode$1[value] = key;
});
-
//#endregion
-//#region ../node_modules/weald/dist/src/index.js
+//#region ../node_modules/axios/lib/axios.js
/**
-* @packageDocumentation
-*
-* This module is a fork of the [debug](https://www.npmjs.com/package/debug) module. It has been converted to TypeScript and the output is ESM.
-*
-* It is API compatible with no extra features or bug fixes, it should only be used if you want a 100% ESM application.
-*
-* ESM should be arriving in `debug@5.x.x` so this module can be retired after that.
+* Create an instance of Axios
*
-* Please see [debug](https://www.npmjs.com/package/debug) for API details.
-*/
-/**
-* Module dependencies.
-*/
-var src_default = node_default;
-
-//#endregion
-//#region ../node_modules/dns-over-http-resolver/dist/src/utils.js
-/**
-* Build fetch resource for request
-*/
-function buildResource(serverResolver, hostname, recordType) {
- return `${serverResolver}?name=${hostname}&type=${recordType}`;
-}
-/**
-* Use fetch to find the record
-*/
-async function request$2(resource, signal) {
- const req = await fetch(resource, {
- headers: new Headers({ accept: "application/dns-json" }),
- signal
- });
- const res = await req.json();
- return res;
-}
-/**
-* Creates cache key composed by recordType and hostname
+* @param {Object} defaultConfig The default config for the instance
*
-* @param {string} hostname
-* @param {string} recordType
+* @returns {Axios} A new instance of Axios
*/
-function getCacheKey(hostname, recordType) {
- return `${recordType}_${hostname}`;
+function createInstance$1(defaultConfig) {
+ const context = new Axios$1(defaultConfig);
+ const instance = bind$1(Axios$1.prototype.request, context);
+ utils_default.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
+ utils_default.extend(instance, context, null, { allOwnKeys: true });
+ instance.create = function create(instanceConfig) {
+ return createInstance$1(mergeConfig$1(defaultConfig, instanceConfig));
+ };
+ return instance;
}
-
+const axios$1 = createInstance$1(defaults$1);
+axios$1.Axios = Axios$1;
+axios$1.CanceledError = CanceledError$1;
+axios$1.CancelToken = CancelToken$1;
+axios$1.isCancel = isCancel$1;
+axios$1.VERSION = VERSION$2;
+axios$1.toFormData = toFormData$1;
+axios$1.AxiosError = AxiosError$1;
+axios$1.Cancel = axios$1.CanceledError;
+axios$1.all = function all(promises) {
+ return Promise.all(promises);
+};
+axios$1.spread = spread$1;
+axios$1.isAxiosError = isAxiosError$1;
+axios$1.mergeConfig = mergeConfig$1;
+axios$1.AxiosHeaders = AxiosHeaders$1;
+axios$1.formToJSON = (thing) => formDataToJSON(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
+axios$1.getAdapter = adapters_default.getAdapter;
+axios$1.HttpStatusCode = HttpStatusCode$1;
+axios$1.default = axios$1;
//#endregion
-//#region ../node_modules/dns-over-http-resolver/dist/src/index.js
-const log$1 = Object.assign(src_default("dns-over-http-resolver"), { error: src_default("dns-over-http-resolver:error") });
+//#region ../node_modules/axios/index.js
+const { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION: VERSION$1, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios$1;
+//#endregion
+//#region ../utils/ai/SparkAI.js
+/**
+* SparkAI 客户端 - 讯飞星火认知大模型接口封装
+*
+* 功能说明:
+* - 封装讯飞星火认知大模型的 API 调用
+* - 支持多用户上下文管理
+* - 自动维护对话历史记录
+* - 提供简洁的问答接口
+*
+* 相关链接:
+* - 服务控制台: https://console.xfyun.cn/services/bm4
+* - 私有数据集: https://xinghuo.xfyun.cn/botcenter/private-dataset
+*/
/**
-* DNS over HTTP resolver.
-* Uses a list of servers to resolve DNS records with HTTP requests.
+* SparkAI 客户端类
+*
+* @class SparkAI
+* @description 提供与讯飞星火认知大模型服务的交互接口,支持多用户上下文管理
*/
-var Resolver = class {
- _cache;
- _TXTcache;
- _servers;
- _request;
- _abortControllers;
+var SparkAI = class {
/**
- * @class
- * @param {object} [options]
- * @param {number} [options.maxCache = 100] - maximum number of cached dns records
- * @param {Request} [options.request] - function to return DNSJSON
+ * 构造函数
+ *
+ * @param {Object} config - 配置对象
+ * @param {string} config.authKey - 讯飞星火的认证密钥(必需)
+ * @param {string} [config.baseURL='https://spark-api-open.xf-yun.com'] - API 基础地址
+ * @throws {Error} 当缺少必需的 authKey 参数时抛出错误
*/
- constructor(options = {}) {
- this._cache = new QuickLRU({ maxSize: options?.maxCache ?? 100 });
- this._TXTcache = new QuickLRU({ maxSize: options?.maxCache ?? 100 });
- this._servers = ["https://cloudflare-dns.com/dns-query", "https://dns.google/resolve"];
- this._request = options.request ?? request$2;
- this._abortControllers = [];
+ constructor({ authKey, baseURL }) {
+ if (!authKey) throw new Error("Missing required configuration parameters.");
+ /** @type {string} 认证密钥 */
+ this.authKey = authKey;
+ /** @type {string} API 基础地址 */
+ this.baseURL = baseURL || "https://spark-api-open.xf-yun.com";
+ /** @type {Object} 存储每个用户的对话上下文 */
+ this.userContexts = {};
}
/**
- * Cancel all outstanding DNS queries made by this resolver. Any outstanding
- * requests will be aborted and promises rejected.
+ * 初始化用户上下文
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @description 为新用户创建初始对话上下文,包含系统提示词
*/
- cancel() {
- this._abortControllers.forEach((controller) => {
- controller.abort();
- });
+ initUserContext(userId) {
+ if (!this.userContexts[userId]) this.userContexts[userId] = [{
+ role: "system",
+ content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
+ }];
}
/**
- * Get an array of the IP addresses currently configured for DNS resolution.
- * These addresses are formatted according to RFC 5952. It can include a custom port.
+ * 更新用户上下文
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @param {Object} message - 要添加的消息对象
+ * @param {string} message.role - 消息角色('user' 或 'assistant')
+ * @param {string} message.content - 消息内容
+ * @description 将新消息添加到用户上下文中,并自动管理上下文长度(最多保留20条消息)
*/
- getServers() {
- return this._servers;
+ updateUserContext(userId, message) {
+ this.userContexts[userId].push(message);
+ if (this.userContexts[userId].length > 20) {
+ const systemMessage = this.userContexts[userId][0];
+ const recentMessages = this.userContexts[userId].slice(-19);
+ this.userContexts[userId] = [systemMessage, ...recentMessages];
+ }
}
/**
- * Get a shuffled array of the IP addresses currently configured for DNS resolution.
- * These addresses are formatted according to RFC 5952. It can include a custom port.
+ * 向讯飞星火 AI 发送问题并获取回答
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @param {string} prompt - 用户的问题或提示
+ * @param {Object} [options={}] - 可选参数
+ * @param {number} [options.temperature] - 回答的随机性(0-1)
+ * @param {number} [options.max_tokens] - 最大回答长度
+ * @param {string} [options.model] - 使用的模型名称
+ * @param {number} [options.top_p] - 核采样参数
+ * @returns {Promise} AI 的回答内容
+ * @throws {Error} 当 API 调用失败时抛出错误
+ *
+ * @example
+ * const sparkAI = new SparkAI({ authKey: 'your-auth-key' });
+ * const answer = await sparkAI.ask('user123', '请介绍一下人工智能的发展历程');
+ * console.log(answer);
*/
- _getShuffledServers() {
- const newServers = [...this._servers];
- for (let i = newServers.length - 1; i > 0; i--) {
- const j = Math.floor(Math.random() * i);
- const temp = newServers[i];
- newServers[i] = newServers[j];
- newServers[j] = temp;
+ async ask(userId, prompt, options = {}) {
+ this.initUserContext(userId);
+ const payload = {
+ model: options.model || "4.0Ultra",
+ messages: this.userContexts[userId].concat([{
+ role: "user",
+ content: prompt
+ }]),
+ ...options
+ };
+ console.log("SparkAI API Request Payload:", payload);
+ try {
+ const response = await axios$1.post(`${this.baseURL}/v1/chat/completions`, payload, { headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${this.authKey}`
+ } });
+ if (response.data && response.data.choices && response.data.choices.length > 0) {
+ const assistantMessage = response.data.choices[0].message;
+ this.updateUserContext(userId, assistantMessage);
+ return assistantMessage.content;
+ } else throw new Error(`Error from Spark AI: ${response.data.error || "No valid response received"}`);
+ } catch (error) {
+ console.error("Error while communicating with Spark AI:", error.message);
+ if (error.response) {
+ const errorMsg = error.response.data?.error?.message || error.response.statusText;
+ throw new Error(`Spark AI API Error (${error.response.status}): ${errorMsg}`);
+ }
+ throw error;
}
- return newServers;
}
+};
+//#endregion
+//#region ../utils/ai/DeepSeek.js
+/**
+* DeepSeek AI 客户端 - DeepSeek AI 接口封装
+*
+* 功能说明:
+* - 封装 DeepSeek AI 的 API 调用
+* - 支持多用户上下文管理
+* - 自动维护对话历史记录
+* - 提供简洁的问答接口
+*
+* 相关链接:
+* - 使用统计: https://platform.deepseek.com/usage
+* - API Keys: https://platform.deepseek.com/api_keys
+*/
+/**
+* DeepSeek AI 客户端类
+*
+* @class DeepSeek
+* @description 提供与 DeepSeek AI 服务的交互接口,支持多用户上下文管理
+*/
+var DeepSeek = class {
/**
- * Sets the IP address and port of servers to be used when performing DNS resolution.
- *
- * @param {string[]} servers - array of RFC 5952 formatted addresses.
+ * 构造函数
+ *
+ * @param {Object} config - 配置对象
+ * @param {string} config.apiKey - DeepSeek AI 的 API 密钥(必需)
+ * @param {string} [config.baseURL='https://api.deepseek.com'] - API 基础地址
+ * @throws {Error} 当缺少必需的 apiKey 参数时抛出错误
*/
- setServers(servers) {
- this._servers = servers;
- }
- async resolve(hostname, rrType = "A") {
- switch (rrType) {
- case "A": return this.resolve4(hostname);
- case "AAAA": return this.resolve6(hostname);
- case "TXT": return this.resolveTxt(hostname);
- default: throw new Error(`${rrType} is not supported`);
- }
+ constructor({ apiKey, baseURL }) {
+ if (!apiKey) throw new Error("Missing required configuration parameters.");
+ /** @type {string} API 密钥 */
+ this.apiKey = apiKey;
+ /** @type {string} API 基础地址 */
+ this.baseURL = baseURL || "https://api.deepseek.com";
+ /** @type {Object} 存储每个用户的对话上下文 */
+ this.userContexts = {};
}
/**
- * Uses the DNS protocol to resolve the given host name into IPv4 addresses
- *
- * @param {string} hostname - host name to resolve
+ * 初始化用户上下文
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @description 为新用户创建初始对话上下文,包含系统提示词
*/
- async resolve4(hostname) {
- const recordType = "A";
- const cached = this._cache.get(getCacheKey(hostname, recordType));
- if (cached != null) {
- return cached;
- }
- let aborted = false;
- for (const server of this._getShuffledServers()) {
- const controller = new AbortController();
- this._abortControllers.push(controller);
- try {
- const response = await this._request(buildResource(server, hostname, recordType), controller.signal);
- const data = response.Answer.map((a) => a.data);
- const ttl = Math.min(...response.Answer.map((a) => a.TTL));
- this._cache.set(getCacheKey(hostname, recordType), data, { maxAge: ttl });
- return data;
- } catch (err) {
- if (controller.signal.aborted) {
- aborted = true;
- }
- log$1.error(`${server} could not resolve ${hostname} record ${recordType}`);
- } finally {
- this._abortControllers = this._abortControllers.filter((c) => c !== controller);
- }
- }
- if (aborted) {
- throw Object.assign(new Error("queryA ECANCELLED"), { code: "ECANCELLED" });
- }
- throw new Error(`Could not resolve ${hostname} record ${recordType}`);
+ initUserContext(userId) {
+ if (!this.userContexts[userId]) this.userContexts[userId] = [{
+ role: "system",
+ content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
+ }];
}
/**
- * Uses the DNS protocol to resolve the given host name into IPv6 addresses
- *
- * @param {string} hostname - host name to resolve
+ * 更新用户上下文
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @param {Object} message - 要添加的消息对象
+ * @param {string} message.role - 消息角色('user' 或 'assistant')
+ * @param {string} message.content - 消息内容
+ * @description 将新消息添加到用户上下文中,并自动管理上下文长度(最多保留20条消息)
*/
- async resolve6(hostname) {
- const recordType = "AAAA";
- const cached = this._cache.get(getCacheKey(hostname, recordType));
- if (cached != null) {
- return cached;
- }
- let aborted = false;
- for (const server of this._getShuffledServers()) {
- const controller = new AbortController();
- this._abortControllers.push(controller);
- try {
- const response = await this._request(buildResource(server, hostname, recordType), controller.signal);
- const data = response.Answer.map((a) => a.data);
- const ttl = Math.min(...response.Answer.map((a) => a.TTL));
- this._cache.set(getCacheKey(hostname, recordType), data, { maxAge: ttl });
- return data;
- } catch (err) {
- if (controller.signal.aborted) {
- aborted = true;
- }
- log$1.error(`${server} could not resolve ${hostname} record ${recordType}`);
- } finally {
- this._abortControllers = this._abortControllers.filter((c) => c !== controller);
- }
- }
- if (aborted) {
- throw Object.assign(new Error("queryAaaa ECANCELLED"), { code: "ECANCELLED" });
+ updateUserContext(userId, message) {
+ this.userContexts[userId].push(message);
+ if (this.userContexts[userId].length > 20) {
+ const systemMessage = this.userContexts[userId][0];
+ const recentMessages = this.userContexts[userId].slice(-19);
+ this.userContexts[userId] = [systemMessage, ...recentMessages];
}
- throw new Error(`Could not resolve ${hostname} record ${recordType}`);
}
/**
- * Uses the DNS protocol to resolve the given host name into a Text record
- *
- * @param {string} hostname - host name to resolve
+ * 向 DeepSeek AI 发送问题并获取回答
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @param {string} prompt - 用户的问题或提示
+ * @param {Object} [options={}] - 可选参数
+ * @param {number} [options.temperature] - 回答的随机性(0-2)
+ * @param {number} [options.max_tokens] - 最大回答长度
+ * @param {string} [options.model] - 使用的模型名称
+ * @param {number} [options.top_p] - 核采样参数
+ * @returns {Promise} AI 的回答内容
+ * @throws {Error} 当 API 调用失败时抛出错误
+ *
+ * @example
+ * const deepseek = new DeepSeek({ apiKey: 'your-api-key' });
+ * const answer = await deepseek.ask('user123', '解释一下深度学习的原理');
+ * console.log(answer);
*/
- async resolveTxt(hostname) {
- const recordType = "TXT";
- const cached = this._TXTcache.get(getCacheKey(hostname, recordType));
- if (cached != null) {
- return cached;
- }
- let aborted = false;
- for (const server of this._getShuffledServers()) {
- const controller = new AbortController();
- this._abortControllers.push(controller);
- try {
- const response = await this._request(buildResource(server, hostname, recordType), controller.signal);
- const data = response.Answer.map((a) => [a.data.replace(/['"]+/g, "")]);
- const ttl = Math.min(...response.Answer.map((a) => a.TTL));
- this._TXTcache.set(getCacheKey(hostname, recordType), data, { maxAge: ttl });
- return data;
- } catch (err) {
- if (controller.signal.aborted) {
- aborted = true;
- }
- log$1.error(`${server} could not resolve ${hostname} record ${recordType}`);
- } finally {
- this._abortControllers = this._abortControllers.filter((c) => c !== controller);
+ async ask(userId, prompt, options = {}) {
+ this.initUserContext(userId);
+ const payload = {
+ model: options.model || "deepseek-chat",
+ messages: this.userContexts[userId].concat([{
+ role: "user",
+ content: prompt
+ }]),
+ ...options
+ };
+ console.log("DeepSeek API Request Payload:", payload);
+ try {
+ const response = await axios$1.post(`${this.baseURL}/chat/completions`, payload, { headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${this.apiKey}`
+ } });
+ if (response.data && response.data.choices && response.data.choices.length > 0) {
+ const assistantMessage = response.data.choices[0].message;
+ this.updateUserContext(userId, assistantMessage);
+ return assistantMessage.content;
+ } else throw new Error(`Error from DeepSeek AI: ${response.data.error || "No valid response received"}`);
+ } catch (error) {
+ console.error("Error while communicating with DeepSeek AI:", error.message);
+ if (error.response) {
+ const errorMsg = error.response.data?.error?.message || error.response.statusText;
+ throw new Error(`DeepSeek AI API Error (${error.response.status}): ${errorMsg}`);
}
+ throw error;
}
- if (aborted) {
- throw Object.assign(new Error("queryTxt ECANCELLED"), { code: "ECANCELLED" });
- }
- throw new Error(`Could not resolve ${hostname} record ${recordType}`);
- }
- clearCache() {
- this._cache.clear();
- this._TXTcache.clear();
}
};
-
//#endregion
-//#region ../node_modules/agent-base/dist/helpers.js
-var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = {
- enumerable: true,
- get: function() {
- return m[k];
- }
- };
- }
- Object.defineProperty(o, k2, desc);
- }) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
- }));
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", {
- enumerable: true,
- value: v
- });
- }) : function(o, v) {
- o["default"] = v;
- });
- var __importStar = exports && exports.__importStar || function(mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) {
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- }
- __setModuleDefault(result, mod);
- return result;
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.req = exports.json = exports.toBuffer = void 0;
- const http$8 = __importStar(__require("http"));
- const https$3 = __importStar(__require("https"));
- async function toBuffer(stream) {
- let length = 0;
- const chunks = [];
- for await (const chunk of stream) {
- length += chunk.length;
- chunks.push(chunk);
- }
- return Buffer.concat(chunks, length);
+//#region ../utils/ai/SparkAIBot.js
+var SparkAIBot = class {
+ constructor(appId, uid, assistantId, apiKey) {
+ if (!appId || !assistantId) throw new Error("Missing required configuration parameters.");
+ this.appId = appId;
+ this.uid = uid || "道长";
+ this.assistantId = assistantId;
+ this.apiKey = apiKey;
+ this.wsUrl = `wss://spark-openapi.cn-huabei-1.xf-yun.com/v1/assistants/${assistantId}`;
+ this.userContexts = {};
}
- exports.toBuffer = toBuffer;
- async function json(stream) {
- const buf = await toBuffer(stream);
- const str = buf.toString("utf8");
- try {
- return JSON.parse(str);
- } catch (_err) {
- const err = _err;
- err.message += ` (input: ${str})`;
- throw err;
- }
+ generateSignature() {
+ const timestamp = Math.floor(Date.now() / 1e3);
+ const signature = `${this.appId}${timestamp}${this.apiKey}`;
+ const hash = crypto$1.createHash("sha256");
+ hash.update(signature);
+ return hash.digest("hex");
}
- exports.json = json;
- function req(url, opts = {}) {
- const href = typeof url === "string" ? url : url.href;
- const req = (href.startsWith("https:") ? https$3 : http$8).request(url, opts);
- const promise = new Promise((resolve, reject) => {
- req.once("response", resolve).once("error", reject).end();
+ initUserContext(userId) {
+ if (!this.userContexts[userId]) this.userContexts[userId] = [{
+ role: "system",
+ content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
+ }];
+ }
+ updateUserContext(userId, message) {
+ this.userContexts[userId].push(message);
+ if (this.userContexts[userId].length > 20) this.userContexts[userId] = this.userContexts[userId].slice(-20);
+ }
+ connectToAssistant() {
+ const ws = new wrapper_default(this.wsUrl, { headers: {
+ "x-signature": this.generateSignature(),
+ "x-app-id": this.appId
+ } });
+ ws.on("open", () => {});
+ return ws;
+ }
+ sendMessage(ws, userId, prompt) {
+ const requestPayload = {
+ header: {
+ app_id: this.appId,
+ uid: userId
+ },
+ parameter: { chat: {
+ domain: "general",
+ temperature: .5,
+ top_k: 4,
+ max_tokens: 2028
+ } },
+ payload: { message: { text: this.userContexts[userId].concat([{
+ role: "user",
+ content: prompt
+ }]) } }
+ };
+ ws.send(JSON.stringify(requestPayload));
+ }
+ ask(userId, prompt) {
+ return new Promise((resolve, reject) => {
+ this.initUserContext(userId);
+ const ws = this.connectToAssistant();
+ let fullResponse = "";
+ ws.on("message", (data) => {
+ const response = JSON.parse(data);
+ if (response && response.payload && response.payload.choices) response.payload.choices.text.forEach((choice) => {
+ fullResponse += choice.content;
+ });
+ });
+ ws.on("open", () => {
+ this.sendMessage(ws, userId, prompt);
+ });
+ ws.on("close", () => {
+ this.updateUserContext(userId, {
+ role: "assistant",
+ content: fullResponse
+ });
+ resolve(fullResponse);
+ });
+ ws.on("error", (error) => {
+ console.error("WebSocket error:", error);
+ reject(error);
+ });
});
- req.then = promise.then.bind(promise);
- return req;
}
- exports.req = req;
-}));
-
+};
//#endregion
-//#region ../node_modules/agent-base/dist/index.js
-var require_dist$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = {
- enumerable: true,
- get: function() {
- return m[k];
- }
- };
- }
- Object.defineProperty(o, k2, desc);
- }) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
- }));
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", {
- enumerable: true,
- value: v
- });
- }) : function(o, v) {
- o["default"] = v;
- });
- var __importStar = exports && exports.__importStar || function(mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) {
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- }
- __setModuleDefault(result, mod);
- return result;
- };
- var __exportStar = exports && exports.__exportStar || function(m, exports$6) {
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$6, p)) __createBinding(exports$6, m, p);
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.Agent = void 0;
- const net$5 = __importStar(__require("net"));
- const http$7 = __importStar(__require("http"));
- const https_1 = __require("https");
- __exportStar(require_helpers(), exports);
- const INTERNAL = Symbol("AgentBaseInternalState");
- var Agent = class extends http$7.Agent {
- constructor(opts) {
- super(opts);
- this[INTERNAL] = {};
- }
- /**
- * Determine whether this is an `http` or `https` request.
- */
- isSecureEndpoint(options) {
- if (options) {
- if (typeof options.secureEndpoint === "boolean") {
- return options.secureEndpoint;
- }
- if (typeof options.protocol === "string") {
- return options.protocol === "https:";
- }
- }
- const { stack } = new Error();
- if (typeof stack !== "string") return false;
- return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
- }
- incrementSockets(name) {
- if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
- return null;
- }
- if (!this.sockets[name]) {
- this.sockets[name] = [];
- }
- const fakeSocket = new net$5.Socket({ writable: false });
- this.sockets[name].push(fakeSocket);
- this.totalSocketCount++;
- return fakeSocket;
- }
- decrementSockets(name, socket) {
- if (!this.sockets[name] || socket === null) {
- return;
- }
- const sockets = this.sockets[name];
- const index = sockets.indexOf(socket);
- if (index !== -1) {
- sockets.splice(index, 1);
- this.totalSocketCount--;
- if (sockets.length === 0) {
- delete this.sockets[name];
- }
- }
- }
- getName(options) {
- const secureEndpoint = this.isSecureEndpoint(options);
- if (secureEndpoint) {
- return https_1.Agent.prototype.getName.call(this, options);
- }
- return super.getName(options);
- }
- createSocket(req, options, cb) {
- const connectOpts = {
- ...options,
- secureEndpoint: this.isSecureEndpoint(options)
- };
- const name = this.getName(connectOpts);
- const fakeSocket = this.incrementSockets(name);
- Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
- this.decrementSockets(name, fakeSocket);
- if (socket instanceof http$7.Agent) {
- try {
- return socket.addRequest(req, connectOpts);
- } catch (err) {
- return cb(err);
- }
- }
- this[INTERNAL].currentSocket = socket;
- super.createSocket(req, options, cb);
- }, (err) => {
- this.decrementSockets(name, fakeSocket);
- cb(err);
- });
- }
- createConnection() {
- const socket = this[INTERNAL].currentSocket;
- this[INTERNAL].currentSocket = undefined;
- if (!socket) {
- throw new Error("No socket was returned in the `connect()` function");
- }
- return socket;
- }
- get defaultPort() {
- return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
- }
- set defaultPort(v) {
- if (this[INTERNAL]) {
- this[INTERNAL].defaultPort = v;
- }
- }
- get protocol() {
- return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
+//#region ../utils/ai/Kimi.js
+/**
+* Kimi AI 客户端 - 月之暗面 Moonshot AI 接口封装
+*
+* 功能说明:
+* - 封装 Moonshot AI (Kimi) 的 API 调用
+* - 支持多用户上下文管理
+* - 自动维护对话历史记录
+* - 提供简洁的问答接口
+*
+* 相关链接:
+* - API Keys: https://platform.moonshot.cn/console/api-keys
+* - 使用限制: https://platform.moonshot.cn/console/limits
+*/
+/**
+* Kimi AI 客户端类
+*
+* @class Kimi
+* @description 提供与 Moonshot AI 服务的交互接口,支持多用户上下文管理
+*/
+var Kimi = class {
+ /**
+ * 构造函数
+ *
+ * @param {Object} config - 配置对象
+ * @param {string} config.apiKey - Moonshot AI 的 API 密钥(必需)
+ * @param {string} [config.baseURL='https://api.moonshot.cn/v1'] - API 基础地址
+ * @throws {Error} 当缺少必需的 apiKey 参数时抛出错误
+ */
+ constructor({ apiKey, baseURL }) {
+ if (!apiKey) throw new Error("Missing required configuration parameters.");
+ /** @type {string} API 密钥 */
+ this.apiKey = apiKey;
+ /** @type {string} API 基础地址 */
+ this.baseURL = baseURL || "https://api.moonshot.cn/v1";
+ /** @type {Object} 存储每个用户的对话上下文 */
+ this.userContexts = {};
+ }
+ /**
+ * 初始化用户上下文
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @description 为新用户创建初始对话上下文,包含系统提示词
+ */
+ initUserContext(userId) {
+ if (!this.userContexts[userId]) this.userContexts[userId] = [{
+ role: "system",
+ content: "你是一名优秀的AI助手,知道最新的互联网内容,善用搜索引擎和github并总结最贴切的结论来回答我提出的每一个问题"
+ }];
+ }
+ /**
+ * 更新用户上下文
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @param {Object} message - 要添加的消息对象
+ * @param {string} message.role - 消息角色('user' 或 'assistant')
+ * @param {string} message.content - 消息内容
+ * @description 将新消息添加到用户上下文中,并自动管理上下文长度(最多保留20条消息)
+ */
+ updateUserContext(userId, message) {
+ this.userContexts[userId].push(message);
+ if (this.userContexts[userId].length > 20) {
+ const systemMessage = this.userContexts[userId][0];
+ const recentMessages = this.userContexts[userId].slice(-19);
+ this.userContexts[userId] = [systemMessage, ...recentMessages];
}
- set protocol(v) {
- if (this[INTERNAL]) {
- this[INTERNAL].protocol = v;
+ }
+ /**
+ * 向 Kimi AI 发送问题并获取回答
+ *
+ * @param {string} userId - 用户唯一标识符
+ * @param {string} prompt - 用户的问题或提示
+ * @param {Object} [options={}] - 可选参数
+ * @param {number} [options.temperature] - 回答的随机性(0-1)
+ * @param {number} [options.max_tokens] - 最大回答长度
+ * @param {string} [options.model] - 使用的模型名称
+ * @returns {Promise} AI 的回答内容
+ * @throws {Error} 当 API 调用失败时抛出错误
+ *
+ * @example
+ * const kimi = new Kimi({ apiKey: 'your-api-key' });
+ * const answer = await kimi.ask('user123', '什么是人工智能?');
+ * console.log(answer);
+ */
+ async ask(userId, prompt, options = {}) {
+ this.initUserContext(userId);
+ const payload = {
+ model: options.model || "moonshot-v1-8k",
+ messages: this.userContexts[userId].concat([{
+ role: "user",
+ content: prompt
+ }]),
+ ...options
+ };
+ console.log("Kimi API Request Payload:", payload);
+ try {
+ const response = await axios$1.post(`${this.baseURL}/chat/completions`, payload, { headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${this.apiKey}`
+ } });
+ if (response.data && response.data.choices && response.data.choices.length > 0) {
+ const assistantMessage = response.data.choices[0].message;
+ this.updateUserContext(userId, assistantMessage);
+ return assistantMessage.content;
+ } else throw new Error(`Error from Kimi AI: ${response.data.error || "No valid response received"}`);
+ } catch (error) {
+ console.error("Error while communicating with Kimi AI:", error.message);
+ if (error.response) {
+ const errorMsg = error.response.data?.error?.message || error.response.statusText;
+ throw new Error(`Kimi AI API Error (${error.response.status}): ${errorMsg}`);
}
+ throw error;
}
- };
- exports.Agent = Agent;
-}));
-
+ }
+};
//#endregion
-//#region ../node_modules/https-proxy-agent/dist/parse-proxy-response.js
-var require_parse_proxy_response = /* @__PURE__ */ __commonJSMin(((exports) => {
- var __importDefault = exports && exports.__importDefault || function(mod) {
- return mod && mod.__esModule ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.parseProxyResponse = void 0;
- const debug_1 = __importDefault(require_src());
- const debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
- function parseProxyResponse(socket) {
- return new Promise((resolve, reject) => {
- let buffersLength = 0;
- const buffers = [];
- function read() {
- const b = socket.read();
- if (b) ondata(b);
- else socket.once("readable", read);
+//#region ../utils/ais.js
+/**
+* AI服务模块集合
+* 统一导入和导出各种AI服务提供商的实现
+*
+* 支持的AI服务:
+* - SparkAI: 讯飞星火AI服务
+* - DeepSeek: DeepSeek AI服务
+* - SparkAIBot: 讯飞星火AI机器人服务
+* - Kimi: Kimi AI服务
+*
+* @example
+* import ais from './ais.js';
+* const sparkAI = new ais.SparkAI(config);
+* const response = await sparkAI.chat('你好');
+*/
+var ais_default = {
+ SparkAI,
+ DeepSeek,
+ SparkAIBot,
+ Kimi
+};
+//#endregion
+//#region ../node_modules/dayjs/dayjs.min.js
+var require_dayjs_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
+ (function(t, e) {
+ "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
+ })(exports, (function() {
+ "use strict";
+ var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
+ name: "en",
+ weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
+ months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
+ ordinal: function(t) {
+ var e = [
+ "th",
+ "st",
+ "nd",
+ "rd"
+ ], n = t % 100;
+ return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
}
- function cleanup() {
- socket.removeListener("end", onend);
- socket.removeListener("error", onerror);
- socket.removeListener("readable", read);
+ }, m = function(t, e, n) {
+ var r = String(t);
+ return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
+ }, v = {
+ s: m,
+ z: function(t) {
+ var e = -t.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), i = n % 60;
+ return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
+ },
+ m: function t(e, n) {
+ if (e.date() < n.date()) return -t(n, e);
+ var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), i = e.clone().add(r, c), s = n - i < 0, u = e.clone().add(r + (s ? -1 : 1), c);
+ return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
+ },
+ a: function(t) {
+ return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
+ },
+ p: function(t) {
+ return {
+ M: c,
+ y: h,
+ w: o,
+ d: a,
+ D: d,
+ h: u,
+ m: s,
+ s: i,
+ ms: r,
+ Q: f
+ }[t] || String(t || "").toLowerCase().replace(/s$/, "");
+ },
+ u: function(t) {
+ return void 0 === t;
}
- function onend() {
- cleanup();
- debug("onend");
- reject(new Error("Proxy connection ended before receiving CONNECT response"));
+ }, g = "en", D = {};
+ D[g] = M;
+ var p = "$isDayjsObject", S = function(t) {
+ return t instanceof _ || !(!t || !t[p]);
+ }, w = function t(e, n, r) {
+ var i;
+ if (!e) return g;
+ if ("string" == typeof e) {
+ var s = e.toLowerCase();
+ D[s] && (i = s), n && (D[s] = n, i = s);
+ var u = e.split("-");
+ if (!i && u.length > 1) return t(u[0]);
+ } else {
+ var a = e.name;
+ D[a] = e, i = a;
}
- function onerror(err) {
- cleanup();
- debug("onerror %o", err);
- reject(err);
+ return !r && i && (g = i), i || !r && g;
+ }, O = function(t, e) {
+ if (S(t)) return t.clone();
+ var n = "object" == typeof e ? e : {};
+ return n.date = t, n.args = arguments, new _(n);
+ }, b = v;
+ b.l = w, b.i = S, b.w = function(t, e) {
+ return O(t, {
+ locale: e.$L,
+ utc: e.$u,
+ x: e.$x,
+ $offset: e.$offset
+ });
+ };
+ var _ = function() {
+ function M(t) {
+ this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0;
}
- function ondata(b) {
- buffers.push(b);
- buffersLength += b.length;
- const buffered = Buffer.concat(buffers, buffersLength);
- const endOfHeaders = buffered.indexOf("\r\n\r\n");
- if (endOfHeaders === -1) {
- debug("have not received end of HTTP headers yet...");
- read();
- return;
- }
- const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n");
- const firstLine = headerParts.shift();
- if (!firstLine) {
- socket.destroy();
- return reject(new Error("No header received from proxy CONNECT response"));
- }
- const firstLineParts = firstLine.split(" ");
- const statusCode = +firstLineParts[1];
- const statusText = firstLineParts.slice(2).join(" ");
- const headers = {};
- for (const header of headerParts) {
- if (!header) continue;
- const firstColon = header.indexOf(":");
- if (firstColon === -1) {
- socket.destroy();
- return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
- }
- const key = header.slice(0, firstColon).toLowerCase();
- const value = header.slice(firstColon + 1).trimStart();
- const current = headers[key];
- if (typeof current === "string") {
- headers[key] = [current, value];
- } else if (Array.isArray(current)) {
- current.push(value);
- } else {
- headers[key] = value;
+ var m = M.prototype;
+ return m.parse = function(t) {
+ this.$d = function(t) {
+ var e = t.date, n = t.utc;
+ if (null === e) return /* @__PURE__ */ new Date(NaN);
+ if (b.u(e)) return /* @__PURE__ */ new Date();
+ if (e instanceof Date) return new Date(e);
+ if ("string" == typeof e && !/Z$/i.test(e)) {
+ var r = e.match($);
+ if (r) {
+ var i = r[2] - 1 || 0, s = (r[7] || "0").substring(0, 3);
+ return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
+ }
}
+ return new Date(e);
+ }(t), this.init();
+ }, m.init = function() {
+ var t = this.$d;
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
+ }, m.$utils = function() {
+ return b;
+ }, m.isValid = function() {
+ return !(this.$d.toString() === l);
+ }, m.isSame = function(t, e) {
+ var n = O(t);
+ return this.startOf(e) <= n && n <= this.endOf(e);
+ }, m.isAfter = function(t, e) {
+ return O(t) < this.startOf(e);
+ }, m.isBefore = function(t, e) {
+ return this.endOf(e) < O(t);
+ }, m.$g = function(t, e, n) {
+ return b.u(t) ? this[e] : this.set(n, t);
+ }, m.unix = function() {
+ return Math.floor(this.valueOf() / 1e3);
+ }, m.valueOf = function() {
+ return this.$d.getTime();
+ }, m.startOf = function(t, e) {
+ var n = this, r = !!b.u(e) || e, f = b.p(t), l = function(t, e) {
+ var i = b.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
+ return r ? i : i.endOf(a);
+ }, $ = function(t, e) {
+ return b.w(n.toDate()[t].apply(n.toDate("s"), (r ? [
+ 0,
+ 0,
+ 0,
+ 0
+ ] : [
+ 23,
+ 59,
+ 59,
+ 999
+ ]).slice(e)), n);
+ }, y = this.$W, M = this.$M, m = this.$D, v = "set" + (this.$u ? "UTC" : "");
+ switch (f) {
+ case h: return r ? l(1, 0) : l(31, 11);
+ case c: return r ? l(1, M) : l(0, M + 1);
+ case o:
+ var g = this.$locale().weekStart || 0, D = (y < g ? y + 7 : y) - g;
+ return l(r ? m - D : m + (6 - D), M);
+ case a:
+ case d: return $(v + "Hours", 0);
+ case u: return $(v + "Minutes", 1);
+ case s: return $(v + "Seconds", 2);
+ case i: return $(v + "Milliseconds", 3);
+ default: return this.clone();
}
- debug("got proxy server response: %o %o", firstLine, headers);
- cleanup();
- resolve({
- connect: {
- statusCode,
- statusText,
- headers
- },
- buffered
- });
- }
- socket.on("error", onerror);
- socket.on("end", onend);
- read();
- });
- }
- exports.parseProxyResponse = parseProxyResponse;
+ }, m.endOf = function(t) {
+ return this.startOf(t, !1);
+ }, m.$set = function(t, e) {
+ var n, o = b.p(t), f = "set" + (this.$u ? "UTC" : ""), l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[s] = f + "Minutes", n[i] = f + "Seconds", n[r] = f + "Milliseconds", n)[o], $ = o === a ? this.$D + (e - this.$W) : e;
+ if (o === c || o === h) {
+ var y = this.clone().set(d, 1);
+ y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
+ } else l && this.$d[l]($);
+ return this.init(), this;
+ }, m.set = function(t, e) {
+ return this.clone().$set(t, e);
+ }, m.get = function(t) {
+ return this[b.p(t)]();
+ }, m.add = function(r, f) {
+ var d, l = this;
+ r = Number(r);
+ var $ = b.p(f), y = function(t) {
+ var e = O(l);
+ return b.w(e.date(e.date() + Math.round(t * r)), l);
+ };
+ if ($ === c) return this.set(c, this.$M + r);
+ if ($ === h) return this.set(h, this.$y + r);
+ if ($ === a) return y(1);
+ if ($ === o) return y(7);
+ var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1, m = this.$d.getTime() + r * M;
+ return b.w(m, this);
+ }, m.subtract = function(t, e) {
+ return this.add(-1 * t, e);
+ }, m.format = function(t) {
+ var e = this, n = this.$locale();
+ if (!this.isValid()) return n.invalidDate || l;
+ var r = t || "YYYY-MM-DDTHH:mm:ssZ", i = b.z(this), s = this.$H, u = this.$m, a = this.$M, o = n.weekdays, c = n.months, f = n.meridiem, h = function(t, n, i, s) {
+ return t && (t[n] || t(e, r)) || i[n].slice(0, s);
+ }, d = function(t) {
+ return b.s(s % 12 || 12, t, "0");
+ }, $ = f || function(t, e, n) {
+ var r = t < 12 ? "AM" : "PM";
+ return n ? r.toLowerCase() : r;
+ };
+ return r.replace(y, (function(t, r) {
+ return r || function(t) {
+ switch (t) {
+ case "YY": return String(e.$y).slice(-2);
+ case "YYYY": return b.s(e.$y, 4, "0");
+ case "M": return a + 1;
+ case "MM": return b.s(a + 1, 2, "0");
+ case "MMM": return h(n.monthsShort, a, c, 3);
+ case "MMMM": return h(c, a);
+ case "D": return e.$D;
+ case "DD": return b.s(e.$D, 2, "0");
+ case "d": return String(e.$W);
+ case "dd": return h(n.weekdaysMin, e.$W, o, 2);
+ case "ddd": return h(n.weekdaysShort, e.$W, o, 3);
+ case "dddd": return o[e.$W];
+ case "H": return String(s);
+ case "HH": return b.s(s, 2, "0");
+ case "h": return d(1);
+ case "hh": return d(2);
+ case "a": return $(s, u, !0);
+ case "A": return $(s, u, !1);
+ case "m": return String(u);
+ case "mm": return b.s(u, 2, "0");
+ case "s": return String(e.$s);
+ case "ss": return b.s(e.$s, 2, "0");
+ case "SSS": return b.s(e.$ms, 3, "0");
+ case "Z": return i;
+ }
+ return null;
+ }(t) || i.replace(":", "");
+ }));
+ }, m.utcOffset = function() {
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
+ }, m.diff = function(r, d, l) {
+ var $, y = this, M = b.p(d), m = O(r), v = (m.utcOffset() - this.utcOffset()) * e, g = this - m, D = function() {
+ return b.m(y, m);
+ };
+ switch (M) {
+ case h:
+ $ = D() / 12;
+ break;
+ case c:
+ $ = D();
+ break;
+ case f:
+ $ = D() / 3;
+ break;
+ case o:
+ $ = (g - v) / 6048e5;
+ break;
+ case a:
+ $ = (g - v) / 864e5;
+ break;
+ case u:
+ $ = g / n;
+ break;
+ case s:
+ $ = g / e;
+ break;
+ case i:
+ $ = g / t;
+ break;
+ default: $ = g;
+ }
+ return l ? $ : b.a($);
+ }, m.daysInMonth = function() {
+ return this.endOf(c).$D;
+ }, m.$locale = function() {
+ return D[this.$L];
+ }, m.locale = function(t, e) {
+ if (!t) return this.$L;
+ var n = this.clone(), r = w(t, e, !0);
+ return r && (n.$L = r), n;
+ }, m.clone = function() {
+ return b.w(this.$d, this);
+ }, m.toDate = function() {
+ return new Date(this.valueOf());
+ }, m.toJSON = function() {
+ return this.isValid() ? this.toISOString() : null;
+ }, m.toISOString = function() {
+ return this.$d.toISOString();
+ }, m.toString = function() {
+ return this.$d.toUTCString();
+ }, M;
+ }(), k = _.prototype;
+ return O.prototype = k, [
+ ["$ms", r],
+ ["$s", i],
+ ["$m", s],
+ ["$H", u],
+ ["$W", a],
+ ["$M", c],
+ ["$y", h],
+ ["$D", d]
+ ].forEach((function(t) {
+ k[t[1]] = function(e) {
+ return this.$g(e, t[0], t[1]);
+ };
+ })), O.extend = function(t, e) {
+ return t.$i || (t(e, _, O), t.$i = !0), O;
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t) {
+ return O(1e3 * t);
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
+ }));
}));
-
//#endregion
-//#region ../node_modules/https-proxy-agent/dist/index.js
-var require_dist$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = {
- enumerable: true,
- get: function() {
- return m[k];
- }
- };
+//#region ../node_modules/quick-lru/index.js
+var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
+var QuickLRU = class extends Map {
+ #size = 0;
+ #cache = /* @__PURE__ */ new Map();
+ #oldCache = /* @__PURE__ */ new Map();
+ #maxSize;
+ #maxAge;
+ #onEviction;
+ constructor(options = {}) {
+ super();
+ if (!(options.maxSize && options.maxSize > 0)) throw new TypeError("`maxSize` must be a number greater than 0");
+ if (typeof options.maxAge === "number" && options.maxAge === 0) throw new TypeError("`maxAge` must be a number greater than 0");
+ this.#maxSize = options.maxSize;
+ this.#maxAge = options.maxAge || Number.POSITIVE_INFINITY;
+ this.#onEviction = options.onEviction;
+ }
+ get __oldCache() {
+ return this.#oldCache;
+ }
+ #emitEvictions(cache) {
+ if (typeof this.#onEviction !== "function") return;
+ for (const [key, item] of cache) this.#onEviction(key, item.value);
+ }
+ #deleteIfExpired(key, item) {
+ if (typeof item.expiry === "number" && item.expiry <= Date.now()) {
+ if (typeof this.#onEviction === "function") this.#onEviction(key, item.value);
+ return this.delete(key);
}
- Object.defineProperty(o, k2, desc);
- }) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
- }));
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", {
- enumerable: true,
- value: v
- });
- }) : function(o, v) {
- o["default"] = v;
- });
- var __importStar = exports && exports.__importStar || function(mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) {
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ return false;
+ }
+ #getOrDeleteIfExpired(key, item) {
+ if (this.#deleteIfExpired(key, item) === false) return item.value;
+ }
+ #getItemValue(key, item) {
+ return item.expiry ? this.#getOrDeleteIfExpired(key, item) : item.value;
+ }
+ #peek(key, cache) {
+ const item = cache.get(key);
+ return this.#getItemValue(key, item);
+ }
+ #set(key, value) {
+ this.#cache.set(key, value);
+ this.#size++;
+ if (this.#size >= this.#maxSize) {
+ this.#size = 0;
+ this.#emitEvictions(this.#oldCache);
+ this.#oldCache = this.#cache;
+ this.#cache = /* @__PURE__ */ new Map();
}
- __setModuleDefault(result, mod);
- return result;
- };
- var __importDefault = exports && exports.__importDefault || function(mod) {
- return mod && mod.__esModule ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.HttpsProxyAgent = void 0;
- const net$4 = __importStar(__require("net"));
- const tls$1 = __importStar(__require("tls"));
- const assert_1 = __importDefault(__require("assert"));
- const debug_1 = __importDefault(require_src());
- const agent_base_1 = require_dist$5();
- const url_1 = __require("url");
- const parse_proxy_response_1 = require_parse_proxy_response();
- const debug = (0, debug_1.default)("https-proxy-agent");
- const setServernameFromNonIpHost = (options) => {
- if (options.servername === undefined && options.host && !net$4.isIP(options.host)) {
- return {
- ...options,
- servername: options.host
- };
+ }
+ #moveToRecent(key, item) {
+ this.#oldCache.delete(key);
+ this.#set(key, item);
+ }
+ *#entriesAscending() {
+ for (const item of this.#oldCache) {
+ const [key, value] = item;
+ if (!this.#cache.has(key)) {
+ if (this.#deleteIfExpired(key, value) === false) yield item;
+ }
}
- return options;
- };
- /**
- * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
- * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
- *
- * Outgoing HTTP requests are first tunneled through the proxy server using the
- * `CONNECT` HTTP request method to establish a connection to the proxy server,
- * and then the proxy server connects to the destination target and issues the
- * HTTP request from the proxy server.
- *
- * `https:` requests have their socket connection upgraded to TLS once
- * the connection to the proxy server has been established.
- */
- var HttpsProxyAgent = class extends agent_base_1.Agent {
- constructor(proxy, opts) {
- super(opts);
- this.options = { path: undefined };
- this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
- this.proxyHeaders = opts?.headers ?? {};
- debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
- const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
- const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
- this.connectOpts = {
- ALPNProtocols: ["http/1.1"],
- ...opts ? omit(opts, "headers") : null,
- host,
- port
- };
+ for (const item of this.#cache) {
+ const [key, value] = item;
+ if (this.#deleteIfExpired(key, value) === false) yield item;
}
- /**
- * Called when the node-core HTTP client library is creating a
- * new HTTP request.
- */
- async connect(req, opts) {
- const { proxy } = this;
- if (!opts.host) {
- throw new TypeError("No \"host\" provided");
- }
- let socket;
- if (proxy.protocol === "https:") {
- debug("Creating `tls.Socket`: %o", this.connectOpts);
- socket = tls$1.connect(setServernameFromNonIpHost(this.connectOpts));
- } else {
- debug("Creating `net.Socket`: %o", this.connectOpts);
- socket = net$4.connect(this.connectOpts);
- }
- const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
- const host = net$4.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
- let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`;
- if (proxy.username || proxy.password) {
- const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
- headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
- }
- headers.Host = `${host}:${opts.port}`;
- if (!headers["Proxy-Connection"]) {
- headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
- }
- for (const name of Object.keys(headers)) {
- payload += `${name}: ${headers[name]}\r\n`;
- }
- const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
- socket.write(`${payload}\r\n`);
- const { connect, buffered } = await proxyResponsePromise;
- req.emit("proxyConnect", connect);
- this.emit("proxyConnect", connect, req);
- if (connect.statusCode === 200) {
- req.once("socket", resume);
- if (opts.secureEndpoint) {
- debug("Upgrading socket connection to TLS");
- return tls$1.connect({
- ...omit(setServernameFromNonIpHost(opts), "host", "path", "port"),
- socket
- });
- }
- return socket;
+ }
+ get(key) {
+ if (this.#cache.has(key)) {
+ const item = this.#cache.get(key);
+ return this.#getItemValue(key, item);
+ }
+ if (this.#oldCache.has(key)) {
+ const item = this.#oldCache.get(key);
+ if (this.#deleteIfExpired(key, item) === false) {
+ this.#moveToRecent(key, item);
+ return item.value;
}
- socket.destroy();
- const fakeSocket = new net$4.Socket({ writable: false });
- fakeSocket.readable = true;
- req.once("socket", (s) => {
- debug("Replaying proxy buffer for failed request");
- (0, assert_1.default)(s.listenerCount("data") > 0);
- s.push(buffered);
- s.push(null);
- });
- return fakeSocket;
}
- };
- HttpsProxyAgent.protocols = ["http", "https"];
- exports.HttpsProxyAgent = HttpsProxyAgent;
- function resume(socket) {
- socket.resume();
}
- function omit(obj, ...keys) {
- const ret = {};
- let key;
- for (key in obj) {
- if (!keys.includes(key)) {
- ret[key] = obj[key];
- }
+ set(key, value, { maxAge = this.#maxAge } = {}) {
+ const expiry = typeof maxAge === "number" && maxAge !== Number.POSITIVE_INFINITY ? Date.now() + maxAge : void 0;
+ if (this.#cache.has(key)) this.#cache.set(key, {
+ value,
+ expiry
+ });
+ else this.#set(key, {
+ value,
+ expiry
+ });
+ return this;
+ }
+ has(key) {
+ if (this.#cache.has(key)) return !this.#deleteIfExpired(key, this.#cache.get(key));
+ if (this.#oldCache.has(key)) return !this.#deleteIfExpired(key, this.#oldCache.get(key));
+ return false;
+ }
+ peek(key) {
+ if (this.#cache.has(key)) return this.#peek(key, this.#cache);
+ if (this.#oldCache.has(key)) return this.#peek(key, this.#oldCache);
+ }
+ expiresIn(key) {
+ const item = this.#cache.get(key) ?? this.#oldCache.get(key);
+ if (item) return item.expiry ? item.expiry - Date.now() : Number.POSITIVE_INFINITY;
+ }
+ delete(key) {
+ const deleted = this.#cache.delete(key);
+ if (deleted) this.#size--;
+ return this.#oldCache.delete(key) || deleted;
+ }
+ clear() {
+ this.#cache.clear();
+ this.#oldCache.clear();
+ this.#size = 0;
+ }
+ resize(newSize) {
+ if (!(newSize && newSize > 0)) throw new TypeError("`maxSize` must be a number greater than 0");
+ const items = [...this.#entriesAscending()];
+ const removeCount = items.length - newSize;
+ if (removeCount < 0) {
+ this.#cache = new Map(items);
+ this.#oldCache = /* @__PURE__ */ new Map();
+ this.#size = items.length;
+ } else {
+ if (removeCount > 0) this.#emitEvictions(items.slice(0, removeCount));
+ this.#oldCache = new Map(items.slice(removeCount));
+ this.#cache = /* @__PURE__ */ new Map();
+ this.#size = 0;
}
- return ret;
+ this.#maxSize = newSize;
}
-}));
-
-//#endregion
-//#region ../node_modules/lru-cache/dist/mjs/index.js
-var import_dist$1 = require_dist$4();
-/**
-* @module LRUCache
-*/
-const perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
-const warned = new Set();
-/* c8 ignore start */
-const PROCESS = typeof process === "object" && !!process ? process : {};
-/* c8 ignore start */
-const emitWarning = (msg, type, code, fn) => {
- typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`);
-};
-let AC = globalThis.AbortController;
-let AS = globalThis.AbortSignal;
-/* c8 ignore start */
-if (typeof AC === "undefined") {
- AS = class AbortSignal {
- onabort;
- _onabort = [];
- reason;
- aborted = false;
- addEventListener(_, fn) {
- this._onabort.push(fn);
+ evict(count = 1) {
+ const requested = Number(count);
+ if (!requested || requested <= 0) return;
+ const items = [...this.#entriesAscending()];
+ const evictCount = Math.trunc(Math.min(requested, Math.max(items.length - 1, 0)));
+ if (evictCount <= 0) return;
+ this.#emitEvictions(items.slice(0, evictCount));
+ this.#oldCache = new Map(items.slice(evictCount));
+ this.#cache = /* @__PURE__ */ new Map();
+ this.#size = 0;
+ }
+ *keys() {
+ for (const [key] of this) yield key;
+ }
+ *values() {
+ for (const [, value] of this) yield value;
+ }
+ *[Symbol.iterator]() {
+ for (const item of this.#cache) {
+ const [key, value] = item;
+ if (this.#deleteIfExpired(key, value) === false) yield [key, value.value];
}
- };
- AC = class AbortController {
- constructor() {
- warnACPolyfill();
+ for (const item of this.#oldCache) {
+ const [key, value] = item;
+ if (!this.#cache.has(key)) {
+ if (this.#deleteIfExpired(key, value) === false) yield [key, value.value];
+ }
}
- signal = new AS();
- abort(reason) {
- if (this.signal.aborted) return;
- this.signal.reason = reason;
- this.signal.aborted = true;
- for (const fn of this.signal._onabort) {
- fn(reason);
+ }
+ *entriesDescending() {
+ let items = [...this.#cache];
+ for (let i = items.length - 1; i >= 0; --i) {
+ const [key, value] = items[i];
+ if (this.#deleteIfExpired(key, value) === false) yield [key, value.value];
+ }
+ items = [...this.#oldCache];
+ for (let i = items.length - 1; i >= 0; --i) {
+ const [key, value] = items[i];
+ if (!this.#cache.has(key)) {
+ if (this.#deleteIfExpired(key, value) === false) yield [key, value.value];
}
- this.signal.onabort?.(reason);
}
- };
- let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
- const warnACPolyfill = () => {
- if (!printACPolyfillWarning) return;
- printACPolyfillWarning = false;
- emitWarning("AbortController is not defined. If using lru-cache in " + "node 14, load an AbortController polyfill from the " + "`node-abort-controller` package. A minimal polyfill is " + "provided for use by LRUCache.fetch(), but it should not be " + "relied upon in other contexts (eg, passing it to other APIs that " + "use AbortController/AbortSignal might have undesirable effects). " + "You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill);
- };
-}
-/* c8 ignore stop */
-const shouldWarn = (code) => !warned.has(code);
-const TYPE = Symbol("type");
-const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
-/* c8 ignore start */
-const getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
-/* c8 ignore stop */
-var ZeroArray = class extends Array {
- constructor(size) {
- super(size);
- this.fill(0);
}
-};
-var Stack = class Stack {
- heap;
- length;
- static #constructing = false;
- static create(max) {
- const HeapCls = getUintArray(max);
- if (!HeapCls) return [];
- Stack.#constructing = true;
- const s = new Stack(max, HeapCls);
- Stack.#constructing = false;
- return s;
+ *entriesAscending() {
+ for (const [key, value] of this.#entriesAscending()) yield [key, value.value];
}
- constructor(max, HeapCls) {
- /* c8 ignore start */
- if (!Stack.#constructing) {
- throw new TypeError("instantiate Stack using Stack.create(n)");
- }
- /* c8 ignore stop */
- this.heap = new HeapCls(max);
- this.length = 0;
+ get size() {
+ if (!this.#size) return this.#oldCache.size;
+ let oldCacheSize = 0;
+ for (const key of this.#oldCache.keys()) if (!this.#cache.has(key)) oldCacheSize++;
+ return Math.min(this.#size + oldCacheSize, this.#maxSize);
}
- push(n) {
- this.heap[this.length++] = n;
+ get maxSize() {
+ return this.#maxSize;
}
- pop() {
- return this.heap[--this.length];
+ get maxAge() {
+ return this.#maxAge;
+ }
+ entries() {
+ return this.entriesAscending();
+ }
+ forEach(callbackFunction, thisArgument = this) {
+ for (const [key, value] of this.entriesAscending()) callbackFunction.call(thisArgument, value, key, this);
+ }
+ get [Symbol.toStringTag]() {
+ return "QuickLRU";
+ }
+ toString() {
+ return `QuickLRU(${this.size}/${this.maxSize})`;
+ }
+ [Symbol.for("nodejs.util.inspect.custom")]() {
+ return this.toString();
}
};
+//#endregion
+//#region ../node_modules/weald/node_modules/ms/dist/index.js
+const e$2 = 1e3, t$2 = e$2 * 60, n$1 = t$2 * 60, r$1 = n$1 * 24, i$1 = r$1 * 7, a$1 = r$1 * 365.25, o$1 = a$1 / 12;
+function s$1(e, t) {
+ if (typeof e == `string`) return l$1(e);
+ if (typeof e == `number`) return p$1(e, t);
+ throw Error(`Value provided to ms() must be a string or number. value=${JSON.stringify(e)}`);
+}
+var c$1 = s$1;
+function l$1(s) {
+ if (typeof s != `string` || s.length === 0 || s.length > 100) throw Error(`Value provided to ms.parse() must be a string with length between 1 and 99. value=${JSON.stringify(s)}`);
+ let c = /^(?-?\d*\.?\d+) *(?milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|months?|mo|years?|yrs?|y)?$/i.exec(s);
+ if (!c?.groups) return NaN;
+ let { value: l, unit: u = `ms` } = c.groups, d = parseFloat(l), f = u.toLowerCase();
+ switch (f) {
+ case `years`:
+ case `year`:
+ case `yrs`:
+ case `yr`:
+ case `y`: return d * a$1;
+ case `months`:
+ case `month`:
+ case `mo`: return d * o$1;
+ case `weeks`:
+ case `week`:
+ case `w`: return d * i$1;
+ case `days`:
+ case `day`:
+ case `d`: return d * r$1;
+ case `hours`:
+ case `hour`:
+ case `hrs`:
+ case `hr`:
+ case `h`: return d * n$1;
+ case `minutes`:
+ case `minute`:
+ case `mins`:
+ case `min`:
+ case `m`: return d * t$2;
+ case `seconds`:
+ case `second`:
+ case `secs`:
+ case `sec`:
+ case `s`: return d * e$2;
+ case `milliseconds`:
+ case `millisecond`:
+ case `msecs`:
+ case `msec`:
+ case `ms`: return d;
+ default: throw Error(`Unknown unit "${f}" provided to ms.parse(). value=${JSON.stringify(s)}`);
+ }
+}
+function u$1(e) {
+ return l$1(e);
+}
+function d$1(s) {
+ let c = Math.abs(s);
+ return c >= a$1 ? `${Math.round(s / a$1)}y` : c >= o$1 ? `${Math.round(s / o$1)}mo` : c >= i$1 ? `${Math.round(s / i$1)}w` : c >= r$1 ? `${Math.round(s / r$1)}d` : c >= n$1 ? `${Math.round(s / n$1)}h` : c >= t$2 ? `${Math.round(s / t$2)}m` : c >= e$2 ? `${Math.round(s / e$2)}s` : `${s}ms`;
+}
+function f$1(s) {
+ let c = Math.abs(s);
+ return c >= a$1 ? m$1(s, c, a$1, `year`) : c >= o$1 ? m$1(s, c, o$1, `month`) : c >= i$1 ? m$1(s, c, i$1, `week`) : c >= r$1 ? m$1(s, c, r$1, `day`) : c >= n$1 ? m$1(s, c, n$1, `hour`) : c >= t$2 ? m$1(s, c, t$2, `minute`) : c >= e$2 ? m$1(s, c, e$2, `second`) : `${s} ms`;
+}
+function p$1(e, t) {
+ if (typeof e != `number` || !Number.isFinite(e)) throw Error(`Value provided to ms.format() must be of type number.`);
+ return t?.long ? f$1(e) : d$1(e);
+}
+function m$1(e, t, n, r) {
+ let i = t >= n * 1.5;
+ return `${Math.round(e / n)} ${r}${i ? `s` : ``}`;
+}
+//#endregion
+//#region ../node_modules/weald/dist/src/common.js
+init_supports_color();
/**
-* Default export, the thing you're using this module to get.
-*
-* All properties from the options object (with the exception of
-* {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as
-* normal public members. (`max` and `maxBase` are read-only getters.)
-* Changing any of these will alter the defaults for subsequent method calls,
-* but is otherwise safe.
+* This is the common logic for both the Node.js and web browser
+* implementations of `debug()`.
*/
-var LRUCache = class LRUCache {
- #max;
- #maxSize;
- #dispose;
- #disposeAfter;
- #fetchMethod;
- /**
- * {@link LRUCache.OptionsBase.ttl}
- */
- ttl;
- /**
- * {@link LRUCache.OptionsBase.ttlResolution}
- */
- ttlResolution;
- /**
- * {@link LRUCache.OptionsBase.ttlAutopurge}
- */
- ttlAutopurge;
- /**
- * {@link LRUCache.OptionsBase.updateAgeOnGet}
- */
- updateAgeOnGet;
- /**
- * {@link LRUCache.OptionsBase.updateAgeOnHas}
- */
- updateAgeOnHas;
- /**
- * {@link LRUCache.OptionsBase.allowStale}
- */
- allowStale;
- /**
- * {@link LRUCache.OptionsBase.noDisposeOnSet}
- */
- noDisposeOnSet;
- /**
- * {@link LRUCache.OptionsBase.noUpdateTTL}
- */
- noUpdateTTL;
- /**
- * {@link LRUCache.OptionsBase.maxEntrySize}
- */
- maxEntrySize;
- /**
- * {@link LRUCache.OptionsBase.sizeCalculation}
- */
- sizeCalculation;
- /**
- * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
- */
- noDeleteOnFetchRejection;
- /**
- * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
- */
- noDeleteOnStaleGet;
- /**
- * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
- */
- allowStaleOnFetchAbort;
- /**
- * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
- */
- allowStaleOnFetchRejection;
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = c$1;
+ createDebug.destroy = destroy;
+ Object.keys(env).forEach((key) => {
+ createDebug[key] = env[key];
+ });
/**
- * {@link LRUCache.OptionsBase.ignoreFetchAbort}
+ * The currently active debug mode names, and names to skip.
*/
- ignoreFetchAbort;
- #size;
- #calculatedSize;
- #keyMap;
- #keyList;
- #valList;
- #next;
- #prev;
- #head;
- #tail;
- #free;
- #disposed;
- #sizes;
- #starts;
- #ttls;
- #hasDispose;
- #hasFetchMethod;
- #hasDisposeAfter;
+ createDebug.names = [];
+ createDebug.skips = [];
/**
- * Do not call this method unless you need to inspect the
- * inner workings of the cache. If anything returned by this
- * object is modified in any way, strange breakage may occur.
- *
- * These fields are private for a reason!
+ * Map of special "%n" handling functions, for the debug "format" argument.
*
- * @internal
- */
- static unsafeExposeInternals(c) {
- return {
- starts: c.#starts,
- ttls: c.#ttls,
- sizes: c.#sizes,
- keyMap: c.#keyMap,
- keyList: c.#keyList,
- valList: c.#valList,
- next: c.#next,
- prev: c.#prev,
- get head() {
- return c.#head;
- },
- get tail() {
- return c.#tail;
- },
- free: c.#free,
- isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
- backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
- moveToTail: (index) => c.#moveToTail(index),
- indexes: (options) => c.#indexes(options),
- rindexes: (options) => c.#rindexes(options),
- isStale: (index) => c.#isStale(index)
- };
- }
- /**
- * {@link LRUCache.OptionsBase.max} (read-only)
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
- get max() {
- return this.#max;
- }
+ createDebug.formatters = {};
/**
- * {@link LRUCache.OptionsBase.maxSize} (read-only)
+ * Selects a color for a debug namespace
+ *
+ * @param {string} namespace - The namespace string for the debug instance to be colored
+ * @returns {number | string} An ANSI color code for the given namespace
*/
- get maxSize() {
- return this.#maxSize;
+ function selectColor(namespace) {
+ let hash = 0;
+ for (let i = 0; i < namespace.length; i++) {
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
+ hash |= 0;
+ }
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
+ createDebug.selectColor = selectColor;
/**
- * The total computed size of items in the cache (read-only)
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {string} namespace
+ * @returns {Function}
*/
- get calculatedSize() {
- return this.#calculatedSize;
+ function createDebug(namespace, options) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+ function debug(...args) {
+ if (!debug.enabled) return;
+ const self = debug;
+ const curr = Number(/* @__PURE__ */ new Date());
+ self.diff = curr - (prevTime || curr);
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+ args[0] = createDebug.coerce(args[0]);
+ if (typeof args[0] !== "string") args.unshift("%O");
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ if (match === "%%") return "%";
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === "function") {
+ const val = args[index];
+ match = formatter.call(self, val);
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+ createDebug.formatArgs.call(self, args);
+ if (options?.onLog != null) options.onLog(...args);
+ (self.log || createDebug.log).apply(self, args);
+ }
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy;
+ Object.defineProperty(debug, "enabled", {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) return enableOverride;
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+ return enabledCache;
+ },
+ set: (v) => {
+ enableOverride = v;
+ }
+ });
+ if (typeof createDebug.init === "function") createDebug.init(debug);
+ return debug;
}
- /**
- * The number of items stored in the cache (read-only)
- */
- get size() {
- return this.#size;
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
}
/**
- * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {string} namespaces
*/
- get fetchMethod() {
- return this.#fetchMethod;
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+ createDebug.names = [];
+ createDebug.skips = [];
+ let i;
+ const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
+ const len = split.length;
+ for (i = 0; i < len; i++) {
+ if (!split[i]) continue;
+ namespaces = split[i].replace(/\*/g, ".*?");
+ if (namespaces[0] === "-") createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
+ else createDebug.names.push(new RegExp("^" + namespaces + "$"));
+ }
}
/**
- * {@link LRUCache.OptionsBase.dispose} (read-only)
+ * Disable debug output.
+ *
+ * @returns {string} namespaces
*/
- get dispose() {
- return this.#dispose;
+ function disable() {
+ const namespaces = [...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)].join(",");
+ createDebug.enable("");
+ return namespaces;
}
/**
- * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {string} name
+ * @returns {boolean}
*/
- get disposeAfter() {
- return this.#disposeAfter;
- }
- constructor(options) {
- const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
- if (max !== 0 && !isPosInt(max)) {
- throw new TypeError("max option must be a nonnegative integer");
- }
- const UintArray = max ? getUintArray(max) : Array;
- if (!UintArray) {
- throw new Error("invalid max value: " + max);
- }
- this.#max = max;
- this.#maxSize = maxSize;
- this.maxEntrySize = maxEntrySize || this.#maxSize;
- this.sizeCalculation = sizeCalculation;
- if (this.sizeCalculation) {
- if (!this.#maxSize && !this.maxEntrySize) {
- throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
- }
- if (typeof this.sizeCalculation !== "function") {
- throw new TypeError("sizeCalculation set to non-function");
- }
- }
- if (fetchMethod !== undefined && typeof fetchMethod !== "function") {
- throw new TypeError("fetchMethod must be a function if specified");
- }
- this.#fetchMethod = fetchMethod;
- this.#hasFetchMethod = !!fetchMethod;
- this.#keyMap = new Map();
- this.#keyList = new Array(max).fill(undefined);
- this.#valList = new Array(max).fill(undefined);
- this.#next = new UintArray(max);
- this.#prev = new UintArray(max);
- this.#head = 0;
- this.#tail = 0;
- this.#free = Stack.create(max);
- this.#size = 0;
- this.#calculatedSize = 0;
- if (typeof dispose === "function") {
- this.#dispose = dispose;
- }
- if (typeof disposeAfter === "function") {
- this.#disposeAfter = disposeAfter;
- this.#disposed = [];
- } else {
- this.#disposeAfter = undefined;
- this.#disposed = undefined;
- }
- this.#hasDispose = !!this.#dispose;
- this.#hasDisposeAfter = !!this.#disposeAfter;
- this.noDisposeOnSet = !!noDisposeOnSet;
- this.noUpdateTTL = !!noUpdateTTL;
- this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
- this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
- this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
- this.ignoreFetchAbort = !!ignoreFetchAbort;
- if (this.maxEntrySize !== 0) {
- if (this.#maxSize !== 0) {
- if (!isPosInt(this.#maxSize)) {
- throw new TypeError("maxSize must be a positive integer if specified");
- }
- }
- if (!isPosInt(this.maxEntrySize)) {
- throw new TypeError("maxEntrySize must be a positive integer if specified");
- }
- this.#initializeSizeTracking();
- }
- this.allowStale = !!allowStale;
- this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
- this.updateAgeOnGet = !!updateAgeOnGet;
- this.updateAgeOnHas = !!updateAgeOnHas;
- this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
- this.ttlAutopurge = !!ttlAutopurge;
- this.ttl = ttl || 0;
- if (this.ttl) {
- if (!isPosInt(this.ttl)) {
- throw new TypeError("ttl must be a positive integer if specified");
- }
- this.#initializeTTLTracking();
- }
- if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
- throw new TypeError("At least one of max, maxSize, or ttl is required");
- }
- if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
- const code = "LRU_CACHE_UNBOUNDED";
- if (shouldWarn(code)) {
- warned.add(code);
- const msg = "TTL caching without ttlAutopurge, max, or maxSize can " + "result in unbounded memory consumption.";
- emitWarning(msg, "UnboundedCacheWarning", code, LRUCache);
- }
- }
+ function enabled(name) {
+ if (name[name.length - 1] === "*") return true;
+ let i;
+ let len;
+ for (i = 0, len = createDebug.skips.length; i < len; i++) if (createDebug.skips[i].test(name)) return false;
+ for (i = 0, len = createDebug.names.length; i < len; i++) if (createDebug.names[i].test(name)) return true;
+ return false;
}
/**
- * Return the remaining TTL time for a given entry key
+ * Convert regexp to namespace
*/
- getRemainingTTL(key) {
- return this.#keyMap.has(key) ? Infinity : 0;
- }
- #initializeTTLTracking() {
- const ttls = new ZeroArray(this.#max);
- const starts = new ZeroArray(this.#max);
- this.#ttls = ttls;
- this.#starts = starts;
- this.#setItemTTL = (index, ttl, start = perf.now()) => {
- starts[index] = ttl !== 0 ? start : 0;
- ttls[index] = ttl;
- if (ttl !== 0 && this.ttlAutopurge) {
- const t = setTimeout(() => {
- if (this.#isStale(index)) {
- this.delete(this.#keyList[index]);
- }
- }, ttl + 1);
- /* c8 ignore start */
- if (t.unref) {
- t.unref();
- }
- }
- };
- this.#updateItemAge = (index) => {
- starts[index] = ttls[index] !== 0 ? perf.now() : 0;
- };
- this.#statusTTL = (status, index) => {
- if (ttls[index]) {
- const ttl = ttls[index];
- const start = starts[index];
- status.ttl = ttl;
- status.start = start;
- status.now = cachedNow || getNow();
- const age = status.now - start;
- status.remainingTTL = ttl - age;
- }
- };
- let cachedNow = 0;
- const getNow = () => {
- const n = perf.now();
- if (this.ttlResolution > 0) {
- cachedNow = n;
- const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
- /* c8 ignore start */
- if (t.unref) {
- t.unref();
- }
- }
- return n;
- };
- this.getRemainingTTL = (key) => {
- const index = this.#keyMap.get(key);
- if (index === undefined) {
- return 0;
- }
- const ttl = ttls[index];
- const start = starts[index];
- if (ttl === 0 || start === 0) {
- return Infinity;
- }
- const age = (cachedNow || getNow()) - start;
- return ttl - age;
- };
- this.#isStale = (index) => {
- return ttls[index] !== 0 && starts[index] !== 0 && (cachedNow || getNow()) - starts[index] > ttls[index];
- };
- }
- #updateItemAge = () => {};
- #statusTTL = () => {};
- #setItemTTL = () => {};
- /* c8 ignore stop */
- #isStale = () => false;
- #initializeSizeTracking() {
- const sizes = new ZeroArray(this.#max);
- this.#calculatedSize = 0;
- this.#sizes = sizes;
- this.#removeItemSize = (index) => {
- this.#calculatedSize -= sizes[index];
- sizes[index] = 0;
- };
- this.#requireSize = (k, v, size, sizeCalculation) => {
- if (this.#isBackgroundFetch(v)) {
- return 0;
- }
- if (!isPosInt(size)) {
- if (sizeCalculation) {
- if (typeof sizeCalculation !== "function") {
- throw new TypeError("sizeCalculation must be a function");
- }
- size = sizeCalculation(v, k);
- if (!isPosInt(size)) {
- throw new TypeError("sizeCalculation return invalid (expect positive integer)");
- }
- } else {
- throw new TypeError("invalid size value (must be positive integer). " + "When maxSize or maxEntrySize is used, sizeCalculation " + "or size must be set.");
- }
- }
- return size;
- };
- this.#addItemSize = (index, size, status) => {
- sizes[index] = size;
- if (this.#maxSize) {
- const maxSize = this.#maxSize - sizes[index];
- while (this.#calculatedSize > maxSize) {
- this.#evict(true);
- }
- }
- this.#calculatedSize += sizes[index];
- if (status) {
- status.entrySize = size;
- status.totalCalculatedSize = this.#calculatedSize;
- }
- };
- }
- #removeItemSize = (_i) => {};
- #addItemSize = (_i, _s, _st) => {};
- #requireSize = (_k, _v, size, sizeCalculation) => {
- if (size || sizeCalculation) {
- throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
- }
- return 0;
- };
- *#indexes({ allowStale = this.allowStale } = {}) {
- if (this.#size) {
- for (let i = this.#tail; true;) {
- if (!this.#isValidIndex(i)) {
- break;
- }
- if (allowStale || !this.#isStale(i)) {
- yield i;
- }
- if (i === this.#head) {
- break;
- } else {
- i = this.#prev[i];
- }
- }
- }
- }
- *#rindexes({ allowStale = this.allowStale } = {}) {
- if (this.#size) {
- for (let i = this.#head; true;) {
- if (!this.#isValidIndex(i)) {
- break;
- }
- if (allowStale || !this.#isStale(i)) {
- yield i;
- }
- if (i === this.#tail) {
- break;
- } else {
- i = this.#next[i];
- }
- }
- }
- }
- #isValidIndex(index) {
- return index !== undefined && this.#keyMap.get(this.#keyList[index]) === index;
+ function toNamespace(regexp) {
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
}
/**
- * Return a generator yielding `[key, value]` pairs,
- * in order from most recently used to least recently used.
+ * Coerce `val`.
*/
- *entries() {
- for (const i of this.#indexes()) {
- if (this.#valList[i] !== undefined && this.#keyList[i] !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
- yield [this.#keyList[i], this.#valList[i]];
- }
- }
+ function coerce(val) {
+ if (val instanceof Error) return val.stack ?? val.message;
+ return val;
}
/**
- * Inverse order version of {@link LRUCache.entries}
- *
- * Return a generator yielding `[key, value]` pairs,
- * in order from least recently used to most recently used.
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
*/
- *rentries() {
- for (const i of this.#rindexes()) {
- if (this.#valList[i] !== undefined && this.#keyList[i] !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
- yield [this.#keyList[i], this.#valList[i]];
- }
- }
+ function destroy() {
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
}
+ createDebug.setupFormatters(createDebug.formatters);
+ createDebug.enable(createDebug.load());
+ return createDebug;
+}
+//#endregion
+//#region ../node_modules/weald/dist/src/node.js
+/**
+* @packageDocumentation
+*
+* This module is a fork of the [debug](https://www.npmjs.com/package/debug) module. It has been converted to TypeScript and the output is ESM.
+*
+* It is API compatible with no extra features or bug fixes, it should only be used if you want a 100% ESM application.
+*
+* ESM should be arriving in `debug@5.x.x` so this module can be retired after that.
+*
+* Please see [debug](https://www.npmjs.com/package/debug) for API details.
+*/
+/**
+* Module dependencies.
+*/
+/**
+* This is the Node.js implementation of `debug()`.
+*/
+/**
+* Colors.
+*/
+let colors = [
+ 6,
+ 2,
+ 3,
+ 4,
+ 5,
+ 1
+];
+if (supportsColor.stderr !== false && (supportsColor.stderr ?? supportsColor).level >= 2) colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+];
+/**
+* Build up the default `inspectOpts` object from the environment variables.
+*
+* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+*/
+const inspectOpts = Object.keys(process.env).filter((key) => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === "null") val = null;
+ else val = Number(val);
+ obj[prop] = val;
+ return obj;
+}, {});
+/**
+* Is stdout a TTY? Colored output is enabled when `true`.
+*/
+function useColors() {
+ return "colors" in inspectOpts ? Boolean(inspectOpts.colors) : tty.isatty(process.stderr.fd);
+}
+/**
+* Adds ANSI color escape codes if enabled.
+*/
+function formatArgs(args) {
+ const { namespace: name, useColors } = this;
+ if (useColors === true) {
+ const c = this.color;
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
+ args.push(colorCode + "m+" + c$1(this.diff) + "\x1B[0m");
+ } else args[0] = getDate() + name + " " + args[0];
+}
+function getDate() {
+ if (inspectOpts.hideDate != null) return "";
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
+}
+/**
+* Invokes `util.format()` with the specified arguments and writes to stderr.
+*/
+function log$2(...args) {
+ return process.stderr.write(util$1.format(...args) + "\n");
+}
+/**
+* Save `namespaces`.
+*
+* @param {string} namespaces
+*/
+function save(namespaces) {
+ if (namespaces != null) process.env.DEBUG = namespaces;
+ else delete process.env.DEBUG;
+}
+/**
+* Load `namespaces`.
+*
+* @returns {string} returns the previously persisted debug modes
+*/
+function load$1() {
+ return process.env.DEBUG;
+}
+/**
+* Init logic for `debug` instances.
+*
+* Create a new `inspectOpts` object in case `useColors` is set
+* differently for a particular `debug` instance.
+*/
+function init$3(debug) {
+ debug.inspectOpts = {};
+ const keys = Object.keys(inspectOpts);
+ for (let i = 0; i < keys.length; i++) debug.inspectOpts[keys[i]] = inspectOpts[keys[i]];
+}
+function setupFormatters(formatters) {
/**
- * Return a generator yielding the keys in the cache,
- * in order from most recently used to least recently used.
+ * Map %o to `util.inspect()`, all on a single line.
*/
- *keys() {
- for (const i of this.#indexes()) {
- const k = this.#keyList[i];
- if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
- yield k;
- }
- }
- }
+ formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util$1.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
+ };
/**
- * Inverse order version of {@link LRUCache.keys}
- *
- * Return a generator yielding the keys in the cache,
- * in order from least recently used to most recently used.
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
- *rkeys() {
- for (const i of this.#rindexes()) {
- const k = this.#keyList[i];
- if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
- yield k;
- }
- }
- }
+ formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util$1.inspect(v, this.inspectOpts);
+ };
+}
+var node_default = setup({
+ init: init$3,
+ log: log$2,
+ formatArgs,
+ save,
+ load: load$1,
+ useColors,
+ setupFormatters,
+ colors,
+ inspectOpts
+});
+//#endregion
+//#region ../node_modules/weald/dist/src/index.js
+/**
+* @packageDocumentation
+*
+* This module is a fork of the [debug](https://www.npmjs.com/package/debug) module. It has been converted to TypeScript and the output is ESM.
+*
+* It is API compatible with no extra features or bug fixes, it should only be used if you want a 100% ESM application.
+*
+* ESM should be arriving in `debug@5.x.x` so this module can be retired after that.
+*
+* Please see [debug](https://www.npmjs.com/package/debug) for API details.
+*/
+/**
+* Module dependencies.
+*/
+var src_default = node_default;
+//#endregion
+//#region ../node_modules/dns-over-http-resolver/dist/src/utils.js
+/**
+* Build fetch resource for request
+*/
+function buildResource(serverResolver, hostname, recordType) {
+ return `${serverResolver}?name=${hostname}&type=${recordType}`;
+}
+/**
+* Use fetch to find the record
+*/
+async function request$2(resource, signal) {
+ return await (await fetch(resource, {
+ headers: new Headers({ accept: "application/dns-json" }),
+ signal
+ })).json();
+}
+/**
+* Creates cache key composed by recordType and hostname
+*
+* @param {string} hostname
+* @param {string} recordType
+*/
+function getCacheKey(hostname, recordType) {
+ return `${recordType}_${hostname}`;
+}
+//#endregion
+//#region ../node_modules/dns-over-http-resolver/dist/src/index.js
+const log$1 = Object.assign(src_default("dns-over-http-resolver"), { error: src_default("dns-over-http-resolver:error") });
+/**
+* DNS over HTTP resolver.
+* Uses a list of servers to resolve DNS records with HTTP requests.
+*/
+var Resolver = class {
+ _cache;
+ _TXTcache;
+ _servers;
+ _request;
+ _abortControllers;
/**
- * Return a generator yielding the values in the cache,
- * in order from most recently used to least recently used.
+ * @class
+ * @param {object} [options]
+ * @param {number} [options.maxCache = 100] - maximum number of cached dns records
+ * @param {Request} [options.request] - function to return DNSJSON
*/
- *values() {
- for (const i of this.#indexes()) {
- const v = this.#valList[i];
- if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
- yield this.#valList[i];
- }
- }
+ constructor(options = {}) {
+ this._cache = new QuickLRU({ maxSize: options?.maxCache ?? 100 });
+ this._TXTcache = new QuickLRU({ maxSize: options?.maxCache ?? 100 });
+ this._servers = ["https://cloudflare-dns.com/dns-query", "https://dns.google/resolve"];
+ this._request = options.request ?? request$2;
+ this._abortControllers = [];
}
/**
- * Inverse order version of {@link LRUCache.values}
- *
- * Return a generator yielding the values in the cache,
- * in order from least recently used to most recently used.
+ * Cancel all outstanding DNS queries made by this resolver. Any outstanding
+ * requests will be aborted and promises rejected.
*/
- *rvalues() {
- for (const i of this.#rindexes()) {
- const v = this.#valList[i];
- if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
- yield this.#valList[i];
- }
- }
+ cancel() {
+ this._abortControllers.forEach((controller) => {
+ controller.abort();
+ });
}
/**
- * Iterating over the cache itself yields the same results as
- * {@link LRUCache.entries}
+ * Get an array of the IP addresses currently configured for DNS resolution.
+ * These addresses are formatted according to RFC 5952. It can include a custom port.
*/
- [Symbol.iterator]() {
- return this.entries();
+ getServers() {
+ return this._servers;
}
/**
- * Find a value for which the supplied fn method returns a truthy value,
- * similar to Array.find(). fn is called as fn(value, key, cache).
+ * Get a shuffled array of the IP addresses currently configured for DNS resolution.
+ * These addresses are formatted according to RFC 5952. It can include a custom port.
*/
- find(fn, getOptions = {}) {
- for (const i of this.#indexes()) {
- const v = this.#valList[i];
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
- if (value === undefined) continue;
- if (fn(value, this.#keyList[i], this)) {
- return this.get(this.#keyList[i], getOptions);
- }
+ _getShuffledServers() {
+ const newServers = [...this._servers];
+ for (let i = newServers.length - 1; i > 0; i--) {
+ const j = Math.floor(Math.random() * i);
+ const temp = newServers[i];
+ newServers[i] = newServers[j];
+ newServers[j] = temp;
}
+ return newServers;
}
/**
- * Call the supplied function on each item in the cache, in order from
- * most recently used to least recently used. fn is called as
- * fn(value, key, cache). Does not update age or recenty of use.
- * Does not iterate over stale values.
+ * Sets the IP address and port of servers to be used when performing DNS resolution.
+ *
+ * @param {string[]} servers - array of RFC 5952 formatted addresses.
*/
- forEach(fn, thisp = this) {
- for (const i of this.#indexes()) {
- const v = this.#valList[i];
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
- if (value === undefined) continue;
- fn.call(thisp, value, this.#keyList[i], this);
+ setServers(servers) {
+ this._servers = servers;
+ }
+ async resolve(hostname, rrType = "A") {
+ switch (rrType) {
+ case "A": return this.resolve4(hostname);
+ case "AAAA": return this.resolve6(hostname);
+ case "TXT": return this.resolveTxt(hostname);
+ default: throw new Error(`${rrType} is not supported`);
}
}
/**
- * The same as {@link LRUCache.forEach} but items are iterated over in
- * reverse order. (ie, less recently used items are iterated over first.)
+ * Uses the DNS protocol to resolve the given host name into IPv4 addresses
+ *
+ * @param {string} hostname - host name to resolve
*/
- rforEach(fn, thisp = this) {
- for (const i of this.#rindexes()) {
- const v = this.#valList[i];
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
- if (value === undefined) continue;
- fn.call(thisp, value, this.#keyList[i], this);
+ async resolve4(hostname) {
+ const recordType = "A";
+ const cached = this._cache.get(getCacheKey(hostname, recordType));
+ if (cached != null) return cached;
+ let aborted = false;
+ for (const server of this._getShuffledServers()) {
+ const controller = new AbortController();
+ this._abortControllers.push(controller);
+ try {
+ const response = await this._request(buildResource(server, hostname, recordType), controller.signal);
+ const data = response.Answer.map((a) => a.data);
+ const ttl = Math.min(...response.Answer.map((a) => a.TTL));
+ this._cache.set(getCacheKey(hostname, recordType), data, { maxAge: ttl });
+ return data;
+ } catch (err) {
+ if (controller.signal.aborted) aborted = true;
+ log$1.error(`${server} could not resolve ${hostname} record ${recordType}`);
+ } finally {
+ this._abortControllers = this._abortControllers.filter((c) => c !== controller);
+ }
}
+ if (aborted) throw Object.assign(/* @__PURE__ */ new Error("queryA ECANCELLED"), { code: "ECANCELLED" });
+ throw new Error(`Could not resolve ${hostname} record ${recordType}`);
}
/**
- * Delete any stale entries. Returns true if anything was removed,
- * false otherwise.
+ * Uses the DNS protocol to resolve the given host name into IPv6 addresses
+ *
+ * @param {string} hostname - host name to resolve
*/
- purgeStale() {
- let deleted = false;
- for (const i of this.#rindexes({ allowStale: true })) {
- if (this.#isStale(i)) {
- this.delete(this.#keyList[i]);
- deleted = true;
+ async resolve6(hostname) {
+ const recordType = "AAAA";
+ const cached = this._cache.get(getCacheKey(hostname, recordType));
+ if (cached != null) return cached;
+ let aborted = false;
+ for (const server of this._getShuffledServers()) {
+ const controller = new AbortController();
+ this._abortControllers.push(controller);
+ try {
+ const response = await this._request(buildResource(server, hostname, recordType), controller.signal);
+ const data = response.Answer.map((a) => a.data);
+ const ttl = Math.min(...response.Answer.map((a) => a.TTL));
+ this._cache.set(getCacheKey(hostname, recordType), data, { maxAge: ttl });
+ return data;
+ } catch (err) {
+ if (controller.signal.aborted) aborted = true;
+ log$1.error(`${server} could not resolve ${hostname} record ${recordType}`);
+ } finally {
+ this._abortControllers = this._abortControllers.filter((c) => c !== controller);
}
}
- return deleted;
+ if (aborted) throw Object.assign(/* @__PURE__ */ new Error("queryAaaa ECANCELLED"), { code: "ECANCELLED" });
+ throw new Error(`Could not resolve ${hostname} record ${recordType}`);
}
/**
- * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
- * passed to cache.load()
+ * Uses the DNS protocol to resolve the given host name into a Text record
+ *
+ * @param {string} hostname - host name to resolve
*/
- dump() {
- const arr = [];
- for (const i of this.#indexes({ allowStale: true })) {
- const key = this.#keyList[i];
- const v = this.#valList[i];
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
- if (value === undefined || key === undefined) continue;
- const entry = { value };
- if (this.#ttls && this.#starts) {
- entry.ttl = this.#ttls[i];
- const age = perf.now() - this.#starts[i];
- entry.start = Math.floor(Date.now() - age);
- }
- if (this.#sizes) {
- entry.size = this.#sizes[i];
+ async resolveTxt(hostname) {
+ const recordType = "TXT";
+ const cached = this._TXTcache.get(getCacheKey(hostname, recordType));
+ if (cached != null) return cached;
+ let aborted = false;
+ for (const server of this._getShuffledServers()) {
+ const controller = new AbortController();
+ this._abortControllers.push(controller);
+ try {
+ const response = await this._request(buildResource(server, hostname, recordType), controller.signal);
+ const data = response.Answer.map((a) => [a.data.replace(/['"]+/g, "")]);
+ const ttl = Math.min(...response.Answer.map((a) => a.TTL));
+ this._TXTcache.set(getCacheKey(hostname, recordType), data, { maxAge: ttl });
+ return data;
+ } catch (err) {
+ if (controller.signal.aborted) aborted = true;
+ log$1.error(`${server} could not resolve ${hostname} record ${recordType}`);
+ } finally {
+ this._abortControllers = this._abortControllers.filter((c) => c !== controller);
}
- arr.unshift([key, entry]);
}
- return arr;
+ if (aborted) throw Object.assign(/* @__PURE__ */ new Error("queryTxt ECANCELLED"), { code: "ECANCELLED" });
+ throw new Error(`Could not resolve ${hostname} record ${recordType}`);
}
- /**
- * Reset the cache and load in the items in entries in the order listed.
- * Note that the shape of the resulting cache may be different if the
- * same options are not used in both caches.
- */
- load(arr) {
- this.clear();
- for (const [key, entry] of arr) {
- if (entry.start) {
- const age = Date.now() - entry.start;
- entry.start = perf.now() - age;
+ clearCache() {
+ this._cache.clear();
+ this._TXTcache.clear();
+ }
+};
+//#endregion
+//#region ../node_modules/agent-base/dist/helpers.js
+var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
+ enumerable: true,
+ get: function() {
+ return m[k];
}
- this.set(key, entry.value, entry);
+ };
+ Object.defineProperty(o, k2, desc);
+ }) : (function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ o[k2] = m[k];
+ }));
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", {
+ enumerable: true,
+ value: v
+ });
+ }) : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.req = exports.json = exports.toBuffer = void 0;
+ const http$8 = __importStar(__require("http"));
+ const https$3 = __importStar(__require("https"));
+ async function toBuffer(stream) {
+ let length = 0;
+ const chunks = [];
+ for await (const chunk of stream) {
+ length += chunk.length;
+ chunks.push(chunk);
}
+ return Buffer.concat(chunks, length);
}
- /**
- * Add a value to the cache.
- *
- * Note: if `undefined` is specified as a value, this is an alias for
- * {@link LRUCache#delete}
- */
- set(k, v, setOptions = {}) {
- if (v === undefined) {
- this.delete(k);
- return this;
+ exports.toBuffer = toBuffer;
+ async function json(stream) {
+ const str = (await toBuffer(stream)).toString("utf8");
+ try {
+ return JSON.parse(str);
+ } catch (_err) {
+ const err = _err;
+ err.message += ` (input: ${str})`;
+ throw err;
}
- const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
- let { noUpdateTTL = this.noUpdateTTL } = setOptions;
- const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
- if (this.maxEntrySize && size > this.maxEntrySize) {
- if (status) {
- status.set = "miss";
- status.maxEntrySizeExceeded = true;
+ }
+ exports.json = json;
+ function req(url, opts = {}) {
+ const req = ((typeof url === "string" ? url : url.href).startsWith("https:") ? https$3 : http$8).request(url, opts);
+ const promise = new Promise((resolve, reject) => {
+ req.once("response", resolve).once("error", reject).end();
+ });
+ req.then = promise.then.bind(promise);
+ return req;
+ }
+ exports.req = req;
+}));
+//#endregion
+//#region ../node_modules/agent-base/dist/index.js
+var require_dist$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
+ enumerable: true,
+ get: function() {
+ return m[k];
}
- this.delete(k);
- return this;
+ };
+ Object.defineProperty(o, k2, desc);
+ }) : (function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ o[k2] = m[k];
+ }));
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", {
+ enumerable: true,
+ value: v
+ });
+ }) : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
}
- let index = this.#size === 0 ? undefined : this.#keyMap.get(k);
- if (index === undefined) {
- index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
- this.#keyList[index] = k;
- this.#valList[index] = v;
- this.#keyMap.set(k, index);
- this.#next[this.#tail] = index;
- this.#prev[index] = this.#tail;
- this.#tail = index;
- this.#size++;
- this.#addItemSize(index, size, status);
- if (status) status.set = "add";
- noUpdateTTL = false;
- } else {
- this.#moveToTail(index);
- const oldVal = this.#valList[index];
- if (v !== oldVal) {
- if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
- oldVal.__abortController.abort(new Error("replaced"));
- } else if (!noDisposeOnSet) {
- if (this.#hasDispose) {
- this.#dispose?.(oldVal, k, "set");
- }
- if (this.#hasDisposeAfter) {
- this.#disposed?.push([
- oldVal,
- k,
- "set"
- ]);
- }
- }
- this.#removeItemSize(index);
- this.#addItemSize(index, size, status);
- this.#valList[index] = v;
- if (status) {
- status.set = "replace";
- const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
- if (oldValue !== undefined) status.oldValue = oldValue;
- }
- } else if (status) {
- status.set = "update";
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ var __exportStar = exports && exports.__exportStar || function(m, exports$6) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$6, p)) __createBinding(exports$6, m, p);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Agent = void 0;
+ const net$5 = __importStar(__require("net"));
+ const http$7 = __importStar(__require("http"));
+ const https_1 = __require("https");
+ __exportStar(require_helpers(), exports);
+ const INTERNAL = Symbol("AgentBaseInternalState");
+ var Agent = class extends http$7.Agent {
+ constructor(opts) {
+ super(opts);
+ this[INTERNAL] = {};
+ }
+ /**
+ * Determine whether this is an `http` or `https` request.
+ */
+ isSecureEndpoint(options) {
+ if (options) {
+ if (typeof options.secureEndpoint === "boolean") return options.secureEndpoint;
+ if (typeof options.protocol === "string") return options.protocol === "https:";
}
+ const { stack } = /* @__PURE__ */ new Error();
+ if (typeof stack !== "string") return false;
+ return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
}
- if (ttl !== 0 && !this.#ttls) {
- this.#initializeTTLTracking();
+ incrementSockets(name) {
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) return null;
+ if (!this.sockets[name]) this.sockets[name] = [];
+ const fakeSocket = new net$5.Socket({ writable: false });
+ this.sockets[name].push(fakeSocket);
+ this.totalSocketCount++;
+ return fakeSocket;
}
- if (this.#ttls) {
- if (!noUpdateTTL) {
- this.#setItemTTL(index, ttl, start);
+ decrementSockets(name, socket) {
+ if (!this.sockets[name] || socket === null) return;
+ const sockets = this.sockets[name];
+ const index = sockets.indexOf(socket);
+ if (index !== -1) {
+ sockets.splice(index, 1);
+ this.totalSocketCount--;
+ if (sockets.length === 0) delete this.sockets[name];
}
- if (status) this.#statusTTL(status, index);
}
- if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
- const dt = this.#disposed;
- let task;
- while (task = dt?.shift()) {
- this.#disposeAfter?.(...task);
- }
+ getName(options) {
+ if (this.isSecureEndpoint(options)) return https_1.Agent.prototype.getName.call(this, options);
+ return super.getName(options);
}
- return this;
- }
- /**
- * Evict the least recently used item, returning its value or
- * `undefined` if cache is empty.
- */
- pop() {
- try {
- while (this.#size) {
- const val = this.#valList[this.#head];
- this.#evict(true);
- if (this.#isBackgroundFetch(val)) {
- if (val.__staleWhileFetching) {
- return val.__staleWhileFetching;
- }
- } else if (val !== undefined) {
- return val;
- }
- }
- } finally {
- if (this.#hasDisposeAfter && this.#disposed) {
- const dt = this.#disposed;
- let task;
- while (task = dt?.shift()) {
- this.#disposeAfter?.(...task);
+ createSocket(req, options, cb) {
+ const connectOpts = {
+ ...options,
+ secureEndpoint: this.isSecureEndpoint(options)
+ };
+ const name = this.getName(connectOpts);
+ const fakeSocket = this.incrementSockets(name);
+ Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
+ this.decrementSockets(name, fakeSocket);
+ if (socket instanceof http$7.Agent) try {
+ return socket.addRequest(req, connectOpts);
+ } catch (err) {
+ return cb(err);
}
- }
- }
- }
- #evict(free) {
- const head = this.#head;
- const k = this.#keyList[head];
- const v = this.#valList[head];
- if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
- v.__abortController.abort(new Error("evicted"));
- } else if (this.#hasDispose || this.#hasDisposeAfter) {
- if (this.#hasDispose) {
- this.#dispose?.(v, k, "evict");
- }
- if (this.#hasDisposeAfter) {
- this.#disposed?.push([
- v,
- k,
- "evict"
- ]);
- }
+ this[INTERNAL].currentSocket = socket;
+ super.createSocket(req, options, cb);
+ }, (err) => {
+ this.decrementSockets(name, fakeSocket);
+ cb(err);
+ });
}
- this.#removeItemSize(head);
- if (free) {
- this.#keyList[head] = undefined;
- this.#valList[head] = undefined;
- this.#free.push(head);
+ createConnection() {
+ const socket = this[INTERNAL].currentSocket;
+ this[INTERNAL].currentSocket = void 0;
+ if (!socket) throw new Error("No socket was returned in the `connect()` function");
+ return socket;
}
- if (this.#size === 1) {
- this.#head = this.#tail = 0;
- this.#free.length = 0;
- } else {
- this.#head = this.#next[head];
+ get defaultPort() {
+ return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
}
- this.#keyMap.delete(k);
- this.#size--;
- return head;
- }
- /**
- * Check if a key is in the cache, without updating the recency of use.
- * Will return false if the item is stale, even though it is technically
- * in the cache.
- *
- * Will not update item age unless
- * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
- */
- has(k, hasOptions = {}) {
- const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
- const index = this.#keyMap.get(k);
- if (index !== undefined) {
- const v = this.#valList[index];
- if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === undefined) {
- return false;
- }
- if (!this.#isStale(index)) {
- if (updateAgeOnHas) {
- this.#updateItemAge(index);
- }
- if (status) {
- status.has = "hit";
- this.#statusTTL(status, index);
- }
- return true;
- } else if (status) {
- status.has = "stale";
- this.#statusTTL(status, index);
- }
- } else if (status) {
- status.has = "miss";
+ set defaultPort(v) {
+ if (this[INTERNAL]) this[INTERNAL].defaultPort = v;
}
- return false;
- }
- /**
- * Like {@link LRUCache#get} but doesn't update recency or delete stale
- * items.
- *
- * Returns `undefined` if the item is stale, unless
- * {@link LRUCache.OptionsBase.allowStale} is set.
- */
- peek(k, peekOptions = {}) {
- const { allowStale = this.allowStale } = peekOptions;
- const index = this.#keyMap.get(k);
- if (index !== undefined && (allowStale || !this.#isStale(index))) {
- const v = this.#valList[index];
- return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
+ get protocol() {
+ return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
}
- }
- #backgroundFetch(k, index, options, context) {
- const v = index === undefined ? undefined : this.#valList[index];
- if (this.#isBackgroundFetch(v)) {
- return v;
+ set protocol(v) {
+ if (this[INTERNAL]) this[INTERNAL].protocol = v;
}
- const ac = new AC();
- const { signal } = options;
- signal?.addEventListener("abort", () => ac.abort(signal.reason), { signal: ac.signal });
- const fetchOpts = {
- signal: ac.signal,
- options,
- context
- };
- const cb = (v, updateCache = false) => {
- const { aborted } = ac.signal;
- const ignoreAbort = options.ignoreFetchAbort && v !== undefined;
- if (options.status) {
- if (aborted && !updateCache) {
- options.status.fetchAborted = true;
- options.status.fetchError = ac.signal.reason;
- if (ignoreAbort) options.status.fetchAbortIgnored = true;
- } else {
- options.status.fetchResolved = true;
- }
+ };
+ exports.Agent = Agent;
+}));
+//#endregion
+//#region ../node_modules/https-proxy-agent/dist/parse-proxy-response.js
+var require_parse_proxy_response = /* @__PURE__ */ __commonJSMin(((exports) => {
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.parseProxyResponse = void 0;
+ const debug = (0, __importDefault(require_src()).default)("https-proxy-agent:parse-proxy-response");
+ function parseProxyResponse(socket) {
+ return new Promise((resolve, reject) => {
+ let buffersLength = 0;
+ const buffers = [];
+ function read() {
+ const b = socket.read();
+ if (b) ondata(b);
+ else socket.once("readable", read);
}
- if (aborted && !ignoreAbort && !updateCache) {
- return fetchFail(ac.signal.reason);
+ function cleanup() {
+ socket.removeListener("end", onend);
+ socket.removeListener("error", onerror);
+ socket.removeListener("readable", read);
}
- const bf = p;
- if (this.#valList[index] === p) {
- if (v === undefined) {
- if (bf.__staleWhileFetching) {
- this.#valList[index] = bf.__staleWhileFetching;
- } else {
- this.delete(k);
- }
- } else {
- if (options.status) options.status.fetchUpdated = true;
- this.set(k, v, fetchOpts.options);
- }
+ function onend() {
+ cleanup();
+ debug("onend");
+ reject(/* @__PURE__ */ new Error("Proxy connection ended before receiving CONNECT response"));
}
- return v;
- };
- const eb = (er) => {
- if (options.status) {
- options.status.fetchRejected = true;
- options.status.fetchError = er;
+ function onerror(err) {
+ cleanup();
+ debug("onerror %o", err);
+ reject(err);
}
- return fetchFail(er);
- };
- const fetchFail = (er) => {
- const { aborted } = ac.signal;
- const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
- const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
- const noDelete = allowStale || options.noDeleteOnFetchRejection;
- const bf = p;
- if (this.#valList[index] === p) {
- const del = !noDelete || bf.__staleWhileFetching === undefined;
- if (del) {
- this.delete(k);
- } else if (!allowStaleAborted) {
- this.#valList[index] = bf.__staleWhileFetching;
+ function ondata(b) {
+ buffers.push(b);
+ buffersLength += b.length;
+ const buffered = Buffer.concat(buffers, buffersLength);
+ const endOfHeaders = buffered.indexOf("\r\n\r\n");
+ if (endOfHeaders === -1) {
+ debug("have not received end of HTTP headers yet...");
+ read();
+ return;
}
- }
- if (allowStale) {
- if (options.status && bf.__staleWhileFetching !== undefined) {
- options.status.returnedStale = true;
+ const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n");
+ const firstLine = headerParts.shift();
+ if (!firstLine) {
+ socket.destroy();
+ return reject(/* @__PURE__ */ new Error("No header received from proxy CONNECT response"));
}
- return bf.__staleWhileFetching;
- } else if (bf.__returned === bf) {
- throw er;
- }
- };
- const pcall = (res, rej) => {
- const fmp = this.#fetchMethod?.(k, v, fetchOpts);
- if (fmp && fmp instanceof Promise) {
- fmp.then((v) => res(v), rej);
- }
- ac.signal.addEventListener("abort", () => {
- if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
- res();
- if (options.allowStaleOnFetchAbort) {
- res = (v) => cb(v, true);
+ const firstLineParts = firstLine.split(" ");
+ const statusCode = +firstLineParts[1];
+ const statusText = firstLineParts.slice(2).join(" ");
+ const headers = {};
+ for (const header of headerParts) {
+ if (!header) continue;
+ const firstColon = header.indexOf(":");
+ if (firstColon === -1) {
+ socket.destroy();
+ return reject(/* @__PURE__ */ new Error(`Invalid header from proxy CONNECT response: "${header}"`));
}
+ const key = header.slice(0, firstColon).toLowerCase();
+ const value = header.slice(firstColon + 1).trimStart();
+ const current = headers[key];
+ if (typeof current === "string") headers[key] = [current, value];
+ else if (Array.isArray(current)) current.push(value);
+ else headers[key] = value;
}
- });
- };
- if (options.status) options.status.fetchDispatched = true;
- const p = new Promise(pcall).then(cb, eb);
- const bf = Object.assign(p, {
- __abortController: ac,
- __staleWhileFetching: v,
- __returned: undefined
+ debug("got proxy server response: %o %o", firstLine, headers);
+ cleanup();
+ resolve({
+ connect: {
+ statusCode,
+ statusText,
+ headers
+ },
+ buffered
+ });
+ }
+ socket.on("error", onerror);
+ socket.on("end", onend);
+ read();
});
- if (index === undefined) {
- this.set(k, bf, {
- ...fetchOpts.options,
- status: undefined
- });
- index = this.#keyMap.get(k);
- } else {
- this.#valList[index] = bf;
- }
- return bf;
- }
- #isBackgroundFetch(p) {
- if (!this.#hasFetchMethod) return false;
- const b = p;
- return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
}
- async fetch(k, fetchOptions = {}) {
- const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal } = fetchOptions;
- if (!this.#hasFetchMethod) {
- if (status) status.fetch = "get";
- return this.get(k, {
- allowStale,
- updateAgeOnGet,
- noDeleteOnStaleGet,
- status
- });
- }
- const options = {
- allowStale,
- updateAgeOnGet,
- noDeleteOnStaleGet,
- ttl,
- noDisposeOnSet,
- size,
- sizeCalculation,
- noUpdateTTL,
- noDeleteOnFetchRejection,
- allowStaleOnFetchRejection,
- allowStaleOnFetchAbort,
- ignoreFetchAbort,
- status,
- signal
- };
- let index = this.#keyMap.get(k);
- if (index === undefined) {
- if (status) status.fetch = "miss";
- const p = this.#backgroundFetch(k, index, options, context);
- return p.__returned = p;
- } else {
- const v = this.#valList[index];
- if (this.#isBackgroundFetch(v)) {
- const stale = allowStale && v.__staleWhileFetching !== undefined;
- if (status) {
- status.fetch = "inflight";
- if (stale) status.returnedStale = true;
- }
- return stale ? v.__staleWhileFetching : v.__returned = v;
- }
- const isStale = this.#isStale(index);
- if (!forceRefresh && !isStale) {
- if (status) status.fetch = "hit";
- this.#moveToTail(index);
- if (updateAgeOnGet) {
- this.#updateItemAge(index);
- }
- if (status) this.#statusTTL(status, index);
- return v;
- }
- const p = this.#backgroundFetch(k, index, options, context);
- const hasStale = p.__staleWhileFetching !== undefined;
- const staleVal = hasStale && allowStale;
- if (status) {
- status.fetch = isStale ? "stale" : "refresh";
- if (staleVal && isStale) status.returnedStale = true;
+ exports.parseProxyResponse = parseProxyResponse;
+}));
+//#endregion
+//#region ../node_modules/https-proxy-agent/dist/index.js
+var require_dist$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
+ enumerable: true,
+ get: function() {
+ return m[k];
}
- return staleVal ? p.__staleWhileFetching : p.__returned = p;
+ };
+ Object.defineProperty(o, k2, desc);
+ }) : (function(o, m, k, k2) {
+ if (k2 === void 0) k2 = k;
+ o[k2] = m[k];
+ }));
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", {
+ enumerable: true,
+ value: v
+ });
+ }) : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
}
- }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.HttpsProxyAgent = void 0;
+ const net$4 = __importStar(__require("net"));
+ const tls$1 = __importStar(__require("tls"));
+ const assert_1 = __importDefault(__require("assert"));
+ const debug_1 = __importDefault(require_src());
+ const agent_base_1 = require_dist$5();
+ const url_1 = __require("url");
+ const parse_proxy_response_1 = require_parse_proxy_response();
+ const debug = (0, debug_1.default)("https-proxy-agent");
+ const setServernameFromNonIpHost = (options) => {
+ if (options.servername === void 0 && options.host && !net$4.isIP(options.host)) return {
+ ...options,
+ servername: options.host
+ };
+ return options;
+ };
/**
- * Return a value from the cache. Will update the recency of the cache
- * entry found.
+ * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
+ * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
*
- * If the key is not found, get() will return `undefined`.
+ * Outgoing HTTP requests are first tunneled through the proxy server using the
+ * `CONNECT` HTTP request method to establish a connection to the proxy server,
+ * and then the proxy server connects to the destination target and issues the
+ * HTTP request from the proxy server.
+ *
+ * `https:` requests have their socket connection upgraded to TLS once
+ * the connection to the proxy server has been established.
*/
- get(k, getOptions = {}) {
- const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
- const index = this.#keyMap.get(k);
- if (index !== undefined) {
- const value = this.#valList[index];
- const fetching = this.#isBackgroundFetch(value);
- if (status) this.#statusTTL(status, index);
- if (this.#isStale(index)) {
- if (status) status.get = "stale";
- if (!fetching) {
- if (!noDeleteOnStaleGet) {
- this.delete(k);
- }
- if (status && allowStale) status.returnedStale = true;
- return allowStale ? value : undefined;
- } else {
- if (status && allowStale && value.__staleWhileFetching !== undefined) {
- status.returnedStale = true;
- }
- return allowStale ? value.__staleWhileFetching : undefined;
- }
- } else {
- if (status) status.get = "hit";
- if (fetching) {
- return value.__staleWhileFetching;
- }
- this.#moveToTail(index);
- if (updateAgeOnGet) {
- this.#updateItemAge(index);
- }
- return value;
- }
- } else if (status) {
- status.get = "miss";
+ var HttpsProxyAgent = class extends agent_base_1.Agent {
+ constructor(proxy, opts) {
+ super(opts);
+ this.options = { path: void 0 };
+ this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
+ this.proxyHeaders = opts?.headers ?? {};
+ debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
+ const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
+ const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
+ this.connectOpts = {
+ ALPNProtocols: ["http/1.1"],
+ ...opts ? omit(opts, "headers") : null,
+ host,
+ port
+ };
}
- }
- #connect(p, n) {
- this.#prev[n] = p;
- this.#next[p] = n;
- }
- #moveToTail(index) {
- if (index !== this.#tail) {
- if (index === this.#head) {
- this.#head = this.#next[index];
+ /**
+ * Called when the node-core HTTP client library is creating a
+ * new HTTP request.
+ */
+ async connect(req, opts) {
+ const { proxy } = this;
+ if (!opts.host) throw new TypeError("No \"host\" provided");
+ let socket;
+ if (proxy.protocol === "https:") {
+ debug("Creating `tls.Socket`: %o", this.connectOpts);
+ socket = tls$1.connect(setServernameFromNonIpHost(this.connectOpts));
} else {
- this.#connect(this.#prev[index], this.#next[index]);
- }
- this.#connect(this.#tail, index);
- this.#tail = index;
- }
- }
- /**
- * Deletes a key out of the cache.
- * Returns true if the key was deleted, false otherwise.
- */
- delete(k) {
- let deleted = false;
- if (this.#size !== 0) {
- const index = this.#keyMap.get(k);
- if (index !== undefined) {
- deleted = true;
- if (this.#size === 1) {
- this.clear();
- } else {
- this.#removeItemSize(index);
- const v = this.#valList[index];
- if (this.#isBackgroundFetch(v)) {
- v.__abortController.abort(new Error("deleted"));
- } else if (this.#hasDispose || this.#hasDisposeAfter) {
- if (this.#hasDispose) {
- this.#dispose?.(v, k, "delete");
- }
- if (this.#hasDisposeAfter) {
- this.#disposed?.push([
- v,
- k,
- "delete"
- ]);
- }
- }
- this.#keyMap.delete(k);
- this.#keyList[index] = undefined;
- this.#valList[index] = undefined;
- if (index === this.#tail) {
- this.#tail = this.#prev[index];
- } else if (index === this.#head) {
- this.#head = this.#next[index];
- } else {
- this.#next[this.#prev[index]] = this.#next[index];
- this.#prev[this.#next[index]] = this.#prev[index];
- }
- this.#size--;
- this.#free.push(index);
- }
+ debug("Creating `net.Socket`: %o", this.connectOpts);
+ socket = net$4.connect(this.connectOpts);
}
- }
- if (this.#hasDisposeAfter && this.#disposed?.length) {
- const dt = this.#disposed;
- let task;
- while (task = dt?.shift()) {
- this.#disposeAfter?.(...task);
+ const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
+ const host = net$4.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
+ let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`;
+ if (proxy.username || proxy.password) {
+ const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
+ headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
}
- }
- return deleted;
- }
- /**
- * Clear the cache entirely, throwing away all values.
- */
- clear() {
- for (const index of this.#rindexes({ allowStale: true })) {
- const v = this.#valList[index];
- if (this.#isBackgroundFetch(v)) {
- v.__abortController.abort(new Error("deleted"));
- } else {
- const k = this.#keyList[index];
- if (this.#hasDispose) {
- this.#dispose?.(v, k, "delete");
- }
- if (this.#hasDisposeAfter) {
- this.#disposed?.push([
- v,
- k,
- "delete"
- ]);
+ headers.Host = `${host}:${opts.port}`;
+ if (!headers["Proxy-Connection"]) headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
+ for (const name of Object.keys(headers)) payload += `${name}: ${headers[name]}\r\n`;
+ const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
+ socket.write(`${payload}\r\n`);
+ const { connect, buffered } = await proxyResponsePromise;
+ req.emit("proxyConnect", connect);
+ this.emit("proxyConnect", connect, req);
+ if (connect.statusCode === 200) {
+ req.once("socket", resume);
+ if (opts.secureEndpoint) {
+ debug("Upgrading socket connection to TLS");
+ return tls$1.connect({
+ ...omit(setServernameFromNonIpHost(opts), "host", "path", "port"),
+ socket
+ });
}
+ return socket;
}
+ socket.destroy();
+ const fakeSocket = new net$4.Socket({ writable: false });
+ fakeSocket.readable = true;
+ req.once("socket", (s) => {
+ debug("Replaying proxy buffer for failed request");
+ (0, assert_1.default)(s.listenerCount("data") > 0);
+ s.push(buffered);
+ s.push(null);
+ });
+ return fakeSocket;
}
- this.#keyMap.clear();
- this.#valList.fill(undefined);
- this.#keyList.fill(undefined);
- if (this.#ttls && this.#starts) {
- this.#ttls.fill(0);
- this.#starts.fill(0);
- }
- if (this.#sizes) {
- this.#sizes.fill(0);
- }
- this.#head = 0;
- this.#tail = 0;
- this.#free.length = 0;
- this.#calculatedSize = 0;
- this.#size = 0;
- if (this.#hasDisposeAfter && this.#disposed) {
- const dt = this.#disposed;
- let task;
- while (task = dt?.shift()) {
- this.#disposeAfter?.(...task);
- }
- }
+ };
+ HttpsProxyAgent.protocols = ["http", "https"];
+ exports.HttpsProxyAgent = HttpsProxyAgent;
+ function resume(socket) {
+ socket.resume();
}
-};
-
+ function omit(obj, ...keys) {
+ const ret = {};
+ let key;
+ for (key in obj) if (!keys.includes(key)) ret[key] = obj[key];
+ return ret;
+ }
+}));
//#endregion
//#region ../node_modules/pino-std-serializers/lib/err-helpers.js
var require_err_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80435,10 +74955,8 @@ var require_err_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const cause = err.cause;
if (typeof cause === "function") {
const causeResult = err.cause();
- return isErrorLike(causeResult) ? causeResult : undefined;
- } else {
- return isErrorLike(cause) ? cause : undefined;
- }
+ return isErrorLike(causeResult) ? causeResult : void 0;
+ } else return isErrorLike(cause) ? cause : void 0;
};
/**
* Internal method that keeps a track of which error we have already added, to avoid circular recursion
@@ -80451,22 +74969,18 @@ var require_err_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const _stackWithCauses = (err, seen) => {
if (!isErrorLike(err)) return "";
const stack = err.stack || "";
- if (seen.has(err)) {
- return stack + "\ncauses have become circular...";
- }
+ if (seen.has(err)) return stack + "\ncauses have become circular...";
const cause = getErrorCause(err);
if (cause) {
seen.add(err);
return stack + "\ncaused by: " + _stackWithCauses(cause, seen);
- } else {
- return stack;
- }
+ } else return stack;
};
/**
* @param {Error} err
* @returns {string}
*/
- const stackWithCauses = (err) => _stackWithCauses(err, new Set());
+ const stackWithCauses = (err) => _stackWithCauses(err, /* @__PURE__ */ new Set());
/**
* Internal method that keeps a track of which error we have already added, to avoid circular recursion
*
@@ -80479,23 +74993,19 @@ var require_err_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const _messageWithCauses = (err, seen, skip) => {
if (!isErrorLike(err)) return "";
const message = skip ? "" : err.message || "";
- if (seen.has(err)) {
- return message + ": ...";
- }
+ if (seen.has(err)) return message + ": ...";
const cause = getErrorCause(err);
if (cause) {
seen.add(err);
const skipIfVErrorStyleCause = typeof err.cause === "function";
return message + (skipIfVErrorStyleCause ? "" : ": ") + _messageWithCauses(cause, seen, skipIfVErrorStyleCause);
- } else {
- return message;
- }
+ } else return message;
};
/**
* @param {Error} err
* @returns {string}
*/
- const messageWithCauses = (err) => _messageWithCauses(err, new Set());
+ const messageWithCauses = (err) => _messageWithCauses(err, /* @__PURE__ */ new Set());
module.exports = {
isErrorLike,
getErrorCause,
@@ -80503,7 +75013,6 @@ var require_err_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
messageWithCauses
};
}));
-
//#endregion
//#region ../node_modules/pino-std-serializers/lib/err-proto.js
var require_err_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80513,22 +75022,22 @@ var require_err_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
type: {
enumerable: true,
writable: true,
- value: undefined
+ value: void 0
},
message: {
enumerable: true,
writable: true,
- value: undefined
+ value: void 0
},
stack: {
enumerable: true,
writable: true,
- value: undefined
+ value: void 0
},
aggregateErrors: {
enumerable: true,
writable: true,
- value: undefined
+ value: void 0
},
raw: {
enumerable: false,
@@ -80552,7 +75061,6 @@ var require_err_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
}));
-
//#endregion
//#region ../node_modules/pino-std-serializers/lib/err.js
var require_err = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80562,35 +75070,24 @@ var require_err = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { seen } = pinoErrorSymbols;
const { toString } = Object.prototype;
function errSerializer(err) {
- if (!isErrorLike(err)) {
- return err;
- }
- err[seen] = undefined;
+ if (!isErrorLike(err)) return err;
+ err[seen] = void 0;
const _err = Object.create(pinoErrProto);
_err.type = toString.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name;
_err.message = messageWithCauses(err);
_err.stack = stackWithCauses(err);
- if (Array.isArray(err.errors)) {
- _err.aggregateErrors = err.errors.map((err) => errSerializer(err));
- }
- for (const key in err) {
- if (_err[key] === undefined) {
- const val = err[key];
- if (isErrorLike(val)) {
- if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val, seen)) {
- _err[key] = errSerializer(val);
- }
- } else {
- _err[key] = val;
- }
- }
+ if (Array.isArray(err.errors)) _err.aggregateErrors = err.errors.map((err) => errSerializer(err));
+ for (const key in err) if (_err[key] === void 0) {
+ const val = err[key];
+ if (isErrorLike(val)) {
+ if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val, seen)) _err[key] = errSerializer(val);
+ } else _err[key] = val;
}
delete err[seen];
_err.raw = err;
return _err;
}
}));
-
//#endregion
//#region ../node_modules/pino-std-serializers/lib/err-with-cause.js
var require_err_with_cause = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80600,38 +75097,25 @@ var require_err_with_cause = /* @__PURE__ */ __commonJSMin(((exports, module) =>
const { seen } = pinoErrorSymbols;
const { toString } = Object.prototype;
function errWithCauseSerializer(err) {
- if (!isErrorLike(err)) {
- return err;
- }
- err[seen] = undefined;
+ if (!isErrorLike(err)) return err;
+ err[seen] = void 0;
const _err = Object.create(pinoErrProto);
_err.type = toString.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name;
_err.message = err.message;
_err.stack = err.stack;
- if (Array.isArray(err.errors)) {
- _err.aggregateErrors = err.errors.map((err) => errWithCauseSerializer(err));
- }
- if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) {
- _err.cause = errWithCauseSerializer(err.cause);
- }
- for (const key in err) {
- if (_err[key] === undefined) {
- const val = err[key];
- if (isErrorLike(val)) {
- if (!Object.prototype.hasOwnProperty.call(val, seen)) {
- _err[key] = errWithCauseSerializer(val);
- }
- } else {
- _err[key] = val;
- }
- }
+ if (Array.isArray(err.errors)) _err.aggregateErrors = err.errors.map((err) => errWithCauseSerializer(err));
+ if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) _err.cause = errWithCauseSerializer(err.cause);
+ for (const key in err) if (_err[key] === void 0) {
+ const val = err[key];
+ if (isErrorLike(val)) {
+ if (!Object.prototype.hasOwnProperty.call(val, seen)) _err[key] = errWithCauseSerializer(val);
+ } else _err[key] = val;
}
delete err[seen];
_err.raw = err;
return _err;
}
}));
-
//#endregion
//#region ../node_modules/pino-std-serializers/lib/req.js
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80698,20 +75182,15 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function reqSerializer(req) {
const connection = req.info || req.socket;
const _req = Object.create(pinoReqProto);
- _req.id = typeof req.id === "function" ? req.id() : req.id || (req.info ? req.info.id : undefined);
+ _req.id = typeof req.id === "function" ? req.id() : req.id || (req.info ? req.info.id : void 0);
_req.method = req.method;
- if (req.originalUrl) {
- _req.url = req.originalUrl;
- } else {
+ if (req.originalUrl) _req.url = req.originalUrl;
+ else {
const path = req.path;
- _req.url = typeof path === "string" ? path : req.url ? req.url.path || req.url : undefined;
- }
- if (req.query) {
- _req.query = req.query;
- }
- if (req.params) {
- _req.params = req.params;
+ _req.url = typeof path === "string" ? path : req.url ? req.url.path || req.url : void 0;
}
+ if (req.query) _req.query = req.query;
+ if (req.params) _req.params = req.params;
_req.headers = req.headers;
_req.remoteAddress = connection && connection.remoteAddress;
_req.remotePort = connection && connection.remotePort;
@@ -80722,7 +75201,6 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return { req: reqSerializer(req) };
}
}));
-
//#endregion
//#region ../node_modules/pino-std-serializers/lib/res.js
var require_res = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80767,7 +75245,6 @@ var require_res = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return { res: resSerializer(res) };
}
}));
-
//#endregion
//#region ../node_modules/pino-std-serializers/index.js
var require_pino_std_serializers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80802,7 +75279,6 @@ var require_pino_std_serializers = /* @__PURE__ */ __commonJSMin(((exports, modu
}
};
}));
-
//#endregion
//#region ../node_modules/pino/lib/caller.js
var require_caller = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -80812,47 +75288,32 @@ var require_caller = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = function getCallers() {
const originalPrepare = Error.prepareStackTrace;
Error.prepareStackTrace = noOpPrepareStackTrace;
- const stack = new Error().stack;
+ const stack = (/* @__PURE__ */ new Error()).stack;
Error.prepareStackTrace = originalPrepare;
- if (!Array.isArray(stack)) {
- return undefined;
- }
+ if (!Array.isArray(stack)) return;
const entries = stack.slice(2);
const fileNames = [];
for (const entry of entries) {
- if (!entry) {
- continue;
- }
+ if (!entry) continue;
fileNames.push(entry.getFileName());
}
return fileNames;
};
}));
-
//#endregion
//#region ../node_modules/@pinojs/redact/index.js
var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function deepClone(obj) {
- if (obj === null || typeof obj !== "object") {
- return obj;
- }
- if (obj instanceof Date) {
- return new Date(obj.getTime());
- }
+ if (obj === null || typeof obj !== "object") return obj;
+ if (obj instanceof Date) return new Date(obj.getTime());
if (obj instanceof Array) {
const cloned = [];
- for (let i = 0; i < obj.length; i++) {
- cloned[i] = deepClone(obj[i]);
- }
+ for (let i = 0; i < obj.length; i++) cloned[i] = deepClone(obj[i]);
return cloned;
}
if (typeof obj === "object") {
const cloned = Object.create(Object.getPrototypeOf(obj));
- for (const key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- cloned[key] = deepClone(obj[key]);
- }
- }
+ for (const key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) cloned[key] = deepClone(obj[key]);
return cloned;
}
return obj;
@@ -80881,102 +75342,59 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
current = "";
inBrackets = false;
inQuotes = false;
- } else if ((char === "\"" || char === "'") && inBrackets) {
- if (!inQuotes) {
- inQuotes = true;
- quoteChar = char;
- } else if (char === quoteChar) {
- inQuotes = false;
- quoteChar = "";
- } else {
- current += char;
- }
- } else {
- current += char;
- }
- }
- if (current) {
- parts.push(current);
+ } else if ((char === "\"" || char === "'") && inBrackets) if (!inQuotes) {
+ inQuotes = true;
+ quoteChar = char;
+ } else if (char === quoteChar) {
+ inQuotes = false;
+ quoteChar = "";
+ } else current += char;
+ else current += char;
}
+ if (current) parts.push(current);
return parts;
}
function setValue(obj, parts, value) {
let current = obj;
for (let i = 0; i < parts.length - 1; i++) {
const key = parts[i];
- if (typeof current !== "object" || current === null || !(key in current)) {
- return false;
- }
- if (typeof current[key] !== "object" || current[key] === null) {
- return false;
- }
+ if (typeof current !== "object" || current === null || !(key in current)) return false;
+ if (typeof current[key] !== "object" || current[key] === null) return false;
current = current[key];
}
const lastKey = parts[parts.length - 1];
if (lastKey === "*") {
- if (Array.isArray(current)) {
- for (let i = 0; i < current.length; i++) {
- current[i] = value;
- }
- } else if (typeof current === "object" && current !== null) {
- for (const key in current) {
- if (Object.prototype.hasOwnProperty.call(current, key)) {
- current[key] = value;
- }
- }
+ if (Array.isArray(current)) for (let i = 0; i < current.length; i++) current[i] = value;
+ else if (typeof current === "object" && current !== null) {
+ for (const key in current) if (Object.prototype.hasOwnProperty.call(current, key)) current[key] = value;
}
- } else {
- if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) {
- current[lastKey] = value;
- }
- }
+ } else if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) current[lastKey] = value;
return true;
}
function removeKey(obj, parts) {
let current = obj;
for (let i = 0; i < parts.length - 1; i++) {
const key = parts[i];
- if (typeof current !== "object" || current === null || !(key in current)) {
- return false;
- }
- if (typeof current[key] !== "object" || current[key] === null) {
- return false;
- }
+ if (typeof current !== "object" || current === null || !(key in current)) return false;
+ if (typeof current[key] !== "object" || current[key] === null) return false;
current = current[key];
}
const lastKey = parts[parts.length - 1];
if (lastKey === "*") {
- if (Array.isArray(current)) {
- for (let i = 0; i < current.length; i++) {
- current[i] = undefined;
- }
- } else if (typeof current === "object" && current !== null) {
- for (const key in current) {
- if (Object.prototype.hasOwnProperty.call(current, key)) {
- delete current[key];
- }
- }
+ if (Array.isArray(current)) for (let i = 0; i < current.length; i++) current[i] = void 0;
+ else if (typeof current === "object" && current !== null) {
+ for (const key in current) if (Object.prototype.hasOwnProperty.call(current, key)) delete current[key];
}
- } else {
- if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) {
- delete current[lastKey];
- }
- }
+ } else if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) delete current[lastKey];
return true;
}
const PATH_NOT_FOUND = Symbol("PATH_NOT_FOUND");
function getValueIfExists(obj, parts) {
let current = obj;
for (const part of parts) {
- if (current === null || current === undefined) {
- return PATH_NOT_FOUND;
- }
- if (typeof current !== "object" || current === null) {
- return PATH_NOT_FOUND;
- }
- if (!(part in current)) {
- return PATH_NOT_FOUND;
- }
+ if (current === null || current === void 0) return PATH_NOT_FOUND;
+ if (typeof current !== "object" || current === null) return PATH_NOT_FOUND;
+ if (!(part in current)) return PATH_NOT_FOUND;
current = current[part];
}
return current;
@@ -80984,12 +75402,8 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function getValue(obj, parts) {
let current = obj;
for (const part of parts) {
- if (current === null || current === undefined) {
- return undefined;
- }
- if (typeof current !== "object" || current === null) {
- return undefined;
- }
+ if (current === null || current === void 0) return;
+ if (typeof current !== "object" || current === null) return;
current = current[part];
}
return current;
@@ -80997,19 +75411,12 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function redactPaths(obj, paths, censor, remove = false) {
for (const path of paths) {
const parts = parsePath(path);
- if (parts.includes("*")) {
- redactWildcardPath(obj, parts, censor, path, remove);
- } else {
- if (remove) {
- removeKey(obj, parts);
- } else {
- const value = getValueIfExists(obj, parts);
- if (value === PATH_NOT_FOUND) {
- continue;
- }
- const actualCensor = typeof censor === "function" ? censor(value, parts) : censor;
- setValue(obj, parts, actualCensor);
- }
+ if (parts.includes("*")) redactWildcardPath(obj, parts, censor, path, remove);
+ else if (remove) removeKey(obj, parts);
+ else {
+ const value = getValueIfExists(obj, parts);
+ if (value === PATH_NOT_FOUND) continue;
+ setValue(obj, parts, typeof censor === "function" ? censor(value, parts) : censor);
}
}
}
@@ -81019,44 +75426,26 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const parentParts = parts.slice(0, -1);
let current = obj;
for (const part of parentParts) {
- if (current === null || current === undefined) return;
+ if (current === null || current === void 0) return;
if (typeof current !== "object" || current === null) return;
current = current[part];
}
- if (Array.isArray(current)) {
- if (remove) {
- for (let i = 0; i < current.length; i++) {
- current[i] = undefined;
- }
- } else {
- for (let i = 0; i < current.length; i++) {
- const indexPath = [...parentParts, i.toString()];
- const actualCensor = typeof censor === "function" ? censor(current[i], indexPath) : censor;
- current[i] = actualCensor;
- }
- }
- } else if (typeof current === "object" && current !== null) {
- if (remove) {
- const keysToDelete = [];
- for (const key in current) {
- if (Object.prototype.hasOwnProperty.call(current, key)) {
- keysToDelete.push(key);
- }
- }
- for (const key of keysToDelete) {
- delete current[key];
- }
- } else {
- for (const key in current) {
- const keyPath = [...parentParts, key];
- const actualCensor = typeof censor === "function" ? censor(current[key], keyPath) : censor;
- current[key] = actualCensor;
- }
- }
+ if (Array.isArray(current)) if (remove) for (let i = 0; i < current.length; i++) current[i] = void 0;
+ else for (let i = 0; i < current.length; i++) {
+ const indexPath = [...parentParts, i.toString()];
+ const actualCensor = typeof censor === "function" ? censor(current[i], indexPath) : censor;
+ current[i] = actualCensor;
}
- } else {
- redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove);
- }
+ else if (typeof current === "object" && current !== null) if (remove) {
+ const keysToDelete = [];
+ for (const key in current) if (Object.prototype.hasOwnProperty.call(current, key)) keysToDelete.push(key);
+ for (const key of keysToDelete) delete current[key];
+ } else for (const key in current) {
+ const keyPath = [...parentParts, key];
+ const actualCensor = typeof censor === "function" ? censor(current[key], keyPath) : censor;
+ current[key] = actualCensor;
+ }
+ } else redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove);
}
function redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove = false) {
const beforeWildcard = parts.slice(0, wildcardIndex);
@@ -81064,16 +75453,13 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const pathArray = [];
function traverse(current, pathLength) {
if (pathLength === beforeWildcard.length) {
- if (Array.isArray(current)) {
- for (let i = 0; i < current.length; i++) {
- pathArray[pathLength] = i.toString();
- traverse(current[i], pathLength + 1);
- }
- } else if (typeof current === "object" && current !== null) {
- for (const key in current) {
- pathArray[pathLength] = key;
- traverse(current[key], pathLength + 1);
- }
+ if (Array.isArray(current)) for (let i = 0; i < current.length; i++) {
+ pathArray[pathLength] = i.toString();
+ traverse(current[i], pathLength + 1);
+ }
+ else if (typeof current === "object" && current !== null) for (const key in current) {
+ pathArray[pathLength] = key;
+ traverse(current[key], pathLength + 1);
}
} else if (pathLength < beforeWildcard.length) {
const nextKey = beforeWildcard[pathLength];
@@ -81081,110 +75467,66 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pathArray[pathLength] = nextKey;
traverse(current[nextKey], pathLength + 1);
}
- } else {
- if (afterWildcard.includes("*")) {
- const wrappedCensor = typeof censor === "function" ? (value, path) => {
- const fullPath = [...pathArray.slice(0, pathLength), ...path];
- return censor(value, fullPath);
- } : censor;
- redactWildcardPath(current, afterWildcard, wrappedCensor, originalPath, remove);
- } else {
- if (remove) {
- removeKey(current, afterWildcard);
- } else {
- const actualCensor = typeof censor === "function" ? censor(getValue(current, afterWildcard), [...pathArray.slice(0, pathLength), ...afterWildcard]) : censor;
- setValue(current, afterWildcard, actualCensor);
- }
- }
- }
+ } else if (afterWildcard.includes("*")) redactWildcardPath(current, afterWildcard, typeof censor === "function" ? (value, path) => {
+ return censor(value, [...pathArray.slice(0, pathLength), ...path]);
+ } : censor, originalPath, remove);
+ else if (remove) removeKey(current, afterWildcard);
+ else setValue(current, afterWildcard, typeof censor === "function" ? censor(getValue(current, afterWildcard), [...pathArray.slice(0, pathLength), ...afterWildcard]) : censor);
}
- if (beforeWildcard.length === 0) {
- traverse(obj, 0);
- } else {
+ if (beforeWildcard.length === 0) traverse(obj, 0);
+ else {
let current = obj;
for (let i = 0; i < beforeWildcard.length; i++) {
const part = beforeWildcard[i];
- if (current === null || current === undefined) return;
+ if (current === null || current === void 0) return;
if (typeof current !== "object" || current === null) return;
current = current[part];
pathArray[i] = part;
}
- if (current !== null && current !== undefined) {
- traverse(current, beforeWildcard.length);
- }
+ if (current !== null && current !== void 0) traverse(current, beforeWildcard.length);
}
}
function buildPathStructure(pathsToClone) {
- if (pathsToClone.length === 0) {
- return null;
- }
- const pathStructure = new Map();
+ if (pathsToClone.length === 0) return null;
+ const pathStructure = /* @__PURE__ */ new Map();
for (const path of pathsToClone) {
const parts = parsePath(path);
let current = pathStructure;
for (let i = 0; i < parts.length; i++) {
const part = parts[i];
- if (!current.has(part)) {
- current.set(part, new Map());
- }
+ if (!current.has(part)) current.set(part, /* @__PURE__ */ new Map());
current = current.get(part);
}
}
return pathStructure;
}
function selectiveClone(obj, pathStructure) {
- if (!pathStructure) {
- return obj;
- }
+ if (!pathStructure) return obj;
function cloneSelectively(source, pathMap, depth = 0) {
- if (!pathMap || pathMap.size === 0) {
- return source;
- }
- if (source === null || typeof source !== "object") {
- return source;
- }
- if (source instanceof Date) {
- return new Date(source.getTime());
- }
+ if (!pathMap || pathMap.size === 0) return source;
+ if (source === null || typeof source !== "object") return source;
+ if (source instanceof Date) return new Date(source.getTime());
if (Array.isArray(source)) {
const cloned = [];
for (let i = 0; i < source.length; i++) {
const indexStr = i.toString();
- if (pathMap.has(indexStr) || pathMap.has("*")) {
- cloned[i] = cloneSelectively(source[i], pathMap.get(indexStr) || pathMap.get("*"));
- } else {
- cloned[i] = source[i];
- }
+ if (pathMap.has(indexStr) || pathMap.has("*")) cloned[i] = cloneSelectively(source[i], pathMap.get(indexStr) || pathMap.get("*"));
+ else cloned[i] = source[i];
}
return cloned;
}
const cloned = Object.create(Object.getPrototypeOf(source));
- for (const key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- if (pathMap.has(key) || pathMap.has("*")) {
- cloned[key] = cloneSelectively(source[key], pathMap.get(key) || pathMap.get("*"));
- } else {
- cloned[key] = source[key];
- }
- }
- }
+ for (const key in source) if (Object.prototype.hasOwnProperty.call(source, key)) if (pathMap.has(key) || pathMap.has("*")) cloned[key] = cloneSelectively(source[key], pathMap.get(key) || pathMap.get("*"));
+ else cloned[key] = source[key];
return cloned;
}
return cloneSelectively(obj, pathStructure);
}
function validatePath(path) {
- if (typeof path !== "string") {
- throw new Error("Paths must be (non-empty) strings");
- }
- if (path === "") {
- throw new Error("Invalid redaction path ()");
- }
- if (path.includes("..")) {
- throw new Error(`Invalid redaction path (${path})`);
- }
- if (path.includes(",")) {
- throw new Error(`Invalid redaction path (${path})`);
- }
+ if (typeof path !== "string") throw new Error("Paths must be (non-empty) strings");
+ if (path === "") throw new Error("Invalid redaction path ()");
+ if (path.includes("..")) throw new Error(`Invalid redaction path (${path})`);
+ if (path.includes(",")) throw new Error(`Invalid redaction path (${path})`);
let bracketCount = 0;
let inQuotes = false;
let quoteChar = "";
@@ -81198,26 +75540,17 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
inQuotes = false;
quoteChar = "";
}
- } else if (char === "[" && !inQuotes) {
- bracketCount++;
- } else if (char === "]" && !inQuotes) {
+ } else if (char === "[" && !inQuotes) bracketCount++;
+ else if (char === "]" && !inQuotes) {
bracketCount--;
- if (bracketCount < 0) {
- throw new Error(`Invalid redaction path (${path})`);
- }
+ if (bracketCount < 0) throw new Error(`Invalid redaction path (${path})`);
}
}
- if (bracketCount !== 0) {
- throw new Error(`Invalid redaction path (${path})`);
- }
+ if (bracketCount !== 0) throw new Error(`Invalid redaction path (${path})`);
}
function validatePaths(paths) {
- if (!Array.isArray(paths)) {
- throw new TypeError("paths must be an array");
- }
- for (const path of paths) {
- validatePath(path);
- }
+ if (!Array.isArray(paths)) throw new TypeError("paths must be an array");
+ for (const path of paths) validatePath(path);
}
function slowRedact(options = {}) {
const { paths = [], censor = "[REDACTED]", serialize = JSON.stringify, strict = true, remove = false } = options;
@@ -81225,19 +75558,13 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const pathStructure = buildPathStructure(paths);
return function redact(obj) {
if (strict && (obj === null || typeof obj !== "object")) {
- if (obj === null || obj === undefined) {
- return serialize ? serialize(obj) : obj;
- }
- if (typeof obj !== "object") {
- return serialize ? serialize(obj) : obj;
- }
+ if (obj === null || obj === void 0) return serialize ? serialize(obj) : obj;
+ if (typeof obj !== "object") return serialize ? serialize(obj) : obj;
}
const cloned = selectiveClone(obj, pathStructure);
const original = obj;
let actualCensor = censor;
- if (typeof censor === "function") {
- actualCensor = censor;
- }
+ if (typeof censor === "function") actualCensor = censor;
redactPaths(cloned, paths, actualCensor, remove);
if (serialize === false) {
cloned.restore = function() {
@@ -81245,15 +75572,12 @@ var require_redact = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
return cloned;
}
- if (typeof serialize === "function") {
- return serialize(cloned);
- }
+ if (typeof serialize === "function") return serialize(cloned);
return JSON.stringify(cloned);
};
}
module.exports = slowRedact;
}));
-
//#endregion
//#region ../node_modules/pino/lib/symbols.js
var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -81287,7 +75611,6 @@ var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const serializersSym = Symbol.for("pino.serializers");
const formattersSym = Symbol.for("pino.formatters");
const hooksSym = Symbol.for("pino.hooks");
- const needsMetadataGsym = Symbol.for("pino.metadata");
module.exports = {
setLevelSym,
getLevelSym,
@@ -81313,7 +75636,7 @@ var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
errorKeySym,
nestedKeySym,
wildcardFirstSym,
- needsMetadataGsym,
+ needsMetadataGsym: Symbol.for("pino.metadata"),
useOnlyCustomLevelsSym,
formattersSym,
hooksSym,
@@ -81322,7 +75645,6 @@ var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
msgPrefixSym
};
}));
-
//#endregion
//#region ../node_modules/pino/lib/redaction.js
var require_redaction = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -81337,30 +75659,20 @@ var require_redaction = /* @__PURE__ */ __commonJSMin(((exports, module) => {
rx.lastIndex = 0;
const first = rx.exec(str);
const next = rx.exec(str);
- let ns = first[1] !== undefined ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0];
- if (ns === "*") {
- ns = wildcardFirstSym;
- }
+ let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0];
+ if (ns === "*") ns = wildcardFirstSym;
if (next === null) {
o[ns] = null;
return o;
}
- if (o[ns] === null) {
- return o;
- }
+ if (o[ns] === null) return o;
const { index } = next;
const nextPath = `${str.substr(index, str.length - 1)}`;
o[ns] = o[ns] || [];
- if (ns !== wildcardFirstSym && o[ns].length === 0) {
- o[ns].push(...o[wildcardFirstSym] || []);
- }
- if (ns === wildcardFirstSym) {
- Object.keys(o).forEach(function(k) {
- if (o[k]) {
- o[k].push(nextPath);
- }
- });
- }
+ if (ns !== wildcardFirstSym && o[ns].length === 0) o[ns].push(...o[wildcardFirstSym] || []);
+ if (ns === wildcardFirstSym) Object.keys(o).forEach(function(k) {
+ if (o[k]) o[k].push(nextPath);
+ });
o[ns].push(nextPath);
return o;
}, {});
@@ -81375,9 +75687,8 @@ var require_redaction = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return typeof censor === "function" ? serialize(censor(...args)) : serialize(censor);
};
return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => {
- if (shape[k] === null) {
- o[k] = (value) => topCensor(value, [k]);
- } else {
+ if (shape[k] === null) o[k] = (value) => topCensor(value, [k]);
+ else {
const wrappedCensor = typeof censor === "function" ? (value, path) => {
return censor(value, [k, ...path]);
} : censor;
@@ -81401,10 +75712,8 @@ var require_redaction = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return opts;
}
let { paths, censor = CENSOR, remove } = opts;
- if (Array.isArray(paths) === false) {
- throw Error("pino – redact must contain an array of strings");
- }
- if (remove === true) censor = undefined;
+ if (Array.isArray(paths) === false) throw Error("pino – redact must contain an array of strings");
+ if (remove === true) censor = void 0;
return {
paths,
censor,
@@ -81413,7 +75722,6 @@ var require_redaction = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = redaction;
}));
-
//#endregion
//#region ../node_modules/pino/lib/time.js
var require_time = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -81426,19 +75734,12 @@ var require_time = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const startWallTimeNs = BigInt(Date.now()) * NS_PER_MS;
const startHrTime = process.hrtime.bigint();
const isoTimeNano = () => {
- const elapsedNs = process.hrtime.bigint() - startHrTime;
- const currentTimeNs = startWallTimeNs + elapsedNs;
+ const currentTimeNs = startWallTimeNs + (process.hrtime.bigint() - startHrTime);
const secondsSinceEpoch = currentTimeNs / NS_PER_SEC;
const nanosWithinSecond = currentTimeNs % NS_PER_SEC;
const msSinceEpoch = Number(secondsSinceEpoch * 1000n + nanosWithinSecond / 1000000n);
const date = new Date(msSinceEpoch);
- const year = date.getUTCFullYear();
- const month = (date.getUTCMonth() + 1).toString().padStart(2, "0");
- const day = date.getUTCDate().toString().padStart(2, "0");
- const hours = date.getUTCHours().toString().padStart(2, "0");
- const minutes = date.getUTCMinutes().toString().padStart(2, "0");
- const seconds = date.getUTCSeconds().toString().padStart(2, "0");
- return `,"time":"${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${nanosWithinSecond.toString().padStart(9, "0")}Z"`;
+ return `,"time":"${date.getUTCFullYear()}-${(date.getUTCMonth() + 1).toString().padStart(2, "0")}-${date.getUTCDate().toString().padStart(2, "0")}T${date.getUTCHours().toString().padStart(2, "0")}:${date.getUTCMinutes().toString().padStart(2, "0")}:${date.getUTCSeconds().toString().padStart(2, "0")}.${nanosWithinSecond.toString().padStart(9, "0")}Z"`;
};
module.exports = {
nullTime,
@@ -81448,7 +75749,6 @@ var require_time = /* @__PURE__ */ __commonJSMin(((exports, module) => {
isoTimeNano
};
}));
-
//#endregion
//#region ../node_modules/quick-format-unescaped/index.js
var require_quick_format_unescaped = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -81468,14 +75768,10 @@ var require_quick_format_unescaped = /* @__PURE__ */ __commonJSMin(((exports, mo
if (len === 1) return f;
var objects = new Array(len);
objects[0] = ss(f);
- for (var index = 1; index < len; index++) {
- objects[index] = ss(args[index]);
- }
+ for (var index = 1; index < len; index++) objects[index] = ss(args[index]);
return objects.join(" ");
}
- if (typeof f !== "string") {
- return f;
- }
+ if (typeof f !== "string") return f;
var argLen = args.length;
if (argLen === 0) return f;
var str = "";
@@ -81507,7 +75803,7 @@ var require_quick_format_unescaped = /* @__PURE__ */ __commonJSMin(((exports, mo
case 111:
case 106:
if (a >= argLen) break;
- if (args[a] === undefined) break;
+ if (args[a] === void 0) break;
if (lastPos < i) str += f.slice(lastPos, i);
var type = typeof args[a];
if (type === "string") {
@@ -81546,24 +75842,18 @@ var require_quick_format_unescaped = /* @__PURE__ */ __commonJSMin(((exports, mo
++i;
}
if (lastPos === -1) return f;
- else if (lastPos < flen) {
- str += f.slice(lastPos);
- }
+ else if (lastPos < flen) str += f.slice(lastPos);
return str;
}
}));
-
//#endregion
//#region ../node_modules/atomic-sleep/index.js
var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") {
const nil = new Int32Array(new SharedArrayBuffer(4));
function sleep(ms) {
- const valid = ms > 0 && ms < Infinity;
- if (valid === false) {
- if (typeof ms !== "number" && typeof ms !== "bigint") {
- throw TypeError("sleep: ms must be a number");
- }
+ if ((ms > 0 && ms < Infinity) === false) {
+ if (typeof ms !== "number" && typeof ms !== "bigint") throw TypeError("sleep: ms must be a number");
throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
}
Atomics.wait(nil, 0, 0, Number(ms));
@@ -81571,20 +75861,16 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = sleep;
} else {
function sleep(ms) {
- const valid = ms > 0 && ms < Infinity;
- if (valid === false) {
- if (typeof ms !== "number" && typeof ms !== "bigint") {
- throw TypeError("sleep: ms must be a number");
- }
+ if ((ms > 0 && ms < Infinity) === false) {
+ if (typeof ms !== "number" && typeof ms !== "bigint") throw TypeError("sleep: ms must be a number");
throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
}
const target = Date.now() + Number(ms);
- while (target > Date.now()) {}
+ while (target > Date.now());
}
module.exports = sleep;
}
}));
-
//#endregion
//#region ../node_modules/sonic-boom/index.js
var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -81610,15 +75896,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
sonic._reopening = false;
sonic._writing = false;
sonic._opening = false;
- if (sonic.sync) {
- process.nextTick(() => {
- if (sonic.listenerCount("error") > 0) {
- sonic.emit("error", err);
- }
- });
- } else {
- sonic.emit("error", err);
- }
+ if (sonic.sync) process.nextTick(() => {
+ if (sonic.listenerCount("error") > 0) sonic.emit("error", err);
+ });
+ else sonic.emit("error", err);
return;
}
const reopening = sonic._reopening;
@@ -81627,44 +75908,29 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
sonic._reopening = false;
sonic._opening = false;
sonic._writing = false;
- if (sonic.sync) {
- process.nextTick(() => sonic.emit("ready"));
- } else {
- sonic.emit("ready");
- }
- if (sonic.destroyed) {
- return;
- }
- if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) {
- sonic._actualWrite();
- } else if (reopening) {
- process.nextTick(() => sonic.emit("drain"));
- }
+ if (sonic.sync) process.nextTick(() => sonic.emit("ready"));
+ else sonic.emit("ready");
+ if (sonic.destroyed) return;
+ if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) sonic._actualWrite();
+ else if (reopening) process.nextTick(() => sonic.emit("drain"));
}
const flags = sonic.append ? "a" : "w";
const mode = sonic.mode;
- if (sonic.sync) {
- try {
- if (sonic.mkdir) fs$4.mkdirSync(path$5.dirname(file), { recursive: true });
- const fd = fs$4.openSync(file, flags, mode);
- fileOpened(null, fd);
- } catch (err) {
- fileOpened(err);
- throw err;
- }
- } else if (sonic.mkdir) {
- fs$4.mkdir(path$5.dirname(file), { recursive: true }, (err) => {
- if (err) return fileOpened(err);
- fs$4.open(file, flags, mode, fileOpened);
- });
- } else {
- fs$4.open(file, flags, mode, fileOpened);
+ if (sonic.sync) try {
+ if (sonic.mkdir) fs$4.mkdirSync(path$5.dirname(file), { recursive: true });
+ fileOpened(null, fs$4.openSync(file, flags, mode));
+ } catch (err) {
+ fileOpened(err);
+ throw err;
}
+ else if (sonic.mkdir) fs$4.mkdir(path$5.dirname(file), { recursive: true }, (err) => {
+ if (err) return fileOpened(err);
+ fs$4.open(file, flags, mode, fileOpened);
+ });
+ else fs$4.open(file, flags, mode, fileOpened);
}
function SonicBoom(opts) {
- if (!(this instanceof SonicBoom)) {
- return new SonicBoom(opts);
- }
+ if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {};
fd = fd || dest;
this._len = 0;
@@ -81683,7 +75949,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.maxLength = maxLength || 0;
this.maxWrite = maxWrite || MAX_WRITE;
this._periodicFlush = periodicFlush || 0;
- this._periodicFlushTimer = undefined;
+ this._periodicFlushTimer = void 0;
this.sync = sync || false;
this.writable = true;
this._fsync = fsync || false;
@@ -81701,7 +75967,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._actualWrite = actualWriteBuffer;
fsWriteSync = () => fs$4.writeSync(this.fd, this._writingBuf);
fsWrite = () => fs$4.write(this.fd, this._writingBuf, this.release);
- } else if (contentMode === undefined || contentMode === kContentModeUtf8) {
+ } else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
this._writingBuf = "";
this.write = write;
this.flush = flush;
@@ -81709,34 +75975,23 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._actualWrite = actualWrite;
fsWriteSync = () => fs$4.writeSync(this.fd, this._writingBuf, "utf8");
fsWrite = () => fs$4.write(this.fd, this._writingBuf, "utf8", this.release);
- } else {
- throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
- }
+ } else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
if (typeof fd === "number") {
this.fd = fd;
process.nextTick(() => this.emit("ready"));
- } else if (typeof fd === "string") {
- openFile(fd, this);
- } else {
- throw new Error("SonicBoom supports only file descriptors and files");
- }
- if (this.minLength >= this.maxWrite) {
- throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);
- }
+ } else if (typeof fd === "string") openFile(fd, this);
+ else throw new Error("SonicBoom supports only file descriptors and files");
+ if (this.minLength >= this.maxWrite) throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);
this.release = (err, n) => {
if (err) {
- if ((err.code === "EAGAIN" || err.code === "EBUSY") && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) {
- if (this.sync) {
- try {
- sleep(BUSY_WRITE_TIMEOUT);
- this.release(undefined, 0);
- } catch (err) {
- this.release(err);
- }
- } else {
- setTimeout(fsWrite, BUSY_WRITE_TIMEOUT);
- }
- } else {
+ if ((err.code === "EAGAIN" || err.code === "EBUSY") && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) if (this.sync) try {
+ sleep(BUSY_WRITE_TIMEOUT);
+ this.release(void 0, 0);
+ } catch (err) {
+ this.release(err);
+ }
+ else setTimeout(fsWrite, BUSY_WRITE_TIMEOUT);
+ else {
this._writing = false;
this.emit("error", err);
}
@@ -81763,39 +76018,30 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
}
- if (this._fsync) {
- fs$4.fsyncSync(this.fd);
- }
+ if (this._fsync) fs$4.fsyncSync(this.fd);
const len = this._len;
if (this._reopening) {
this._writing = false;
this._reopening = false;
this.reopen();
- } else if (len > this.minLength) {
- this._actualWrite();
- } else if (this._ending) {
- if (len > 0) {
- this._actualWrite();
- } else {
- this._writing = false;
- actualClose(this);
- }
- } else {
+ } else if (len > this.minLength) this._actualWrite();
+ else if (this._ending) if (len > 0) this._actualWrite();
+ else {
+ this._writing = false;
+ actualClose(this);
+ }
+ else {
this._writing = false;
if (this.sync) {
if (!this._asyncDrainScheduled) {
this._asyncDrainScheduled = true;
process.nextTick(emitDrain, this);
}
- } else {
- this.emit("drain");
- }
+ } else this.emit("drain");
}
};
this.on("newListener", function(name) {
- if (name === "drain") {
- this._asyncDrainScheduled = false;
- }
+ if (name === "drain") this._asyncDrainScheduled = false;
});
if (this._periodicFlush !== 0) {
this._periodicFlushTimer = setInterval(() => this.flush(null), this._periodicFlush);
@@ -81810,9 +76056,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {{writingBuf: string | Buffer, len: number}} released writingBuf and length
*/
function releaseWritingBuf(writingBuf, len, n) {
- if (typeof writingBuf === "string" && Buffer.byteLength(writingBuf) !== n) {
- n = Buffer.from(writingBuf).subarray(0, n).toString().length;
- }
+ if (typeof writingBuf === "string" && Buffer.byteLength(writingBuf) !== n) n = Buffer.from(writingBuf).subarray(0, n).toString().length;
len = Math.max(len - n, 0);
writingBuf = writingBuf.slice(n);
return {
@@ -81821,46 +76065,32 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
}
function emitDrain(sonic) {
- const hasListeners = sonic.listenerCount("drain") > 0;
- if (!hasListeners) return;
+ if (!(sonic.listenerCount("drain") > 0)) return;
sonic._asyncDrainScheduled = false;
sonic.emit("drain");
}
inherits$2(SonicBoom, EventEmitter$8);
function mergeBuf(bufs, len) {
- if (bufs.length === 0) {
- return kEmptyBuffer;
- }
- if (bufs.length === 1) {
- return bufs[0];
- }
+ if (bufs.length === 0) return kEmptyBuffer;
+ if (bufs.length === 1) return bufs[0];
return Buffer.concat(bufs, len);
}
function write(data) {
- if (this.destroyed) {
- throw new Error("SonicBoom destroyed");
- }
+ if (this.destroyed) throw new Error("SonicBoom destroyed");
const len = this._len + data.length;
const bufs = this._bufs;
if (this.maxLength && len > this.maxLength) {
this.emit("drop", data);
return this._len < this._hwm;
}
- if (bufs.length === 0 || bufs[bufs.length - 1].length + data.length > this.maxWrite) {
- bufs.push("" + data);
- } else {
- bufs[bufs.length - 1] += data;
- }
+ if (bufs.length === 0 || bufs[bufs.length - 1].length + data.length > this.maxWrite) bufs.push("" + data);
+ else bufs[bufs.length - 1] += data;
this._len = len;
- if (!this._writing && this._len >= this.minLength) {
- this._actualWrite();
- }
+ if (!this._writing && this._len >= this.minLength) this._actualWrite();
return this._len < this._hwm;
}
function writeBuffer(data) {
- if (this.destroyed) {
- throw new Error("SonicBoom destroyed");
- }
+ if (this.destroyed) throw new Error("SonicBoom destroyed");
const len = this._len + data.length;
const bufs = this._bufs;
const lens = this._lens;
@@ -81876,24 +76106,21 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
lens[lens.length - 1] += data.length;
}
this._len = len;
- if (!this._writing && this._len >= this.minLength) {
- this._actualWrite();
- }
+ if (!this._writing && this._len >= this.minLength) this._actualWrite();
return this._len < this._hwm;
}
function callFlushCallbackOnDrain(cb) {
this._flushPending = true;
const onDrain = () => {
- if (!this._fsync) {
- try {
- fs$4.fsync(this.fd, (err) => {
- this._flushPending = false;
- cb(err);
- });
- } catch (err) {
+ if (!this._fsync) try {
+ fs$4.fsync(this.fd, (err) => {
+ this._flushPending = false;
cb(err);
- }
- } else {
+ });
+ } catch (err) {
+ cb(err);
+ }
+ else {
this._flushPending = false;
cb();
}
@@ -81908,11 +76135,9 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.once("error", onError);
}
function flush(cb) {
- if (cb != null && typeof cb !== "function") {
- throw new Error("flush cb must be a function");
- }
+ if (cb != null && typeof cb !== "function") throw new Error("flush cb must be a function");
if (this.destroyed) {
- const error = new Error("SonicBoom destroyed");
+ const error = /* @__PURE__ */ new Error("SonicBoom destroyed");
if (cb) {
cb(error);
return;
@@ -81923,23 +76148,15 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cb?.();
return;
}
- if (cb) {
- callFlushCallbackOnDrain.call(this, cb);
- }
- if (this._writing) {
- return;
- }
- if (this._bufs.length === 0) {
- this._bufs.push("");
- }
+ if (cb) callFlushCallbackOnDrain.call(this, cb);
+ if (this._writing) return;
+ if (this._bufs.length === 0) this._bufs.push("");
this._actualWrite();
}
function flushBuffer(cb) {
- if (cb != null && typeof cb !== "function") {
- throw new Error("flush cb must be a function");
- }
+ if (cb != null && typeof cb !== "function") throw new Error("flush cb must be a function");
if (this.destroyed) {
- const error = new Error("SonicBoom destroyed");
+ const error = /* @__PURE__ */ new Error("SonicBoom destroyed");
if (cb) {
cb(error);
return;
@@ -81950,12 +76167,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cb?.();
return;
}
- if (cb) {
- callFlushCallbackOnDrain.call(this, cb);
- }
- if (this._writing) {
- return;
- }
+ if (cb) callFlushCallbackOnDrain.call(this, cb);
+ if (this._writing) return;
if (this._bufs.length === 0) {
this._bufs.push([]);
this._lens.push(0);
@@ -81963,92 +76176,58 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._actualWrite();
}
SonicBoom.prototype.reopen = function(file) {
- if (this.destroyed) {
- throw new Error("SonicBoom destroyed");
- }
+ if (this.destroyed) throw new Error("SonicBoom destroyed");
if (this._opening) {
this.once("ready", () => {
this.reopen(file);
});
return;
}
- if (this._ending) {
- return;
- }
- if (!this.file) {
- throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");
- }
- if (file) {
- this.file = file;
- }
+ if (this._ending) return;
+ if (!this.file) throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");
+ if (file) this.file = file;
this._reopening = true;
- if (this._writing) {
- return;
- }
+ if (this._writing) return;
const fd = this.fd;
this.once("ready", () => {
- if (fd !== this.fd) {
- fs$4.close(fd, (err) => {
- if (err) {
- return this.emit("error", err);
- }
- });
- }
+ if (fd !== this.fd) fs$4.close(fd, (err) => {
+ if (err) return this.emit("error", err);
+ });
});
openFile(this.file, this);
};
SonicBoom.prototype.end = function() {
- if (this.destroyed) {
- throw new Error("SonicBoom destroyed");
- }
+ if (this.destroyed) throw new Error("SonicBoom destroyed");
if (this._opening) {
this.once("ready", () => {
this.end();
});
return;
}
- if (this._ending) {
- return;
- }
+ if (this._ending) return;
this._ending = true;
- if (this._writing) {
- return;
- }
- if (this._len > 0 && this.fd >= 0) {
- this._actualWrite();
- } else {
- actualClose(this);
- }
+ if (this._writing) return;
+ if (this._len > 0 && this.fd >= 0) this._actualWrite();
+ else actualClose(this);
};
function flushSync() {
- if (this.destroyed) {
- throw new Error("SonicBoom destroyed");
- }
- if (this.fd < 0) {
- throw new Error("sonic boom is not ready yet");
- }
+ if (this.destroyed) throw new Error("SonicBoom destroyed");
+ if (this.fd < 0) throw new Error("sonic boom is not ready yet");
if (!this._writing && this._writingBuf.length > 0) {
this._bufs.unshift(this._writingBuf);
this._writingBuf = "";
}
let buf = "";
while (this._bufs.length || buf) {
- if (buf.length <= 0) {
- buf = this._bufs[0];
- }
+ if (buf.length <= 0) buf = this._bufs[0];
try {
const n = fs$4.writeSync(this.fd, buf, "utf8");
const releasedBufObj = releaseWritingBuf(buf, this._len, n);
buf = releasedBufObj.writingBuf;
this._len = releasedBufObj.len;
- if (buf.length <= 0) {
- this._bufs.shift();
- }
+ if (buf.length <= 0) this._bufs.shift();
} catch (err) {
- const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY";
- if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) {
- throw err;
- }
+ if ((err.code === "EAGAIN" || err.code === "EBUSY") && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) throw err;
sleep(BUSY_WRITE_TIMEOUT);
}
}
@@ -82057,21 +76236,15 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} catch {}
}
function flushBufferSync() {
- if (this.destroyed) {
- throw new Error("SonicBoom destroyed");
- }
- if (this.fd < 0) {
- throw new Error("sonic boom is not ready yet");
- }
+ if (this.destroyed) throw new Error("SonicBoom destroyed");
+ if (this.fd < 0) throw new Error("sonic boom is not ready yet");
if (!this._writing && this._writingBuf.length > 0) {
this._bufs.unshift([this._writingBuf]);
this._writingBuf = kEmptyBuffer;
}
let buf = kEmptyBuffer;
while (this._bufs.length || buf.length) {
- if (buf.length <= 0) {
- buf = mergeBuf(this._bufs[0], this._lens[0]);
- }
+ if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
try {
const n = fs$4.writeSync(this.fd, buf);
buf = buf.subarray(n);
@@ -82081,50 +76254,37 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._lens.shift();
}
} catch (err) {
- const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY";
- if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) {
- throw err;
- }
+ if ((err.code === "EAGAIN" || err.code === "EBUSY") && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) throw err;
sleep(BUSY_WRITE_TIMEOUT);
}
}
}
SonicBoom.prototype.destroy = function() {
- if (this.destroyed) {
- return;
- }
+ if (this.destroyed) return;
actualClose(this);
};
function actualWrite() {
const release = this.release;
this._writing = true;
this._writingBuf = this._writingBuf || this._bufs.shift() || "";
- if (this.sync) {
- try {
- const written = fs$4.writeSync(this.fd, this._writingBuf, "utf8");
- release(null, written);
- } catch (err) {
- release(err);
- }
- } else {
- fs$4.write(this.fd, this._writingBuf, "utf8", release);
+ if (this.sync) try {
+ release(null, fs$4.writeSync(this.fd, this._writingBuf, "utf8"));
+ } catch (err) {
+ release(err);
}
+ else fs$4.write(this.fd, this._writingBuf, "utf8", release);
}
function actualWriteBuffer() {
const release = this.release;
this._writing = true;
this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
- if (this.sync) {
- try {
- const written = fs$4.writeSync(this.fd, this._writingBuf);
- release(null, written);
- } catch (err) {
- release(err);
- }
- } else {
- if (kCopyBuffer) {
- this._writingBuf = Buffer.from(this._writingBuf);
- }
+ if (this.sync) try {
+ release(null, fs$4.writeSync(this.fd, this._writingBuf));
+ } catch (err) {
+ release(err);
+ }
+ else {
+ if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
fs$4.write(this.fd, this._writingBuf, release);
}
}
@@ -82133,9 +76293,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
sonic.once("ready", actualClose.bind(null, sonic));
return;
}
- if (sonic._periodicFlushTimer !== undefined) {
- clearInterval(sonic._periodicFlushTimer);
- }
+ if (sonic._periodicFlushTimer !== void 0) clearInterval(sonic._periodicFlushTimer);
sonic.destroyed = true;
sonic._bufs = [];
sonic._lens = [];
@@ -82144,20 +76302,15 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
fs$4.fsync(sonic.fd, closeWrapped);
} catch {}
function closeWrapped() {
- if (sonic.fd !== 1 && sonic.fd !== 2) {
- fs$4.close(sonic.fd, done);
- } else {
- done();
- }
+ if (sonic.fd !== 1 && sonic.fd !== 2) fs$4.close(sonic.fd, done);
+ else done();
}
function done(err) {
if (err) {
sonic.emit("error", err);
return;
}
- if (sonic._ending && !sonic._writing) {
- sonic.emit("finish");
- }
+ if (sonic._ending && !sonic._writing) sonic.emit("finish");
sonic.emit("close");
}
}
@@ -82175,7 +76328,6 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
SonicBoom.default = SonicBoom;
module.exports = SonicBoom;
}));
-
//#endregion
//#region ../node_modules/on-exit-leak-free/index.js
var require_on_exit_leak_free = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -82189,24 +76341,16 @@ var require_on_exit_leak_free = /* @__PURE__ */ __commonJSMin(((exports, module)
};
let registry;
function ensureRegistry() {
- if (registry === undefined) {
- registry = new FinalizationRegistry(clear);
- }
+ if (registry === void 0) registry = new FinalizationRegistry(clear);
}
function install(event) {
- if (refs[event].length > 0) {
- return;
- }
+ if (refs[event].length > 0) return;
process.on(event, functions[event]);
}
function uninstall(event) {
- if (refs[event].length > 0) {
- return;
- }
+ if (refs[event].length > 0) return;
process.removeListener(event, functions[event]);
- if (refs.exit.length === 0 && refs.beforeExit.length === 0) {
- registry = undefined;
- }
+ if (refs.exit.length === 0 && refs.beforeExit.length === 0) registry = void 0;
}
function onExit() {
callRefs("exit");
@@ -82219,9 +76363,7 @@ var require_on_exit_leak_free = /* @__PURE__ */ __commonJSMin(((exports, module)
const obj = ref.deref();
const fn = ref.fn;
/* istanbul ignore else */
- if (obj !== undefined) {
- fn(obj, event);
- }
+ if (obj !== void 0) fn(obj, event);
}
refs[event] = [];
}
@@ -82233,9 +76375,7 @@ var require_on_exit_leak_free = /* @__PURE__ */ __commonJSMin(((exports, module)
}
}
function _register(event, obj, fn) {
- if (obj === undefined) {
- throw new Error("the object can't be undefined");
- }
+ if (obj === void 0) throw new Error("the object can't be undefined");
install(event);
const ref = new WeakRef(obj);
ref.fn = fn;
@@ -82250,9 +76390,7 @@ var require_on_exit_leak_free = /* @__PURE__ */ __commonJSMin(((exports, module)
_register("beforeExit", obj, fn);
}
function unregister(obj) {
- if (registry === undefined) {
- return;
- }
+ if (registry === void 0) return;
registry.unregister(obj);
for (const event of ["exit", "beforeExit"]) {
refs[event] = refs[event].filter((ref) => {
@@ -82268,7 +76406,6 @@ var require_on_exit_leak_free = /* @__PURE__ */ __commonJSMin(((exports, module)
unregister
};
}));
-
//#endregion
//#region ../node_modules/thread-stream/package.json
var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -82321,7 +76458,6 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"homepage": "https://github.com/mcollina/thread-stream#readme"
};
}));
-
//#endregion
//#region ../node_modules/thread-stream/lib/wait.js
var require_wait = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -82335,20 +76471,14 @@ var require_wait = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
let prior = current;
const check = (backoff) => {
- if (Date.now() > max) {
- done(null, "timed-out");
- } else {
- setTimeout(() => {
- prior = current;
- current = Atomics.load(state, index);
- if (current === prior) {
- check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
- } else {
- if (current === expected) done(null, "ok");
- else done(null, "not-equal");
- }
- }, backoff);
- }
+ if (Date.now() > max) done(null, "timed-out");
+ else setTimeout(() => {
+ prior = current;
+ current = Atomics.load(state, index);
+ if (current === prior) check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
+ else if (current === expected) done(null, "ok");
+ else done(null, "not-equal");
+ }, backoff);
};
check(1);
}
@@ -82360,18 +76490,12 @@ var require_wait = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
const check = (backoff) => {
- if (Date.now() > max) {
- done(null, "timed-out");
- } else {
- setTimeout(() => {
- current = Atomics.load(state, index);
- if (current !== expected) {
- done(null, "ok");
- } else {
- check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
- }
- }, backoff);
- }
+ if (Date.now() > max) done(null, "timed-out");
+ else setTimeout(() => {
+ current = Atomics.load(state, index);
+ if (current !== expected) done(null, "ok");
+ else check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
+ }, backoff);
};
check(1);
}
@@ -82380,18 +76504,14 @@ var require_wait = /* @__PURE__ */ __commonJSMin(((exports, module) => {
waitDiff
};
}));
-
//#endregion
//#region ../node_modules/thread-stream/lib/indexes.js
var require_indexes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- const WRITE_INDEX = 4;
- const READ_INDEX = 8;
module.exports = {
- WRITE_INDEX,
- READ_INDEX
+ WRITE_INDEX: 4,
+ READ_INDEX: 8
};
}));
-
//#endregion
//#region ../node_modules/thread-stream/index.js
var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -82421,16 +76541,12 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
const FinalizationRegistry = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry;
const WeakRef = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef;
const registry = new FinalizationRegistry((worker) => {
- if (worker.exited) {
- return;
- }
+ if (worker.exited) return;
worker.terminate();
});
function createWorker(stream, opts) {
const { filename, workerData } = opts;
- const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
- const toExecute = bundlerOverrides["thread-stream-worker"] || join$2(__dirname, "lib", "worker.js");
- const worker = new Worker$1(toExecute, {
+ const worker = new Worker$1(("__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {})["thread-stream-worker"] || join$2(__dirname, "lib", "worker.js"), {
...opts.workerOpts,
trackUnmanagedFds: false,
workerData: {
@@ -82462,11 +76578,8 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
if (leftover > 0) {
if (stream[kImpl].buf.length === 0) {
stream[kImpl].flushing = false;
- if (stream[kImpl].ending) {
- end(stream);
- } else if (stream[kImpl].needDrain) {
- process.nextTick(drain, stream);
- }
+ if (stream[kImpl].ending) end(stream);
+ else if (stream[kImpl].needDrain) process.nextTick(drain, stream);
return;
}
let toWrite = stream[kImpl].buf.slice(0, leftover);
@@ -82474,38 +76587,30 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
if (toWriteBytes <= leftover) {
stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
write(stream, toWrite, nextFlush.bind(null, stream));
- } else {
- stream.flush(() => {
- if (stream.destroyed) {
- return;
- }
- Atomics.store(stream[kImpl].state, READ_INDEX, 0);
- Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
- while (toWriteBytes > stream[kImpl].data.length) {
- leftover = leftover / 2;
- toWrite = stream[kImpl].buf.slice(0, leftover);
- toWriteBytes = Buffer.byteLength(toWrite);
- }
- stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
- write(stream, toWrite, nextFlush.bind(null, stream));
- });
- }
+ } else stream.flush(() => {
+ if (stream.destroyed) return;
+ Atomics.store(stream[kImpl].state, READ_INDEX, 0);
+ Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
+ while (toWriteBytes > stream[kImpl].data.length) {
+ leftover = leftover / 2;
+ toWrite = stream[kImpl].buf.slice(0, leftover);
+ toWriteBytes = Buffer.byteLength(toWrite);
+ }
+ stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
+ write(stream, toWrite, nextFlush.bind(null, stream));
+ });
} else if (leftover === 0) {
- if (writeIndex === 0 && stream[kImpl].buf.length === 0) {
- return;
- }
+ if (writeIndex === 0 && stream[kImpl].buf.length === 0) return;
stream.flush(() => {
Atomics.store(stream[kImpl].state, READ_INDEX, 0);
Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
nextFlush(stream);
});
- } else {
- destroy(stream, new Error("overwritten"));
- }
+ } else destroy(stream, /* @__PURE__ */ new Error("overwritten"));
}
function onWorkerMessage(msg) {
const stream = this.stream.deref();
- if (stream === undefined) {
+ if (stream === void 0) {
this.exited = true;
this.terminate();
return;
@@ -82522,34 +76627,27 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
destroy(stream, msg.err);
break;
case "EVENT":
- if (Array.isArray(msg.args)) {
- stream.emit(msg.name, ...msg.args);
- } else {
- stream.emit(msg.name, msg.args);
- }
+ if (Array.isArray(msg.args)) stream.emit(msg.name, ...msg.args);
+ else stream.emit(msg.name, msg.args);
break;
case "WARNING":
process.emitWarning(msg.err);
break;
- default: destroy(stream, new Error("this should not happen: " + msg.code));
+ default: destroy(stream, /* @__PURE__ */ new Error("this should not happen: " + msg.code));
}
}
function onWorkerExit(code) {
const stream = this.stream.deref();
- if (stream === undefined) {
- return;
- }
+ if (stream === void 0) return;
registry.unregister(stream);
stream.worker.exited = true;
stream.worker.off("exit", onWorkerExit);
- destroy(stream, code !== 0 ? new Error("the worker thread exited") : null);
+ destroy(stream, code !== 0 ? /* @__PURE__ */ new Error("the worker thread exited") : null);
}
var ThreadStream = class extends EventEmitter$7 {
constructor(opts = {}) {
super();
- if (opts.bufferSize < 4) {
- throw new Error("bufferSize must at least fit a 4-byte utf-8 char");
- }
+ if (opts.bufferSize < 4) throw new Error("bufferSize must at least fit a 4-byte utf-8 char");
this[kImpl] = {};
this[kImpl].stateBuf = new SharedArrayBuffer(128);
this[kImpl].state = new Int32Array(this[kImpl].stateBuf);
@@ -82573,31 +76671,27 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
write(data) {
if (this[kImpl].destroyed) {
- error(this, new Error("the worker has exited"));
+ error(this, /* @__PURE__ */ new Error("the worker has exited"));
return false;
}
if (this[kImpl].ending) {
- error(this, new Error("the worker is ending"));
+ error(this, /* @__PURE__ */ new Error("the worker is ending"));
return false;
}
- if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) {
- try {
- writeSync(this);
- this[kImpl].flushing = true;
- } catch (err) {
- destroy(this, err);
- return false;
- }
+ if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) try {
+ writeSync(this);
+ this[kImpl].flushing = true;
+ } catch (err) {
+ destroy(this, err);
+ return false;
}
this[kImpl].buf += data;
- if (this[kImpl].sync) {
- try {
- writeSync(this);
- return true;
- } catch (err) {
- destroy(this, err);
- return false;
- }
+ if (this[kImpl].sync) try {
+ writeSync(this);
+ return true;
+ } catch (err) {
+ destroy(this, err);
+ return false;
}
if (!this[kImpl].flushing) {
this[kImpl].flushing = true;
@@ -82607,17 +76701,13 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return !this[kImpl].needDrain;
}
end() {
- if (this[kImpl].destroyed) {
- return;
- }
+ if (this[kImpl].destroyed) return;
this[kImpl].ending = true;
end(this);
}
flush(cb) {
if (this[kImpl].destroyed) {
- if (typeof cb === "function") {
- process.nextTick(cb, new Error("the worker has exited"));
- }
+ if (typeof cb === "function") process.nextTick(cb, /* @__PURE__ */ new Error("the worker has exited"));
return;
}
const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX);
@@ -82635,9 +76725,7 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
});
}
flushSync() {
- if (this[kImpl].destroyed) {
- return;
- }
+ if (this[kImpl].destroyed) return;
writeSync(this);
flushSync(this);
}
@@ -82681,25 +76769,20 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
});
}
function destroy(stream, err) {
- if (stream[kImpl].destroyed) {
- return;
- }
+ if (stream[kImpl].destroyed) return;
stream[kImpl].destroyed = true;
if (err) {
stream[kImpl].errored = err;
error(stream, err);
}
- if (!stream.worker.exited) {
- stream.worker.terminate().catch(() => {}).then(() => {
- stream[kImpl].closed = true;
- stream.emit("close");
- });
- } else {
- setImmediate(() => {
- stream[kImpl].closed = true;
- stream.emit("close");
- });
- }
+ if (!stream.worker.exited) stream.worker.terminate().catch(() => {}).then(() => {
+ stream[kImpl].closed = true;
+ stream.emit("close");
+ });
+ else setImmediate(() => {
+ stream[kImpl].closed = true;
+ stream.emit("close");
+ });
}
function write(stream, data, cb) {
const current = Atomics.load(stream[kImpl].state, WRITE_INDEX);
@@ -82711,9 +76794,7 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return true;
}
function end(stream) {
- if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) {
- return;
- }
+ if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) return;
stream[kImpl].ended = true;
try {
stream.flushSync();
@@ -82725,11 +76806,11 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3);
readIndex = Atomics.load(stream[kImpl].state, READ_INDEX);
if (readIndex === -2) {
- destroy(stream, new Error("end() failed"));
+ destroy(stream, /* @__PURE__ */ new Error("end() failed"));
return;
}
if (++spins === 10) {
- destroy(stream, new Error("end() took too long (10s)"));
+ destroy(stream, /* @__PURE__ */ new Error("end() took too long (10s)"));
return;
}
}
@@ -82743,11 +76824,8 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
function writeSync(stream) {
const cb = () => {
- if (stream[kImpl].ending) {
- end(stream);
- } else if (stream[kImpl].needDrain) {
- process.nextTick(drain, stream);
- }
+ if (stream[kImpl].ending) end(stream);
+ else if (stream[kImpl].needDrain) process.nextTick(drain, stream);
};
stream[kImpl].flushing = false;
while (stream[kImpl].buf.length !== 0) {
@@ -82758,9 +76836,7 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
Atomics.store(stream[kImpl].state, READ_INDEX, 0);
Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
continue;
- } else if (leftover < 0) {
- throw new Error("overwritten");
- }
+ } else if (leftover < 0) throw new Error("overwritten");
let toWrite = stream[kImpl].buf.slice(0, leftover);
let toWriteBytes = Buffer.byteLength(toWrite);
if (toWriteBytes <= leftover) {
@@ -82781,29 +76857,19 @@ var require_thread_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
}
function flushSync(stream) {
- if (stream[kImpl].flushing) {
- throw new Error("unable to flush while flushing");
- }
+ if (stream[kImpl].flushing) throw new Error("unable to flush while flushing");
const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
let spins = 0;
while (true) {
const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX);
- if (readIndex === -2) {
- throw Error("_flushSync failed");
- }
- if (readIndex !== writeIndex) {
- Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3);
- } else {
- break;
- }
- if (++spins === 10) {
- throw new Error("_flushSync took too long (10s)");
- }
+ if (readIndex === -2) throw Error("_flushSync failed");
+ if (readIndex !== writeIndex) Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3);
+ else break;
+ if (++spins === 10) throw new Error("_flushSync took too long (10s)");
}
}
module.exports = ThreadStream;
}));
-
//#endregion
//#region ../node_modules/pino/lib/transport.js
var require_transport = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -82835,15 +76901,11 @@ var require_transport = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function onReady() {
process.removeListener("exit", onExit);
stream.unref();
- if (workerOpts.autoEnd !== false) {
- setupOnExit(stream);
- }
+ if (workerOpts.autoEnd !== false) setupOnExit(stream);
}
function onExit() {
/* istanbul ignore next */
- if (stream.closed) {
- return;
- }
+ if (stream.closed) return;
stream.flushSync();
sleep(100);
stream.end();
@@ -82867,9 +76929,7 @@ var require_transport = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const callers = typeof caller === "string" ? [caller] : caller;
const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
let target = fullOptions.target;
- if (target && targets) {
- throw new Error("only one of target or targets can be specified");
- }
+ if (target && targets) throw new Error("only one of target or targets can be specified");
if (targets) {
target = bundlerOverrides["pino-worker"] || join$1(__dirname, "worker.js");
options.targets = targets.filter((dest) => dest.target).map((dest) => {
@@ -82896,41 +76956,27 @@ var require_transport = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
})];
}
- if (levels) {
- options.levels = levels;
- }
- if (dedupe) {
- options.dedupe = dedupe;
- }
+ if (levels) options.levels = levels;
+ if (dedupe) options.dedupe = dedupe;
options.pinoWillSendConfig = true;
return buildStream(fixTarget(target), options, worker, sync);
function fixTarget(origin) {
origin = bundlerOverrides[origin] || origin;
- if (isAbsolute(origin) || origin.indexOf("file://") === 0) {
- return origin;
- }
- if (origin === "pino/file") {
- return join$1(__dirname, "..", "file.js");
- }
+ if (isAbsolute(origin) || origin.indexOf("file://") === 0) return origin;
+ if (origin === "pino/file") return join$1(__dirname, "..", "file.js");
let fixTarget;
- for (const filePath of callers) {
- try {
- const context = filePath === "node:repl" ? process.cwd() + sep$1 : filePath;
- fixTarget = createRequire$2(context).resolve(origin);
- break;
- } catch (err) {
- continue;
- }
- }
- if (!fixTarget) {
- throw new Error(`unable to determine transport target for "${origin}"`);
+ for (const filePath of callers) try {
+ fixTarget = createRequire$2(filePath === "node:repl" ? process.cwd() + sep$1 : filePath).resolve(origin);
+ break;
+ } catch (err) {
+ continue;
}
+ if (!fixTarget) throw new Error(`unable to determine transport target for "${origin}"`);
return fixTarget;
}
}
module.exports = transport;
}));
-
//#endregion
//#region ../node_modules/pino/lib/tools.js
var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -82943,16 +76989,13 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { isMainThread } = __require("worker_threads");
const transport = require_transport();
let asJsonChan;
- if (typeof diagChan.tracingChannel === "function") {
- asJsonChan = diagChan.tracingChannel("pino_asJson");
- } else {
- asJsonChan = {
- hasSubscribers: false,
- traceSync(fn, store, thisArg, ...args) {
- return fn.call(thisArg, ...args);
- }
- };
- }
+ if (typeof diagChan.tracingChannel === "function") asJsonChan = diagChan.tracingChannel("pino_asJson");
+ else asJsonChan = {
+ hasSubscribers: false,
+ traceSync(fn, store, thisArg, ...args) {
+ return fn.call(thisArg, ...args);
+ }
+ };
function noop() {}
function genLog(level, hook) {
if (!hook) return LOG;
@@ -82963,28 +77006,20 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (typeof o === "object") {
let msg = o;
if (o !== null) {
- if (o.method && o.headers && o.socket) {
- o = mapHttpRequest(o);
- } else if (typeof o.setHeader === "function") {
- o = mapHttpResponse(o);
- }
+ if (o.method && o.headers && o.socket) o = mapHttpRequest(o);
+ else if (typeof o.setHeader === "function") o = mapHttpResponse(o);
}
let formatParams;
- if (msg === null && n.length === 0) {
- formatParams = [null];
- } else {
+ if (msg === null && n.length === 0) formatParams = [null];
+ else {
msg = n.shift();
formatParams = n;
}
- if (typeof this[msgPrefixSym] === "string" && msg !== undefined && msg !== null) {
- msg = this[msgPrefixSym] + msg;
- }
+ if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) msg = this[msgPrefixSym] + msg;
this[writeSym](o, format(msg, formatParams, this[formatOptsSym]), level);
} else {
- let msg = o === undefined ? n.shift() : o;
- if (typeof this[msgPrefixSym] === "string" && msg !== undefined && msg !== null) {
- msg = this[msgPrefixSym] + msg;
- }
+ let msg = o === void 0 ? n.shift() : o;
+ if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) msg = this[msgPrefixSym] + msg;
this[writeSym](null, format(msg, n, this[formatOptsSym]), level);
}
}
@@ -82995,9 +77030,7 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let found = false;
let point = 255;
const l = str.length;
- if (l > 100) {
- return JSON.stringify(str);
- }
+ if (l > 100) return JSON.stringify(str);
for (var i = 0; i < l && point >= 32; i++) {
point = str.charCodeAt(i);
if (point === 34 || point === 92) {
@@ -83006,11 +77039,8 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
found = true;
}
}
- if (!found) {
- result = str;
- } else {
- result += str.slice(last);
- }
+ if (!found) result = str;
+ else result += str.slice(last);
return point < 32 ? JSON.stringify(str) : "\"" + result + "\"";
}
/**
@@ -83024,9 +77054,7 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {string}
*/
function asJson(obj, msg, num, time) {
- if (asJsonChan.hasSubscribers === false) {
- return _asJson.call(this, obj, msg, num, time);
- }
+ if (asJsonChan.hasSubscribers === false) return _asJson.call(this, obj, msg, num, time);
const store = {
instance: this,
arguments
@@ -83058,26 +77086,19 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let data = this[lsCacheSym][num] + time;
data = data + chindings;
let value;
- if (formatters.log) {
- obj = formatters.log(obj);
- }
+ if (formatters.log) obj = formatters.log(obj);
const wildcardStringifier = stringifiers[wildcardFirstSym];
let propStr = "";
for (const key in obj) {
value = obj[key];
- if (Object.prototype.hasOwnProperty.call(obj, key) && value !== undefined) {
- if (serializers[key]) {
- value = serializers[key](value);
- } else if (key === errorKey && serializers.err) {
- value = serializers.err(value);
- }
+ if (Object.prototype.hasOwnProperty.call(obj, key) && value !== void 0) {
+ if (serializers[key]) value = serializers[key](value);
+ else if (key === errorKey && serializers.err) value = serializers.err(value);
const stringifier = stringifiers[key] || wildcardStringifier;
switch (typeof value) {
case "undefined":
case "function": continue;
- case "number": if (Number.isFinite(value) === false) {
- value = null;
- }
+ case "number": if (Number.isFinite(value) === false) value = null;
case "boolean":
if (stringifier) value = stringifier(value);
break;
@@ -83086,20 +77107,18 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
break;
default: value = (stringifier || stringify)(value, stringifySafe);
}
- if (value === undefined) continue;
+ if (value === void 0) continue;
const strKey = asString(key);
propStr += "," + strKey + ":" + value;
}
}
let msgStr = "";
- if (msg !== undefined) {
+ if (msg !== void 0) {
value = serializers[messageKey] ? serializers[messageKey](msg) : msg;
const stringifier = stringifiers[messageKey] || wildcardStringifier;
switch (typeof value) {
case "function": break;
- case "number": if (Number.isFinite(value) === false) {
- value = null;
- }
+ case "number": if (Number.isFinite(value) === false) value = null;
case "boolean":
if (stringifier) value = stringifier(value);
msgStr = ",\"" + messageKey + "\":" + value;
@@ -83113,11 +77132,8 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
msgStr = ",\"" + messageKey + "\":" + value;
}
}
- if (this[nestedKeySym] && propStr) {
- return data + this[nestedKeyStrSym] + propStr.slice(1) + "}" + msgStr + end;
- } else {
- return data + propStr + msgStr + end;
- }
+ if (this[nestedKeySym] && propStr) return data + this[nestedKeyStrSym] + propStr.slice(1) + "}" + msgStr + end;
+ else return data + propStr + msgStr + end;
}
function asChindings(instance, bindings) {
let value;
@@ -83131,11 +77147,10 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
bindings = formatter(bindings);
for (const key in bindings) {
value = bindings[key];
- const valid = (key.length < 5 || key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels") && bindings.hasOwnProperty(key) && value !== undefined;
- if (valid === true) {
+ if (((key.length < 5 || key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels") && bindings.hasOwnProperty(key) && value !== void 0) === true) {
value = serializers[key] ? serializers[key](value) : value;
value = (stringifiers[key] || wildcardStringifier || stringify)(value, stringifySafe);
- if (value === undefined) continue;
+ if (value === void 0) continue;
data += ",\"" + key + "\":" + value;
}
}
@@ -83169,18 +77184,15 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function autoEnd(stream, eventName) {
/* istanbul ignore next */
- if (stream.destroyed) {
- return;
- }
+ if (stream.destroyed) return;
if (eventName === "beforeExit") {
stream.flush();
stream.on("drain", function() {
stream.end();
});
- } else {
- /* istanbul ignore next */
- stream.flushSync();
- }
+ } else
+ /* istanbul ignore next */
+ stream.flushSync();
}
function createArgsNormalizer(defaultOptions) {
return function normalizeArgs(instance, caller, opts = {}, stream) {
@@ -83188,24 +77200,16 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
stream = buildSafeSonicBoom({ dest: opts });
opts = {};
} else if (typeof stream === "string") {
- if (opts && opts.transport) {
- throw Error("only one of option.transport or stream can be specified");
- }
+ if (opts && opts.transport) throw Error("only one of option.transport or stream can be specified");
stream = buildSafeSonicBoom({ dest: stream });
} else if (opts instanceof SonicBoom || opts.writable || opts._writableState) {
stream = opts;
opts = {};
} else if (opts.transport) {
- if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) {
- throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");
- }
- if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === "function") {
- throw Error("option.transport.targets do not allow custom level formatters");
- }
+ if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");
+ if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === "function") throw Error("option.transport.targets do not allow custom level formatters");
let customLevels;
- if (opts.customLevels) {
- customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels);
- }
+ if (opts.customLevels) customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels);
stream = transport({
caller,
...opts.transport,
@@ -83215,19 +77219,12 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
opts = Object.assign({}, defaultOptions, opts);
opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers);
opts.formatters = Object.assign({}, defaultOptions.formatters, opts.formatters);
- if (opts.prettyPrint) {
- throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");
- }
+ if (opts.prettyPrint) throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");
const { enabled, onChild } = opts;
if (enabled === false) opts.level = "silent";
if (!onChild) opts.onChild = noop;
- if (!stream) {
- if (!hasBeenTampered(process.stdout)) {
- stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 });
- } else {
- stream = process.stdout;
- }
- }
+ if (!stream) if (!hasBeenTampered(process.stdout)) stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 });
+ else stream = process.stdout;
return {
opts,
stream
@@ -83239,8 +77236,7 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return JSON.stringify(obj);
} catch (_) {
try {
- const stringify = stringifySafeFn || this[stringifySafeSym];
- return stringify(obj);
+ return (stringifySafeFn || this[stringifySafeSym])(obj);
} catch (_) {
return "\"[unable to serialize, circular reference is too complex to analyze]\"";
}
@@ -83263,12 +77259,8 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function normalizeDestFileDescriptor(destination) {
const fd = Number(destination);
- if (typeof destination === "string" && Number.isFinite(fd)) {
- return fd;
- }
- if (destination === undefined) {
- return 1;
- }
+ if (typeof destination === "string" && Number.isFinite(fd)) return fd;
+ if (destination === void 0) return 1;
return destination;
}
module.exports = {
@@ -83283,38 +77275,24 @@ var require_tools = /* @__PURE__ */ __commonJSMin(((exports, module) => {
normalizeDestFileDescriptor
};
}));
-
//#endregion
//#region ../node_modules/pino/lib/constants.js
var require_constants$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- /**
- * Represents default log level values
- *
- * @enum {number}
- */
- const DEFAULT_LEVELS = {
- trace: 10,
- debug: 20,
- info: 30,
- warn: 40,
- error: 50,
- fatal: 60
- };
- /**
- * Represents sort order direction: `ascending` or `descending`
- *
- * @enum {string}
- */
- const SORTING_ORDER = {
- ASC: "ASC",
- DESC: "DESC"
- };
module.exports = {
- DEFAULT_LEVELS,
- SORTING_ORDER
+ DEFAULT_LEVELS: {
+ trace: 10,
+ debug: 20,
+ info: 30,
+ warn: 40,
+ error: 50,
+ fatal: 60
+ },
+ SORTING_ORDER: {
+ ASC: "ASC",
+ DESC: "DESC"
+ }
};
}));
-
//#endregion
//#region ../node_modules/pino/lib/levels.js
var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -83327,11 +77305,9 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return function(...args) {
const stream = this[streamSym];
logFatal.call(this, ...args);
- if (typeof stream.flushSync === "function") {
- try {
- stream.flushSync();
- } catch (e) {}
- }
+ if (typeof stream.flushSync === "function") try {
+ stream.flushSync();
+ } catch (e) {}
};
},
error: (hook) => genLog(DEFAULT_LEVELS.error, hook),
@@ -83360,9 +77336,7 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return instance;
}
function isStandardLevel(level, useOnlyCustomLevels) {
- if (useOnlyCustomLevels) {
- return false;
- }
+ if (useOnlyCustomLevels) return false;
switch (level) {
case "fatal":
case "error":
@@ -83376,10 +77350,10 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function setLevel(level) {
const { labels, values } = this.levels;
if (typeof level === "number") {
- if (labels[level] === undefined) throw Error("unknown level value" + level);
+ if (labels[level] === void 0) throw Error("unknown level value" + level);
level = labels[level];
}
- if (values[level] === undefined) throw Error("unknown level " + level);
+ if (values[level] === void 0) throw Error("unknown level " + level);
const preLevelVal = this[levelValSym];
const levelVal = this[levelValSym] = values[level];
const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym];
@@ -83401,7 +77375,7 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function isLevelEnabled(logLevel) {
const { values } = this.levels;
const logLevelVal = values[logLevel];
- return logLevelVal !== undefined && this[levelCompSym](logLevelVal, this[levelValSym]);
+ return logLevelVal !== void 0 && this[levelCompSym](logLevelVal, this[levelValSym]);
}
/**
* Determine if the given `current` level is enabled by comparing it
@@ -83413,9 +77387,7 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {boolean}
*/
function compareLevel(direction, current, expected) {
- if (direction === SORTING_ORDER.DESC) {
- return current <= expected;
- }
+ if (direction === SORTING_ORDER.DESC) return current <= expected;
return current >= expected;
}
/**
@@ -83426,9 +77398,7 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns Function
*/
function genLevelComparison(levelComparison) {
- if (typeof levelComparison === "string") {
- return compareLevel.bind(null, levelComparison);
- }
+ if (typeof levelComparison === "string") return compareLevel.bind(null, levelComparison);
return levelComparison;
}
function mappings(customLevels = null, useOnlyCustomLevels = false) {
@@ -83436,35 +77406,23 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
o[customLevels[k]] = k;
return o;
}, {}) : null;
- const labels = Object.assign(Object.create(Object.prototype, { Infinity: { value: "silent" } }), useOnlyCustomLevels ? null : nums, customNums);
- const values = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels);
return {
- labels,
- values
+ labels: Object.assign(Object.create(Object.prototype, { Infinity: { value: "silent" } }), useOnlyCustomLevels ? null : nums, customNums),
+ values: Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels)
};
}
function assertDefaultLevelFound(defaultLevel, customLevels, useOnlyCustomLevels) {
if (typeof defaultLevel === "number") {
- const values = [].concat(Object.keys(customLevels || {}).map((key) => customLevels[key]), useOnlyCustomLevels ? [] : Object.keys(nums).map((level) => +level), Infinity);
- if (!values.includes(defaultLevel)) {
- throw Error(`default level:${defaultLevel} must be included in custom levels`);
- }
+ if (![].concat(Object.keys(customLevels || {}).map((key) => customLevels[key]), useOnlyCustomLevels ? [] : Object.keys(nums).map((level) => +level), Infinity).includes(defaultLevel)) throw Error(`default level:${defaultLevel} must be included in custom levels`);
return;
}
- const labels = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels);
- if (!(defaultLevel in labels)) {
- throw Error(`default level:${defaultLevel} must be included in custom levels`);
- }
+ if (!(defaultLevel in Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels))) throw Error(`default level:${defaultLevel} must be included in custom levels`);
}
function assertNoLevelCollisions(levels, customLevels) {
const { labels, values } = levels;
for (const k in customLevels) {
- if (k in values) {
- throw Error("levels cannot be overridden");
- }
- if (customLevels[k] in labels) {
- throw Error("pre-existing level values cannot be used for new levels");
- }
+ if (k in values) throw Error("levels cannot be overridden");
+ if (customLevels[k] in labels) throw Error("pre-existing level values cannot be used for new levels");
}
}
/**
@@ -83475,12 +77433,8 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns
*/
function assertLevelComparison(levelComparison) {
- if (typeof levelComparison === "function") {
- return;
- }
- if (typeof levelComparison === "string" && Object.values(SORTING_ORDER).includes(levelComparison)) {
- return;
- }
+ if (typeof levelComparison === "function") return;
+ if (typeof levelComparison === "string" && Object.values(SORTING_ORDER).includes(levelComparison)) return;
throw new Error("Levels comparison should be one of \"ASC\", \"DESC\" or \"function\" type");
}
module.exports = {
@@ -83497,13 +77451,11 @@ var require_levels = /* @__PURE__ */ __commonJSMin(((exports, module) => {
assertLevelComparison
};
}));
-
//#endregion
//#region ../node_modules/pino/lib/meta.js
var require_meta = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = { version: "9.14.0" };
}));
-
//#endregion
//#region ../node_modules/pino/lib/proto.js
var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -83513,9 +77465,8 @@ var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { asChindings, asJson, buildFormatters, stringify, noop } = require_tools();
const { version } = require_meta();
const redaction = require_redaction();
- const constructor = class Pino {};
const prototype = {
- constructor,
+ constructor: class Pino {},
child,
bindings,
setBindings,
@@ -83552,36 +77503,26 @@ var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
const resetChildingsFormatter = (bindings) => bindings;
function child(bindings, options) {
- if (!bindings) {
- throw Error("missing bindings for child Pino");
- }
+ if (!bindings) throw Error("missing bindings for child Pino");
const serializers = this[serializersSym];
const formatters = this[formattersSym];
const instance = Object.create(this);
if (options == null) {
- if (instance[formattersSym].bindings !== resetChildingsFormatter) {
- instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
- }
+ if (instance[formattersSym].bindings !== resetChildingsFormatter) instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
instance[chindingsSym] = asChindings(instance, bindings);
instance[setLevelSym](this.level);
- if (this.onChild !== noop) {
- this.onChild(instance);
- }
+ if (this.onChild !== noop) this.onChild(instance);
return instance;
}
if (options.hasOwnProperty("serializers") === true) {
instance[serializersSym] = Object.create(null);
- for (const k in serializers) {
- instance[serializersSym][k] = serializers[k];
- }
+ for (const k in serializers) instance[serializersSym][k] = serializers[k];
const parentSymbols = Object.getOwnPropertySymbols(serializers);
for (var i = 0; i < parentSymbols.length; i++) {
const ks = parentSymbols[i];
instance[serializersSym][ks] = serializers[ks];
}
- for (const bk in options.serializers) {
- instance[serializersSym][bk] = options.serializers[bk];
- }
+ for (const bk in options.serializers) instance[serializersSym][bk] = options.serializers[bk];
const bindingsSymbols = Object.getOwnPropertySymbols(options.serializers);
for (var bi = 0; bi < bindingsSymbols.length; bi++) {
const bks = bindingsSymbols[bi];
@@ -83591,9 +77532,7 @@ var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (options.hasOwnProperty("formatters")) {
const { level, bindings: chindings, log } = options.formatters;
instance[formattersSym] = buildFormatters(level || formatters.level, chindings || resetChildingsFormatter, log || formatters.log);
- } else {
- instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
- }
+ } else instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
if (options.hasOwnProperty("customLevels") === true) {
assertNoLevelCollisions(this.levels, options.customLevels);
instance.levels = mappings(options.customLevels, instance[useOnlyCustomLevelsSym]);
@@ -83607,9 +77546,7 @@ var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
instance[stringifiersSym] = stringifiers;
instance[formatOptsSym] = formatOpts;
}
- if (typeof options.msgPrefix === "string") {
- instance[msgPrefixSym] = (this[msgPrefixSym] || "") + options.msgPrefix;
- }
+ if (typeof options.msgPrefix === "string") instance[msgPrefixSym] = (this[msgPrefixSym] || "") + options.msgPrefix;
instance[chindingsSym] = asChindings(instance, bindings);
const childLevel = options.level || this.level;
instance[setLevelSym](childLevel);
@@ -83617,16 +77554,14 @@ var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return instance;
}
function bindings() {
- const chindings = this[chindingsSym];
- const chindingsJson = `{${chindings.substr(1)}}`;
+ const chindingsJson = `{${this[chindingsSym].substr(1)}}`;
const bindingsFromJson = JSON.parse(chindingsJson);
delete bindingsFromJson.pid;
delete bindingsFromJson.hostname;
return bindingsFromJson;
}
function setBindings(newBindings) {
- const chindings = asChindings(this, newBindings);
- this[chindingsSym] = chindings;
+ this[chindingsSym] = asChindings(this, newBindings);
delete this[parsedChindingsSym];
}
/**
@@ -83648,22 +77583,15 @@ var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy;
let obj;
const streamWriteHook = this[hooksSym].streamWrite;
- if (_obj === undefined || _obj === null) {
- obj = {};
- } else if (_obj instanceof Error) {
+ if (_obj === void 0 || _obj === null) obj = {};
+ else if (_obj instanceof Error) {
obj = { [errorKey]: _obj };
- if (msg === undefined) {
- msg = _obj.message;
- }
+ if (msg === void 0) msg = _obj.message;
} else {
obj = _obj;
- if (msg === undefined && _obj[messageKey] === undefined && _obj[errorKey]) {
- msg = _obj[errorKey].message;
- }
- }
- if (mixin) {
- obj = mixinMergeStrategy(obj, mixin(obj, num, this));
+ if (msg === void 0 && _obj[messageKey] === void 0 && _obj[errorKey]) msg = _obj[errorKey].message;
}
+ if (mixin) obj = mixinMergeStrategy(obj, mixin(obj, num, this));
const s = this[asJsonSym](obj, msg, num, t);
const stream = this[streamSym];
if (stream[needsMetadataGsym] === true) {
@@ -83676,16 +77604,12 @@ var require_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
stream.write(streamWriteHook ? streamWriteHook(s) : s);
}
function flush(cb) {
- if (cb != null && typeof cb !== "function") {
- throw Error("callback must be a function");
- }
+ if (cb != null && typeof cb !== "function") throw Error("callback must be a function");
const stream = this[streamSym];
- if (typeof stream.flush === "function") {
- stream.flush(cb || noop);
- } else if (cb) cb();
+ if (typeof stream.flush === "function") stream.flush(cb || noop);
+ else if (cb) cb();
}
}));
-
//#endregion
//#region ../node_modules/safe-stable-stringify/index.js
var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -83699,15 +77623,11 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
module.exports = stringify;
const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
function strEscape(str) {
- if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) {
- return `"${str}"`;
- }
+ if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) return `"${str}"`;
return JSON.stringify(str);
}
function sort(array, comparator) {
- if (array.length > 200 || comparator) {
- return array.sort(comparator);
- }
+ if (array.length > 200 || comparator) return array.sort(comparator);
for (let i = 1; i < array.length; i++) {
const currentValue = array[i];
let position = i;
@@ -83721,33 +77641,23 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
}
const typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array())), Symbol.toStringTag).get;
function isTypedArrayWithEntries(value) {
- return typedArrayPrototypeGetSymbolToStringTag.call(value) !== undefined && value.length !== 0;
+ return typedArrayPrototypeGetSymbolToStringTag.call(value) !== void 0 && value.length !== 0;
}
function stringifyTypedArray(array, separator, maximumBreadth) {
- if (array.length < maximumBreadth) {
- maximumBreadth = array.length;
- }
+ if (array.length < maximumBreadth) maximumBreadth = array.length;
const whitespace = separator === "," ? "" : " ";
let res = `"0":${whitespace}${array[0]}`;
- for (let i = 1; i < maximumBreadth; i++) {
- res += `${separator}"${i}":${whitespace}${array[i]}`;
- }
+ for (let i = 1; i < maximumBreadth; i++) res += `${separator}"${i}":${whitespace}${array[i]}`;
return res;
}
function getCircularValueOption(options) {
if (hasOwnProperty.call(options, "circularValue")) {
const circularValue = options.circularValue;
- if (typeof circularValue === "string") {
- return `"${circularValue}"`;
- }
- if (circularValue == null) {
- return circularValue;
- }
- if (circularValue === Error || circularValue === TypeError) {
- return { toString() {
- throw new TypeError("Converting circular structure to JSON");
- } };
- }
+ if (typeof circularValue === "string") return `"${circularValue}"`;
+ if (circularValue == null) return circularValue;
+ if (circularValue === Error || circularValue === TypeError) return { toString() {
+ throw new TypeError("Converting circular structure to JSON");
+ } };
throw new TypeError("The \"circularValue\" argument must be of type string or the value null or undefined");
}
return "\"[Circular]\"";
@@ -83756,110 +77666,76 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
let value;
if (hasOwnProperty.call(options, "deterministic")) {
value = options.deterministic;
- if (typeof value !== "boolean" && typeof value !== "function") {
- throw new TypeError("The \"deterministic\" argument must be of type boolean or comparator function");
- }
+ if (typeof value !== "boolean" && typeof value !== "function") throw new TypeError("The \"deterministic\" argument must be of type boolean or comparator function");
}
- return value === undefined ? true : value;
+ return value === void 0 ? true : value;
}
function getBooleanOption(options, key) {
let value;
if (hasOwnProperty.call(options, key)) {
value = options[key];
- if (typeof value !== "boolean") {
- throw new TypeError(`The "${key}" argument must be of type boolean`);
- }
+ if (typeof value !== "boolean") throw new TypeError(`The "${key}" argument must be of type boolean`);
}
- return value === undefined ? true : value;
+ return value === void 0 ? true : value;
}
function getPositiveIntegerOption(options, key) {
let value;
if (hasOwnProperty.call(options, key)) {
value = options[key];
- if (typeof value !== "number") {
- throw new TypeError(`The "${key}" argument must be of type number`);
- }
- if (!Number.isInteger(value)) {
- throw new TypeError(`The "${key}" argument must be an integer`);
- }
- if (value < 1) {
- throw new RangeError(`The "${key}" argument must be >= 1`);
- }
+ if (typeof value !== "number") throw new TypeError(`The "${key}" argument must be of type number`);
+ if (!Number.isInteger(value)) throw new TypeError(`The "${key}" argument must be an integer`);
+ if (value < 1) throw new RangeError(`The "${key}" argument must be >= 1`);
}
- return value === undefined ? Infinity : value;
+ return value === void 0 ? Infinity : value;
}
function getItemCount(number) {
- if (number === 1) {
- return "1 item";
- }
+ if (number === 1) return "1 item";
return `${number} items`;
}
function getUniqueReplacerSet(replacerArray) {
- const replacerSet = new Set();
- for (const value of replacerArray) {
- if (typeof value === "string" || typeof value === "number") {
- replacerSet.add(String(value));
- }
- }
+ const replacerSet = /* @__PURE__ */ new Set();
+ for (const value of replacerArray) if (typeof value === "string" || typeof value === "number") replacerSet.add(String(value));
return replacerSet;
}
function getStrictOption(options) {
if (hasOwnProperty.call(options, "strict")) {
const value = options.strict;
- if (typeof value !== "boolean") {
- throw new TypeError("The \"strict\" argument must be of type boolean");
- }
- if (value) {
- return (value) => {
- let message = `Object can not safely be stringified. Received type ${typeof value}`;
- if (typeof value !== "function") message += ` (${value.toString()})`;
- throw new Error(message);
- };
- }
+ if (typeof value !== "boolean") throw new TypeError("The \"strict\" argument must be of type boolean");
+ if (value) return (value) => {
+ let message = `Object can not safely be stringified. Received type ${typeof value}`;
+ if (typeof value !== "function") message += ` (${value.toString()})`;
+ throw new Error(message);
+ };
}
}
function configure(options) {
options = { ...options };
const fail = getStrictOption(options);
if (fail) {
- if (options.bigint === undefined) {
- options.bigint = false;
- }
- if (!("circularValue" in options)) {
- options.circularValue = Error;
- }
+ if (options.bigint === void 0) options.bigint = false;
+ if (!("circularValue" in options)) options.circularValue = Error;
}
const circularValue = getCircularValueOption(options);
const bigint = getBooleanOption(options, "bigint");
const deterministic = getDeterministicOption(options);
- const comparator = typeof deterministic === "function" ? deterministic : undefined;
+ const comparator = typeof deterministic === "function" ? deterministic : void 0;
const maximumDepth = getPositiveIntegerOption(options, "maximumDepth");
const maximumBreadth = getPositiveIntegerOption(options, "maximumBreadth");
function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) {
let value = parent[key];
- if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
- value = value.toJSON(key);
- }
+ if (typeof value === "object" && value !== null && typeof value.toJSON === "function") value = value.toJSON(key);
value = replacer.call(parent, key, value);
switch (typeof value) {
case "string": return strEscape(value);
case "object": {
- if (value === null) {
- return "null";
- }
- if (stack.indexOf(value) !== -1) {
- return circularValue;
- }
+ if (value === null) return "null";
+ if (stack.indexOf(value) !== -1) return circularValue;
let res = "";
let join = ",";
const originalIndentation = indentation;
if (Array.isArray(value)) {
- if (value.length === 0) {
- return "[]";
- }
- if (maximumDepth < stack.length + 1) {
- return "\"[Array]\"";
- }
+ if (value.length === 0) return "[]";
+ if (maximumDepth < stack.length + 1) return "\"[Array]\"";
stack.push(value);
if (spacer !== "") {
indentation += spacer;
@@ -83870,29 +77746,23 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
let i = 0;
for (; i < maximumValuesToStringify - 1; i++) {
const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
res += join;
}
const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
if (value.length - 1 > maximumBreadth) {
const removedKeys = value.length - maximumBreadth - 1;
res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
}
- if (spacer !== "") {
- res += `\n${originalIndentation}`;
- }
+ if (spacer !== "") res += `\n${originalIndentation}`;
stack.pop();
return `[${res}]`;
}
let keys = Object.keys(value);
const keyLength = keys.length;
- if (keyLength === 0) {
- return "{}";
- }
- if (maximumDepth < stack.length + 1) {
- return "\"[Object]\"";
- }
+ if (keyLength === 0) return "{}";
+ if (maximumDepth < stack.length + 1) return "\"[Object]\"";
let whitespace = "";
let separator = "";
if (spacer !== "") {
@@ -83901,14 +77771,12 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
whitespace = " ";
}
const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
- if (deterministic && !isTypedArrayWithEntries(value)) {
- keys = sort(keys, comparator);
- }
+ if (deterministic && !isTypedArrayWithEntries(value)) keys = sort(keys, comparator);
stack.push(value);
for (let i = 0; i < maximumPropertiesToStringify; i++) {
const key = keys[i];
const tmp = stringifyFnReplacer(key, value, stack, replacer, spacer, indentation);
- if (tmp !== undefined) {
+ if (tmp !== void 0) {
res += `${separator}${strEscape(key)}:${whitespace}${tmp}`;
separator = join;
}
@@ -83918,44 +77786,30 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
separator = join;
}
- if (spacer !== "" && separator.length > 1) {
- res = `\n${indentation}${res}\n${originalIndentation}`;
- }
+ if (spacer !== "" && separator.length > 1) res = `\n${indentation}${res}\n${originalIndentation}`;
stack.pop();
return `{${res}}`;
}
case "number": return isFinite(value) ? String(value) : fail ? fail(value) : "null";
case "boolean": return value === true ? "true" : "false";
- case "undefined": return undefined;
- case "bigint": if (bigint) {
- return String(value);
- }
- default: return fail ? fail(value) : undefined;
+ case "undefined": return;
+ case "bigint": if (bigint) return String(value);
+ default: return fail ? fail(value) : void 0;
}
}
function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) {
- if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
- value = value.toJSON(key);
- }
+ if (typeof value === "object" && value !== null && typeof value.toJSON === "function") value = value.toJSON(key);
switch (typeof value) {
case "string": return strEscape(value);
case "object": {
- if (value === null) {
- return "null";
- }
- if (stack.indexOf(value) !== -1) {
- return circularValue;
- }
+ if (value === null) return "null";
+ if (stack.indexOf(value) !== -1) return circularValue;
const originalIndentation = indentation;
let res = "";
let join = ",";
if (Array.isArray(value)) {
- if (value.length === 0) {
- return "[]";
- }
- if (maximumDepth < stack.length + 1) {
- return "\"[Array]\"";
- }
+ if (value.length === 0) return "[]";
+ if (maximumDepth < stack.length + 1) return "\"[Array]\"";
stack.push(value);
if (spacer !== "") {
indentation += spacer;
@@ -83966,18 +77820,16 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
let i = 0;
for (; i < maximumValuesToStringify - 1; i++) {
const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
res += join;
}
const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
if (value.length - 1 > maximumBreadth) {
const removedKeys = value.length - maximumBreadth - 1;
res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
}
- if (spacer !== "") {
- res += `\n${originalIndentation}`;
- }
+ if (spacer !== "") res += `\n${originalIndentation}`;
stack.pop();
return `[${res}]`;
}
@@ -83991,53 +77843,37 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
let separator = "";
for (const key of replacer) {
const tmp = stringifyArrayReplacer(key, value[key], stack, replacer, spacer, indentation);
- if (tmp !== undefined) {
+ if (tmp !== void 0) {
res += `${separator}${strEscape(key)}:${whitespace}${tmp}`;
separator = join;
}
}
- if (spacer !== "" && separator.length > 1) {
- res = `\n${indentation}${res}\n${originalIndentation}`;
- }
+ if (spacer !== "" && separator.length > 1) res = `\n${indentation}${res}\n${originalIndentation}`;
stack.pop();
return `{${res}}`;
}
case "number": return isFinite(value) ? String(value) : fail ? fail(value) : "null";
case "boolean": return value === true ? "true" : "false";
- case "undefined": return undefined;
- case "bigint": if (bigint) {
- return String(value);
- }
- default: return fail ? fail(value) : undefined;
+ case "undefined": return;
+ case "bigint": if (bigint) return String(value);
+ default: return fail ? fail(value) : void 0;
}
}
function stringifyIndent(key, value, stack, spacer, indentation) {
switch (typeof value) {
case "string": return strEscape(value);
case "object": {
- if (value === null) {
- return "null";
- }
+ if (value === null) return "null";
if (typeof value.toJSON === "function") {
value = value.toJSON(key);
- if (typeof value !== "object") {
- return stringifyIndent(key, value, stack, spacer, indentation);
- }
- if (value === null) {
- return "null";
- }
- }
- if (stack.indexOf(value) !== -1) {
- return circularValue;
+ if (typeof value !== "object") return stringifyIndent(key, value, stack, spacer, indentation);
+ if (value === null) return "null";
}
+ if (stack.indexOf(value) !== -1) return circularValue;
const originalIndentation = indentation;
if (Array.isArray(value)) {
- if (value.length === 0) {
- return "[]";
- }
- if (maximumDepth < stack.length + 1) {
- return "\"[Array]\"";
- }
+ if (value.length === 0) return "[]";
+ if (maximumDepth < stack.length + 1) return "\"[Array]\"";
stack.push(value);
indentation += spacer;
let res = `\n${indentation}`;
@@ -84046,11 +77882,11 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
let i = 0;
for (; i < maximumValuesToStringify - 1; i++) {
const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
res += join;
}
const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
if (value.length - 1 > maximumBreadth) {
const removedKeys = value.length - maximumBreadth - 1;
res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
@@ -84061,12 +77897,8 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
}
let keys = Object.keys(value);
const keyLength = keys.length;
- if (keyLength === 0) {
- return "{}";
- }
- if (maximumDepth < stack.length + 1) {
- return "\"[Object]\"";
- }
+ if (keyLength === 0) return "{}";
+ if (maximumDepth < stack.length + 1) return "\"[Object]\"";
indentation += spacer;
const join = `,\n${indentation}`;
let res = "";
@@ -84078,14 +77910,12 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
maximumPropertiesToStringify -= value.length;
separator = join;
}
- if (deterministic) {
- keys = sort(keys, comparator);
- }
+ if (deterministic) keys = sort(keys, comparator);
stack.push(value);
for (let i = 0; i < maximumPropertiesToStringify; i++) {
const key = keys[i];
const tmp = stringifyIndent(key, value[key], stack, spacer, indentation);
- if (tmp !== undefined) {
+ if (tmp !== void 0) {
res += `${separator}${strEscape(key)}: ${tmp}`;
separator = join;
}
@@ -84095,59 +77925,43 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
separator = join;
}
- if (separator !== "") {
- res = `\n${indentation}${res}\n${originalIndentation}`;
- }
+ if (separator !== "") res = `\n${indentation}${res}\n${originalIndentation}`;
stack.pop();
return `{${res}}`;
}
case "number": return isFinite(value) ? String(value) : fail ? fail(value) : "null";
case "boolean": return value === true ? "true" : "false";
- case "undefined": return undefined;
- case "bigint": if (bigint) {
- return String(value);
- }
- default: return fail ? fail(value) : undefined;
+ case "undefined": return;
+ case "bigint": if (bigint) return String(value);
+ default: return fail ? fail(value) : void 0;
}
}
function stringifySimple(key, value, stack) {
switch (typeof value) {
case "string": return strEscape(value);
case "object": {
- if (value === null) {
- return "null";
- }
+ if (value === null) return "null";
if (typeof value.toJSON === "function") {
value = value.toJSON(key);
- if (typeof value !== "object") {
- return stringifySimple(key, value, stack);
- }
- if (value === null) {
- return "null";
- }
- }
- if (stack.indexOf(value) !== -1) {
- return circularValue;
+ if (typeof value !== "object") return stringifySimple(key, value, stack);
+ if (value === null) return "null";
}
+ if (stack.indexOf(value) !== -1) return circularValue;
let res = "";
- const hasLength = value.length !== undefined;
+ const hasLength = value.length !== void 0;
if (hasLength && Array.isArray(value)) {
- if (value.length === 0) {
- return "[]";
- }
- if (maximumDepth < stack.length + 1) {
- return "\"[Array]\"";
- }
+ if (value.length === 0) return "[]";
+ if (maximumDepth < stack.length + 1) return "\"[Array]\"";
stack.push(value);
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
let i = 0;
for (; i < maximumValuesToStringify - 1; i++) {
const tmp = stringifySimple(String(i), value[i], stack);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
res += ",";
}
const tmp = stringifySimple(String(i), value[i], stack);
- res += tmp !== undefined ? tmp : "null";
+ res += tmp !== void 0 ? tmp : "null";
if (value.length - 1 > maximumBreadth) {
const removedKeys = value.length - maximumBreadth - 1;
res += `,"... ${getItemCount(removedKeys)} not stringified"`;
@@ -84157,12 +77971,8 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
}
let keys = Object.keys(value);
const keyLength = keys.length;
- if (keyLength === 0) {
- return "{}";
- }
- if (maximumDepth < stack.length + 1) {
- return "\"[Object]\"";
- }
+ if (keyLength === 0) return "{}";
+ if (maximumDepth < stack.length + 1) return "\"[Object]\"";
let separator = "";
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
if (hasLength && isTypedArrayWithEntries(value)) {
@@ -84171,14 +77981,12 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
maximumPropertiesToStringify -= value.length;
separator = ",";
}
- if (deterministic) {
- keys = sort(keys, comparator);
- }
+ if (deterministic) keys = sort(keys, comparator);
stack.push(value);
for (let i = 0; i < maximumPropertiesToStringify; i++) {
const key = keys[i];
const tmp = stringifySimple(key, value[key], stack);
- if (tmp !== undefined) {
+ if (tmp !== void 0) {
res += `${separator}${strEscape(key)}:${tmp}`;
separator = ",";
}
@@ -84192,39 +78000,27 @@ var require_safe_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, mod
}
case "number": return isFinite(value) ? String(value) : fail ? fail(value) : "null";
case "boolean": return value === true ? "true" : "false";
- case "undefined": return undefined;
- case "bigint": if (bigint) {
- return String(value);
- }
- default: return fail ? fail(value) : undefined;
+ case "undefined": return;
+ case "bigint": if (bigint) return String(value);
+ default: return fail ? fail(value) : void 0;
}
}
function stringify(value, replacer, space) {
if (arguments.length > 1) {
let spacer = "";
- if (typeof space === "number") {
- spacer = " ".repeat(Math.min(space, 10));
- } else if (typeof space === "string") {
- spacer = space.slice(0, 10);
- }
+ if (typeof space === "number") spacer = " ".repeat(Math.min(space, 10));
+ else if (typeof space === "string") spacer = space.slice(0, 10);
if (replacer != null) {
- if (typeof replacer === "function") {
- return stringifyFnReplacer("", { "": value }, [], replacer, spacer, "");
- }
- if (Array.isArray(replacer)) {
- return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, "");
- }
- }
- if (spacer.length !== 0) {
- return stringifyIndent("", value, [], spacer, "");
+ if (typeof replacer === "function") return stringifyFnReplacer("", { "": value }, [], replacer, spacer, "");
+ if (Array.isArray(replacer)) return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, "");
}
+ if (spacer.length !== 0) return stringifyIndent("", value, [], spacer, "");
}
return stringifySimple("", value, []);
}
return stringify;
}
}));
-
//#endregion
//#region ../node_modules/pino/lib/multistream.js
var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -84236,11 +78032,9 @@ var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
opts = opts || { dedupe: false };
const streamLevels = Object.create(DEFAULT_LEVELS);
streamLevels.silent = Infinity;
- if (opts.levels && typeof opts.levels === "object") {
- Object.keys(opts.levels).forEach((i) => {
- streamLevels[i] = opts.levels[i];
- });
- }
+ if (opts.levels && typeof opts.levels === "object") Object.keys(opts.levels).forEach((i) => {
+ streamLevels[i] = opts.levels[i];
+ });
const res = {
write,
add,
@@ -84255,11 +78049,8 @@ var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
[metadata]: true,
streamLevels
};
- if (Array.isArray(streamsArray)) {
- streamsArray.forEach(add, res);
- } else {
- add.call(res, streamsArray);
- }
+ if (Array.isArray(streamsArray)) streamsArray.forEach(add, res);
+ else add.call(res, streamsArray);
streamsArray = null;
return res;
function write(data) {
@@ -84271,9 +78062,7 @@ var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) {
dest = streams[i];
if (dest.level <= level) {
- if (recordedLevel !== 0 && recordedLevel !== dest.level) {
- break;
- }
+ if (recordedLevel !== 0 && recordedLevel !== dest.level) break;
stream = dest.stream;
if (stream[metadata]) {
const { lastTime, lastMsg, lastObj, lastLogger } = this;
@@ -84284,52 +78073,31 @@ var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
stream.lastLogger = lastLogger;
}
stream.write(data);
- if (opts.dedupe) {
- recordedLevel = dest.level;
- }
- } else if (!opts.dedupe) {
- break;
- }
+ if (opts.dedupe) recordedLevel = dest.level;
+ } else if (!opts.dedupe) break;
}
}
function emit(...args) {
- for (const { stream } of this.streams) {
- if (typeof stream.emit === "function") {
- stream.emit(...args);
- }
- }
+ for (const { stream } of this.streams) if (typeof stream.emit === "function") stream.emit(...args);
}
function flushSync() {
- for (const { stream } of this.streams) {
- if (typeof stream.flushSync === "function") {
- stream.flushSync();
- }
- }
+ for (const { stream } of this.streams) if (typeof stream.flushSync === "function") stream.flushSync();
}
function add(dest) {
- if (!dest) {
- return res;
- }
+ if (!dest) return res;
const isStream = typeof dest.write === "function" || dest.stream;
const stream_ = dest.write ? dest : dest.stream;
- if (!isStream) {
- throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");
- }
+ if (!isStream) throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");
const { streams, streamLevels } = this;
let level;
- if (typeof dest.levelVal === "number") {
- level = dest.levelVal;
- } else if (typeof dest.level === "string") {
- level = streamLevels[dest.level];
- } else if (typeof dest.level === "number") {
- level = dest.level;
- } else {
- level = DEFAULT_INFO_LEVEL;
- }
+ if (typeof dest.levelVal === "number") level = dest.levelVal;
+ else if (typeof dest.level === "string") level = streamLevels[dest.level];
+ else if (typeof dest.level === "number") level = dest.level;
+ else level = DEFAULT_INFO_LEVEL;
const dest_ = {
stream: stream_,
level,
- levelVal: undefined,
+ levelVal: void 0,
id: ++res.lastId
};
streams.unshift(dest_);
@@ -84349,20 +78117,16 @@ var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function end() {
for (const { stream } of this.streams) {
- if (typeof stream.flushSync === "function") {
- stream.flushSync();
- }
+ if (typeof stream.flushSync === "function") stream.flushSync();
stream.end();
}
}
function clone(level) {
const streams = new Array(this.streams.length);
- for (let i = 0; i < streams.length; i++) {
- streams[i] = {
- level,
- stream: this.streams[i].stream
- };
- }
+ for (let i = 0; i < streams.length; i++) streams[i] = {
+ level,
+ stream: this.streams[i].stream
+ };
return {
write,
add,
@@ -84390,7 +78154,6 @@ var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = multistream;
}));
-
//#endregion
//#region ../node_modules/pino/pino.js
var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -84411,7 +78174,7 @@ var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { pid } = process;
const hostname = os$2.hostname();
const defaultErrorSerializer = stdSerializers.err;
- const defaultOptions = {
+ const normalize = createArgsNormalizer({
level: "info",
levelComparison: SORTING_ORDER.ASC,
levels: DEFAULT_LEVELS,
@@ -84433,23 +78196,22 @@ var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}),
hooks: {
- logMethod: undefined,
- streamWrite: undefined
+ logMethod: void 0,
+ streamWrite: void 0
},
timestamp: epochTime,
- name: undefined,
+ name: void 0,
redact: null,
customLevels: null,
useOnlyCustomLevels: false,
depthLimit: 5,
edgeLimit: 100
- };
- const normalize = createArgsNormalizer(defaultOptions);
+ });
const serializers = Object.assign(Object.create(null), stdSerializers);
function pino(...args) {
const instance = {};
const { opts, stream } = normalize(instance, caller(), ...args);
- if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== undefined) opts.level = opts.level.toLowerCase();
+ if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0) opts.level = opts.level.toLowerCase();
const { redact, crlf, serializers, timestamp, messageKey, errorKey, nestedKey, base, name, level, customLevels, levelComparison, mixin, mixinMergeStrategy, useOnlyCustomLevels, formatters, hooks, depthLimit, edgeLimit, onChild, msgPrefix } = opts;
const stringifySafe = configure({
maximumDepth: depthLimit,
@@ -84469,13 +78231,8 @@ var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
[formattersSym]: allFormatters
});
let chindings = "";
- if (base !== null) {
- if (name === undefined) {
- chindings = coreChindings(base);
- } else {
- chindings = coreChindings(Object.assign({}, base, { name }));
- }
- }
+ if (base !== null) if (name === void 0) chindings = coreChindings(base);
+ else chindings = coreChindings(Object.assign({}, base, { name }));
const time = timestamp instanceof Function ? timestamp : timestamp ? epochTime : nullTime;
const timeSliceIndex = time().indexOf(":") + 1;
if (useOnlyCustomLevels && !customLevels) throw Error("customLevels is required if useOnlyCustomLevels is set true");
@@ -84483,16 +78240,14 @@ var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (msgPrefix && typeof msgPrefix !== "string") throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`);
assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels);
const levels = mappings(customLevels, useOnlyCustomLevels);
- if (typeof stream.emit === "function") {
- stream.emit("message", {
- code: "PINO_CONFIG",
- config: {
- levels,
- messageKey,
- errorKey
- }
- });
- }
+ if (typeof stream.emit === "function") stream.emit("message", {
+ code: "PINO_CONFIG",
+ config: {
+ levels,
+ messageKey,
+ errorKey
+ }
+ });
assertLevelComparison(levelComparison);
const levelCompFunc = genLevelComparison(levelComparison);
Object.assign(instance, {
@@ -84531,12 +78286,10 @@ var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (typeof dest === "object") {
dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd);
return buildSafeSonicBoom(dest);
- } else {
- return buildSafeSonicBoom({
- dest: normalizeDestFileDescriptor(dest),
- minLength: 0
- });
- }
+ } else return buildSafeSonicBoom({
+ dest: normalizeDestFileDescriptor(dest),
+ minLength: 0
+ });
};
module.exports.transport = require_transport();
module.exports.multistream = require_multistream();
@@ -84548,7 +78301,6 @@ var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.default = pino;
module.exports.pino = pino;
}));
-
//#endregion
//#region ../node_modules/reusify/reusify.js
var require_reusify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -84557,9 +78309,8 @@ var require_reusify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var tail = head;
function get() {
var current = head;
- if (current.next) {
- head = current.next;
- } else {
+ if (current.next) head = current.next;
+ else {
head = new Constructor();
tail = head;
}
@@ -84577,7 +78328,6 @@ var require_reusify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = reusify;
}));
-
//#endregion
//#region ../node_modules/fastq/queue.js
var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -84588,9 +78338,7 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
worker = context;
context = null;
}
- if (!(_concurrency >= 1)) {
- throw new Error("fastqueue concurrency must be equal to or greater than 1");
- }
+ if (!(_concurrency >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1");
var cache = reusify(Task);
var queueHead = null;
var queueTail = null;
@@ -84606,9 +78354,7 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return _concurrency;
},
set concurrency(value) {
- if (!(value >= 1)) {
- throw new Error("fastqueue concurrency must be equal to or greater than 1");
- }
+ if (!(value >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1");
_concurrency = value;
if (self.paused) return;
for (; queueHead && _running < _concurrency;) {
@@ -84675,16 +78421,15 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
current.value = value;
current.callback = done || noop;
current.errorHandler = errorHandler;
- if (_running >= _concurrency || self.paused) {
- if (queueTail) {
- queueTail.next = current;
- queueTail = current;
- } else {
- queueHead = current;
- queueTail = current;
- self.saturated();
- }
+ if (_running >= _concurrency || self.paused) if (queueTail) {
+ queueTail.next = current;
+ queueTail = current;
} else {
+ queueHead = current;
+ queueTail = current;
+ self.saturated();
+ }
+ else {
_running++;
worker.call(context, current.value, current.worked);
}
@@ -84696,42 +78441,30 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
current.value = value;
current.callback = done || noop;
current.errorHandler = errorHandler;
- if (_running >= _concurrency || self.paused) {
- if (queueHead) {
- current.next = queueHead;
- queueHead = current;
- } else {
- queueHead = current;
- queueTail = current;
- self.saturated();
- }
+ if (_running >= _concurrency || self.paused) if (queueHead) {
+ current.next = queueHead;
+ queueHead = current;
} else {
+ queueHead = current;
+ queueTail = current;
+ self.saturated();
+ }
+ else {
_running++;
worker.call(context, current.value, current.worked);
}
}
function release(holder) {
- if (holder) {
- cache.release(holder);
- }
+ if (holder) cache.release(holder);
var next = queueHead;
- if (next && _running <= _concurrency) {
- if (!self.paused) {
- if (queueTail === queueHead) {
- queueTail = null;
- }
- queueHead = next.next;
- next.next = null;
- worker.call(context, next.value, next.worked);
- if (queueTail === null) {
- self.empty();
- }
- } else {
- _running--;
- }
- } else if (--_running === 0) {
- self.drain();
- }
+ if (next && _running <= _concurrency) if (!self.paused) {
+ if (queueTail === queueHead) queueTail = null;
+ queueHead = next.next;
+ next.next = null;
+ worker.call(context, next.value, next.worked);
+ if (queueTail === null) self.empty();
+ } else _running--;
+ else if (--_running === 0) self.drain();
}
function kill() {
queueHead = null;
@@ -84763,9 +78496,7 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var val = self.value;
self.value = null;
self.callback = noop;
- if (self.errorHandler) {
- errorHandler(err, val);
- }
+ if (self.errorHandler) errorHandler(err, val);
callback.call(self.context, err, result);
self.release(self);
};
@@ -84815,11 +78546,10 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return p;
}
function drained() {
- var p = new Promise(function(resolve) {
+ return new Promise(function(resolve) {
process.nextTick(function() {
- if (queue.idle()) {
- resolve();
- } else {
+ if (queue.idle()) resolve();
+ else {
var previousDrain = queue.drain;
queue.drain = function() {
if (typeof previousDrain === "function") previousDrain();
@@ -84829,13 +78559,11 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
});
});
- return p;
}
}
module.exports = fastqueue;
module.exports.promise = queueAsPromised;
}));
-
//#endregion
//#region ../node_modules/@fastify/error/index.js
var require_error$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -84847,18 +78575,14 @@ var require_error$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (!code) throw new Error("Fastify error code must not be empty");
if (!message) throw new Error("Fastify error message must not be empty");
code = code.toUpperCase();
- !statusCode && (statusCode = undefined);
+ !statusCode && (statusCode = void 0);
function FastifyError(...args) {
- if (!new.target) {
- return new FastifyError(...args);
- }
+ if (!new.target) return new FastifyError(...args);
this.code = code;
this.name = "FastifyError";
this.statusCode = statusCode;
const lastElement = args.length - 1;
- if (lastElement !== -1 && args[lastElement] && typeof args[lastElement] === "object" && "cause" in args[lastElement]) {
- this.cause = args.pop().cause;
- }
+ if (lastElement !== -1 && args[lastElement] && typeof args[lastElement] === "object" && "cause" in args[lastElement]) this.cause = args.pop().cause;
this.message = format$1(message, ...args);
Error.stackTraceLimit !== 0 && Error.captureStackTrace(this, FastifyError);
}
@@ -84876,7 +78600,6 @@ var require_error$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.default = createError;
module.exports.createError = createError;
}));
-
//#endregion
//#region ../node_modules/avvio/lib/errors.js
var require_errors$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -84892,32 +78615,21 @@ var require_errors$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
AVV_ERR_PLUGIN_EXEC_TIMEOUT: createError("AVV_ERR_PLUGIN_EXEC_TIMEOUT", "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")
};
}));
-
//#endregion
//#region ../node_modules/avvio/lib/symbols.js
var require_symbols$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- const kAvvio = Symbol("avvio.Boot");
- const kIsOnCloseHandler = Symbol("isOnCloseHandler");
- const kThenifyDoNotWrap = Symbol("avvio.ThenifyDoNotWrap");
- const kUntrackNode = Symbol("avvio.TimeTree.untrackNode");
- const kTrackNode = Symbol("avvio.TimeTree.trackNode");
- const kGetParent = Symbol("avvio.TimeTree.getParent");
- const kGetNode = Symbol("avvio.TimeTree.getNode");
- const kAddNode = Symbol("avvio.TimeTree.addNode");
- const kPluginMeta = Symbol.for("plugin-meta");
module.exports = {
- kAvvio,
- kIsOnCloseHandler,
- kThenifyDoNotWrap,
- kUntrackNode,
- kTrackNode,
- kGetParent,
- kGetNode,
- kAddNode,
- kPluginMeta
+ kAvvio: Symbol("avvio.Boot"),
+ kIsOnCloseHandler: Symbol("isOnCloseHandler"),
+ kThenifyDoNotWrap: Symbol("avvio.ThenifyDoNotWrap"),
+ kUntrackNode: Symbol("avvio.TimeTree.untrackNode"),
+ kTrackNode: Symbol("avvio.TimeTree.trackNode"),
+ kGetParent: Symbol("avvio.TimeTree.getParent"),
+ kGetNode: Symbol("avvio.TimeTree.getNode"),
+ kAddNode: Symbol("avvio.TimeTree.addNode"),
+ kPluginMeta: Symbol.for("plugin-meta")
};
}));
-
//#endregion
//#region ../node_modules/avvio/lib/time-tree.js
var require_time_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -84944,23 +78656,20 @@ var require_time_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @type {Map} tableId
* @public
*/
- this.tableId = new Map();
+ this.tableId = /* @__PURE__ */ new Map();
/**
* @type {Map>} tableLabel
* @public
*/
- this.tableLabel = new Map();
+ this.tableLabel = /* @__PURE__ */ new Map();
}
/**
* @param {TimeTreeNode} node
*/
[kTrackNode](node) {
this.tableId.set(node.id, node);
- if (this.tableLabel.has(node.label)) {
- this.tableLabel.get(node.label).push(node);
- } else {
- this.tableLabel.set(node.label, [node]);
- }
+ if (this.tableLabel.has(node.label)) this.tableLabel.get(node.label).push(node);
+ else this.tableLabel.set(node.label, [node]);
}
/**
* @param {TimeTreeNode} node
@@ -84969,23 +78678,18 @@ var require_time_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.tableId.delete(node.id);
const labelNode = this.tableLabel.get(node.label);
labelNode.pop();
- if (labelNode.length === 0) {
- this.tableLabel.delete(node.label);
- }
+ if (labelNode.length === 0) this.tableLabel.delete(node.label);
}
/**
* @param {string} parent
* @returns {TimeTreeNode}
*/
[kGetParent](parent) {
- if (parent === null) {
- return null;
- } else if (this.tableLabel.has(parent)) {
+ if (parent === null) return null;
+ else if (this.tableLabel.has(parent)) {
const parentNode = this.tableLabel.get(parent);
return parentNode[parentNode.length - 1];
- } else {
- return null;
- }
+ } else return null;
}
/**
*
@@ -85003,8 +78707,7 @@ var require_time_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
[kAddNode](parent, label, start) {
const parentNode = this[kGetParent](parent);
- const isRoot = parentNode === null;
- if (isRoot) {
+ if (parentNode === null) {
this.root = {
parent: null,
id: "root",
@@ -85090,24 +78793,12 @@ var require_time_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = { TimeTree };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/debug.js
var require_debug$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { debuglog } = __require("node:util");
- /**
- * @callback DebugLogger
- * @param {string} msg
- * @param {...unknown} param
- * @returns {void}
- */
- /**
- * @type {DebugLogger}
- */
- const debug = debuglog("avvio");
- module.exports = { debug };
+ module.exports = { debug: debuglog("avvio") };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/create-promise.js
var require_create_promise = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85147,7 +78838,6 @@ var require_create_promise = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
module.exports = { createPromise };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/get-plugin-name.js
var require_get_plugin_name = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85159,21 +78849,13 @@ var require_get_plugin_name = /* @__PURE__ */ __commonJSMin(((exports, module) =
* @returns {string}
*/
function getPluginName(plugin, options) {
- if (plugin[kPluginMeta] && plugin[kPluginMeta].name) {
- return plugin[kPluginMeta].name;
- }
- if (options && options.name) {
- return options.name;
- }
- if (plugin.name) {
- return plugin.name;
- } else {
- return plugin.toString().split("\n").slice(0, 2).map((s) => s.trim()).join(" -- ");
- }
+ if (plugin[kPluginMeta] && plugin[kPluginMeta].name) return plugin[kPluginMeta].name;
+ if (options && options.name) return options.name;
+ if (plugin.name) return plugin.name;
+ else return plugin.toString().split("\n").slice(0, 2).map((s) => s.trim()).join(" -- ");
}
module.exports = { getPluginName };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/is-promise-like.js
var require_is_promise_like = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85186,7 +78868,6 @@ var require_is_promise_like = /* @__PURE__ */ __commonJSMin(((exports, module) =
}
module.exports = { isPromiseLike };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/plugin.js
var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85265,15 +78946,10 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
this._error = execErr;
- if (execErr) {
- debug("exec errored", name);
- } else {
- debug("exec completed", name);
- }
+ if (execErr) debug("exec errored", name);
+ else debug("exec completed", name);
completed = true;
- if (timer) {
- clearTimeout(timer);
- }
+ if (timer) clearTimeout(timer);
callback(execErr);
};
if (this.timeout > 0) {
@@ -85300,9 +78976,7 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
Plugin.prototype.loadedSoFar = function() {
debug("loadedSoFar", this.name);
- if (this.loaded) {
- return Promise.resolve();
- }
+ if (this.loaded) return Promise.resolve();
const setup = () => {
this.server.after((afterErr, callback) => {
this._error = afterErr;
@@ -85325,14 +78999,9 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (!this._promise) {
this._promise = createPromise();
res = this._promise.promise;
- if (!this.server) {
- this.on("start", setup);
- } else {
- setup();
- }
- } else {
- res = Promise.resolve();
- }
+ if (!this.server) this.on("start", setup);
+ else setup();
+ } else res = Promise.resolve();
return res;
};
/**
@@ -85364,9 +79033,7 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Plugin.prototype.finish = function(err, callback) {
debug("finish", this.name, err);
const done = () => {
- if (this.loaded) {
- return;
- }
+ if (this.loaded) return;
debug("loaded", this.name);
this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now());
this.loaded = true;
@@ -85382,19 +79049,16 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
const check = () => {
debug("check", this.name, this.queue.length(), this.queue.running(), this._promise);
- if (this.queue.length() === 0 && this.queue.running() === 0) {
- if (this._promise) {
- const wrap = () => {
- debug("wrap");
- queueMicrotask(check);
- };
- this._promise.resolve();
- this._promise.promise.then(wrap, wrap);
- this._promise = null;
- } else {
- done();
- }
- } else {
+ if (this.queue.length() === 0 && this.queue.running() === 0) if (this._promise) {
+ const wrap = () => {
+ debug("wrap");
+ queueMicrotask(check);
+ };
+ this._promise.resolve();
+ this._promise.promise.then(wrap, wrap);
+ this._promise = null;
+ } else done();
+ else {
debug("delayed", this.name);
this.queue.drain = () => {
debug("drain", this.name);
@@ -85409,7 +79073,6 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function noop() {}
module.exports = { Plugin };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/validate-plugin.js
var require_validate_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85421,19 +79084,12 @@ var require_validate_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) =
* @returns {asserts plugin is Function|PromiseLike}
*/
function validatePlugin(maybePlugin) {
- if (!(maybePlugin && (typeof maybePlugin === "function" || typeof maybePlugin.then === "function"))) {
- if (Array.isArray(maybePlugin)) {
- throw new AVV_ERR_PLUGIN_NOT_VALID("array");
- } else if (maybePlugin === null) {
- throw new AVV_ERR_PLUGIN_NOT_VALID("null");
- } else {
- throw new AVV_ERR_PLUGIN_NOT_VALID(typeof maybePlugin);
- }
- }
+ if (!(maybePlugin && (typeof maybePlugin === "function" || typeof maybePlugin.then === "function"))) if (Array.isArray(maybePlugin)) throw new AVV_ERR_PLUGIN_NOT_VALID("array");
+ else if (maybePlugin === null) throw new AVV_ERR_PLUGIN_NOT_VALID("null");
+ else throw new AVV_ERR_PLUGIN_NOT_VALID(typeof maybePlugin);
}
module.exports = { validatePlugin };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/is-bundled-or-typescript-plugin.js
var require_is_bundled_or_typescript_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85451,7 +79107,6 @@ var require_is_bundled_or_typescript_plugin = /* @__PURE__ */ __commonJSMin(((ex
}
module.exports = { isBundledOrTypescriptPlugin };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/thenify.js
var require_thenify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85487,8 +79142,7 @@ var require_thenify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
debug("thenify");
return (resolve, reject) => {
- const p = this._loadRegistered();
- return p.then(() => {
+ return this._loadRegistered().then(() => {
this[kThenifyDoNotWrap] = true;
return resolve(this._server);
}, reject);
@@ -85496,7 +79150,6 @@ var require_thenify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = { thenify };
}));
-
//#endregion
//#region ../node_modules/avvio/lib/execute-with-thenable.js
var require_execute_with_thenable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85514,15 +79167,11 @@ var require_execute_with_thenable = /* @__PURE__ */ __commonJSMin(((exports, mod
*/
function executeWithThenable(func, args, callback) {
const result = func.apply(func, args);
- if (isPromiseLike(result) && !result[kAvvio]) {
- result.then(() => process.nextTick(callback), (error) => process.nextTick(callback, error));
- } else if (callback) {
- process.nextTick(callback);
- }
+ if (isPromiseLike(result) && !result[kAvvio]) result.then(() => process.nextTick(callback), (error) => process.nextTick(callback, error));
+ else if (callback) process.nextTick(callback);
}
module.exports = { executeWithThenable };
}));
-
//#endregion
//#region ../node_modules/avvio/boot.js
var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -85553,14 +79202,10 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
opts.autostart = opts.autostart !== false;
opts.timeout = Number(opts.timeout) || 0;
opts.expose = opts.expose || {};
- if (!new.target) {
- return new Boot(server, opts, done);
- }
+ if (!new.target) return new Boot(server, opts, done);
this._server = server || this;
this._opts = opts;
- if (server) {
- this._expose();
- }
+ if (server) this._expose();
/**
* @type {Array}
*/
@@ -85568,9 +79213,7 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._error = null;
this._lastUsed = null;
this.setMaxListeners(0);
- if (done) {
- this.once("start", done);
- }
+ if (done) this.once("start", done);
this.started = false;
this.booted = false;
this.pluginTree = new TimeTree();
@@ -85603,12 +79246,8 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (err) {
this._error = err;
- if (this._readyQ.length() === 0) {
- throw err;
- }
- } else {
- this.booted = true;
- }
+ if (this._readyQ.length() === 0) throw err;
+ } else this.booted = true;
this._readyQ.resume();
});
}
@@ -85628,25 +79267,16 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
Boot.prototype._loadRegistered = function() {
const plugin = this._current[0];
- const weNeedToStart = !this.started && !this.booted;
- if (weNeedToStart) {
- process.nextTick(() => this._root.queue.resume());
- }
- if (!plugin) {
- return Promise.resolve();
- }
+ if (!this.started && !this.booted) process.nextTick(() => this._root.queue.resume());
+ if (!plugin) return Promise.resolve();
return plugin.loadedSoFar();
};
Object.defineProperty(Boot.prototype, "then", { get: thenify });
Boot.prototype._addPlugin = function(pluginFn, opts, isAfter) {
- if (isBundledOrTypescriptPlugin(pluginFn)) {
- pluginFn = pluginFn.default;
- }
+ if (isBundledOrTypescriptPlugin(pluginFn)) pluginFn = pluginFn.default;
validatePlugin(pluginFn);
opts = opts || {};
- if (this.booted) {
- throw new AVV_ERR_ROOT_PLG_BOOTED();
- }
+ if (this.booted) throw new AVV_ERR_ROOT_PLG_BOOTED();
const current = this._current[0];
let timeout = this._opts.timeout;
if (!current.loaded && current.timeout > 0) {
@@ -85655,9 +79285,7 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
const plugin = new Plugin(fastq(this, this._loadPluginNextTick, 1), pluginFn, opts, isAfter, timeout);
this._trackPluginLoading(plugin);
- if (current.loaded) {
- throw new Error(plugin.name, current.name);
- }
+ if (current.loaded) throw new Error(plugin.name, current.name);
current.enqueue(plugin, (err) => {
err && (this._error = err);
});
@@ -85667,65 +79295,43 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const instance = this;
const server = instance._server;
const { use: useKey = "use", after: afterKey = "after", ready: readyKey = "ready", onClose: onCloseKey = "onClose", close: closeKey = "close" } = this._opts.expose;
- if (server[useKey]) {
- throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(useKey, "use");
- }
+ if (server[useKey]) throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(useKey, "use");
server[useKey] = function(fn, opts) {
instance.use(fn, opts);
return this;
};
- if (server[afterKey]) {
- throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(afterKey, "after");
- }
+ if (server[afterKey]) throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(afterKey, "after");
server[afterKey] = function(func) {
- if (typeof func !== "function") {
- return instance._loadRegistered();
- }
+ if (typeof func !== "function") return instance._loadRegistered();
instance.after(encapsulateThreeParam(func, this));
return this;
};
- if (server[readyKey]) {
- throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(readyKey, "ready");
- }
+ if (server[readyKey]) throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(readyKey, "ready");
server[readyKey] = function(func) {
- if (func && typeof func !== "function") {
- throw new AVV_ERR_CALLBACK_NOT_FN(readyKey, typeof func);
- }
- return instance.ready(func ? encapsulateThreeParam(func, this) : undefined);
+ if (func && typeof func !== "function") throw new AVV_ERR_CALLBACK_NOT_FN(readyKey, typeof func);
+ return instance.ready(func ? encapsulateThreeParam(func, this) : void 0);
};
- if (server[onCloseKey]) {
- throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(onCloseKey, "onClose");
- }
+ if (server[onCloseKey]) throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(onCloseKey, "onClose");
server[onCloseKey] = function(func) {
- if (typeof func !== "function") {
- throw new AVV_ERR_CALLBACK_NOT_FN(onCloseKey, typeof func);
- }
+ if (typeof func !== "function") throw new AVV_ERR_CALLBACK_NOT_FN(onCloseKey, typeof func);
instance.onClose(encapsulateTwoParam(func, this));
return this;
};
- if (server[closeKey]) {
- throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(closeKey, "close");
- }
+ if (server[closeKey]) throw new AVV_ERR_EXPOSE_ALREADY_DEFINED(closeKey, "close");
server[closeKey] = function(func) {
- if (func && typeof func !== "function") {
- throw new AVV_ERR_CALLBACK_NOT_FN(closeKey, typeof func);
- }
+ if (func && typeof func !== "function") throw new AVV_ERR_CALLBACK_NOT_FN(closeKey, typeof func);
if (func) {
instance.close(encapsulateThreeParam(func, this));
return this;
}
return instance.close();
};
- if (server.then) {
- throw new AVV_ERR_ATTRIBUTE_ALREADY_DEFINED("then");
- }
+ if (server.then) throw new AVV_ERR_ATTRIBUTE_ALREADY_DEFINED("then");
Object.defineProperty(server, "then", { get: thenify.bind(instance) });
server[kAvvio] = true;
};
Boot.prototype.after = function(func) {
- if (!func) {
- return this._loadRegistered();
- }
+ if (!func) return this._loadRegistered();
this._addPlugin(_after.bind(this), {}, true);
function _after(s, opts, done) {
callWithCbOrNextTick.call(this, func, done);
@@ -85733,9 +79339,7 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
};
Boot.prototype.onClose = function(func) {
- if (typeof func !== "function") {
- throw new AVV_ERR_CALLBACK_NOT_FN("onClose", typeof func);
- }
+ if (typeof func !== "function") throw new AVV_ERR_CALLBACK_NOT_FN("onClose", typeof func);
func[kIsOnCloseHandler] = true;
this._closeQ.unshift(func, (err) => {
err && (this._error = err);
@@ -85745,19 +79349,13 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Boot.prototype.close = function(func) {
let promise;
if (func) {
- if (typeof func !== "function") {
- throw new AVV_ERR_CALLBACK_NOT_FN("close", typeof func);
- }
- } else {
- promise = new Promise(function(resolve, reject) {
- func = function(err) {
- if (err) {
- return reject(err);
- }
- resolve();
- };
- });
- }
+ if (typeof func !== "function") throw new AVV_ERR_CALLBACK_NOT_FN("close", typeof func);
+ } else promise = new Promise(function(resolve, reject) {
+ func = function(err) {
+ if (err) return reject(err);
+ resolve();
+ };
+ });
this.ready(() => {
this._error = null;
this._closeQ.push(func);
@@ -85767,9 +79365,7 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
Boot.prototype.ready = function(func) {
if (func) {
- if (typeof func !== "function") {
- throw new AVV_ERR_CALLBACK_NOT_FN("ready", typeof func);
- }
+ if (typeof func !== "function") throw new AVV_ERR_CALLBACK_NOT_FN("ready", typeof func);
this._readyQ.push(func);
queueMicrotask(this.start.bind(this));
return;
@@ -85785,11 +79381,8 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
const relativeContext = this._current[0].server;
function readyPromiseCB(err, context, done) {
- if (err) {
- reject(err);
- } else {
- resolve(relativeContext);
- }
+ if (err) reject(err);
+ else resolve(relativeContext);
process.nextTick(done);
}
});
@@ -85827,9 +79420,7 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const instance = this;
if (isPromiseLike(plugin.func)) {
plugin.func.then((fn) => {
- if (typeof fn.default === "function") {
- fn = fn.default;
- }
+ if (typeof fn.default === "function") fn = fn.default;
plugin.func = fn;
this._loadPlugin(plugin, callback);
}, callback);
@@ -85843,13 +79434,11 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
let server = last && last.server || instance._server;
- if (!plugin.isAfter) {
- try {
- server = instance.override(server, plugin.func, plugin.options);
- } catch (overrideErr) {
- debug("override errored", plugin.name);
- return execCallback(overrideErr);
- }
+ if (!plugin.isAfter) try {
+ server = instance.override(server, plugin.func, plugin.options);
+ } catch (overrideErr) {
+ debug("override errored", plugin.name);
+ return execCallback(overrideErr);
}
plugin.exec(server, execCallback);
function execCallback(err) {
@@ -85874,23 +79463,15 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (func.length === 0) {
this._error = err;
executeWithThenable(func, [], cb);
- } else if (func.length === 1) {
- executeWithThenable(func, [err], cb);
- } else {
- if (this._opts.timeout === 0) {
- const wrapCb = (err) => {
- this._error = err;
- cb(this._error);
- };
- if (func.length === 2) {
- func(err, wrapCb);
- } else {
- func(err, context, wrapCb);
- }
- } else {
- timeoutCall.call(this, func, err, context, cb);
- }
- }
+ } else if (func.length === 1) executeWithThenable(func, [err], cb);
+ else if (this._opts.timeout === 0) {
+ const wrapCb = (err) => {
+ this._error = err;
+ cb(this._error);
+ };
+ if (func.length === 2) func(err, wrapCb);
+ else func(err, context, wrapCb);
+ } else timeoutCall.call(this, func, err, context, cb);
}
function timeoutCall(func, rootErr, context, cb) {
const name = func.unwrappedName ?? func.name;
@@ -85903,17 +79484,14 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._error = toutErr;
cb(toutErr);
}, this._opts.timeout);
- if (func.length === 2) {
- func(rootErr, timeoutCb.bind(this));
- } else {
- func(rootErr, context, timeoutCb.bind(this));
- }
+ if (func.length === 2) func(rootErr, timeoutCb.bind(this));
+ else func(rootErr, context, timeoutCb.bind(this));
function timeoutCb(err) {
if (timer) {
clearTimeout(timer);
this._error = err;
cb(this._error);
- } else {}
+ }
}
}
function closeWithCbOrNextTick(func, cb) {
@@ -85921,30 +79499,16 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const isOnCloseHandler = func[kIsOnCloseHandler];
if (func.length === 0 || func.length === 1) {
let promise;
- if (isOnCloseHandler) {
- promise = func(context);
- } else {
- promise = func(this._error);
- }
+ if (isOnCloseHandler) promise = func(context);
+ else promise = func(this._error);
if (promise && typeof promise.then === "function") {
debug("resolving close/onClose promise");
promise.then(() => process.nextTick(cb), (e) => process.nextTick(cb, e));
- } else {
- process.nextTick(cb);
- }
- } else if (func.length === 2) {
- if (isOnCloseHandler) {
- func(context, cb);
- } else {
- func(this._error, cb);
- }
- } else {
- if (isOnCloseHandler) {
- func(context, cb);
- } else {
- func(this._error, context, cb);
- }
- }
+ } else process.nextTick(cb);
+ } else if (func.length === 2) if (isOnCloseHandler) func(context, cb);
+ else func(this._error, cb);
+ else if (isOnCloseHandler) func(context, cb);
+ else func(this._error, context, cb);
}
function encapsulateTwoParam(func, that) {
return _encapsulateTwoParam.bind(that);
@@ -85952,25 +79516,17 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let res;
if (func.length === 0) {
res = func();
- if (res && res.then) {
- res.then(function() {
- process.nextTick(cb);
- }, cb);
- } else {
+ if (res && res.then) res.then(function() {
process.nextTick(cb);
- }
+ }, cb);
+ else process.nextTick(cb);
} else if (func.length === 1) {
res = func(this);
- if (res && res.then) {
- res.then(function() {
- process.nextTick(cb);
- }, cb);
- } else {
+ if (res && res.then) res.then(function() {
process.nextTick(cb);
- }
- } else {
- func(this, cb);
- }
+ }, cb);
+ else process.nextTick(cb);
+ } else func(this, cb);
}
}
function encapsulateThreeParam(func, that) {
@@ -85979,31 +79535,21 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return wrapped;
function _encapsulateThreeParam(err, cb) {
let res;
- if (!func) {
- process.nextTick(cb);
- } else if (func.length === 0) {
+ if (!func) process.nextTick(cb);
+ else if (func.length === 0) {
res = func();
- if (res && res.then) {
- res.then(function() {
- process.nextTick(cb, err);
- }, cb);
- } else {
+ if (res && res.then) res.then(function() {
process.nextTick(cb, err);
- }
+ }, cb);
+ else process.nextTick(cb, err);
} else if (func.length === 1) {
res = func(err);
- if (res && res.then) {
- res.then(function() {
- process.nextTick(cb);
- }, cb);
- } else {
+ if (res && res.then) res.then(function() {
process.nextTick(cb);
- }
- } else if (func.length === 2) {
- func(err, cb);
- } else {
- func(err, this, cb);
- }
+ }, cb);
+ else process.nextTick(cb);
+ } else if (func.length === 2) func(err, cb);
+ else func(err, this, cb);
}
}
module.exports = Boot;
@@ -86011,11 +79557,10 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return Boot(app, { expose: { use: "load" } });
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/symbols.js
var require_symbols$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- const keys = {
+ module.exports = {
kAvvioBoot: Symbol("fastify.avvioBoot"),
kChildren: Symbol("fastify.children"),
kServerBindings: Symbol("fastify.serverBindings"),
@@ -86071,9 +79616,7 @@ var require_symbols$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
kKeepAliveConnections: Symbol("fastify.keepAliveConnections"),
kRouteByFastify: Symbol("fastify.routeByFastify")
};
- module.exports = keys;
}));
-
//#endregion
//#region ../node_modules/process-warning/index.js
var require_process_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -86135,18 +79678,14 @@ var require_process_warning = /* @__PURE__ */ __commonJSMin(((exports, module) =
if (typeof unlimited !== "boolean") throw new Error("Warning opts.unlimited must be a boolean");
code = code.toUpperCase();
let warningContainer = { [name]: function(a, b, c) {
- if (warning.emitted === true && warning.unlimited !== true) {
- return;
- }
+ if (warning.emitted === true && warning.unlimited !== true) return;
+ warning.emitted = true;
+ process.emitWarning(warning.format(a, b, c), warning.name, warning.code);
+ } };
+ if (unlimited) warningContainer = { [name]: function(a, b, c) {
warning.emitted = true;
process.emitWarning(warning.format(a, b, c), warning.name, warning.code);
} };
- if (unlimited) {
- warningContainer = { [name]: function(a, b, c) {
- warning.emitted = true;
- process.emitWarning(warning.format(a, b, c), warning.name, warning.code);
- } };
- }
const warning = warningContainer[name];
warning.emitted = false;
warning.message = message;
@@ -86161,15 +79700,10 @@ var require_process_warning = /* @__PURE__ */ __commonJSMin(((exports, module) =
*/
warning.format = function(a, b, c) {
let formatted;
- if (a && b && c) {
- formatted = format(message, a, b, c);
- } else if (a && b) {
- formatted = format(message, a, b);
- } else if (a) {
- formatted = format(message, a);
- } else {
- formatted = message;
- }
+ if (a && b && c) formatted = format(message, a, b, c);
+ else if (a && b) formatted = format(message, a, b);
+ else if (a) formatted = format(message, a);
+ else formatted = message;
return formatted;
};
return warning;
@@ -86189,119 +79723,97 @@ var require_process_warning = /* @__PURE__ */ __commonJSMin(((exports, module) =
module.exports.default = out;
module.exports.processWarning = out;
}));
-
//#endregion
//#region ../node_modules/fastify/lib/warnings.js
var require_warnings = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { createDeprecation, createWarning } = require_process_warning();
- const FSTDEP005 = createDeprecation({
- code: "FSTDEP005",
- message: "You are accessing the deprecated \"request.connection\" property. Use \"request.socket\" instead."
- });
- const FSTDEP006 = createDeprecation({
- code: "FSTDEP006",
- message: "You are decorating Request/Reply with a reference type. This reference is shared amongst all requests. Use onRequest hook instead. Property: %s"
- });
- const FSTDEP007 = createDeprecation({
- code: "FSTDEP007",
- message: "You are trying to set a HEAD route using \"exposeHeadRoute\" route flag when a sibling route is already set. See documentation for more info."
- });
- const FSTDEP008 = createDeprecation({
- code: "FSTDEP008",
- message: "You are using route constraints via the route { version: \"...\" } option, use { constraints: { version: \"...\" } } option instead."
- });
- const FSTDEP009 = createDeprecation({
- code: "FSTDEP009",
- message: "You are using a custom route versioning strategy via the server { versioning: \"...\" } option, use { constraints: { version: \"...\" } } option instead."
- });
- const FSTDEP010 = createDeprecation({
- code: "FSTDEP010",
- message: "Modifying the \"reply.sent\" property is deprecated. Use the \"reply.hijack()\" method instead."
- });
- const FSTDEP011 = createDeprecation({
- code: "FSTDEP011",
- message: "Variadic listen method is deprecated. Please use \".listen(optionsObject)\" instead. The variadic signature will be removed in `fastify@5`."
- });
- const FSTDEP012 = createDeprecation({
- code: "FSTDEP012",
- message: "request.context property access is deprecated. Please use \"request.routeOptions.config\" or \"request.routeOptions.schema\" instead for accessing Route settings. The \"request.context\" will be removed in `fastify@5`."
- });
- const FSTDEP013 = createDeprecation({
- code: "FSTDEP013",
- message: "Direct return of \"trailers\" function is deprecated. Please use \"callback\" or \"async-await\" for return value. The support of direct return will removed in `fastify@5`."
- });
- const FSTDEP014 = createDeprecation({
- code: "FSTDEP014",
- message: "You are trying to set/access the default route. This property is deprecated. Please, use setNotFoundHandler if you want to custom a 404 handler or the wildcard (*) to match all routes."
- });
- const FSTDEP015 = createDeprecation({
- code: "FSTDEP015",
- message: "You are accessing the deprecated \"request.routeSchema\" property. Use \"request.routeOptions.schema\" instead. Property \"req.routeSchema\" will be removed in `fastify@5`."
- });
- const FSTDEP016 = createDeprecation({
- code: "FSTDEP016",
- message: "You are accessing the deprecated \"request.routeConfig\" property. Use \"request.routeOptions.config\" instead. Property \"req.routeConfig\" will be removed in `fastify@5`."
- });
- const FSTDEP017 = createDeprecation({
- code: "FSTDEP017",
- message: "You are accessing the deprecated \"request.routerPath\" property. Use \"request.routeOptions.url\" instead. Property \"req.routerPath\" will be removed in `fastify@5`."
- });
- const FSTDEP018 = createDeprecation({
- code: "FSTDEP018",
- message: "You are accessing the deprecated \"request.routerMethod\" property. Use \"request.routeOptions.method\" instead. Property \"req.routerMethod\" will be removed in `fastify@5`."
- });
- const FSTDEP019 = createDeprecation({
- code: "FSTDEP019",
- message: "reply.context property access is deprecated. Please use \"request.routeOptions.config\" or \"request.routeOptions.schema\" instead for accessing Route settings. The \"reply.context\" will be removed in `fastify@5`."
- });
- const FSTDEP020 = createDeprecation({
- code: "FSTDEP020",
- message: "You are using the deprecated \"reply.getResponseTime()\" method. Use the \"reply.elapsedTime\" property instead. Method \"reply.getResponseTime()\" will be removed in `fastify@5`."
- });
- const FSTDEP021 = createDeprecation({
- code: "FSTDEP021",
- message: "The `reply.redirect()` method has a new signature: `reply.redirect(url: string, code?: number)`. It will be enforced in `fastify@v5`"
- });
- const FSTDEP022 = createDeprecation({
- code: "FSTDEP021",
- message: "You are using the deprecated json shorthand schema on route %s. Specify full object schema instead. It will be removed in `fastify@v5`"
- });
- const FSTWRN001 = createWarning({
- name: "FastifyWarning",
- code: "FSTWRN001",
- message: "The %s schema for %s: %s is missing. This may indicate the schema is not well specified.",
- unlimited: true
- });
- const FSTWRN002 = createWarning({
- name: "FastifyWarning",
- code: "FSTWRN002",
- message: "The %s plugin being registered mixes async and callback styles, which will result in an error in `fastify@5`",
- unlimited: true
- });
module.exports = {
- FSTDEP005,
- FSTDEP006,
- FSTDEP007,
- FSTDEP008,
- FSTDEP009,
- FSTDEP010,
- FSTDEP011,
- FSTDEP012,
- FSTDEP013,
- FSTDEP014,
- FSTDEP015,
- FSTDEP016,
- FSTDEP017,
- FSTDEP018,
- FSTDEP019,
- FSTDEP020,
- FSTDEP021,
- FSTDEP022,
- FSTWRN001,
- FSTWRN002
+ FSTDEP005: createDeprecation({
+ code: "FSTDEP005",
+ message: "You are accessing the deprecated \"request.connection\" property. Use \"request.socket\" instead."
+ }),
+ FSTDEP006: createDeprecation({
+ code: "FSTDEP006",
+ message: "You are decorating Request/Reply with a reference type. This reference is shared amongst all requests. Use onRequest hook instead. Property: %s"
+ }),
+ FSTDEP007: createDeprecation({
+ code: "FSTDEP007",
+ message: "You are trying to set a HEAD route using \"exposeHeadRoute\" route flag when a sibling route is already set. See documentation for more info."
+ }),
+ FSTDEP008: createDeprecation({
+ code: "FSTDEP008",
+ message: "You are using route constraints via the route { version: \"...\" } option, use { constraints: { version: \"...\" } } option instead."
+ }),
+ FSTDEP009: createDeprecation({
+ code: "FSTDEP009",
+ message: "You are using a custom route versioning strategy via the server { versioning: \"...\" } option, use { constraints: { version: \"...\" } } option instead."
+ }),
+ FSTDEP010: createDeprecation({
+ code: "FSTDEP010",
+ message: "Modifying the \"reply.sent\" property is deprecated. Use the \"reply.hijack()\" method instead."
+ }),
+ FSTDEP011: createDeprecation({
+ code: "FSTDEP011",
+ message: "Variadic listen method is deprecated. Please use \".listen(optionsObject)\" instead. The variadic signature will be removed in `fastify@5`."
+ }),
+ FSTDEP012: createDeprecation({
+ code: "FSTDEP012",
+ message: "request.context property access is deprecated. Please use \"request.routeOptions.config\" or \"request.routeOptions.schema\" instead for accessing Route settings. The \"request.context\" will be removed in `fastify@5`."
+ }),
+ FSTDEP013: createDeprecation({
+ code: "FSTDEP013",
+ message: "Direct return of \"trailers\" function is deprecated. Please use \"callback\" or \"async-await\" for return value. The support of direct return will removed in `fastify@5`."
+ }),
+ FSTDEP014: createDeprecation({
+ code: "FSTDEP014",
+ message: "You are trying to set/access the default route. This property is deprecated. Please, use setNotFoundHandler if you want to custom a 404 handler or the wildcard (*) to match all routes."
+ }),
+ FSTDEP015: createDeprecation({
+ code: "FSTDEP015",
+ message: "You are accessing the deprecated \"request.routeSchema\" property. Use \"request.routeOptions.schema\" instead. Property \"req.routeSchema\" will be removed in `fastify@5`."
+ }),
+ FSTDEP016: createDeprecation({
+ code: "FSTDEP016",
+ message: "You are accessing the deprecated \"request.routeConfig\" property. Use \"request.routeOptions.config\" instead. Property \"req.routeConfig\" will be removed in `fastify@5`."
+ }),
+ FSTDEP017: createDeprecation({
+ code: "FSTDEP017",
+ message: "You are accessing the deprecated \"request.routerPath\" property. Use \"request.routeOptions.url\" instead. Property \"req.routerPath\" will be removed in `fastify@5`."
+ }),
+ FSTDEP018: createDeprecation({
+ code: "FSTDEP018",
+ message: "You are accessing the deprecated \"request.routerMethod\" property. Use \"request.routeOptions.method\" instead. Property \"req.routerMethod\" will be removed in `fastify@5`."
+ }),
+ FSTDEP019: createDeprecation({
+ code: "FSTDEP019",
+ message: "reply.context property access is deprecated. Please use \"request.routeOptions.config\" or \"request.routeOptions.schema\" instead for accessing Route settings. The \"reply.context\" will be removed in `fastify@5`."
+ }),
+ FSTDEP020: createDeprecation({
+ code: "FSTDEP020",
+ message: "You are using the deprecated \"reply.getResponseTime()\" method. Use the \"reply.elapsedTime\" property instead. Method \"reply.getResponseTime()\" will be removed in `fastify@5`."
+ }),
+ FSTDEP021: createDeprecation({
+ code: "FSTDEP021",
+ message: "The `reply.redirect()` method has a new signature: `reply.redirect(url: string, code?: number)`. It will be enforced in `fastify@v5`"
+ }),
+ FSTDEP022: createDeprecation({
+ code: "FSTDEP021",
+ message: "You are using the deprecated json shorthand schema on route %s. Specify full object schema instead. It will be removed in `fastify@v5`"
+ }),
+ FSTWRN001: createWarning({
+ name: "FastifyWarning",
+ code: "FSTWRN001",
+ message: "The %s schema for %s: %s is missing. This may indicate the schema is not well specified.",
+ unlimited: true
+ }),
+ FSTWRN002: createWarning({
+ name: "FastifyWarning",
+ code: "FSTWRN002",
+ message: "The %s plugin being registered mixes async and callback styles, which will result in an error in `fastify@5`",
+ unlimited: true
+ })
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/errors.js
var require_errors$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -86403,7 +79915,6 @@ var require_errors$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
AVV_ERR_PLUGIN_EXEC_TIMEOUT: codes.FST_ERR_PLUGIN_TIMEOUT
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/hooks.js
var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -86450,9 +79961,7 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Hooks.prototype = Object.create(null);
Hooks.prototype.validate = function(hook, fn) {
if (typeof hook !== "string") throw new FST_ERR_HOOK_INVALID_TYPE();
- if (Array.isArray(this[hook]) === false) {
- throw new FST_ERR_HOOK_NOT_SUPPORTED(hook);
- }
+ if (Array.isArray(this[hook]) === false) throw new FST_ERR_HOOK_NOT_SUPPORTED(hook);
if (typeof fn !== "function") throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(fn));
};
Hooks.prototype.add = function(hook, fn) {
@@ -86485,11 +79994,8 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
next();
function exit(err) {
if (err) {
- if (err.code === "AVV_ERR_READY_TIMEOUT") {
- err = appendStackTrace(err, new FST_ERR_HOOK_TIMEOUT(hookName));
- } else {
- err = AVVIO_ERRORS_MAP[err.code] != null ? appendStackTrace(err, new AVVIO_ERRORS_MAP[err.code](err.message)) : err;
- }
+ if (err.code === "AVV_ERR_READY_TIMEOUT") err = appendStackTrace(err, new FST_ERR_HOOK_TIMEOUT(hookName));
+ else err = AVVIO_ERRORS_MAP[err.code] != null ? appendStackTrace(err, new AVVIO_ERRORS_MAP[err.code](err.message)) : err;
cb(err);
return;
}
@@ -86501,14 +80007,11 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
if (i === hooks.length && c === server[kChildren].length) {
- if (i === 0 && c === 0) {
- exit();
- } else {
- boot(function manageTimeout(err, done) {
- exit(err);
- done(err);
- });
- }
+ if (i === 0 && c === 0) exit();
+ else boot(function manageTimeout(err, done) {
+ exit(err);
+ done(err);
+ });
return;
}
if (i === hooks.length && c < server[kChildren].length) {
@@ -86599,17 +80102,13 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cb(error, request, reply);
return;
}
- if (result && typeof result.then === "function") {
- result.then(handleResolve, handleReject);
- }
+ if (result && typeof result.then === "function") result.then(handleResolve, handleReject);
}
function handleResolve() {
next();
}
function handleReject(err) {
- if (!err) {
- err = new FST_ERR_SEND_UNDEFINED_ERR();
- }
+ if (!err) err = new FST_ERR_SEND_UNDEFINED_ERR();
cb(err, request, reply);
}
next();
@@ -86630,9 +80129,7 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cb(err, request, reply, payload);
return;
}
- if (newPayload !== undefined) {
- payload = newPayload;
- }
+ if (newPayload !== void 0) payload = newPayload;
if (i === functions.length) {
cb(null, request, reply, payload);
return;
@@ -86644,17 +80141,13 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cb(error, request, reply);
return;
}
- if (result && typeof result.then === "function") {
- result.then(handleResolve, handleReject);
- }
+ if (result && typeof result.then === "function") result.then(handleResolve, handleReject);
}
function handleResolve(newPayload) {
next(null, newPayload);
}
function handleReject(err) {
- if (!err) {
- err = new FST_ERR_SEND_UNDEFINED_ERR();
- }
+ if (!err) err = new FST_ERR_SEND_UNDEFINED_ERR();
cb(err, request, reply, payload);
}
next();
@@ -86663,12 +80156,8 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function preParsingHookRunner(functions, request, reply, cb) {
let i = 0;
function next(err, newPayload) {
- if (reply.sent) {
- return;
- }
- if (newPayload !== undefined) {
- request[kRequestPayloadStream] = newPayload;
- }
+ if (reply.sent) return;
+ if (newPayload !== void 0) request[kRequestPayloadStream] = newPayload;
if (err || i === functions.length) {
cb(err, request, reply);
return;
@@ -86680,17 +80169,13 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cb(error, request, reply);
return;
}
- if (result && typeof result.then === "function") {
- result.then(handleResolve, handleReject);
- }
+ if (result && typeof result.then === "function") result.then(handleResolve, handleReject);
}
function handleResolve(newPayload) {
next(null, newPayload);
}
function handleReject(err) {
- if (!err) {
- err = new FST_ERR_SEND_UNDEFINED_ERR();
- }
+ if (!err) err = new FST_ERR_SEND_UNDEFINED_ERR();
cb(err, request, reply);
}
next();
@@ -86709,23 +80194,19 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cb(error, request);
return;
}
- if (result && typeof result.then === "function") {
- result.then(handleResolve, handleReject);
- }
+ if (result && typeof result.then === "function") result.then(handleResolve, handleReject);
}
function handleResolve() {
next();
}
function handleReject(err) {
- if (!err) {
- err = new FST_ERR_SEND_UNDEFINED_ERR();
- }
+ if (!err) err = new FST_ERR_SEND_UNDEFINED_ERR();
cb(err, request);
}
next();
}
function hookIterator(fn, request, reply, next) {
- if (reply.sent === true) return undefined;
+ if (reply.sent === true) return void 0;
return fn(request, reply, next);
}
module.exports = {
@@ -86748,7 +80229,6 @@ var require_hooks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
supportedHooks
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/server.js
var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -86769,9 +80249,8 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function listen(listenOptions, ...args) {
let cb = args.slice(-1).pop();
const firstArgType = Object.prototype.toString.call(arguments[0]);
- if (arguments.length === 0) {
- listenOptions = normalizeListenArgs([]);
- } else if (arguments.length > 0 && firstArgType !== "[object Object]" && firstArgType !== "[object Function]") {
+ if (arguments.length === 0) listenOptions = normalizeListenArgs([]);
+ else if (arguments.length > 0 && firstArgType !== "[object Object]" && firstArgType !== "[object Function]") {
FSTDEP011();
listenOptions = normalizeListenArgs(Array.from(arguments));
cb = listenOptions.cb;
@@ -86779,16 +80258,11 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
FSTDEP011();
const hostPath = listenOptions.path ? [listenOptions.path] : [listenOptions.port ?? 0, listenOptions.host ?? "localhost"];
Object.assign(listenOptions, normalizeListenArgs([...hostPath, ...args]));
- } else {
- listenOptions.cb = cb;
- }
+ } else listenOptions.cb = cb;
if (listenOptions.signal) {
- if (typeof listenOptions.signal.on !== "function" && typeof listenOptions.signal.addEventListener !== "function") {
- throw new FST_ERR_LISTEN_OPTIONS_INVALID("Invalid options.signal");
- }
- if (listenOptions.signal.aborted) {
- this.close();
- } else {
+ if (typeof listenOptions.signal.on !== "function" && typeof listenOptions.signal.addEventListener !== "function") throw new FST_ERR_LISTEN_OPTIONS_INVALID("Invalid options.signal");
+ if (listenOptions.signal.aborted) this.close();
+ else {
const onAborted = () => {
this.close();
};
@@ -86796,55 +80270,44 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
let host;
- if (listenOptions.path == null) {
- host = listenOptions.host ?? "localhost";
- } else {
- host = listenOptions.host;
- }
- if (Object.prototype.hasOwnProperty.call(listenOptions, "host") === false || listenOptions.host == null) {
- listenOptions.host = host;
- }
- if (host === "localhost") {
- listenOptions.cb = (err, address) => {
- if (err) {
- cb(err, address);
- return;
- }
- multipleBindings.call(this, server, httpHandler, options, listenOptions, () => {
- this[kState].listening = true;
- cb(null, address);
- onListenHookRunner(this);
- });
- };
- } else {
- listenOptions.cb = (err, address) => {
- if (err) {
- cb(err, address);
- return;
- }
+ if (listenOptions.path == null) host = listenOptions.host ?? "localhost";
+ else host = listenOptions.host;
+ if (Object.prototype.hasOwnProperty.call(listenOptions, "host") === false || listenOptions.host == null) listenOptions.host = host;
+ if (host === "localhost") listenOptions.cb = (err, address) => {
+ if (err) {
+ cb(err, address);
+ return;
+ }
+ multipleBindings.call(this, server, httpHandler, options, listenOptions, () => {
this[kState].listening = true;
cb(null, address);
onListenHookRunner(this);
- };
- }
- if (cb === undefined) {
- const listening = listenPromise.call(this, server, listenOptions);
- /* istanbul ignore else */
- return listening.then((address) => {
- return new Promise((resolve, reject) => {
- if (host === "localhost") {
- multipleBindings.call(this, server, httpHandler, options, listenOptions, () => {
- this[kState].listening = true;
- resolve(address);
- onListenHookRunner(this);
- });
- } else {
- resolve(address);
- onListenHookRunner(this);
- }
+ });
+ };
+ else listenOptions.cb = (err, address) => {
+ if (err) {
+ cb(err, address);
+ return;
+ }
+ this[kState].listening = true;
+ cb(null, address);
+ onListenHookRunner(this);
+ };
+ if (cb === void 0)
+ /* istanbul ignore else */
+ return listenPromise.call(this, server, listenOptions).then((address) => {
+ return new Promise((resolve, reject) => {
+ if (host === "localhost") multipleBindings.call(this, server, httpHandler, options, listenOptions, () => {
+ this[kState].listening = true;
+ resolve(address);
+ onListenHookRunner(this);
});
+ else {
+ resolve(address);
+ onListenHookRunner(this);
+ }
});
- }
+ });
this.ready(listenCallback.call(this, server, listenOptions));
}
return {
@@ -86864,39 +80327,30 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let bound = 0;
if (!isMainServerListening) {
const primaryAddress = mainServer.address();
- for (const adr of addresses) {
- if (adr.address !== primaryAddress.address) {
- binding++;
- const secondaryOpts = Object.assign({}, listenOptions, {
- host: adr.address,
- port: primaryAddress.port,
- cb: (_ignoreErr) => {
- bound++;
- /* istanbul ignore next: the else won't be taken unless listening fails */
- if (!_ignoreErr) {
- this[kServerBindings].push(secondaryServer);
- }
- if (bound === binding) {
- onListen();
- }
- }
- });
- const secondaryServer = getServerInstance(serverOpts, httpHandler);
- const closeSecondary = () => {
- secondaryServer.close(() => {});
- if (serverOpts.forceCloseConnections === "idle") {
- secondaryServer.closeIdleConnections();
- } else if (typeof secondaryServer.closeAllConnections === "function" && serverOpts.forceCloseConnections) {
- secondaryServer.closeAllConnections();
- }
- };
- secondaryServer.on("upgrade", mainServer.emit.bind(mainServer, "upgrade"));
- mainServer.on("unref", closeSecondary);
- mainServer.on("close", closeSecondary);
- mainServer.on("error", closeSecondary);
- this[kState].listening = false;
- listenCallback.call(this, secondaryServer, secondaryOpts)();
- }
+ for (const adr of addresses) if (adr.address !== primaryAddress.address) {
+ binding++;
+ const secondaryOpts = Object.assign({}, listenOptions, {
+ host: adr.address,
+ port: primaryAddress.port,
+ cb: (_ignoreErr) => {
+ bound++;
+ /* istanbul ignore next: the else won't be taken unless listening fails */
+ if (!_ignoreErr) this[kServerBindings].push(secondaryServer);
+ if (bound === binding) onListen();
+ }
+ });
+ const secondaryServer = getServerInstance(serverOpts, httpHandler);
+ const closeSecondary = () => {
+ secondaryServer.close(() => {});
+ if (serverOpts.forceCloseConnections === "idle") secondaryServer.closeIdleConnections();
+ else if (typeof secondaryServer.closeAllConnections === "function" && serverOpts.forceCloseConnections) secondaryServer.closeAllConnections();
+ };
+ secondaryServer.on("upgrade", mainServer.emit.bind(mainServer, "upgrade"));
+ mainServer.on("unref", closeSecondary);
+ mainServer.on("close", closeSecondary);
+ mainServer.on("error", closeSecondary);
+ this[kState].listening = false;
+ listenCallback.call(this, secondaryServer, secondaryOpts)();
}
}
if (binding === 0) {
@@ -86925,11 +80379,8 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
return (err) => {
if (err != null) return listenOptions.cb(err);
- if (this[kState].listening && this[kState].closing) {
- return listenOptions.cb(new FST_ERR_REOPENED_CLOSE_SERVER(), null);
- } else if (this[kState].listening) {
- return listenOptions.cb(new FST_ERR_REOPENED_SERVER(), null);
- }
+ if (this[kState].listening && this[kState].closing) return listenOptions.cb(new FST_ERR_REOPENED_CLOSE_SERVER(), null);
+ else if (this[kState].listening) return listenOptions.cb(new FST_ERR_REOPENED_SERVER(), null);
server.once("error", wrap);
if (!this[kState].closing) {
server.once("listening", wrap);
@@ -86939,11 +80390,8 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
}
function listenPromise(server, listenOptions) {
- if (this[kState].listening && this[kState].closing) {
- return Promise.reject(new FST_ERR_REOPENED_CLOSE_SERVER());
- } else if (this[kState].listening) {
- return Promise.reject(new FST_ERR_REOPENED_SERVER());
- }
+ if (this[kState].listening && this[kState].closing) return Promise.reject(new FST_ERR_REOPENED_CLOSE_SERVER());
+ else if (this[kState].listening) return Promise.reject(new FST_ERR_REOPENED_SERVER());
return this.ready().then(() => {
let errEventHandler;
let listeningEventHandler;
@@ -86992,10 +80440,8 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function compileValidateHTTPVersion(options) {
let bypass = false;
- const map = new Map();
- if (options.serverFactory) {
- bypass = true;
- }
+ const map = /* @__PURE__ */ new Map();
+ if (options.serverFactory) bypass = true;
if (options.http2) {
map.set("2.0", true);
if (options.https && options.https.allowHTTP1 === true) {
@@ -87013,51 +80459,37 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function getServerInstance(options, httpHandler) {
let server = null;
const httpsOptions = options.https === true ? {} : options.https;
- if (options.serverFactory) {
- server = options.serverFactory(httpHandler, options);
- } else if (options.http2) {
- if (typeof httpsOptions === "object") {
- server = http2().createSecureServer(httpsOptions, httpHandler);
- } else {
- server = http2().createServer(httpHandler);
- }
+ if (options.serverFactory) server = options.serverFactory(httpHandler, options);
+ else if (options.http2) {
+ if (typeof httpsOptions === "object") server = http2().createSecureServer(httpsOptions, httpHandler);
+ else server = http2().createServer(httpHandler);
server.on("session", sessionTimeout(options.http2SessionTimeout));
} else {
- if (httpsOptions) {
- server = https$2.createServer(httpsOptions, httpHandler);
- } else {
- server = http$6.createServer(options.http, httpHandler);
- }
+ if (httpsOptions) server = https$2.createServer(httpsOptions, httpHandler);
+ else server = http$6.createServer(options.http, httpHandler);
server.keepAliveTimeout = options.keepAliveTimeout;
server.requestTimeout = options.requestTimeout;
- if (options.maxRequestsPerSocket > 0) {
- server.maxRequestsPerSocket = options.maxRequestsPerSocket;
- }
- }
- if (!options.serverFactory) {
- server.setTimeout(options.connectionTimeout);
+ if (options.maxRequestsPerSocket > 0) server.maxRequestsPerSocket = options.maxRequestsPerSocket;
}
+ if (!options.serverFactory) server.setTimeout(options.connectionTimeout);
return server;
}
function normalizeListenArgs(args) {
- if (args.length === 0) {
- return {
- port: 0,
- host: "localhost"
- };
- }
- const cb = typeof args[args.length - 1] === "function" ? args.pop() : undefined;
- const options = { cb };
+ if (args.length === 0) return {
+ port: 0,
+ host: "localhost"
+ };
+ const options = { cb: typeof args[args.length - 1] === "function" ? args.pop() : void 0 };
const firstArg = args[0];
const argsLength = args.length;
const lastArg = args[argsLength - 1];
if (typeof firstArg === "string" && isNaN(firstArg)) {
options.path = firstArg;
- options.backlog = argsLength > 1 ? lastArg : undefined;
+ options.backlog = argsLength > 1 ? lastArg : void 0;
} else {
options.port = argsLength >= 1 && Number.isInteger(firstArg) ? firstArg : normalizePort(firstArg);
options.host = argsLength >= 2 && args[1] ? args[1] : "localhost";
- options.backlog = argsLength >= 3 ? args[2] : undefined;
+ options.backlog = argsLength >= 3 ? args[2] : void 0;
}
return options;
}
@@ -87069,13 +80501,8 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let address = server.address();
const isUnixSocket = typeof address === "string";
/* istanbul ignore next */
- if (!isUnixSocket) {
- if (address.address.indexOf(":") === -1) {
- address = address.address + ":" + address.port;
- } else {
- address = "[" + address.address + "]:" + address.port;
- }
- }
+ if (!isUnixSocket) if (address.address.indexOf(":") === -1) address = address.address + ":" + address.port;
+ else address = "[" + address.address + "]:" + address.port;
/* istanbul ignore next */
address = (isUnixSocket ? "" : "http" + (this[kOptions].https ? "s" : "") + "://") + address;
const serverListeningText = listenTextResolver(address);
@@ -87098,7 +80525,6 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.close();
}
}));
-
//#endregion
//#region ../node_modules/fastify/lib/validation.js
var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -87107,16 +80533,12 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX } = require_errors$3();
const { FSTWRN001 } = require_warnings();
function compileSchemasForSerialization(context, compile) {
- if (!context.schema || !context.schema.response) {
- return;
- }
+ if (!context.schema || !context.schema.response) return;
const { method, url } = context.config || {};
context[responseSchema] = Object.keys(context.schema.response).reduce(function(acc, statusCode) {
const schema = context.schema.response[statusCode];
statusCode = statusCode.toLowerCase();
- if (!scChecker.exec(statusCode)) {
- throw new FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX();
- }
+ if (!scChecker.exec(statusCode)) throw new FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX();
if (schema.content) {
const contentTypesSchemas = {};
for (const mediaName of Object.keys(schema.content)) {
@@ -87130,39 +80552,32 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
}
acc[statusCode] = contentTypesSchemas;
- } else {
- acc[statusCode] = compile({
- schema,
- url,
- method,
- httpStatus: statusCode
- });
- }
+ } else acc[statusCode] = compile({
+ schema,
+ url,
+ method,
+ httpStatus: statusCode
+ });
return acc;
}, {});
}
function compileSchemasForValidation(context, compile, isCustom) {
const { schema } = context;
- if (!schema) {
- return;
- }
+ if (!schema) return;
const { method, url } = context.config || {};
const headers = schema.headers;
- if (headers && (isCustom || Object.getPrototypeOf(headers) !== Object.prototype)) {
- context[headersSchema] = compile({
- schema: headers,
- method,
- url,
- httpPart: "headers"
- });
- } else if (headers) {
+ if (headers && (isCustom || Object.getPrototypeOf(headers) !== Object.prototype)) context[headersSchema] = compile({
+ schema: headers,
+ method,
+ url,
+ httpPart: "headers"
+ });
+ else if (headers) {
const headersSchemaLowerCase = {};
Object.keys(headers).forEach((k) => {
headersSchemaLowerCase[k] = headers[k];
});
- if (headersSchemaLowerCase.required instanceof Array) {
- headersSchemaLowerCase.required = headersSchemaLowerCase.required.map((h) => h.toLowerCase());
- }
+ if (headersSchemaLowerCase.required instanceof Array) headersSchemaLowerCase.required = headersSchemaLowerCase.required.map((h) => h.toLowerCase());
if (headers.properties) {
headersSchemaLowerCase.properties = {};
Object.keys(headers.properties).forEach((k) => {
@@ -87175,9 +80590,7 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
url,
httpPart: "headers"
});
- } else if (Object.prototype.hasOwnProperty.call(schema, "headers")) {
- FSTWRN001("headers", method, url);
- }
+ } else if (Object.prototype.hasOwnProperty.call(schema, "headers")) FSTWRN001("headers", method, url);
if (schema.body) {
const contentProperty = schema.body.content;
if (contentProperty) {
@@ -87193,48 +80606,36 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
}
context[bodySchema] = contentTypeSchemas;
- } else {
- context[bodySchema] = compile({
- schema: schema.body,
- method,
- url,
- httpPart: "body"
- });
- }
- } else if (Object.prototype.hasOwnProperty.call(schema, "body")) {
- FSTWRN001("body", method, url);
- }
- if (schema.querystring) {
- context[querystringSchema] = compile({
- schema: schema.querystring,
- method,
- url,
- httpPart: "querystring"
- });
- } else if (Object.prototype.hasOwnProperty.call(schema, "querystring")) {
- FSTWRN001("querystring", method, url);
- }
- if (schema.params) {
- context[paramsSchema] = compile({
- schema: schema.params,
+ } else context[bodySchema] = compile({
+ schema: schema.body,
method,
url,
- httpPart: "params"
+ httpPart: "body"
});
- } else if (Object.prototype.hasOwnProperty.call(schema, "params")) {
- FSTWRN001("params", method, url);
- }
+ } else if (Object.prototype.hasOwnProperty.call(schema, "body")) FSTWRN001("body", method, url);
+ if (schema.querystring) context[querystringSchema] = compile({
+ schema: schema.querystring,
+ method,
+ url,
+ httpPart: "querystring"
+ });
+ else if (Object.prototype.hasOwnProperty.call(schema, "querystring")) FSTWRN001("querystring", method, url);
+ if (schema.params) context[paramsSchema] = compile({
+ schema: schema.params,
+ method,
+ url,
+ httpPart: "params"
+ });
+ else if (Object.prototype.hasOwnProperty.call(schema, "params")) FSTWRN001("params", method, url);
}
function validateParam(validatorFunction, request, paramName) {
- const isUndefined = request[paramName] === undefined;
+ const isUndefined = request[paramName] === void 0;
const ret = validatorFunction && validatorFunction(isUndefined ? null : request[paramName]);
- if (ret?.then) {
- return ret.then((res) => {
- return answer(res);
- }).catch((err) => {
- return err;
- });
- }
+ if (ret?.then) return ret.then((res) => {
+ return answer(res);
+ }).catch((err) => {
+ return err;
+ });
return answer(ret);
function answer(ret) {
if (ret === false) return validatorFunction.errors;
@@ -87244,70 +80645,43 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
function validate(context, request, execution) {
- const runExecution = execution === undefined;
+ const runExecution = execution === void 0;
if (runExecution || !execution.skipParams) {
const params = validateParam(context[paramsSchema], request, "params");
- if (params) {
- if (typeof params.then !== "function") {
- return wrapValidationError(params, "params", context.schemaErrorFormatter);
- } else {
- return validateAsyncParams(params, context, request);
- }
- }
+ if (params) if (typeof params.then !== "function") return wrapValidationError(params, "params", context.schemaErrorFormatter);
+ else return validateAsyncParams(params, context, request);
}
if (runExecution || !execution.skipBody) {
let validatorFunction = null;
- if (typeof context[bodySchema] === "function") {
- validatorFunction = context[bodySchema];
- } else if (context[bodySchema]) {
+ if (typeof context[bodySchema] === "function") validatorFunction = context[bodySchema];
+ else if (context[bodySchema]) {
const contentType = getEssenceMediaType(request.headers["content-type"]);
const contentSchema = context[bodySchema][contentType];
- if (contentSchema) {
- validatorFunction = contentSchema;
- }
+ if (contentSchema) validatorFunction = contentSchema;
}
const body = validateParam(validatorFunction, request, "body");
- if (body) {
- if (typeof body.then !== "function") {
- return wrapValidationError(body, "body", context.schemaErrorFormatter);
- } else {
- return validateAsyncBody(body, context, request);
- }
- }
+ if (body) if (typeof body.then !== "function") return wrapValidationError(body, "body", context.schemaErrorFormatter);
+ else return validateAsyncBody(body, context, request);
}
if (runExecution || !execution.skipQuery) {
const query = validateParam(context[querystringSchema], request, "query");
- if (query) {
- if (typeof query.then !== "function") {
- return wrapValidationError(query, "querystring", context.schemaErrorFormatter);
- } else {
- return validateAsyncQuery(query, context, request);
- }
- }
+ if (query) if (typeof query.then !== "function") return wrapValidationError(query, "querystring", context.schemaErrorFormatter);
+ else return validateAsyncQuery(query, context, request);
}
const headers = validateParam(context[headersSchema], request, "headers");
- if (headers) {
- if (typeof headers.then !== "function") {
- return wrapValidationError(headers, "headers", context.schemaErrorFormatter);
- } else {
- return validateAsyncHeaders(headers, context, request);
- }
- }
+ if (headers) if (typeof headers.then !== "function") return wrapValidationError(headers, "headers", context.schemaErrorFormatter);
+ else return validateAsyncHeaders(headers, context, request);
return false;
}
function validateAsyncParams(validatePromise, context, request) {
return validatePromise.then((paramsResult) => {
- if (paramsResult) {
- return wrapValidationError(paramsResult, "params", context.schemaErrorFormatter);
- }
+ if (paramsResult) return wrapValidationError(paramsResult, "params", context.schemaErrorFormatter);
return validate(context, request, { skipParams: true });
});
}
function validateAsyncBody(validatePromise, context, request) {
return validatePromise.then((bodyResult) => {
- if (bodyResult) {
- return wrapValidationError(bodyResult, "body", context.schemaErrorFormatter);
- }
+ if (bodyResult) return wrapValidationError(bodyResult, "body", context.schemaErrorFormatter);
return validate(context, request, {
skipParams: true,
skipBody: true
@@ -87316,9 +80690,7 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function validateAsyncQuery(validatePromise, context, request) {
return validatePromise.then((queryResult) => {
- if (queryResult) {
- return wrapValidationError(queryResult, "querystring", context.schemaErrorFormatter);
- }
+ if (queryResult) return wrapValidationError(queryResult, "querystring", context.schemaErrorFormatter);
return validate(context, request, {
skipParams: true,
skipBody: true,
@@ -87328,9 +80700,7 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function validateAsyncHeaders(validatePromise, context, request) {
return validatePromise.then((headersResult) => {
- if (headersResult) {
- return wrapValidationError(headersResult, "headers", context.schemaErrorFormatter);
- }
+ if (headersResult) return wrapValidationError(headersResult, "headers", context.schemaErrorFormatter);
return false;
});
}
@@ -87370,23 +80740,18 @@ var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
validate
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/wrapThenable.js
var require_wrapThenable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { kReplyIsError, kReplyHijacked } = require_symbols$1();
function wrapThenable(thenable, reply) {
thenable.then(function(payload) {
- if (reply[kReplyHijacked] === true) {
- return;
- }
- if (payload !== undefined || reply.sent === false && reply.raw.headersSent === false && reply.request.raw.aborted === false) {
- try {
- reply.send(payload);
- } catch (err) {
- reply[kReplyIsError] = true;
- reply.send(err);
- }
+ if (reply[kReplyHijacked] === true) return;
+ if (payload !== void 0 || reply.sent === false && reply.raw.headersSent === false && reply.request.raw.aborted === false) try {
+ reply.send(payload);
+ } catch (err) {
+ reply[kReplyIsError] = true;
+ reply.send(err);
}
}, function(err) {
if (reply.sent === true) {
@@ -87403,7 +80768,6 @@ var require_wrapThenable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = wrapThenable;
}));
-
//#endregion
//#region ../node_modules/fastify/lib/handleRequest.js
var require_handleRequest = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -87427,34 +80791,22 @@ var require_handleRequest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
const contentType = headers["content-type"];
if (method === "POST" || method === "PUT" || method === "PATCH" || method === "TRACE" || method === "SEARCH" || method === "PROPFIND" || method === "PROPPATCH" || method === "LOCK" || method === "COPY" || method === "MOVE" || method === "MKCOL" || method === "REPORT" || method === "MKCALENDAR") {
- if (contentType === undefined) {
- if (headers["transfer-encoding"] === undefined && (headers["content-length"] === "0" || headers["content-length"] === undefined)) {
- handler(request, reply);
- } else {
- context.contentTypeParser.run("", handler, request, reply);
- }
- } else {
- context.contentTypeParser.run(contentType, handler, request, reply);
- }
+ if (contentType === void 0) if (headers["transfer-encoding"] === void 0 && (headers["content-length"] === "0" || headers["content-length"] === void 0)) handler(request, reply);
+ else context.contentTypeParser.run("", handler, request, reply);
+ else context.contentTypeParser.run(contentType, handler, request, reply);
return;
}
if (method === "OPTIONS" || method === "DELETE") {
- if (contentType !== undefined && (headers["transfer-encoding"] !== undefined || headers["content-length"] !== undefined)) {
- context.contentTypeParser.run(contentType, handler, request, reply);
- } else {
- handler(request, reply);
- }
+ if (contentType !== void 0 && (headers["transfer-encoding"] !== void 0 || headers["content-length"] !== void 0)) context.contentTypeParser.run(contentType, handler, request, reply);
+ else handler(request, reply);
return;
}
handler(request, reply);
}
function handler(request, reply) {
try {
- if (request[kRouteContext].preValidation !== null) {
- preValidationHookRunner(request[kRouteContext].preValidation, request, reply, preValidationCallback);
- } else {
- preValidationCallback(null, request, reply);
- }
+ if (request[kRouteContext].preValidation !== null) preValidationHookRunner(request[kRouteContext].preValidation, request, reply, preValidationCallback);
+ else preValidationCallback(null, request, reply);
} catch (err) {
preValidationCallback(err, request, reply);
}
@@ -87467,13 +80819,10 @@ var require_handleRequest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return;
}
const validationErr = validateSchema(reply[kRouteContext], request);
- const isAsync = validationErr && typeof validationErr.then === "function" || false;
- if (isAsync) {
+ if (validationErr && typeof validationErr.then === "function" || false) {
const cb = validationCompleted.bind(null, request, reply);
validationErr.then(cb, cb);
- } else {
- validationCompleted(request, reply, validationErr);
- }
+ } else validationCompleted(request, reply, validationErr);
}
function validationCompleted(request, reply, validationErr) {
if (validationErr) {
@@ -87483,11 +80832,8 @@ var require_handleRequest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
reply.request.validationError = validationErr;
}
- if (request[kRouteContext].preHandler !== null) {
- preHandlerHookRunner(request[kRouteContext].preHandler, request, reply, preHandlerCallback);
- } else {
- preHandlerCallback(null, request, reply);
- }
+ if (request[kRouteContext].preHandler !== null) preHandlerHookRunner(request[kRouteContext].preHandler, request, reply, preHandlerCallback);
+ else preHandlerCallback(null, request, reply);
}
function preHandlerCallback(err, request, reply) {
if (reply.sent) return;
@@ -87504,13 +80850,8 @@ var require_handleRequest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
reply.send(err);
return;
}
- if (result !== undefined) {
- if (result !== null && typeof result.then === "function") {
- wrapThenable(result, reply);
- } else {
- reply.send(result);
- }
- }
+ if (result !== void 0) if (result !== null && typeof result.then === "function") wrapThenable(result, reply);
+ else reply.send(result);
}
module.exports = handleRequest;
module.exports[Symbol.for("internals")] = {
@@ -87518,7 +80859,6 @@ var require_handleRequest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
preHandlerCallback
};
}));
-
//#endregion
//#region ../node_modules/abstract-logging/index.js
var require_abstract_logging = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -87535,7 +80875,6 @@ var require_abstract_logging = /* @__PURE__ */ __commonJSMin(((exports, module)
return Object.create(proto);
} });
}));
-
//#endregion
//#region ../node_modules/fastify/lib/logger.js
var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -87549,9 +80888,8 @@ var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { serializersSym } = pino.symbols;
const { FST_ERR_LOG_INVALID_DESTINATION, FST_ERR_LOG_INVALID_LOGGER } = require_errors$3();
function createPinoLogger(opts) {
- if (opts.stream && opts.file) {
- throw new FST_ERR_LOG_INVALID_DESTINATION();
- } else if (opts.file) {
+ if (opts.stream && opts.file) throw new FST_ERR_LOG_INVALID_DESTINATION();
+ else if (opts.file) {
opts.stream = pino.destination(opts.file);
delete opts.file;
}
@@ -87559,17 +80897,13 @@ var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const prevGenReqId = opts.genReqId;
let logger = null;
if (prevLogger) {
- opts.logger = undefined;
- opts.genReqId = undefined;
- if (prevLogger[serializersSym]) {
- opts.serializers = Object.assign({}, opts.serializers, prevLogger[serializersSym]);
- }
+ opts.logger = void 0;
+ opts.genReqId = void 0;
+ if (prevLogger[serializersSym]) opts.serializers = Object.assign({}, opts.serializers, prevLogger[serializersSym]);
logger = prevLogger.child({}, opts);
opts.logger = prevLogger;
opts.genReqId = prevGenReqId;
- } else {
- logger = pino(opts, opts.stream);
- }
+ } else logger = pino(opts, opts.stream);
return logger;
}
const serializers = {
@@ -87580,7 +80914,7 @@ var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
version: req.headers && req.headers["accept-version"],
hostname: req.hostname,
remoteAddress: req.ip,
- remotePort: req.socket ? req.socket.remotePort : undefined
+ remotePort: req.socket ? req.socket.remotePort : void 0
};
},
err: pino.stdSerializers.err,
@@ -87601,33 +80935,27 @@ var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
hasLogger: false
};
}
- if (validateLogger(options.logger)) {
- const logger = createPinoLogger({
+ if (validateLogger(options.logger)) return {
+ logger: createPinoLogger({
logger: options.logger,
serializers: Object.assign({}, serializers, options.logger.serializers)
- });
- return {
- logger,
- hasLogger: true
- };
- }
+ }),
+ hasLogger: true
+ };
const localLoggerOptions = {};
- if (Object.prototype.toString.call(options.logger) === "[object Object]") {
- Reflect.ownKeys(options.logger).forEach((prop) => {
- Object.defineProperty(localLoggerOptions, prop, {
- value: options.logger[prop],
- writable: true,
- enumerable: true,
- configurable: true
- });
+ if (Object.prototype.toString.call(options.logger) === "[object Object]") Reflect.ownKeys(options.logger).forEach((prop) => {
+ Object.defineProperty(localLoggerOptions, prop, {
+ value: options.logger[prop],
+ writable: true,
+ enumerable: true,
+ configurable: true
});
- }
+ });
localLoggerOptions.level = localLoggerOptions.level || "info";
localLoggerOptions.serializers = Object.assign({}, serializers, localLoggerOptions.serializers);
options.logger = localLoggerOptions;
- const logger = createPinoLogger(options.logger);
return {
- logger,
+ logger: createPinoLogger(options.logger),
hasLogger: true
};
}
@@ -87654,13 +80982,9 @@ var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"child"
];
const missingMethods = logger ? methods.filter((method) => !logger[method] || typeof logger[method] !== "function") : methods;
- if (!missingMethods.length) {
- return true;
- } else if (missingMethods.length === methods.length && !strict) {
- return false;
- } else {
- throw FST_ERR_LOG_INVALID_LOGGER(missingMethods.join(","));
- }
+ if (!missingMethods.length) return true;
+ else if (missingMethods.length === methods.length && !strict) return false;
+ else throw FST_ERR_LOG_INVALID_LOGGER(missingMethods.join(","));
}
/**
* Utility for creating a child logger with the appropriate bindings, logger factory
@@ -87674,9 +80998,7 @@ var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function createChildLogger(context, logger, req, reqId, loggerOpts) {
const loggerBindings = { [context.requestIdLogLabel]: reqId };
const child = context.childLoggerFactory.call(context.server, logger, loggerBindings, loggerOpts || {}, req);
- if (context.childLoggerFactory !== defaultChildLoggerFactory) {
- validateLogger(child, true);
- }
+ if (context.childLoggerFactory !== defaultChildLoggerFactory) validateLogger(child, true);
return child;
}
/**
@@ -87695,29 +81017,22 @@ var require_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
now
};
}));
-
//#endregion
//#region ../node_modules/rfdc/index.js
var require_rfdc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = rfdc;
function copyBuffer(cur) {
- if (cur instanceof Buffer) {
- return Buffer.from(cur);
- }
+ if (cur instanceof Buffer) return Buffer.from(cur);
return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
}
function rfdc(opts) {
opts = opts || {};
if (opts.circles) return rfdcCircles(opts);
- const constructorHandlers = new Map();
+ const constructorHandlers = /* @__PURE__ */ new Map();
constructorHandlers.set(Date, (o) => new Date(o));
constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
- if (opts.constructorHandlers) {
- for (const handler of opts.constructorHandlers) {
- constructorHandlers.set(handler[0], handler[1]);
- }
- }
+ if (opts.constructorHandlers) for (const handler of opts.constructorHandlers) constructorHandlers.set(handler[0], handler[1]);
let handler = null;
return opts.proto ? cloneProto : clone;
function cloneArray(a, fn) {
@@ -87726,58 +81041,39 @@ var require_rfdc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (let i = 0; i < keys.length; i++) {
const k = keys[i];
const cur = a[k];
- if (typeof cur !== "object" || cur === null) {
- a2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- a2[k] = handler(cur, fn);
- } else if (ArrayBuffer.isView(cur)) {
- a2[k] = copyBuffer(cur);
- } else {
- a2[k] = fn(cur);
- }
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
+ else a2[k] = fn(cur);
}
return a2;
}
function clone(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, clone);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, clone);
- }
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
const o2 = {};
for (const k in o) {
if (Object.hasOwnProperty.call(o, k) === false) continue;
const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, clone);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
- o2[k] = clone(cur);
- }
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
+ else o2[k] = clone(cur);
}
return o2;
}
function cloneProto(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, cloneProto);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, cloneProto);
- }
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
const o2 = {};
for (const k in o) {
const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, cloneProto);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
- o2[k] = cloneProto(cur);
- }
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
+ else o2[k] = cloneProto(cur);
}
return o2;
}
@@ -87785,15 +81081,11 @@ var require_rfdc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function rfdcCircles(opts) {
const refs = [];
const refsNew = [];
- const constructorHandlers = new Map();
+ const constructorHandlers = /* @__PURE__ */ new Map();
constructorHandlers.set(Date, (o) => new Date(o));
constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
- if (opts.constructorHandlers) {
- for (const handler of opts.constructorHandlers) {
- constructorHandlers.set(handler[0], handler[1]);
- }
- }
+ if (opts.constructorHandlers) for (const handler of opts.constructorHandlers) constructorHandlers.set(handler[0], handler[1]);
let handler = null;
return opts.proto ? cloneProto : clone;
function cloneArray(a, fn) {
@@ -87802,19 +81094,13 @@ var require_rfdc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (let i = 0; i < keys.length; i++) {
const k = keys[i];
const cur = a[k];
- if (typeof cur !== "object" || cur === null) {
- a2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- a2[k] = handler(cur, fn);
- } else if (ArrayBuffer.isView(cur)) {
- a2[k] = copyBuffer(cur);
- } else {
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
+ else {
const index = refs.indexOf(cur);
- if (index !== -1) {
- a2[k] = refsNew[index];
- } else {
- a2[k] = fn(cur);
- }
+ if (index !== -1) a2[k] = refsNew[index];
+ else a2[k] = fn(cur);
}
}
return a2;
@@ -87822,28 +81108,20 @@ var require_rfdc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function clone(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, clone);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, clone);
- }
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
const o2 = {};
refs.push(o);
refsNew.push(o2);
for (const k in o) {
if (Object.hasOwnProperty.call(o, k) === false) continue;
const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, clone);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
+ else {
const i = refs.indexOf(cur);
- if (i !== -1) {
- o2[k] = refsNew[i];
- } else {
- o2[k] = clone(cur);
- }
+ if (i !== -1) o2[k] = refsNew[i];
+ else o2[k] = clone(cur);
}
}
refs.pop();
@@ -87853,27 +81131,19 @@ var require_rfdc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function cloneProto(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, cloneProto);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, cloneProto);
- }
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
const o2 = {};
refs.push(o);
refsNew.push(o2);
for (const k in o) {
const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, cloneProto);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
+ else {
const i = refs.indexOf(cur);
- if (i !== -1) {
- o2[k] = refsNew[i];
- } else {
- o2[k] = cloneProto(cur);
- }
+ if (i !== -1) o2[k] = refsNew[i];
+ else o2[k] = cloneProto(cur);
}
}
refs.pop();
@@ -87882,7 +81152,6 @@ var require_rfdc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
}));
-
//#endregion
//#region ../node_modules/fastify/lib/schemas.js
var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -87907,12 +81176,8 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Schemas.prototype.add = function(inputSchema) {
const schema = fastClone(inputSchema.isFluentSchema || inputSchema.isFluentJSONSchema || inputSchema[kFluentSchema] ? inputSchema.valueOf() : inputSchema);
const id = schema.$id;
- if (!id) {
- throw new FST_ERR_SCH_MISSING_ID();
- }
- if (this.store[id]) {
- throw new FST_ERR_SCH_ALREADY_PRESENT(id);
- }
+ if (!id) throw new FST_ERR_SCH_MISSING_ID();
+ if (this.store[id]) throw new FST_ERR_SCH_ALREADY_PRESENT(id);
this.store[id] = schema;
};
Schemas.prototype.getSchemas = function() {
@@ -87931,13 +81196,9 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return typeof schema === "object" && Object.getPrototypeOf(schema) !== Object.prototype;
}
function normalizeSchema(opts, routeSchemas, serverOptions) {
- if (routeSchemas[kSchemaVisited]) {
- return routeSchemas;
- }
+ if (routeSchemas[kSchemaVisited]) return routeSchemas;
if (routeSchemas.query) {
- if (routeSchemas.querystring) {
- throw new FST_ERR_SCH_DUPLICATE("querystring");
- }
+ if (routeSchemas.querystring) throw new FST_ERR_SCH_DUPLICATE("querystring");
routeSchemas.querystring = routeSchemas.query;
}
generateFluentSchema(routeSchemas);
@@ -87950,9 +81211,7 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (let i = 0; i < keys.length; i++) {
const contentType = keys[i];
const contentSchema = contentProperty[contentType].schema;
- if (!contentSchema) {
- throw new FST_ERR_SCH_CONTENT_MISSING_SCHEMA(contentType);
- }
+ if (!contentSchema) throw new FST_ERR_SCH_CONTENT_MISSING_SCHEMA(contentType);
routeSchemas.body.content[contentType].schema = getSchemaAnyway(opts.url, contentSchema, serverOptions.jsonShorthand);
}
continue;
@@ -87963,9 +81222,7 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (routeSchemas.response) {
const httpCodes = Object.keys(routeSchemas.response);
for (const code of httpCodes) {
- if (isCustomSchemaPrototype(routeSchemas.response[code])) {
- continue;
- }
+ if (isCustomSchemaPrototype(routeSchemas.response[code])) continue;
const contentProperty = routeSchemas.response[code].content;
let hasContentMultipleContentTypes = false;
if (contentProperty) {
@@ -87973,38 +81230,24 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (let i = 0; i < keys.length; i++) {
const mediaName = keys[i];
if (!contentProperty[mediaName].schema) {
- if (keys.length === 1) {
- break;
- }
+ if (keys.length === 1) break;
throw new FST_ERR_SCH_CONTENT_MISSING_SCHEMA(mediaName);
}
routeSchemas.response[code].content[mediaName].schema = getSchemaAnyway(opts.url, contentProperty[mediaName].schema, serverOptions.jsonShorthand);
- if (i === keys.length - 1) {
- hasContentMultipleContentTypes = true;
- }
+ if (i === keys.length - 1) hasContentMultipleContentTypes = true;
}
}
- if (!hasContentMultipleContentTypes) {
- routeSchemas.response[code] = getSchemaAnyway(opts.url, routeSchemas.response[code], serverOptions.jsonShorthand);
- }
+ if (!hasContentMultipleContentTypes) routeSchemas.response[code] = getSchemaAnyway(opts.url, routeSchemas.response[code], serverOptions.jsonShorthand);
}
}
routeSchemas[kSchemaVisited] = true;
return routeSchemas;
}
function generateFluentSchema(schema) {
- for (const key of SCHEMAS_SOURCE) {
- if (schema[key] && (schema[key].isFluentSchema || schema[key][kFluentSchema])) {
- schema[key] = schema[key].valueOf();
- }
- }
+ for (const key of SCHEMAS_SOURCE) if (schema[key] && (schema[key].isFluentSchema || schema[key][kFluentSchema])) schema[key] = schema[key].valueOf();
if (schema.response) {
const httpCodes = Object.keys(schema.response);
- for (const code of httpCodes) {
- if (schema.response[code].isFluentSchema || schema.response[code][kFluentSchema]) {
- schema.response[code] = schema.response[code].valueOf();
- }
- }
+ for (const code of httpCodes) if (schema.response[code].isFluentSchema || schema.response[code][kFluentSchema]) schema.response[code] = schema.response[code].valueOf();
}
}
function getSchemaAnyway(url, schema, jsonShorthand) {
@@ -88031,15 +81274,11 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function getSchemaSerializer(context, statusCode, contentType) {
const responseSchemaDef = context[kSchemaResponse];
- if (!responseSchemaDef) {
- return false;
- }
+ if (!responseSchemaDef) return false;
if (responseSchemaDef[statusCode]) {
if (responseSchemaDef[statusCode].constructor === Object && contentType) {
const mediaName = contentType.split(";", 1)[0];
- if (responseSchemaDef[statusCode][mediaName]) {
- return responseSchemaDef[statusCode][mediaName];
- }
+ if (responseSchemaDef[statusCode][mediaName]) return responseSchemaDef[statusCode][mediaName];
return false;
}
return responseSchemaDef[statusCode];
@@ -88048,9 +81287,7 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (responseSchemaDef[fallbackStatusCode]) {
if (responseSchemaDef[fallbackStatusCode].constructor === Object && contentType) {
const mediaName = contentType.split(";", 1)[0];
- if (responseSchemaDef[fallbackStatusCode][mediaName]) {
- return responseSchemaDef[fallbackStatusCode][mediaName];
- }
+ if (responseSchemaDef[fallbackStatusCode][mediaName]) return responseSchemaDef[fallbackStatusCode][mediaName];
return false;
}
return responseSchemaDef[fallbackStatusCode];
@@ -88058,9 +81295,7 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (responseSchemaDef.default) {
if (responseSchemaDef.default.constructor === Object && contentType) {
const mediaName = contentType.split(";", 1)[0];
- if (responseSchemaDef.default[mediaName]) {
- return responseSchemaDef.default[mediaName];
- }
+ if (responseSchemaDef.default[mediaName]) return responseSchemaDef.default[mediaName];
return false;
}
return responseSchemaDef.default;
@@ -88075,7 +81310,6 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
normalizeSchema
};
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/lib/serializer.js
var require_serializer$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -88092,7 +81326,6 @@ var require_serializer$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
case "round":
this.parseInteger = Math.round;
break;
- case "trunc":
default:
this.parseInteger = Math.trunc;
break;
@@ -88100,58 +81333,37 @@ var require_serializer$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._options = options;
}
asInteger(i) {
- if (Number.isInteger(i)) {
- return "" + i;
- } else if (typeof i === "bigint") {
- return i.toString();
- }
+ if (Number.isInteger(i)) return "" + i;
+ else if (typeof i === "bigint") return i.toString();
const integer = this.parseInteger(i);
- if (integer === Infinity || integer === -Infinity || integer !== integer) {
- throw new Error(`The value "${i}" cannot be converted to an integer.`);
- }
+ if (integer === Infinity || integer === -Infinity || integer !== integer) throw new Error(`The value "${i}" cannot be converted to an integer.`);
return "" + integer;
}
asNumber(i) {
const num = Number(i);
- if (num !== num) {
- throw new Error(`The value "${i}" cannot be converted to a number.`);
- } else if (num === Infinity || num === -Infinity) {
- return "null";
- } else {
- return "" + num;
- }
+ if (num !== num) throw new Error(`The value "${i}" cannot be converted to a number.`);
+ else if (num === Infinity || num === -Infinity) return "null";
+ else return "" + num;
}
asBoolean(bool) {
return bool && "true" || "false";
}
asDateTime(date) {
if (date === null) return "\"\"";
- if (date instanceof Date) {
- return "\"" + date.toISOString() + "\"";
- }
- if (typeof date === "string") {
- return "\"" + date + "\"";
- }
+ if (date instanceof Date) return "\"" + date.toISOString() + "\"";
+ if (typeof date === "string") return "\"" + date + "\"";
throw new Error(`The value "${date}" cannot be converted to a date-time.`);
}
asDate(date) {
if (date === null) return "\"\"";
- if (date instanceof Date) {
- return "\"" + new Date(date.getTime() - date.getTimezoneOffset() * 6e4).toISOString().slice(0, 10) + "\"";
- }
- if (typeof date === "string") {
- return "\"" + date + "\"";
- }
+ if (date instanceof Date) return "\"" + (/* @__PURE__ */ new Date(date.getTime() - date.getTimezoneOffset() * 6e4)).toISOString().slice(0, 10) + "\"";
+ if (typeof date === "string") return "\"" + date + "\"";
throw new Error(`The value "${date}" cannot be converted to a date.`);
}
asTime(date) {
if (date === null) return "\"\"";
- if (date instanceof Date) {
- return "\"" + new Date(date.getTime() - date.getTimezoneOffset() * 6e4).toISOString().slice(11, 19) + "\"";
- }
- if (typeof date === "string") {
- return "\"" + date + "\"";
- }
+ if (date instanceof Date) return "\"" + (/* @__PURE__ */ new Date(date.getTime() - date.getTimezoneOffset() * 6e4)).toISOString().slice(11, 19) + "\"";
+ if (typeof date === "string") return "\"" + date + "\"";
throw new Error(`The value "${date}" cannot be converted to a time.`);
}
asString(str) {
@@ -88166,16 +81378,11 @@ var require_serializer$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
last === -1 && (last = 0);
result += str.slice(last, i) + "\\";
last = i;
- } else if (point < 32 || point >= 55296 && point <= 57343) {
- return JSON.stringify(str);
- }
+ } else if (point < 32 || point >= 55296 && point <= 57343) return JSON.stringify(str);
}
return last === -1 && "\"" + str + "\"" || "\"" + result + str.slice(last) + "\"";
- } else if (len < 5e3 && STR_ESCAPE.test(str) === false) {
- return "\"" + str + "\"";
- } else {
- return JSON.stringify(str);
- }
+ } else if (len < 5e3 && STR_ESCAPE.test(str) === false) return "\"" + str + "\"";
+ else return JSON.stringify(str);
}
asUnsafeString(str) {
return "\"" + str + "\"";
@@ -88188,15 +81395,10 @@ var require_serializer$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/error-serializer.js
/* istanbul ignore file */
var require_error_serializer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- const Serializer = require_serializer$1();
- const serializerState = { "mode": "standalone" };
- const serializer = Serializer.restoreFromState(serializerState);
- const validator = null;
module.exports = function anonymous(validator, serializer) {
const JSON_STR_BEGIN_OBJECT = "{";
const JSON_STR_END_OBJECT = "}";
@@ -88216,72 +81418,46 @@ var require_error_serializer = /* @__PURE__ */ __commonJSMin(((exports, module)
let json = JSON_STR_BEGIN_OBJECT;
let addComma = false;
value = obj["statusCode"];
- if (value !== undefined) {
+ if (value !== void 0) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA);
json += "\"statusCode\":";
json += serializer.asNumber(value);
}
value = obj["code"];
- if (value !== undefined) {
+ if (value !== void 0) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA);
json += "\"code\":";
- if (typeof value !== "string") {
- if (value === null) {
- json += JSON_STR_EMPTY_STRING;
- } else if (value instanceof Date) {
- json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE;
- } else if (value instanceof RegExp) {
- json += serializer.asString(value.source);
- } else {
- json += serializer.asString(value.toString());
- }
- } else {
- json += serializer.asString(value);
- }
+ if (typeof value !== "string") if (value === null) json += JSON_STR_EMPTY_STRING;
+ else if (value instanceof Date) json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE;
+ else if (value instanceof RegExp) json += serializer.asString(value.source);
+ else json += serializer.asString(value.toString());
+ else json += serializer.asString(value);
}
value = obj["error"];
- if (value !== undefined) {
+ if (value !== void 0) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA);
json += "\"error\":";
- if (typeof value !== "string") {
- if (value === null) {
- json += JSON_STR_EMPTY_STRING;
- } else if (value instanceof Date) {
- json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE;
- } else if (value instanceof RegExp) {
- json += serializer.asString(value.source);
- } else {
- json += serializer.asString(value.toString());
- }
- } else {
- json += serializer.asString(value);
- }
+ if (typeof value !== "string") if (value === null) json += JSON_STR_EMPTY_STRING;
+ else if (value instanceof Date) json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE;
+ else if (value instanceof RegExp) json += serializer.asString(value.source);
+ else json += serializer.asString(value.toString());
+ else json += serializer.asString(value);
}
value = obj["message"];
- if (value !== undefined) {
+ if (value !== void 0) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA);
json += "\"message\":";
- if (typeof value !== "string") {
- if (value === null) {
- json += JSON_STR_EMPTY_STRING;
- } else if (value instanceof Date) {
- json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE;
- } else if (value instanceof RegExp) {
- json += serializer.asString(value.source);
- } else {
- json += serializer.asString(value.toString());
- }
- } else {
- json += serializer.asString(value);
- }
+ if (typeof value !== "string") if (value === null) json += JSON_STR_EMPTY_STRING;
+ else if (value instanceof Date) json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE;
+ else if (value instanceof RegExp) json += serializer.asString(value.source);
+ else json += serializer.asString(value.toString());
+ else json += serializer.asString(value);
}
return json + JSON_STR_END_OBJECT;
}
- const main = anonymous0;
- return main;
- }(validator, serializer);
+ return anonymous0;
+ }(null, require_serializer$1().restoreFromState({ "mode": "standalone" }));
}));
-
//#endregion
//#region ../node_modules/fastify/lib/error-handler.js
var require_error_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -88305,13 +81481,11 @@ var require_error_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
try {
reply.raw.writeHead(reply.raw.statusCode, reply[kReplyHeaders]);
} catch (error) {
- if (!reply.log[kDisableRequestLogging]) {
- reply.log.warn({
- req: reply.request,
- res: reply,
- err: error
- }, error && error.message);
- }
+ if (!reply.log[kDisableRequestLogging]) reply.log.warn({
+ req: reply.request,
+ res: reply,
+ err: error
+ }, error && error.message);
reply.raw.writeHead(reply.raw.statusCode);
}
reply.raw.end(payload);
@@ -88330,13 +81504,8 @@ var require_error_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
try {
const result = func(error, reply.request, reply);
- if (result !== undefined) {
- if (result !== null && typeof result.then === "function") {
- wrapThenable(result, reply);
- } else {
- reply.send(result);
- }
- }
+ if (result !== void 0) if (result !== null && typeof result.then === "function") wrapThenable(result, reply);
+ else reply.send(result);
} catch (err) {
reply.send(err);
}
@@ -88348,21 +81517,15 @@ var require_error_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
reply.code(statusCode >= 400 ? statusCode : 500);
}
if (reply.statusCode < 500) {
- if (!reply.log[kDisableRequestLogging]) {
- reply.log.info({
- res: reply,
- err: error
- }, error && error.message);
- }
- } else {
- if (!reply.log[kDisableRequestLogging]) {
- reply.log.error({
- req: request,
- res: reply,
- err: error
- }, error && error.message);
- }
- }
+ if (!reply.log[kDisableRequestLogging]) reply.log.info({
+ res: reply,
+ err: error
+ }, error && error.message);
+ } else if (!reply.log[kDisableRequestLogging]) reply.log.error({
+ req: request,
+ res: reply,
+ err: error
+ }, error && error.message);
reply.send(error);
}
function fallbackErrorHandler(error, reply, cb) {
@@ -88383,25 +81546,19 @@ var require_error_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
statusCode: { value: statusCode }
}));
} catch (err) {
- if (!reply.log[kDisableRequestLogging]) {
- reply.log.error({
- err,
- statusCode: res.statusCode
- }, "The serializer for the given status code failed");
- }
+ if (!reply.log[kDisableRequestLogging]) reply.log.error({
+ err,
+ statusCode: res.statusCode
+ }, "The serializer for the given status code failed");
reply.code(500);
payload = serializeError(new FST_ERR_FAILED_ERROR_SERIALIZATION(err.message, error.message));
}
- if (typeof payload !== "string" && !Buffer.isBuffer(payload)) {
- payload = serializeError(new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof payload));
- }
+ if (typeof payload !== "string" && !Buffer.isBuffer(payload)) payload = serializeError(new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof payload));
reply[kReplyHeaders]["content-length"] = "" + Buffer.byteLength(payload);
cb(reply, payload);
}
function buildErrorHandler(parent = rootErrorHandler, func) {
- if (!func) {
- return parent;
- }
+ if (!func) return parent;
const errorHandler = Object.create(parent);
errorHandler.func = func;
return errorHandler;
@@ -88411,14 +81568,9 @@ var require_error_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
let statusCode = res.statusCode;
statusCode = statusCode >= 400 ? statusCode : 500;
if (error != null) {
- if (error.headers !== undefined) {
- reply.headers(error.headers);
- }
- if (error.status >= 400) {
- statusCode = error.status;
- } else if (error.statusCode >= 400) {
- statusCode = error.statusCode;
- }
+ if (error.headers !== void 0) reply.headers(error.headers);
+ if (error.status >= 400) statusCode = error.status;
+ else if (error.statusCode >= 400) statusCode = error.statusCode;
}
res.statusCode = statusCode;
}
@@ -88427,7 +81579,6 @@ var require_error_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
handleError
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/reply.js
var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -88436,8 +81587,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { kFourOhFourContext, kPublicRouteContext, kReplyErrorHandlerCalled, kReplyHijacked, kReplyStartTime, kReplyEndTime, kReplySerializer, kReplySerializerDefault, kReplyIsError, kReplyHeaders, kReplyTrailers, kReplyHasStatusCode, kReplyIsRunningOnErrorHook, kReplyNextErrorHandler, kDisableRequestLogging, kSchemaResponse, kReplyCacheSerializeFns, kSchemaController, kOptions, kRouteContext } = require_symbols$1();
const { onSendHookRunner, onResponseHookRunner, preHandlerHookRunner, preSerializationHookRunner } = require_hooks();
const internals = require_handleRequest()[Symbol.for("internals")];
- const loggerUtils = require_logger();
- const now = loggerUtils.now;
+ const now = require_logger().now;
const { handleError } = require_error_handler();
const { getSchemaSerializer } = require_schemas();
const CONTENT_TYPE = {
@@ -88458,7 +81608,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this[kReplyHeaders] = {};
this[kReplyTrailers] = null;
this[kReplyHasStatusCode] = false;
- this[kReplyStartTime] = undefined;
+ this[kReplyStartTime] = void 0;
this.log = log;
}
Reply.props = [];
@@ -88471,9 +81621,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this.request[kRouteContext];
} },
elapsedTime: { get() {
- if (this[kReplyStartTime] === undefined) {
- return 0;
- }
+ if (this[kReplyStartTime] === void 0) return 0;
return (this[kReplyEndTime] || now()) - this[kReplyStartTime];
} },
server: { get() {
@@ -88486,12 +81634,8 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
set(value) {
FSTDEP010();
- if (value !== true) {
- throw new FST_ERR_REP_SENT_VALUE();
- }
- if (this.sent && this[kReplyHijacked]) {
- throw new FST_ERR_REP_ALREADY_SENT(this.request.url, this.request.method);
- }
+ if (value !== true) throw new FST_ERR_REP_SENT_VALUE();
+ if (this.sent && this[kReplyHijacked]) throw new FST_ERR_REP_ALREADY_SENT(this.request.url, this.request.method);
this[kReplyHijacked] = true;
}
},
@@ -88512,9 +81656,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
};
Reply.prototype.send = function(payload) {
- if (this[kReplyIsRunningOnErrorHook] === true) {
- throw new FST_ERR_SEND_INSIDE_ONERR();
- }
+ if (this[kReplyIsRunningOnErrorHook] === true) throw new FST_ERR_SEND_INSIDE_ONERR();
if (this.sent) {
this.log.warn({ err: new FST_ERR_REP_ALREADY_SENT(this.request.url, this.request.method) });
return this;
@@ -88524,21 +81666,19 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
onErrorHook(this, payload, onSendHook);
return this;
}
- if (payload === undefined) {
+ if (payload === void 0) {
onSendHook(this, payload);
return this;
}
const contentType = this.getHeader("content-type");
- const hasContentType = contentType !== undefined;
+ const hasContentType = contentType !== void 0;
if (payload !== null) {
if (typeof payload.pipe === "function" || typeof payload.getReader === "function" || toString.call(payload) === "[object Response]") {
onSendHook(this, payload);
return this;
}
if (payload?.buffer instanceof ArrayBuffer) {
- if (hasContentType === false) {
- this[kReplyHeaders]["content-type"] = CONTENT_TYPE.OCTET;
- }
+ if (hasContentType === false) this[kReplyHeaders]["content-type"] = CONTENT_TYPE.OCTET;
const payloadToSend = Buffer.isBuffer(payload) ? payload : Buffer.from(payload.buffer, payload.byteOffset, payload.byteLength);
onSendHook(this, payloadToSend);
return this;
@@ -88549,25 +81689,16 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
}
}
- if (this[kReplySerializer] !== null) {
- if (typeof payload !== "string") {
- preSerializationHook(this, payload);
- return this;
- } else {
- payload = this[kReplySerializer](payload);
- }
- } else if (hasContentType === false || contentType.indexOf("json") > -1) {
- if (hasContentType === false) {
- this[kReplyHeaders]["content-type"] = CONTENT_TYPE.JSON;
- } else {
- if (contentType.indexOf("charset") === -1) {
- const customContentType = contentType.trim();
- if (customContentType.endsWith(";")) {
- this[kReplyHeaders]["content-type"] = `${customContentType} charset=utf-8`;
- } else {
- this[kReplyHeaders]["content-type"] = `${customContentType}; charset=utf-8`;
- }
- }
+ if (this[kReplySerializer] !== null) if (typeof payload !== "string") {
+ preSerializationHook(this, payload);
+ return this;
+ } else payload = this[kReplySerializer](payload);
+ else if (hasContentType === false || contentType.indexOf("json") > -1) {
+ if (hasContentType === false) this[kReplyHeaders]["content-type"] = CONTENT_TYPE.JSON;
+ else if (contentType.indexOf("charset") === -1) {
+ const customContentType = contentType.trim();
+ if (customContentType.endsWith(";")) this[kReplyHeaders]["content-type"] = `${customContentType} charset=utf-8`;
+ else this[kReplyHeaders]["content-type"] = `${customContentType}; charset=utf-8`;
}
if (typeof payload !== "string") {
preSerializationHook(this, payload);
@@ -88581,9 +81712,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
key = key.toLowerCase();
const res = this.raw;
let value = this[kReplyHeaders][key];
- if (value === undefined && res.hasHeader(key)) {
- value = res.getHeader(key);
- }
+ if (value === void 0 && res.hasHeader(key)) value = res.getHeader(key);
return value;
};
Reply.prototype.getHeaders = function() {
@@ -88594,7 +81723,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
Reply.prototype.hasHeader = function(key) {
key = key.toLowerCase();
- return this[kReplyHeaders][key] !== undefined || this.raw.hasHeader(key);
+ return this[kReplyHeaders][key] !== void 0 || this.raw.hasHeader(key);
};
Reply.prototype.removeHeader = function(key) {
delete this[kReplyHeaders][key.toLowerCase()];
@@ -88603,17 +81732,10 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Reply.prototype.header = function(key, value = "") {
key = key.toLowerCase();
if (this[kReplyHeaders][key] && key === "set-cookie") {
- if (typeof this[kReplyHeaders][key] === "string") {
- this[kReplyHeaders][key] = [this[kReplyHeaders][key]];
- }
- if (Array.isArray(value)) {
- Array.prototype.push.apply(this[kReplyHeaders][key], value);
- } else {
- this[kReplyHeaders][key].push(value);
- }
- } else {
- this[kReplyHeaders][key] = value;
- }
+ if (typeof this[kReplyHeaders][key] === "string") this[kReplyHeaders][key] = [this[kReplyHeaders][key]];
+ if (Array.isArray(value)) Array.prototype.push.apply(this[kReplyHeaders][key], value);
+ else this[kReplyHeaders][key].push(value);
+ } else this[kReplyHeaders][key] = value;
return this;
};
Reply.prototype.headers = function(headers) {
@@ -88640,29 +81762,23 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
]);
Reply.prototype.trailer = function(key, fn) {
key = key.toLowerCase();
- if (INVALID_TRAILERS.has(key)) {
- throw new FST_ERR_BAD_TRAILER_NAME(key);
- }
- if (typeof fn !== "function") {
- throw new FST_ERR_BAD_TRAILER_VALUE(key, typeof fn);
- }
+ if (INVALID_TRAILERS.has(key)) throw new FST_ERR_BAD_TRAILER_NAME(key);
+ if (typeof fn !== "function") throw new FST_ERR_BAD_TRAILER_VALUE(key, typeof fn);
if (this[kReplyTrailers] === null) this[kReplyTrailers] = {};
this[kReplyTrailers][key] = fn;
return this;
};
Reply.prototype.hasTrailer = function(key) {
- return this[kReplyTrailers]?.[key.toLowerCase()] !== undefined;
+ return this[kReplyTrailers]?.[key.toLowerCase()] !== void 0;
};
Reply.prototype.removeTrailer = function(key) {
if (this[kReplyTrailers] === null) return this;
- this[kReplyTrailers][key.toLowerCase()] = undefined;
+ this[kReplyTrailers][key.toLowerCase()] = void 0;
return this;
};
Reply.prototype.code = function(code) {
const intValue = Number(code);
- if (isNaN(intValue) || intValue < 100 || intValue > 599) {
- throw new FST_ERR_BAD_STATUS_CODE(code || String(code));
- }
+ if (isNaN(intValue) || intValue < 100 || intValue > 599) throw new FST_ERR_BAD_STATUS_CODE(code || String(code));
this.raw.statusCode = intValue;
this[kReplyHasStatusCode] = true;
return this;
@@ -88670,34 +81786,23 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Reply.prototype.status = Reply.prototype.code;
Reply.prototype.getSerializationFunction = function(schemaOrStatus, contentType) {
let serialize;
- if (typeof schemaOrStatus === "string" || typeof schemaOrStatus === "number") {
- if (typeof contentType === "string") {
- serialize = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus]?.[contentType];
- } else {
- serialize = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus];
- }
- } else if (typeof schemaOrStatus === "object") {
- serialize = this[kRouteContext][kReplyCacheSerializeFns]?.get(schemaOrStatus);
- }
+ if (typeof schemaOrStatus === "string" || typeof schemaOrStatus === "number") if (typeof contentType === "string") serialize = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus]?.[contentType];
+ else serialize = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus];
+ else if (typeof schemaOrStatus === "object") serialize = this[kRouteContext][kReplyCacheSerializeFns]?.get(schemaOrStatus);
return serialize;
};
Reply.prototype.compileSerializationSchema = function(schema, httpStatus = null, contentType = null) {
const { request } = this;
const { method, url } = request;
- if (this[kRouteContext][kReplyCacheSerializeFns]?.has(schema)) {
- return this[kRouteContext][kReplyCacheSerializeFns].get(schema);
- }
- const serializerCompiler = this[kRouteContext].serializerCompiler || this.server[kSchemaController].serializerCompiler || this.server[kSchemaController].setupSerializer(this.server[kOptions]) || this.server[kSchemaController].serializerCompiler;
- const serializeFn = serializerCompiler({
+ if (this[kRouteContext][kReplyCacheSerializeFns]?.has(schema)) return this[kRouteContext][kReplyCacheSerializeFns].get(schema);
+ const serializeFn = (this[kRouteContext].serializerCompiler || this.server[kSchemaController].serializerCompiler || this.server[kSchemaController].setupSerializer(this.server[kOptions]) || this.server[kSchemaController].serializerCompiler)({
schema,
method,
url,
httpStatus,
contentType
});
- if (this[kRouteContext][kReplyCacheSerializeFns] == null) {
- this[kRouteContext][kReplyCacheSerializeFns] = new WeakMap();
- }
+ if (this[kRouteContext][kReplyCacheSerializeFns] == null) this[kRouteContext][kReplyCacheSerializeFns] = /* @__PURE__ */ new WeakMap();
this[kRouteContext][kReplyCacheSerializeFns].set(schema, serializeFn);
return serializeFn;
};
@@ -88707,34 +81812,20 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
httpStatus = typeof schema === "string" || typeof schema === "number" ? schema : httpStatus;
contentType = httpStatus && possibleContentType !== httpStatus ? possibleContentType : contentType;
if (httpStatus != null) {
- if (contentType != null) {
- serialize = this[kRouteContext][kSchemaResponse]?.[httpStatus]?.[contentType];
- } else {
- serialize = this[kRouteContext][kSchemaResponse]?.[httpStatus];
- }
+ if (contentType != null) serialize = this[kRouteContext][kSchemaResponse]?.[httpStatus]?.[contentType];
+ else serialize = this[kRouteContext][kSchemaResponse]?.[httpStatus];
if (serialize == null) {
if (contentType) throw new FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN(httpStatus, contentType);
throw new FST_ERR_MISSING_SERIALIZATION_FN(httpStatus);
}
- } else {
- if (this[kRouteContext][kReplyCacheSerializeFns]?.has(schema)) {
- serialize = this[kRouteContext][kReplyCacheSerializeFns].get(schema);
- } else {
- serialize = this.compileSerializationSchema(schema, httpStatus, contentType);
- }
- }
+ } else if (this[kRouteContext][kReplyCacheSerializeFns]?.has(schema)) serialize = this[kRouteContext][kReplyCacheSerializeFns].get(schema);
+ else serialize = this.compileSerializationSchema(schema, httpStatus, contentType);
return serialize(input);
};
Reply.prototype.serialize = function(payload) {
- if (this[kReplySerializer] !== null) {
- return this[kReplySerializer](payload);
- } else {
- if (this[kRouteContext] && this[kRouteContext][kReplySerializerDefault]) {
- return this[kRouteContext][kReplySerializerDefault](payload, this.raw.statusCode);
- } else {
- return serialize(this[kRouteContext], payload, this.raw.statusCode);
- }
- }
+ if (this[kReplySerializer] !== null) return this[kReplySerializer](payload);
+ else if (this[kRouteContext] && this[kRouteContext][kReplySerializerDefault]) return this[kRouteContext][kReplySerializerDefault](payload, this.raw.statusCode);
+ else return serialize(this[kRouteContext], payload, this.raw.statusCode);
};
Reply.prototype.serializer = function(fn) {
this[kReplySerializer] = fn;
@@ -88751,9 +81842,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
code = url;
url = temp;
}
- if (!code) {
- code = this[kReplyHasStatusCode] ? this.raw.statusCode : 302;
- }
+ if (!code) code = this[kReplyHasStatusCode] ? this.raw.statusCode : 302;
return this.header("location", url).code(code).send();
};
Reply.prototype.callNotFound = function() {
@@ -88770,23 +81859,14 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
eos(this.raw, (err) => {
- if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
- if (rejected) {
- rejected(err);
- } else {
- this.log && this.log.warn("unhandled rejection on reply.then");
- }
- } else {
- fulfilled();
- }
+ if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") if (rejected) rejected(err);
+ else this.log && this.log.warn("unhandled rejection on reply.then");
+ else fulfilled();
});
};
function preSerializationHook(reply, payload) {
- if (reply[kRouteContext].preSerialization !== null) {
- preSerializationHookRunner(reply[kRouteContext].preSerialization, reply.request, reply, payload, preSerializationHookEnd);
- } else {
- preSerializationHookEnd(null, reply.request, reply, payload);
- }
+ if (reply[kRouteContext].preSerialization !== null) preSerializationHookRunner(reply[kRouteContext].preSerialization, reply.request, reply, payload, preSerializationHookEnd);
+ else preSerializationHookEnd(null, reply.request, reply, payload);
}
function preSerializationHookEnd(err, request, reply, payload) {
if (err != null) {
@@ -88794,13 +81874,9 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
try {
- if (reply[kReplySerializer] !== null) {
- payload = reply[kReplySerializer](payload);
- } else if (reply[kRouteContext] && reply[kRouteContext][kReplySerializerDefault]) {
- payload = reply[kRouteContext][kReplySerializerDefault](payload, reply.raw.statusCode);
- } else {
- payload = serialize(reply[kRouteContext], payload, reply.raw.statusCode, reply[kReplyHeaders]["content-type"]);
- }
+ if (reply[kReplySerializer] !== null) payload = reply[kReplySerializer](payload);
+ else if (reply[kRouteContext] && reply[kRouteContext][kReplySerializerDefault]) payload = reply[kRouteContext][kReplySerializerDefault](payload, reply.raw.statusCode);
+ else payload = serialize(reply[kRouteContext], payload, reply.raw.statusCode, reply[kReplyHeaders]["content-type"]);
} catch (e) {
wrapSerializationError(e, reply);
onErrorHook(reply, e);
@@ -88812,27 +81888,19 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
error.serialization = reply[kRouteContext].config;
}
function onSendHook(reply, payload) {
- if (reply[kRouteContext].onSend !== null) {
- onSendHookRunner(reply[kRouteContext].onSend, reply.request, reply, payload, wrapOnSendEnd);
- } else {
- onSendEnd(reply, payload);
- }
+ if (reply[kRouteContext].onSend !== null) onSendHookRunner(reply[kRouteContext].onSend, reply.request, reply, payload, wrapOnSendEnd);
+ else onSendEnd(reply, payload);
}
function wrapOnSendEnd(err, request, reply, payload) {
- if (err != null) {
- onErrorHook(reply, err);
- } else {
- onSendEnd(reply, payload);
- }
+ if (err != null) onErrorHook(reply, err);
+ else onSendEnd(reply, payload);
}
function safeWriteHead(reply, statusCode) {
const res = reply.raw;
try {
res.writeHead(statusCode, reply[kReplyHeaders]);
} catch (err) {
- if (err.code === "ERR_HTTP_HEADERS_SENT") {
- reply.log.warn(`Reply was already sent, did you forget to "return reply" in the "${reply.request.raw.url}" (${reply.request.raw.method}) route?`);
- }
+ if (err.code === "ERR_HTTP_HEADERS_SENT") reply.log.warn(`Reply was already sent, did you forget to "return reply" in the "${reply.request.raw.url}" (${reply.request.raw.method}) route?`);
throw err;
}
}
@@ -88851,26 +81919,16 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
reply.header("Trailer", header.trim());
}
if (toString.call(payload) === "[object Response]") {
- if (typeof payload.status === "number") {
- reply.code(payload.status);
- }
- if (typeof payload.headers === "object" && typeof payload.headers.forEach === "function") {
- for (const [headerName, headerValue] of payload.headers) {
- reply.header(headerName, headerValue);
- }
- }
+ if (typeof payload.status === "number") reply.code(payload.status);
+ if (typeof payload.headers === "object" && typeof payload.headers.forEach === "function") for (const [headerName, headerValue] of payload.headers) reply.header(headerName, headerValue);
if (payload.body !== null) {
- if (payload.bodyUsed) {
- throw new FST_ERR_REP_RESPONSE_BODY_CONSUMED();
- }
+ if (payload.bodyUsed) throw new FST_ERR_REP_RESPONSE_BODY_CONSUMED();
}
payload = payload.body;
}
const statusCode = res.statusCode;
- if (payload === undefined || payload === null) {
- if (statusCode >= 200 && statusCode !== 204 && statusCode !== 304 && req.method !== "HEAD" && reply[kReplyTrailers] === null) {
- reply[kReplyHeaders]["content-length"] = "0";
- }
+ if (payload === void 0 || payload === null) {
+ if (statusCode >= 200 && statusCode !== 204 && statusCode !== 304 && req.method !== "HEAD" && reply[kReplyTrailers] === null) reply[kReplyHeaders]["content-length"] = "0";
safeWriteHead(reply, statusCode);
sendTrailer(payload, res, reply);
return;
@@ -88879,7 +81937,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
reply.removeHeader("content-type");
reply.removeHeader("content-length");
safeWriteHead(reply, statusCode);
- sendTrailer(undefined, res, reply);
+ sendTrailer(void 0, res, reply);
if (typeof payload.resume === "function") {
payload.on("error", noop);
payload.resume();
@@ -88894,14 +81952,10 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
sendWebStream(payload, res, reply);
return;
}
- if (typeof payload !== "string" && !Buffer.isBuffer(payload)) {
- throw new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof payload);
- }
+ if (typeof payload !== "string" && !Buffer.isBuffer(payload)) throw new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof payload);
if (reply[kReplyTrailers] === null) {
const contentLength = reply[kReplyHeaders]["content-length"];
- if (!contentLength || req.raw.method !== "HEAD" && Number(contentLength) !== Buffer.byteLength(payload)) {
- reply[kReplyHeaders]["content-length"] = "" + Buffer.byteLength(payload);
- }
+ if (!contentLength || req.raw.method !== "HEAD" && Number(contentLength) !== Buffer.byteLength(payload)) reply[kReplyHeaders]["content-length"] = "" + Buffer.byteLength(payload);
}
safeWriteHead(reply, statusCode);
res.write(payload);
@@ -88909,16 +81963,11 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function logStreamError(logger, err, res) {
if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
- if (!logger[kDisableRequestLogging]) {
- logger.info({ res }, "stream closed prematurely");
- }
- } else {
- logger.warn({ err }, "response terminated with an error with headers already sent");
- }
+ if (!logger[kDisableRequestLogging]) logger.info({ res }, "stream closed prematurely");
+ } else logger.warn({ err }, "response terminated with an error with headers already sent");
}
function sendWebStream(payload, res, reply) {
- const nodeStream = Readable$8.fromWeb(payload);
- sendStream(nodeStream, res, reply);
+ sendStream(Readable$8.fromWeb(payload), res, reply);
}
function sendStream(payload, res, reply) {
let sourceOpen = true;
@@ -88929,17 +81978,13 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
writable: false
}, function(err) {
sourceOpen = false;
- if (err != null) {
- if (res.headersSent || reply.request.raw.aborted === true) {
- if (!errorLogged) {
- errorLogged = true;
- logStreamError(reply.log, err, reply);
- }
- res.destroy();
- } else {
- onErrorHook(reply, err);
+ if (err != null) if (res.headersSent || reply.request.raw.aborted === true) {
+ if (!errorLogged) {
+ errorLogged = true;
+ logStreamError(reply.log, err, reply);
}
- }
+ res.destroy();
+ } else onErrorHook(reply, err);
});
eos(res, function(err) {
if (sourceOpen) {
@@ -88947,24 +81992,14 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
errorLogged = true;
logStreamError(reply.log, err, res);
}
- if (typeof payload.destroy === "function") {
- payload.destroy();
- } else if (typeof payload.close === "function") {
- payload.close(noop);
- } else if (typeof payload.abort === "function") {
- payload.abort();
- } else {
- reply.log.warn("stream payload does not end properly");
- }
+ if (typeof payload.destroy === "function") payload.destroy();
+ else if (typeof payload.close === "function") payload.close(noop);
+ else if (typeof payload.abort === "function") payload.abort();
+ else reply.log.warn("stream payload does not end properly");
}
});
- if (!res.headersSent) {
- for (const key in reply[kReplyHeaders]) {
- res.setHeader(key, reply[kReplyHeaders][key]);
- }
- } else {
- reply.log.warn("response will send, but you shouldn't use res.writeHead in stream mode");
- }
+ if (!res.headersSent) for (const key in reply[kReplyHeaders]) res.setHeader(key, reply[kReplyHeaders][key]);
+ else reply.log.warn("response will send, but you shouldn't use res.writeHead in stream mode");
payload.pipe(res);
}
function sendTrailer(payload, res, reply) {
@@ -88994,9 +82029,8 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
process.nextTick(send);
}
const result = reply[kReplyTrailers][trailerName](reply, payload, cb);
- if (typeof result === "object" && typeof result.then === "function") {
- result.then((v) => cb(null, v), cb);
- } else if (result !== null && result !== undefined) {
+ if (typeof result === "object" && typeof result.then === "function") result.then((v) => cb(null, v), cb);
+ else if (result !== null && result !== void 0) {
FSTDEP013();
cb(null, result);
}
@@ -89011,9 +82045,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (reply[kRouteContext].onError !== null && !reply[kReplyNextErrorHandler]) {
reply[kReplyIsRunningOnErrorHook] = true;
onSendHookRunner(reply[kRouteContext].onError, reply.request, reply, error, () => handleError(reply, error, cb));
- } else {
- handleError(reply, error, cb);
- }
+ } else handleError(reply, error, cb);
}
function setupResponseListeners(reply) {
reply[kReplyStartTime] = now();
@@ -89022,19 +82054,14 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
reply.raw.removeListener("finish", onResFinished);
reply.raw.removeListener("error", onResFinished);
const ctx = reply[kRouteContext];
- if (ctx && ctx.onResponse !== null) {
- onResponseHookRunner(ctx.onResponse, reply.request, reply, onResponseCallback);
- } else {
- onResponseCallback(err, reply.request, reply);
- }
+ if (ctx && ctx.onResponse !== null) onResponseHookRunner(ctx.onResponse, reply.request, reply, onResponseCallback);
+ else onResponseCallback(err, reply.request, reply);
};
reply.raw.on("finish", onResFinished);
reply.raw.on("error", onResFinished);
}
function onResponseCallback(err, request, reply) {
- if (reply.log[kDisableRequestLogging]) {
- return;
- }
+ if (reply.log[kDisableRequestLogging]) return;
const responseTime = reply.elapsedTime;
if (err != null) {
reply.log.error({
@@ -89060,8 +82087,8 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.request = request;
this[kReplyHeaders] = {};
this[kReplyTrailers] = null;
- this[kReplyStartTime] = undefined;
- this[kReplyEndTime] = undefined;
+ this[kReplyStartTime] = void 0;
+ this[kReplyEndTime] = void 0;
this.log = log;
var prop;
for (var i = 0; i < props.length; i++) {
@@ -89082,11 +82109,8 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
reply.request[kRouteContext] = reply[kRouteContext][kFourOhFourContext];
- if (reply[kRouteContext].preHandler !== null) {
- preHandlerHookRunner(reply[kRouteContext].preHandler, reply.request, reply, internals.preHandlerCallback);
- } else {
- internals.preHandlerCallback(null, reply.request, reply);
- }
+ if (reply[kRouteContext].preHandler !== null) preHandlerHookRunner(reply[kRouteContext].preHandler, reply.request, reply, internals.preHandlerCallback);
+ else internals.preHandlerCallback(null, reply.request, reply);
}
/**
* This function runs when a payload that is not a string|buffer|stream or null
@@ -89101,9 +82125,7 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function serialize(context, data, statusCode, contentType) {
const fnSerialize = getSchemaSerializer(context, statusCode, contentType);
- if (fnSerialize) {
- return fnSerialize(data);
- }
+ if (fnSerialize) return fnSerialize(data);
return JSON.stringify(data);
}
function noop() {}
@@ -89111,7 +82133,6 @@ var require_reply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.buildReply = buildReply;
module.exports.setupResponseListeners = setupResponseListeners;
}));
-
//#endregion
//#region ../node_modules/forwarded/index.js
/*!
@@ -89133,13 +82154,9 @@ var require_forwarded = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
function forwarded(req) {
- if (!req) {
- throw new TypeError("argument req is required");
- }
+ if (!req) throw new TypeError("argument req is required");
var proxyAddrs = parse(req.headers["x-forwarded-for"] || "");
- var socketAddr = getSocketAddr(req);
- var addrs = [socketAddr].concat(proxyAddrs);
- return addrs;
+ return [getSocketAddr(req)].concat(proxyAddrs);
}
/**
* Get the socket address for a request.
@@ -89161,57 +82178,37 @@ var require_forwarded = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var end = header.length;
var list = [];
var start = header.length;
- for (var i = header.length - 1; i >= 0; i--) {
- switch (header.charCodeAt(i)) {
- case 32:
- if (start === end) {
- start = end = i;
- }
- break;
- case 44:
- if (start !== end) {
- list.push(header.substring(start, end));
- }
- start = end = i;
- break;
- default:
- start = i;
- break;
- }
- }
- if (start !== end) {
- list.push(header.substring(start, end));
+ for (var i = header.length - 1; i >= 0; i--) switch (header.charCodeAt(i)) {
+ case 32:
+ if (start === end) start = end = i;
+ break;
+ case 44:
+ if (start !== end) list.push(header.substring(start, end));
+ start = end = i;
+ break;
+ default:
+ start = i;
+ break;
}
+ if (start !== end) list.push(header.substring(start, end));
return list;
}
}));
-
//#endregion
//#region ../node_modules/ipaddr.js/lib/ipaddr.js
var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
(function() {
- var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex;
- ipaddr = {};
- root = this;
- if (typeof module !== "undefined" && module !== null && module.exports) {
- module.exports = ipaddr;
- } else {
- root["ipaddr"] = ipaddr;
- }
+ var expandIPv6, ipaddr = {}, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root = this, zoneIndex;
+ if (typeof module !== "undefined" && module !== null && module.exports) module.exports = ipaddr;
+ else root["ipaddr"] = ipaddr;
matchCIDR = function(first, second, partSize, cidrBits) {
var part, shift;
- if (first.length !== second.length) {
- throw new Error("ipaddr: cannot match CIDR for objects with different lengths");
- }
+ if (first.length !== second.length) throw new Error("ipaddr: cannot match CIDR for objects with different lengths");
part = 0;
while (cidrBits > 0) {
shift = partSize - cidrBits;
- if (shift < 0) {
- shift = 0;
- }
- if (first[part] >> shift !== second[part] >> shift) {
- return false;
- }
+ if (shift < 0) shift = 0;
+ if (first[part] >> shift !== second[part] >> shift) return false;
cidrBits -= partSize;
part += 1;
}
@@ -89219,20 +82216,14 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
ipaddr.subnetMatch = function(address, rangeList, defaultName) {
var k, len, rangeName, rangeSubnets, subnet;
- if (defaultName == null) {
- defaultName = "unicast";
- }
+ if (defaultName == null) defaultName = "unicast";
for (rangeName in rangeList) {
rangeSubnets = rangeList[rangeName];
- if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {
- rangeSubnets = [rangeSubnets];
- }
+ if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) rangeSubnets = [rangeSubnets];
for (k = 0, len = rangeSubnets.length; k < len; k++) {
subnet = rangeSubnets[k];
if (address.kind() === subnet[0].kind()) {
- if (address.match.apply(address, subnet)) {
- return rangeName;
- }
+ if (address.match.apply(address, subnet)) return rangeName;
}
}
}
@@ -89241,14 +82232,10 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ipaddr.IPv4 = (function() {
function IPv4(octets) {
var k, len, octet;
- if (octets.length !== 4) {
- throw new Error("ipaddr: ipv4 octet count should be 4");
- }
+ if (octets.length !== 4) throw new Error("ipaddr: ipv4 octet count should be 4");
for (k = 0, len = octets.length; k < len; k++) {
octet = octets[k];
- if (!(0 <= octet && octet <= 255)) {
- throw new Error("ipaddr: ipv4 octet should fit in 8 bits");
- }
+ if (!(0 <= octet && octet <= 255)) throw new Error("ipaddr: ipv4 octet should fit in 8 bits");
}
this.octets = octets;
}
@@ -89266,12 +82253,8 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
IPv4.prototype.match = function(other, cidrRange) {
var ref;
- if (cidrRange === void 0) {
- ref = other, other = ref[0], cidrRange = ref[1];
- }
- if (other.kind() !== "ipv4") {
- throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");
- }
+ if (cidrRange === void 0) ref = other, other = ref[0], cidrRange = ref[1];
+ if (other.kind() !== "ipv4") throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");
return matchCIDR(this.octets, other.octets, 8, cidrRange);
};
IPv4.prototype.SpecialRanges = {
@@ -89377,8 +82360,7 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return ipaddr.IPv6.parse("::ffff:" + this.toString());
};
IPv4.prototype.prefixLengthFromSubnetMask = function() {
- var cidr, i, k, octet, stop, zeros, zerotable;
- zerotable = {
+ var cidr, i, k, octet, stop, zeros, zerotable = {
0: 8,
128: 7,
192: 6,
@@ -89395,16 +82377,10 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
octet = this.octets[i];
if (octet in zerotable) {
zeros = zerotable[octet];
- if (stop && zeros !== 0) {
- return null;
- }
- if (zeros !== 8) {
- stop = true;
- }
+ if (stop && zeros !== 0) return null;
+ if (zeros !== 8) stop = true;
cidr += zeros;
- } else {
- return null;
- }
+ } else return null;
}
return 32 - cidr;
};
@@ -89416,65 +82392,42 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
longValue: new RegExp("^" + ipv4Part + "$", "i")
};
ipaddr.IPv4.parser = function(string) {
- var match, parseIntAuto, part, shift, value;
- parseIntAuto = function(string) {
- if (string[0] === "0" && string[1] !== "x") {
- return parseInt(string, 8);
- } else {
- return parseInt(string);
+ var match, parseIntAuto = function(string) {
+ if (string[0] === "0" && string[1] !== "x") return parseInt(string, 8);
+ else return parseInt(string);
+ }, part, shift, value;
+ if (match = string.match(ipv4Regexes.fourOctet)) return (function() {
+ var k, len, ref = match.slice(1, 6), results = [];
+ for (k = 0, len = ref.length; k < len; k++) {
+ part = ref[k];
+ results.push(parseIntAuto(part));
}
- };
- if (match = string.match(ipv4Regexes.fourOctet)) {
- return (function() {
- var k, len, ref, results;
- ref = match.slice(1, 6);
- results = [];
- for (k = 0, len = ref.length; k < len; k++) {
- part = ref[k];
- results.push(parseIntAuto(part));
- }
- return results;
- })();
- } else if (match = string.match(ipv4Regexes.longValue)) {
+ return results;
+ })();
+ else if (match = string.match(ipv4Regexes.longValue)) {
value = parseIntAuto(match[1]);
- if (value > 4294967295 || value < 0) {
- throw new Error("ipaddr: address outside defined range");
- }
+ if (value > 4294967295 || value < 0) throw new Error("ipaddr: address outside defined range");
return (function() {
- var k, results;
- results = [];
- for (shift = k = 0; k <= 24; shift = k += 8) {
- results.push(value >> shift & 255);
- }
+ var k, results = [];
+ for (shift = k = 0; k <= 24; shift = k += 8) results.push(value >> shift & 255);
return results;
})().reverse();
- } else {
- return null;
- }
+ } else return null;
};
ipaddr.IPv6 = (function() {
function IPv6(parts, zoneId) {
var i, k, l, len, part, ref;
if (parts.length === 16) {
this.parts = [];
- for (i = k = 0; k <= 14; i = k += 2) {
- this.parts.push(parts[i] << 8 | parts[i + 1]);
- }
- } else if (parts.length === 8) {
- this.parts = parts;
- } else {
- throw new Error("ipaddr: ipv6 part count should be 8 or 16");
- }
+ for (i = k = 0; k <= 14; i = k += 2) this.parts.push(parts[i] << 8 | parts[i + 1]);
+ } else if (parts.length === 8) this.parts = parts;
+ else throw new Error("ipaddr: ipv6 part count should be 8 or 16");
ref = this.parts;
for (l = 0, len = ref.length; l < len; l++) {
part = ref[l];
- if (!(0 <= part && part <= 65535)) {
- throw new Error("ipaddr: ipv6 part should fit in 16 bits");
- }
- }
- if (zoneId) {
- this.zoneId = zoneId;
+ if (!(0 <= part && part <= 65535)) throw new Error("ipaddr: ipv6 part should fit in 16 bits");
}
+ if (zoneId) this.zoneId = zoneId;
}
IPv6.prototype.kind = function() {
return "ipv6";
@@ -89483,26 +82436,18 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, "::");
};
IPv6.prototype.toRFC5952String = function() {
- var bestMatchIndex, bestMatchLength, match, regex, string;
- regex = /((^|:)(0(:|$)){2,})/g;
- string = this.toNormalizedString();
+ var bestMatchIndex, bestMatchLength, match, regex = /((^|:)(0(:|$)){2,})/g, string = this.toNormalizedString();
bestMatchIndex = 0;
bestMatchLength = -1;
- while (match = regex.exec(string)) {
- if (match[0].length > bestMatchLength) {
- bestMatchIndex = match.index;
- bestMatchLength = match[0].length;
- }
- }
- if (bestMatchLength < 0) {
- return string;
+ while (match = regex.exec(string)) if (match[0].length > bestMatchLength) {
+ bestMatchIndex = match.index;
+ bestMatchLength = match[0].length;
}
+ if (bestMatchLength < 0) return string;
return string.substring(0, bestMatchIndex) + "::" + string.substring(bestMatchIndex + bestMatchLength);
};
IPv6.prototype.toByteArray = function() {
- var bytes, k, len, part, ref;
- bytes = [];
- ref = this.parts;
+ var bytes = [], k, len, part, ref = this.parts;
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
bytes.push(part >> 8);
@@ -89511,49 +82456,33 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return bytes;
};
IPv6.prototype.toNormalizedString = function() {
- var addr, part, suffix;
- addr = (function() {
- var k, len, ref, results;
- ref = this.parts;
- results = [];
+ var addr = (function() {
+ var k, len, ref = this.parts, results = [];
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
results.push(part.toString(16));
}
return results;
- }).call(this).join(":");
- suffix = "";
- if (this.zoneId) {
- suffix = "%" + this.zoneId;
- }
+ }).call(this).join(":"), part, suffix = "";
+ if (this.zoneId) suffix = "%" + this.zoneId;
return addr + suffix;
};
IPv6.prototype.toFixedLengthString = function() {
- var addr, part, suffix;
- addr = (function() {
- var k, len, ref, results;
- ref = this.parts;
- results = [];
+ var addr = (function() {
+ var k, len, ref = this.parts, results = [];
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
results.push(part.toString(16).padStart(4, "0"));
}
return results;
- }).call(this).join(":");
- suffix = "";
- if (this.zoneId) {
- suffix = "%" + this.zoneId;
- }
+ }).call(this).join(":"), part, suffix = "";
+ if (this.zoneId) suffix = "%" + this.zoneId;
return addr + suffix;
};
IPv6.prototype.match = function(other, cidrRange) {
var ref;
- if (cidrRange === void 0) {
- ref = other, other = ref[0], cidrRange = ref[1];
- }
- if (other.kind() !== "ipv6") {
- throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");
- }
+ if (cidrRange === void 0) ref = other, other = ref[0], cidrRange = ref[1];
+ if (other.kind() !== "ipv6") throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");
return matchCIDR(this.parts, other.parts, 16, cidrRange);
};
IPv6.prototype.SpecialRanges = {
@@ -89676,9 +82605,7 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
IPv6.prototype.toIPv4Address = function() {
var high, low, ref;
- if (!this.isIPv4MappedAddress()) {
- throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
- }
+ if (!this.isIPv4MappedAddress()) throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
ref = this.parts.slice(-2), high = ref[0], low = ref[1];
return new ipaddr.IPv4([
high >> 8,
@@ -89688,8 +82615,7 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
]);
};
IPv6.prototype.prefixLengthFromSubnetMask = function() {
- var cidr, i, k, part, stop, zeros, zerotable;
- zerotable = {
+ var cidr, i, k, part, stop, zeros, zerotable = {
0: 16,
32768: 15,
49152: 14,
@@ -89714,16 +82640,10 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
part = this.parts[i];
if (part in zerotable) {
zeros = zerotable[part];
- if (stop && zeros !== 0) {
- return null;
- }
- if (zeros !== 16) {
- stop = true;
- }
+ if (stop && zeros !== 0) return null;
+ if (zeros !== 16) stop = true;
cidr += zeros;
- } else {
- return null;
- }
+ } else return null;
}
return 128 - cidr;
};
@@ -89738,9 +82658,7 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
expandIPv6 = function(string, parts) {
var colonCount, lastColon, part, replacement, replacementCount, zoneId;
- if (string.indexOf("::") !== string.lastIndexOf("::")) {
- return null;
- }
+ if (string.indexOf("::") !== string.lastIndexOf("::")) return null;
zoneId = (string.match(ipv6Regexes["zoneIndex"]) || [])[0];
if (zoneId) {
zoneId = zoneId.substring(1);
@@ -89748,34 +82666,18 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
colonCount = 0;
lastColon = -1;
- while ((lastColon = string.indexOf(":", lastColon + 1)) >= 0) {
- colonCount++;
- }
- if (string.substr(0, 2) === "::") {
- colonCount--;
- }
- if (string.substr(-2, 2) === "::") {
- colonCount--;
- }
- if (colonCount > parts) {
- return null;
- }
+ while ((lastColon = string.indexOf(":", lastColon + 1)) >= 0) colonCount++;
+ if (string.substr(0, 2) === "::") colonCount--;
+ if (string.substr(-2, 2) === "::") colonCount--;
+ if (colonCount > parts) return null;
replacementCount = parts - colonCount;
replacement = ":";
- while (replacementCount--) {
- replacement += "0:";
- }
+ while (replacementCount--) replacement += "0:";
string = string.replace("::", replacement);
- if (string[0] === ":") {
- string = string.slice(1);
- }
- if (string[string.length - 1] === ":") {
- string = string.slice(0, -1);
- }
+ if (string[0] === ":") string = string.slice(1);
+ if (string[string.length - 1] === ":") string = string.slice(0, -1);
parts = (function() {
- var k, len, ref, results;
- ref = string.split(":");
- results = [];
+ var k, len, ref = string.split(":"), results = [];
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
results.push(parseInt(part, 16));
@@ -89789,9 +82691,8 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
ipaddr.IPv6.parser = function(string) {
var addr, k, len, match, octet, octets, zoneId;
- if (ipv6Regexes["native"].test(string)) {
- return expandIPv6(string, 8);
- } else if (match = string.match(ipv6Regexes["transitional"])) {
+ if (ipv6Regexes["native"].test(string)) return expandIPv6(string, 8);
+ else if (match = string.match(ipv6Regexes["transitional"])) {
zoneId = match[6] || "";
addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6);
if (addr.parts) {
@@ -89803,9 +82704,7 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
];
for (k = 0, len = octets.length; k < len; k++) {
octet = octets[k];
- if (!(0 <= octet && octet <= 255)) {
- return null;
- }
+ if (!(0 <= octet && octet <= 255)) return null;
}
addr.parts.push(octets[0] << 8 | octets[1]);
addr.parts.push(octets[2] << 8 | octets[3]);
@@ -89826,45 +82725,32 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
new this(this.parser(string));
return true;
} catch (error1) {
- e = error1;
return false;
}
};
ipaddr.IPv4.isValidFourPartDecimal = function(string) {
- if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) {
- return true;
- } else {
- return false;
- }
+ if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) return true;
+ else return false;
};
ipaddr.IPv6.isValid = function(string) {
var addr, e;
- if (typeof string === "string" && string.indexOf(":") === -1) {
- return false;
- }
+ if (typeof string === "string" && string.indexOf(":") === -1) return false;
try {
addr = this.parser(string);
new this(addr.parts, addr.zoneId);
return true;
} catch (error1) {
- e = error1;
return false;
}
};
ipaddr.IPv4.parse = function(string) {
- var parts;
- parts = this.parser(string);
- if (parts === null) {
- throw new Error("ipaddr: string is not formatted like ip address");
- }
+ var parts = this.parser(string);
+ if (parts === null) throw new Error("ipaddr: string is not formatted like ip address");
return new this(parts);
};
ipaddr.IPv6.parse = function(string) {
- var addr;
- addr = this.parser(string);
- if (addr.parts === null) {
- throw new Error("ipaddr: string is not formatted like ip address");
- }
+ var addr = this.parser(string);
+ if (addr.parts === null) throw new Error("ipaddr: string is not formatted like ip address");
return new this(addr.parts, addr.zoneId);
};
ipaddr.IPv4.parseCIDR = function(string) {
@@ -89884,9 +82770,7 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) {
var filledOctetCount, j, octets;
prefix = parseInt(prefix);
- if (prefix < 0 || prefix > 32) {
- throw new Error("ipaddr: invalid IPv4 prefix length");
- }
+ if (prefix < 0 || prefix > 32) throw new Error("ipaddr: invalid IPv4 prefix length");
octets = [
0,
0,
@@ -89899,9 +82783,7 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
octets[j] = 255;
j++;
}
- if (filledOctetCount < 4) {
- octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - prefix % 8;
- }
+ if (filledOctetCount < 4) octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - prefix % 8;
return new this(octets);
};
ipaddr.IPv4.broadcastAddressFromCIDR = function(string) {
@@ -89918,7 +82800,6 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
return new this(octets);
} catch (error1) {
- error = error1;
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
}
};
@@ -89936,7 +82817,6 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
return new this(octets);
} catch (error1) {
- error = error1;
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
}
};
@@ -89958,51 +82838,35 @@ var require_ipaddr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);
};
ipaddr.parse = function(string) {
- if (ipaddr.IPv6.isValid(string)) {
- return ipaddr.IPv6.parse(string);
- } else if (ipaddr.IPv4.isValid(string)) {
- return ipaddr.IPv4.parse(string);
- } else {
- throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
- }
+ if (ipaddr.IPv6.isValid(string)) return ipaddr.IPv6.parse(string);
+ else if (ipaddr.IPv4.isValid(string)) return ipaddr.IPv4.parse(string);
+ else throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
};
ipaddr.parseCIDR = function(string) {
var e;
try {
return ipaddr.IPv6.parseCIDR(string);
} catch (error1) {
- e = error1;
try {
return ipaddr.IPv4.parseCIDR(string);
} catch (error1) {
- e = error1;
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format");
}
}
};
ipaddr.fromByteArray = function(bytes) {
- var length;
- length = bytes.length;
- if (length === 4) {
- return new ipaddr.IPv4(bytes);
- } else if (length === 16) {
- return new ipaddr.IPv6(bytes);
- } else {
- throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address");
- }
+ var length = bytes.length;
+ if (length === 4) return new ipaddr.IPv4(bytes);
+ else if (length === 16) return new ipaddr.IPv6(bytes);
+ else throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address");
};
ipaddr.process = function(string) {
- var addr;
- addr = this.parse(string);
- if (addr.kind() === "ipv6" && addr.isIPv4MappedAddress()) {
- return addr.toIPv4Address();
- } else {
- return addr;
- }
+ var addr = this.parse(string);
+ if (addr.kind() === "ipv6" && addr.isIPv4MappedAddress()) return addr.toIPv4Address();
+ else return addr;
};
}).call(exports);
}));
-
//#endregion
//#region ../node_modules/proxy-addr/index.js
/*!
@@ -90055,12 +82919,8 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function alladdrs(req, trust) {
var addrs = forwarded(req);
- if (!trust) {
- return addrs;
- }
- if (typeof trust !== "function") {
- trust = compile(trust);
- }
+ if (!trust) return addrs;
+ if (typeof trust !== "function") trust = compile(trust);
for (var i = 0; i < addrs.length - 1; i++) {
if (trust(addrs[i], i)) continue;
addrs.length = i + 1;
@@ -90074,22 +82934,14 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @private
*/
function compile(val) {
- if (!val) {
- throw new TypeError("argument is required");
- }
+ if (!val) throw new TypeError("argument is required");
var trust;
- if (typeof val === "string") {
- trust = [val];
- } else if (Array.isArray(val)) {
- trust = val.slice();
- } else {
- throw new TypeError("unsupported trust argument");
- }
+ if (typeof val === "string") trust = [val];
+ else if (Array.isArray(val)) trust = val.slice();
+ else throw new TypeError("unsupported trust argument");
for (var i = 0; i < trust.length; i++) {
val = trust[i];
- if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) {
- continue;
- }
+ if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) continue;
val = IP_RANGES[val];
trust.splice.apply(trust, [i, 1].concat(val));
i += val.length - 1;
@@ -90104,9 +82956,7 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function compileRangeSubnets(arr) {
var rangeSubnets = new Array(arr.length);
- for (var i = 0; i < arr.length; i++) {
- rangeSubnets[i] = parseipNotation(arr[i]);
- }
+ for (var i = 0; i < arr.length; i++) rangeSubnets[i] = parseipNotation(arr[i]);
return rangeSubnets;
}
/**
@@ -90128,27 +82978,16 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function parseipNotation(note) {
var pos = note.lastIndexOf("/");
var str = pos !== -1 ? note.substring(0, pos) : note;
- if (!isip(str)) {
- throw new TypeError("invalid IP address: " + str);
- }
+ if (!isip(str)) throw new TypeError("invalid IP address: " + str);
var ip = parseip(str);
- if (pos === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) {
- ip = ip.toIPv4Address();
- }
+ if (pos === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) ip = ip.toIPv4Address();
var max = ip.kind() === "ipv6" ? 128 : 32;
var range = pos !== -1 ? note.substring(pos + 1, note.length) : null;
- if (range === null) {
- range = max;
- } else if (DIGIT_REGEXP.test(range)) {
- range = parseInt(range, 10);
- } else if (ip.kind() === "ipv4" && isip(range)) {
- range = parseNetmask(range);
- } else {
- range = null;
- }
- if (range <= 0 || range > max) {
- throw new TypeError("invalid range on address: " + note);
- }
+ if (range === null) range = max;
+ else if (DIGIT_REGEXP.test(range)) range = parseInt(range, 10);
+ else if (ip.kind() === "ipv4" && isip(range)) range = parseNetmask(range);
+ else range = null;
+ if (range <= 0 || range > max) throw new TypeError("invalid range on address: " + note);
return [ip, range];
}
/**
@@ -90159,8 +82998,7 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function parseNetmask(netmask) {
var ip = parseip(netmask);
- var kind = ip.kind();
- return kind === "ipv4" ? ip.prefixLengthFromSubnetMask() : null;
+ return ip.kind() === "ipv4" ? ip.prefixLengthFromSubnetMask() : null;
}
/**
* Determine address of proxied request.
@@ -90170,15 +83008,10 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @public
*/
function proxyaddr(req, trust) {
- if (!req) {
- throw new TypeError("req argument is required");
- }
- if (!trust) {
- throw new TypeError("trust argument is required");
- }
+ if (!req) throw new TypeError("req argument is required");
+ if (!trust) throw new TypeError("trust argument is required");
var addrs = alladdrs(req, trust);
- var addr = addrs[addrs.length - 1];
- return addr;
+ return addrs[addrs.length - 1];
}
/**
* Static trust function to trust nothing.
@@ -90207,17 +83040,11 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var subnetrange = subnet[1];
var trusted = ip;
if (kind !== subnetkind) {
- if (subnetkind === "ipv4" && !ip.isIPv4MappedAddress()) {
- continue;
- }
- if (!ipconv) {
- ipconv = subnetkind === "ipv4" ? ip.toIPv4Address() : ip.toIPv4MappedAddress();
- }
+ if (subnetkind === "ipv4" && !ip.isIPv4MappedAddress()) continue;
+ if (!ipconv) ipconv = subnetkind === "ipv4" ? ip.toIPv4Address() : ip.toIPv4MappedAddress();
trusted = ipconv;
}
- if (trusted.match(subnetip, subnetrange)) {
- return true;
- }
+ if (trusted.match(subnetip, subnetrange)) return true;
}
return false;
};
@@ -90236,54 +83063,44 @@ var require_proxy_addr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return function trust(addr) {
if (!isip(addr)) return false;
var ip = parseip(addr);
- var kind = ip.kind();
- if (kind !== subnetkind) {
- if (subnetisipv4 && !ip.isIPv4MappedAddress()) {
- return false;
- }
+ if (ip.kind() !== subnetkind) {
+ if (subnetisipv4 && !ip.isIPv4MappedAddress()) return false;
ip = subnetisipv4 ? ip.toIPv4Address() : ip.toIPv4MappedAddress();
}
return ip.match(subnetip, subnetrange);
};
}
}));
-
//#endregion
//#region ../node_modules/semver/internal/constants.js
var require_constants$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SEMVER_SPEC_VERSION = "2.0.0";
const MAX_LENGTH = 256;
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
- const MAX_SAFE_COMPONENT_LENGTH = 16;
- const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
- const RELEASE_TYPES = [
- "major",
- "premajor",
- "minor",
- "preminor",
- "patch",
- "prepatch",
- "prerelease"
- ];
module.exports = {
MAX_LENGTH,
- MAX_SAFE_COMPONENT_LENGTH,
- MAX_SAFE_BUILD_LENGTH,
+ MAX_SAFE_COMPONENT_LENGTH: 16,
+ MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
MAX_SAFE_INTEGER,
- RELEASE_TYPES,
+ RELEASE_TYPES: [
+ "major",
+ "premajor",
+ "minor",
+ "preminor",
+ "patch",
+ "prepatch",
+ "prerelease"
+ ],
SEMVER_SPEC_VERSION,
FLAG_INCLUDE_PRERELEASE: 1,
FLAG_LOOSE: 2
};
}));
-
//#endregion
//#region ../node_modules/semver/internal/debug.js
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
- module.exports = debug;
+ module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
}));
-
//#endregion
//#region ../node_modules/semver/internal/re.js
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90303,9 +83120,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
];
const makeSafeRegex = (value) => {
- for (const [token, max] of safeRegexReplacements) {
- value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
- }
+ for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
return value;
};
const createToken = (name, value, isGlobal) => {
@@ -90315,14 +83130,14 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
t[name] = index;
src[index] = value;
safeSrc[index] = safe;
- re[index] = new RegExp(value, isGlobal ? "g" : undefined);
- safeRe[index] = new RegExp(safe, isGlobal ? "g" : undefined);
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
};
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
- createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`);
- createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`);
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
@@ -90336,13 +83151,13 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
createToken("GTLT", "((?:<|>)?=?)");
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?` + `)?)?`);
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?` + `)?)?`);
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
- createToken("COERCEPLAIN", `${"(^|[^\\d])" + "(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
+ createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
- createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?` + `(?:${src[t.BUILD]})?` + `(?:$|[^\\d])`);
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
createToken("COERCERTL", src[t.COERCE], true);
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
createToken("LONETILDE", "(?:~>?)");
@@ -90359,38 +83174,30 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
exports.comparatorTrimReplace = "$1$2$3";
- createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`);
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`);
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
createToken("STAR", "(<|>)?=?\\s*\\*");
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
}));
-
//#endregion
//#region ../node_modules/semver/internal/parse-options.js
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const looseOption = Object.freeze({ loose: true });
const emptyOpts = Object.freeze({});
const parseOptions = (options) => {
- if (!options) {
- return emptyOpts;
- }
- if (typeof options !== "object") {
- return looseOption;
- }
+ if (!options) return emptyOpts;
+ if (typeof options !== "object") return looseOption;
return options;
};
module.exports = parseOptions;
}));
-
//#endregion
//#region ../node_modules/semver/internal/identifiers.js
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const numeric = /^[0-9]+$/;
const compareIdentifiers = (a, b) => {
- if (typeof a === "number" && typeof b === "number") {
- return a === b ? 0 : a < b ? -1 : 1;
- }
+ if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
@@ -90405,7 +83212,6 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
rcompareIdentifiers
};
}));
-
//#endregion
//#region ../node_modules/semver/classes/semver.js
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90414,63 +83220,40 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { safeRe: re, t } = require_re();
const parseOptions = require_parse_options();
const { compareIdentifiers } = require_identifiers();
- var SemVer = class SemVer {
+ module.exports = class SemVer {
constructor(version, options) {
options = parseOptions(options);
- if (version instanceof SemVer) {
- if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
- return version;
- } else {
- version = version.version;
- }
- } else if (typeof version !== "string") {
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
- }
- if (version.length > MAX_LENGTH) {
- throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
- }
+ if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
+ else version = version.version;
+ else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
+ if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
debug("SemVer", version, options);
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
- if (!m) {
- throw new TypeError(`Invalid Version: ${version}`);
- }
+ if (!m) throw new TypeError(`Invalid Version: ${version}`);
this.raw = version;
this.major = +m[1];
this.minor = +m[2];
this.patch = +m[3];
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
- throw new TypeError("Invalid major version");
- }
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
- throw new TypeError("Invalid minor version");
- }
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
- throw new TypeError("Invalid patch version");
- }
- if (!m[4]) {
- this.prerelease = [];
- } else {
- this.prerelease = m[4].split(".").map((id) => {
- if (/^[0-9]+$/.test(id)) {
- const num = +id;
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
- return num;
- }
- }
- return id;
- });
- }
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
+ if (!m[4]) this.prerelease = [];
+ else this.prerelease = m[4].split(".").map((id) => {
+ if (/^[0-9]+$/.test(id)) {
+ const num = +id;
+ if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
+ }
+ return id;
+ });
this.build = m[5] ? m[5].split(".") : [];
this.format();
}
format() {
this.version = `${this.major}.${this.minor}.${this.patch}`;
- if (this.prerelease.length) {
- this.version += `-${this.prerelease.join(".")}`;
- }
+ if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
return this.version;
}
toString() {
@@ -90479,101 +83262,59 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
compare(other) {
debug("SemVer.compare", this.version, this.options, other);
if (!(other instanceof SemVer)) {
- if (typeof other === "string" && other === this.version) {
- return 0;
- }
+ if (typeof other === "string" && other === this.version) return 0;
other = new SemVer(other, this.options);
}
- if (other.version === this.version) {
- return 0;
- }
+ if (other.version === this.version) return 0;
return this.compareMain(other) || this.comparePre(other);
}
compareMain(other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options);
- }
- if (this.major < other.major) {
- return -1;
- }
- if (this.major > other.major) {
- return 1;
- }
- if (this.minor < other.minor) {
- return -1;
- }
- if (this.minor > other.minor) {
- return 1;
- }
- if (this.patch < other.patch) {
- return -1;
- }
- if (this.patch > other.patch) {
- return 1;
- }
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
+ if (this.major < other.major) return -1;
+ if (this.major > other.major) return 1;
+ if (this.minor < other.minor) return -1;
+ if (this.minor > other.minor) return 1;
+ if (this.patch < other.patch) return -1;
+ if (this.patch > other.patch) return 1;
return 0;
}
comparePre(other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options);
- }
- if (this.prerelease.length && !other.prerelease.length) {
- return -1;
- } else if (!this.prerelease.length && other.prerelease.length) {
- return 1;
- } else if (!this.prerelease.length && !other.prerelease.length) {
- return 0;
- }
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
+ if (this.prerelease.length && !other.prerelease.length) return -1;
+ else if (!this.prerelease.length && other.prerelease.length) return 1;
+ else if (!this.prerelease.length && !other.prerelease.length) return 0;
let i = 0;
do {
const a = this.prerelease[i];
const b = other.prerelease[i];
debug("prerelease compare", i, a, b);
- if (a === undefined && b === undefined) {
- return 0;
- } else if (b === undefined) {
- return 1;
- } else if (a === undefined) {
- return -1;
- } else if (a === b) {
- continue;
- } else {
- return compareIdentifiers(a, b);
- }
+ if (a === void 0 && b === void 0) return 0;
+ else if (b === void 0) return 1;
+ else if (a === void 0) return -1;
+ else if (a === b) continue;
+ else return compareIdentifiers(a, b);
} while (++i);
}
compareBuild(other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options);
- }
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
let i = 0;
do {
const a = this.build[i];
const b = other.build[i];
debug("build compare", i, a, b);
- if (a === undefined && b === undefined) {
- return 0;
- } else if (b === undefined) {
- return 1;
- } else if (a === undefined) {
- return -1;
- } else if (a === b) {
- continue;
- } else {
- return compareIdentifiers(a, b);
- }
+ if (a === void 0 && b === void 0) return 0;
+ else if (b === void 0) return 1;
+ else if (a === void 0) return -1;
+ else if (a === b) continue;
+ else return compareIdentifiers(a, b);
} while (++i);
}
inc(release, identifier, identifierBase) {
if (release.startsWith("pre")) {
- if (!identifier && identifierBase === false) {
- throw new Error("invalid increment argument: identifier is empty");
- }
+ if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
if (identifier) {
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
- if (!match || match[1] !== identifier) {
- throw new Error(`invalid identifier: ${identifier}`);
- }
+ if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
}
}
switch (release) {
@@ -90596,104 +83337,74 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.inc("pre", identifier, identifierBase);
break;
case "prerelease":
- if (this.prerelease.length === 0) {
- this.inc("patch", identifier, identifierBase);
- }
+ if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
this.inc("pre", identifier, identifierBase);
break;
case "release":
- if (this.prerelease.length === 0) {
- throw new Error(`version ${this.raw} is not a prerelease`);
- }
+ if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
this.prerelease.length = 0;
break;
case "major":
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
- this.major++;
- }
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
this.minor = 0;
this.patch = 0;
this.prerelease = [];
break;
case "minor":
- if (this.patch !== 0 || this.prerelease.length === 0) {
- this.minor++;
- }
+ if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
this.patch = 0;
this.prerelease = [];
break;
case "patch":
- if (this.prerelease.length === 0) {
- this.patch++;
- }
+ if (this.prerelease.length === 0) this.patch++;
this.prerelease = [];
break;
case "pre": {
const base = Number(identifierBase) ? 1 : 0;
- if (this.prerelease.length === 0) {
- this.prerelease = [base];
- } else {
+ if (this.prerelease.length === 0) this.prerelease = [base];
+ else {
let i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === "number") {
- this.prerelease[i]++;
- i = -2;
- }
+ while (--i >= 0) if (typeof this.prerelease[i] === "number") {
+ this.prerelease[i]++;
+ i = -2;
}
if (i === -1) {
- if (identifier === this.prerelease.join(".") && identifierBase === false) {
- throw new Error("invalid increment argument: identifier already exists");
- }
+ if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
this.prerelease.push(base);
}
}
if (identifier) {
let prerelease = [identifier, base];
- if (identifierBase === false) {
- prerelease = [identifier];
- }
+ if (identifierBase === false) prerelease = [identifier];
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
- if (isNaN(this.prerelease[1])) {
- this.prerelease = prerelease;
- }
- } else {
- this.prerelease = prerelease;
- }
+ if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
+ } else this.prerelease = prerelease;
}
break;
}
default: throw new Error(`invalid increment argument: ${release}`);
}
this.raw = this.format();
- if (this.build.length) {
- this.raw += `+${this.build.join(".")}`;
- }
+ if (this.build.length) this.raw += `+${this.build.join(".")}`;
return this;
}
};
- module.exports = SemVer;
}));
-
//#endregion
//#region ../node_modules/semver/functions/parse.js
var require_parse$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SemVer = require_semver$1();
const parse = (version, options, throwErrors = false) => {
- if (version instanceof SemVer) {
- return version;
- }
+ if (version instanceof SemVer) return version;
try {
return new SemVer(version, options);
} catch (er) {
- if (!throwErrors) {
- return null;
- }
+ if (!throwErrors) return null;
throw er;
}
};
module.exports = parse;
}));
-
//#endregion
//#region ../node_modules/semver/functions/valid.js
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90704,7 +83415,6 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = valid;
}));
-
//#endregion
//#region ../node_modules/semver/functions/clean.js
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90715,7 +83425,6 @@ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = clean;
}));
-
//#endregion
//#region ../node_modules/semver/functions/inc.js
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90724,7 +83433,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (typeof options === "string") {
identifierBase = identifier;
identifier = options;
- options = undefined;
+ options = void 0;
}
try {
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
@@ -90734,7 +83443,6 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = inc;
}));
-
//#endregion
//#region ../node_modules/semver/functions/diff.js
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90743,40 +83451,26 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const v1 = parse(version1, null, true);
const v2 = parse(version2, null, true);
const comparison = v1.compare(v2);
- if (comparison === 0) {
- return null;
- }
+ if (comparison === 0) return null;
const v1Higher = comparison > 0;
const highVersion = v1Higher ? v1 : v2;
const lowVersion = v1Higher ? v2 : v1;
const highHasPre = !!highVersion.prerelease.length;
- const lowHasPre = !!lowVersion.prerelease.length;
- if (lowHasPre && !highHasPre) {
- if (!lowVersion.patch && !lowVersion.minor) {
- return "major";
- }
+ if (!!lowVersion.prerelease.length && !highHasPre) {
+ if (!lowVersion.patch && !lowVersion.minor) return "major";
if (lowVersion.compareMain(highVersion) === 0) {
- if (lowVersion.minor && !lowVersion.patch) {
- return "minor";
- }
+ if (lowVersion.minor && !lowVersion.patch) return "minor";
return "patch";
}
}
const prefix = highHasPre ? "pre" : "";
- if (v1.major !== v2.major) {
- return prefix + "major";
- }
- if (v1.minor !== v2.minor) {
- return prefix + "minor";
- }
- if (v1.patch !== v2.patch) {
- return prefix + "patch";
- }
+ if (v1.major !== v2.major) return prefix + "major";
+ if (v1.minor !== v2.minor) return prefix + "minor";
+ if (v1.patch !== v2.patch) return prefix + "patch";
return "prerelease";
};
module.exports = diff;
}));
-
//#endregion
//#region ../node_modules/semver/functions/major.js
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90784,7 +83478,6 @@ var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const major = (a, loose) => new SemVer(a, loose).major;
module.exports = major;
}));
-
//#endregion
//#region ../node_modules/semver/functions/minor.js
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90792,7 +83485,6 @@ var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const minor = (a, loose) => new SemVer(a, loose).minor;
module.exports = minor;
}));
-
//#endregion
//#region ../node_modules/semver/functions/patch.js
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90800,7 +83492,6 @@ var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const patch = (a, loose) => new SemVer(a, loose).patch;
module.exports = patch;
}));
-
//#endregion
//#region ../node_modules/semver/functions/prerelease.js
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90811,7 +83502,6 @@ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = prerelease;
}));
-
//#endregion
//#region ../node_modules/semver/functions/compare.js
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90819,7 +83509,6 @@ var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module.exports = compare;
}));
-
//#endregion
//#region ../node_modules/semver/functions/rcompare.js
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90827,7 +83516,6 @@ var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const rcompare = (a, b, loose) => compare(b, a, loose);
module.exports = rcompare;
}));
-
//#endregion
//#region ../node_modules/semver/functions/compare-loose.js
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90835,7 +83523,6 @@ var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) =>
const compareLoose = (a, b) => compare(a, b, true);
module.exports = compareLoose;
}));
-
//#endregion
//#region ../node_modules/semver/functions/compare-build.js
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90847,7 +83534,6 @@ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
};
module.exports = compareBuild;
}));
-
//#endregion
//#region ../node_modules/semver/functions/sort.js
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90855,7 +83541,6 @@ var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
module.exports = sort;
}));
-
//#endregion
//#region ../node_modules/semver/functions/rsort.js
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90863,7 +83548,6 @@ var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
module.exports = rsort;
}));
-
//#endregion
//#region ../node_modules/semver/functions/gt.js
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90871,7 +83555,6 @@ var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const gt = (a, b, loose) => compare(a, b, loose) > 0;
module.exports = gt;
}));
-
//#endregion
//#region ../node_modules/semver/functions/lt.js
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90879,7 +83562,6 @@ var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const lt = (a, b, loose) => compare(a, b, loose) < 0;
module.exports = lt;
}));
-
//#endregion
//#region ../node_modules/semver/functions/eq.js
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90887,7 +83569,6 @@ var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const eq = (a, b, loose) => compare(a, b, loose) === 0;
module.exports = eq;
}));
-
//#endregion
//#region ../node_modules/semver/functions/neq.js
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90895,7 +83576,6 @@ var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
module.exports = neq;
}));
-
//#endregion
//#region ../node_modules/semver/functions/gte.js
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90903,7 +83583,6 @@ var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
module.exports = gte;
}));
-
//#endregion
//#region ../node_modules/semver/functions/lte.js
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90911,7 +83590,6 @@ var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
module.exports = lte;
}));
-
//#endregion
//#region ../node_modules/semver/functions/cmp.js
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90924,20 +83602,12 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const cmp = (a, op, b, loose) => {
switch (op) {
case "===":
- if (typeof a === "object") {
- a = a.version;
- }
- if (typeof b === "object") {
- b = b.version;
- }
+ if (typeof a === "object") a = a.version;
+ if (typeof b === "object") b = b.version;
return a === b;
case "!==":
- if (typeof a === "object") {
- a = a.version;
- }
- if (typeof b === "object") {
- b = b.version;
- }
+ if (typeof a === "object") a = a.version;
+ if (typeof b === "object") b = b.version;
return a !== b;
case "":
case "=":
@@ -90952,7 +83622,6 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = cmp;
}));
-
//#endregion
//#region ../node_modules/semver/functions/coerce.js
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -90960,56 +83629,39 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const parse = require_parse$5();
const { safeRe: re, t } = require_re();
const coerce = (version, options) => {
- if (version instanceof SemVer) {
- return version;
- }
- if (typeof version === "number") {
- version = String(version);
- }
- if (typeof version !== "string") {
- return null;
- }
+ if (version instanceof SemVer) return version;
+ if (typeof version === "number") version = String(version);
+ if (typeof version !== "string") return null;
options = options || {};
let match = null;
- if (!options.rtl) {
- match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
- } else {
+ if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
+ else {
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
let next;
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
- if (!match || next.index + next[0].length !== match.index + match[0].length) {
- match = next;
- }
+ if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
}
coerceRtlRegex.lastIndex = -1;
}
- if (match === null) {
- return null;
- }
+ if (match === null) return null;
const major = match[2];
- const minor = match[3] || "0";
- const patch = match[4] || "0";
- const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
- const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
- return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
+ return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
};
module.exports = coerce;
}));
-
//#endregion
//#region ../node_modules/semver/internal/lrucache.js
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var LRUCache = class {
constructor() {
this.max = 1e3;
- this.map = new Map();
+ this.map = /* @__PURE__ */ new Map();
}
get(key) {
const value = this.map.get(key);
- if (value === undefined) {
- return undefined;
- } else {
+ if (value === void 0) return;
+ else {
this.map.delete(key);
this.map.set(key, value);
return value;
@@ -91019,8 +83671,7 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this.map.delete(key);
}
set(key, value) {
- const deleted = this.delete(key);
- if (!deleted && value !== undefined) {
+ if (!this.delete(key) && value !== void 0) {
if (this.map.size >= this.max) {
const firstKey = this.map.keys().next().value;
this.delete(firstKey);
@@ -91032,25 +83683,19 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = LRUCache;
}));
-
//#endregion
//#region ../node_modules/semver/classes/range.js
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SPACE_CHARACTERS = /\s+/g;
- var Range = class Range {
+ module.exports = class Range {
constructor(range, options) {
options = parseOptions(options);
- if (range instanceof Range) {
- if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
- return range;
- } else {
- return new Range(range.raw, options);
- }
- }
+ if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
+ else return new Range(range.raw, options);
if (range instanceof Comparator) {
this.raw = range.value;
this.set = [[range]];
- this.formatted = undefined;
+ this.formatted = void 0;
return this;
}
this.options = options;
@@ -91058,37 +83703,28 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.includePrerelease = !!options.includePrerelease;
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
- if (!this.set.length) {
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
- }
+ if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
if (this.set.length > 1) {
const first = this.set[0];
this.set = this.set.filter((c) => !isNullSet(c[0]));
- if (this.set.length === 0) {
- this.set = [first];
- } else if (this.set.length > 1) {
- for (const c of this.set) {
- if (c.length === 1 && isAny(c[0])) {
- this.set = [c];
- break;
- }
+ if (this.set.length === 0) this.set = [first];
+ else if (this.set.length > 1) {
+ for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
+ this.set = [c];
+ break;
}
}
}
- this.formatted = undefined;
+ this.formatted = void 0;
}
get range() {
- if (this.formatted === undefined) {
+ if (this.formatted === void 0) {
this.formatted = "";
for (let i = 0; i < this.set.length; i++) {
- if (i > 0) {
- this.formatted += "||";
- }
+ if (i > 0) this.formatted += "||";
const comps = this.set[i];
for (let k = 0; k < comps.length; k++) {
- if (k > 0) {
- this.formatted += " ";
- }
+ if (k > 0) this.formatted += " ";
this.formatted += comps[k].toString().trim();
}
}
@@ -91102,12 +83738,9 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this.range;
}
parseRange(range) {
- const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
- const memoKey = memoOpts + ":" + range;
+ const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
const cached = cache.get(memoKey);
- if (cached) {
- return cached;
- }
+ if (cached) return cached;
const loose = this.options.loose;
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
@@ -91119,32 +83752,24 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
debug("caret trim", range);
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
- if (loose) {
- rangeList = rangeList.filter((comp) => {
- debug("loose invalid filter", comp, this.options);
- return !!comp.match(re[t.COMPARATORLOOSE]);
- });
- }
+ if (loose) rangeList = rangeList.filter((comp) => {
+ debug("loose invalid filter", comp, this.options);
+ return !!comp.match(re[t.COMPARATORLOOSE]);
+ });
debug("range list", rangeList);
- const rangeMap = new Map();
+ const rangeMap = /* @__PURE__ */ new Map();
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
for (const comp of comparators) {
- if (isNullSet(comp)) {
- return [comp];
- }
+ if (isNullSet(comp)) return [comp];
rangeMap.set(comp.value, comp);
}
- if (rangeMap.size > 1 && rangeMap.has("")) {
- rangeMap.delete("");
- }
+ if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
const result = [...rangeMap.values()];
cache.set(memoKey, result);
return result;
}
intersects(range, options) {
- if (!(range instanceof Range)) {
- throw new TypeError("a Range is required");
- }
+ if (!(range instanceof Range)) throw new TypeError("a Range is required");
return this.set.some((thisComparators) => {
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
@@ -91156,27 +83781,17 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
}
test(version) {
- if (!version) {
+ if (!version) return false;
+ if (typeof version === "string") try {
+ version = new SemVer(version, this.options);
+ } catch (er) {
return false;
}
- if (typeof version === "string") {
- try {
- version = new SemVer(version, this.options);
- } catch (er) {
- return false;
- }
- }
- for (let i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version, this.options)) {
- return true;
- }
- }
+ for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
return false;
}
};
- module.exports = Range;
- const LRU = require_lrucache();
- const cache = new LRU();
+ const cache = new (require_lrucache())();
const parseOptions = require_parse_options();
const Comparator = require_comparator();
const debug = require_debug();
@@ -91219,18 +83834,13 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return comp.replace(r, (_, M, m, p, pr) => {
debug("tilde", comp, _, M, m, p, pr);
let ret;
- if (isX(M)) {
- ret = "";
- } else if (isX(m)) {
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
- } else if (isX(p)) {
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
- } else if (pr) {
+ if (isX(M)) ret = "";
+ else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
+ else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
+ else if (pr) {
debug("replaceTilde pr", pr);
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
- } else {
- ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
- }
+ } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
debug("tilde return", ret);
return ret;
});
@@ -91245,38 +83855,20 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return comp.replace(r, (_, M, m, p, pr) => {
debug("caret", comp, _, M, m, p, pr);
let ret;
- if (isX(M)) {
- ret = "";
- } else if (isX(m)) {
- ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
- } else if (isX(p)) {
- if (M === "0") {
- ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
- } else {
- ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
- }
- } else if (pr) {
+ if (isX(M)) ret = "";
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
+ else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
+ else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
+ else if (pr) {
debug("replaceCaret pr", pr);
- if (M === "0") {
- if (m === "0") {
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
- } else {
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
- }
- } else {
- ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
- }
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
+ else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
+ else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
} else {
debug("no pr");
- if (M === "0") {
- if (m === "0") {
- ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
- } else {
- ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
- }
- } else {
- ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
- }
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
+ else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
+ else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
}
debug("caret return", ret);
return ret;
@@ -91295,20 +83887,12 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const xm = xM || isX(m);
const xp = xm || isX(p);
const anyX = xp;
- if (gtlt === "=" && anyX) {
- gtlt = "";
- }
+ if (gtlt === "=" && anyX) gtlt = "";
pr = options.includePrerelease ? "-0" : "";
- if (xM) {
- if (gtlt === ">" || gtlt === "<") {
- ret = "<0.0.0-0";
- } else {
- ret = "*";
- }
- } else if (gtlt && anyX) {
- if (xm) {
- m = 0;
- }
+ if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
+ else ret = "*";
+ else if (gtlt && anyX) {
+ if (xm) m = 0;
p = 0;
if (gtlt === ">") {
gtlt = ">=";
@@ -91322,21 +83906,13 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
} else if (gtlt === "<=") {
gtlt = "<";
- if (xm) {
- M = +M + 1;
- } else {
- m = +m + 1;
- }
- }
- if (gtlt === "<") {
- pr = "-0";
+ if (xm) M = +M + 1;
+ else m = +m + 1;
}
+ if (gtlt === "<") pr = "-0";
ret = `${gtlt + M}.${m}.${p}${pr}`;
- } else if (xm) {
- ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
- } else if (xp) {
- ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
- }
+ } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
+ else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
debug("xRange return", ret);
return ret;
});
@@ -91350,49 +83926,28 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
};
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
- if (isX(fM)) {
- from = "";
- } else if (isX(fm)) {
- from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
- } else if (isX(fp)) {
- from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
- } else if (fpr) {
- from = `>=${from}`;
- } else {
- from = `>=${from}${incPr ? "-0" : ""}`;
- }
- if (isX(tM)) {
- to = "";
- } else if (isX(tm)) {
- to = `<${+tM + 1}.0.0-0`;
- } else if (isX(tp)) {
- to = `<${tM}.${+tm + 1}.0-0`;
- } else if (tpr) {
- to = `<=${tM}.${tm}.${tp}-${tpr}`;
- } else if (incPr) {
- to = `<${tM}.${tm}.${+tp + 1}-0`;
- } else {
- to = `<=${to}`;
- }
+ if (isX(fM)) from = "";
+ else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
+ else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
+ else if (fpr) from = `>=${from}`;
+ else from = `>=${from}${incPr ? "-0" : ""}`;
+ if (isX(tM)) to = "";
+ else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
+ else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
+ else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
+ else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
+ else to = `<=${to}`;
return `${from} ${to}`.trim();
};
const testSet = (set, version, options) => {
- for (let i = 0; i < set.length; i++) {
- if (!set[i].test(version)) {
- return false;
- }
- }
+ for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
if (version.prerelease.length && !options.includePrerelease) {
for (let i = 0; i < set.length; i++) {
debug(set[i].semver);
- if (set[i].semver === Comparator.ANY) {
- continue;
- }
+ if (set[i].semver === Comparator.ANY) continue;
if (set[i].semver.prerelease.length > 0) {
const allowed = set[i].semver;
- if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
- return true;
- }
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
}
}
return false;
@@ -91400,110 +83955,69 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return true;
};
}));
-
//#endregion
//#region ../node_modules/semver/classes/comparator.js
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const ANY = Symbol("SemVer ANY");
- var Comparator = class Comparator {
+ module.exports = class Comparator {
static get ANY() {
return ANY;
}
constructor(comp, options) {
options = parseOptions(options);
- if (comp instanceof Comparator) {
- if (comp.loose === !!options.loose) {
- return comp;
- } else {
- comp = comp.value;
- }
- }
+ if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
+ else comp = comp.value;
comp = comp.trim().split(/\s+/).join(" ");
debug("comparator", comp, options);
this.options = options;
this.loose = !!options.loose;
this.parse(comp);
- if (this.semver === ANY) {
- this.value = "";
- } else {
- this.value = this.operator + this.semver.version;
- }
+ if (this.semver === ANY) this.value = "";
+ else this.value = this.operator + this.semver.version;
debug("comp", this);
}
parse(comp) {
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
const m = comp.match(r);
- if (!m) {
- throw new TypeError(`Invalid comparator: ${comp}`);
- }
- this.operator = m[1] !== undefined ? m[1] : "";
- if (this.operator === "=") {
- this.operator = "";
- }
- if (!m[2]) {
- this.semver = ANY;
- } else {
- this.semver = new SemVer(m[2], this.options.loose);
- }
+ if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
+ this.operator = m[1] !== void 0 ? m[1] : "";
+ if (this.operator === "=") this.operator = "";
+ if (!m[2]) this.semver = ANY;
+ else this.semver = new SemVer(m[2], this.options.loose);
}
toString() {
return this.value;
}
test(version) {
debug("Comparator.test", version, this.options.loose);
- if (this.semver === ANY || version === ANY) {
- return true;
- }
- if (typeof version === "string") {
- try {
- version = new SemVer(version, this.options);
- } catch (er) {
- return false;
- }
+ if (this.semver === ANY || version === ANY) return true;
+ if (typeof version === "string") try {
+ version = new SemVer(version, this.options);
+ } catch (er) {
+ return false;
}
return cmp(version, this.operator, this.semver, this.options);
}
intersects(comp, options) {
- if (!(comp instanceof Comparator)) {
- throw new TypeError("a Comparator is required");
- }
+ if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
if (this.operator === "") {
- if (this.value === "") {
- return true;
- }
+ if (this.value === "") return true;
return new Range(comp.value, options).test(this.value);
} else if (comp.operator === "") {
- if (comp.value === "") {
- return true;
- }
+ if (comp.value === "") return true;
return new Range(this.value, options).test(comp.semver);
}
options = parseOptions(options);
- if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
- return false;
- }
- if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
- return false;
- }
- if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
- return true;
- }
- if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
- return true;
- }
- if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
- return true;
- }
- if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
- return true;
- }
- if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
- return true;
- }
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
return false;
}
};
- module.exports = Comparator;
const parseOptions = require_parse_options();
const { safeRe: re, t } = require_re();
const cmp = require_cmp();
@@ -91511,7 +84025,6 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SemVer = require_semver$1();
const Range = require_range();
}));
-
//#endregion
//#region ../node_modules/semver/functions/satisfies.js
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91526,7 +84039,6 @@ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = satisfies;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/to-comparators.js
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91534,7 +84046,6 @@ var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) =>
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
module.exports = toComparators;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/max-satisfying.js
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91561,7 +84072,6 @@ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
};
module.exports = maxSatisfying;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/min-satisfying.js
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91588,7 +84098,6 @@ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
};
module.exports = minSatisfying;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/min-version.js
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91598,13 +84107,9 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const minVersion = (range, loose) => {
range = new Range(range, loose);
let minver = new SemVer("0.0.0");
- if (range.test(minver)) {
- return minver;
- }
+ if (range.test(minver)) return minver;
minver = new SemVer("0.0.0-0");
- if (range.test(minver)) {
- return minver;
- }
+ if (range.test(minver)) return minver;
minver = null;
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
@@ -91613,35 +84118,25 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const compver = new SemVer(comparator.semver.version);
switch (comparator.operator) {
case ">":
- if (compver.prerelease.length === 0) {
- compver.patch++;
- } else {
- compver.prerelease.push(0);
- }
+ if (compver.prerelease.length === 0) compver.patch++;
+ else compver.prerelease.push(0);
compver.raw = compver.format();
case "":
case ">=":
- if (!setMin || gt(compver, setMin)) {
- setMin = compver;
- }
+ if (!setMin || gt(compver, setMin)) setMin = compver;
break;
case "<":
case "<=": break;
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
}
});
- if (setMin && (!minver || gt(minver, setMin))) {
- minver = setMin;
- }
- }
- if (minver && range.test(minver)) {
- return minver;
+ if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
}
+ if (minver && range.test(minver)) return minver;
return null;
};
module.exports = minVersion;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/valid.js
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91655,7 +84150,6 @@ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = validRange;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/outside.js
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91689,39 +84183,26 @@ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
break;
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
}
- if (satisfies(version, range, options)) {
- return false;
- }
+ if (satisfies(version, range, options)) return false;
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
let high = null;
let low = null;
comparators.forEach((comparator) => {
- if (comparator.semver === ANY) {
- comparator = new Comparator(">=0.0.0");
- }
+ if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
high = high || comparator;
low = low || comparator;
- if (gtfn(comparator.semver, high.semver, options)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, options)) {
- low = comparator;
- }
+ if (gtfn(comparator.semver, high.semver, options)) high = comparator;
+ else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
});
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
- if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
+ if (high.operator === comp || high.operator === ecomp) return false;
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
+ else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
}
return true;
};
module.exports = outside;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/gtr.js
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91729,7 +84210,6 @@ var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const gtr = (version, range, options) => outside(version, range, ">", options);
module.exports = gtr;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/ltr.js
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91737,7 +84217,6 @@ var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const ltr = (version, range, options) => outside(version, range, "<", options);
module.exports = ltr;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/intersects.js
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91749,7 +84228,6 @@ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = intersects;
}));
-
//#endregion
//#region ../node_modules/semver/ranges/simplify.js
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91760,44 +84238,26 @@ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare(a, b, options));
- for (const version of v) {
- const included = satisfies(version, range, options);
- if (included) {
- prev = version;
- if (!first) {
- first = version;
- }
- } else {
- if (prev) {
- set.push([first, prev]);
- }
- prev = null;
- first = null;
- }
- }
- if (first) {
- set.push([first, null]);
+ for (const version of v) if (satisfies(version, range, options)) {
+ prev = version;
+ if (!first) first = version;
+ } else {
+ if (prev) set.push([first, prev]);
+ prev = null;
+ first = null;
}
+ if (first) set.push([first, null]);
const ranges = [];
- for (const [min, max] of set) {
- if (min === max) {
- ranges.push(min);
- } else if (!max && min === v[0]) {
- ranges.push("*");
- } else if (!max) {
- ranges.push(`>=${min}`);
- } else if (min === v[0]) {
- ranges.push(`<=${max}`);
- } else {
- ranges.push(`${min} - ${max}`);
- }
- }
+ for (const [min, max] of set) if (min === max) ranges.push(min);
+ else if (!max && min === v[0]) ranges.push("*");
+ else if (!max) ranges.push(`>=${min}`);
+ else if (min === v[0]) ranges.push(`<=${max}`);
+ else ranges.push(`${min} - ${max}`);
const simplified = ranges.join(" || ");
const original = typeof range.raw === "string" ? range.raw : String(range);
return simplified.length < original.length ? simplified : range;
};
}));
-
//#endregion
//#region ../node_modules/semver/ranges/subset.js
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91807,9 +84267,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const satisfies = require_satisfies();
const compare = require_compare();
const subset = (sub, dom, options = {}) => {
- if (sub === dom) {
- return true;
- }
+ if (sub === dom) return true;
sub = new Range(sub, options);
dom = new Range(dom, options);
let sawNonNull = false;
@@ -91817,147 +84275,84 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (const simpleDom of dom.set) {
const isSub = simpleSubset(simpleSub, simpleDom, options);
sawNonNull = sawNonNull || isSub !== null;
- if (isSub) {
- continue OUTER;
- }
- }
- if (sawNonNull) {
- return false;
+ if (isSub) continue OUTER;
}
+ if (sawNonNull) return false;
}
return true;
};
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
const minimumVersion = [new Comparator(">=0.0.0")];
const simpleSubset = (sub, dom, options) => {
- if (sub === dom) {
- return true;
- }
- if (sub.length === 1 && sub[0].semver === ANY) {
- if (dom.length === 1 && dom[0].semver === ANY) {
- return true;
- } else if (options.includePrerelease) {
- sub = minimumVersionWithPreRelease;
- } else {
- sub = minimumVersion;
- }
- }
- if (dom.length === 1 && dom[0].semver === ANY) {
- if (options.includePrerelease) {
- return true;
- } else {
- dom = minimumVersion;
- }
- }
- const eqSet = new Set();
+ if (sub === dom) return true;
+ if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
+ else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
+ else sub = minimumVersion;
+ if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
+ else dom = minimumVersion;
+ const eqSet = /* @__PURE__ */ new Set();
let gt, lt;
- for (const c of sub) {
- if (c.operator === ">" || c.operator === ">=") {
- gt = higherGT(gt, c, options);
- } else if (c.operator === "<" || c.operator === "<=") {
- lt = lowerLT(lt, c, options);
- } else {
- eqSet.add(c.semver);
- }
- }
- if (eqSet.size > 1) {
- return null;
- }
+ for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
+ else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
+ else eqSet.add(c.semver);
+ if (eqSet.size > 1) return null;
let gtltComp;
if (gt && lt) {
gtltComp = compare(gt.semver, lt.semver, options);
- if (gtltComp > 0) {
- return null;
- } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
- return null;
- }
+ if (gtltComp > 0) return null;
+ else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
}
for (const eq of eqSet) {
- if (gt && !satisfies(eq, String(gt), options)) {
- return null;
- }
- if (lt && !satisfies(eq, String(lt), options)) {
- return null;
- }
- for (const c of dom) {
- if (!satisfies(eq, String(c), options)) {
- return false;
- }
- }
+ if (gt && !satisfies(eq, String(gt), options)) return null;
+ if (lt && !satisfies(eq, String(lt), options)) return null;
+ for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
return true;
}
let higher, lower;
let hasDomLT, hasDomGT;
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
- if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
- needDomLTPre = false;
- }
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
for (const c of dom) {
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
if (gt) {
if (needDomGTPre) {
- if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
- needDomGTPre = false;
- }
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
}
if (c.operator === ">" || c.operator === ">=") {
higher = higherGT(gt, c, options);
- if (higher === c && higher !== gt) {
- return false;
- }
- } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
- return false;
- }
+ if (higher === c && higher !== gt) return false;
+ } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
}
if (lt) {
if (needDomLTPre) {
- if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
- needDomLTPre = false;
- }
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
}
if (c.operator === "<" || c.operator === "<=") {
lower = lowerLT(lt, c, options);
- if (lower === c && lower !== lt) {
- return false;
- }
- } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
- return false;
- }
- }
- if (!c.operator && (lt || gt) && gtltComp !== 0) {
- return false;
+ if (lower === c && lower !== lt) return false;
+ } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
}
+ if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
}
- if (gt && hasDomLT && !lt && gtltComp !== 0) {
- return false;
- }
- if (lt && hasDomGT && !gt && gtltComp !== 0) {
- return false;
- }
- if (needDomGTPre || needDomLTPre) {
- return false;
- }
+ if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
+ if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
+ if (needDomGTPre || needDomLTPre) return false;
return true;
};
const higherGT = (a, b, options) => {
- if (!a) {
- return b;
- }
+ if (!a) return b;
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
const lowerLT = (a, b, options) => {
- if (!a) {
- return b;
- }
+ if (!a) return b;
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module.exports = subset;
}));
-
//#endregion
//#region ../node_modules/semver/index.js
var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -91965,81 +84360,44 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const constants = require_constants$5();
const SemVer = require_semver$1();
const identifiers = require_identifiers();
- const parse = require_parse$5();
- const valid = require_valid$1();
- const clean = require_clean();
- const inc = require_inc();
- const diff = require_diff();
- const major = require_major();
- const minor = require_minor();
- const patch = require_patch();
- const prerelease = require_prerelease();
- const compare = require_compare();
- const rcompare = require_rcompare();
- const compareLoose = require_compare_loose();
- const compareBuild = require_compare_build();
- const sort = require_sort();
- const rsort = require_rsort();
- const gt = require_gt();
- const lt = require_lt();
- const eq = require_eq();
- const neq = require_neq();
- const gte = require_gte();
- const lte = require_lte();
- const cmp = require_cmp();
- const coerce = require_coerce();
- const Comparator = require_comparator();
- const Range = require_range();
- const satisfies = require_satisfies();
- const toComparators = require_to_comparators();
- const maxSatisfying = require_max_satisfying();
- const minSatisfying = require_min_satisfying();
- const minVersion = require_min_version();
- const validRange = require_valid();
- const outside = require_outside();
- const gtr = require_gtr();
- const ltr = require_ltr();
- const intersects = require_intersects();
- const simplifyRange = require_simplify();
- const subset = require_subset();
module.exports = {
- parse,
- valid,
- clean,
- inc,
- diff,
- major,
- minor,
- patch,
- prerelease,
- compare,
- rcompare,
- compareLoose,
- compareBuild,
- sort,
- rsort,
- gt,
- lt,
- eq,
- neq,
- gte,
- lte,
- cmp,
- coerce,
- Comparator,
- Range,
- satisfies,
- toComparators,
- maxSatisfying,
- minSatisfying,
- minVersion,
- validRange,
- outside,
- gtr,
- ltr,
- intersects,
- simplifyRange,
- subset,
+ parse: require_parse$5(),
+ valid: require_valid$1(),
+ clean: require_clean(),
+ inc: require_inc(),
+ diff: require_diff(),
+ major: require_major(),
+ minor: require_minor(),
+ patch: require_patch(),
+ prerelease: require_prerelease(),
+ compare: require_compare(),
+ rcompare: require_rcompare(),
+ compareLoose: require_compare_loose(),
+ compareBuild: require_compare_build(),
+ sort: require_sort(),
+ rsort: require_rsort(),
+ gt: require_gt(),
+ lt: require_lt(),
+ eq: require_eq(),
+ neq: require_neq(),
+ gte: require_gte(),
+ lte: require_lte(),
+ cmp: require_cmp(),
+ coerce: require_coerce(),
+ Comparator: require_comparator(),
+ Range: require_range(),
+ satisfies: require_satisfies(),
+ toComparators: require_to_comparators(),
+ maxSatisfying: require_max_satisfying(),
+ minSatisfying: require_min_satisfying(),
+ minVersion: require_min_version(),
+ validRange: require_valid(),
+ outside: require_outside(),
+ gtr: require_gtr(),
+ ltr: require_ltr(),
+ intersects: require_intersects(),
+ simplifyRange: require_simplify(),
+ subset: require_subset(),
SemVer,
re: internalRe.re,
src: internalRe.src,
@@ -92050,7 +84408,6 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
rcompareIdentifiers: identifiers.rcompareIdentifiers
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/request.js
var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -92073,23 +84430,17 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.raw = req;
this.query = query;
this.log = log;
- this.body = undefined;
+ this.body = void 0;
}
Request.props = [];
function getTrustProxyFn(tp) {
- if (typeof tp === "function") {
- return tp;
- }
- if (tp === true) {
- return function() {
- return true;
- };
- }
- if (typeof tp === "number") {
- return function(a, i) {
- return i < tp;
- };
- }
+ if (typeof tp === "function") return tp;
+ if (tp === true) return function() {
+ return true;
+ };
+ if (typeof tp === "number") return function(a, i) {
+ return i < tp;
+ };
if (typeof tp === "string") {
const values = tp.split(",").map((it) => it.trim());
return proxyAddr.compile(values);
@@ -92097,9 +84448,7 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return proxyAddr.compile(tp);
}
function buildRequest(R, trustProxy) {
- if (trustProxy) {
- return buildRequestWithTrustProxy(R, trustProxy);
- }
+ if (trustProxy) return buildRequestWithTrustProxy(R, trustProxy);
return buildRegularRequest(R);
}
function buildRegularRequest(R) {
@@ -92111,7 +84460,7 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.raw = req;
this.query = query;
this.log = log;
- this.body = undefined;
+ this.body = void 0;
var prop;
for (var i = 0; i < props.length; i++) {
prop = props[i];
@@ -92140,18 +84489,12 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return proxyAddr.all(this.raw, proxyFn);
} },
hostname: { get() {
- if (this.ip !== undefined && this.headers["x-forwarded-host"]) {
- return getLastEntryInMultiHeaderValue(this.headers["x-forwarded-host"]);
- }
+ if (this.ip !== void 0 && this.headers["x-forwarded-host"]) return getLastEntryInMultiHeaderValue(this.headers["x-forwarded-host"]);
return this.headers.host || this.headers[":authority"];
} },
protocol: { get() {
- if (this.headers["x-forwarded-proto"]) {
- return getLastEntryInMultiHeaderValue(this.headers["x-forwarded-proto"]);
- }
- if (this.socket) {
- return this.socket.encrypted ? "https" : "http";
- }
+ if (this.headers["x-forwarded-proto"]) return getLastEntryInMultiHeaderValue(this.headers["x-forwarded-proto"]);
+ if (this.socket) return this.socket.encrypted ? "https" : "http";
} }
});
return _Request;
@@ -92165,9 +84508,7 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} },
originalUrl: { get() {
/* istanbul ignore else */
- if (!this[kRequestOriginalUrl]) {
- this[kRequestOriginalUrl] = this.raw.originalUrl || this.raw.url;
- }
+ if (!this[kRequestOriginalUrl]) this[kRequestOriginalUrl] = this.raw.originalUrl || this.raw.url;
return this[kRequestOriginalUrl];
} },
method: { get() {
@@ -92185,7 +84526,7 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const context = this[kRouteContext];
const routeLimit = context._parserOptions.limit;
const serverLimit = context.server.initialConfig.bodyLimit;
- const version = context.server.hasConstraintStrategy("version") ? this.raw.headers["accept-version"] : undefined;
+ const version = context.server.hasConstraintStrategy("version") ? this.raw.headers["accept-version"] : void 0;
const options = {
method: context.config?.method,
url: context.config?.url,
@@ -92216,36 +84557,28 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this[kRouteContext][kPublicRouteContext].schema;
} },
is404: { get() {
- return this[kRouteContext].config?.url === undefined;
+ return this[kRouteContext].config?.url === void 0;
} },
connection: { get() {
/* istanbul ignore next */
- if (semver.gte(process.versions.node, "13.0.0")) {
- FSTDEP005();
- }
+ if (semver.gte(process.versions.node, "13.0.0")) FSTDEP005();
return this.raw.connection;
} },
socket: { get() {
return this.raw.socket;
} },
ip: { get() {
- if (this.socket) {
- return this.socket.remoteAddress;
- }
+ if (this.socket) return this.socket.remoteAddress;
} },
hostname: { get() {
return this.raw.headers.host || this.raw.headers[":authority"];
} },
protocol: { get() {
- if (this.socket) {
- return this.socket.encrypted ? "https" : "http";
- }
+ if (this.socket) return this.socket.encrypted ? "https" : "http";
} },
headers: {
get() {
- if (this.additionalHeaders) {
- return Object.assign({}, this.raw.headers, this.additionalHeaders);
- }
+ if (this.additionalHeaders) return Object.assign({}, this.raw.headers, this.additionalHeaders);
return this.raw.headers;
},
set(headers) {
@@ -92256,25 +84589,18 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (typeof httpPartOrSchema === "string") {
const symbol = HTTP_PART_SYMBOL_MAP[httpPartOrSchema];
return this[kRouteContext][symbol];
- } else if (typeof httpPartOrSchema === "object") {
- return this[kRouteContext][kRequestCacheValidateFns]?.get(httpPartOrSchema);
- }
+ } else if (typeof httpPartOrSchema === "object") return this[kRouteContext][kRequestCacheValidateFns]?.get(httpPartOrSchema);
} },
compileValidationSchema: { value: function(schema, httpPart = null) {
const { method, url } = this;
- if (this[kRouteContext][kRequestCacheValidateFns]?.has(schema)) {
- return this[kRouteContext][kRequestCacheValidateFns].get(schema);
- }
- const validatorCompiler = this[kRouteContext].validatorCompiler || this.server[kSchemaController].validatorCompiler || this.server[kSchemaController].setupValidator(this.server[kOptions]) || this.server[kSchemaController].validatorCompiler;
- const validateFn = validatorCompiler({
+ if (this[kRouteContext][kRequestCacheValidateFns]?.has(schema)) return this[kRouteContext][kRequestCacheValidateFns].get(schema);
+ const validateFn = (this[kRouteContext].validatorCompiler || this.server[kSchemaController].validatorCompiler || this.server[kSchemaController].setupValidator(this.server[kOptions]) || this.server[kSchemaController].validatorCompiler)({
schema,
method,
url,
httpPart
});
- if (this[kRouteContext][kRequestCacheValidateFns] == null) {
- this[kRouteContext][kRequestCacheValidateFns] = new WeakMap();
- }
+ if (this[kRouteContext][kRequestCacheValidateFns] == null) this[kRouteContext][kRequestCacheValidateFns] = /* @__PURE__ */ new WeakMap();
this[kRouteContext][kRequestCacheValidateFns].set(schema, validateFn);
return validateFn;
} },
@@ -92282,26 +84608,16 @@ var require_request$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
httpPart = typeof schema === "string" ? schema : httpPart;
const symbol = httpPart != null && typeof httpPart === "string" && HTTP_PART_SYMBOL_MAP[httpPart];
let validate;
- if (symbol) {
- validate = this[kRouteContext][symbol];
- }
- if (validate == null && (schema == null || typeof schema !== "object" || Array.isArray(schema))) {
- throw new FST_ERR_REQ_INVALID_VALIDATION_INVOCATION(httpPart);
- }
- if (validate == null) {
- if (this[kRouteContext][kRequestCacheValidateFns]?.has(schema)) {
- validate = this[kRouteContext][kRequestCacheValidateFns].get(schema);
- } else {
- validate = this.compileValidationSchema(schema, httpPart);
- }
- }
+ if (symbol) validate = this[kRouteContext][symbol];
+ if (validate == null && (schema == null || typeof schema !== "object" || Array.isArray(schema))) throw new FST_ERR_REQ_INVALID_VALIDATION_INVOCATION(httpPart);
+ if (validate == null) if (this[kRouteContext][kRequestCacheValidateFns]?.has(schema)) validate = this[kRouteContext][kRequestCacheValidateFns].get(schema);
+ else validate = this.compileValidationSchema(schema, httpPart);
return validate(input);
} }
});
module.exports = Request;
module.exports.buildRequest = buildRequest;
}));
-
//#endregion
//#region ../node_modules/fastify/lib/context.js
var require_context = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -92365,11 +84681,10 @@ var require_context = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const e = errors[i];
text += dataVar + (e.instancePath || "") + " " + e.message + separator;
}
- return new Error(text.slice(0, -separator.length));
+ return new Error(text.slice(0, -2));
}
module.exports = Context;
}));
-
//#endregion
//#region ../node_modules/fastify/lib/httpMethods.js
var require_httpMethods = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -92394,7 +84709,6 @@ var require_httpMethods = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"MKCALENDAR"
] };
}));
-
//#endregion
//#region ../node_modules/fastify/lib/decorate.js
var require_decorate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -92402,44 +84716,31 @@ var require_decorate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { FST_ERR_DEC_ALREADY_PRESENT, FST_ERR_DEC_MISSING_DEPENDENCY, FST_ERR_DEC_AFTER_START, FST_ERR_DEC_DEPENDENCY_INVALID_TYPE } = require_errors$3();
const { FSTDEP006 } = require_warnings();
function decorate(instance, name, fn, dependencies) {
- if (Object.prototype.hasOwnProperty.call(instance, name)) {
- throw new FST_ERR_DEC_ALREADY_PRESENT(name);
- }
+ if (Object.prototype.hasOwnProperty.call(instance, name)) throw new FST_ERR_DEC_ALREADY_PRESENT(name);
checkDependencies(instance, name, dependencies);
- if (fn && (typeof fn.getter === "function" || typeof fn.setter === "function")) {
- Object.defineProperty(instance, name, {
- get: fn.getter,
- set: fn.setter
- });
- } else {
- instance[name] = fn;
- }
+ if (fn && (typeof fn.getter === "function" || typeof fn.setter === "function")) Object.defineProperty(instance, name, {
+ get: fn.getter,
+ set: fn.setter
+ });
+ else instance[name] = fn;
}
function decorateConstructor(konstructor, name, fn, dependencies) {
const instance = konstructor.prototype;
- if (Object.prototype.hasOwnProperty.call(instance, name) || hasKey(konstructor, name)) {
- throw new FST_ERR_DEC_ALREADY_PRESENT(name);
- }
+ if (Object.prototype.hasOwnProperty.call(instance, name) || hasKey(konstructor, name)) throw new FST_ERR_DEC_ALREADY_PRESENT(name);
konstructor[kHasBeenDecorated] = true;
checkDependencies(konstructor, name, dependencies);
- if (fn && (typeof fn.getter === "function" || typeof fn.setter === "function")) {
- Object.defineProperty(instance, name, {
- get: fn.getter,
- set: fn.setter
- });
- } else if (typeof fn === "function") {
- instance[name] = fn;
- } else {
- konstructor.props.push({
- key: name,
- value: fn
- });
- }
+ if (fn && (typeof fn.getter === "function" || typeof fn.setter === "function")) Object.defineProperty(instance, name, {
+ get: fn.getter,
+ set: fn.setter
+ });
+ else if (typeof fn === "function") instance[name] = fn;
+ else konstructor.props.push({
+ key: name,
+ value: fn
+ });
}
function checkReferenceType(name, fn) {
- if (typeof fn === "object" && fn && !(typeof fn.getter === "function" || typeof fn.setter === "function")) {
- FSTDEP006(name);
- }
+ if (typeof fn === "object" && fn && !(typeof fn.getter === "function" || typeof fn.setter === "function")) FSTDEP006(name);
}
function decorateFastify(name, fn, dependencies) {
assertNotStarted(this, name);
@@ -92447,15 +84748,11 @@ var require_decorate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
}
function checkExistence(instance, name) {
- if (name) {
- return name in instance || instance.prototype && name in instance.prototype || hasKey(instance, name);
- }
+ if (name) return name in instance || instance.prototype && name in instance.prototype || hasKey(instance, name);
return instance in this;
}
function hasKey(fn, name) {
- if (fn.props) {
- return fn.props.find(({ key }) => key === name);
- }
+ if (fn.props) return fn.props.find(({ key }) => key === name);
return false;
}
function checkRequestExistence(name) {
@@ -92467,17 +84764,9 @@ var require_decorate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return checkExistence(this[kReply].prototype, name);
}
function checkDependencies(instance, name, deps) {
- if (deps === undefined || deps === null) {
- return;
- }
- if (!Array.isArray(deps)) {
- throw new FST_ERR_DEC_DEPENDENCY_INVALID_TYPE(name);
- }
- for (var i = 0; i !== deps.length; ++i) {
- if (!checkExistence(instance, deps[i])) {
- throw new FST_ERR_DEC_MISSING_DEPENDENCY(deps[i]);
- }
- }
+ if (deps === void 0 || deps === null) return;
+ if (!Array.isArray(deps)) throw new FST_ERR_DEC_DEPENDENCY_INVALID_TYPE(name);
+ for (var i = 0; i !== deps.length; ++i) if (!checkExistence(instance, deps[i])) throw new FST_ERR_DEC_MISSING_DEPENDENCY(deps[i]);
}
function decorateReply(name, fn, dependencies) {
assertNotStarted(this, name);
@@ -92492,9 +84781,7 @@ var require_decorate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
}
function assertNotStarted(instance, name) {
- if (instance[kState].started) {
- throw new FST_ERR_DEC_AFTER_START(name);
- }
+ if (instance[kState].started) throw new FST_ERR_DEC_AFTER_START(name);
}
module.exports = {
add: decorateFastify,
@@ -92506,7 +84793,6 @@ var require_decorate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
decorateRequest
};
}));
-
//#endregion
//#region ../node_modules/toad-cache/dist/toad-cache.mjs
var toad_cache_exports = /* @__PURE__ */ __exportAll({
@@ -92527,14 +84813,10 @@ var FifoMap, LruMap, LruObject, HitStatisticsRecord, HitStatistics, LruObjectHit
var init_toad_cache = __esmMin((() => {
FifoMap = class {
constructor(max = 1e3, ttlInMsecs = 0) {
- if (isNaN(max) || max < 0) {
- throw new Error("Invalid max value");
- }
- if (isNaN(ttlInMsecs) || ttlInMsecs < 0) {
- throw new Error("Invalid ttl value");
- }
+ if (isNaN(max) || max < 0) throw new Error("Invalid max value");
+ if (isNaN(ttlInMsecs) || ttlInMsecs < 0) throw new Error("Invalid ttl value");
this.first = null;
- this.items = new Map();
+ this.items = /* @__PURE__ */ new Map();
this.last = null;
this.max = max;
this.ttl = ttlInMsecs;
@@ -92543,7 +84825,7 @@ var init_toad_cache = __esmMin((() => {
return this.items.size;
}
clear() {
- this.items = new Map();
+ this.items = /* @__PURE__ */ new Map();
this.first = null;
this.last = null;
}
@@ -92551,24 +84833,14 @@ var init_toad_cache = __esmMin((() => {
if (this.items.has(key)) {
const deletedItem = this.items.get(key);
this.items.delete(key);
- if (deletedItem.prev !== null) {
- deletedItem.prev.next = deletedItem.next;
- }
- if (deletedItem.next !== null) {
- deletedItem.next.prev = deletedItem.prev;
- }
- if (this.first === deletedItem) {
- this.first = deletedItem.next;
- }
- if (this.last === deletedItem) {
- this.last = deletedItem.prev;
- }
+ if (deletedItem.prev !== null) deletedItem.prev.next = deletedItem.next;
+ if (deletedItem.next !== null) deletedItem.next.prev = deletedItem.prev;
+ if (this.first === deletedItem) this.first = deletedItem.next;
+ if (this.last === deletedItem) this.last = deletedItem.prev;
}
}
deleteMany(keys) {
- for (var i = 0; i < keys.length; i++) {
- this.delete(keys[i]);
- }
+ for (var i = 0; i < keys.length; i++) this.delete(keys[i]);
}
evict() {
if (this.size > 0) {
@@ -92584,9 +84856,7 @@ var init_toad_cache = __esmMin((() => {
}
}
expiresAt(key) {
- if (this.items.has(key)) {
- return this.items.get(key).expiry;
- }
+ if (this.items.has(key)) return this.items.get(key).expiry;
}
get(key) {
if (this.items.has(key)) {
@@ -92600,9 +84870,7 @@ var init_toad_cache = __esmMin((() => {
}
getMany(keys) {
const result = [];
- for (var i = 0; i < keys.length; i++) {
- result.push(this.get(keys[i]));
- }
+ for (var i = 0; i < keys.length; i++) result.push(this.get(keys[i]));
return result;
}
keys() {
@@ -92615,9 +84883,7 @@ var init_toad_cache = __esmMin((() => {
item.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl;
return;
}
- if (this.max > 0 && this.size === this.max) {
- this.evict();
- }
+ if (this.max > 0 && this.size === this.max) this.evict();
const item = {
expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
key,
@@ -92626,24 +84892,17 @@ var init_toad_cache = __esmMin((() => {
value
};
this.items.set(key, item);
- if (this.size === 1) {
- this.first = item;
- } else {
- this.last.next = item;
- }
+ if (this.size === 1) this.first = item;
+ else this.last.next = item;
this.last = item;
}
};
LruMap = class {
constructor(max = 1e3, ttlInMsecs = 0) {
- if (isNaN(max) || max < 0) {
- throw new Error("Invalid max value");
- }
- if (isNaN(ttlInMsecs) || ttlInMsecs < 0) {
- throw new Error("Invalid ttl value");
- }
+ if (isNaN(max) || max < 0) throw new Error("Invalid max value");
+ if (isNaN(ttlInMsecs) || ttlInMsecs < 0) throw new Error("Invalid ttl value");
this.first = null;
- this.items = new Map();
+ this.items = /* @__PURE__ */ new Map();
this.last = null;
this.max = max;
this.ttl = ttlInMsecs;
@@ -92652,28 +84911,20 @@ var init_toad_cache = __esmMin((() => {
return this.items.size;
}
bumpLru(item) {
- if (this.last === item) {
- return;
- }
+ if (this.last === item) return;
const last = this.last;
const next = item.next;
const prev = item.prev;
- if (this.first === item) {
- this.first = next;
- }
+ if (this.first === item) this.first = next;
item.next = null;
item.prev = last;
last.next = item;
- if (prev !== null) {
- prev.next = next;
- }
- if (next !== null) {
- next.prev = prev;
- }
+ if (prev !== null) prev.next = next;
+ if (next !== null) next.prev = prev;
this.last = item;
}
clear() {
- this.items = new Map();
+ this.items = /* @__PURE__ */ new Map();
this.first = null;
this.last = null;
}
@@ -92681,24 +84932,14 @@ var init_toad_cache = __esmMin((() => {
if (this.items.has(key)) {
const item = this.items.get(key);
this.items.delete(key);
- if (item.prev !== null) {
- item.prev.next = item.next;
- }
- if (item.next !== null) {
- item.next.prev = item.prev;
- }
- if (this.first === item) {
- this.first = item.next;
- }
- if (this.last === item) {
- this.last = item.prev;
- }
+ if (item.prev !== null) item.prev.next = item.next;
+ if (item.next !== null) item.next.prev = item.prev;
+ if (this.first === item) this.first = item.next;
+ if (this.last === item) this.last = item.prev;
}
}
deleteMany(keys) {
- for (var i = 0; i < keys.length; i++) {
- this.delete(keys[i]);
- }
+ for (var i = 0; i < keys.length; i++) this.delete(keys[i]);
}
evict() {
if (this.size > 0) {
@@ -92714,9 +84955,7 @@ var init_toad_cache = __esmMin((() => {
}
}
expiresAt(key) {
- if (this.items.has(key)) {
- return this.items.get(key).expiry;
- }
+ if (this.items.has(key)) return this.items.get(key).expiry;
}
get(key) {
if (this.items.has(key)) {
@@ -92731,9 +84970,7 @@ var init_toad_cache = __esmMin((() => {
}
getMany(keys) {
const result = [];
- for (var i = 0; i < keys.length; i++) {
- result.push(this.get(keys[i]));
- }
+ for (var i = 0; i < keys.length; i++) result.push(this.get(keys[i]));
return result;
}
keys() {
@@ -92744,14 +84981,10 @@ var init_toad_cache = __esmMin((() => {
const item = this.items.get(key);
item.value = value;
item.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl;
- if (this.last !== item) {
- this.bumpLru(item);
- }
+ if (this.last !== item) this.bumpLru(item);
return;
}
- if (this.max > 0 && this.size === this.max) {
- this.evict();
- }
+ if (this.max > 0 && this.size === this.max) this.evict();
const item = {
expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
key,
@@ -92760,22 +84993,15 @@ var init_toad_cache = __esmMin((() => {
value
};
this.items.set(key, item);
- if (this.size === 1) {
- this.first = item;
- } else {
- this.last.next = item;
- }
+ if (this.size === 1) this.first = item;
+ else this.last.next = item;
this.last = item;
}
};
LruObject = class {
constructor(max = 1e3, ttlInMsecs = 0) {
- if (isNaN(max) || max < 0) {
- throw new Error("Invalid max value");
- }
- if (isNaN(ttlInMsecs) || ttlInMsecs < 0) {
- throw new Error("Invalid ttl value");
- }
+ if (isNaN(max) || max < 0) throw new Error("Invalid max value");
+ if (isNaN(ttlInMsecs) || ttlInMsecs < 0) throw new Error("Invalid ttl value");
this.first = null;
this.items = Object.create(null);
this.last = null;
@@ -92784,24 +85010,16 @@ var init_toad_cache = __esmMin((() => {
this.ttl = ttlInMsecs;
}
bumpLru(item) {
- if (this.last === item) {
- return;
- }
+ if (this.last === item) return;
const last = this.last;
const next = item.next;
const prev = item.prev;
- if (this.first === item) {
- this.first = next;
- }
+ if (this.first === item) this.first = next;
item.next = null;
item.prev = last;
last.next = item;
- if (prev !== null) {
- prev.next = next;
- }
- if (next !== null) {
- next.prev = prev;
- }
+ if (prev !== null) prev.next = next;
+ if (next !== null) next.prev = prev;
this.last = item;
}
clear() {
@@ -92815,24 +85033,14 @@ var init_toad_cache = __esmMin((() => {
const item = this.items[key];
delete this.items[key];
this.size--;
- if (item.prev !== null) {
- item.prev.next = item.next;
- }
- if (item.next !== null) {
- item.next.prev = item.prev;
- }
- if (this.first === item) {
- this.first = item.next;
- }
- if (this.last === item) {
- this.last = item.prev;
- }
+ if (item.prev !== null) item.prev.next = item.next;
+ if (item.next !== null) item.next.prev = item.prev;
+ if (this.first === item) this.first = item.next;
+ if (this.last === item) this.last = item.prev;
}
}
deleteMany(keys) {
- for (var i = 0; i < keys.length; i++) {
- this.delete(keys[i]);
- }
+ for (var i = 0; i < keys.length; i++) this.delete(keys[i]);
}
evict() {
if (this.size > 0) {
@@ -92848,9 +85056,7 @@ var init_toad_cache = __esmMin((() => {
}
}
expiresAt(key) {
- if (Object.prototype.hasOwnProperty.call(this.items, key)) {
- return this.items[key].expiry;
- }
+ if (Object.prototype.hasOwnProperty.call(this.items, key)) return this.items[key].expiry;
}
get(key) {
if (Object.prototype.hasOwnProperty.call(this.items, key)) {
@@ -92865,9 +85071,7 @@ var init_toad_cache = __esmMin((() => {
}
getMany(keys) {
const result = [];
- for (var i = 0; i < keys.length; i++) {
- result.push(this.get(keys[i]));
- }
+ for (var i = 0; i < keys.length; i++) result.push(this.get(keys[i]));
return result;
}
keys() {
@@ -92878,14 +85082,10 @@ var init_toad_cache = __esmMin((() => {
const item = this.items[key];
item.value = value;
item.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl;
- if (this.last !== item) {
- this.bumpLru(item);
- }
+ if (this.last !== item) this.bumpLru(item);
return;
}
- if (this.max > 0 && this.size === this.max) {
- this.evict();
- }
+ if (this.max > 0 && this.size === this.max) this.evict();
const item = {
expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
key,
@@ -92894,11 +85094,8 @@ var init_toad_cache = __esmMin((() => {
value
};
this.items[key] = item;
- if (++this.size === 1) {
- this.first = item;
- } else {
- this.last.next = item;
- }
+ if (++this.size === 1) this.first = item;
+ else this.last.next = item;
this.last = item;
}
};
@@ -92921,20 +85118,18 @@ var init_toad_cache = __esmMin((() => {
} };
}
resetForCache(cacheId) {
- for (let key of Object.keys(this.records[cacheId])) {
- this.records[cacheId][key] = {
- cacheSize: 0,
- hits: 0,
- falsyHits: 0,
- emptyHits: 0,
- misses: 0,
- expirations: 0,
- evictions: 0,
- invalidateOne: 0,
- invalidateAll: 0,
- sets: 0
- };
- }
+ for (let key of Object.keys(this.records[cacheId])) this.records[cacheId][key] = {
+ cacheSize: 0,
+ hits: 0,
+ falsyHits: 0,
+ emptyHits: 0,
+ misses: 0,
+ expirations: 0,
+ evictions: 0,
+ invalidateOne: 0,
+ invalidateAll: 0,
+ sets: 0
+ };
}
getStatistics() {
return this.records;
@@ -92944,27 +85139,25 @@ var init_toad_cache = __esmMin((() => {
constructor(cacheId, statisticTtlInHours, globalStatisticsRecord) {
this.cacheId = cacheId;
this.statisticTtlInHours = statisticTtlInHours;
- this.collectionStart = new Date();
+ this.collectionStart = /* @__PURE__ */ new Date();
this.currentTimeStamp = getTimestamp(this.collectionStart);
this.records = globalStatisticsRecord || new HitStatisticsRecord();
this.records.initForCache(this.cacheId, this.currentTimeStamp);
}
get currentRecord() {
/* c8 ignore next 14 */
- if (!this.records.records[this.cacheId][this.currentTimeStamp]) {
- this.records.records[this.cacheId][this.currentTimeStamp] = {
- cacheSize: 0,
- hits: 0,
- falsyHits: 0,
- emptyHits: 0,
- misses: 0,
- expirations: 0,
- evictions: 0,
- sets: 0,
- invalidateOne: 0,
- invalidateAll: 0
- };
- }
+ if (!this.records.records[this.cacheId][this.currentTimeStamp]) this.records.records[this.cacheId][this.currentTimeStamp] = {
+ cacheSize: 0,
+ hits: 0,
+ falsyHits: 0,
+ emptyHits: 0,
+ misses: 0,
+ expirations: 0,
+ evictions: 0,
+ sets: 0,
+ invalidateOne: 0,
+ invalidateAll: 0
+ };
return this.records.records[this.cacheId][this.currentTimeStamp];
}
hoursPassed() {
@@ -93015,7 +85208,7 @@ var init_toad_cache = __esmMin((() => {
}
archiveIfNeeded() {
if (this.hoursPassed() >= this.statisticTtlInHours) {
- this.collectionStart = new Date();
+ this.collectionStart = /* @__PURE__ */ new Date();
this.currentTimeStamp = getTimestamp(this.collectionStart);
this.records.initForCache(this.cacheId, this.currentTimeStamp);
}
@@ -93024,10 +85217,8 @@ var init_toad_cache = __esmMin((() => {
LruObjectHitStatistics = class extends LruObject {
constructor(max, ttlInMsecs, cacheId, globalStatisticsRecord, statisticTtlInHours) {
super(max || 1e3, ttlInMsecs || 0);
- if (!cacheId) {
- throw new Error("Cache id is mandatory");
- }
- this.hitStatistics = new HitStatistics(cacheId, statisticTtlInHours !== undefined ? statisticTtlInHours : 24, globalStatisticsRecord);
+ if (!cacheId) throw new Error("Cache id is mandatory");
+ this.hitStatistics = new HitStatistics(cacheId, statisticTtlInHours !== void 0 ? statisticTtlInHours : 24, globalStatisticsRecord);
}
getStatistics() {
return this.hitStatistics.getStatistics();
@@ -93044,9 +85235,7 @@ var init_toad_cache = __esmMin((() => {
}
delete(key, isExpiration = false) {
super.delete(key);
- if (!isExpiration) {
- this.hitStatistics.addInvalidateOne();
- }
+ if (!isExpiration) this.hitStatistics.addInvalidateOne();
this.hitStatistics.setCacheSize(this.size);
}
clear() {
@@ -93063,12 +85252,8 @@ var init_toad_cache = __esmMin((() => {
return;
}
this.bumpLru(item);
- if (!item.value) {
- this.hitStatistics.addFalsyHit();
- }
- if (item.value === undefined || item.value === null || item.value === "") {
- this.hitStatistics.addEmptyHit();
- }
+ if (!item.value) this.hitStatistics.addFalsyHit();
+ if (item.value === void 0 || item.value === null || item.value === "") this.hitStatistics.addEmptyHit();
this.hitStatistics.addHit();
return item.value;
}
@@ -93077,12 +85262,8 @@ var init_toad_cache = __esmMin((() => {
};
FifoObject = class {
constructor(max = 1e3, ttlInMsecs = 0) {
- if (isNaN(max) || max < 0) {
- throw new Error("Invalid max value");
- }
- if (isNaN(ttlInMsecs) || ttlInMsecs < 0) {
- throw new Error("Invalid ttl value");
- }
+ if (isNaN(max) || max < 0) throw new Error("Invalid max value");
+ if (isNaN(ttlInMsecs) || ttlInMsecs < 0) throw new Error("Invalid ttl value");
this.first = null;
this.items = Object.create(null);
this.last = null;
@@ -93101,24 +85282,14 @@ var init_toad_cache = __esmMin((() => {
const deletedItem = this.items[key];
delete this.items[key];
this.size--;
- if (deletedItem.prev !== null) {
- deletedItem.prev.next = deletedItem.next;
- }
- if (deletedItem.next !== null) {
- deletedItem.next.prev = deletedItem.prev;
- }
- if (this.first === deletedItem) {
- this.first = deletedItem.next;
- }
- if (this.last === deletedItem) {
- this.last = deletedItem.prev;
- }
+ if (deletedItem.prev !== null) deletedItem.prev.next = deletedItem.next;
+ if (deletedItem.next !== null) deletedItem.next.prev = deletedItem.prev;
+ if (this.first === deletedItem) this.first = deletedItem.next;
+ if (this.last === deletedItem) this.last = deletedItem.prev;
}
}
deleteMany(keys) {
- for (var i = 0; i < keys.length; i++) {
- this.delete(keys[i]);
- }
+ for (var i = 0; i < keys.length; i++) this.delete(keys[i]);
}
evict() {
if (this.size > 0) {
@@ -93134,9 +85305,7 @@ var init_toad_cache = __esmMin((() => {
}
}
expiresAt(key) {
- if (Object.prototype.hasOwnProperty.call(this.items, key)) {
- return this.items[key].expiry;
- }
+ if (Object.prototype.hasOwnProperty.call(this.items, key)) return this.items[key].expiry;
}
get(key) {
if (Object.prototype.hasOwnProperty.call(this.items, key)) {
@@ -93150,9 +85319,7 @@ var init_toad_cache = __esmMin((() => {
}
getMany(keys) {
const result = [];
- for (var i = 0; i < keys.length; i++) {
- result.push(this.get(keys[i]));
- }
+ for (var i = 0; i < keys.length; i++) result.push(this.get(keys[i]));
return result;
}
keys() {
@@ -93165,9 +85332,7 @@ var init_toad_cache = __esmMin((() => {
item.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl;
return;
}
- if (this.max > 0 && this.size === this.max) {
- this.evict();
- }
+ if (this.max > 0 && this.size === this.max) this.evict();
const item = {
expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
key,
@@ -93176,16 +85341,12 @@ var init_toad_cache = __esmMin((() => {
value
};
this.items[key] = item;
- if (++this.size === 1) {
- this.first = item;
- } else {
- this.last.next = item;
- }
+ if (++this.size === 1) this.first = item;
+ else this.last.next = item;
this.last = item;
}
};
}));
-
//#endregion
//#region ../node_modules/fast-content-type-parse/index.js
var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -93235,29 +85396,21 @@ var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, m
* @public
*/
function parse(header) {
- if (typeof header !== "string") {
- throw new TypeError("argument header is required and must be a string");
- }
+ if (typeof header !== "string") throw new TypeError("argument header is required and must be a string");
let index = header.indexOf(";");
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
- if (mediaTypeRE.test(type) === false) {
- throw new TypeError("invalid media type");
- }
+ if (mediaTypeRE.test(type) === false) throw new TypeError("invalid media type");
const result = {
type: type.toLowerCase(),
parameters: new NullObject()
};
- if (index === -1) {
- return result;
- }
+ if (index === -1) return result;
let key;
let match;
let value;
paramRE.lastIndex = index;
while (match = paramRE.exec(header)) {
- if (match.index !== index) {
- throw new TypeError("invalid parameter format");
- }
+ if (match.index !== index) throw new TypeError("invalid parameter format");
index += match[0].length;
key = match[1].toLowerCase();
value = match[2];
@@ -93267,35 +85420,25 @@ var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, m
}
result.parameters[key] = value;
}
- if (index !== header.length) {
- throw new TypeError("invalid parameter format");
- }
+ if (index !== header.length) throw new TypeError("invalid parameter format");
return result;
}
function safeParse(header) {
- if (typeof header !== "string") {
- return defaultContentType;
- }
+ if (typeof header !== "string") return defaultContentType;
let index = header.indexOf(";");
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
- if (mediaTypeRE.test(type) === false) {
- return defaultContentType;
- }
+ if (mediaTypeRE.test(type) === false) return defaultContentType;
const result = {
type: type.toLowerCase(),
parameters: new NullObject()
};
- if (index === -1) {
- return result;
- }
+ if (index === -1) return result;
let key;
let match;
let value;
paramRE.lastIndex = index;
while (match = paramRE.exec(header)) {
- if (match.index !== index) {
- return defaultContentType;
- }
+ if (match.index !== index) return defaultContentType;
index += match[0].length;
key = match[1].toLowerCase();
value = match[2];
@@ -93305,9 +85448,7 @@ var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, m
}
result.parameters[key] = value;
}
- if (index !== header.length) {
- return defaultContentType;
- }
+ if (index !== header.length) return defaultContentType;
return result;
}
module.exports.default = {
@@ -93318,7 +85459,6 @@ var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, m
module.exports.safeParse = safeParse;
module.exports.defaultContentType = defaultContentType;
}));
-
//#endregion
//#region ../node_modules/secure-json-parse/index.js
var require_secure_json_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -93329,37 +85469,21 @@ var require_secure_json_parse = /* @__PURE__ */ __commonJSMin(((exports, module)
if (options == null) {
if (reviver !== null && typeof reviver === "object") {
options = reviver;
- reviver = undefined;
+ reviver = void 0;
}
}
- if (hasBuffer && Buffer.isBuffer(text)) {
- text = text.toString();
- }
- if (text && text.charCodeAt(0) === 65279) {
- text = text.slice(1);
- }
+ if (hasBuffer && Buffer.isBuffer(text)) text = text.toString();
+ if (text && text.charCodeAt(0) === 65279) text = text.slice(1);
const obj = JSON.parse(text, reviver);
- if (obj === null || typeof obj !== "object") {
- return obj;
- }
+ if (obj === null || typeof obj !== "object") return obj;
const protoAction = options && options.protoAction || "error";
const constructorAction = options && options.constructorAction || "error";
- if (protoAction === "ignore" && constructorAction === "ignore") {
- return obj;
- }
+ if (protoAction === "ignore" && constructorAction === "ignore") return obj;
if (protoAction !== "ignore" && constructorAction !== "ignore") {
- if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) {
- return obj;
- }
+ if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) return obj;
} else if (protoAction !== "ignore" && constructorAction === "ignore") {
- if (suspectProtoRx.test(text) === false) {
- return obj;
- }
- } else {
- if (suspectConstructorRx.test(text) === false) {
- return obj;
- }
- }
+ if (suspectProtoRx.test(text) === false) return obj;
+ } else if (suspectConstructorRx.test(text) === false) return obj;
return filter(obj, {
protoAction,
constructorAction,
@@ -93373,26 +85497,18 @@ var require_secure_json_parse = /* @__PURE__ */ __commonJSMin(((exports, module)
next = [];
for (const node of nodes) {
if (protoAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "__proto__")) {
- if (safe === true) {
- return null;
- } else if (protoAction === "error") {
- throw new SyntaxError("Object contains forbidden prototype property");
- }
+ if (safe === true) return null;
+ else if (protoAction === "error") throw new SyntaxError("Object contains forbidden prototype property");
delete node.__proto__;
}
if (constructorAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "constructor") && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) {
- if (safe === true) {
- return null;
- } else if (constructorAction === "error") {
- throw new SyntaxError("Object contains forbidden prototype property");
- }
+ if (safe === true) return null;
+ else if (constructorAction === "error") throw new SyntaxError("Object contains forbidden prototype property");
delete node.constructor;
}
for (const key in node) {
const value = node[key];
- if (value && typeof value === "object") {
- next.push(value);
- }
+ if (value && typeof value === "object") next.push(value);
}
}
}
@@ -93424,7 +85540,6 @@ var require_secure_json_parse = /* @__PURE__ */ __commonJSMin(((exports, module)
module.exports.safeParse = safeParse;
module.exports.scan = filter;
}));
-
//#endregion
//#region ../node_modules/fastify/lib/contentTypeParser.js
var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -93436,7 +85551,7 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
const { FST_ERR_CTP_INVALID_TYPE, FST_ERR_CTP_EMPTY_TYPE, FST_ERR_CTP_ALREADY_PRESENT, FST_ERR_CTP_INVALID_HANDLER, FST_ERR_CTP_INVALID_PARSE_TYPE, FST_ERR_CTP_BODY_TOO_LARGE, FST_ERR_CTP_INVALID_MEDIA_TYPE, FST_ERR_CTP_INVALID_CONTENT_LENGTH, FST_ERR_CTP_EMPTY_JSON_BODY, FST_ERR_CTP_INSTANCE_ALREADY_STARTED } = require_errors$3();
function ContentTypeParser(bodyLimit, onProtoPoisoning, onConstructorPoisoning) {
this[kDefaultJsonParse] = getDefaultJsonParser(onProtoPoisoning, onConstructorPoisoning);
- this.customParsers = new Map();
+ this.customParsers = /* @__PURE__ */ new Map();
this.customParsers.set("application/json", new Parser(true, false, bodyLimit, this[kDefaultJsonParse]));
this.customParsers.set("text/plain", new Parser(true, false, bodyLimit, defaultPlainTextParser));
this.parserList = [new ParserListItem("application/json"), new ParserListItem("text/plain")];
@@ -93448,21 +85563,15 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
if (!contentTypeIsString && !(contentType instanceof RegExp)) throw new FST_ERR_CTP_INVALID_TYPE();
if (contentTypeIsString && contentType.length === 0) throw new FST_ERR_CTP_EMPTY_TYPE();
if (typeof parserFn !== "function") throw new FST_ERR_CTP_INVALID_HANDLER();
- if (this.existingParser(contentType)) {
- throw new FST_ERR_CTP_ALREADY_PRESENT(contentType);
- }
- if (opts.parseAs !== undefined) {
- if (opts.parseAs !== "string" && opts.parseAs !== "buffer") {
- throw new FST_ERR_CTP_INVALID_PARSE_TYPE(opts.parseAs);
- }
+ if (this.existingParser(contentType)) throw new FST_ERR_CTP_ALREADY_PRESENT(contentType);
+ if (opts.parseAs !== void 0) {
+ if (opts.parseAs !== "string" && opts.parseAs !== "buffer") throw new FST_ERR_CTP_INVALID_PARSE_TYPE(opts.parseAs);
}
const parser = new Parser(opts.parseAs === "string", opts.parseAs === "buffer", opts.bodyLimit, parserFn);
- if (contentTypeIsString && contentType === "*") {
- this.customParsers.set("", parser);
- } else {
- if (contentTypeIsString) {
- this.parserList.unshift(new ParserListItem(contentType));
- } else {
+ if (contentTypeIsString && contentType === "*") this.customParsers.set("", parser);
+ else {
+ if (contentTypeIsString) this.parserList.unshift(new ParserListItem(contentType));
+ else {
contentType.isEssence = contentType.source.indexOf(";") === -1;
this.parserRegExpList.unshift(contentType);
}
@@ -93473,24 +85582,16 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
return this.customParsers.has(typeof contentType === "string" ? contentType : contentType.toString());
};
ContentTypeParser.prototype.existingParser = function(contentType) {
- if (contentType === "application/json" && this.customParsers.has(contentType)) {
- return this.customParsers.get(contentType).fn !== this[kDefaultJsonParse];
- }
- if (contentType === "text/plain" && this.customParsers.has(contentType)) {
- return this.customParsers.get(contentType).fn !== defaultPlainTextParser;
- }
+ if (contentType === "application/json" && this.customParsers.has(contentType)) return this.customParsers.get(contentType).fn !== this[kDefaultJsonParse];
+ if (contentType === "text/plain" && this.customParsers.has(contentType)) return this.customParsers.get(contentType).fn !== defaultPlainTextParser;
return this.hasParser(contentType);
};
ContentTypeParser.prototype.getParser = function(contentType) {
- if (this.hasParser(contentType)) {
- return this.customParsers.get(contentType);
- }
+ if (this.hasParser(contentType)) return this.customParsers.get(contentType);
const parser = this.cache.get(contentType);
- if (parser !== undefined) return parser;
+ if (parser !== void 0) return parser;
const parsed = safeParseContentType(contentType);
- if (parsed === defaultContentType) {
- return this.customParsers.get("");
- }
+ if (parsed === defaultContentType) return this.customParsers.get("");
for (var i = 0; i !== this.parserList.length; ++i) {
const parserListItem = this.parserList[i];
if (compareContentType(parsed, parserListItem)) {
@@ -93510,7 +85611,7 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
return this.customParsers.get("");
};
ContentTypeParser.prototype.removeAll = function() {
- this.customParsers = new Map();
+ this.customParsers = /* @__PURE__ */ new Map();
this.parserRegExpList = [];
this.parserList = [];
this.cache = new Fifo(100);
@@ -93520,29 +85621,21 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
const removed = this.customParsers.delete(contentType.toString());
const parsers = typeof contentType === "string" ? this.parserList : this.parserRegExpList;
const idx = parsers.findIndex((ct) => ct.toString() === contentType.toString());
- if (idx > -1) {
- parsers.splice(idx, 1);
- }
+ if (idx > -1) parsers.splice(idx, 1);
return removed || idx > -1;
};
ContentTypeParser.prototype.run = function(contentType, handler, request, reply) {
const parser = this.getParser(contentType);
- if (parser === undefined) {
- if (request.is404) {
- handler(request, reply);
- } else {
- reply.send(new FST_ERR_CTP_INVALID_MEDIA_TYPE(contentType || undefined));
- }
+ if (parser === void 0) {
+ if (request.is404) handler(request, reply);
+ else reply.send(new FST_ERR_CTP_INVALID_MEDIA_TYPE(contentType || void 0));
return;
}
const resource = new AsyncResource$5("content-type-parser:run", request);
- if (parser.asString === true || parser.asBuffer === true) {
- rawBody(request, reply, reply[kRouteContext]._parserOptions, parser, done);
- } else {
+ if (parser.asString === true || parser.asBuffer === true) rawBody(request, reply, reply[kRouteContext]._parserOptions, parser, done);
+ else {
const result = parser.fn(request, request[kRequestPayloadStream], done);
- if (result && typeof result.then === "function") {
- result.then((body) => done(null, body), done);
- }
+ if (result && typeof result.then === "function") result.then((body) => done(null, body), done);
}
function done(error, body) {
resource.runInAsyncScope(() => {
@@ -93560,7 +85653,7 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
function rawBody(request, reply, options, parser, done) {
const asString = parser.asString;
const limit = options.limit === null ? parser.bodyLimit : options.limit;
- const contentLength = request.headers["content-length"] === undefined ? NaN : Number(request.headers["content-length"]);
+ const contentLength = request.headers["content-length"] === void 0 ? NaN : Number(request.headers["content-length"]);
if (contentLength > limit) {
reply.header("connection", "close");
reply.send(new FST_ERR_CTP_BODY_TOO_LARGE());
@@ -93569,9 +85662,7 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
let receivedLength = 0;
let body = asString === true ? "" : [];
const payload = request[kRequestPayloadStream] || request.raw;
- if (asString === true) {
- payload.setEncoding("utf8");
- }
+ if (asString === true) payload.setEncoding("utf8");
payload.on("data", onData);
payload.on("end", onEnd);
payload.on("error", onEnd);
@@ -93586,47 +85677,34 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
reply.send(new FST_ERR_CTP_BODY_TOO_LARGE());
return;
}
- if (asString === true) {
- body += chunk;
- } else {
- body.push(chunk);
- }
+ if (asString === true) body += chunk;
+ else body.push(chunk);
}
function onEnd(err) {
payload.removeListener("data", onData);
payload.removeListener("end", onEnd);
payload.removeListener("error", onEnd);
- if (err !== undefined) {
- if (!(typeof err.statusCode === "number" && err.statusCode >= 400)) {
- err.statusCode = 400;
- }
+ if (err !== void 0) {
+ if (!(typeof err.statusCode === "number" && err.statusCode >= 400)) err.statusCode = 400;
reply[kReplyIsError] = true;
reply.code(err.statusCode).send(err);
return;
}
- if (asString === true) {
- receivedLength = Buffer.byteLength(body);
- }
+ if (asString === true) receivedLength = Buffer.byteLength(body);
if (!Number.isNaN(contentLength) && (payload.receivedEncodedLength || receivedLength) !== contentLength) {
reply.header("connection", "close");
reply.send(new FST_ERR_CTP_INVALID_CONTENT_LENGTH());
return;
}
- if (asString === false) {
- body = Buffer.concat(body);
- }
+ if (asString === false) body = Buffer.concat(body);
const result = parser.fn(request, body, done);
- if (result && typeof result.then === "function") {
- result.then((body) => done(null, body), done);
- }
+ if (result && typeof result.then === "function") result.then((body) => done(null, body), done);
}
}
function getDefaultJsonParser(onProtoPoisoning, onConstructorPoisoning) {
return defaultJsonParser;
function defaultJsonParser(req, body, done) {
- if (body === "" || body == null || Buffer.isBuffer(body) && body.length === 0) {
- return done(new FST_ERR_CTP_EMPTY_JSON_BODY(), undefined);
- }
+ if (body === "" || body == null || Buffer.isBuffer(body) && body.length === 0) return done(new FST_ERR_CTP_EMPTY_JSON_BODY(), void 0);
let json;
try {
json = secureJson.parse(body, {
@@ -93635,7 +85713,7 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
});
} catch (err) {
err.statusCode = 400;
- return done(err, undefined);
+ return done(err, void 0);
}
done(null, json);
}
@@ -93658,47 +85736,32 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
return contentTypeParser;
}
function addContentTypeParser(contentType, opts, parser) {
- if (this[kState].started) {
- throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("addContentTypeParser");
- }
+ if (this[kState].started) throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("addContentTypeParser");
if (typeof opts === "function") {
parser = opts;
opts = {};
}
if (!opts) opts = {};
if (!opts.bodyLimit) opts.bodyLimit = this[kBodyLimit];
- if (Array.isArray(contentType)) {
- contentType.forEach((type) => this[kContentTypeParser].add(type, opts, parser));
- } else {
- this[kContentTypeParser].add(contentType, opts, parser);
- }
+ if (Array.isArray(contentType)) contentType.forEach((type) => this[kContentTypeParser].add(type, opts, parser));
+ else this[kContentTypeParser].add(contentType, opts, parser);
return this;
}
function hasContentTypeParser(contentType) {
return this[kContentTypeParser].hasParser(contentType);
}
function removeContentTypeParser(contentType) {
- if (this[kState].started) {
- throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("removeContentTypeParser");
- }
- if (Array.isArray(contentType)) {
- for (const type of contentType) {
- this[kContentTypeParser].remove(type);
- }
- } else {
- this[kContentTypeParser].remove(contentType);
- }
+ if (this[kState].started) throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("removeContentTypeParser");
+ if (Array.isArray(contentType)) for (const type of contentType) this[kContentTypeParser].remove(type);
+ else this[kContentTypeParser].remove(contentType);
}
function removeAllContentTypeParsers() {
- if (this[kState].started) {
- throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("removeAllContentTypeParsers");
- }
+ if (this[kState].started) throw new FST_ERR_CTP_INSTANCE_ALREADY_STARTED("removeAllContentTypeParsers");
this[kContentTypeParser].removeAll();
}
function compareContentType(contentType, parserListItem) {
- if (parserListItem.isEssence) {
- return contentType.type.indexOf(parserListItem) !== -1;
- } else {
+ if (parserListItem.isEssence) return contentType.type.indexOf(parserListItem) !== -1;
+ else {
if (contentType.type.indexOf(parserListItem.type) === -1) return false;
for (const key of parserListItem.parameterKeys) {
if (!(key in contentType.parameters)) return false;
@@ -93708,11 +85771,8 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
}
}
function compareRegExpContentType(contentType, essenceMIMEType, regexp) {
- if (regexp.isEssence) {
- return regexp.test(essenceMIMEType);
- } else {
- return regexp.test(contentType);
- }
+ if (regexp.isEssence) return regexp.test(essenceMIMEType);
+ else return regexp.test(contentType);
}
function ParserListItem(contentType) {
this.name = contentType;
@@ -93721,9 +85781,7 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
if (this.isEssence === false && parsed.type === "") {
const tmp = contentType.split(";", 1)[0];
this.type = tmp === "" ? contentType : tmp;
- } else {
- this.type = parsed.type;
- }
+ } else this.type = parsed.type;
this.parameters = parsed.parameters;
this.parameterKeys = Object.keys(parsed.parameters);
}
@@ -93744,7 +85802,6 @@ var require_contentTypeParser = /* @__PURE__ */ __commonJSMin(((exports, module)
};
module.exports[kTestInternals] = { rawBody };
}));
-
//#endregion
//#region ../node_modules/fast-deep-equal/index.js
var require_fast_deep_equal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -93775,7 +85832,6 @@ var require_fast_deep_equal = /* @__PURE__ */ __commonJSMin(((exports, module) =
return a !== a && b !== b;
};
}));
-
//#endregion
//#region ../node_modules/json-schema-ref-resolver/index.js
var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -93795,55 +85851,42 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
this.#cloneSchemaWithoutRefs = opts.cloneSchemaWithoutRefs ?? false;
}
addSchema(schema, schemaId) {
- if (schema.$id !== undefined && schema.$id.charAt(0) !== "#") {
- schemaId = schema.$id;
- } else {
- this.#insertSchemaBySchemaId(schema, schemaId);
- }
+ if (schema.$id !== void 0 && schema.$id.charAt(0) !== "#") schemaId = schema.$id;
+ else this.#insertSchemaBySchemaId(schema, schemaId);
this.#addSchema(schema, schemaId);
}
getSchema(schemaId, jsonPointer = "#") {
const schema = this.#schemas[schemaId];
- if (schema === undefined) {
- throw new Error(`Cannot resolve ref "${schemaId}${jsonPointer}". Schema with id "${schemaId}" is not found.`);
- }
- if (schema.anchors[jsonPointer] !== undefined) {
- return schema.anchors[jsonPointer];
- }
+ if (schema === void 0) throw new Error(`Cannot resolve ref "${schemaId}${jsonPointer}". Schema with id "${schemaId}" is not found.`);
+ if (schema.anchors[jsonPointer] !== void 0) return schema.anchors[jsonPointer];
return getDataByJSONPointer(schema.schema, jsonPointer);
}
hasSchema(schemaId) {
- return this.#schemas[schemaId] !== undefined;
+ return this.#schemas[schemaId] !== void 0;
}
getSchemaRefs(schemaId) {
const schema = this.#schemas[schemaId];
- if (schema === undefined) {
- throw new Error(`Schema with id "${schemaId}" is not found.`);
- }
+ if (schema === void 0) throw new Error(`Schema with id "${schemaId}" is not found.`);
return schema.refs;
}
getSchemaDependencies(schemaId, dependencies = {}) {
const schema = this.#schemas[schemaId];
for (const ref of schema.refs) {
const dependencySchemaId = ref.schemaId;
- if (dependencies[dependencySchemaId] !== undefined) continue;
+ if (dependencies[dependencySchemaId] !== void 0) continue;
dependencies[dependencySchemaId] = this.getSchema(dependencySchemaId);
this.getSchemaDependencies(dependencySchemaId, dependencies);
}
return dependencies;
}
derefSchema(schemaId) {
- if (this.#derefSchemas[schemaId] !== undefined) return;
+ if (this.#derefSchemas[schemaId] !== void 0) return;
const schema = this.#schemas[schemaId];
- if (schema === undefined) {
- throw new Error(`Schema with id "${schemaId}" is not found.`);
- }
- if (!this.#cloneSchemaWithoutRefs && schema.refs.length === 0) {
- this.#derefSchemas[schemaId] = {
- schema: schema.schema,
- anchors: schema.anchors
- };
- }
+ if (schema === void 0) throw new Error(`Schema with id "${schemaId}" is not found.`);
+ if (!this.#cloneSchemaWithoutRefs && schema.refs.length === 0) this.#derefSchemas[schemaId] = {
+ schema: schema.schema,
+ anchors: schema.anchors
+ };
const refs = [];
this.#addDerefSchema(schema.schema, schemaId, refs);
const dependencies = this.getSchemaDependencies(schemaId);
@@ -93854,41 +85897,31 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
for (const ref of refs) {
const { refSchemaId, refJsonPointer } = this.#parseSchemaRef(ref.ref, ref.sourceSchemaId);
const targetSchema = this.getDerefSchema(refSchemaId, refJsonPointer);
- if (targetSchema === null) {
- throw new Error(`Cannot resolve ref "${ref.ref}". Ref "${refJsonPointer}" is not found in schema "${refSchemaId}".`);
- }
+ if (targetSchema === null) throw new Error(`Cannot resolve ref "${ref.ref}". Ref "${refJsonPointer}" is not found in schema "${refSchemaId}".`);
ref.targetSchema = targetSchema;
ref.targetSchemaId = refSchemaId;
}
- for (const ref of refs) {
- this.#resolveRef(ref, refs);
- }
+ for (const ref of refs) this.#resolveRef(ref, refs);
}
getDerefSchema(schemaId, jsonPointer = "#") {
let derefSchema = this.#derefSchemas[schemaId];
- if (derefSchema === undefined) {
+ if (derefSchema === void 0) {
this.derefSchema(schemaId);
derefSchema = this.#derefSchemas[schemaId];
}
- if (derefSchema.anchors[jsonPointer] !== undefined) {
- return derefSchema.anchors[jsonPointer];
- }
+ if (derefSchema.anchors[jsonPointer] !== void 0) return derefSchema.anchors[jsonPointer];
return getDataByJSONPointer(derefSchema.schema, jsonPointer);
}
#parseSchemaRef(ref, schemaId) {
const sharpIndex = ref.indexOf("#");
- if (sharpIndex === -1) {
- return {
- refSchemaId: ref,
- refJsonPointer: "#"
- };
- }
- if (sharpIndex === 0) {
- return {
- refSchemaId: schemaId,
- refJsonPointer: ref
- };
- }
+ if (sharpIndex === -1) return {
+ refSchemaId: ref,
+ refJsonPointer: "#"
+ };
+ if (sharpIndex === 0) return {
+ refSchemaId: schemaId,
+ refJsonPointer: ref
+ };
return {
refSchemaId: ref.slice(0, sharpIndex),
refJsonPointer: ref.slice(sharpIndex)
@@ -93896,60 +85929,44 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
}
#addSchema(schema, rootSchemaId) {
const schemaId = schema.$id;
- if (schemaId !== undefined && typeof schemaId === "string") {
- if (schemaId.charAt(0) === "#") {
- this.#insertSchemaByAnchor(schema, rootSchemaId, schemaId);
- } else {
- this.#insertSchemaBySchemaId(schema, schemaId);
- rootSchemaId = schemaId;
- }
+ if (schemaId !== void 0 && typeof schemaId === "string") if (schemaId.charAt(0) === "#") this.#insertSchemaByAnchor(schema, rootSchemaId, schemaId);
+ else {
+ this.#insertSchemaBySchemaId(schema, schemaId);
+ rootSchemaId = schemaId;
}
const ref = schema.$ref;
- if (ref !== undefined && typeof ref === "string") {
+ if (ref !== void 0 && typeof ref === "string") {
const { refSchemaId, refJsonPointer } = this.#parseSchemaRef(ref, rootSchemaId);
this.#schemas[rootSchemaId].refs.push({
schemaId: refSchemaId,
jsonPointer: refJsonPointer
});
}
- for (const key in schema) {
- if (typeof schema[key] === "object" && schema[key] !== null) {
- this.#addSchema(schema[key], rootSchemaId);
- }
- }
+ for (const key in schema) if (typeof schema[key] === "object" && schema[key] !== null) this.#addSchema(schema[key], rootSchemaId);
}
#addDerefSchema(schema, rootSchemaId, refs = []) {
const derefSchema = Array.isArray(schema) ? [...schema] : { ...schema };
const schemaId = derefSchema.$id;
- if (schemaId !== undefined && typeof schemaId === "string") {
- if (schemaId.charAt(0) === "#") {
- this.#insertDerefSchemaByAnchor(derefSchema, rootSchemaId, schemaId);
- } else {
- this.#insertDerefSchemaBySchemaId(derefSchema, schemaId);
- rootSchemaId = schemaId;
- }
- }
- if (derefSchema.$ref !== undefined) {
- refs.push({
- ref: derefSchema.$ref,
- sourceSchemaId: rootSchemaId,
- sourceSchema: derefSchema
- });
+ if (schemaId !== void 0 && typeof schemaId === "string") if (schemaId.charAt(0) === "#") this.#insertDerefSchemaByAnchor(derefSchema, rootSchemaId, schemaId);
+ else {
+ this.#insertDerefSchemaBySchemaId(derefSchema, schemaId);
+ rootSchemaId = schemaId;
}
+ if (derefSchema.$ref !== void 0) refs.push({
+ ref: derefSchema.$ref,
+ sourceSchemaId: rootSchemaId,
+ sourceSchema: derefSchema
+ });
for (const key in derefSchema) {
const value = derefSchema[key];
- if (typeof value === "object" && value !== null) {
- derefSchema[key] = this.#addDerefSchema(value, rootSchemaId, refs);
- }
+ if (typeof value === "object" && value !== null) derefSchema[key] = this.#addDerefSchema(value, rootSchemaId, refs);
}
return derefSchema;
}
#resolveRef(ref, refs) {
const { sourceSchema, targetSchema } = ref;
if (!sourceSchema.$ref) return;
- if (this.#insertRefSymbol) {
- sourceSchema[jsonSchemaRefSymbol] = sourceSchema.$ref;
- }
+ if (this.#insertRefSymbol) sourceSchema[jsonSchemaRefSymbol] = sourceSchema.$ref;
delete sourceSchema.$ref;
if (targetSchema.$ref) {
const targetSchemaRef = refs.find((ref) => ref.sourceSchema === targetSchema);
@@ -93957,7 +85974,7 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
}
for (const key in targetSchema) {
if (key === "$id") continue;
- if (sourceSchema[key] !== undefined) {
+ if (sourceSchema[key] !== void 0) {
if (deepEqual(sourceSchema[key], targetSchema[key])) continue;
throw new Error(`Cannot resolve ref "${ref.ref}". Property "${key}" is already exist in schema "${ref.sourceSchemaId}".`);
}
@@ -93967,7 +85984,7 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
}
#insertSchemaBySchemaId(schema, schemaId) {
const foundSchema = this.#schemas[schemaId];
- if (foundSchema !== undefined) {
+ if (foundSchema !== void 0) {
if (this.#allowEqualDuplicates && deepEqual(schema, foundSchema.schema)) return;
throw new Error(`There is already another schema with id "${schemaId}".`);
}
@@ -93979,14 +85996,11 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
}
#insertSchemaByAnchor(schema, schemaId, anchor) {
const { anchors } = this.#schemas[schemaId];
- if (anchors[anchor] !== undefined) {
- throw new Error(`There is already another anchor "${anchor}" in a schema "${schemaId}".`);
- }
+ if (anchors[anchor] !== void 0) throw new Error(`There is already another anchor "${anchor}" in a schema "${schemaId}".`);
anchors[anchor] = schema;
}
#insertDerefSchemaBySchemaId(schema, schemaId) {
- const foundSchema = this.#derefSchemas[schemaId];
- if (foundSchema !== undefined) return;
+ if (this.#derefSchemas[schemaId] !== void 0) return;
this.#derefSchemas[schemaId] = {
schema,
anchors: {}
@@ -94002,16 +86016,13 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
let current = data;
for (const part of parts) {
if (part === "" || part === "#") continue;
- if (typeof current !== "object" || current === null) {
- return null;
- }
+ if (typeof current !== "object" || current === null) return null;
current = current[part];
}
return current ?? null;
}
module.exports = { RefResolver };
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/codegen/code.js
var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -94098,7 +86109,7 @@ var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
while (i < expr.length - 1) {
if (expr[i] === plus) {
const res = mergeExprItems(expr[i - 1], expr[i + 1]);
- if (res !== undefined) {
+ if (res !== void 0) {
expr.splice(i - 1, 3, res);
continue;
}
@@ -94117,7 +86128,6 @@ var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
return;
}
if (typeof b == "string" && b[0] === "\"" && !(a instanceof Name)) return `"${a}${b.slice(1)}`;
- return;
}
function strConcat(c1, c2) {
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
@@ -94139,9 +86149,7 @@ var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.getProperty = getProperty;
function getEsmExportName(key) {
- if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
- return new _Code(`${key}`);
- }
+ if (typeof key == "string" && exports.IDENTIFIER.test(key)) return new _Code(`${key}`);
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
}
exports.getEsmExportName = getEsmExportName;
@@ -94150,7 +86158,6 @@ var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.regexpCode = regexpCode;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/codegen/scope.js
var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -94191,9 +86198,7 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
}
_nameGroup(prefix) {
var _a, _b;
- if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
- throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
- }
+ if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
return this._names[prefix] = {
prefix,
index: 0
@@ -94231,7 +86236,7 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
}
value(nameOrPrefix, value) {
var _a;
- if (value.ref === undefined) throw new Error("CodeGen: ref must be passed in value");
+ if (value.ref === void 0) throw new Error("CodeGen: ref must be passed in value");
const name = this.toName(nameOrPrefix);
const { prefix } = name;
const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;
@@ -94239,9 +86244,7 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
if (vs) {
const _name = vs.get(valueKey);
if (_name) return _name;
- } else {
- vs = this._values[prefix] = new Map();
- }
+ } else vs = this._values[prefix] = /* @__PURE__ */ new Map();
vs.set(valueKey, name);
const s = this._scope[prefix] || (this._scope[prefix] = []);
const itemIndex = s.length;
@@ -94259,13 +86262,13 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
}
scopeRefs(scopeName, values = this._values) {
return this._reduceValues(values, (name) => {
- if (name.scopePath === undefined) throw new Error(`CodeGen: name "${name}" has no value`);
+ if (name.scopePath === void 0) throw new Error(`CodeGen: name "${name}" has no value`);
return (0, code_1._)`${scopeName}${name.scopePath}`;
});
}
scopeCode(values = this._values, usedValues, getCode) {
return this._reduceValues(values, (name) => {
- if (name.value === undefined) throw new Error(`CodeGen: name "${name}" has no value`);
+ if (name.value === void 0) throw new Error(`CodeGen: name "${name}" has no value`);
return name.value.code;
}, usedValues, getCode);
}
@@ -94274,7 +86277,7 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
for (const prefix in values) {
const vs = values[prefix];
if (!vs) continue;
- const nameSet = usedValues[prefix] = usedValues[prefix] || new Map();
+ const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();
vs.forEach((name) => {
if (nameSet.has(name)) return;
nameSet.set(name, UsedValueState.Started);
@@ -94282,11 +86285,8 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
if (c) {
const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;
- } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) {
- code = (0, code_1._)`${code}${c}${this.opts._n}`;
- } else {
- throw new ValueError(name);
- }
+ } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) code = (0, code_1._)`${code}${c}${this.opts._n}`;
+ else throw new ValueError(name);
nameSet.set(name, UsedValueState.Completed);
});
}
@@ -94295,7 +86295,6 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
};
exports.ValueScope = ValueScope;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/codegen/index.js
var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -94406,7 +86405,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
}
render({ es5, _n }) {
const varKind = es5 ? scope_1.varKinds.var : this.varKind;
- const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`;
+ const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
return `${varKind} ${this.name}${rhs};` + _n;
}
optimizeNames(names, constants) {
@@ -94434,8 +86433,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
return this;
}
get names() {
- const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
- return addExprNames(names, this.rhs);
+ return addExprNames(this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }, this.rhs);
}
};
var AssignOp = class extends Assign {
@@ -94464,8 +86462,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
this.names = {};
}
render({ _n }) {
- const label = this.label ? ` ${this.label}` : "";
- return `break${label};` + _n;
+ return `break${this.label ? ` ${this.label}` : ""};` + _n;
}
};
var Throw = class extends Node {
@@ -94489,7 +86486,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
return `${this.code};` + _n;
}
optimizeNodes() {
- return `${this.code}` ? this : undefined;
+ return `${this.code}` ? this : void 0;
}
optimizeNames(names, constants) {
this.code = optimizeExpr(this.code, names, constants);
@@ -94516,7 +86513,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
else if (n) nodes[i] = n;
else nodes.splice(i, 1);
}
- return nodes.length > 0 ? this : undefined;
+ return nodes.length > 0 ? this : void 0;
}
optimizeNames(names, constants) {
const { nodes } = this;
@@ -94527,7 +86524,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
subtractNames(names, n.names);
nodes.splice(i, 1);
}
- return nodes.length > 0 ? this : undefined;
+ return nodes.length > 0 ? this : void 0;
}
get names() {
return this.nodes.reduce((names, n) => addNames(names, n.names), {});
@@ -94565,7 +86562,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
if (this.nodes.length) return this;
return new If(not(cond), e instanceof If ? [e] : e.nodes);
}
- if (cond === false || !this.nodes.length) return undefined;
+ if (cond === false || !this.nodes.length) return void 0;
return this;
}
optimizeNames(names, constants) {
@@ -94616,8 +86613,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);
}
get names() {
- const names = addExprNames(super.names, this.from);
- return addExprNames(names, this.to);
+ return addExprNames(addExprNames(super.names, this.from), this.to);
}
};
var ForIter = class extends For {
@@ -94648,8 +86644,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
this.async = async;
}
render(opts) {
- const _async = this.async ? "async " : "";
- return `${_async}function ${this.name}(${this.args})` + super.render(opts);
+ return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(opts);
}
};
Func.kind = "func";
@@ -94669,15 +86664,15 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
optimizeNodes() {
var _a, _b;
super.optimizeNodes();
- (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();
- (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
+ (_a = this.catch) === null || _a === void 0 || _a.optimizeNodes();
+ (_b = this.finally) === null || _b === void 0 || _b.optimizeNodes();
return this;
}
optimizeNames(names, constants) {
var _a, _b;
super.optimizeNames(names, constants);
- (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
- (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
+ (_a = this.catch) === null || _a === void 0 || _a.optimizeNames(names, constants);
+ (_b = this.finally) === null || _b === void 0 || _b.optimizeNames(names, constants);
return this;
}
get names() {
@@ -94727,8 +86722,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
}
scopeValue(prefixOrName, value) {
const name = this._extScope.value(prefixOrName, value);
- const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());
- vs.add(name);
+ (this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set())).add(name);
return name;
}
getScopeValue(prefix, keyOrRef) {
@@ -94742,7 +86736,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
}
_def(varKind, nameOrPrefix, rhs, constant) {
const name = this._scope.toName(nameOrPrefix);
- if (rhs !== undefined && constant) this._constants[name.str] = rhs;
+ if (rhs !== void 0 && constant) this._constants[name.str] = rhs;
this._leafNode(new Def(varKind, name, rhs));
return name;
}
@@ -94781,13 +86775,9 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
}
if(condition, thenBody, elseBody) {
this._blockNode(new If(condition));
- if (thenBody && elseBody) {
- this.code(thenBody).else().code(elseBody).endIf();
- } else if (thenBody) {
- this.code(thenBody).endIf();
- } else if (elseBody) {
- throw new Error("CodeGen: \"else\" body without \"then\" body");
- }
+ if (thenBody && elseBody) this.code(thenBody).else().code(elseBody).endIf();
+ else if (thenBody) this.code(thenBody).endIf();
+ else if (elseBody) throw new Error("CodeGen: \"else\" body without \"then\" body");
return this;
}
elseIf(condition) {
@@ -94823,9 +86813,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
}
forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
- if (this.opts.ownProperties) {
- return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
- }
+ if (this.opts.ownProperties) return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
const name = this._scope.toName(nameOrPrefix);
return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
}
@@ -94871,11 +86859,9 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
}
endBlock(nodeCount) {
const len = this._blockStarts.pop();
- if (len === undefined) throw new Error("CodeGen: not in self-balancing block");
+ if (len === void 0) throw new Error("CodeGen: not in self-balancing block");
const toClose = this._nodes.length - len;
- if (toClose < 0 || nodeCount !== undefined && toClose !== nodeCount) {
- throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
- }
+ if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
this._nodes.length = len;
return this;
}
@@ -94911,9 +86897,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
}
_elseNode(node) {
const n = this._currNode;
- if (!(n instanceof If)) {
- throw new Error("CodeGen: \"else\" without \"if\"");
- }
+ if (!(n instanceof If)) throw new Error("CodeGen: \"else\" without \"if\"");
this._currNode = n.else = node;
return this;
}
@@ -94948,12 +86932,12 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
}, []));
function replaceName(n) {
const c = constants[n.str];
- if (c === undefined || names[n.str] !== 1) return n;
+ if (c === void 0 || names[n.str] !== 1) return n;
delete names[n.str];
return c;
}
function canOptimize(e) {
- return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined);
+ return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);
}
}
function subtractNames(names, from) {
@@ -94980,7 +86964,6 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/util.js
var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95006,9 +86989,7 @@ var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
if (!opts.strictSchema) return;
if (typeof schema === "boolean") return;
const rules = self.RULES.keywords;
- for (const key in schema) {
- if (!rules[key]) checkStrictMode(it, `unknown keyword: "${key}"`);
- }
+ for (const key in schema) if (!rules[key]) checkStrictMode(it, `unknown keyword: "${key}"`);
}
exports.checkUnknownRules = checkUnknownRules;
function schemaHasRules(schema, rules) {
@@ -95049,16 +87030,13 @@ var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.unescapeJsonPointer = unescapeJsonPointer;
function eachItem(xs, f) {
- if (Array.isArray(xs)) {
- for (const x of xs) f(x);
- } else {
- f(xs);
- }
+ if (Array.isArray(xs)) for (const x of xs) f(x);
+ else f(xs);
}
exports.eachItem = eachItem;
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {
return (gen, from, to, toName) => {
- const res = to === undefined ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);
+ const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
};
}
@@ -95068,9 +87046,8 @@ var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));
}),
mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
- if (from === true) {
- gen.assign(to, true);
- } else {
+ if (from === true) gen.assign(to, true);
+ else {
gen.assign(to, (0, codegen_1._)`${to} || {}`);
setEvaluated(gen, to, from);
}
@@ -95091,7 +87068,7 @@ var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
function evaluatedPropsToName(gen, ps) {
if (ps === true) return gen.var("props", true);
const props = gen.var("props", (0, codegen_1._)`{}`);
- if (ps !== undefined) setEvaluated(gen, props, ps);
+ if (ps !== void 0) setEvaluated(gen, props, ps);
return props;
}
exports.evaluatedPropsToName = evaluatedPropsToName;
@@ -95128,13 +87105,12 @@ var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.checkStrictMode = checkStrictMode;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/names.js
var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
- const names = {
+ exports.default = {
data: new codegen_1.Name("data"),
valCxt: new codegen_1.Name("valCxt"),
instancePath: new codegen_1.Name("instancePath"),
@@ -95152,9 +87128,7 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
jsonLen: new codegen_1.Name("jsonLen"),
jsonPart: new codegen_1.Name("jsonPart")
};
- exports.default = names;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/errors.js
var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95169,21 +87143,15 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
const { it } = cxt;
const { gen, compositeRule, allErrors } = it;
const errObj = errorObjectCode(cxt, error, errorPaths);
- if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
- addError(gen, errObj);
- } else {
- returnErrors(it, (0, codegen_1._)`[${errObj}]`);
- }
+ if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) addError(gen, errObj);
+ else returnErrors(it, (0, codegen_1._)`[${errObj}]`);
}
exports.reportError = reportError;
function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
const { it } = cxt;
const { gen, compositeRule, allErrors } = it;
- const errObj = errorObjectCode(cxt, error, errorPaths);
- addError(gen, errObj);
- if (!(compositeRule || allErrors)) {
- returnErrors(it, names_1.default.vErrors);
- }
+ addError(gen, errorObjectCode(cxt, error, errorPaths));
+ if (!(compositeRule || allErrors)) returnErrors(it, names_1.default.vErrors);
}
exports.reportExtraError = reportExtraError;
function resetErrorsCount(gen, errsCount) {
@@ -95193,7 +87161,7 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.resetErrorsCount = resetErrorsCount;
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {
/* istanbul ignore if */
- if (errsCount === undefined) throw new Error("ajv implementation error");
+ if (errsCount === void 0) throw new Error("ajv implementation error");
const err = gen.name("err");
gen.forRange("i", errsCount, names_1.default.errors, (i) => {
gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);
@@ -95213,9 +87181,8 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
function returnErrors(it, errs) {
const { gen, validateName, schemaEnv } = it;
- if (schemaEnv.$async) {
- gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);
- } else {
+ if (schemaEnv.$async) gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);
+ else {
gen.assign((0, codegen_1._)`${validateName}.errors`, errs);
gen.return(false);
}
@@ -95246,25 +87213,18 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;
- if (schemaPath) {
- schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
- }
+ if (schemaPath) schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
return [E.schemaPath, schPath];
}
function extraErrorProps(cxt, { params, message }, keyValues) {
const { keyword, data, schemaValue, it } = cxt;
const { opts, propertyName, topSchemaRef, schemaPath } = it;
keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
- if (opts.messages) {
- keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
- }
- if (opts.verbose) {
- keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
- }
+ if (opts.messages) keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
+ if (opts.verbose) keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
if (propertyName) keyValues.push([E.propertyName, propertyName]);
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/validate/boolSchema.js
var require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95276,11 +87236,9 @@ var require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {
const boolError = { message: "boolean schema is false" };
function topBoolOrEmptySchema(it) {
const { gen, schema, validateName } = it;
- if (schema === false) {
- falseSchemaError(it, false);
- } else if (typeof schema == "object" && schema.$async === true) {
- gen.return(names_1.default.data);
- } else {
+ if (schema === false) falseSchemaError(it, false);
+ else if (typeof schema == "object" && schema.$async === true) gen.return(names_1.default.data);
+ else {
gen.assign((0, codegen_1._)`${validateName}.errors`, null);
gen.return(true);
}
@@ -95291,9 +87249,7 @@ var require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {
if (schema === false) {
gen.var(valid, false);
falseSchemaError(it);
- } else {
- gen.var(valid, true);
- }
+ } else gen.var(valid, true);
}
exports.boolOrEmptySchema = boolOrEmptySchema;
function falseSchemaError(it, overrideAllErrors) {
@@ -95308,16 +87264,15 @@ var require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {
params: {},
it
};
- (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors);
+ (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/rules.js
var require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRules = exports.isJSONType = void 0;
- const _jsonTypes = [
+ const jsonTypes = new Set([
"string",
"number",
"integer",
@@ -95325,8 +87280,7 @@ var require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {
"null",
"object",
"array"
- ];
- const jsonTypes = new Set(_jsonTypes);
+ ]);
function isJSONType(x) {
return typeof x == "string" && jsonTypes.has(x);
}
@@ -95371,7 +87325,6 @@ var require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.getRules = getRules;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/validate/applicability.js
var require_applicability = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95388,11 +87341,10 @@ var require_applicability = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.shouldUseGroup = shouldUseGroup;
function shouldUseRule(schema, rule) {
var _a;
- return schema[rule.keyword] !== undefined || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined));
+ return schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));
}
exports.shouldUseRule = shouldUseRule;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/validate/dataType.js
var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95410,13 +87362,10 @@ var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
})(DataType || (exports.DataType = DataType = {}));
function getSchemaTypes(schema) {
const types = getJSONTypes(schema.type);
- const hasNull = types.includes("null");
- if (hasNull) {
+ if (types.includes("null")) {
if (schema.nullable === false) throw new Error("type: null contradicts nullable: false");
} else {
- if (!types.length && schema.nullable !== undefined) {
- throw new Error("\"nullable\" cannot be used without \"type\"");
- }
+ if (!types.length && schema.nullable !== void 0) throw new Error("\"nullable\" cannot be used without \"type\"");
if (schema.nullable === true) types.push("null");
}
return types;
@@ -95456,15 +87405,9 @@ var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
const { gen, data, opts } = it;
const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`);
const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
- if (opts.coerceTypes === "array") {
- gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
- }
+ if (opts.coerceTypes === "array") gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
gen.if((0, codegen_1._)`${coerced} !== undefined`);
- for (const t of coerceTo) {
- if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") {
- coerceSpecificType(t);
- }
- }
+ for (const t of coerceTo) if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") coerceSpecificType(t);
gen.else();
reportTypeError(it);
gen.endIf();
@@ -95526,9 +87469,7 @@ var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.checkDataType = checkDataType;
function checkDataTypes(dataTypes, data, strictNums, correct) {
- if (dataTypes.length === 1) {
- return checkDataType(dataTypes[0], data, strictNums, correct);
- }
+ if (dataTypes.length === 1) return checkDataType(dataTypes[0], data, strictNums, correct);
let cond;
const types = (0, util_1.toHash)(dataTypes);
if (types.array && types.object) {
@@ -95537,9 +87478,7 @@ var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
delete types.null;
delete types.array;
delete types.object;
- } else {
- cond = codegen_1.nil;
- }
+ } else cond = codegen_1.nil;
if (types.number) delete types.integer;
for (const t in types) cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
return cond;
@@ -95570,7 +87509,6 @@ var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
};
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/validate/defaults.js
var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95580,31 +87518,23 @@ var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
const util_1 = require_util$7();
function assignDefaults(it, ty) {
const { properties, items } = it.schema;
- if (ty === "object" && properties) {
- for (const key in properties) {
- assignDefault(it, key, properties[key].default);
- }
- } else if (ty === "array" && Array.isArray(items)) {
- items.forEach((sch, i) => assignDefault(it, i, sch.default));
- }
+ if (ty === "object" && properties) for (const key in properties) assignDefault(it, key, properties[key].default);
+ else if (ty === "array" && Array.isArray(items)) items.forEach((sch, i) => assignDefault(it, i, sch.default));
}
exports.assignDefaults = assignDefaults;
function assignDefault(it, prop, defaultValue) {
const { gen, compositeRule, data, opts } = it;
- if (defaultValue === undefined) return;
+ if (defaultValue === void 0) return;
const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`;
if (compositeRule) {
(0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);
return;
}
let condition = (0, codegen_1._)`${childData} === undefined`;
- if (opts.useDefaults === "empty") {
- condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`;
- }
+ if (opts.useDefaults === "empty") condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`;
gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/code.js
var require_code = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95713,8 +87643,7 @@ var require_code = /* @__PURE__ */ __commonJSMin(((exports) => {
const { gen, schema, keyword, it } = cxt;
/* istanbul ignore if */
if (!Array.isArray(schema)) throw new Error("ajv implementation error");
- const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
- if (alwaysValid && !it.opts.unevaluated) return;
+ if (schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)) && !it.opts.unevaluated) return;
const valid = gen.let("valid", false);
const schValid = gen.name("_valid");
gen.block(() => schema.forEach((_sch, i) => {
@@ -95724,14 +87653,12 @@ var require_code = /* @__PURE__ */ __commonJSMin(((exports) => {
compositeRule: true
}, schValid);
gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);
- const merged = cxt.mergeValidEvaluated(schCxt, schValid);
- if (!merged) gen.if((0, codegen_1.not)(valid));
+ if (!cxt.mergeValidEvaluated(schCxt, schValid)) gen.if((0, codegen_1.not)(valid));
}));
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
}
exports.validateUnion = validateUnion;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/validate/keyword.js
var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95761,8 +87688,7 @@ var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
var _a;
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
checkAsyncKeyword(it, def);
- const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
- const validateRef = useKeyword(gen, keyword, validate);
+ const validateRef = useKeyword(gen, keyword, !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate);
const valid = gen.let("valid");
cxt.block$data(valid, validateKeyword);
cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);
@@ -95814,7 +87740,7 @@ var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
if (def.async && !schemaEnv.$async) throw new Error("async keyword in sync schema");
}
function useKeyword(gen, keyword, result) {
- if (result === undefined) throw new Error(`keyword "${keyword}" failed to compile`);
+ if (result === void 0) throw new Error(`keyword "${keyword}" failed to compile`);
return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : {
ref: result,
code: (0, codegen_1.stringify)(result)
@@ -95826,16 +87752,11 @@ var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.validSchemaType = validSchemaType;
function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {
/* istanbul ignore if */
- if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
- throw new Error("ajv implementation error");
- }
+ if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) throw new Error("ajv implementation error");
const deps = def.dependencies;
- if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
- throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
- }
+ if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
if (def.validateSchema) {
- const valid = def.validateSchema(schema[keyword]);
- if (!valid) {
+ if (!def.validateSchema(schema[keyword])) {
const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors);
if (opts.validateSchema === "log") self.logger.error(msg);
else throw new Error(msg);
@@ -95844,7 +87765,6 @@ var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.validateKeywordUsage = validateKeywordUsage;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/validate/subschema.js
var require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -95853,12 +87773,10 @@ var require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const util_1 = require_util$7();
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
- if (keyword !== undefined && schema !== undefined) {
- throw new Error("both \"keyword\" and \"schema\" passed, only one allowed");
- }
- if (keyword !== undefined) {
+ if (keyword !== void 0 && schema !== void 0) throw new Error("both \"keyword\" and \"schema\" passed, only one allowed");
+ if (keyword !== void 0) {
const sch = it.schema[keyword];
- return schemaProp === undefined ? {
+ return schemaProp === void 0 ? {
schema: sch,
schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
errSchemaPath: `${it.errSchemaPath}/${keyword}`
@@ -95868,10 +87786,8 @@ var require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {
errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`
};
}
- if (schema !== undefined) {
- if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {
- throw new Error("\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"");
- }
+ if (schema !== void 0) {
+ if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) throw new Error("\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"");
return {
schema,
schemaPath,
@@ -95883,44 +87799,39 @@ var require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.getSubschema = getSubschema;
function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
- if (data !== undefined && dataProp !== undefined) {
- throw new Error("both \"data\" and \"dataProp\" passed, only one allowed");
- }
+ if (data !== void 0 && dataProp !== void 0) throw new Error("both \"data\" and \"dataProp\" passed, only one allowed");
const { gen } = it;
- if (dataProp !== undefined) {
+ if (dataProp !== void 0) {
const { errorPath, dataPathArr, opts } = it;
- const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
- dataContextProps(nextData);
+ dataContextProps(gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true));
subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`;
subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];
}
- if (data !== undefined) {
- const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true);
- dataContextProps(nextData);
- if (propertyName !== undefined) subschema.propertyName = propertyName;
+ if (data !== void 0) {
+ dataContextProps(data instanceof codegen_1.Name ? data : gen.let("data", data, true));
+ if (propertyName !== void 0) subschema.propertyName = propertyName;
}
if (dataTypes) subschema.dataTypes = dataTypes;
function dataContextProps(_nextData) {
subschema.data = _nextData;
subschema.dataLevel = it.dataLevel + 1;
subschema.dataTypes = [];
- it.definedProperties = new Set();
+ it.definedProperties = /* @__PURE__ */ new Set();
subschema.parentData = it.data;
subschema.dataNames = [...it.dataNames, _nextData];
}
}
exports.extendSubschemaData = extendSubschemaData;
function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
- if (compositeRule !== undefined) subschema.compositeRule = compositeRule;
- if (createErrors !== undefined) subschema.createErrors = createErrors;
- if (allErrors !== undefined) subschema.allErrors = allErrors;
+ if (compositeRule !== void 0) subschema.compositeRule = compositeRule;
+ if (createErrors !== void 0) subschema.createErrors = createErrors;
+ if (allErrors !== void 0) subschema.allErrors = allErrors;
subschema.jtdDiscriminator = jtdDiscriminator;
subschema.jtdMetadata = jtdMetadata;
}
exports.extendSubschemaMode = extendSubschemaMode;
}));
-
//#endregion
//#region ../node_modules/json-schema-traverse/index.js
var require_json_schema_traverse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -95984,16 +87895,10 @@ var require_json_schema_traverse = /* @__PURE__ */ __commonJSMin(((exports, modu
for (var key in schema) {
var sch = schema[key];
if (Array.isArray(sch)) {
- if (key in traverse.arrayKeywords) {
- for (var i = 0; i < sch.length; i++) _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
- }
+ if (key in traverse.arrayKeywords) for (var i = 0; i < sch.length; i++) _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
} 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);
- }
+ 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);
}
@@ -96002,7 +87907,6 @@ var require_json_schema_traverse = /* @__PURE__ */ __commonJSMin(((exports, modu
return str.replace(/~/g, "~0").replace(/\//g, "~1");
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/resolve.js
var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -96058,22 +87962,18 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
if (key === "$ref") return Infinity;
count++;
if (SIMPLE_INLINED.has(key)) continue;
- if (typeof schema[key] == "object") {
- (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
- }
+ if (typeof schema[key] == "object") (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
if (count === Infinity) return Infinity;
}
return count;
}
function getFullPath(resolver, id = "", normalize) {
if (normalize !== false) id = normalizeId(id);
- const p = resolver.parse(id);
- return _getFullPath(resolver, p);
+ return _getFullPath(resolver, resolver.parse(id));
}
exports.getFullPath = getFullPath;
function _getFullPath(resolver, p) {
- const serialized = resolver.serialize(p);
- return serialized.split("#")[0] + "#";
+ return resolver.serialize(p).split("#")[0] + "#";
}
exports._getFullPath = _getFullPath;
const TRAILING_SLASH_HASH = /#\/?$/;
@@ -96094,9 +87994,9 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
const baseIds = { "": schId };
const pathPrefix = getFullPath(uriResolver, schId, false);
const localRefs = {};
- const schemaRefs = new Set();
+ const schemaRefs = /* @__PURE__ */ new Set();
traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
- if (parentJsonPtr === undefined) return;
+ if (parentJsonPtr === void 0) return;
const fullPath = pathPrefix + jsonPtr;
let innerBaseId = baseIds[parentJsonPtr];
if (typeof sch[schemaId] == "string") innerBaseId = addRef.call(this, sch[schemaId]);
@@ -96110,16 +88010,11 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
schemaRefs.add(ref);
let schOrRef = this.refs[ref];
if (typeof schOrRef == "string") schOrRef = this.refs[schOrRef];
- if (typeof schOrRef == "object") {
- checkAmbiguosRef(sch, schOrRef.schema, ref);
- } else if (ref !== normalizeId(fullPath)) {
- if (ref[0] === "#") {
- checkAmbiguosRef(sch, localRefs[ref], ref);
- localRefs[ref] = sch;
- } else {
- this.refs[ref] = fullPath;
- }
- }
+ if (typeof schOrRef == "object") checkAmbiguosRef(sch, schOrRef.schema, ref);
+ else if (ref !== normalizeId(fullPath)) if (ref[0] === "#") {
+ checkAmbiguosRef(sch, localRefs[ref], ref);
+ localRefs[ref] = sch;
+ } else this.refs[ref] = fullPath;
return ref;
}
function addAnchor(anchor) {
@@ -96131,15 +88026,14 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
});
return localRefs;
function checkAmbiguosRef(sch1, sch2, ref) {
- if (sch2 !== undefined && !equal(sch1, sch2)) throw ambiguos(ref);
+ if (sch2 !== void 0 && !equal(sch1, sch2)) throw ambiguos(ref);
}
function ambiguos(ref) {
- return new Error(`reference "${ref}" resolves to more than one schema`);
+ return /* @__PURE__ */ new Error(`reference "${ref}" resolves to more than one schema`);
}
}
exports.getSchemaRefs = getSchemaRefs;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/validate/index.js
var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -96169,15 +88063,12 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.validateFunctionCode = validateFunctionCode;
function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
- if (opts.code.es5) {
- gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
- gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
- destructureValCxtES5(gen, opts);
- gen.code(body);
- });
- } else {
- gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
- }
+ if (opts.code.es5) gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
+ gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
+ destructureValCxtES5(gen, opts);
+ gen.code(body);
+ });
+ else gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
}
function destructureValCxt(opts) {
return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
@@ -96208,7 +88099,6 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
typeAndKeywords(it);
returnResults(it);
});
- return;
}
function resetEvaluated(it) {
const { gen, validateName } = it;
@@ -96254,20 +88144,15 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
function typeAndKeywords(it, errsCount) {
if (it.opts.jtd) return schemaKeywords(it, [], false, errsCount);
const types = (0, dataType_1.getSchemaTypes)(it.schema);
- const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);
- schemaKeywords(it, types, !checkedTypes, errsCount);
+ schemaKeywords(it, types, !(0, dataType_1.coerceAndCheckDataType)(it, types), errsCount);
}
function checkRefsAndKeywords(it) {
const { schema, errSchemaPath, opts, self } = it;
- if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {
- self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
- }
+ if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
}
function checkNoDefault(it) {
const { schema, opts } = it;
- if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {
- (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
- }
+ if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
}
function updateContext(it) {
const schId = it.schema[it.opts.schemaId];
@@ -96278,9 +88163,8 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
}
function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
const msg = schema.$comment;
- if (opts.$comment === true) {
- gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);
- } else if (typeof opts.$comment == "function") {
+ if (opts.$comment === true) gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);
+ else if (typeof opts.$comment == "function") {
const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;
const rootName = gen.scopeValue("root", { ref: schemaEnv.root });
gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
@@ -96288,9 +88172,8 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
}
function returnResults(it) {
const { gen, schemaEnv, validateName, ValidationError, opts } = it;
- if (schemaEnv.$async) {
- gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));
- } else {
+ if (schemaEnv.$async) gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));
+ else {
gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);
if (opts.unevaluated) assignEvaluated(it);
gen.return((0, codegen_1._)`${names_1.default.errors} === 0`);
@@ -96322,9 +88205,7 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
(0, dataType_2.reportTypeError)(it);
}
gen.endIf();
- } else {
- iterateKeywords(it, group);
- }
+ } else iterateKeywords(it, group);
if (!allErrors) gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);
}
}
@@ -96332,11 +88213,7 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
const { gen, schema, opts: { useDefaults } } = it;
if (useDefaults) (0, defaults_1.assignDefaults)(it, group.type);
gen.block(() => {
- for (const rule of group.rules) {
- if ((0, applicability_1.shouldUseRule)(schema, rule)) {
- keywordCode(it, rule.keyword, rule.definition, group.type);
- }
- }
+ for (const rule of group.rules) if ((0, applicability_1.shouldUseRule)(schema, rule)) keywordCode(it, rule.keyword, rule.definition, group.type);
});
}
function checkStrictTypes(it, types) {
@@ -96352,16 +88229,12 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
return;
}
types.forEach((t) => {
- if (!includesType(it.dataTypes, t)) {
- strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
- }
+ if (!includesType(it.dataTypes, t)) strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
});
narrowSchemaTypes(it, types);
}
function checkMultipleTypes(it, ts) {
- if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
- strictTypesError(it, "use allowUnionTypes to allow union type keyword");
- }
+ if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) strictTypesError(it, "use allowUnionTypes to allow union type keyword");
}
function checkKeywordTypes(it, ts) {
const rules = it.self.RULES.all;
@@ -96369,9 +88242,7 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
const rule = rules[keyword];
if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
const { type } = rule.definition;
- if (type.length && !type.some((t) => hasApplicableType(ts, t))) {
- strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
- }
+ if (type.length && !type.some((t) => hasApplicableType(ts, t))) strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
}
}
}
@@ -96383,10 +88254,8 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
}
function narrowSchemaTypes(it, withTypes) {
const ts = [];
- for (const t of it.dataTypes) {
- if (includesType(withTypes, t)) ts.push(t);
- else if (withTypes.includes("integer") && t === "number") ts.push("integer");
- }
+ for (const t of it.dataTypes) if (includesType(withTypes, t)) ts.push(t);
+ else if (withTypes.includes("integer") && t === "number") ts.push("integer");
it.dataTypes = ts;
}
function strictTypesError(it, msg) {
@@ -96409,17 +88278,12 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
this.params = {};
this.it = it;
this.def = def;
- if (this.$data) {
- this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
- } else {
+ if (this.$data) this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
+ else {
this.schemaCode = this.schemaValue;
- if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {
- throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);
- }
- }
- if ("code" in def ? def.trackErrors : def.errors !== false) {
- this.errsCount = it.gen.const("_errs", names_1.default.errors);
+ if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);
}
+ if ("code" in def ? def.trackErrors : def.errors !== false) this.errsCount = it.gen.const("_errs", names_1.default.errors);
}
result(condition, successAction, failAction) {
this.failResult((0, codegen_1.not)(condition), successAction, failAction);
@@ -96432,16 +88296,14 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
this.gen.else();
successAction();
if (this.allErrors) this.gen.endIf();
- } else {
- if (this.allErrors) this.gen.endIf();
- else this.gen.else();
- }
+ } else if (this.allErrors) this.gen.endIf();
+ else this.gen.else();
}
pass(condition, failAction) {
- this.failResult((0, codegen_1.not)(condition), undefined, failAction);
+ this.failResult((0, codegen_1.not)(condition), void 0, failAction);
}
fail(condition) {
- if (condition === undefined) {
+ if (condition === void 0) {
this.error();
if (!this.allErrors) this.gen.if(false);
return;
@@ -96466,14 +88328,13 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
this._error(append, errorPaths);
}
_error(append, errorPaths) {
- ;
(append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);
}
$dataError() {
(0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);
}
reset() {
- if (this.errsCount === undefined) throw new Error("add \"trackErrors\" to keyword definition");
+ if (this.errsCount === void 0) throw new Error("add \"trackErrors\" to keyword definition");
(0, errors_1.resetErrorsCount)(this.gen, this.errsCount);
}
ok(cond) {
@@ -96528,8 +88389,8 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
const nextContext = {
...this.it,
...subschema,
- items: undefined,
- props: undefined
+ items: void 0,
+ props: void 0
};
subschemaCode(nextContext, valid);
return nextContext;
@@ -96537,12 +88398,8 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
mergeEvaluated(schemaCxt, toName) {
const { it, gen } = this;
if (!it.opts.unevaluated) return;
- if (it.props !== true && schemaCxt.props !== undefined) {
- it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
- }
- if (it.items !== true && schemaCxt.items !== undefined) {
- it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
- }
+ if (it.props !== true && schemaCxt.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
+ if (it.items !== true && schemaCxt.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
}
mergeValidEvaluated(schemaCxt, valid) {
const { it, gen } = this;
@@ -96555,15 +88412,10 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.KeywordCxt = KeywordCxt;
function keywordCode(it, keyword, def, ruleType) {
const cxt = new KeywordCxt(it, def, keyword);
- if ("code" in def) {
- def.code(cxt, ruleType);
- } else if (cxt.$data && def.validate) {
- (0, keyword_1.funcKeywordCode)(cxt, def);
- } else if ("macro" in def) {
- (0, keyword_1.macroKeywordCode)(cxt, def);
- } else if (def.compile || def.validate) {
- (0, keyword_1.funcKeywordCode)(cxt, def);
- }
+ if ("code" in def) def.code(cxt, ruleType);
+ else if (cxt.$data && def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);
+ else if ("macro" in def) (0, keyword_1.macroKeywordCode)(cxt, def);
+ else if (def.compile || def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);
}
const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
@@ -96590,11 +88442,9 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
}
let expr = data;
const segments = jsonPointer.split("/");
- for (const segment of segments) {
- if (segment) {
- data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
- expr = (0, codegen_1._)`${expr} && ${data}`;
- }
+ for (const segment of segments) if (segment) {
+ data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
+ expr = (0, codegen_1._)`${expr} && ${data}`;
}
return expr;
function errorMsg(pointerType, up) {
@@ -96603,7 +88453,6 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.getData = getData;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/runtime/validation_error.js
var require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -96617,7 +88466,6 @@ var require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {
};
exports.default = ValidationError;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/ref_error.js
var require_ref_error = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -96632,7 +88480,6 @@ var require_ref_error = /* @__PURE__ */ __commonJSMin(((exports) => {
};
exports.default = MissingRefError;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/index.js
var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -96675,12 +88522,10 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
ownProperties
});
let _ValidationError;
- if (sch.$async) {
- _ValidationError = gen.scopeValue("Error", {
- ref: validation_error_1.default,
- code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
- });
- }
+ if (sch.$async) _ValidationError = gen.scopeValue("Error", {
+ ref: validation_error_1.default,
+ code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
+ });
const validateName = gen.scopeName("validate");
sch.validateName = validateName;
const schemaCxt = {
@@ -96693,7 +88538,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
dataPathArr: [codegen_1.nil],
dataLevel: 0,
dataTypes: [],
- definedProperties: new Set(),
+ definedProperties: /* @__PURE__ */ new Set(),
topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? {
ref: sch.schema,
code: (0, codegen_1.stringify)(sch.schema)
@@ -96718,25 +88563,22 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
const validateCode = gen.toString();
sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
if (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch);
- const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
- const validate = makeValidate(this, this.scope.get());
+ const validate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode)(this, this.scope.get());
this.scope.value(validateName, { ref: validate });
validate.errors = null;
validate.schema = sch.schema;
validate.schemaEnv = sch;
if (sch.$async) validate.$async = true;
- if (this.opts.code.source === true) {
- validate.source = {
- validateName,
- validateCode,
- scopeValues: gen._values
- };
- }
+ if (this.opts.code.source === true) validate.source = {
+ validateName,
+ validateCode,
+ scopeValues: gen._values
+ };
if (this.opts.unevaluated) {
const { props, items } = schemaCxt;
validate.evaluated = {
- props: props instanceof codegen_1.Name ? undefined : props,
- items: items instanceof codegen_1.Name ? undefined : items,
+ props: props instanceof codegen_1.Name ? void 0 : props,
+ items: items instanceof codegen_1.Name ? void 0 : items,
dynamicProps: props instanceof codegen_1.Name,
dynamicItems: items instanceof codegen_1.Name
};
@@ -96760,7 +88602,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
const schOrFunc = root.refs[ref];
if (schOrFunc) return schOrFunc;
let _sch = resolve.call(this, root, ref);
- if (_sch === undefined) {
+ if (_sch === void 0) {
const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
const { schemaId } = this.opts;
if (schema) _sch = new SchemaEnv({
@@ -96770,7 +88612,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
baseId
});
}
- if (_sch === undefined) return;
+ if (_sch === void 0) return;
return root.refs[ref] = inlineOrCompile.call(this, _sch);
}
exports.resolveRef = resolveRef;
@@ -96779,9 +88621,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
return sch.validate ? sch : compileSchema.call(this, sch);
}
function getCompilingSchema(schEnv) {
- for (const sch of this._compilations) {
- if (sameSchemaEnv(sch, schEnv)) return sch;
- }
+ for (const sch of this._compilations) if (sameSchemaEnv(sch, schEnv)) return sch;
}
exports.getCompilingSchema = getCompilingSchema;
function sameSchemaEnv(s1, s2) {
@@ -96795,10 +88635,8 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
function resolveSchema(root, ref) {
const p = this.opts.uriResolver.parse(ref);
const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
- let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);
- if (Object.keys(root.schema).length > 0 && refPath === baseId) {
- return getJsonPointer.call(this, p, root);
- }
+ let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);
+ if (Object.keys(root.schema).length > 0 && refPath === baseId) return getJsonPointer.call(this, p, root);
const id = (0, resolve_1.normalizeId)(refPath);
const schOrRef = this.refs[id] || this.schemas[id];
if (typeof schOrRef == "string") {
@@ -96836,12 +88674,10 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
for (const part of parsedRef.fragment.slice(1).split("/")) {
if (typeof schema === "boolean") return;
const partSchema = schema[(0, util_1.unescapeFragment)(part)];
- if (partSchema === undefined) return;
+ if (partSchema === void 0) return;
schema = partSchema;
const schId = typeof schema === "object" && schema[this.opts.schemaId];
- if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
- baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
- }
+ if (!PREVENT_SCOPE_CHANGE.has(part) && schId) baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
}
let env;
if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
@@ -96856,10 +88692,8 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
baseId
});
if (env.schema !== env.root.schema) return env;
- return undefined;
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/refs/data.json
var require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -96875,7 +88709,6 @@ var require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"additionalProperties": false
};
}));
-
//#endregion
//#region ../node_modules/ajv/node_modules/fast-uri/lib/utils.js
var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -96893,20 +88726,14 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let i = 0;
for (i = 0; i < input.length; i++) {
code = input[i].charCodeAt(0);
- if (code === 48) {
- continue;
- }
- if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
- return "";
- }
+ if (code === 48) continue;
+ if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return "";
acc += input[i];
break;
}
for (i += 1; i < input.length; i++) {
code = input[i].charCodeAt(0);
- if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
- return "";
- }
+ if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return "";
acc += input[i];
}
return acc;
@@ -96939,9 +88766,8 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function consumeHextets(buffer, address, output) {
if (buffer.length) {
const hex = stringArrayToHexStripped(buffer);
- if (hex !== "") {
- address.push(hex);
- } else {
+ if (hex !== "") address.push(hex);
+ else {
output.error = true;
return false;
}
@@ -96969,44 +88795,28 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let consume = consumeHextets;
for (let i = 0; i < input.length; i++) {
const cursor = input[i];
- if (cursor === "[" || cursor === "]") {
- continue;
- }
+ if (cursor === "[" || cursor === "]") continue;
if (cursor === ":") {
- if (endipv6Encountered === true) {
- endIpv6 = true;
- }
- if (!consume(buffer, address, output)) {
- break;
- }
+ if (endipv6Encountered === true) endIpv6 = true;
+ if (!consume(buffer, address, output)) break;
if (++tokenCount > 7) {
output.error = true;
break;
}
- if (i > 0 && input[i - 1] === ":") {
- endipv6Encountered = true;
- }
+ if (i > 0 && input[i - 1] === ":") endipv6Encountered = true;
address.push(":");
continue;
} else if (cursor === "%") {
- if (!consume(buffer, address, output)) {
- break;
- }
+ if (!consume(buffer, address, output)) break;
consume = consumeIsZone;
} else {
buffer.push(cursor);
continue;
}
}
- if (buffer.length) {
- if (consume === consumeIsZone) {
- output.zone = buffer.join("");
- } else if (endIpv6) {
- address.push(buffer.join(""));
- } else {
- address.push(stringArrayToHexStripped(buffer));
- }
- }
+ if (buffer.length) if (consume === consumeIsZone) output.zone = buffer.join("");
+ else if (endIpv6) address.push(buffer.join(""));
+ else address.push(stringArrayToHexStripped(buffer));
output.address = address.join("");
return output;
}
@@ -97021,12 +88831,10 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {NormalizeIPv6Result}
*/
function normalizeIPv6(host) {
- if (findToken(host, ":") < 2) {
- return {
- host,
- isIPV6: false
- };
- }
+ if (findToken(host, ":") < 2) return {
+ host,
+ isIPV6: false
+ };
const ipv6 = getIPV6(host);
if (!ipv6.error) {
let newHost = ipv6.address;
@@ -97040,12 +88848,10 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
isIPV6: true,
escapedHost
};
- } else {
- return {
- host,
- isIPV6: false
- };
- }
+ } else return {
+ host,
+ isIPV6: false
+ };
}
/**
* @param {string} str
@@ -97054,9 +88860,7 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function findToken(str, token) {
let ind = 0;
- for (let i = 0; i < str.length; i++) {
- if (str[i] === token) ind++;
- }
+ for (let i = 0; i < str.length; i++) if (str[i] === token) ind++;
return ind;
}
/**
@@ -97071,21 +88875,18 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let nextSlash = -1;
let len = 0;
while (len = input.length) {
- if (len === 1) {
- if (input === ".") {
- break;
- } else if (input === "/") {
- output.push("/");
- break;
- } else {
- output.push(input);
- break;
- }
- } else if (len === 2) {
+ if (len === 1) if (input === ".") break;
+ else if (input === "/") {
+ output.push("/");
+ break;
+ } else {
+ output.push(input);
+ break;
+ }
+ else if (len === 2) {
if (input[0] === ".") {
- if (input[1] === ".") {
- break;
- } else if (input[1] === "/") {
+ if (input[1] === ".") break;
+ else if (input[1] === "/") {
input = input.slice(2);
continue;
}
@@ -97097,9 +88898,7 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
} else if (len === 3) {
if (input === "/..") {
- if (output.length !== 0) {
- output.pop();
- }
+ if (output.length !== 0) output.pop();
output.push("/");
break;
}
@@ -97122,9 +88921,7 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} else if (input[2] === ".") {
if (input[3] === "/") {
input = input.slice(3);
- if (output.length !== 0) {
- output.pop();
- }
+ if (output.length !== 0) output.pop();
continue;
}
}
@@ -97147,24 +88944,12 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function normalizeComponentEncoding(component, esc) {
const func = esc !== true ? escape : unescape;
- if (component.scheme !== undefined) {
- component.scheme = func(component.scheme);
- }
- if (component.userinfo !== undefined) {
- component.userinfo = func(component.userinfo);
- }
- if (component.host !== undefined) {
- component.host = func(component.host);
- }
- if (component.path !== undefined) {
- component.path = func(component.path);
- }
- if (component.query !== undefined) {
- component.query = func(component.query);
- }
- if (component.fragment !== undefined) {
- component.fragment = func(component.fragment);
- }
+ if (component.scheme !== void 0) component.scheme = func(component.scheme);
+ if (component.userinfo !== void 0) component.userinfo = func(component.userinfo);
+ if (component.host !== void 0) component.host = func(component.host);
+ if (component.path !== void 0) component.path = func(component.path);
+ if (component.query !== void 0) component.query = func(component.query);
+ if (component.fragment !== void 0) component.fragment = func(component.fragment);
return component;
}
/**
@@ -97173,19 +88958,16 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function recomposeAuthority(component) {
const uriTokens = [];
- if (component.userinfo !== undefined) {
+ if (component.userinfo !== void 0) {
uriTokens.push(component.userinfo);
uriTokens.push("@");
}
- if (component.host !== undefined) {
+ if (component.host !== void 0) {
let host = unescape(component.host);
if (!isIPv4(host)) {
const ipV6res = normalizeIPv6(host);
- if (ipV6res.isIPV6 === true) {
- host = `[${ipV6res.escapedHost}]`;
- } else {
- host = component.host;
- }
+ if (ipV6res.isIPV6 === true) host = `[${ipV6res.escapedHost}]`;
+ else host = component.host;
}
uriTokens.push(host);
}
@@ -97193,9 +88975,8 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
uriTokens.push(":");
uriTokens.push(String(component.port));
}
- return uriTokens.length ? uriTokens.join("") : undefined;
+ return uriTokens.length ? uriTokens.join("") : void 0;
}
- ;
module.exports = {
nonSimpleDomain,
recomposeAuthority,
@@ -97207,7 +88988,6 @@ var require_utils$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
stringArrayToHexStripped
};
}));
-
//#endregion
//#region ../node_modules/ajv/node_modules/fast-uri/lib/schemes.js
var require_schemes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -97253,58 +89033,45 @@ var require_schemes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {boolean}
*/
function wsIsSecure(wsComponent) {
- if (wsComponent.secure === true) {
- return true;
- } else if (wsComponent.secure === false) {
- return false;
- } else if (wsComponent.scheme) {
- return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S");
- } else {
- return false;
- }
+ if (wsComponent.secure === true) return true;
+ else if (wsComponent.secure === false) return false;
+ else if (wsComponent.scheme) return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S");
+ else return false;
}
/** @type {SchemeFn} */
function httpParse(component) {
- if (!component.host) {
- component.error = component.error || "HTTP URIs must have a host.";
- }
+ if (!component.host) component.error = component.error || "HTTP URIs must have a host.";
return component;
}
/** @type {SchemeFn} */
function httpSerialize(component) {
const secure = String(component.scheme).toLowerCase() === "https";
- if (component.port === (secure ? 443 : 80) || component.port === "") {
- component.port = undefined;
- }
- if (!component.path) {
- component.path = "/";
- }
+ if (component.port === (secure ? 443 : 80) || component.port === "") component.port = void 0;
+ if (!component.path) component.path = "/";
return component;
}
/** @type {SchemeFn} */
function wsParse(wsComponent) {
wsComponent.secure = wsIsSecure(wsComponent);
wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : "");
- wsComponent.path = undefined;
- wsComponent.query = undefined;
+ wsComponent.path = void 0;
+ wsComponent.query = void 0;
return wsComponent;
}
/** @type {SchemeFn} */
function wsSerialize(wsComponent) {
- if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") {
- wsComponent.port = undefined;
- }
+ if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") wsComponent.port = void 0;
if (typeof wsComponent.secure === "boolean") {
wsComponent.scheme = wsComponent.secure ? "wss" : "ws";
- wsComponent.secure = undefined;
+ wsComponent.secure = void 0;
}
if (wsComponent.resourceName) {
const [path, query] = wsComponent.resourceName.split("?");
- wsComponent.path = path && path !== "/" ? path : undefined;
+ wsComponent.path = path && path !== "/" ? path : void 0;
wsComponent.query = query;
- wsComponent.resourceName = undefined;
+ wsComponent.resourceName = void 0;
}
- wsComponent.fragment = undefined;
+ wsComponent.fragment = void 0;
return wsComponent;
}
/** @type {SchemeFn} */
@@ -97318,29 +89085,19 @@ var require_schemes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const scheme = options.scheme || urnComponent.scheme || "urn";
urnComponent.nid = matches[1].toLowerCase();
urnComponent.nss = matches[2];
- const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`;
- const schemeHandler = getSchemeHandler(urnScheme);
- urnComponent.path = undefined;
- if (schemeHandler) {
- urnComponent = schemeHandler.parse(urnComponent, options);
- }
- } else {
- urnComponent.error = urnComponent.error || "URN can not be parsed.";
- }
+ const schemeHandler = getSchemeHandler(`${scheme}:${options.nid || urnComponent.nid}`);
+ urnComponent.path = void 0;
+ if (schemeHandler) urnComponent = schemeHandler.parse(urnComponent, options);
+ } else urnComponent.error = urnComponent.error || "URN can not be parsed.";
return urnComponent;
}
/** @type {SchemeFn} */
function urnSerialize(urnComponent, options) {
- if (urnComponent.nid === undefined) {
- throw new Error("URN without nid cannot be serialized");
- }
+ if (urnComponent.nid === void 0) throw new Error("URN without nid cannot be serialized");
const scheme = options.scheme || urnComponent.scheme || "urn";
const nid = urnComponent.nid.toLowerCase();
- const urnScheme = `${scheme}:${options.nid || nid}`;
- const schemeHandler = getSchemeHandler(urnScheme);
- if (schemeHandler) {
- urnComponent = schemeHandler.serialize(urnComponent, options);
- }
+ const schemeHandler = getSchemeHandler(`${scheme}:${options.nid || nid}`);
+ if (schemeHandler) urnComponent = schemeHandler.serialize(urnComponent, options);
const uriComponent = urnComponent;
const nss = urnComponent.nss;
uriComponent.path = `${nid || options.nid}:${nss}`;
@@ -97351,10 +89108,8 @@ var require_schemes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function urnuuidParse(urnComponent, options) {
const uuidComponent = urnComponent;
uuidComponent.uuid = uuidComponent.nss;
- uuidComponent.nss = undefined;
- if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {
- uuidComponent.error = uuidComponent.error || "UUID is not valid.";
- }
+ uuidComponent.nss = void 0;
+ if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) uuidComponent.error = uuidComponent.error || "UUID is not valid.";
return uuidComponent;
}
/** @type {SchemeFn} */
@@ -97413,7 +89168,7 @@ var require_schemes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {SchemeHandler|undefined}
*/
function getSchemeHandler(scheme) {
- return scheme && (SCHEMES[scheme] || SCHEMES[scheme.toLowerCase()]) || undefined;
+ return scheme && (SCHEMES[scheme] || SCHEMES[scheme.toLowerCase()]) || void 0;
}
module.exports = {
wsIsSecure,
@@ -97422,7 +89177,6 @@ var require_schemes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
getSchemeHandler
};
}));
-
//#endregion
//#region ../node_modules/ajv/node_modules/fast-uri/index.js
var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -97435,11 +89189,8 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @returns {T}
*/
function normalize(uri, options) {
- if (typeof uri === "string") {
- uri = serialize(parse(uri, options), options);
- } else if (typeof uri === "object") {
- uri = parse(serialize(uri, options), options);
- }
+ if (typeof uri === "string") uri = serialize(parse(uri, options), options);
+ else if (typeof uri === "object") uri = parse(serialize(uri, options), options);
return uri;
}
/**
@@ -97477,7 +89228,7 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
target.path = removeDotSegments(relative.path || "");
target.query = relative.query;
} else {
- if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
+ 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;
@@ -97486,22 +89237,14 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} else {
if (!relative.path) {
target.path = base.path;
- if (relative.query !== undefined) {
- target.query = relative.query;
- } else {
- target.query = base.query;
- }
+ if (relative.query !== void 0) target.query = relative.query;
+ else target.query = base.query;
} else {
- if (relative.path[0] === "/") {
- target.path = removeDotSegments(relative.path);
- } else {
- if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
- target.path = "/" + relative.path;
- } else if (!base.path) {
- target.path = relative.path;
- } else {
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
- }
+ if (relative.path[0] === "/") target.path = removeDotSegments(relative.path);
+ else {
+ if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = "/" + relative.path;
+ else if (!base.path) target.path = relative.path;
+ else target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
target.path = removeDotSegments(target.path);
}
target.query = relative.query;
@@ -97528,24 +89271,20 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
...options,
skipEscape: true
});
- } else if (typeof uriA === "object") {
- uriA = serialize(normalizeComponentEncoding(uriA, true), {
- ...options,
- skipEscape: true
- });
- }
+ } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
+ ...options,
+ skipEscape: true
+ });
if (typeof uriB === "string") {
uriB = unescape(uriB);
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), {
...options,
skipEscape: true
});
- } else if (typeof uriB === "object") {
- uriB = serialize(normalizeComponentEncoding(uriB, true), {
- ...options,
- skipEscape: true
- });
- }
+ } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
+ ...options,
+ skipEscape: true
+ });
return uriA.toLowerCase() === uriB.toLowerCase();
}
/**
@@ -97574,45 +89313,25 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const uriTokens = [];
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
- if (component.path !== undefined) {
- if (!options.skipEscape) {
- component.path = escape(component.path);
- if (component.scheme !== undefined) {
- component.path = component.path.split("%3A").join(":");
- }
- } else {
- component.path = unescape(component.path);
- }
- }
- if (options.reference !== "suffix" && component.scheme) {
- uriTokens.push(component.scheme, ":");
- }
+ if (component.path !== void 0) if (!options.skipEscape) {
+ component.path = escape(component.path);
+ if (component.scheme !== void 0) component.path = component.path.split("%3A").join(":");
+ } else component.path = unescape(component.path);
+ if (options.reference !== "suffix" && component.scheme) uriTokens.push(component.scheme, ":");
const authority = recomposeAuthority(component);
- if (authority !== undefined) {
- if (options.reference !== "suffix") {
- uriTokens.push("//");
- }
+ if (authority !== void 0) {
+ if (options.reference !== "suffix") uriTokens.push("//");
uriTokens.push(authority);
- if (component.path && component.path[0] !== "/") {
- uriTokens.push("/");
- }
+ if (component.path && component.path[0] !== "/") uriTokens.push("/");
}
- if (component.path !== undefined) {
+ if (component.path !== void 0) {
let s = component.path;
- if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
- s = removeDotSegments(s);
- }
- if (authority === undefined && s[0] === "/" && s[1] === "/") {
- s = "/%2F" + s.slice(2);
- }
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);
+ if (authority === void 0 && s[0] === "/" && s[1] === "/") s = "/%2F" + s.slice(2);
uriTokens.push(s);
}
- if (component.query !== undefined) {
- uriTokens.push("?", component.query);
- }
- if (component.fragment !== undefined) {
- uriTokens.push("#", component.fragment);
- }
+ if (component.query !== void 0) uriTokens.push("?", component.query);
+ if (component.fragment !== void 0) uriTokens.push("#", component.fragment);
return uriTokens.join("");
}
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
@@ -97625,22 +89344,17 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const options = Object.assign({}, opts);
/** @type {import('./types/index').URIComponent} */
const parsed = {
- scheme: undefined,
- userinfo: undefined,
+ scheme: void 0,
+ userinfo: void 0,
host: "",
- port: undefined,
+ port: void 0,
path: "",
- query: undefined,
- fragment: undefined
+ query: void 0,
+ fragment: void 0
};
let isIP = false;
- if (options.reference === "suffix") {
- if (options.scheme) {
- uri = options.scheme + ":" + uri;
- } else {
- uri = "//" + uri;
- }
- }
+ if (options.reference === "suffix") if (options.scheme) uri = options.scheme + ":" + uri;
+ else uri = "//" + uri;
const matches = uri.match(URI_PARSE);
if (matches) {
parsed.scheme = matches[1];
@@ -97650,63 +89364,35 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parsed.path = matches[6] || "";
parsed.query = matches[7];
parsed.fragment = matches[8];
- if (isNaN(parsed.port)) {
- parsed.port = matches[5];
- }
- if (parsed.host) {
- const ipv4result = isIPv4(parsed.host);
- if (ipv4result === false) {
- const ipv6result = normalizeIPv6(parsed.host);
- parsed.host = ipv6result.host.toLowerCase();
- isIP = ipv6result.isIPV6;
- } else {
- isIP = true;
- }
- }
- if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) {
- parsed.reference = "same-document";
- } else if (parsed.scheme === undefined) {
- parsed.reference = "relative";
- } else if (parsed.fragment === undefined) {
- parsed.reference = "absolute";
- } else {
- parsed.reference = "uri";
- }
- if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
- parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
- }
+ if (isNaN(parsed.port)) parsed.port = matches[5];
+ if (parsed.host) if (isIPv4(parsed.host) === false) {
+ const ipv6result = normalizeIPv6(parsed.host);
+ parsed.host = ipv6result.host.toLowerCase();
+ isIP = ipv6result.isIPV6;
+ } else isIP = true;
+ if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) parsed.reference = "same-document";
+ else if (parsed.scheme === void 0) parsed.reference = "relative";
+ else if (parsed.fragment === void 0) parsed.reference = "absolute";
+ else parsed.reference = "uri";
+ if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
- if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
- try {
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
- } catch (e) {
- parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
- }
+ if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) try {
+ parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
+ } catch (e) {
+ parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
}
}
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
if (uri.indexOf("%") !== -1) {
- if (parsed.scheme !== undefined) {
- parsed.scheme = unescape(parsed.scheme);
- }
- if (parsed.host !== undefined) {
- parsed.host = unescape(parsed.host);
- }
- }
- if (parsed.path) {
- parsed.path = escape(unescape(parsed.path));
- }
- if (parsed.fragment) {
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
+ if (parsed.scheme !== void 0) parsed.scheme = unescape(parsed.scheme);
+ if (parsed.host !== void 0) parsed.host = unescape(parsed.host);
}
+ if (parsed.path) parsed.path = escape(unescape(parsed.path));
+ if (parsed.fragment) parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
}
- if (schemeHandler && schemeHandler.parse) {
- schemeHandler.parse(parsed, options);
- }
- } else {
- parsed.error = parsed.error || "URI can not be parsed.";
- }
+ if (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed, options);
+ } else parsed.error = parsed.error || "URI can not be parsed.";
return parsed;
}
const fastUri = {
@@ -97722,7 +89408,6 @@ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.default = fastUri;
module.exports.fastUri = fastUri;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/runtime/uri.js
var require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -97731,7 +89416,6 @@ var require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {
uri.code = "require(\"ajv/dist/runtime/uri\").default";
exports.default = uri;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/core.js
var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -97840,7 +89524,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
const s = o.strict;
const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;
- const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0;
+ const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
return {
@@ -97876,9 +89560,9 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
this.schemas = {};
this.refs = {};
this.formats = {};
- this._compilations = new Set();
+ this._compilations = /* @__PURE__ */ new Set();
this._loading = {};
- this._cache = new Map();
+ this._cache = /* @__PURE__ */ new Map();
opts = this.opts = {
...opts,
...requiredOptions(opts)
@@ -97920,16 +89604,14 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
defaultMeta() {
const { meta, schemaId } = this.opts;
- return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined;
+ return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0;
}
validate(schemaKeyRef, data) {
let v;
if (typeof schemaKeyRef == "string") {
v = this.getSchema(schemaKeyRef);
if (!v) throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
- } else {
- v = this.compile(schemaKeyRef);
- }
+ } else v = this.compile(schemaKeyRef);
const valid = v(data);
if (!("$async" in v)) this.errors = v.errors;
return valid;
@@ -97939,9 +89621,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
return sch.validate || this._compileSchemaEnv(sch);
}
compileAsync(schema, meta) {
- if (typeof this.opts.loadSchema != "function") {
- throw new Error("options.loadSchema should be a function");
- }
+ if (typeof this.opts.loadSchema != "function") throw new Error("options.loadSchema should be a function");
const { loadSchema } = this.opts;
return runCompileAsync.call(this, schema, meta);
async function runCompileAsync(_schema, _meta) {
@@ -97950,9 +89630,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
return sch.validate || _compileAsync.call(this, sch);
}
async function loadMetaSchema($ref) {
- if ($ref && !this.getSchema($ref)) {
- await runCompileAsync.call(this, { $ref }, true);
- }
+ if ($ref && !this.getSchema($ref)) await runCompileAsync.call(this, { $ref }, true);
}
async function _compileAsync(sch) {
try {
@@ -97965,9 +89643,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
function checkLoaded({ missingSchema: ref, missingRef }) {
- if (this.refs[ref]) {
- throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);
- }
+ if (this.refs[ref]) throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);
}
async function loadMissingSchema(ref) {
const _schema = await _loadSchema.call(this, ref);
@@ -97986,16 +89662,14 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
if (Array.isArray(schema)) {
- for (const sch of schema) this.addSchema(sch, undefined, _meta, _validateSchema);
+ for (const sch of schema) this.addSchema(sch, void 0, _meta, _validateSchema);
return this;
}
let id;
if (typeof schema === "object") {
const { schemaId } = this.opts;
id = schema[schemaId];
- if (id !== undefined && typeof id != "string") {
- throw new Error(`schema ${schemaId} must be string`);
- }
+ if (id !== void 0 && typeof id != "string") throw new Error(`schema ${schemaId} must be string`);
}
key = (0, resolve_1.normalizeId)(key || id);
this._checkUnique(key);
@@ -98010,9 +89684,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
if (typeof schema == "boolean") return true;
let $schema;
$schema = schema.$schema;
- if ($schema !== undefined && typeof $schema != "string") {
- throw new Error("$schema must be a string");
- }
+ if ($schema !== void 0 && typeof $schema != "string") throw new Error("$schema must be a string");
$schema = $schema || this.opts.defaultMeta || this.defaultMeta();
if (!$schema) {
this.logger.warn("meta-schema not available");
@@ -98030,7 +89702,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
getSchema(keyRef) {
let sch;
while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") keyRef = sch;
- if (sch === undefined) {
+ if (sch === void 0) {
const { schemaId } = this.opts;
const root = new compile_1.SchemaEnv({
schema: {},
@@ -98087,15 +89759,11 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
this.logger.warn("these parameters are deprecated, see docs for addKeyword");
def.keyword = keyword;
}
- } else if (typeof kwdOrDef == "object" && def === undefined) {
+ } else if (typeof kwdOrDef == "object" && def === void 0) {
def = kwdOrDef;
keyword = def.keyword;
- if (Array.isArray(keyword) && !keyword.length) {
- throw new Error("addKeywords: keyword must be string or non-empty array");
- }
- } else {
- throw new Error("invalid addKeywords parameters");
- }
+ if (Array.isArray(keyword) && !keyword.length) throw new Error("addKeywords: keyword must be string or non-empty array");
+ } else throw new Error("invalid addKeywords parameters");
checkKeyword.call(this, keyword, def);
if (!def) {
(0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));
@@ -98154,9 +89822,8 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
for (const keyRef in schemas) {
const sch = schemas[keyRef];
if (!regex || regex.test(keyRef)) {
- if (typeof sch == "string") {
- delete schemas[keyRef];
- } else if (sch && !sch.meta) {
+ if (typeof sch == "string") delete schemas[keyRef];
+ else if (sch && !sch.meta) {
this._cache.delete(sch.schema);
delete schemas[keyRef];
}
@@ -98166,14 +89833,11 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
_addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
let id;
const { schemaId } = this.opts;
- if (typeof schema == "object") {
- id = schema[schemaId];
- } else {
- if (this.opts.jtd) throw new Error("schema must be object");
- else if (typeof schema != "boolean") throw new Error("schema must be object or boolean");
- }
+ if (typeof schema == "object") id = schema[schemaId];
+ else if (this.opts.jtd) throw new Error("schema must be object");
+ else if (typeof schema != "boolean") throw new Error("schema must be object or boolean");
let sch = this._cache.get(schema);
- if (sch !== undefined) return sch;
+ if (sch !== void 0) return sch;
baseId = (0, resolve_1.normalizeId)(id || baseId);
const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
sch = new compile_1.SchemaEnv({
@@ -98192,9 +89856,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
return sch;
}
_checkUnique(id) {
- if (this.schemas[id] || this.refs[id]) {
- throw new Error(`schema with key or id "${id}" already exists`);
- }
+ if (this.schemas[id] || this.refs[id]) throw new Error(`schema with key or id "${id}" already exists`);
}
_compileSchemaEnv(sch) {
if (sch.meta) this._compileMetaSchema(sch);
@@ -98262,7 +89924,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
};
function getLogger(logger) {
if (logger === false) return noLogs;
- if (logger === undefined) return console;
+ if (logger === void 0) return console;
if (logger.log && logger.warn && logger.error) return logger;
throw new Error("logger must implement log, warn and error methods");
}
@@ -98274,9 +89936,7 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
if (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`);
});
if (!def) return;
- if (def.$data && !("code" in def || "validate" in def)) {
- throw new Error("$data keyword must have \"code\" or \"validate\" function");
- }
+ if (def.$data && !("code" in def || "validate" in def)) throw new Error("$data keyword must have \"code\" or \"validate\" function");
}
function addRule(keyword, definition, dataType) {
var _a;
@@ -98304,20 +89964,19 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
if (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before);
else ruleGroup.rules.push(rule);
RULES.all[keyword] = rule;
- (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
+ (_a = definition.implements) === null || _a === void 0 || _a.forEach((kwd) => this.addKeyword(kwd));
}
function addBeforeRule(ruleGroup, rule, before) {
const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
- if (i >= 0) {
- ruleGroup.rules.splice(i, 0, rule);
- } else {
+ if (i >= 0) ruleGroup.rules.splice(i, 0, rule);
+ else {
ruleGroup.rules.push(rule);
this.logger.warn(`rule ${before} is not defined`);
}
}
function keywordMetaschema(def) {
let { metaSchema } = def;
- if (metaSchema === undefined) return;
+ if (metaSchema === void 0) return;
if (def.$data && this.opts.$data) metaSchema = schemaOrData(metaSchema);
def.validateSchema = this.compile(metaSchema, true);
}
@@ -98326,20 +89985,17 @@ var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
return { anyOf: [schema, $dataRef] };
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/core/id.js
var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- const def = {
+ exports.default = {
keyword: "id",
code() {
throw new Error("NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID");
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/core/ref.js
var require_ref$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98360,7 +90016,7 @@ var require_ref$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
const { root } = env;
if (($ref === "#" || $ref === "#/") && baseId === root.baseId) return callRootRef();
const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);
- if (schOrEnv === undefined) throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
+ if (schOrEnv === void 0) throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
if (schOrEnv instanceof compile_1.SchemaEnv) return callValidate(schOrEnv);
return inlineRefSchema(schOrEnv);
function callRootRef() {
@@ -98369,8 +90025,7 @@ var require_ref$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);
}
function callValidate(sch) {
- const v = getValidate(cxt, sch);
- callRef(cxt, v, sch, sch.$async);
+ callRef(cxt, getValidate(cxt, sch), sch, sch.$async);
}
function inlineRefSchema(sch) {
const schName = gen.scopeValue("schema", opts.code.source === true ? {
@@ -98427,39 +90082,30 @@ var require_ref$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
var _a;
if (!it.opts.unevaluated) return;
const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
- if (it.props !== true) {
- if (schEvaluated && !schEvaluated.dynamicProps) {
- if (schEvaluated.props !== undefined) {
- it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
- }
- } else {
- const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
- it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
- }
+ if (it.props !== true) if (schEvaluated && !schEvaluated.dynamicProps) {
+ if (schEvaluated.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
+ } else {
+ const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
+ it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
}
- if (it.items !== true) {
- if (schEvaluated && !schEvaluated.dynamicItems) {
- if (schEvaluated.items !== undefined) {
- it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
- }
- } else {
- const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
- it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
- }
+ if (it.items !== true) if (schEvaluated && !schEvaluated.dynamicItems) {
+ if (schEvaluated.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
+ } else {
+ const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
+ it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
}
}
}
exports.callRef = callRef;
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/core/index.js
var require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const id_1 = require_id();
const ref_1 = require_ref$1();
- const core = [
+ exports.default = [
"$schema",
"$id",
"$defs",
@@ -98469,9 +90115,7 @@ var require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
id_1.default,
ref_1.default
];
- exports.default = core;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/limitNumber.js
var require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98500,39 +90144,35 @@ var require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
fail: ops.LTE
}
};
- const error = {
- message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
- params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: Object.keys(KWDs),
type: "number",
schemaType: "number",
$data: true,
- error,
+ error: {
+ message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
+ params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
+ },
code(cxt) {
const { keyword, data, schemaCode } = cxt;
cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/multipleOf.js
var require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
- const error = {
- message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
- params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: "multipleOf",
type: "number",
schemaType: "number",
$data: true,
- error,
+ error: {
+ message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
+ params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
+ },
code(cxt) {
const { gen, data, schemaCode, it } = cxt;
const prec = it.opts.multipleOfPrecision;
@@ -98541,9 +90181,7 @@ var require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {
cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/runtime/ucs2length.js
var require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98566,7 +90204,6 @@ var require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.default = ucs2length;
ucs2length.code = "require(\"ajv/dist/runtime/ucs2length\").default";
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/limitLength.js
var require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98574,19 +90211,18 @@ var require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const util_1 = require_util$7();
const ucs2length_1 = require_ucs2length();
- const error = {
- message({ keyword, schemaCode }) {
- const comp = keyword === "maxLength" ? "more" : "fewer";
- return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
- },
- params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: ["maxLength", "minLength"],
type: "string",
schemaType: "number",
$data: true,
- error,
+ error: {
+ message({ keyword, schemaCode }) {
+ const comp = keyword === "maxLength" ? "more" : "fewer";
+ return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
+ },
+ params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
+ },
code(cxt) {
const { keyword, data, schemaCode, it } = cxt;
const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
@@ -98594,25 +90230,22 @@ var require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {
cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/pattern.js
var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const code_1 = require_code();
const codegen_1 = require_codegen();
- const error = {
- message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
- params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: "pattern",
type: "string",
schemaType: "string",
$data: true,
- error,
+ error: {
+ message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
+ params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
+ },
code(cxt) {
const { data, $data, schema, schemaCode, it } = cxt;
const u = it.opts.unicodeRegExp ? "u" : "";
@@ -98620,36 +90253,31 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/limitProperties.js
var require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
- const error = {
- message({ keyword, schemaCode }) {
- const comp = keyword === "maxProperties" ? "more" : "fewer";
- return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
- },
- params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: ["maxProperties", "minProperties"],
type: "object",
schemaType: "number",
$data: true,
- error,
+ error: {
+ message({ keyword, schemaCode }) {
+ const comp = keyword === "maxProperties" ? "more" : "fewer";
+ return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
+ },
+ params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
+ },
code(cxt) {
const { keyword, data, schemaCode } = cxt;
const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/required.js
var require_required = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98657,16 +90285,15 @@ var require_required = /* @__PURE__ */ __commonJSMin(((exports) => {
const code_1 = require_code();
const codegen_1 = require_codegen();
const util_1 = require_util$7();
- const error = {
- message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
- params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
- };
- const def = {
+ exports.default = {
keyword: "required",
type: "object",
schemaType: "array",
$data: true,
- error,
+ error: {
+ message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
+ params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
+ },
code(cxt) {
const { gen, schema, schemaCode, data, $data, it } = cxt;
const { opts } = it;
@@ -98677,22 +90304,14 @@ var require_required = /* @__PURE__ */ __commonJSMin(((exports) => {
if (opts.strictRequired) {
const props = cxt.parentSchema.properties;
const { definedProperties } = cxt.it;
- for (const requiredKey of schema) {
- if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) {
- const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
- const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
- (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
- }
+ for (const requiredKey of schema) if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
+ const msg = `required property "${requiredKey}" is not defined at "${it.schemaEnv.baseId + it.errSchemaPath}" (strictRequired)`;
+ (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
}
}
function allErrorsMode() {
- if (useLoop || $data) {
- cxt.block$data(codegen_1.nil, loopAllRequired);
- } else {
- for (const prop of schema) {
- (0, code_1.checkReportMissingProp)(cxt, prop);
- }
- }
+ if (useLoop || $data) cxt.block$data(codegen_1.nil, loopAllRequired);
+ else for (const prop of schema) (0, code_1.checkReportMissingProp)(cxt, prop);
}
function exitOnErrorMode() {
const missing = gen.let("missing");
@@ -98724,36 +90343,31 @@ var require_required = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/limitItems.js
var require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
- const error = {
- message({ keyword, schemaCode }) {
- const comp = keyword === "maxItems" ? "more" : "fewer";
- return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
- },
- params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: ["maxItems", "minItems"],
type: "array",
schemaType: "number",
$data: true,
- error,
+ error: {
+ message({ keyword, schemaCode }) {
+ const comp = keyword === "maxItems" ? "more" : "fewer";
+ return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
+ },
+ params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
+ },
code(cxt) {
const { keyword, data, schemaCode } = cxt;
const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/runtime/equal.js
var require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98762,7 +90376,6 @@ var require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {
equal.code = "require(\"ajv/dist/runtime/equal\").default";
exports.default = equal;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
var require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98771,16 +90384,15 @@ var require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const util_1 = require_util$7();
const equal_1 = require_equal();
- const error = {
- message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
- params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
- };
- const def = {
+ exports.default = {
keyword: "uniqueItems",
type: "array",
schemaType: "boolean",
$data: true,
- error,
+ error: {
+ message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
+ params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
+ },
code(cxt) {
const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
if (!$data && !schema) return;
@@ -98826,9 +90438,7 @@ var require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/const.js
var require_const = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98836,26 +90446,20 @@ var require_const = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const util_1 = require_util$7();
const equal_1 = require_equal();
- const error = {
- message: "must be equal to constant",
- params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: "const",
$data: true,
- error,
+ error: {
+ message: "must be equal to constant",
+ params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
+ },
code(cxt) {
const { gen, data, $data, schemaCode, schema } = cxt;
- if ($data || schema && typeof schema == "object") {
- cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
- } else {
- cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
- }
+ if ($data || schema && typeof schema == "object") cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
+ else cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/enum.js
var require_enum$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98863,15 +90467,14 @@ var require_enum$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const util_1 = require_util$7();
const equal_1 = require_equal();
- const error = {
- message: "must be equal to one of the allowed values",
- params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: "enum",
schemaType: "array",
$data: true,
- error,
+ error: {
+ message: "must be equal to one of the allowed values",
+ params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
+ },
code(cxt) {
const { gen, data, $data, schema, schemaCode, it } = cxt;
if (!$data && schema.length === 0) throw new Error("enum must have non-empty array");
@@ -98899,9 +90502,7 @@ var require_enum$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/validation/index.js
var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98916,7 +90517,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
const uniqueItems_1 = require_uniqueItems();
const const_1 = require_const();
const enum_1 = require_enum$1();
- const validation = [
+ exports.default = [
limitNumber_1.default,
multipleOf_1.default,
limitLength_1.default,
@@ -98936,9 +90537,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
const_1.default,
enum_1.default
];
- exports.default = validation;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
var require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -98946,16 +90545,15 @@ var require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.validateAdditionalItems = void 0;
const codegen_1 = require_codegen();
const util_1 = require_util$7();
- const error = {
- message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
- params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
- };
const def = {
keyword: "additionalItems",
type: "array",
schemaType: ["boolean", "object"],
before: "uniqueItems",
- error,
+ error: {
+ message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
+ params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
+ },
code(cxt) {
const { parentSchema, it } = cxt;
const { items } = parentSchema;
@@ -98992,7 +90590,6 @@ var require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.validateAdditionalItems = validateAdditionalItems;
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/items.js
var require_items = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99021,9 +90618,7 @@ var require_items = /* @__PURE__ */ __commonJSMin(((exports) => {
function validateTuple(cxt, extraItems, schArr = cxt.schema) {
const { gen, parentSchema, data, keyword, it } = cxt;
checkStrictTuple(parentSchema);
- if (it.opts.unevaluated && schArr.length && it.items !== true) {
- it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
- }
+ if (it.opts.unevaluated && schArr.length && it.items !== true) it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
const valid = gen.name("valid");
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
schArr.forEach((sch, i) => {
@@ -99048,22 +90643,19 @@ var require_items = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.validateTuple = validateTuple;
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
var require_prefixItems = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const items_1 = require_items();
- const def = {
+ exports.default = {
keyword: "prefixItems",
type: "array",
schemaType: ["array"],
before: "uniqueItems",
code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/items2020.js
var require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99072,16 +90664,15 @@ var require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {
const util_1 = require_util$7();
const code_1 = require_code();
const additionalItems_1 = require_additionalItems();
- const error = {
- message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
- params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
- };
- const def = {
+ exports.default = {
keyword: "items",
type: "array",
schemaType: ["object", "boolean"],
before: "uniqueItems",
- error,
+ error: {
+ message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
+ params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
+ },
code(cxt) {
const { schema, parentSchema, it } = cxt;
const { prefixItems } = parentSchema;
@@ -99091,64 +90682,58 @@ var require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {
else cxt.ok((0, code_1.validateArray)(cxt));
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/contains.js
var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
const util_1 = require_util$7();
- const error = {
- message: ({ params: { min, max } }) => max === undefined ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
- params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
- };
- const def = {
+ exports.default = {
keyword: "contains",
type: "array",
schemaType: ["object", "boolean"],
before: "uniqueItems",
trackErrors: true,
- error,
+ error: {
+ message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
+ params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
+ },
code(cxt) {
const { gen, schema, parentSchema, data, it } = cxt;
let min;
let max;
const { minContains, maxContains } = parentSchema;
if (it.opts.next) {
- min = minContains === undefined ? 1 : minContains;
+ min = minContains === void 0 ? 1 : minContains;
max = maxContains;
- } else {
- min = 1;
- }
+ } else min = 1;
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
cxt.setParams({
min,
max
});
- if (max === undefined && min === 0) {
+ if (max === void 0 && min === 0) {
(0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
return;
}
- if (max !== undefined && min > max) {
+ if (max !== void 0 && min > max) {
(0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
cxt.fail();
return;
}
if ((0, util_1.alwaysValidSchema)(it, schema)) {
let cond = (0, codegen_1._)`${len} >= ${min}`;
- if (max !== undefined) cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
+ if (max !== void 0) cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
cxt.pass(cond);
return;
}
it.items = true;
const valid = gen.name("valid");
- if (max === undefined && min === 1) {
- validateItems(valid, () => gen.if(valid, () => gen.break()));
- } else if (min === 0) {
+ if (max === void 0 && min === 1) validateItems(valid, () => gen.if(valid, () => gen.break()));
+ else if (min === 0) {
gen.let(valid, true);
- if (max !== undefined) gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);
+ if (max !== void 0) gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);
} else {
gen.let(valid, false);
validateItemsWithCount();
@@ -99172,9 +90757,8 @@ var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
}
function checkLimits(count) {
gen.code((0, codegen_1._)`${count}++`);
- if (max === undefined) {
- gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
- } else {
+ if (max === void 0) gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
+ else {
gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
if (min === 1) gen.assign(valid, true);
else gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
@@ -99182,9 +90766,7 @@ var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/dependencies.js
var require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99237,13 +90819,10 @@ var require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {
depsCount: deps.length,
deps: deps.join(", ")
});
- if (it.allErrors) {
- gen.if(hasProperty, () => {
- for (const depProp of deps) {
- (0, code_1.checkReportMissingProp)(cxt, depProp);
- }
- });
- } else {
+ if (it.allErrors) gen.if(hasProperty, () => {
+ for (const depProp of deps) (0, code_1.checkReportMissingProp)(cxt, depProp);
+ });
+ else {
gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);
(0, code_1.reportMissingProp)(cxt, missing);
gen.else();
@@ -99269,22 +90848,20 @@ var require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.validateSchemaDeps = validateSchemaDeps;
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
var require_propertyNames = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
const util_1 = require_util$7();
- const error = {
- message: "property name must be valid",
- params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
- };
- const def = {
+ exports.default = {
keyword: "propertyNames",
type: "object",
schemaType: ["object", "boolean"],
- error,
+ error: {
+ message: "property name must be valid",
+ params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
+ },
code(cxt) {
const { gen, schema, data, it } = cxt;
if ((0, util_1.alwaysValidSchema)(it, schema)) return;
@@ -99306,9 +90883,7 @@ var require_propertyNames = /* @__PURE__ */ __commonJSMin(((exports) => {
cxt.ok(valid);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
var require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99317,17 +90892,16 @@ var require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const names_1 = require_names();
const util_1 = require_util$7();
- const error = {
- message: "must NOT have additional properties",
- params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
- };
- const def = {
+ exports.default = {
keyword: "additionalProperties",
type: ["object"],
schemaType: ["boolean", "object"],
allowUndefined: true,
trackErrors: true,
- error,
+ error: {
+ message: "must NOT have additional properties",
+ params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
+ },
code(cxt) {
const { gen, schema, parentSchema, data, errsCount, it } = cxt;
/* istanbul ignore if */
@@ -99350,14 +90924,9 @@ var require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
if (props.length > 8) {
const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
- } else if (props.length) {
- definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
- } else {
- definedProp = codegen_1.nil;
- }
- if (patProps.length) {
- definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
- }
+ } else if (props.length) definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
+ else definedProp = codegen_1.nil;
+ if (patProps.length) definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
return (0, codegen_1.not)(definedProp);
}
function deleteAdditional(key) {
@@ -99394,20 +90963,16 @@ var require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
dataProp: key,
dataPropType: util_1.Type.Str
};
- if (errors === false) {
- Object.assign(subschema, {
- compositeRule: true,
- createErrors: false,
- allErrors: false
- });
- }
+ if (errors === false) Object.assign(subschema, {
+ compositeRule: true,
+ createErrors: false,
+ allErrors: false
+ });
cxt.subschema(subschema, valid);
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/properties.js
var require_properties$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99416,29 +90981,22 @@ var require_properties$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
const code_1 = require_code();
const util_1 = require_util$7();
const additionalProperties_1 = require_additionalProperties();
- const def = {
+ exports.default = {
keyword: "properties",
type: "object",
schemaType: "object",
code(cxt) {
const { gen, schema, parentSchema, data, it } = cxt;
- if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === undefined) {
- additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
- }
+ if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
const allProps = (0, code_1.allSchemaProperties)(schema);
- for (const prop of allProps) {
- it.definedProperties.add(prop);
- }
- if (it.opts.unevaluated && allProps.length && it.props !== true) {
- it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
- }
+ for (const prop of allProps) it.definedProperties.add(prop);
+ if (it.opts.unevaluated && allProps.length && it.props !== true) it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
if (properties.length === 0) return;
const valid = gen.name("valid");
for (const prop of properties) {
- if (hasDefault(prop)) {
- applyPropertySchema(prop);
- } else {
+ if (hasDefault(prop)) applyPropertySchema(prop);
+ else {
gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));
applyPropertySchema(prop);
if (!it.allErrors) gen.else().var(valid, true);
@@ -99448,7 +91006,7 @@ var require_properties$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
cxt.ok(valid);
}
function hasDefault(prop) {
- return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined;
+ return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
}
function applyPropertySchema(prop) {
cxt.subschema({
@@ -99459,9 +91017,7 @@ var require_properties$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
var require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99470,7 +91026,7 @@ var require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const util_1 = require_util$7();
const util_2 = require_util$7();
- const def = {
+ exports.default = {
keyword: "patternProperties",
type: "object",
schemaType: "object",
@@ -99479,22 +91035,17 @@ var require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
const { opts } = it;
const patterns = (0, code_1.allSchemaProperties)(schema);
const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
- if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
- return;
- }
+ if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) return;
const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
const valid = gen.name("valid");
- if (it.props !== true && !(it.props instanceof codegen_1.Name)) {
- it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
- }
+ if (it.props !== true && !(it.props instanceof codegen_1.Name)) it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
const { props } = it;
validatePatternProperties();
function validatePatternProperties() {
for (const pat of patterns) {
if (checkProperties) checkMatchingProperties(pat);
- if (it.allErrors) {
- validateProperties(pat);
- } else {
+ if (it.allErrors) validateProperties(pat);
+ else {
gen.var(valid, true);
validateProperties(pat);
gen.if(valid);
@@ -99502,43 +91053,32 @@ var require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
function checkMatchingProperties(pat) {
- for (const prop in checkProperties) {
- if (new RegExp(pat).test(prop)) {
- (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
- }
- }
+ for (const prop in checkProperties) if (new RegExp(pat).test(prop)) (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
}
function validateProperties(pat) {
gen.forIn("key", data, (key) => {
gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
const alwaysValid = alwaysValidPatterns.includes(pat);
- if (!alwaysValid) {
- cxt.subschema({
- keyword: "patternProperties",
- schemaProp: pat,
- dataProp: key,
- dataPropType: util_2.Type.Str
- }, valid);
- }
- if (it.opts.unevaluated && props !== true) {
- gen.assign((0, codegen_1._)`${props}[${key}]`, true);
- } else if (!alwaysValid && !it.allErrors) {
- gen.if((0, codegen_1.not)(valid), () => gen.break());
- }
+ if (!alwaysValid) cxt.subschema({
+ keyword: "patternProperties",
+ schemaProp: pat,
+ dataProp: key,
+ dataPropType: util_2.Type.Str
+ }, valid);
+ if (it.opts.unevaluated && props !== true) gen.assign((0, codegen_1._)`${props}[${key}]`, true);
+ else if (!alwaysValid && !it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
});
});
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/not.js
var require_not = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require_util$7();
- const def = {
+ exports.default = {
keyword: "not",
schemaType: ["object", "boolean"],
trackErrors: true,
@@ -99559,39 +91099,33 @@ var require_not = /* @__PURE__ */ __commonJSMin(((exports) => {
},
error: { message: "must NOT be valid" }
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/anyOf.js
var require_anyOf = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- const code_1 = require_code();
- const def = {
+ exports.default = {
keyword: "anyOf",
schemaType: "array",
trackErrors: true,
- code: code_1.validateUnion,
+ code: require_code().validateUnion,
error: { message: "must match a schema in anyOf" }
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/oneOf.js
var require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
const util_1 = require_util$7();
- const error = {
- message: "must match exactly one schema in oneOf",
- params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
- };
- const def = {
+ exports.default = {
keyword: "oneOf",
schemaType: "array",
trackErrors: true,
- error,
+ error: {
+ message: "must match exactly one schema in oneOf",
+ params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
+ },
code(cxt) {
const { gen, schema, parentSchema, it } = cxt;
/* istanbul ignore if */
@@ -99607,18 +91141,13 @@ var require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {
function validateOneOf() {
schArr.forEach((sch, i) => {
let schCxt;
- if ((0, util_1.alwaysValidSchema)(it, sch)) {
- gen.var(schValid, true);
- } else {
- schCxt = cxt.subschema({
- keyword: "oneOf",
- schemaProp: i,
- compositeRule: true
- }, schValid);
- }
- if (i > 0) {
- gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
- }
+ if ((0, util_1.alwaysValidSchema)(it, sch)) gen.var(schValid, true);
+ else schCxt = cxt.subschema({
+ keyword: "oneOf",
+ schemaProp: i,
+ compositeRule: true
+ }, schValid);
+ if (i > 0) gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
gen.if(schValid, () => {
gen.assign(valid, true);
gen.assign(passing, i);
@@ -99628,15 +91157,13 @@ var require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/allOf.js
var require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require_util$7();
- const def = {
+ exports.default = {
keyword: "allOf",
schemaType: "array",
code(cxt) {
@@ -99655,29 +91182,24 @@ var require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {
});
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/if.js
var require_if = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
const util_1 = require_util$7();
- const error = {
- message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
- params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
- };
const def = {
keyword: "if",
schemaType: ["object", "boolean"],
trackErrors: true,
- error,
+ error: {
+ message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
+ params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
+ },
code(cxt) {
const { gen, parentSchema, it } = cxt;
- if (parentSchema.then === undefined && parentSchema.else === undefined) {
- (0, util_1.checkStrictMode)(it, "\"if\" without \"then\" and \"else\" is ignored");
- }
+ if (parentSchema.then === void 0 && parentSchema.else === void 0) (0, util_1.checkStrictMode)(it, "\"if\" without \"then\" and \"else\" is ignored");
const hasThen = hasSchema(it, "then");
const hasElse = hasSchema(it, "else");
if (!hasThen && !hasElse) return;
@@ -99689,11 +91211,8 @@ var require_if = /* @__PURE__ */ __commonJSMin(((exports) => {
const ifClause = gen.let("ifClause");
cxt.setParams({ ifClause });
gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause));
- } else if (hasThen) {
- gen.if(schValid, validateClause("then"));
- } else {
- gen.if((0, codegen_1.not)(schValid), validateClause("else"));
- }
+ } else if (hasThen) gen.if(schValid, validateClause("then"));
+ else gen.if((0, codegen_1.not)(schValid), validateClause("else"));
cxt.pass(valid, () => cxt.error(true));
function validateIf() {
const schCxt = cxt.subschema({
@@ -99717,26 +91236,23 @@ var require_if = /* @__PURE__ */ __commonJSMin(((exports) => {
};
function hasSchema(it, keyword) {
const schema = it.schema[keyword];
- return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema);
+ return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
}
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/thenElse.js
var require_thenElse = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require_util$7();
- const def = {
+ exports.default = {
keyword: ["then", "else"],
schemaType: ["object", "boolean"],
code({ keyword, parentSchema, it }) {
- if (parentSchema.if === undefined) (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`);
+ if (parentSchema.if === void 0) (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/applicator/index.js
var require_applicator = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99778,22 +91294,20 @@ var require_applicator = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.default = getApplicator;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/format/format.js
var require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require_codegen();
- const error = {
- message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
- params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: "format",
type: ["number", "string"],
schemaType: "string",
$data: true,
- error,
+ error: {
+ message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
+ params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
+ },
code(cxt, ruleType) {
const { gen, data, $data, schema, schemaCode, it } = cxt;
const { opts, errSchemaPath, schemaEnv, self } = it;
@@ -99840,19 +91354,17 @@ var require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
function getFormat(fmtDef) {
- const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : undefined;
+ const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
const fmt = gen.scopeValue("formats", {
key: schema,
ref: fmtDef,
code
});
- if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
- return [
- fmtDef.type || "string",
- fmtDef.validate,
- (0, codegen_1._)`${fmt}.validate`
- ];
- }
+ if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) return [
+ fmtDef.type || "string",
+ fmtDef.validate,
+ (0, codegen_1._)`${fmt}.validate`
+ ];
return [
"string",
fmtDef,
@@ -99869,18 +91381,13 @@ var require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/format/index.js
var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- const format_1 = require_format$1();
- const format = [format_1.default];
- exports.default = format;
+ exports.default = [require_format$1().default];
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/metadata.js
var require_metadata$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99901,7 +91408,6 @@ var require_metadata$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
"contentSchema"
];
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/draft7.js
var require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99911,7 +91417,7 @@ var require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {
const applicator_1 = require_applicator();
const format_1 = require_format();
const metadata_1 = require_metadata$1();
- const draft7Vocabularies = [
+ exports.default = [
core_1.default,
validation_1.default,
(0, applicator_1.default)(),
@@ -99919,9 +91425,7 @@ var require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {
metadata_1.metadataVocabulary,
metadata_1.contentVocabulary
];
- exports.default = draft7Vocabularies;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/discriminator/types.js
var require_types$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99933,7 +91437,6 @@ var require_types$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
DiscrError["Mapping"] = "mapping";
})(DiscrError || (exports.DiscrError = DiscrError = {}));
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/discriminator/index.js
var require_discriminator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -99943,21 +91446,18 @@ var require_discriminator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
const compile_1 = require_compile();
const ref_error_1 = require_ref_error();
const util_1 = require_util$7();
- const error = {
- message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
- params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
- };
- const def = {
+ exports.default = {
keyword: "discriminator",
type: "object",
schemaType: "object",
- error,
+ error: {
+ message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
+ params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
+ },
code(cxt) {
const { gen, data, schema, parentSchema, it } = cxt;
const { oneOf } = parentSchema;
- if (!it.opts.discriminator) {
- throw new Error("discriminator: requires discriminator option");
- }
+ if (!it.opts.discriminator) throw new Error("discriminator: requires discriminator option");
const tagName = schema.propertyName;
if (typeof tagName != "string") throw new Error("discriminator: requires propertyName");
if (schema.mapping) throw new Error("discriminator: mapping is not supported");
@@ -100005,12 +91505,10 @@ var require_discriminator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
const ref = sch.$ref;
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
if (sch instanceof compile_1.SchemaEnv) sch = sch.schema;
- if (sch === undefined) throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
+ if (sch === void 0) throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
}
const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
- if (typeof propSch != "object") {
- throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
- }
+ if (typeof propSch != "object") throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
tagRequired = tagRequired && (topRequired || hasRequired(sch));
addMappings(propSch, i);
}
@@ -100020,28 +91518,18 @@ var require_discriminator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
return Array.isArray(required) && required.includes(tagName);
}
function addMappings(sch, i) {
- if (sch.const) {
- addMapping(sch.const, i);
- } else if (sch.enum) {
- for (const tagValue of sch.enum) {
- addMapping(tagValue, i);
- }
- } else {
- throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
- }
+ if (sch.const) addMapping(sch.const, i);
+ else if (sch.enum) for (const tagValue of sch.enum) addMapping(tagValue, i);
+ else throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
}
function addMapping(tagValue, i) {
- if (typeof tagValue != "string" || tagValue in oneOfMapping) {
- throw new Error(`discriminator: "${tagName}" values must be unique strings`);
- }
+ if (typeof tagValue != "string" || tagValue in oneOfMapping) throw new Error(`discriminator: "${tagName}" values must be unique strings`);
oneOfMapping[tagValue] = i;
}
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/refs/json-schema-draft-07.json
var require_json_schema_draft_07 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -100180,7 +91668,6 @@ var require_json_schema_draft_07 = /* @__PURE__ */ __commonJSMin(((exports, modu
"default": true
};
}));
-
//#endregion
//#region ../node_modules/ajv/dist/ajv.js
var require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -100206,7 +91693,7 @@ var require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
}
defaultMeta() {
- return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined);
+ return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
}
};
exports.Ajv = Ajv;
@@ -100273,11 +91760,10 @@ var require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
});
}));
-
//#endregion
//#region ../node_modules/fast-uri/lib/scopedChars.js
var require_scopedChars = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- const HEX = {
+ module.exports = { HEX: {
0: 0,
1: 1,
2: 2,
@@ -100300,41 +91786,33 @@ var require_scopedChars = /* @__PURE__ */ __commonJSMin(((exports, module) => {
E: 14,
f: 15,
F: 15
- };
- module.exports = { HEX };
+ } };
}));
-
//#endregion
//#region ../node_modules/fast-uri/lib/utils.js
var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { HEX } = require_scopedChars();
function normalizeIPv4(host) {
- if (findToken(host, ".") < 3) {
- return {
- host,
- isIPV4: false
- };
- }
- const matches = host.match(/^(\b[01]?\d{1,2}|\b2[0-4]\d|\b25[0-5])(\.([01]?\d{1,2}|2[0-4]\d|25[0-5])){3}$/u) || [];
- const [address] = matches;
- if (address) {
- return {
- host: stripLeadingZeros(address, "."),
- isIPV4: true
- };
- } else {
- return {
- host,
- isIPV4: false
- };
- }
+ if (findToken(host, ".") < 3) return {
+ host,
+ isIPV4: false
+ };
+ const [address] = host.match(/^(\b[01]?\d{1,2}|\b2[0-4]\d|\b25[0-5])(\.([01]?\d{1,2}|2[0-4]\d|25[0-5])){3}$/u) || [];
+ if (address) return {
+ host: stripLeadingZeros(address, "."),
+ isIPV4: true
+ };
+ else return {
+ host,
+ isIPV4: false
+ };
}
function stringToHexStripped(input) {
let acc = "";
let strip = true;
for (const c of input) {
if (c !== "0" && strip === true) strip = false;
- if (HEX[c] === undefined) return undefined;
+ if (HEX[c] === void 0) return void 0;
if (!strip) acc += c;
}
return acc;
@@ -100355,9 +91833,8 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (buffer.length) {
if (isZone === false) {
const hex = stringToHexStripped(buffer.join(""));
- if (hex !== undefined) {
- address.push(hex);
- } else {
+ if (hex !== void 0) address.push(hex);
+ else {
output.error = true;
return false;
}
@@ -100368,55 +91845,37 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
for (let i = 0; i < input.length; i++) {
const cursor = input[i];
- if (cursor === "[" || cursor === "]") {
- continue;
- }
+ if (cursor === "[" || cursor === "]") continue;
if (cursor === ":") {
- if (endipv6Encountered === true) {
- endIpv6 = true;
- }
- if (!consume()) {
- break;
- }
+ if (endipv6Encountered === true) endIpv6 = true;
+ if (!consume()) break;
tokenCount++;
address.push(":");
if (tokenCount > 7) {
output.error = true;
break;
}
- if (i - 1 >= 0 && input[i - 1] === ":") {
- endipv6Encountered = true;
- }
+ if (i - 1 >= 0 && input[i - 1] === ":") endipv6Encountered = true;
continue;
} else if (cursor === "%") {
- if (!consume()) {
- break;
- }
+ if (!consume()) break;
isZone = true;
} else {
buffer.push(cursor);
continue;
}
}
- if (buffer.length) {
- if (isZone) {
- output.zone = buffer.join("");
- } else if (endIpv6) {
- address.push(buffer.join(""));
- } else {
- address.push(stringToHexStripped(buffer.join("")));
- }
- }
+ if (buffer.length) if (isZone) output.zone = buffer.join("");
+ else if (endIpv6) address.push(buffer.join(""));
+ else address.push(stringToHexStripped(buffer.join("")));
output.address = address.join("");
return output;
}
function normalizeIPv6(host, opts = {}) {
- if (findToken(host, ":") < 2) {
- return {
- host,
- isIPV6: false
- };
- }
+ if (findToken(host, ":") < 2) return {
+ host,
+ isIPV6: false
+ };
const ipv6 = getIPV6(host);
if (!ipv6.error) {
let newHost = ipv6.address;
@@ -100430,12 +91889,10 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
escapedHost,
isIPV6: true
};
- } else {
- return {
- host,
- isIPV6: false
- };
- }
+ } else return {
+ host,
+ isIPV6: false
+ };
}
function stripLeadingZeros(str, token) {
let out = "";
@@ -100449,11 +91906,8 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
skip = false;
}
} else {
- if (c === token) {
- skip = true;
- } else {
- skip = false;
- }
+ if (c === token) skip = true;
+ else skip = false;
out += c;
}
}
@@ -100461,9 +91915,7 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function findToken(str, token) {
let ind = 0;
- for (let i = 0; i < str.length; i++) {
- if (str[i] === token) ind++;
- }
+ for (let i = 0; i < str.length; i++) if (str[i] === token) ind++;
return ind;
}
const RDS1 = /^\.\.?\//u;
@@ -100472,69 +91924,46 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u;
function removeDotSegments(input) {
const 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 {
- const im = input.match(RDS5);
- if (im) {
- const s = im[0];
- input = input.slice(s.length);
- output.push(s);
- } else {
- throw new Error("Unexpected dot segment condition");
- }
- }
+ 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 {
+ const im = input.match(RDS5);
+ if (im) {
+ const s = im[0];
+ input = input.slice(s.length);
+ output.push(s);
+ } else throw new Error("Unexpected dot segment condition");
}
return output.join("");
}
function normalizeComponentEncoding(components, esc) {
const func = esc !== true ? escape : unescape;
- if (components.scheme !== undefined) {
- components.scheme = func(components.scheme);
- }
- if (components.userinfo !== undefined) {
- components.userinfo = func(components.userinfo);
- }
- if (components.host !== undefined) {
- components.host = func(components.host);
- }
- if (components.path !== undefined) {
- components.path = func(components.path);
- }
- if (components.query !== undefined) {
- components.query = func(components.query);
- }
- if (components.fragment !== undefined) {
- components.fragment = func(components.fragment);
- }
+ if (components.scheme !== void 0) components.scheme = func(components.scheme);
+ if (components.userinfo !== void 0) components.userinfo = func(components.userinfo);
+ if (components.host !== void 0) components.host = func(components.host);
+ if (components.path !== void 0) components.path = func(components.path);
+ if (components.query !== void 0) components.query = func(components.query);
+ if (components.fragment !== void 0) components.fragment = func(components.fragment);
return components;
}
function recomposeAuthority(components, options) {
const uriTokens = [];
- if (components.userinfo !== undefined) {
+ if (components.userinfo !== void 0) {
uriTokens.push(components.userinfo);
uriTokens.push("@");
}
- if (components.host !== undefined) {
+ if (components.host !== void 0) {
let host = unescape(components.host);
const ipV4res = normalizeIPv4(host);
- if (ipV4res.isIPV4) {
- host = ipV4res.host;
- } else {
+ if (ipV4res.isIPV4) host = ipV4res.host;
+ else {
const ipV6res = normalizeIPv6(ipV4res.host, { isIPV4: false });
- if (ipV6res.isIPV6 === true) {
- host = `[${ipV6res.escapedHost}]`;
- } else {
- host = components.host;
- }
+ if (ipV6res.isIPV6 === true) host = `[${ipV6res.escapedHost}]`;
+ else host = components.host;
}
uriTokens.push(host);
}
@@ -100542,9 +91971,8 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
uriTokens.push(":");
uriTokens.push(String(components.port));
}
- return uriTokens.length ? uriTokens.join("") : undefined;
+ return uriTokens.length ? uriTokens.join("") : void 0;
}
- ;
module.exports = {
recomposeAuthority,
normalizeComponentEncoding,
@@ -100554,7 +91982,6 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
stringToHexStripped
};
}));
-
//#endregion
//#region ../node_modules/fast-uri/lib/schemes.js
var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -100564,43 +91991,35 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
}
function httpParse(components) {
- if (!components.host) {
- components.error = components.error || "HTTP URIs must have a host.";
- }
+ if (!components.host) components.error = components.error || "HTTP URIs must have a host.";
return components;
}
function httpSerialize(components) {
const secure = String(components.scheme).toLowerCase() === "https";
- if (components.port === (secure ? 443 : 80) || components.port === "") {
- components.port = undefined;
- }
- if (!components.path) {
- components.path = "/";
- }
+ if (components.port === (secure ? 443 : 80) || components.port === "") components.port = void 0;
+ if (!components.path) components.path = "/";
return components;
}
function wsParse(wsComponents) {
wsComponents.secure = isSecure(wsComponents);
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
- wsComponents.path = undefined;
- wsComponents.query = undefined;
+ wsComponents.path = void 0;
+ wsComponents.query = void 0;
return wsComponents;
}
function wsSerialize(wsComponents) {
- if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
- wsComponents.port = undefined;
- }
+ 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 = undefined;
+ wsComponents.secure = void 0;
}
if (wsComponents.resourceName) {
const [path, query] = wsComponents.resourceName.split("?");
- wsComponents.path = path && path !== "/" ? path : undefined;
+ wsComponents.path = path && path !== "/" ? path : void 0;
wsComponents.query = query;
- wsComponents.resourceName = undefined;
+ wsComponents.resourceName = void 0;
}
- wsComponents.fragment = undefined;
+ wsComponents.fragment = void 0;
return wsComponents;
}
function urnParse(urnComponents, options) {
@@ -100613,25 +92032,17 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const scheme = options.scheme || urnComponents.scheme || "urn";
urnComponents.nid = matches[1].toLowerCase();
urnComponents.nss = matches[2];
- const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`;
- const schemeHandler = SCHEMES[urnScheme];
- urnComponents.path = undefined;
- if (schemeHandler) {
- urnComponents = schemeHandler.parse(urnComponents, options);
- }
- } else {
- urnComponents.error = urnComponents.error || "URN can not be parsed.";
- }
+ const schemeHandler = SCHEMES[`${scheme}:${options.nid || urnComponents.nid}`];
+ urnComponents.path = void 0;
+ if (schemeHandler) urnComponents = schemeHandler.parse(urnComponents, options);
+ } else urnComponents.error = urnComponents.error || "URN can not be parsed.";
return urnComponents;
}
function urnSerialize(urnComponents, options) {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = urnComponents.nid.toLowerCase();
- const urnScheme = `${scheme}:${options.nid || nid}`;
- const schemeHandler = SCHEMES[urnScheme];
- if (schemeHandler) {
- urnComponents = schemeHandler.serialize(urnComponents, options);
- }
+ const schemeHandler = SCHEMES[`${scheme}:${options.nid || nid}`];
+ if (schemeHandler) urnComponents = schemeHandler.serialize(urnComponents, options);
const uriComponents = urnComponents;
const nss = urnComponents.nss;
uriComponents.path = `${nid || options.nid}:${nss}`;
@@ -100641,10 +92052,8 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function urnuuidParse(urnComponents, options) {
const uuidComponents = urnComponents;
uuidComponents.uuid = uuidComponents.nss;
- uuidComponents.nss = undefined;
- if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
- uuidComponents.error = uuidComponents.error || "UUID is not valid.";
- }
+ uuidComponents.nss = void 0;
+ if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) uuidComponents.error = uuidComponents.error || "UUID is not valid.";
return uuidComponents;
}
function urnuuidSerialize(uuidComponents) {
@@ -100698,24 +92107,19 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = SCHEMES;
}));
-
//#endregion
//#region ../node_modules/fast-uri/index.js
var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils$3();
const SCHEMES = require_schemes();
function normalize(uri, options) {
- if (typeof uri === "string") {
- uri = serialize(parse(uri, options), options);
- } else if (typeof uri === "object") {
- uri = parse(serialize(uri, options), options);
- }
+ if (typeof uri === "string") uri = serialize(parse(uri, options), options);
+ else if (typeof uri === "object") uri = parse(serialize(uri, options), options);
return uri;
}
function resolve(baseURI, relativeURI, options) {
const schemelessOptions = Object.assign({ scheme: "null" }, options);
- const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
- return serialize(resolved, {
+ return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), {
...schemelessOptions,
skipEscape: true
});
@@ -100735,7 +92139,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
target.path = removeDotSegments(relative.path || "");
target.query = relative.query;
} else {
- if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
+ 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;
@@ -100744,22 +92148,14 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} else {
if (!relative.path) {
target.path = base.path;
- if (relative.query !== undefined) {
- target.query = relative.query;
- } else {
- target.query = base.query;
- }
+ if (relative.query !== void 0) target.query = relative.query;
+ else target.query = base.query;
} else {
- if (relative.path.charAt(0) === "/") {
- target.path = removeDotSegments(relative.path);
- } else {
- if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
- target.path = "/" + relative.path;
- } else if (!base.path) {
- target.path = relative.path;
- } else {
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
- }
+ if (relative.path.charAt(0) === "/") target.path = removeDotSegments(relative.path);
+ else {
+ if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = "/" + relative.path;
+ else if (!base.path) target.path = relative.path;
+ else target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
target.path = removeDotSegments(target.path);
}
target.query = relative.query;
@@ -100780,24 +92176,20 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
...options,
skipEscape: true
});
- } else if (typeof uriA === "object") {
- uriA = serialize(normalizeComponentEncoding(uriA, true), {
- ...options,
- skipEscape: true
- });
- }
+ } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
+ ...options,
+ skipEscape: true
+ });
if (typeof uriB === "string") {
uriB = unescape(uriB);
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), {
...options,
skipEscape: true
});
- } else if (typeof uriB === "object") {
- uriB = serialize(normalizeComponentEncoding(uriB, true), {
- ...options,
- skipEscape: true
- });
- }
+ } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
+ ...options,
+ skipEscape: true
+ });
return uriA.toLowerCase() === uriB.toLowerCase();
}
function serialize(cmpts, opts) {
@@ -100821,45 +92213,31 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const uriTokens = [];
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
- if (components.path !== undefined) {
- if (!options.skipEscape) {
- components.path = escape(components.path);
- if (components.scheme !== undefined) {
- components.path = components.path.split("%3A").join(":");
- }
- } else {
- components.path = unescape(components.path);
- }
- }
+ if (components.path !== void 0) if (!options.skipEscape) {
+ components.path = escape(components.path);
+ if (components.scheme !== void 0) components.path = components.path.split("%3A").join(":");
+ } else components.path = unescape(components.path);
if (options.reference !== "suffix" && components.scheme) {
uriTokens.push(components.scheme);
uriTokens.push(":");
}
const authority = recomposeAuthority(components, options);
- if (authority !== undefined) {
- if (options.reference !== "suffix") {
- uriTokens.push("//");
- }
+ 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 && components.path.charAt(0) !== "/") uriTokens.push("/");
}
- if (components.path !== undefined) {
+ if (components.path !== void 0) {
let s = components.path;
- if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
- s = removeDotSegments(s);
- }
- if (authority === undefined) {
- s = s.replace(/^\/\//u, "/%2F");
- }
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);
+ if (authority === void 0) s = s.replace(/^\/\//u, "/%2F");
uriTokens.push(s);
}
- if (components.query !== undefined) {
+ if (components.query !== void 0) {
uriTokens.push("?");
uriTokens.push(components.query);
}
- if (components.fragment !== undefined) {
+ if (components.fragment !== void 0) {
uriTokens.push("#");
uriTokens.push(components.fragment);
}
@@ -100870,9 +92248,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let code = 0;
for (let i = 0, len = value.length; i < len; ++i) {
code = value.charCodeAt(i);
- if (code > 126 || hexLookUp[code]) {
- return true;
- }
+ if (code > 126 || hexLookUp[code]) return true;
}
return false;
}
@@ -100880,13 +92256,13 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function parse(uri, opts) {
const options = Object.assign({}, opts);
const parsed = {
- scheme: undefined,
- userinfo: undefined,
+ scheme: void 0,
+ userinfo: void 0,
host: "",
- port: undefined,
+ port: void 0,
path: "",
- query: undefined,
- fragment: undefined
+ query: void 0,
+ fragment: void 0
};
const gotEncoding = uri.indexOf("%") !== -1;
if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri;
@@ -100899,62 +92275,34 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parsed.path = matches[6] || "";
parsed.query = matches[7];
parsed.fragment = matches[8];
- if (isNaN(parsed.port)) {
- parsed.port = matches[5];
- }
+ if (isNaN(parsed.port)) parsed.port = matches[5];
if (parsed.host) {
const ipv4result = normalizeIPv4(parsed.host);
- if (ipv4result.isIPV4 === false) {
- parsed.host = normalizeIPv6(ipv4result.host, { isIPV4: false }).host.toLowerCase();
- } else {
- parsed.host = ipv4result.host;
- }
- }
- if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && !parsed.path && parsed.query === undefined) {
- parsed.reference = "same-document";
- } else if (parsed.scheme === undefined) {
- parsed.reference = "relative";
- } else if (parsed.fragment === undefined) {
- parsed.reference = "absolute";
- } else {
- parsed.reference = "uri";
- }
- if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
- parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
- }
+ if (ipv4result.isIPV4 === false) parsed.host = normalizeIPv6(ipv4result.host, { isIPV4: false }).host.toLowerCase();
+ else parsed.host = ipv4result.host;
+ }
+ if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && !parsed.path && parsed.query === void 0) parsed.reference = "same-document";
+ else if (parsed.scheme === void 0) parsed.reference = "relative";
+ else if (parsed.fragment === void 0) parsed.reference = "absolute";
+ else parsed.reference = "uri";
+ if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
- if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && nonSimpleDomain(parsed.host)) {
- try {
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
- } catch (e) {
- parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
- }
+ if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && nonSimpleDomain(parsed.host)) try {
+ parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
+ } catch (e) {
+ parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
}
}
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
- if (gotEncoding && parsed.scheme !== undefined) {
- parsed.scheme = unescape(parsed.scheme);
- }
- if (gotEncoding && parsed.userinfo !== undefined) {
- parsed.userinfo = unescape(parsed.userinfo);
- }
- if (gotEncoding && parsed.host !== undefined) {
- parsed.host = unescape(parsed.host);
- }
- if (parsed.path !== undefined && parsed.path.length) {
- parsed.path = escape(unescape(parsed.path));
- }
- if (parsed.fragment !== undefined && parsed.fragment.length) {
- parsed.fragment = encodeURI(decodeURI(parsed.fragment));
- }
- }
- if (schemeHandler && schemeHandler.parse) {
- schemeHandler.parse(parsed, options);
- }
- } else {
- parsed.error = parsed.error || "URI can not be parsed.";
- }
+ if (gotEncoding && parsed.scheme !== void 0) parsed.scheme = unescape(parsed.scheme);
+ if (gotEncoding && parsed.userinfo !== void 0) parsed.userinfo = unescape(parsed.userinfo);
+ if (gotEncoding && parsed.host !== void 0) parsed.host = unescape(parsed.host);
+ if (parsed.path !== void 0 && parsed.path.length) parsed.path = escape(unescape(parsed.path));
+ if (parsed.fragment !== void 0 && parsed.fragment.length) parsed.fragment = encodeURI(decodeURI(parsed.fragment));
+ }
+ if (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed, options);
+ } else parsed.error = parsed.error || "URI can not be parsed.";
return parsed;
}
const fastUri = {
@@ -100969,7 +92317,6 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.default = fastUri;
module.exports.fastUri = fastUri;
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/node_modules/ajv-formats/dist/formats.js
var require_formats$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -101061,7 +92408,7 @@ var require_formats$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
}
function compareDate(d1, d2) {
- if (!(d1 && d2)) return undefined;
+ if (!(d1 && d2)) return void 0;
if (d1 > d2) return 1;
if (d1 < d2) return -1;
return 0;
@@ -101086,17 +92433,17 @@ var require_formats$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
};
}
function compareTime(s1, s2) {
- if (!(s1 && s2)) return undefined;
- const t1 = new Date("2020-01-01T" + s1).valueOf();
- const t2 = new Date("2020-01-01T" + s2).valueOf();
- if (!(t1 && t2)) return undefined;
+ if (!(s1 && s2)) return void 0;
+ const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
+ const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
+ if (!(t1 && t2)) return void 0;
return t1 - t2;
}
function compareIsoTime(t1, t2) {
- if (!(t1 && t2)) return undefined;
+ if (!(t1 && t2)) return void 0;
const a1 = TIME.exec(t1);
const a2 = TIME.exec(t2);
- if (!(a1 && a2)) return undefined;
+ if (!(a1 && a2)) return void 0;
t1 = a1[1] + a1[2] + a1[3];
t2 = a2[1] + a2[2] + a2[3];
if (t1 > t2) return 1;
@@ -101112,18 +92459,18 @@ var require_formats$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
};
}
function compareDateTime(dt1, dt2) {
- if (!(dt1 && dt2)) return undefined;
+ if (!(dt1 && dt2)) return void 0;
const d1 = new Date(dt1).valueOf();
const d2 = new Date(dt2).valueOf();
- if (!(d1 && d2)) return undefined;
+ if (!(d1 && d2)) return void 0;
return d1 - d2;
}
function compareIsoDateTime(dt1, dt2) {
- if (!(dt1 && dt2)) return undefined;
+ if (!(dt1 && dt2)) return void 0;
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
const res = compareDate(d1, d2);
- if (res === undefined) return undefined;
+ if (res === void 0) return void 0;
return res || compareTime(t1, t2);
}
const NOT_URI_FRAGMENT = /\/|:/;
@@ -101158,7 +92505,6 @@ var require_formats$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/node_modules/ajv-formats/dist/limit.js
var require_limit$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -101189,16 +92535,15 @@ var require_limit$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
fail: ops.LTE
}
};
- const error = {
- message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
- params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
- };
exports.formatLimitDefinition = {
keyword: Object.keys(KWDs),
type: "string",
schemaType: "string",
$data: true,
- error,
+ error: {
+ message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
+ params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
+ },
code(cxt) {
const { gen, data, schemaCode, keyword, it } = cxt;
const { opts, self } = it;
@@ -101218,13 +92563,11 @@ var require_limit$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
const format = fCxt.schema;
const fmtDef = self.formats[format];
if (!fmtDef || fmtDef === true) return;
- if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
- throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
- }
+ if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
const fmt = gen.scopeValue("formats", {
key: format,
ref: fmtDef,
- code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : undefined
+ code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0
});
cxt.fail$data(compareCode(fmt));
}
@@ -101240,7 +92583,6 @@ var require_limit$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
};
exports.default = formatLimitPlugin;
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/node_modules/ajv-formats/dist/index.js
var require_dist$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -101256,28 +92598,25 @@ var require_dist$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return ajv;
}
const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
- const list = opts.formats || formats_1.formatNames;
- addFormats(ajv, list, formats, exportName);
+ addFormats(ajv, opts.formats || formats_1.formatNames, formats, exportName);
if (opts.keywords) (0, limit_1.default)(ajv);
return ajv;
};
formatsPlugin.get = (name, mode = "full") => {
- const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
- const f = formats[name];
+ const f = (mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats)[name];
if (!f) throw new Error(`Unknown format "${name}"`);
return f;
};
function addFormats(ajv, list, fs, exportName) {
var _a;
var _b;
- (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
+ (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 || (_b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`);
for (const f of list) ajv.addFormat(f, fs[f]);
}
module.exports = exports = formatsPlugin;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = formatsPlugin;
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/lib/validator.js
var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -101285,7 +92624,7 @@ var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const fastUri = require_fast_uri();
const ajvFormats = require_dist$3();
const clone = require_rfdc()({ proto: true });
- var Validator = class Validator {
+ module.exports = class Validator {
constructor(ajvOptions) {
this.ajv = new Ajv({
...ajvOptions,
@@ -101308,10 +92647,8 @@ var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
addSchema(schema, schemaName) {
let schemaKey = schema.$id || schemaName;
- if (schema.$id !== undefined && schema.$id[0] === "#") {
- schemaKey = schemaName + schema.$id;
- }
- if (this.ajv.refs[schemaKey] === undefined && this.ajv.schemas[schemaKey] === undefined) {
+ if (schema.$id !== void 0 && schema.$id[0] === "#") schemaKey = schemaName + schema.$id;
+ if (this.ajv.refs[schemaKey] === void 0 && this.ajv.schemas[schemaKey] === void 0) {
const ajvSchema = clone(schema);
this.convertSchemaToAjvFormat(ajvSchema);
this.ajv.addSchema(ajvSchema, schemaKey);
@@ -101330,11 +92667,7 @@ var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
schema.fjs_type = "string";
schema.type.push("object");
}
- for (const property in schema) {
- if (typeof schema[property] === "object") {
- this.convertSchemaToAjvFormat(schema[property]);
- }
- }
+ for (const property in schema) if (typeof schema[property] === "object") this.convertSchemaToAjvFormat(schema[property]);
}
getState() {
return {
@@ -101344,35 +92677,28 @@ var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
static restoreFromState(state) {
const validator = new Validator(state.ajvOptions);
- for (const [id, ajvSchema] of Object.entries(state.ajvSchemas)) {
- validator.ajv.addSchema(ajvSchema, id);
- }
+ for (const [id, ajvSchema] of Object.entries(state.ajvSchemas)) validator.ajv.addSchema(ajvSchema, id);
return validator;
}
};
- module.exports = Validator;
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/lib/location.js
var require_location = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- var Location = class Location {
+ module.exports = class Location {
constructor(schema, schemaId, jsonPointer = "#") {
this.schema = schema;
this.schemaId = schemaId;
this.jsonPointer = jsonPointer;
}
getPropertyLocation(propertyName) {
- const propertyLocation = new Location(this.schema[propertyName], this.schemaId, this.jsonPointer + "/" + propertyName);
- return propertyLocation;
+ return new Location(this.schema[propertyName], this.schemaId, this.jsonPointer + "/" + propertyName);
}
getSchemaRef() {
return this.schemaId + this.jsonPointer;
}
};
- module.exports = Location;
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/lib/schema-validator.js
var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -101578,54 +92904,47 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
function validate13(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
let vErrors = null;
let errors = 0;
- if (errors === 0) {
- if (Array.isArray(data)) {
- if (data.length < 1) {
- validate13.errors = [{
- instancePath,
- schemaPath: "#/minItems",
- keyword: "minItems",
- params: { limit: 1 },
- message: "must NOT have fewer than 1 items"
- }];
- return false;
- } else {
- var valid0 = true;
- const len0 = data.length;
- for (let i0 = 0; i0 < len0; i0++) {
- const _errs1 = errors;
- if (!root1.validate(data[i0], {
- instancePath: instancePath + "/" + i0,
- parentData: data,
- parentDataProperty: i0,
- rootData
- })) {
- vErrors = vErrors === null ? root1.validate.errors : vErrors.concat(root1.validate.errors);
- errors = vErrors.length;
- }
- var valid0 = _errs1 === errors;
- if (!valid0) {
- break;
- }
- }
+ if (errors === 0) if (Array.isArray(data)) if (data.length < 1) {
+ validate13.errors = [{
+ instancePath,
+ schemaPath: "#/minItems",
+ keyword: "minItems",
+ params: { limit: 1 },
+ message: "must NOT have fewer than 1 items"
+ }];
+ return false;
+ } else {
+ var valid0 = true;
+ const len0 = data.length;
+ for (let i0 = 0; i0 < len0; i0++) {
+ const _errs1 = errors;
+ if (!root1.validate(data[i0], {
+ instancePath: instancePath + "/" + i0,
+ parentData: data,
+ parentDataProperty: i0,
+ rootData
+ })) {
+ vErrors = vErrors === null ? root1.validate.errors : vErrors.concat(root1.validate.errors);
+ errors = vErrors.length;
}
- } else {
- validate13.errors = [{
- instancePath,
- schemaPath: "#/type",
- keyword: "type",
- params: { type: "array" },
- message: "must be array"
- }];
- return false;
+ if (!(_errs1 === errors)) break;
}
}
+ else {
+ validate13.errors = [{
+ instancePath,
+ schemaPath: "#/type",
+ keyword: "type",
+ params: { type: "array" },
+ message: "must be array"
+ }];
+ return false;
+ }
validate13.errors = vErrors;
return errors === 0;
}
const func0 = require_equal().default;
function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
- ;
let vErrors = null;
let errors = 0;
if (!(data && typeof data == "object" && !Array.isArray(data)) && typeof data !== "boolean") {
@@ -101640,106 +92959,94 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
}
if (errors === 0) {
if (data && typeof data == "object" && !Array.isArray(data)) {
- if (data.$id !== undefined) {
+ if (data.$id !== void 0) {
let data0 = data.$id;
const _errs1 = errors;
if (errors === _errs1) {
- if (errors === _errs1) {
- if (typeof data0 === "string") {
- if (!formats0.test(data0)) {
- validate10.errors = [{
- instancePath: instancePath + "/$id",
- schemaPath: "#/properties/%24id/format",
- keyword: "format",
- params: { format: "uri-reference" },
- message: "must match format \"" + "uri-reference" + "\""
- }];
- return false;
- }
- } else {
+ if (errors === _errs1) if (typeof data0 === "string") {
+ if (!formats0.test(data0)) {
validate10.errors = [{
instancePath: instancePath + "/$id",
- schemaPath: "#/properties/%24id/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
+ schemaPath: "#/properties/%24id/format",
+ keyword: "format",
+ params: { format: "uri-reference" },
+ message: "must match format \"uri-reference\""
}];
return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/$id",
+ schemaPath: "#/properties/%24id/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ }];
+ return false;
}
}
var valid0 = _errs1 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.$schema !== undefined) {
+ if (data.$schema !== void 0) {
let data1 = data.$schema;
const _errs3 = errors;
if (errors === _errs3) {
- if (errors === _errs3) {
- if (typeof data1 === "string") {
- if (!formats2(data1)) {
- validate10.errors = [{
- instancePath: instancePath + "/$schema",
- schemaPath: "#/properties/%24schema/format",
- keyword: "format",
- params: { format: "uri" },
- message: "must match format \"" + "uri" + "\""
- }];
- return false;
- }
- } else {
+ if (errors === _errs3) if (typeof data1 === "string") {
+ if (!formats2(data1)) {
validate10.errors = [{
instancePath: instancePath + "/$schema",
- schemaPath: "#/properties/%24schema/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
+ schemaPath: "#/properties/%24schema/format",
+ keyword: "format",
+ params: { format: "uri" },
+ message: "must match format \"uri\""
}];
return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/$schema",
+ schemaPath: "#/properties/%24schema/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ }];
+ return false;
}
}
var valid0 = _errs3 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.$ref !== undefined) {
+ if (data.$ref !== void 0) {
let data2 = data.$ref;
const _errs5 = errors;
if (errors === _errs5) {
- if (errors === _errs5) {
- if (typeof data2 === "string") {
- if (!formats0.test(data2)) {
- validate10.errors = [{
- instancePath: instancePath + "/$ref",
- schemaPath: "#/properties/%24ref/format",
- keyword: "format",
- params: { format: "uri-reference" },
- message: "must match format \"" + "uri-reference" + "\""
- }];
- return false;
- }
- } else {
+ if (errors === _errs5) if (typeof data2 === "string") {
+ if (!formats0.test(data2)) {
validate10.errors = [{
instancePath: instancePath + "/$ref",
- schemaPath: "#/properties/%24ref/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
+ schemaPath: "#/properties/%24ref/format",
+ keyword: "format",
+ params: { format: "uri-reference" },
+ message: "must match format \"uri-reference\""
}];
return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/$ref",
+ schemaPath: "#/properties/%24ref/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ }];
+ return false;
}
}
var valid0 = _errs5 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.$comment !== undefined) {
+ if (data.$comment !== void 0) {
const _errs7 = errors;
if (typeof data.$comment !== "string") {
validate10.errors = [{
@@ -101752,11 +93059,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs7 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.title !== undefined) {
+ if (data.title !== void 0) {
const _errs9 = errors;
if (typeof data.title !== "string") {
validate10.errors = [{
@@ -101769,11 +93074,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs9 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.description !== undefined) {
+ if (data.description !== void 0) {
const _errs11 = errors;
if (typeof data.description !== "string") {
validate10.errors = [{
@@ -101786,11 +93089,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs11 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.readOnly !== undefined) {
+ if (data.readOnly !== void 0) {
const _errs13 = errors;
if (typeof data.readOnly !== "boolean") {
validate10.errors = [{
@@ -101803,11 +93104,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs13 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.examples !== undefined) {
+ if (data.examples !== void 0) {
const _errs15 = errors;
if (errors === _errs15) {
if (!Array.isArray(data.examples)) {
@@ -101822,45 +93121,39 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
}
}
var valid0 = _errs15 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.multipleOf !== undefined) {
+ if (data.multipleOf !== void 0) {
let data8 = data.multipleOf;
const _errs17 = errors;
- if (errors === _errs17) {
- if (typeof data8 == "number" && isFinite(data8)) {
- if (data8 <= 0 || isNaN(data8)) {
- validate10.errors = [{
- instancePath: instancePath + "/multipleOf",
- schemaPath: "#/properties/multipleOf/exclusiveMinimum",
- keyword: "exclusiveMinimum",
- params: {
- comparison: ">",
- limit: 0
- },
- message: "must be > 0"
- }];
- return false;
- }
- } else {
+ if (errors === _errs17) if (typeof data8 == "number" && isFinite(data8)) {
+ if (data8 <= 0 || isNaN(data8)) {
validate10.errors = [{
instancePath: instancePath + "/multipleOf",
- schemaPath: "#/properties/multipleOf/type",
- keyword: "type",
- params: { type: "number" },
- message: "must be number"
+ schemaPath: "#/properties/multipleOf/exclusiveMinimum",
+ keyword: "exclusiveMinimum",
+ params: {
+ comparison: ">",
+ limit: 0
+ },
+ message: "must be > 0"
}];
return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/multipleOf",
+ schemaPath: "#/properties/multipleOf/type",
+ keyword: "type",
+ params: { type: "number" },
+ message: "must be number"
+ }];
+ return false;
}
var valid0 = _errs17 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.maximum !== undefined) {
+ if (data.maximum !== void 0) {
let data9 = data.maximum;
const _errs19 = errors;
if (!(typeof data9 == "number" && isFinite(data9))) {
@@ -101874,11 +93167,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs19 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.exclusiveMaximum !== undefined) {
+ if (data.exclusiveMaximum !== void 0) {
let data10 = data.exclusiveMaximum;
const _errs21 = errors;
if (!(typeof data10 == "number" && isFinite(data10))) {
@@ -101892,11 +93183,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs21 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.minimum !== undefined) {
+ if (data.minimum !== void 0) {
let data11 = data.minimum;
const _errs23 = errors;
if (!(typeof data11 == "number" && isFinite(data11))) {
@@ -101910,11 +93199,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs23 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.exclusiveMinimum !== undefined) {
+ if (data.exclusiveMinimum !== void 0) {
let data12 = data.exclusiveMinimum;
const _errs25 = errors;
if (!(typeof data12 == "number" && isFinite(data12))) {
@@ -101928,11 +93215,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs25 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.maxLength !== undefined) {
+ if (data.maxLength !== void 0) {
let data13 = data.maxLength;
const _errs27 = errors;
const _errs28 = errors;
@@ -101964,11 +93249,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
}
}
var valid0 = _errs27 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.minLength !== undefined) {
+ if (data.minLength !== void 0) {
const _errs30 = errors;
if (!validate11(data.minLength, {
instancePath: instancePath + "/minLength",
@@ -101980,44 +93263,38 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs30 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.pattern !== undefined) {
+ if (data.pattern !== void 0) {
let data15 = data.pattern;
const _errs31 = errors;
if (errors === _errs31) {
- if (errors === _errs31) {
- if (typeof data15 === "string") {
- if (!formats6(data15)) {
- validate10.errors = [{
- instancePath: instancePath + "/pattern",
- schemaPath: "#/properties/pattern/format",
- keyword: "format",
- params: { format: "regex" },
- message: "must match format \"" + "regex" + "\""
- }];
- return false;
- }
- } else {
+ if (errors === _errs31) if (typeof data15 === "string") {
+ if (!formats6(data15)) {
validate10.errors = [{
instancePath: instancePath + "/pattern",
- schemaPath: "#/properties/pattern/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
+ schemaPath: "#/properties/pattern/format",
+ keyword: "format",
+ params: { format: "regex" },
+ message: "must match format \"regex\""
}];
return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/pattern",
+ schemaPath: "#/properties/pattern/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ }];
+ return false;
}
}
var valid0 = _errs31 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.additionalItems !== undefined) {
+ if (data.additionalItems !== void 0) {
const _errs33 = errors;
if (!validate10(data.additionalItems, {
instancePath: instancePath + "/additionalItems",
@@ -102029,11 +93306,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs33 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.items !== undefined) {
+ if (data.items !== void 0) {
let data17 = data.items;
const _errs34 = errors;
const _errs35 = errors;
@@ -102072,30 +93347,20 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
params: {},
message: "must match a schema in anyOf"
};
- if (vErrors === null) {
- vErrors = [err0];
- } else {
- vErrors.push(err0);
- }
+ if (vErrors === null) vErrors = [err0];
+ else vErrors.push(err0);
errors++;
validate10.errors = vErrors;
return false;
} else {
errors = _errs35;
- if (vErrors !== null) {
- if (_errs35) {
- vErrors.length = _errs35;
- } else {
- vErrors = null;
- }
- }
+ if (vErrors !== null) if (_errs35) vErrors.length = _errs35;
+ else vErrors = null;
}
var valid0 = _errs34 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.maxItems !== undefined) {
+ if (data.maxItems !== void 0) {
let data18 = data.maxItems;
const _errs38 = errors;
const _errs39 = errors;
@@ -102127,11 +93392,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
}
}
var valid0 = _errs38 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.minItems !== undefined) {
+ if (data.minItems !== void 0) {
const _errs41 = errors;
if (!validate11(data.minItems, {
instancePath: instancePath + "/minItems",
@@ -102143,11 +93406,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs41 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.uniqueItems !== undefined) {
+ if (data.uniqueItems !== void 0) {
const _errs42 = errors;
if (typeof data.uniqueItems !== "boolean") {
validate10.errors = [{
@@ -102160,11 +93421,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs42 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.contains !== undefined) {
+ if (data.contains !== void 0) {
const _errs44 = errors;
if (!validate10(data.contains, {
instancePath: instancePath + "/contains",
@@ -102176,11 +93435,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs44 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.maxProperties !== undefined) {
+ if (data.maxProperties !== void 0) {
let data22 = data.maxProperties;
const _errs45 = errors;
const _errs46 = errors;
@@ -102212,11 +93469,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
}
}
var valid0 = _errs45 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.minProperties !== undefined) {
+ if (data.minProperties !== void 0) {
const _errs48 = errors;
if (!validate11(data.minProperties, {
instancePath: instancePath + "/minProperties",
@@ -102228,81 +93483,69 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs48 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.required !== undefined) {
+ if (data.required !== void 0) {
let data24 = data.required;
const _errs49 = errors;
- const _errs50 = errors;
- if (errors === _errs50) {
- if (Array.isArray(data24)) {
- var valid6 = true;
- const len0 = data24.length;
- for (let i0 = 0; i0 < len0; i0++) {
- const _errs52 = errors;
- if (typeof data24[i0] !== "string") {
- validate10.errors = [{
- instancePath: instancePath + "/required/" + i0,
- schemaPath: "#/definitions/stringArray/items/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- }];
- return false;
- }
- var valid6 = _errs52 === errors;
- if (!valid6) {
- break;
- }
+ if (errors === errors) if (Array.isArray(data24)) {
+ var valid6 = true;
+ const len0 = data24.length;
+ for (let i0 = 0; i0 < len0; i0++) {
+ const _errs52 = errors;
+ if (typeof data24[i0] !== "string") {
+ validate10.errors = [{
+ instancePath: instancePath + "/required/" + i0,
+ schemaPath: "#/definitions/stringArray/items/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ }];
+ return false;
}
- if (valid6) {
- let i1 = data24.length;
- let j0;
- if (i1 > 1) {
- const indices0 = {};
- for (; i1--;) {
- let item0 = data24[i1];
- if (typeof item0 !== "string") {
- continue;
- }
- if (typeof indices0[item0] == "number") {
- j0 = indices0[item0];
- validate10.errors = [{
- instancePath: instancePath + "/required",
- schemaPath: "#/definitions/stringArray/uniqueItems",
- keyword: "uniqueItems",
- params: {
- i: i1,
- j: j0
- },
- message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)"
- }];
- return false;
- break;
- }
- indices0[item0] = i1;
+ var valid6 = _errs52 === errors;
+ if (!valid6) break;
+ }
+ if (valid6) {
+ let i1 = data24.length;
+ let j0;
+ if (i1 > 1) {
+ const indices0 = {};
+ for (; i1--;) {
+ let item0 = data24[i1];
+ if (typeof item0 !== "string") continue;
+ if (typeof indices0[item0] == "number") {
+ j0 = indices0[item0];
+ validate10.errors = [{
+ instancePath: instancePath + "/required",
+ schemaPath: "#/definitions/stringArray/uniqueItems",
+ keyword: "uniqueItems",
+ params: {
+ i: i1,
+ j: j0
+ },
+ message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)"
+ }];
+ return false;
}
+ indices0[item0] = i1;
}
}
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/required",
- schemaPath: "#/definitions/stringArray/type",
- keyword: "type",
- params: { type: "array" },
- message: "must be array"
- }];
- return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/required",
+ schemaPath: "#/definitions/stringArray/type",
+ keyword: "type",
+ params: { type: "array" },
+ message: "must be array"
+ }];
+ return false;
}
var valid0 = _errs49 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.additionalProperties !== undefined) {
+ if (data.additionalProperties !== void 0) {
const _errs54 = errors;
if (!validate10(data.additionalProperties, {
instancePath: instancePath + "/additionalProperties",
@@ -102314,317 +93557,251 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs54 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.definitions !== undefined) {
+ if (data.definitions !== void 0) {
let data27 = data.definitions;
const _errs55 = errors;
- if (errors === _errs55) {
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
- for (const key0 in data27) {
- const _errs58 = errors;
- if (!validate10(data27[key0], {
- instancePath: instancePath + "/definitions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),
- parentData: data27,
- parentDataProperty: key0,
- rootData
- })) {
- vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
- errors = vErrors.length;
- }
- var valid8 = _errs58 === errors;
- if (!valid8) {
- break;
- }
+ if (errors === _errs55) if (data27 && typeof data27 == "object" && !Array.isArray(data27)) for (const key0 in data27) {
+ const _errs58 = errors;
+ if (!validate10(data27[key0], {
+ instancePath: instancePath + "/definitions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),
+ parentData: data27,
+ parentDataProperty: key0,
+ rootData
+ })) {
+ vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
+ errors = vErrors.length;
+ }
+ if (!(_errs58 === errors)) break;
+ }
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/definitions",
+ schemaPath: "#/properties/definitions/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ }];
+ return false;
+ }
+ var valid0 = _errs55 === errors;
+ } else var valid0 = true;
+ if (valid0) {
+ if (data.properties !== void 0) {
+ let data29 = data.properties;
+ const _errs59 = errors;
+ if (errors === _errs59) if (data29 && typeof data29 == "object" && !Array.isArray(data29)) for (const key1 in data29) {
+ const _errs62 = errors;
+ if (!validate10(data29[key1], {
+ instancePath: instancePath + "/properties/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),
+ parentData: data29,
+ parentDataProperty: key1,
+ rootData
+ })) {
+ vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
+ errors = vErrors.length;
}
- } else {
+ if (!(_errs62 === errors)) break;
+ }
+ else {
validate10.errors = [{
- instancePath: instancePath + "/definitions",
- schemaPath: "#/properties/definitions/type",
+ instancePath: instancePath + "/properties",
+ schemaPath: "#/properties/properties/type",
keyword: "type",
params: { type: "object" },
message: "must be object"
}];
return false;
}
- }
- var valid0 = _errs55 === errors;
- } else {
- var valid0 = true;
- }
- if (valid0) {
- if (data.properties !== undefined) {
- let data29 = data.properties;
- const _errs59 = errors;
- if (errors === _errs59) {
- if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
- for (const key1 in data29) {
- const _errs62 = errors;
- if (!validate10(data29[key1], {
- instancePath: instancePath + "/properties/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),
- parentData: data29,
- parentDataProperty: key1,
+ var valid0 = _errs59 === errors;
+ } else var valid0 = true;
+ if (valid0) {
+ if (data.patternProperties !== void 0) {
+ let data31 = data.patternProperties;
+ const _errs63 = errors;
+ if (errors === _errs63) if (data31 && typeof data31 == "object" && !Array.isArray(data31)) {
+ for (const key2 in data31) {
+ const _errs65 = errors;
+ if (errors === _errs65) {
+ if (typeof key2 === "string") {
+ if (!formats6(key2)) {
+ const err1 = {
+ instancePath: instancePath + "/patternProperties",
+ schemaPath: "#/properties/patternProperties/propertyNames/format",
+ keyword: "format",
+ params: { format: "regex" },
+ message: "must match format \"regex\"",
+ propertyName: key2
+ };
+ if (vErrors === null) vErrors = [err1];
+ else vErrors.push(err1);
+ errors++;
+ }
+ }
+ }
+ var valid10 = _errs65 === errors;
+ if (!valid10) {
+ const err2 = {
+ instancePath: instancePath + "/patternProperties",
+ schemaPath: "#/properties/patternProperties/propertyNames",
+ keyword: "propertyNames",
+ params: { propertyName: key2 },
+ message: "property name must be valid"
+ };
+ if (vErrors === null) vErrors = [err2];
+ else vErrors.push(err2);
+ errors++;
+ validate10.errors = vErrors;
+ return false;
+ }
+ }
+ if (valid10) for (const key3 in data31) {
+ const _errs67 = errors;
+ if (!validate10(data31[key3], {
+ instancePath: instancePath + "/patternProperties/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),
+ parentData: data31,
+ parentDataProperty: key3,
rootData
})) {
vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
errors = vErrors.length;
}
- var valid9 = _errs62 === errors;
- if (!valid9) {
- break;
- }
+ if (!(_errs67 === errors)) break;
}
} else {
validate10.errors = [{
- instancePath: instancePath + "/properties",
- schemaPath: "#/properties/properties/type",
+ instancePath: instancePath + "/patternProperties",
+ schemaPath: "#/properties/patternProperties/type",
keyword: "type",
params: { type: "object" },
message: "must be object"
}];
return false;
}
- }
- var valid0 = _errs59 === errors;
- } else {
- var valid0 = true;
- }
- if (valid0) {
- if (data.patternProperties !== undefined) {
- let data31 = data.patternProperties;
- const _errs63 = errors;
- if (errors === _errs63) {
- if (data31 && typeof data31 == "object" && !Array.isArray(data31)) {
- for (const key2 in data31) {
- const _errs65 = errors;
- if (errors === _errs65) {
- if (typeof key2 === "string") {
- if (!formats6(key2)) {
- const err1 = {
- instancePath: instancePath + "/patternProperties",
- schemaPath: "#/properties/patternProperties/propertyNames/format",
- keyword: "format",
- params: { format: "regex" },
- message: "must match format \"" + "regex" + "\"",
- propertyName: key2
+ var valid0 = _errs63 === errors;
+ } else var valid0 = true;
+ if (valid0) {
+ if (data.dependencies !== void 0) {
+ let data33 = data.dependencies;
+ const _errs68 = errors;
+ if (errors === _errs68) if (data33 && typeof data33 == "object" && !Array.isArray(data33)) for (const key4 in data33) {
+ let data34 = data33[key4];
+ const _errs71 = errors;
+ const _errs72 = errors;
+ let valid13 = false;
+ const _errs73 = errors;
+ if (!validate10(data34, {
+ instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
+ parentData: data33,
+ parentDataProperty: key4,
+ rootData
+ })) {
+ vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
+ errors = vErrors.length;
+ }
+ var _valid1 = _errs73 === errors;
+ valid13 = valid13 || _valid1;
+ if (!valid13) {
+ const _errs74 = errors;
+ if (errors === errors) if (Array.isArray(data34)) {
+ var valid15 = true;
+ const len1 = data34.length;
+ for (let i2 = 0; i2 < len1; i2++) {
+ const _errs77 = errors;
+ if (typeof data34[i2] !== "string") {
+ const err3 = {
+ instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i2,
+ schemaPath: "#/definitions/stringArray/items/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
};
- if (vErrors === null) {
- vErrors = [err1];
- } else {
- vErrors.push(err1);
- }
+ if (vErrors === null) vErrors = [err3];
+ else vErrors.push(err3);
errors++;
}
+ var valid15 = _errs77 === errors;
+ if (!valid15) break;
}
- }
- var valid10 = _errs65 === errors;
- if (!valid10) {
- const err2 = {
- instancePath: instancePath + "/patternProperties",
- schemaPath: "#/properties/patternProperties/propertyNames",
- keyword: "propertyNames",
- params: { propertyName: key2 },
- message: "property name must be valid"
- };
- if (vErrors === null) {
- vErrors = [err2];
- } else {
- vErrors.push(err2);
+ if (valid15) {
+ let i3 = data34.length;
+ let j1;
+ if (i3 > 1) {
+ const indices1 = {};
+ for (; i3--;) {
+ let item1 = data34[i3];
+ if (typeof item1 !== "string") continue;
+ if (typeof indices1[item1] == "number") {
+ j1 = indices1[item1];
+ const err4 = {
+ instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
+ schemaPath: "#/definitions/stringArray/uniqueItems",
+ keyword: "uniqueItems",
+ params: {
+ i: i3,
+ j: j1
+ },
+ message: "must NOT have duplicate items (items ## " + j1 + " and " + i3 + " are identical)"
+ };
+ if (vErrors === null) vErrors = [err4];
+ else vErrors.push(err4);
+ errors++;
+ break;
+ }
+ indices1[item1] = i3;
+ }
+ }
}
+ } else {
+ const err5 = {
+ instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
+ schemaPath: "#/definitions/stringArray/type",
+ keyword: "type",
+ params: { type: "array" },
+ message: "must be array"
+ };
+ if (vErrors === null) vErrors = [err5];
+ else vErrors.push(err5);
errors++;
- validate10.errors = vErrors;
- return false;
- break;
}
+ var _valid1 = _errs74 === errors;
+ valid13 = valid13 || _valid1;
}
- if (valid10) {
- for (const key3 in data31) {
- const _errs67 = errors;
- if (!validate10(data31[key3], {
- instancePath: instancePath + "/patternProperties/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),
- parentData: data31,
- parentDataProperty: key3,
- rootData
- })) {
- vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
- errors = vErrors.length;
- }
- var valid11 = _errs67 === errors;
- if (!valid11) {
- break;
- }
- }
+ if (!valid13) {
+ const err6 = {
+ instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
+ schemaPath: "#/properties/dependencies/additionalProperties/anyOf",
+ keyword: "anyOf",
+ params: {},
+ message: "must match a schema in anyOf"
+ };
+ if (vErrors === null) vErrors = [err6];
+ else vErrors.push(err6);
+ errors++;
+ validate10.errors = vErrors;
+ return false;
+ } else {
+ errors = _errs72;
+ if (vErrors !== null) if (_errs72) vErrors.length = _errs72;
+ else vErrors = null;
}
- } else {
+ if (!(_errs71 === errors)) break;
+ }
+ else {
validate10.errors = [{
- instancePath: instancePath + "/patternProperties",
- schemaPath: "#/properties/patternProperties/type",
+ instancePath: instancePath + "/dependencies",
+ schemaPath: "#/properties/dependencies/type",
keyword: "type",
params: { type: "object" },
message: "must be object"
}];
return false;
}
- }
- var valid0 = _errs63 === errors;
- } else {
- var valid0 = true;
- }
- if (valid0) {
- if (data.dependencies !== undefined) {
- let data33 = data.dependencies;
- const _errs68 = errors;
- if (errors === _errs68) {
- if (data33 && typeof data33 == "object" && !Array.isArray(data33)) {
- for (const key4 in data33) {
- let data34 = data33[key4];
- const _errs71 = errors;
- const _errs72 = errors;
- let valid13 = false;
- const _errs73 = errors;
- if (!validate10(data34, {
- instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
- parentData: data33,
- parentDataProperty: key4,
- rootData
- })) {
- vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
- errors = vErrors.length;
- }
- var _valid1 = _errs73 === errors;
- valid13 = valid13 || _valid1;
- if (!valid13) {
- const _errs74 = errors;
- const _errs75 = errors;
- if (errors === _errs75) {
- if (Array.isArray(data34)) {
- var valid15 = true;
- const len1 = data34.length;
- for (let i2 = 0; i2 < len1; i2++) {
- const _errs77 = errors;
- if (typeof data34[i2] !== "string") {
- const err3 = {
- instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i2,
- schemaPath: "#/definitions/stringArray/items/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err3];
- } else {
- vErrors.push(err3);
- }
- errors++;
- }
- var valid15 = _errs77 === errors;
- if (!valid15) {
- break;
- }
- }
- if (valid15) {
- let i3 = data34.length;
- let j1;
- if (i3 > 1) {
- const indices1 = {};
- for (; i3--;) {
- let item1 = data34[i3];
- if (typeof item1 !== "string") {
- continue;
- }
- if (typeof indices1[item1] == "number") {
- j1 = indices1[item1];
- const err4 = {
- instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
- schemaPath: "#/definitions/stringArray/uniqueItems",
- keyword: "uniqueItems",
- params: {
- i: i3,
- j: j1
- },
- message: "must NOT have duplicate items (items ## " + j1 + " and " + i3 + " are identical)"
- };
- if (vErrors === null) {
- vErrors = [err4];
- } else {
- vErrors.push(err4);
- }
- errors++;
- break;
- }
- indices1[item1] = i3;
- }
- }
- }
- } else {
- const err5 = {
- instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
- schemaPath: "#/definitions/stringArray/type",
- keyword: "type",
- params: { type: "array" },
- message: "must be array"
- };
- if (vErrors === null) {
- vErrors = [err5];
- } else {
- vErrors.push(err5);
- }
- errors++;
- }
- }
- var _valid1 = _errs74 === errors;
- valid13 = valid13 || _valid1;
- }
- if (!valid13) {
- const err6 = {
- instancePath: instancePath + "/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),
- schemaPath: "#/properties/dependencies/additionalProperties/anyOf",
- keyword: "anyOf",
- params: {},
- message: "must match a schema in anyOf"
- };
- if (vErrors === null) {
- vErrors = [err6];
- } else {
- vErrors.push(err6);
- }
- errors++;
- validate10.errors = vErrors;
- return false;
- } else {
- errors = _errs72;
- if (vErrors !== null) {
- if (_errs72) {
- vErrors.length = _errs72;
- } else {
- vErrors = null;
- }
- }
- }
- var valid12 = _errs71 === errors;
- if (!valid12) {
- break;
- }
- }
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/dependencies",
- schemaPath: "#/properties/dependencies/type",
- keyword: "type",
- params: { type: "object" },
- message: "must be object"
- }];
- return false;
- }
- }
var valid0 = _errs68 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.propertyNames !== undefined) {
+ if (data.propertyNames !== void 0) {
const _errs79 = errors;
if (!validate10(data.propertyNames, {
instancePath: instancePath + "/propertyNames",
@@ -102636,65 +93813,53 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs79 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.enum !== undefined) {
+ if (data.enum !== void 0) {
let data37 = data.enum;
const _errs80 = errors;
- if (errors === _errs80) {
- if (Array.isArray(data37)) {
- if (data37.length < 1) {
+ if (errors === _errs80) if (Array.isArray(data37)) if (data37.length < 1) {
+ validate10.errors = [{
+ instancePath: instancePath + "/enum",
+ schemaPath: "#/properties/enum/minItems",
+ keyword: "minItems",
+ params: { limit: 1 },
+ message: "must NOT have fewer than 1 items"
+ }];
+ return false;
+ } else {
+ let i4 = data37.length;
+ let j2;
+ if (i4 > 1) {
+ outer0: for (; i4--;) for (j2 = i4; j2--;) if (func0(data37[i4], data37[j2])) {
validate10.errors = [{
instancePath: instancePath + "/enum",
- schemaPath: "#/properties/enum/minItems",
- keyword: "minItems",
- params: { limit: 1 },
- message: "must NOT have fewer than 1 items"
+ schemaPath: "#/properties/enum/uniqueItems",
+ keyword: "uniqueItems",
+ params: {
+ i: i4,
+ j: j2
+ },
+ message: "must NOT have duplicate items (items ## " + j2 + " and " + i4 + " are identical)"
}];
return false;
- } else {
- let i4 = data37.length;
- let j2;
- if (i4 > 1) {
- outer0: for (; i4--;) {
- for (j2 = i4; j2--;) {
- if (func0(data37[i4], data37[j2])) {
- validate10.errors = [{
- instancePath: instancePath + "/enum",
- schemaPath: "#/properties/enum/uniqueItems",
- keyword: "uniqueItems",
- params: {
- i: i4,
- j: j2
- },
- message: "must NOT have duplicate items (items ## " + j2 + " and " + i4 + " are identical)"
- }];
- return false;
- break outer0;
- }
- }
- }
- }
}
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/enum",
- schemaPath: "#/properties/enum/type",
- keyword: "type",
- params: { type: "array" },
- message: "must be array"
- }];
- return false;
}
}
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/enum",
+ schemaPath: "#/properties/enum/type",
+ keyword: "type",
+ params: { type: "array" },
+ message: "must be array"
+ }];
+ return false;
+ }
var valid0 = _errs80 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.type !== undefined) {
+ if (data.type !== void 0) {
let data38 = data.type;
const _errs82 = errors;
const _errs83 = errors;
@@ -102708,105 +93873,81 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
params: { allowedValues: schema20.enum },
message: "must be equal to one of the allowed values"
};
- if (vErrors === null) {
- vErrors = [err7];
- } else {
- vErrors.push(err7);
- }
+ if (vErrors === null) vErrors = [err7];
+ else vErrors.push(err7);
errors++;
}
var _valid2 = _errs84 === errors;
valid18 = valid18 || _valid2;
if (!valid18) {
const _errs86 = errors;
- if (errors === _errs86) {
- if (Array.isArray(data38)) {
- if (data38.length < 1) {
- const err8 = {
- instancePath: instancePath + "/type",
- schemaPath: "#/properties/type/anyOf/1/minItems",
- keyword: "minItems",
- params: { limit: 1 },
- message: "must NOT have fewer than 1 items"
+ if (errors === _errs86) if (Array.isArray(data38)) if (data38.length < 1) {
+ const err8 = {
+ instancePath: instancePath + "/type",
+ schemaPath: "#/properties/type/anyOf/1/minItems",
+ keyword: "minItems",
+ params: { limit: 1 },
+ message: "must NOT have fewer than 1 items"
+ };
+ if (vErrors === null) vErrors = [err8];
+ else vErrors.push(err8);
+ errors++;
+ } else {
+ var valid20 = true;
+ const len2 = data38.length;
+ for (let i5 = 0; i5 < len2; i5++) {
+ let data39 = data38[i5];
+ const _errs88 = errors;
+ if (!(data39 === "array" || data39 === "boolean" || data39 === "integer" || data39 === "null" || data39 === "number" || data39 === "object" || data39 === "string")) {
+ const err9 = {
+ instancePath: instancePath + "/type/" + i5,
+ schemaPath: "#/definitions/simpleTypes/enum",
+ keyword: "enum",
+ params: { allowedValues: schema20.enum },
+ message: "must be equal to one of the allowed values"
};
- if (vErrors === null) {
- vErrors = [err8];
- } else {
- vErrors.push(err8);
- }
+ if (vErrors === null) vErrors = [err9];
+ else vErrors.push(err9);
errors++;
- } else {
- var valid20 = true;
- const len2 = data38.length;
- for (let i5 = 0; i5 < len2; i5++) {
- let data39 = data38[i5];
- const _errs88 = errors;
- if (!(data39 === "array" || data39 === "boolean" || data39 === "integer" || data39 === "null" || data39 === "number" || data39 === "object" || data39 === "string")) {
- const err9 = {
- instancePath: instancePath + "/type/" + i5,
- schemaPath: "#/definitions/simpleTypes/enum",
- keyword: "enum",
- params: { allowedValues: schema20.enum },
- message: "must be equal to one of the allowed values"
- };
- if (vErrors === null) {
- vErrors = [err9];
- } else {
- vErrors.push(err9);
- }
- errors++;
- }
- var valid20 = _errs88 === errors;
- if (!valid20) {
- break;
- }
- }
- if (valid20) {
- let i6 = data38.length;
- let j3;
- if (i6 > 1) {
- outer1: for (; i6--;) {
- for (j3 = i6; j3--;) {
- if (func0(data38[i6], data38[j3])) {
- const err10 = {
- instancePath: instancePath + "/type",
- schemaPath: "#/properties/type/anyOf/1/uniqueItems",
- keyword: "uniqueItems",
- params: {
- i: i6,
- j: j3
- },
- message: "must NOT have duplicate items (items ## " + j3 + " and " + i6 + " are identical)"
- };
- if (vErrors === null) {
- vErrors = [err10];
- } else {
- vErrors.push(err10);
- }
- errors++;
- break outer1;
- }
- }
- }
- }
- }
}
- } else {
- const err11 = {
- instancePath: instancePath + "/type",
- schemaPath: "#/properties/type/anyOf/1/type",
- keyword: "type",
- params: { type: "array" },
- message: "must be array"
- };
- if (vErrors === null) {
- vErrors = [err11];
- } else {
- vErrors.push(err11);
+ var valid20 = _errs88 === errors;
+ if (!valid20) break;
+ }
+ if (valid20) {
+ let i6 = data38.length;
+ let j3;
+ if (i6 > 1) {
+ outer1: for (; i6--;) for (j3 = i6; j3--;) if (func0(data38[i6], data38[j3])) {
+ const err10 = {
+ instancePath: instancePath + "/type",
+ schemaPath: "#/properties/type/anyOf/1/uniqueItems",
+ keyword: "uniqueItems",
+ params: {
+ i: i6,
+ j: j3
+ },
+ message: "must NOT have duplicate items (items ## " + j3 + " and " + i6 + " are identical)"
+ };
+ if (vErrors === null) vErrors = [err10];
+ else vErrors.push(err10);
+ errors++;
+ break outer1;
+ }
}
- errors++;
}
}
+ else {
+ const err11 = {
+ instancePath: instancePath + "/type",
+ schemaPath: "#/properties/type/anyOf/1/type",
+ keyword: "type",
+ params: { type: "array" },
+ message: "must be array"
+ };
+ if (vErrors === null) vErrors = [err11];
+ else vErrors.push(err11);
+ errors++;
+ }
var _valid2 = _errs86 === errors;
valid18 = valid18 || _valid2;
}
@@ -102818,30 +93959,20 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
params: {},
message: "must match a schema in anyOf"
};
- if (vErrors === null) {
- vErrors = [err12];
- } else {
- vErrors.push(err12);
- }
+ if (vErrors === null) vErrors = [err12];
+ else vErrors.push(err12);
errors++;
validate10.errors = vErrors;
return false;
} else {
errors = _errs83;
- if (vErrors !== null) {
- if (_errs83) {
- vErrors.length = _errs83;
- } else {
- vErrors = null;
- }
- }
+ if (vErrors !== null) if (_errs83) vErrors.length = _errs83;
+ else vErrors = null;
}
var valid0 = _errs82 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.format !== undefined) {
+ if (data.format !== void 0) {
const _errs90 = errors;
if (typeof data.format !== "string") {
validate10.errors = [{
@@ -102854,11 +93985,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs90 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.contentMediaType !== undefined) {
+ if (data.contentMediaType !== void 0) {
const _errs92 = errors;
if (typeof data.contentMediaType !== "string") {
validate10.errors = [{
@@ -102871,11 +94000,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs92 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.contentEncoding !== undefined) {
+ if (data.contentEncoding !== void 0) {
const _errs94 = errors;
if (typeof data.contentEncoding !== "string") {
validate10.errors = [{
@@ -102888,11 +94015,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
var valid0 = _errs94 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.if !== undefined) {
+ if (data.if !== void 0) {
const _errs96 = errors;
if (!validate10(data.if, {
instancePath: instancePath + "/if",
@@ -102904,11 +94029,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs96 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.then !== undefined) {
+ if (data.then !== void 0) {
const _errs97 = errors;
if (!validate10(data.then, {
instancePath: instancePath + "/then",
@@ -102920,11 +94043,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs97 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.else !== undefined) {
+ if (data.else !== void 0) {
const _errs98 = errors;
if (!validate10(data.else, {
instancePath: instancePath + "/else",
@@ -102936,11 +94057,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs98 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.allOf !== undefined) {
+ if (data.allOf !== void 0) {
const _errs99 = errors;
if (!validate13(data.allOf, {
instancePath: instancePath + "/allOf",
@@ -102952,11 +94071,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs99 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.anyOf !== undefined) {
+ if (data.anyOf !== void 0) {
const _errs100 = errors;
if (!validate13(data.anyOf, {
instancePath: instancePath + "/anyOf",
@@ -102968,11 +94085,9 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs100 === errors;
- } else {
- var valid0 = true;
- }
+ } else var valid0 = true;
if (valid0) {
- if (data.oneOf !== undefined) {
+ if (data.oneOf !== void 0) {
const _errs101 = errors;
if (!validate13(data.oneOf, {
instancePath: instancePath + "/oneOf",
@@ -102984,26 +94099,20 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
errors = vErrors.length;
}
var valid0 = _errs101 === errors;
- } else {
- var valid0 = true;
- }
- if (valid0) {
- if (data.not !== undefined) {
- const _errs102 = errors;
- if (!validate10(data.not, {
- instancePath: instancePath + "/not",
- parentData: data,
- parentDataProperty: "not",
- rootData
- })) {
- vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
- errors = vErrors.length;
- }
- var valid0 = _errs102 === errors;
- } else {
- var valid0 = true;
+ } else var valid0 = true;
+ if (valid0) if (data.not !== void 0) {
+ const _errs102 = errors;
+ if (!validate10(data.not, {
+ instancePath: instancePath + "/not",
+ parentData: data,
+ parentDataProperty: "not",
+ rootData
+ })) {
+ vErrors = vErrors === null ? validate10.errors : vErrors.concat(validate10.errors);
+ errors = vErrors.length;
}
- }
+ var valid0 = _errs102 === errors;
+ } else var valid0 = true;
}
}
}
@@ -103051,7 +94160,6 @@ var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return errors === 0;
}
}));
-
//#endregion
//#region ../node_modules/@fastify/merge-json-schemas/lib/errors.js
var require_errors$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -103087,7 +94195,6 @@ var require_errors$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
InvalidOnConflictOptionError
};
}));
-
//#endregion
//#region ../node_modules/@fastify/merge-json-schemas/lib/resolvers.js
var require_resolvers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -103095,43 +94202,24 @@ var require_resolvers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { MergeError } = require_errors$1();
function _arraysIntersection(arrays) {
let intersection = arrays[0];
- for (let i = 1; i < arrays.length; i++) {
- intersection = intersection.filter((value) => arrays[i].includes(value));
- }
+ for (let i = 1; i < arrays.length; i++) intersection = intersection.filter((value) => arrays[i].includes(value));
return intersection;
}
function arraysIntersection(keyword, values, mergedSchema) {
const intersection = _arraysIntersection(values);
- if (intersection.length === 0) {
- throw new MergeError(keyword, values);
- }
+ if (intersection.length === 0) throw new MergeError(keyword, values);
mergedSchema[keyword] = intersection;
}
function hybridArraysIntersection(keyword, values, mergedSchema) {
- for (let i = 0; i < values.length; i++) {
- if (!Array.isArray(values[i])) {
- values[i] = [values[i]];
- }
- }
+ for (let i = 0; i < values.length; i++) if (!Array.isArray(values[i])) values[i] = [values[i]];
const intersection = _arraysIntersection(values);
- if (intersection.length === 0) {
- throw new MergeError(keyword, values);
- }
- if (intersection.length === 1) {
- mergedSchema[keyword] = intersection[0];
- } else {
- mergedSchema[keyword] = intersection;
- }
+ if (intersection.length === 0) throw new MergeError(keyword, values);
+ if (intersection.length === 1) mergedSchema[keyword] = intersection[0];
+ else mergedSchema[keyword] = intersection;
}
function arraysUnion(keyword, values, mergedSchema) {
const union = [];
- for (const array of values) {
- for (const value of array) {
- if (!union.includes(value)) {
- union.push(value);
- }
- }
- }
+ for (const array of values) for (const value of array) if (!union.includes(value)) union.push(value);
mergedSchema[keyword] = union;
}
function minNumber(keyword, values, mergedSchema) {
@@ -103144,42 +94232,28 @@ var require_resolvers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const gcd = (a, b) => !b ? a : gcd(b, a % b);
const lcm = (a, b) => a * b / gcd(a, b);
let scale = 1;
- for (const value of values) {
- while (value * scale % 1 !== 0) {
- scale *= 10;
- }
- }
+ for (const value of values) while (value * scale % 1 !== 0) scale *= 10;
let multiple = values[0] * scale;
- for (const value of values) {
- multiple = lcm(multiple, value * scale);
- }
+ for (const value of values) multiple = lcm(multiple, value * scale);
mergedSchema[keyword] = multiple / scale;
}
function allEqual(keyword, values, mergedSchema) {
const firstValue = values[0];
- for (let i = 1; i < values.length; i++) {
- if (!deepEqual(values[i], firstValue)) {
- throw new MergeError(keyword, values);
- }
- }
+ for (let i = 1; i < values.length; i++) if (!deepEqual(values[i], firstValue)) throw new MergeError(keyword, values);
mergedSchema[keyword] = firstValue;
}
function skip() {}
function booleanAnd(keyword, values, mergedSchema) {
- for (const value of values) {
- if (value === false) {
- mergedSchema[keyword] = false;
- return;
- }
+ for (const value of values) if (value === false) {
+ mergedSchema[keyword] = false;
+ return;
}
mergedSchema[keyword] = true;
}
function booleanOr(keyword, values, mergedSchema) {
- for (const value of values) {
- if (value === true) {
- mergedSchema[keyword] = true;
- return;
- }
+ for (const value of values) if (value === true) {
+ mergedSchema[keyword] = true;
+ return;
}
mergedSchema[keyword] = false;
}
@@ -103196,7 +94270,6 @@ var require_resolvers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
skip
};
}));
-
//#endregion
//#region ../node_modules/@fastify/merge-json-schemas/index.js
var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -103251,11 +94324,7 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
let result = [[]];
for (const array of arrays) {
const temp = [];
- for (const x of result) {
- for (const y of array) {
- temp.push([...x, y]);
- }
- }
+ for (const x of result) for (const y of array) temp.push([...x, y]);
result = temp;
}
return result;
@@ -103267,39 +94336,27 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
}
const product = cartesianProduct(values);
const mergedOneOf = [];
- for (const combination of product) {
- try {
- const mergedSchema = _mergeSchemas(combination, options);
- if (mergedSchema !== undefined) {
- mergedOneOf.push(mergedSchema);
- }
- } catch (error) {
- if (error instanceof errors.MergeError) continue;
- throw error;
- }
+ for (const combination of product) try {
+ const mergedSchema = _mergeSchemas(combination, options);
+ if (mergedSchema !== void 0) mergedOneOf.push(mergedSchema);
+ } catch (error) {
+ if (error instanceof errors.MergeError) continue;
+ throw error;
}
mergedSchema[keyword] = mergedOneOf;
}
function getSchemaForItem(schema, index) {
const { items, additionalItems } = schema;
if (Array.isArray(items)) {
- if (index < items.length) {
- return items[index];
- }
+ if (index < items.length) return items[index];
return additionalItems;
}
- if (items !== undefined) {
- return items;
- }
+ if (items !== void 0) return items;
return additionalItems;
}
function mergeItems(keyword, values, mergedSchema, schemas, options) {
let maxArrayItemsLength = 0;
- for (const itemsSchema of values) {
- if (Array.isArray(itemsSchema)) {
- maxArrayItemsLength = Math.max(maxArrayItemsLength, itemsSchema.length);
- }
- }
+ for (const itemsSchema of values) if (Array.isArray(itemsSchema)) maxArrayItemsLength = Math.max(maxArrayItemsLength, itemsSchema.length);
if (maxArrayItemsLength === 0) {
mergedSchema[keyword] = _mergeSchemas(values, options);
return;
@@ -103309,9 +94366,7 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
const indexItemSchemas = [];
for (const schema of schemas) {
const itemSchema = getSchemaForItem(schema, i);
- if (itemSchema !== undefined) {
- indexItemSchemas.push(itemSchema);
- }
+ if (itemSchema !== void 0) indexItemSchemas.push(itemSchema);
}
mergedItemsSchemas[i] = _mergeSchemas(indexItemSchemas, options);
}
@@ -103319,11 +94374,9 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
}
function mergeAdditionalItems(keyword, values, mergedSchema, schemas, options) {
let hasArrayItems = false;
- for (const schema of schemas) {
- if (Array.isArray(schema.items)) {
- hasArrayItems = true;
- break;
- }
+ for (const schema of schemas) if (Array.isArray(schema.items)) {
+ hasArrayItems = true;
+ break;
}
if (!hasArrayItems) {
mergedSchema[keyword] = _mergeSchemas(values, options);
@@ -103332,26 +94385,15 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
const mergedAdditionalItemsSchemas = [];
for (const schema of schemas) {
let additionalItemsSchema = schema.additionalItems;
- if (additionalItemsSchema === undefined && !Array.isArray(schema.items)) {
- additionalItemsSchema = schema.items;
- }
- if (additionalItemsSchema !== undefined) {
- mergedAdditionalItemsSchemas.push(additionalItemsSchema);
- }
+ if (additionalItemsSchema === void 0 && !Array.isArray(schema.items)) additionalItemsSchema = schema.items;
+ if (additionalItemsSchema !== void 0) mergedAdditionalItemsSchemas.push(additionalItemsSchema);
}
mergedSchema[keyword] = _mergeSchemas(mergedAdditionalItemsSchemas, options);
}
function getSchemaForProperty(schema, propertyName) {
const { properties, patternProperties, additionalProperties } = schema;
- if (properties?.[propertyName] !== undefined) {
- return properties[propertyName];
- }
- for (const pattern of Object.keys(patternProperties ?? {})) {
- const regexp = new RegExp(pattern);
- if (regexp.test(propertyName)) {
- return patternProperties[pattern];
- }
- }
+ if (properties?.[propertyName] !== void 0) return properties[propertyName];
+ for (const pattern of Object.keys(patternProperties ?? {})) if (new RegExp(pattern).test(propertyName)) return patternProperties[pattern];
return additionalProperties;
}
function mergeProperties(keyword, values, mergedSchema, schemas, options) {
@@ -103359,15 +94401,12 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
for (const currentSchema of schemas) {
const properties = currentSchema.properties ?? {};
for (const propertyName of Object.keys(properties)) {
- if (foundProperties[propertyName] !== undefined) continue;
- const propertySchema = properties[propertyName];
- foundProperties[propertyName] = [propertySchema];
+ if (foundProperties[propertyName] !== void 0) continue;
+ foundProperties[propertyName] = [properties[propertyName]];
for (const anotherSchema of schemas) {
if (currentSchema === anotherSchema) continue;
const propertySchema = getSchemaForProperty(anotherSchema, propertyName);
- if (propertySchema !== undefined) {
- foundProperties[propertyName].push(propertySchema);
- }
+ if (propertySchema !== void 0) foundProperties[propertyName].push(propertySchema);
}
}
}
@@ -103380,19 +94419,14 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
}
function mergeObjects(keyword, values, mergedSchema, schemas, options) {
const objectsProperties = {};
- for (const properties of values) {
- for (const propertyName of Object.keys(properties)) {
- if (objectsProperties[propertyName] === undefined) {
- objectsProperties[propertyName] = [];
- }
- objectsProperties[propertyName].push(properties[propertyName]);
- }
+ for (const properties of values) for (const propertyName of Object.keys(properties)) {
+ if (objectsProperties[propertyName] === void 0) objectsProperties[propertyName] = [];
+ objectsProperties[propertyName].push(properties[propertyName]);
}
const mergedProperties = {};
for (const propertyName of Object.keys(objectsProperties)) {
const propertySchemas = objectsProperties[propertyName];
- const mergedPropertySchema = _mergeSchemas(propertySchemas, options);
- mergedProperties[propertyName] = mergedPropertySchema;
+ mergedProperties[propertyName] = _mergeSchemas(propertySchemas, options);
}
mergedSchema[keyword] = mergedProperties;
}
@@ -103403,39 +94437,23 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
then: schemas[i].then,
else: schemas[i].else
};
- if (subSchema.if === undefined) continue;
- if (mergedSchema.if === undefined) {
+ if (subSchema.if === void 0) continue;
+ if (mergedSchema.if === void 0) {
mergedSchema.if = subSchema.if;
- if (subSchema.then !== undefined) {
- mergedSchema.then = subSchema.then;
- }
- if (subSchema.else !== undefined) {
- mergedSchema.else = subSchema.else;
- }
+ if (subSchema.then !== void 0) mergedSchema.then = subSchema.then;
+ if (subSchema.else !== void 0) mergedSchema.else = subSchema.else;
continue;
}
- if (mergedSchema.then !== undefined) {
- mergedSchema.then = _mergeSchemas([mergedSchema.then, subSchema], options);
- }
- if (mergedSchema.else !== undefined) {
- mergedSchema.else = _mergeSchemas([mergedSchema.else, subSchema], options);
- }
+ if (mergedSchema.then !== void 0) mergedSchema.then = _mergeSchemas([mergedSchema.then, subSchema], options);
+ if (mergedSchema.else !== void 0) mergedSchema.else = _mergeSchemas([mergedSchema.else, subSchema], options);
}
}
function mergeDependencies(keyword, values, mergedSchema) {
const mergedDependencies = {};
- for (const dependencies of values) {
- for (const propertyName of Object.keys(dependencies)) {
- if (mergedDependencies[propertyName] === undefined) {
- mergedDependencies[propertyName] = [];
- }
- const mergedPropertyDependencies = mergedDependencies[propertyName];
- for (const propertyDependency of dependencies[propertyName]) {
- if (!mergedPropertyDependencies.includes(propertyDependency)) {
- mergedPropertyDependencies.push(propertyDependency);
- }
- }
- }
+ for (const dependencies of values) for (const propertyName of Object.keys(dependencies)) {
+ if (mergedDependencies[propertyName] === void 0) mergedDependencies[propertyName] = [];
+ const mergedPropertyDependencies = mergedDependencies[propertyName];
+ for (const propertyDependency of dependencies[propertyName]) if (!mergedPropertyDependencies.includes(propertyDependency)) mergedPropertyDependencies.push(propertyDependency);
}
mergedSchema[keyword] = mergedDependencies;
}
@@ -103450,17 +94468,14 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
if (schema === true) continue;
allSchemasAreTrue = false;
for (const keyword of Object.keys(schema)) {
- if (keywords[keyword] === undefined) {
- keywords[keyword] = [];
- }
+ if (keywords[keyword] === void 0) keywords[keyword] = [];
keywords[keyword].push(schema[keyword]);
}
}
if (allSchemasAreTrue) return true;
for (const keyword of Object.keys(keywords)) {
const keywordValues = keywords[keyword];
- const resolver = options.resolvers[keyword] ?? options.defaultResolver;
- resolver(keyword, keywordValues, mergedSchema, schemas, options);
+ (options.resolvers[keyword] ?? options.defaultResolver)(keyword, keywordValues, mergedSchema, schemas, options);
}
return mergedSchema;
}
@@ -103471,34 +94486,25 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
return;
}
let allValuesEqual = true;
- for (let i = 1; i < values.length; i++) {
- if (!deepEqual(values[i], values[0])) {
- allValuesEqual = false;
- break;
- }
+ for (let i = 1; i < values.length; i++) if (!deepEqual(values[i], values[0])) {
+ allValuesEqual = false;
+ break;
}
if (allValuesEqual) {
mergedSchema[keyword] = values[0];
return;
}
- if (onConflict === "throw") {
- throw new errors.ResolverNotFoundError(keyword, values);
- }
- if (onConflict === "skip") {
- return;
- }
+ if (onConflict === "throw") throw new errors.ResolverNotFoundError(keyword, values);
+ if (onConflict === "skip") return;
throw new errors.InvalidOnConflictOptionError(onConflict);
}
function mergeSchemas(schemas, options = {}) {
- if (options.defaultResolver === undefined) {
- options.defaultResolver = defaultResolver;
- }
+ if (options.defaultResolver === void 0) options.defaultResolver = defaultResolver;
options.resolvers = {
...keywordsResolvers,
...options.resolvers
};
- const mergedSchema = _mergeSchemas(schemas, options);
- return mergedSchema;
+ return _mergeSchemas(schemas, options);
}
module.exports = {
mergeSchemas,
@@ -103507,7 +94513,6 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
...errors
};
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/lib/merge-schemas.js
var require_merge_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -103517,7 +94522,6 @@ var require_merge_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
module.exports = mergeSchemas;
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/lib/standalone.js
var require_standalone$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -103527,9 +94531,7 @@ var require_standalone$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ajvDependencyCode += "const Validator = require('fast-json-stringify/lib/validator')\n";
ajvDependencyCode += `const validatorState = ${JSON.stringify(validator.getState())}\n`;
ajvDependencyCode += "const validator = Validator.restoreFromState(validatorState)\n";
- } else {
- ajvDependencyCode += "const validator = null\n";
- }
+ } else ajvDependencyCode += "const validator = null\n";
const { schema, ...serializerState } = serializer.getState();
return `
'use strict'
@@ -103548,7 +94550,6 @@ var require_standalone$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Validator: require_validator()
};
}));
-
//#endregion
//#region ../node_modules/fast-json-stringify/index.js
var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -103571,13 +94572,10 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
let schemaIdCounter = 0;
function isValidSchema(schema, name) {
if (!validate(schema)) {
- if (name) {
- name = `"${name}" `;
- } else {
- name = "";
- }
+ if (name) name = `"${name}" `;
+ else name = "";
const first = validate.errors[0];
- const err = new Error(`${name}schema is invalid: data${first.instancePath} ${first.message}`);
+ const err = /* @__PURE__ */ new Error(`${name}schema is invalid: data${first.instancePath} ${first.message}`);
err.errors = isValidSchema.errors;
throw err;
}
@@ -103585,29 +94583,20 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
function resolveRef(context, location) {
const ref = location.schema.$ref;
let hashIndex = ref.indexOf("#");
- if (hashIndex === -1) {
- hashIndex = ref.length;
- }
+ if (hashIndex === -1) hashIndex = ref.length;
const schemaId = ref.slice(0, hashIndex) || location.schemaId;
const jsonPointer = ref.slice(hashIndex) || "#";
const schema = context.refResolver.getSchema(schemaId, jsonPointer);
- if (schema === null) {
- throw new Error(`Cannot find reference "${ref}"`);
- }
+ if (schema === null) throw new Error(`Cannot find reference "${ref}"`);
const newLocation = new Location(schema, schemaId, jsonPointer);
- if (schema.$ref !== undefined) {
- return resolveRef(context, newLocation);
- }
+ if (schema.$ref !== void 0) return resolveRef(context, newLocation);
return newLocation;
}
function getMergedLocation(context, mergedSchemaId) {
- const mergedSchema = context.refResolver.getSchema(mergedSchemaId, "#");
- return new Location(mergedSchema, mergedSchemaId, "#");
+ return new Location(context.refResolver.getSchema(mergedSchemaId, "#"), mergedSchemaId, "#");
}
function getSchemaId(schema, rootSchemaId) {
- if (schema.$id && schema.$id.charAt(0) !== "#") {
- return schema.$id;
- }
+ if (schema.$id && schema.$id.charAt(0) !== "#") return schema.$id;
return rootSchemaId;
}
function build(schema, options) {
@@ -103616,52 +94605,33 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
const context = {
functions: [],
functionsCounter: 0,
- functionsNamesBySchema: new Map(),
+ functionsNamesBySchema: /* @__PURE__ */ new Map(),
options,
refResolver: new RefResolver(),
rootSchemaId: schema.$id || `__fjs_root_${schemaIdCounter++}`,
- validatorSchemasIds: new Set(),
- mergedSchemasIds: new Map()
+ validatorSchemasIds: /* @__PURE__ */ new Set(),
+ mergedSchemasIds: /* @__PURE__ */ new Map()
};
const schemaId = getSchemaId(schema, context.rootSchemaId);
- if (!context.refResolver.hasSchema(schemaId)) {
- context.refResolver.addSchema(schema, context.rootSchemaId);
- }
- if (options.schema) {
- for (const key in options.schema) {
- const schema = options.schema[key];
- const schemaId = getSchemaId(schema, key);
- if (!context.refResolver.hasSchema(schemaId)) {
- isValidSchema(schema, key);
- context.refResolver.addSchema(schema, key);
- }
+ if (!context.refResolver.hasSchema(schemaId)) context.refResolver.addSchema(schema, context.rootSchemaId);
+ if (options.schema) for (const key in options.schema) {
+ const schema = options.schema[key];
+ const schemaId = getSchemaId(schema, key);
+ if (!context.refResolver.hasSchema(schemaId)) {
+ isValidSchema(schema, key);
+ context.refResolver.addSchema(schema, key);
}
}
if (options.rounding) {
- if (!validRoundingMethods.includes(options.rounding)) {
- throw new Error(`Unsupported integer rounding method ${options.rounding}`);
- }
- }
- if (options.largeArrayMechanism) {
- if (validLargeArrayMechanisms.includes(options.largeArrayMechanism)) {
- largeArrayMechanism = options.largeArrayMechanism;
- } else {
- throw new Error(`Unsupported large array mechanism ${options.largeArrayMechanism}`);
- }
- }
- if (options.largeArraySize) {
- if (typeof options.largeArraySize === "string" && Number.isFinite(Number.parseInt(options.largeArraySize, 10))) {
- largeArraySize = Number.parseInt(options.largeArraySize, 10);
- } else if (typeof options.largeArraySize === "number" && Number.isInteger(options.largeArraySize)) {
- largeArraySize = options.largeArraySize;
- } else if (typeof options.largeArraySize === "bigint") {
- largeArraySize = Number(options.largeArraySize);
- } else {
- throw new Error(`Unsupported large array size. Expected integer-like, got ${typeof options.largeArraySize} with value ${options.largeArraySize}`);
- }
- }
- const location = new Location(schema, context.rootSchemaId);
- const code = buildValue(context, location, "input");
+ if (!validRoundingMethods.includes(options.rounding)) throw new Error(`Unsupported integer rounding method ${options.rounding}`);
+ }
+ if (options.largeArrayMechanism) if (validLargeArrayMechanisms.includes(options.largeArrayMechanism)) largeArrayMechanism = options.largeArrayMechanism;
+ else throw new Error(`Unsupported large array mechanism ${options.largeArrayMechanism}`);
+ if (options.largeArraySize) if (typeof options.largeArraySize === "string" && Number.isFinite(Number.parseInt(options.largeArraySize, 10))) largeArraySize = Number.parseInt(options.largeArraySize, 10);
+ else if (typeof options.largeArraySize === "number" && Number.isInteger(options.largeArraySize)) largeArraySize = options.largeArraySize;
+ else if (typeof options.largeArraySize === "bigint") largeArraySize = Number(options.largeArraySize);
+ else throw new Error(`Unsupported large array size. Expected integer-like, got ${typeof options.largeArraySize} with value ${options.largeArraySize}`);
+ const code = buildValue(context, new Location(schema, context.rootSchemaId), "input");
let contextFunctionCode = `
const JSON_STR_BEGIN_OBJECT = '{'
const JSON_STR_END_OBJECT = '}'
@@ -103675,14 +94645,12 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
const JSON_STR_EMPTY_STRING = JSON_STR_QUOTE + JSON_STR_QUOTE
const JSON_STR_NULL = 'null'
`;
- if (code === "json += anonymous0(input)") {
- contextFunctionCode += `
+ if (code === "json += anonymous0(input)") contextFunctionCode += `
${context.functions.join("\n")}
const main = anonymous0
return main
`;
- } else {
- contextFunctionCode += `
+ else contextFunctionCode += `
function main (input) {
let json = ''
${code}
@@ -103691,33 +94659,23 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
${context.functions.join("\n")}
return main
`;
- }
const serializer = new Serializer(options);
const validator = new Validator(options.ajv);
for (const schemaId of context.validatorSchemasIds) {
const schema = context.refResolver.getSchema(schemaId);
validator.addSchema(schema, schemaId);
const dependencies = context.refResolver.getSchemaDependencies(schemaId);
- for (const [schemaId, schema] of Object.entries(dependencies)) {
- validator.addSchema(schema, schemaId);
- }
- }
- if (options.debugMode) {
- options.mode = "debug";
- }
- if (options.mode === "debug") {
- return {
- validator,
- serializer,
- code: `validator\nserializer\n${contextFunctionCode}`,
- ajv: validator.ajv
- };
- }
+ for (const [schemaId, schema] of Object.entries(dependencies)) validator.addSchema(schema, schemaId);
+ }
+ if (options.debugMode) options.mode = "debug";
+ if (options.mode === "debug") return {
+ validator,
+ serializer,
+ code: `validator\nserializer\n${contextFunctionCode}`,
+ ajv: validator.ajv
+ };
const contextFunc = new Function("validator", "serializer", contextFunctionCode);
- if (options.mode === "standalone") {
- const buildStandaloneCode = require_standalone$3();
- return buildStandaloneCode(contextFunc, context, serializer, validator);
- }
+ if (options.mode === "standalone") return require_standalone$3()(contextFunc, context, serializer, validator);
return contextFunc(validator, serializer);
}
const objectKeywords = [
@@ -103754,18 +94712,10 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
* https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6
*/
function inferTypeByKeyword(schema) {
- for (var keyword of objectKeywords) {
- if (keyword in schema) return "object";
- }
- for (var keyword of arrayKeywords) {
- if (keyword in schema) return "array";
- }
- for (var keyword of stringKeywords) {
- if (keyword in schema) return "string";
- }
- for (var keyword of numberKeywords) {
- if (keyword in schema) return "number";
- }
+ for (var keyword of objectKeywords) if (keyword in schema) return "object";
+ for (var keyword of arrayKeywords) if (keyword in schema) return "array";
+ for (var keyword of stringKeywords) if (keyword in schema) return "string";
+ for (var keyword of numberKeywords) if (keyword in schema) return "number";
return schema.type;
}
function buildExtraObjectPropertiesSerializer(context, location, addComma) {
@@ -103783,10 +94733,9 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
`;
const patternPropertiesLocation = location.getPropertyLocation("patternProperties");
const patternPropertiesSchema = patternPropertiesLocation.schema;
- if (patternPropertiesSchema !== undefined) {
- for (const propertyKey in patternPropertiesSchema) {
- const propertyLocation = patternPropertiesLocation.getPropertyLocation(propertyKey);
- code += `
+ if (patternPropertiesSchema !== void 0) for (const propertyKey in patternPropertiesSchema) {
+ const propertyLocation = patternPropertiesLocation.getPropertyLocation(propertyKey);
+ code += `
if (/${propertyKey.replace(/\\*\//g, "\\/")}/.test(key)) {
${addComma}
json += serializer.asString(key) + JSON_STR_COLONS
@@ -103794,24 +94743,19 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
continue
}
`;
- }
}
- const additionalPropertiesLocation = location.getPropertyLocation("additionalProperties");
- const additionalPropertiesSchema = additionalPropertiesLocation.schema;
- if (additionalPropertiesSchema !== undefined) {
- if (additionalPropertiesSchema === true) {
- code += `
+ const additionalPropertiesSchema = location.getPropertyLocation("additionalProperties").schema;
+ if (additionalPropertiesSchema !== void 0) if (additionalPropertiesSchema === true) code += `
${addComma}
json += serializer.asString(key) + JSON_STR_COLONS + JSON.stringify(value)
`;
- } else {
- const propertyLocation = location.getPropertyLocation("additionalProperties");
- code += `
+ else {
+ const propertyLocation = location.getPropertyLocation("additionalProperties");
+ code += `
${addComma}
json += serializer.asString(key) + JSON_STR_COLONS
${buildValue(context, propertyLocation, "value")}
`;
- }
}
code += `
}
@@ -103824,16 +94768,13 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
const requiredProperties = schema.required || [];
const propertiesKeys = Object.keys(schema.properties || {}).sort((key1, key2) => {
const required1 = requiredProperties.includes(key1);
- const required2 = requiredProperties.includes(key2);
- return required1 === required2 ? 0 : required1 ? -1 : 1;
+ return required1 === requiredProperties.includes(key2) ? 0 : required1 ? -1 : 1;
});
const hasRequiredProperties = requiredProperties.includes(propertiesKeys[0]);
let code = "let value\n";
- for (const key of requiredProperties) {
- if (!propertiesKeys.includes(key)) {
- const sanitizedKey = JSON.stringify(key);
- code += `if (obj[${sanitizedKey}] === undefined) throw new Error('${sanitizedKey.replace(/'/g, "\\'")} is required!')\n`;
- }
+ for (const key of requiredProperties) if (!propertiesKeys.includes(key)) {
+ const sanitizedKey = JSON.stringify(key);
+ code += `if (obj[${sanitizedKey}] === undefined) throw new Error('${sanitizedKey.replace(/'/g, "\\'")} is required!')\n`;
}
code += "let json = JSON_STR_BEGIN_OBJECT\n";
let addComma = "";
@@ -103843,9 +94784,7 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
}
for (const key of propertiesKeys) {
let propertyLocation = propertiesLocation.getPropertyLocation(key);
- if (propertyLocation.schema.$ref) {
- propertyLocation = resolveRef(context, propertyLocation);
- }
+ if (propertyLocation.schema.$ref) propertyLocation = resolveRef(context, propertyLocation);
const sanitizedKey = JSON.stringify(key);
const defaultValue = propertyLocation.schema.default;
const isRequired = requiredProperties.includes(key);
@@ -103856,27 +94795,19 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
json += ${JSON.stringify(sanitizedKey + ":")}
${buildValue(context, propertyLocation, "value")}
}`;
- if (defaultValue !== undefined) {
- code += ` else {
+ if (defaultValue !== void 0) code += ` else {
${addComma}
json += ${JSON.stringify(sanitizedKey + ":" + JSON.stringify(defaultValue))}
}
`;
- } else if (isRequired) {
- code += ` else {
+ else if (isRequired) code += ` else {
throw new Error('${sanitizedKey.replace(/'/g, "\\'")} is required!')
}
`;
- } else {
- code += "\n";
- }
- if (hasRequiredProperties) {
- addComma = "json += ','";
- }
- }
- if (schema.patternProperties || schema.additionalProperties) {
- code += buildExtraObjectPropertiesSerializer(context, location, addComma);
+ else code += "\n";
+ if (hasRequiredProperties) addComma = "json += ','";
}
+ if (schema.patternProperties || schema.additionalProperties) code += buildExtraObjectPropertiesSerializer(context, location, addComma);
code += `
return json + JSON_STR_END_OBJECT
`;
@@ -103885,10 +94816,7 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
function mergeLocations(context, mergedSchemaId, mergedLocations) {
for (let i = 0; i < mergedLocations.length; i++) {
const location = mergedLocations[i];
- const schema = location.schema;
- if (schema.$ref) {
- mergedLocations[i] = resolveRef(context, location);
- }
+ if (location.schema.$ref) mergedLocations[i] = resolveRef(context, location);
}
const mergedSchemas = [];
for (const location of mergedLocations) {
@@ -103903,21 +94831,13 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
}
function cloneOriginSchema(context, schema, schemaId) {
const clonedSchema = Array.isArray(schema) ? [] : {};
- if (schema.$id !== undefined && schema.$id.charAt(0) !== "#") {
- schemaId = schema.$id;
- }
+ if (schema.$id !== void 0 && schema.$id.charAt(0) !== "#") schemaId = schema.$id;
const mergedSchemaRef = context.mergedSchemasIds.get(schema);
- if (mergedSchemaRef) {
- context.mergedSchemasIds.set(clonedSchema, mergedSchemaRef);
- }
+ if (mergedSchemaRef) context.mergedSchemasIds.set(clonedSchema, mergedSchemaRef);
for (const key in schema) {
let value = schema[key];
- if (key === "$ref" && typeof value === "string" && value.charAt(0) === "#") {
- value = schemaId + value;
- }
- if (typeof value === "object" && value !== null) {
- value = cloneOriginSchema(context, value, schemaId);
- }
+ if (key === "$ref" && typeof value === "string" && value.charAt(0) === "#") value = schemaId + value;
+ if (typeof value === "object" && value !== null) value = cloneOriginSchema(context, value, schemaId);
clonedSchema[key] = value;
}
return clonedSchema;
@@ -103930,15 +94850,11 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
}
function buildObject(context, location) {
const schema = location.schema;
- if (context.functionsNamesBySchema.has(schema)) {
- return context.functionsNamesBySchema.get(schema);
- }
+ if (context.functionsNamesBySchema.has(schema)) return context.functionsNamesBySchema.get(schema);
const functionName = generateFuncName(context);
context.functionsNamesBySchema.set(schema, functionName);
let schemaRef = location.getSchemaRef();
- if (schemaRef.startsWith(context.rootSchemaId)) {
- schemaRef = schemaRef.replace(context.rootSchemaId, "");
- }
+ if (schemaRef.startsWith(context.rootSchemaId)) schemaRef = schemaRef.replace(context.rootSchemaId, "");
let functionCode = `
`;
const nullable = schema.nullable === true;
@@ -103958,19 +94874,13 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
const schema = location.schema;
let itemsLocation = location.getPropertyLocation("items");
itemsLocation.schema = itemsLocation.schema || {};
- if (itemsLocation.schema.$ref) {
- itemsLocation = resolveRef(context, itemsLocation);
- }
+ if (itemsLocation.schema.$ref) itemsLocation = resolveRef(context, itemsLocation);
const itemsSchema = itemsLocation.schema;
- if (context.functionsNamesBySchema.has(schema)) {
- return context.functionsNamesBySchema.get(schema);
- }
+ if (context.functionsNamesBySchema.has(schema)) return context.functionsNamesBySchema.get(schema);
const functionName = generateFuncName(context);
context.functionsNamesBySchema.set(schema, functionName);
let schemaRef = location.getSchemaRef();
- if (schemaRef.startsWith(context.rootSchemaId)) {
- schemaRef = schemaRef.replace(context.rootSchemaId, "");
- }
+ if (schemaRef.startsWith(context.rootSchemaId)) schemaRef = schemaRef.replace(context.rootSchemaId, "");
let functionCode = `
function ${functionName} (obj) {
// ${schemaRef}
@@ -103983,16 +94893,12 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
}
const arrayLength = obj.length
`;
- if (!schema.additionalItems && Array.isArray(itemsSchema)) {
- functionCode += `
+ if (!schema.additionalItems && Array.isArray(itemsSchema)) functionCode += `
if (arrayLength > ${itemsSchema.length}) {
throw new Error(\`Item at ${itemsSchema.length} does not match schema definition.\`)
}
`;
- }
- if (largeArrayMechanism === "json-stringify") {
- functionCode += `if (arrayLength >= ${largeArraySize}) return JSON.stringify(obj)\n`;
- }
+ if (largeArrayMechanism === "json-stringify") functionCode += `if (arrayLength >= ${largeArraySize}) return JSON.stringify(obj)\n`;
functionCode += `
const arrayEnd = arrayLength - 1
let value
@@ -104016,15 +94922,13 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
}
`;
}
- if (schema.additionalItems) {
- functionCode += `
+ if (schema.additionalItems) functionCode += `
for (let i = ${itemsSchema.length}; i < arrayLength; i++) {
json += JSON.stringify(obj[i])
if (i < arrayEnd) {
json += JSON_STR_COMMA
}
}`;
- }
} else {
const code = buildValue(context, itemsLocation, "obj[i]");
functionCode += `
@@ -104073,12 +94977,9 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
case "array":
condition = "Array.isArray(value)";
break;
- default: if (Array.isArray(type)) {
- const conditions = type.map((subType) => {
- return buildArrayTypeCondition(subType, accessor);
- });
- condition = `(${conditions.join(" || ")})`;
- }
+ default: if (Array.isArray(type)) condition = `(${type.map((subType) => {
+ return buildArrayTypeCondition(subType, accessor);
+ }).join(" || ")})`;
}
return condition;
}
@@ -104086,8 +94987,7 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
return "anonymous" + context.functionsCounter++;
}
function buildMultiTypeSerializer(context, location, input) {
- const schema = location.schema;
- const types = schema.type.sort((t1) => t1 === "null" ? -1 : 1);
+ const types = location.schema.type.sort((t1) => t1 === "null" ? -1 : 1);
let code = "";
types.forEach((type, index) => {
location.schema = {
@@ -104103,7 +95003,7 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
${nestedResult}
`;
break;
- case "string": {
+ case "string":
code += `
${statement}(
typeof ${input} === "string" ||
@@ -104119,34 +95019,28 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
${nestedResult}
`;
break;
- }
- case "array": {
+ case "array":
code += `
${statement}(Array.isArray(${input}))
${nestedResult}
`;
break;
- }
- case "integer": {
+ case "integer":
code += `
${statement}(Number.isInteger(${input}) || ${input} === null)
${nestedResult}
`;
break;
- }
- default: {
+ default:
code += `
${statement}(typeof ${input} === "${type}" || ${input} === null)
${nestedResult}
`;
break;
- }
}
});
let schemaRef = location.getSchemaRef();
- if (schemaRef.startsWith(context.rootSchemaId)) {
- schemaRef = schemaRef.replace(context.rootSchemaId, "");
- }
+ if (schemaRef.startsWith(context.rootSchemaId)) schemaRef = schemaRef.replace(context.rootSchemaId, "");
code += `
else throw new TypeError(\`The value of '${schemaRef}' does not match schema definition.\`)
`;
@@ -104156,17 +95050,11 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
const schema = location.schema;
switch (schema.type) {
case "null": return "json += JSON_STR_NULL";
- case "string": {
- if (schema.format === "date-time") {
- return `json += serializer.asDateTime(${input})`;
- } else if (schema.format === "date") {
- return `json += serializer.asDate(${input})`;
- } else if (schema.format === "time") {
- return `json += serializer.asTime(${input})`;
- } else if (schema.format === "unsafe") {
- return `json += serializer.asUnsafeString(${input})`;
- } else {
- return `
+ case "string": if (schema.format === "date-time") return `json += serializer.asDateTime(${input})`;
+ else if (schema.format === "date") return `json += serializer.asDate(${input})`;
+ else if (schema.format === "time") return `json += serializer.asTime(${input})`;
+ else if (schema.format === "unsafe") return `json += serializer.asUnsafeString(${input})`;
+ else return `
if (typeof ${input} !== 'string') {
if (${input} === null) {
json += JSON_STR_EMPTY_STRING
@@ -104181,20 +95069,12 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
json += serializer.asString(${input})
}
`;
- }
- }
case "integer": return `json += serializer.asInteger(${input})`;
case "number": return `json += serializer.asNumber(${input})`;
case "boolean": return `json += serializer.asBoolean(${input})`;
- case "object": {
- const funcName = buildObject(context, location);
- return `json += ${funcName}(${input})`;
- }
- case "array": {
- const funcName = buildArray(context, location);
- return `json += ${funcName}(${input})`;
- }
- case undefined: return `json += JSON.stringify(${input})`;
+ case "object": return `json += ${buildObject(context, location)}(${input})`;
+ case "array": return `json += ${buildArray(context, location)}(${input})`;
+ case void 0: return `json += JSON.stringify(${input})`;
default: throw new Error(`${schema.type} unsupported`);
}
}
@@ -104203,43 +95083,32 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
const type = schema.type;
const hasNullType = Array.isArray(type) && type.includes("null");
let code = "";
- if (hasNullType) {
- code += `
+ if (hasNullType) code += `
if (${input} === null) {
json += JSON_STR_NULL
} else {
`;
- }
code += `json += '${JSON.stringify(schema.const).replace(SINGLE_TICK, "\\'")}'`;
- if (hasNullType) {
- code += `
+ if (hasNullType) code += `
}
`;
- }
return code;
}
function buildAllOf(context, location, input) {
const schema = location.schema;
let mergedSchemaId = context.mergedSchemasIds.get(schema);
- if (mergedSchemaId) {
- const mergedLocation = getMergedLocation(context, mergedSchemaId);
- return buildValue(context, mergedLocation, input);
- }
+ if (mergedSchemaId) return buildValue(context, getMergedLocation(context, mergedSchemaId), input);
mergedSchemaId = `__fjs_merged_${schemaIdCounter++}`;
context.mergedSchemasIds.set(schema, mergedSchemaId);
const { allOf, ...schemaWithoutAllOf } = location.schema;
const locations = [new Location(schemaWithoutAllOf, location.schemaId, location.jsonPointer)];
const allOfsLocation = location.getPropertyLocation("allOf");
- for (let i = 0; i < allOf.length; i++) {
- locations.push(allOfsLocation.getPropertyLocation(i));
- }
- const mergedLocation = mergeLocations(context, mergedSchemaId, locations);
- return buildValue(context, mergedLocation, input);
+ for (let i = 0; i < allOf.length; i++) locations.push(allOfsLocation.getPropertyLocation(i));
+ return buildValue(context, mergeLocations(context, mergedSchemaId, locations), input);
}
function buildOneOf(context, location, input) {
context.validatorSchemasIds.add(location.schemaId);
- const schema = location.schema;
- const type = schema.anyOf ? "anyOf" : "oneOf";
+ const type = location.schema.anyOf ? "anyOf" : "oneOf";
const { [type]: oneOfs, ...schemaWithoutAnyOf } = location.schema;
const locationWithoutOneOf = new Location(schemaWithoutAnyOf, location.schemaId, location.jsonPointer);
const oneOfsLocation = location.getPropertyLocation(type);
@@ -104249,9 +95118,8 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
const optionSchema = optionLocation.schema;
let mergedSchemaId = context.mergedSchemasIds.get(optionSchema);
let mergedLocation = null;
- if (mergedSchemaId) {
- mergedLocation = getMergedLocation(context, mergedSchemaId);
- } else {
+ if (mergedSchemaId) mergedLocation = getMergedLocation(context, mergedSchemaId);
+ else {
mergedSchemaId = `__fjs_merged_${schemaIdCounter++}`;
context.mergedSchemasIds.set(optionSchema, mergedSchemaId);
mergedLocation = mergeLocations(context, mergedSchemaId, [locationWithoutOneOf, optionLocation]);
@@ -104264,9 +95132,7 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
`;
}
let schemaRef = location.getSchemaRef();
- if (schemaRef.startsWith(context.rootSchemaId)) {
- schemaRef = schemaRef.replace(context.rootSchemaId, "");
- }
+ if (schemaRef.startsWith(context.rootSchemaId)) schemaRef = schemaRef.replace(context.rootSchemaId, "");
code += `
else throw new TypeError(\`The value of '${schemaRef}' does not match schema definition.\`)
`;
@@ -104276,33 +95142,28 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
context.validatorSchemasIds.add(location.schemaId);
const { if: ifSchema, then: thenSchema, else: elseSchema, ...schemaWithoutIfThenElse } = location.schema;
const rootLocation = new Location(schemaWithoutIfThenElse, location.schemaId, location.jsonPointer);
- const ifLocation = location.getPropertyLocation("if");
- const ifSchemaRef = ifLocation.getSchemaRef();
+ const ifSchemaRef = location.getPropertyLocation("if").getSchemaRef();
const thenLocation = location.getPropertyLocation("then");
let thenMergedSchemaId = context.mergedSchemasIds.get(thenSchema);
let thenMergedLocation = null;
- if (thenMergedSchemaId) {
- thenMergedLocation = getMergedLocation(context, thenMergedSchemaId);
- } else {
+ if (thenMergedSchemaId) thenMergedLocation = getMergedLocation(context, thenMergedSchemaId);
+ else {
thenMergedSchemaId = `__fjs_merged_${schemaIdCounter++}`;
context.mergedSchemasIds.set(thenSchema, thenMergedSchemaId);
thenMergedLocation = mergeLocations(context, thenMergedSchemaId, [rootLocation, thenLocation]);
}
- if (!elseSchema) {
- return `
+ if (!elseSchema) return `
if (validator.validate("${ifSchemaRef}", ${input})) {
${buildValue(context, thenMergedLocation, input)}
} else {
${buildValue(context, rootLocation, input)}
}
`;
- }
const elseLocation = location.getPropertyLocation("else");
let elseMergedSchemaId = context.mergedSchemasIds.get(elseSchema);
let elseMergedLocation = null;
- if (elseMergedSchemaId) {
- elseMergedLocation = getMergedLocation(context, elseMergedSchemaId);
- } else {
+ if (elseMergedSchemaId) elseMergedLocation = getMergedLocation(context, elseMergedSchemaId);
+ else {
elseMergedSchemaId = `__fjs_merged_${schemaIdCounter++}`;
context.mergedSchemasIds.set(elseSchema, elseMergedSchemaId);
elseMergedLocation = mergeLocations(context, elseMergedSchemaId, [rootLocation, elseLocation]);
@@ -104317,50 +95178,32 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
}
function buildValue(context, location, input) {
let schema = location.schema;
- if (typeof schema === "boolean") {
- return `json += JSON.stringify(${input})`;
- }
+ if (typeof schema === "boolean") return `json += JSON.stringify(${input})`;
if (schema.$ref) {
location = resolveRef(context, location);
schema = location.schema;
}
- if (schema.allOf) {
- return buildAllOf(context, location, input);
- }
- if (schema.anyOf || schema.oneOf) {
- return buildOneOf(context, location, input);
- }
- if (schema.if && schema.then) {
- return buildIfThenElse(context, location, input);
- }
- if (schema.type === undefined) {
+ if (schema.allOf) return buildAllOf(context, location, input);
+ if (schema.anyOf || schema.oneOf) return buildOneOf(context, location, input);
+ if (schema.if && schema.then) return buildIfThenElse(context, location, input);
+ if (schema.type === void 0) {
const inferredType = inferTypeByKeyword(schema);
- if (inferredType) {
- schema.type = inferredType;
- }
+ if (inferredType) schema.type = inferredType;
}
let code = "";
const type = schema.type;
const nullable = schema.nullable === true;
- if (nullable) {
- code += `
+ if (nullable) code += `
if (${input} === null) {
json += JSON_STR_NULL
} else {
`;
- }
- if (schema.const !== undefined) {
- code += buildConstSerializer(location, input);
- } else if (Array.isArray(type)) {
- code += buildMultiTypeSerializer(context, location, input);
- } else {
- code += buildSingleTypeSerializer(context, location, input);
- }
- if (nullable) {
- code += `
+ if (schema.const !== void 0) code += buildConstSerializer(location, input);
+ else if (Array.isArray(type)) code += buildMultiTypeSerializer(context, location, input);
+ else code += buildSingleTypeSerializer(context, location, input);
+ if (nullable) code += `
}
`;
- }
return code;
}
module.exports = build;
@@ -104375,25 +95218,18 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
]).apply(null, [validator, serializer]);
};
}));
-
//#endregion
//#region ../node_modules/@fastify/fast-json-stringify-compiler/standalone.js
var require_standalone$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SerializerSelector = require_fast_json_stringify_compiler();
function StandaloneSerializer(options = { readMode: true }) {
- if (options.readMode === true && typeof options.restoreFunction !== "function") {
- throw new Error("You must provide a function for the restoreFunction-option when readMode ON");
- }
- if (options.readMode !== true && typeof options.storeFunction !== "function") {
- throw new Error("You must provide a function for the storeFunction-option when readMode OFF");
- }
- if (options.readMode === true) {
- return function wrapper() {
- return function(opts) {
- return options.restoreFunction(opts);
- };
+ if (options.readMode === true && typeof options.restoreFunction !== "function") throw new Error("You must provide a function for the restoreFunction-option when readMode ON");
+ if (options.readMode !== true && typeof options.storeFunction !== "function") throw new Error("You must provide a function for the storeFunction-option when readMode OFF");
+ if (options.readMode === true) return function wrapper() {
+ return function(opts) {
+ return options.restoreFunction(opts);
};
- }
+ };
const factory = SerializerSelector();
return function wrapper(externalSchemas, serializerOpts = {}) {
serializerOpts.mode = "standalone";
@@ -104408,7 +95244,6 @@ var require_standalone$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = StandaloneSerializer;
module.exports.default = StandaloneSerializer;
}));
-
//#endregion
//#region ../node_modules/@fastify/fast-json-stringify-compiler/index.js
var require_fast_json_stringify_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -104431,7 +95266,6 @@ var require_fast_json_stringify_compiler = /* @__PURE__ */ __commonJSMin(((expor
module.exports.SerializerSelector = SerializerSelector;
module.exports.StandaloneSerializer = require_standalone$2();
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/metadata.js
var require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104454,14 +95288,11 @@ var require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {
}
};
function checkMetadata({ it, keyword }, metadata) {
- if (it.jtdMetadata !== metadata) {
- throw new Error(`JTD: "${keyword}" cannot be used in this schema location`);
- }
+ if (it.jtdMetadata !== metadata) throw new Error(`JTD: "${keyword}" cannot be used in this schema location`);
}
exports.checkMetadata = checkMetadata;
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/ref.js
var require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104492,9 +95323,7 @@ var require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {
function validateJtdRef() {
var _a;
const refSchema = (_a = root.schema.definitions) === null || _a === void 0 ? void 0 : _a[ref];
- if (!refSchema) {
- throw new ref_error_1.default(it.opts.uriResolver, "", ref, `No definition ${ref}`);
- }
+ if (!refSchema) throw new ref_error_1.default(it.opts.uriResolver, "", ref, `No definition ${ref}`);
if (hasRef(refSchema) || !it.opts.inlineRefs) callValidate(refSchema);
else inlineRefSchema(refSchema);
}
@@ -104534,7 +95363,6 @@ var require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.hasRef = hasRef;
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/runtime/timestamp.js
var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104582,7 +95410,6 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports) => {
}
validTimestamp.code = "require(\"ajv/dist/runtime/timestamp\").default";
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/error.js
var require_error$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104605,7 +95432,6 @@ var require_error$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.typeErrorParams = typeErrorParams;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/type.js
var require_type = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104661,7 +95487,7 @@ var require_type = /* @__PURE__ */ __commonJSMin(((exports) => {
const validString = (0, codegen_1._)`typeof ${data} == "string" && ${vts}(${data}${allowDateArg})`;
return timestamp === "string" ? validString : (0, codegen_1.or)((0, codegen_1._)`${data} instanceof Date`, validString);
}
- const def = {
+ exports.default = {
keyword: "type",
schemaType: "string",
error,
@@ -104674,10 +95500,9 @@ var require_type = /* @__PURE__ */ __commonJSMin(((exports) => {
case "string":
cond = (0, codegen_1._)`typeof ${data} == ${schema}`;
break;
- case "timestamp": {
+ case "timestamp":
cond = timestampCode(cxt);
break;
- }
case "float32":
case "float64":
cond = (0, codegen_1._)`typeof ${data} == "number"`;
@@ -104696,9 +95521,7 @@ var require_type = /* @__PURE__ */ __commonJSMin(((exports) => {
cxt.pass(parentSchema.nullable ? (0, codegen_1.or)((0, codegen_1._)`${data} === null`, cond) : cond);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/nullable.js
var require_nullable = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104710,9 +95533,7 @@ var require_nullable = /* @__PURE__ */ __commonJSMin(((exports) => {
if (parentSchema.nullable) {
gen.let(valid, (0, codegen_1._)`${data} === null`);
cond = (0, codegen_1.not)(valid);
- } else {
- gen.let(valid, false);
- }
+ } else gen.let(valid, false);
return [valid, cond];
}
exports.checkNullable = checkNullable;
@@ -104722,7 +95543,6 @@ var require_nullable = /* @__PURE__ */ __commonJSMin(((exports) => {
}
exports.checkNullableObject = checkNullableObject;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/enum.js
var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104730,14 +95550,13 @@ var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const metadata_1 = require_metadata();
const nullable_1 = require_nullable();
- const error = {
- message: "must be equal to one of the allowed values",
- params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
- };
- const def = {
+ exports.default = {
keyword: "enum",
schemaType: "array",
- error,
+ error: {
+ message: "must be equal to one of the allowed values",
+ params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
+ },
code(cxt) {
(0, metadata_1.checkMetadata)(cxt);
const { gen, data, schema, schemaValue, parentSchema, it } = cxt;
@@ -104761,9 +95580,7 @@ var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/elements.js
var require_elements = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104773,11 +95590,10 @@ var require_elements = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const metadata_1 = require_metadata();
const nullable_1 = require_nullable();
- const error_1 = require_error$1();
- const def = {
+ exports.default = {
keyword: "elements",
schemaType: "object",
- error: (0, error_1.typeError)("array"),
+ error: (0, require_error$1().typeError)("array"),
code(cxt) {
(0, metadata_1.checkMetadata)(cxt);
const { gen, data, schema, it } = cxt;
@@ -104787,9 +95603,7 @@ var require_elements = /* @__PURE__ */ __commonJSMin(((exports) => {
cxt.ok(valid);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/properties.js
var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104827,15 +95641,11 @@ var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
const { gen, data, parentSchema, it } = cxt;
const { additionalProperties, nullable } = parentSchema;
if (it.jtdDiscriminator && nullable) throw new Error("JTD: nullable inside discriminator mapping");
- if (commonProperties()) {
- throw new Error("JTD: properties and optionalProperties have common members");
- }
+ if (commonProperties()) throw new Error("JTD: properties and optionalProperties have common members");
const [allProps, properties] = schemaProperties("properties");
const [allOptProps, optProperties] = schemaProperties("optionalProperties");
- if (properties.length === 0 && optProperties.length === 0 && additionalProperties) {
- return;
- }
- const [valid, cond] = it.jtdDiscriminator === undefined ? (0, nullable_1.checkNullableObject)(cxt, data) : [gen.let("valid", false), true];
+ if (properties.length === 0 && optProperties.length === 0 && additionalProperties) return;
+ const [valid, cond] = it.jtdDiscriminator === void 0 ? (0, nullable_1.checkNullableObject)(cxt, data) : [gen.let("valid", false), true];
gen.if(cond, () => gen.assign(valid, true).block(() => {
validateProps(properties, "properties", true);
validateProps(optProperties, "optionalProperties");
@@ -104846,19 +95656,14 @@ var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
const props = parentSchema.properties;
const optProps = parentSchema.optionalProperties;
if (!(props && optProps)) return false;
- for (const p in props) {
- if (Object.prototype.hasOwnProperty.call(optProps, p)) return true;
- }
+ for (const p in props) if (Object.prototype.hasOwnProperty.call(optProps, p)) return true;
return false;
}
function schemaProperties(keyword) {
const schema = parentSchema[keyword];
const allPs = schema ? (0, code_1.allSchemaProperties)(schema) : [];
- if (it.jtdDiscriminator && allPs.some((p) => p === it.jtdDiscriminator)) {
- throw new Error(`JTD: discriminator tag used in ${keyword}`);
- }
- const ps = allPs.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
- return [allPs, ps];
+ if (it.jtdDiscriminator && allPs.some((p) => p === it.jtdDiscriminator)) throw new Error(`JTD: discriminator tag used in ${keyword}`);
+ return [allPs, allPs.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]))];
}
function validateProps(props, keyword, required) {
const _valid = gen.var("valid");
@@ -104873,9 +95678,7 @@ var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
propError: PropError.Missing,
missingProperty: prop
}, { schemaPath: prop });
- } else {
- gen.assign(_valid, true);
- }
+ } else gen.assign(_valid, true);
}
}
function applyPropertySchema(prop, keyword, _valid) {
@@ -104891,9 +95694,8 @@ var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
const addOptProp = isAdditional(key, allOptProps, "optionalProperties");
const extra = addProp === true ? addOptProp : addOptProp === true ? addProp : (0, codegen_1.and)(addProp, addOptProp);
gen.if(extra, () => {
- if (it.opts.removeAdditional) {
- gen.code((0, codegen_1._)`delete ${data}[${key}]`);
- } else {
+ if (it.opts.removeAdditional) gen.code((0, codegen_1._)`delete ${data}[${key}]`);
+ else {
cxt.error(false, {
propError: PropError.Additional,
additionalProperty: key
@@ -104911,28 +95713,23 @@ var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
if (props.length > 8) {
const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema[keyword], keyword);
additional = (0, codegen_1.not)((0, code_1.isOwnProperty)(gen, propsSchema, key));
- if (jtdDiscriminator !== undefined) {
- additional = (0, codegen_1.and)(additional, (0, codegen_1._)`${key} !== ${jtdDiscriminator}`);
- }
- } else if (props.length || jtdDiscriminator !== undefined) {
- const ps = jtdDiscriminator === undefined ? props : [jtdDiscriminator].concat(props);
+ if (jtdDiscriminator !== void 0) additional = (0, codegen_1.and)(additional, (0, codegen_1._)`${key} !== ${jtdDiscriminator}`);
+ } else if (props.length || jtdDiscriminator !== void 0) {
+ const ps = jtdDiscriminator === void 0 ? props : [jtdDiscriminator].concat(props);
additional = (0, codegen_1.and)(...ps.map((p) => (0, codegen_1._)`${key} !== ${p}`));
- } else {
- additional = true;
- }
+ } else additional = true;
return additional;
}
}
exports.validateProperties = validateProperties;
exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js
var require_optionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
const properties_1 = require_properties();
- const def = {
+ exports.default = {
keyword: "optionalProperties",
schemaType: "object",
error: properties_1.error,
@@ -104941,9 +95738,7 @@ var require_optionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
(0, properties_1.validateProperties)(cxt);
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/discriminator.js
var require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -104953,21 +95748,20 @@ var require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {
const nullable_1 = require_nullable();
const error_1 = require_error$1();
const types_1 = require_types$4();
- const error = {
- message: (cxt) => {
- const { schema, params } = cxt;
- return params.discrError ? params.discrError === types_1.DiscrError.Tag ? `tag "${schema}" must be string` : `value of tag "${schema}" must be in mapping` : (0, error_1.typeErrorMessage)(cxt, "object");
- },
- params: (cxt) => {
- const { schema, params } = cxt;
- return params.discrError ? (0, codegen_1._)`{error: ${params.discrError}, tag: ${schema}, tagValue: ${params.tag}}` : (0, error_1.typeErrorParams)(cxt, "object");
- }
- };
- const def = {
+ exports.default = {
keyword: "discriminator",
schemaType: "string",
implements: ["mapping"],
- error,
+ error: {
+ message: (cxt) => {
+ const { schema, params } = cxt;
+ return params.discrError ? params.discrError === types_1.DiscrError.Tag ? `tag "${schema}" must be string` : `value of tag "${schema}" must be in mapping` : (0, error_1.typeErrorMessage)(cxt, "object");
+ },
+ params: (cxt) => {
+ const { schema, params } = cxt;
+ return params.discrError ? (0, codegen_1._)`{error: ${params.discrError}, tag: ${schema}, tagValue: ${params.tag}}` : (0, error_1.typeErrorParams)(cxt, "object");
+ }
+ },
code(cxt) {
(0, metadata_1.checkMetadata)(cxt);
const { gen, data, schema, parentSchema } = cxt;
@@ -105022,9 +95816,7 @@ var require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/values.js
var require_values = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105033,18 +95825,16 @@ var require_values = /* @__PURE__ */ __commonJSMin(((exports) => {
const codegen_1 = require_codegen();
const metadata_1 = require_metadata();
const nullable_1 = require_nullable();
- const error_1 = require_error$1();
- const def = {
+ exports.default = {
keyword: "values",
schemaType: "object",
- error: (0, error_1.typeError)("object"),
+ error: (0, require_error$1().typeError)("object"),
code(cxt) {
(0, metadata_1.checkMetadata)(cxt);
const { gen, data, schema, it } = cxt;
const [valid, cond] = (0, nullable_1.checkNullableObject)(cxt, data);
- if ((0, util_1.alwaysValidSchema)(it, schema)) {
- gen.if((0, codegen_1.not)((0, codegen_1.or)(cond, valid)), () => cxt.error());
- } else {
+ if ((0, util_1.alwaysValidSchema)(it, schema)) gen.if((0, codegen_1.not)((0, codegen_1.or)(cond, valid)), () => cxt.error());
+ else {
gen.if(cond);
gen.assign(valid, validateMap());
gen.elseIf((0, codegen_1.not)(valid));
@@ -105075,24 +95865,19 @@ var require_values = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/union.js
var require_union = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- const code_1 = require_code();
- const def = {
+ exports.default = {
keyword: "union",
schemaType: "array",
trackErrors: true,
- code: code_1.validateUnion,
+ code: require_code().validateUnion,
error: { message: "must match a schema in union" }
};
- exports.default = def;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/vocabularies/jtd/index.js
var require_jtd$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105107,7 +95892,7 @@ var require_jtd$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
const values_1 = require_values();
const union_1 = require_union();
const metadata_1 = require_metadata();
- const jtdVocabulary = [
+ exports.default = [
"definitions",
ref_1.default,
type_1.default,
@@ -105128,9 +95913,7 @@ var require_jtd$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
schemaType: "boolean"
}
];
- exports.default = jtdVocabulary;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/refs/jtd-schema.js
var require_jtd_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105212,13 +95995,11 @@ var require_jtd_schema = /* @__PURE__ */ __commonJSMin(((exports) => {
discriminatorForm,
valuesForm
].map((s) => s(root)) } });
- const jtdMetaSchema = {
+ exports.default = {
definitions: { schema: schema(false) },
...schema(true)
};
- exports.default = jtdMetaSchema;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/jtd/types.js
var require_types$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105235,7 +96016,6 @@ var require_types$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
"ref"
];
}));
-
//#endregion
//#region ../node_modules/ajv/dist/runtime/quote.js
var require_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105260,7 +96040,6 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.default = quote;
quote.code = "require(\"ajv/dist/runtime/quote\").default";
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/jtd/serialize.js
var require_serialize = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105315,8 +96094,7 @@ var require_serialize = /* @__PURE__ */ __commonJSMin(((exports) => {
gen.optimize(this.opts.code.optimize);
const serializeFuncCode = gen.toString();
sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${serializeFuncCode}`;
- const makeSerialize = new Function(`${names_1.default.scope}`, sourceCode);
- const serialize = makeSerialize(this.scope.get());
+ const serialize = new Function(`${names_1.default.scope}`, sourceCode)(this.scope.get());
this.scope.value(serializeName, { ref: serialize });
sch.serialize = serialize;
} catch (e) {
@@ -105332,11 +96110,9 @@ var require_serialize = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.default = compileSerializer;
function serializeCode(cxt) {
let form;
- for (const key of types_1.jtdForms) {
- if (key in cxt.schema) {
- form = key;
- break;
- }
+ for (const key of types_1.jtdForms) if (key in cxt.schema) {
+ form = key;
+ break;
}
serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty);
}
@@ -105429,17 +96205,13 @@ var require_serialize = /* @__PURE__ */ __commonJSMin(((exports) => {
serializeProperty(key, optionalProperties[key], value);
});
}
- if (schema.additionalProperties) {
- gen.forIn("key", data, (key) => gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, firstProp)));
- }
+ if (schema.additionalProperties) gen.forIn("key", data, (key) => gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, firstProp)));
function keys(ps) {
return ps ? Object.keys(ps) : [];
}
function allProperties(ps) {
if (discriminator) ps.push(discriminator);
- if (new Set(ps).size !== ps.length) {
- throw new Error("JTD: properties/optionalProperties/disciminator overlap");
- }
+ if (new Set(ps).size !== ps.length) throw new Error("JTD: properties/optionalProperties/disciminator overlap");
return ps;
}
function keyValue(key) {
@@ -105501,14 +96273,10 @@ var require_serialize = /* @__PURE__ */ __commonJSMin(((exports) => {
gen.add(names_1.default.json, (0, codegen_1._)`JSON.stringify(${data})`);
}
function addComma({ gen }, first) {
- if (first) {
- gen.if(first, () => gen.assign(first, false), () => gen.add(names_1.default.json, (0, codegen_1.str)`,`));
- } else {
- gen.add(names_1.default.json, (0, codegen_1.str)`,`);
- }
+ if (first) gen.if(first, () => gen.assign(first, false), () => gen.add(names_1.default.json, (0, codegen_1.str)`,`));
+ else gen.add(names_1.default.json, (0, codegen_1.str)`,`);
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/runtime/parseJson.js
var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105517,7 +96285,7 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
const rxParseJson = /position\s(\d+)(?: \(line \d+ column \d+\))?$/;
function parseJson(s, pos) {
let endPos;
- parseJson.message = undefined;
+ parseJson.message = void 0;
let matches;
if (pos) s = s.slice(pos);
try {
@@ -105527,7 +96295,7 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
matches = rxParseJson.exec(e.message);
if (!matches) {
parseJson.message = "unexpected end";
- return undefined;
+ return;
}
endPos = +matches[1];
const c = s[endPos];
@@ -105537,18 +96305,18 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
return JSON.parse(s);
} catch (e1) {
parseJson.message = `unexpected token ${c}`;
- return undefined;
+ return;
}
}
}
exports.parseJson = parseJson;
- parseJson.message = undefined;
+ parseJson.message = void 0;
parseJson.position = 0;
parseJson.code = "require(\"ajv/dist/runtime/parseJson\").parseJson";
function parseJsonNumber(s, pos, maxDigits) {
let numStr = "";
let c;
- parseJsonNumber.message = undefined;
+ parseJsonNumber.message = void 0;
if (s[pos] === "-") {
numStr += "-";
pos++;
@@ -105556,11 +96324,9 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
if (s[pos] === "0") {
numStr += "0";
pos++;
- } else {
- if (!parseDigits(maxDigits)) {
- errorMessage();
- return undefined;
- }
+ } else if (!parseDigits(maxDigits)) {
+ errorMessage();
+ return;
}
if (maxDigits) {
parseJsonNumber.position = pos;
@@ -105571,7 +96337,7 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
pos++;
if (!parseDigits()) {
errorMessage();
- return undefined;
+ return;
}
}
if (c = s[pos], c === "e" || c === "E") {
@@ -105583,14 +96349,14 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
}
if (!parseDigits()) {
errorMessage();
- return undefined;
+ return;
}
}
parseJsonNumber.position = pos;
return +numStr;
function parseDigits(maxLen) {
let digit = false;
- while (c = s[pos], c >= "0" && c <= "9" && (maxLen === undefined || maxLen-- > 0)) {
+ while (c = s[pos], c >= "0" && c <= "9" && (maxLen === void 0 || maxLen-- > 0)) {
digit = true;
numStr += c;
pos++;
@@ -105603,7 +96369,7 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
exports.parseJsonNumber = parseJsonNumber;
- parseJsonNumber.message = undefined;
+ parseJsonNumber.message = void 0;
parseJsonNumber.position = 0;
parseJsonNumber.code = "require(\"ajv/dist/runtime/parseJson\").parseJsonNumber";
const escapedChars = {
@@ -105621,7 +96387,7 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
function parseJsonString(s, pos) {
let str = "";
let c;
- parseJsonString.message = undefined;
+ parseJsonString.message = void 0;
while (true) {
c = s[pos++];
if (c === "\"") break;
@@ -105637,36 +96403,31 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
while (count--) {
code <<= 4;
c = s[pos];
- if (c === undefined) {
+ if (c === void 0) {
errorMessage("unexpected end");
- return undefined;
+ return;
}
c = c.toLowerCase();
- if (c >= "a" && c <= "f") {
- code += c.charCodeAt(0) - CODE_A + 10;
- } else if (c >= "0" && c <= "9") {
- code += c.charCodeAt(0) - CODE_0;
- } else {
+ if (c >= "a" && c <= "f") code += c.charCodeAt(0) - CODE_A + 10;
+ else if (c >= "0" && c <= "9") code += c.charCodeAt(0) - CODE_0;
+ else {
errorMessage(`unexpected token ${c}`);
- return undefined;
+ return;
}
pos++;
}
str += String.fromCharCode(code);
} else {
errorMessage(`unexpected token ${c}`);
- return undefined;
+ return;
}
- } else if (c === undefined) {
+ } else if (c === void 0) {
errorMessage("unexpected end");
- return undefined;
- } else {
- if (c.charCodeAt(0) >= 32) {
- str += c;
- } else {
- errorMessage(`unexpected token ${c}`);
- return undefined;
- }
+ return;
+ } else if (c.charCodeAt(0) >= 32) str += c;
+ else {
+ errorMessage(`unexpected token ${c}`);
+ return;
}
}
parseJsonString.position = pos;
@@ -105677,11 +96438,10 @@ var require_parseJson = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
exports.parseJsonString = parseJsonString;
- parseJsonString.message = undefined;
+ parseJsonString.message = void 0;
parseJsonString.position = 0;
parseJsonString.code = "require(\"ajv/dist/runtime/parseJson\").parseJsonString";
}));
-
//#endregion
//#region ../node_modules/ajv/dist/compile/jtd/parse.js
var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -105736,8 +96496,7 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
gen.optimize(this.opts.code.optimize);
const parseFuncCode = gen.toString();
sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${parseFuncCode}`;
- const makeParse = new Function(`${names_1.default.scope}`, sourceCode);
- const parse = makeParse(this.scope.get());
+ const parse = new Function(`${names_1.default.scope}`, sourceCode)(this.scope.get());
this.scope.value(parseName, { ref: parse });
sch.parse = parse;
} catch (e) {
@@ -105773,11 +96532,9 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
function parseCode(cxt) {
let form;
- for (const key of types_1.jtdForms) {
- if (key in cxt.schema) {
- form = key;
- break;
- }
+ for (const key of types_1.jtdForms) if (key in cxt.schema) {
+ form = key;
+ break;
}
if (form) parseNullable(cxt, genParse[form]);
else parseEmpty(cxt);
@@ -105902,14 +96659,11 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
});
}
gen.else();
- if (additionalProperties) {
- parseEmpty({
- ...cxt,
- data: (0, codegen_1._)`${data}[${key}]`
- });
- } else {
- parsingError(cxt, (0, codegen_1.str)`property ${key} not allowed`);
- }
+ if (additionalProperties) parseEmpty({
+ ...cxt,
+ data: (0, codegen_1._)`${data}[${key}]`
+ });
+ else parsingError(cxt, (0, codegen_1.str)`property ${key} not allowed`);
gen.endIf();
});
if (properties) {
@@ -105958,9 +96712,7 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
const t = schema.type;
if (!self.opts.int32range && (t === "int32" || t === "uint32")) {
parseNumber(cxt, 16);
- if (t === "uint32") {
- gen.if((0, codegen_1._)`${data} < 0`, () => parsingError(cxt, (0, codegen_1.str)`integer out of range`));
- }
+ if (t === "uint32") gen.if((0, codegen_1._)`${data} < 0`, () => parsingError(cxt, (0, codegen_1.str)`integer out of range`));
} else {
const [min, max, maxDigits] = type_1.intRange[t];
parseNumber(cxt, maxDigits);
@@ -106009,11 +96761,10 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
schema: refSchema
});
const { root } = schemaEnv;
- const sch = compileParser.call(self, new __1.SchemaEnv({
+ partialParse(cxt, getParser(gen, compileParser.call(self, new __1.SchemaEnv({
schema: refSchema,
root
- }), definitions);
- partialParse(cxt, getParser(gen, sch), true);
+ }), definitions)), true);
}
function getParser(gen, sch) {
return sch.parse ? gen.scopeValue("parse", { ref: sch.parse }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.parse`;
@@ -106039,7 +96790,7 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
skipWhitespace(cxt);
gen.if((0, codegen_1._)`${jsonSlice(n)} === ${tok}`, () => {
gen.add(names_1.default.jsonPos, n);
- success === null || success === void 0 ? void 0 : success(cxt);
+ success === null || success === void 0 || success(cxt);
}, () => fail(cxt));
}
function skipWhitespace({ gen, char: c }) {
@@ -106057,7 +96808,6 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
gen.return(undef);
}
}));
-
//#endregion
//#region ../node_modules/ajv/dist/jtd.js
var require_jtd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106086,7 +96836,7 @@ var require_jtd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.addMetaSchema(jtd_schema_1.default, META_SCHEMA_ID, false);
}
defaultMeta() {
- return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined);
+ return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
}
compileSerializer(schema) {
const sch = this._addSchema(schema);
@@ -106173,7 +96923,6 @@ var require_jtd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
});
}));
-
//#endregion
//#region ../node_modules/@fastify/ajv-compiler/lib/default-ajv-options.js
var require_default_ajv_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106187,7 +96936,6 @@ var require_default_ajv_options = /* @__PURE__ */ __commonJSMin(((exports, modul
allErrors: false
});
}));
-
//#endregion
//#region ../node_modules/ajv-formats/dist/formats.js
var require_formats$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -106275,7 +97023,7 @@ var require_formats$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
}
function compareDate(d1, d2) {
- if (!(d1 && d2)) return undefined;
+ if (!(d1 && d2)) return void 0;
if (d1 > d2) return 1;
if (d1 < d2) return -1;
return 0;
@@ -106291,10 +97039,10 @@ var require_formats$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
return (hour <= 23 && minute <= 59 && second <= 59 || hour === 23 && minute === 59 && second === 60) && (!withTimeZone || timeZone !== "");
}
function compareTime(t1, t2) {
- if (!(t1 && t2)) return undefined;
+ if (!(t1 && t2)) return void 0;
const a1 = TIME.exec(t1);
const a2 = TIME.exec(t2);
- if (!(a1 && a2)) return undefined;
+ if (!(a1 && a2)) return void 0;
t1 = a1[1] + a1[2] + a1[3] + (a1[4] || "");
t2 = a2[1] + a2[2] + a2[3] + (a2[4] || "");
if (t1 > t2) return 1;
@@ -106307,11 +97055,11 @@ var require_formats$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1], true);
}
function compareDateTime(dt1, dt2) {
- if (!(dt1 && dt2)) return undefined;
+ if (!(dt1 && dt2)) return void 0;
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
const res = compareDate(d1, d2);
- if (res === undefined) return undefined;
+ if (res === void 0) return void 0;
return res || compareTime(t1, t2);
}
const NOT_URI_FRAGMENT = /\/|:/;
@@ -106346,7 +97094,6 @@ var require_formats$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
}));
-
//#endregion
//#region ../node_modules/ajv-formats/dist/limit.js
var require_limit = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -106377,16 +97124,15 @@ var require_limit = /* @__PURE__ */ __commonJSMin(((exports) => {
fail: ops.LTE
}
};
- const error = {
- message: ({ keyword, schemaCode }) => codegen_1.str`should be ${KWDs[keyword].okStr} ${schemaCode}`,
- params: ({ keyword, schemaCode }) => codegen_1._`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
- };
exports.formatLimitDefinition = {
keyword: Object.keys(KWDs),
type: "string",
schemaType: "string",
$data: true,
- error,
+ error: {
+ message: ({ keyword, schemaCode }) => codegen_1.str`should be ${KWDs[keyword].okStr} ${schemaCode}`,
+ params: ({ keyword, schemaCode }) => codegen_1._`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
+ },
code(cxt) {
const { gen, data, schemaCode, keyword, it } = cxt;
const { opts, self } = it;
@@ -106406,13 +97152,11 @@ var require_limit = /* @__PURE__ */ __commonJSMin(((exports) => {
const format = fCxt.schema;
const fmtDef = self.formats[format];
if (!fmtDef || fmtDef === true) return;
- if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
- throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
- }
+ if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
const fmt = gen.scopeValue("formats", {
key: format,
ref: fmtDef,
- code: opts.code.formats ? codegen_1._`${opts.code.formats}${codegen_1.getProperty(format)}` : undefined
+ code: opts.code.formats ? codegen_1._`${opts.code.formats}${codegen_1.getProperty(format)}` : void 0
});
cxt.fail$data(compareCode(fmt));
}
@@ -106428,7 +97172,6 @@ var require_limit = /* @__PURE__ */ __commonJSMin(((exports) => {
};
exports.default = formatLimitPlugin;
}));
-
//#endregion
//#region ../node_modules/ajv-formats/dist/index.js
var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106444,28 +97187,25 @@ var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return ajv;
}
const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
- const list = opts.formats || formats_1.formatNames;
- addFormats(ajv, list, formats, exportName);
+ addFormats(ajv, opts.formats || formats_1.formatNames, formats, exportName);
if (opts.keywords) limit_1.default(ajv);
return ajv;
};
formatsPlugin.get = (name, mode = "full") => {
- const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
- const f = formats[name];
+ const f = (mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats)[name];
if (!f) throw new Error(`Unknown format "${name}"`);
return f;
};
function addFormats(ajv, list, fs, exportName) {
var _a;
var _b;
- (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`;
+ (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 || (_b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`);
for (const f of list) ajv.addFormat(f, fs[f]);
}
module.exports = exports = formatsPlugin;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = formatsPlugin;
}));
-
//#endregion
//#region ../node_modules/@fastify/ajv-compiler/lib/validator-compiler.js
var require_validator_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106474,45 +97214,31 @@ var require_validator_compiler = /* @__PURE__ */ __commonJSMin(((exports, module
const defaultAjvOptions = require_default_ajv_options();
var ValidatorCompiler = class {
constructor(externalSchemas, options) {
- if (options.mode === "JTD") {
- this.ajv = new AjvJTD(Object.assign({}, defaultAjvOptions, options.customOptions));
- } else {
- this.ajv = new Ajv(Object.assign({}, defaultAjvOptions, options.customOptions));
- }
+ if (options.mode === "JTD") this.ajv = new AjvJTD(Object.assign({}, defaultAjvOptions, options.customOptions));
+ else this.ajv = new Ajv(Object.assign({}, defaultAjvOptions, options.customOptions));
let addFormatPlugin = true;
- if (options.plugins && options.plugins.length > 0) {
- for (const plugin of options.plugins) {
- if (Array.isArray(plugin)) {
- addFormatPlugin = addFormatPlugin && plugin[0].name !== "formatsPlugin";
- plugin[0](this.ajv, plugin[1]);
- } else {
- addFormatPlugin = addFormatPlugin && plugin.name !== "formatsPlugin";
- plugin(this.ajv);
- }
- }
- }
- if (addFormatPlugin) {
- require_dist$2()(this.ajv);
+ if (options.plugins && options.plugins.length > 0) for (const plugin of options.plugins) if (Array.isArray(plugin)) {
+ addFormatPlugin = addFormatPlugin && plugin[0].name !== "formatsPlugin";
+ plugin[0](this.ajv, plugin[1]);
+ } else {
+ addFormatPlugin = addFormatPlugin && plugin.name !== "formatsPlugin";
+ plugin(this.ajv);
}
+ if (addFormatPlugin) require_dist$2()(this.ajv);
options.onCreate?.(this.ajv);
const sourceSchemas = Object.values(externalSchemas);
- for (const extSchema of sourceSchemas) {
- this.ajv.addSchema(extSchema);
- }
+ for (const extSchema of sourceSchemas) this.ajv.addSchema(extSchema);
}
buildValidatorFunction({ schema }) {
if (schema.$id) {
const stored = this.ajv.getSchema(schema.$id);
- if (stored) {
- return stored;
- }
+ if (stored) return stored;
}
return this.ajv.compile(schema);
}
};
module.exports = ValidatorCompiler;
}));
-
//#endregion
//#region ../node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js
var require_serializer_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106537,7 +97263,6 @@ var require_serializer_compiler = /* @__PURE__ */ __commonJSMin(((exports, modul
};
module.exports = SerializerCompiler;
}));
-
//#endregion
//#region ../node_modules/ajv/dist/standalone/index.js
var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106545,11 +97270,9 @@ var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const scope_1 = require_scope();
const code_1 = require_code$1();
function standaloneCode(ajv, refsOrFunc) {
- if (!ajv.opts.code.source) {
- throw new Error("moduleCode: ajv instance must have code.source option");
- }
+ if (!ajv.opts.code.source) throw new Error("moduleCode: ajv instance must have code.source option");
const { _n } = ajv.scope.opts;
- return typeof refsOrFunc == "function" ? funcExportCode(refsOrFunc.source) : refsOrFunc !== undefined ? multiExportsCode(refsOrFunc, getValidate) : multiExportsCode(ajv.schemas, (sch) => sch.meta ? undefined : ajv.compile(sch.schema));
+ return typeof refsOrFunc == "function" ? funcExportCode(refsOrFunc.source) : refsOrFunc !== void 0 ? multiExportsCode(refsOrFunc, getValidate) : multiExportsCode(ajv.schemas, (sch) => sch.meta ? void 0 : ajv.compile(sch.schema));
function getValidate(id) {
const v = ajv.getSchema(id);
if (!v) throw new Error(`moduleCode: no schema with id ${id}`);
@@ -106559,9 +97282,7 @@ var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const usedValues = {};
const n = source === null || source === void 0 ? void 0 : source.validateName;
const vCode = validateCode(usedValues, source);
- if (ajv.opts.code.esm) {
- return `"use strict";${_n}export const validate = ${n};${_n}export default ${n};${_n}${vCode}`;
- }
+ if (ajv.opts.code.esm) return `"use strict";${_n}export const validate = ${n};${_n}export default ${n};${_n}${vCode}`;
return `"use strict";${_n}module.exports = ${n};${_n}module.exports.default = ${n};${_n}${vCode}`;
}
function multiExportsCode(schemas, getValidateFunc) {
@@ -106588,10 +97309,8 @@ var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function refValidateCode(n) {
var _a;
const vRef = (_a = n.value) === null || _a === void 0 ? void 0 : _a.ref;
- if (n.prefix === "validate" && typeof vRef == "function") {
- const v = vRef;
- return validateCode(usedValues, v.source);
- } else if ((n.prefix === "root" || n.prefix === "wrapper") && typeof vRef == "object") {
+ if (n.prefix === "validate" && typeof vRef == "function") return validateCode(usedValues, vRef.source);
+ else if ((n.prefix === "root" || n.prefix === "wrapper") && typeof vRef == "object") {
const { validate, validateName } = vRef;
if (!validateName) throw new Error("ajv internal error");
const def = ajv.opts.code.es5 ? scope_1.varKinds.var : scope_1.varKinds.const;
@@ -106600,7 +97319,6 @@ var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const vCode = validateCode(usedValues, validate === null || validate === void 0 ? void 0 : validate.source);
return (0, code_1._)`${wrapper}${_n}${vCode}`;
}
- return undefined;
}
function usedState(name) {
var _a;
@@ -106608,8 +97326,7 @@ var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function setUsedState(name, state) {
const { prefix } = name;
- const names = usedValues[prefix] = usedValues[prefix] || new Map();
- names.set(name, state);
+ (usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map()).set(name, state);
}
}
}
@@ -106617,31 +97334,22 @@ var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = standaloneCode;
}));
-
//#endregion
//#region ../node_modules/@fastify/ajv-compiler/standalone.js
var require_standalone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const ValidatorSelector = require_ajv_compiler();
const standaloneCode = require_standalone$1().default;
function StandaloneValidator(options = { readMode: true }) {
- if (options.readMode === true && !options.restoreFunction) {
- throw new Error("You must provide a restoreFunction options when readMode ON");
- }
- if (options.readMode !== true && !options.storeFunction) {
- throw new Error("You must provide a storeFunction options when readMode OFF");
- }
- if (options.readMode === true) {
- return function wrapper() {
- return function(opts) {
- return options.restoreFunction(opts);
- };
+ if (options.readMode === true && !options.restoreFunction) throw new Error("You must provide a restoreFunction options when readMode ON");
+ if (options.readMode !== true && !options.storeFunction) throw new Error("You must provide a storeFunction options when readMode OFF");
+ if (options.readMode === true) return function wrapper() {
+ return function(opts) {
+ return options.restoreFunction(opts);
};
- }
+ };
const factory = ValidatorSelector();
return function wrapper(externalSchemas, ajvOptions = {}) {
- if (!ajvOptions.customOptions || !ajvOptions.customOptions.code) {
- ajvOptions.customOptions = Object.assign({}, ajvOptions.customOptions, { code: { source: true } });
- }
+ if (!ajvOptions.customOptions || !ajvOptions.customOptions.code) ajvOptions.customOptions = Object.assign({}, ajvOptions.customOptions, { code: { source: true } });
const compiler = factory(externalSchemas, ajvOptions);
return function(opts) {
const validationFunc = compiler(opts);
@@ -106653,7 +97361,6 @@ var require_standalone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = StandaloneValidator;
}));
-
//#endregion
//#region ../node_modules/@fastify/ajv-compiler/index.js
var require_ajv_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106661,38 +97368,28 @@ var require_ajv_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const ValidatorCompiler = require_validator_compiler();
const SerializerCompiler = require_serializer_compiler();
function AjvCompiler(opts) {
- const validatorPool = new Map();
- const serializerPool = new Map();
- if (opts && opts.jtdSerializer === true) {
- return function buildSerializerFromPool(externalSchemas, serializerOpts) {
- const uniqueAjvKey = getPoolKey({}, serializerOpts);
- if (serializerPool.has(uniqueAjvKey)) {
- return serializerPool.get(uniqueAjvKey);
- }
- const compiler = new SerializerCompiler(externalSchemas, serializerOpts);
- const ret = compiler.buildSerializerFunction.bind(compiler);
- serializerPool.set(uniqueAjvKey, ret);
- return ret;
- };
- }
+ const validatorPool = /* @__PURE__ */ new Map();
+ const serializerPool = /* @__PURE__ */ new Map();
+ if (opts && opts.jtdSerializer === true) return function buildSerializerFromPool(externalSchemas, serializerOpts) {
+ const uniqueAjvKey = getPoolKey({}, serializerOpts);
+ if (serializerPool.has(uniqueAjvKey)) return serializerPool.get(uniqueAjvKey);
+ const compiler = new SerializerCompiler(externalSchemas, serializerOpts);
+ const ret = compiler.buildSerializerFunction.bind(compiler);
+ serializerPool.set(uniqueAjvKey, ret);
+ return ret;
+ };
return function buildCompilerFromPool(externalSchemas, options) {
const uniqueAjvKey = getPoolKey(externalSchemas, options.customOptions);
- if (validatorPool.has(uniqueAjvKey)) {
- return validatorPool.get(uniqueAjvKey);
- }
+ if (validatorPool.has(uniqueAjvKey)) return validatorPool.get(uniqueAjvKey);
const compiler = new ValidatorCompiler(externalSchemas, options);
const ret = compiler.buildValidatorFunction.bind(compiler);
validatorPool.set(uniqueAjvKey, ret);
- if (options.customOptions.code !== undefined) {
- ret[AjvReference] = compiler;
- }
+ if (options.customOptions.code !== void 0) ret[AjvReference] = compiler;
return ret;
};
}
function getPoolKey(externalSchemas, options) {
- const externals = JSON.stringify(externalSchemas);
- const ajvConfig = JSON.stringify(options);
- return `${externals}${ajvConfig}`;
+ return `${JSON.stringify(externalSchemas)}${JSON.stringify(options)}`;
}
module.exports = AjvCompiler;
module.exports.default = AjvCompiler;
@@ -106700,7 +97397,6 @@ var require_ajv_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.AjvReference = AjvReference;
module.exports.StandaloneValidator = require_standalone();
}));
-
//#endregion
//#region ../node_modules/fastify/lib/schema-controller.js
var require_schema_controller = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106714,26 +97410,19 @@ var require_schema_controller = /* @__PURE__ */ __commonJSMin(((exports, module)
* @return {object}:a new SchemaController
*/
function buildSchemaController(parentSchemaCtrl, opts) {
- if (parentSchemaCtrl) {
- return new SchemaController(parentSchemaCtrl, opts);
- }
+ if (parentSchemaCtrl) return new SchemaController(parentSchemaCtrl, opts);
const compilersFactory = Object.assign({
buildValidator: null,
buildSerializer: null
}, opts?.compilersFactory);
- if (!compilersFactory.buildValidator) {
- compilersFactory.buildValidator = ValidatorSelector();
- }
- if (!compilersFactory.buildSerializer) {
- compilersFactory.buildSerializer = SerializerSelector();
- }
- const option = {
+ if (!compilersFactory.buildValidator) compilersFactory.buildValidator = ValidatorSelector();
+ if (!compilersFactory.buildSerializer) compilersFactory.buildSerializer = SerializerSelector();
+ return new SchemaController(void 0, {
bucket: opts && opts.bucket || buildSchemas,
compilersFactory,
isCustomValidatorCompiler: typeof opts?.compilersFactory?.buildValidator === "function",
isCustomSerializerCompiler: typeof opts?.compilersFactory?.buildValidator === "function"
- };
- return new SchemaController(undefined, option);
+ });
}
var SchemaController = class {
constructor(parent, options) {
@@ -106791,10 +97480,7 @@ var require_schema_controller = /* @__PURE__ */ __commonJSMin(((exports, module)
* @param {object} serverOptions the fastify server options
*/
setupValidator(serverOptions) {
- const isReady = this.validatorCompiler !== undefined && !this.addedSchemas;
- if (isReady) {
- return;
- }
+ if (this.validatorCompiler !== void 0 && !this.addedSchemas) return;
this.validatorCompiler = this.getValidatorBuilder()(this.schemaBucket.getSchemas(), serverOptions.ajv);
}
/**
@@ -106803,17 +97489,13 @@ var require_schema_controller = /* @__PURE__ */ __commonJSMin(((exports, module)
* @param {object} serverOptions the fastify server options
*/
setupSerializer(serverOptions) {
- const isReady = this.serializerCompiler !== undefined && !this.addedSchemas;
- if (isReady) {
- return;
- }
+ if (this.serializerCompiler !== void 0 && !this.addedSchemas) return;
this.serializerCompiler = this.getSerializerBuilder()(this.schemaBucket.getSchemas(), serverOptions.serializerOpts);
}
};
SchemaController.buildSchemaController = buildSchemaController;
module.exports = SchemaController;
}));
-
//#endregion
//#region ../node_modules/fastify/lib/pluginUtils.js
var require_pluginUtils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106829,22 +97511,16 @@ var require_pluginUtils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function getPluginName(func) {
const display = getDisplayName(func);
- if (display) {
- return display;
- }
+ if (display) return display;
const cache = __require.cache;
if (cache) {
const keys = Object.keys(cache);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
- if (cache[key].exports === func) {
- return key;
- }
+ if (cache[key].exports === func) return key;
}
}
- if (func.name) {
- return func.name;
- }
+ if (func.name) return func.name;
return null;
}
function getFuncPreview(func) {
@@ -106884,9 +97560,7 @@ var require_pluginUtils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
assert$41(Array.isArray(decorators), "The decorators should be an array of strings");
decorators.forEach((decorator) => {
const withPluginName = typeof name === "string" ? ` required by '${name}'` : "";
- if (!checks[instance].call(that, decorator)) {
- throw new FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE(decorator, withPluginName, instance);
- }
+ if (!checks[instance].call(that, decorator)) throw new FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE(decorator, withPluginName, instance);
});
}
function checkVersion(fn) {
@@ -106894,12 +97568,8 @@ var require_pluginUtils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (!meta) return;
const requiredVersion = meta.fastify;
const fastifyRc = /-rc.+$/.test(this.version);
- if (fastifyRc === true && semver.gt(this.version, semver.coerce(requiredVersion)) === true) {
- return;
- }
- if (requiredVersion && semver.satisfies(this.version, requiredVersion, { includePrerelease: fastifyRc }) === false) {
- throw new FST_ERR_PLUGIN_VERSION_MISMATCH(meta.name, requiredVersion, this.version);
- }
+ if (fastifyRc === true && semver.gt(this.version, semver.coerce(requiredVersion)) === true) return;
+ if (requiredVersion && semver.satisfies(this.version, requiredVersion, { includePrerelease: fastifyRc }) === false) throw new FST_ERR_PLUGIN_VERSION_MISMATCH(meta.name, requiredVersion, this.version);
}
function registerPluginName(fn) {
const meta = getMeta(fn);
@@ -106910,9 +97580,7 @@ var require_pluginUtils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return name;
}
function checkPluginHealthiness(fn, pluginName) {
- if (fn.constructor.name === "AsyncFunction" && fn.length === 3) {
- FSTWRN002(pluginName || "anonymous");
- }
+ if (fn.constructor.name === "AsyncFunction" && fn.length === 3) FSTWRN002(pluginName || "anonymous");
}
function registerPlugin(fn) {
const pluginName = registerPluginName.call(this, fn) || getPluginName(fn);
@@ -106936,7 +97604,6 @@ var require_pluginUtils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
checkDependencies
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/reqIdGenFactory.js
var require_reqIdGenFactory = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -106952,9 +97619,7 @@ var require_reqIdGenFactory = /* @__PURE__ */ __commonJSMin(((exports, module) =
*/
function reqIdGenFactory(requestIdHeader, optGenReqId) {
const genReqId = optGenReqId || buildDefaultGenReqId();
- if (requestIdHeader) {
- return buildOptionalHeaderReqId(requestIdHeader, genReqId);
- }
+ if (requestIdHeader) return buildOptionalHeaderReqId(requestIdHeader, genReqId);
return genReqId;
}
function getGenReqId(contextServer, req) {
@@ -106978,7 +97643,6 @@ var require_reqIdGenFactory = /* @__PURE__ */ __commonJSMin(((exports, module) =
reqIdGenFactory
};
}));
-
//#endregion
//#region ../node_modules/fast-decode-uri-component/index.js
var require_fast_decode_uri_component = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -107372,9 +98036,7 @@ var require_fast_decode_uri_component = /* @__PURE__ */ __commonJSMin(((exports,
var startOfOctets = percentPosition;
var state = UTF8_ACCEPT;
while (percentPosition > -1 && percentPosition < length) {
- var high = hexCodeToInt(uri[percentPosition + 1], 4);
- var low = hexCodeToInt(uri[percentPosition + 2], 0);
- var byte = high | low;
+ var byte = hexCodeToInt(uri[percentPosition + 1], 4) | hexCodeToInt(uri[percentPosition + 2], 0);
var type = UTF8_DATA[byte];
state = UTF8_DATA[256 + state + type];
codepoint = codepoint << 6 | byte & UTF8_DATA[364 + type];
@@ -107384,9 +98046,8 @@ var require_fast_decode_uri_component = /* @__PURE__ */ __commonJSMin(((exports,
codepoint = 0;
last = percentPosition + 3;
percentPosition = startOfOctets = uri.indexOf("%", last);
- } else if (state === UTF8_REJECT) {
- return null;
- } else {
+ } else if (state === UTF8_REJECT) return null;
+ else {
percentPosition += 3;
if (percentPosition < length && uri.charCodeAt(percentPosition) === 37) continue;
return null;
@@ -107420,11 +98081,10 @@ var require_fast_decode_uri_component = /* @__PURE__ */ __commonJSMin(((exports,
};
function hexCodeToInt(c, shift) {
var i = HEX[c];
- return i === undefined ? 255 : i << shift;
+ return i === void 0 ? 255 : i << shift;
}
module.exports = decodeURIComponent;
}));
-
//#endregion
//#region ../node_modules/fast-querystring/lib/parse.js
var require_parse$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -107438,9 +98098,7 @@ var require_parse$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function parse(input) {
const result = new Empty();
- if (typeof input !== "string") {
- return result;
- }
+ if (typeof input !== "string") return result;
let inputLength = input.length;
let key = "";
let value = "";
@@ -107456,36 +98114,20 @@ var require_parse$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
c = i !== inputLength ? input.charCodeAt(i) : 38;
if (c === 38) {
hasBothKeyValuePair = equalityIndex > startingIndex;
- if (!hasBothKeyValuePair) {
- equalityIndex = i;
- }
+ if (!hasBothKeyValuePair) equalityIndex = i;
key = input.slice(startingIndex + 1, equalityIndex);
if (hasBothKeyValuePair || key.length > 0) {
- if (keyHasPlus) {
- key = key.replace(plusRegex, " ");
- }
- if (shouldDecodeKey) {
- key = fastDecode(key) || key;
- }
+ if (keyHasPlus) key = key.replace(plusRegex, " ");
+ if (shouldDecodeKey) key = fastDecode(key) || key;
if (hasBothKeyValuePair) {
value = input.slice(equalityIndex + 1, i);
- if (valueHasPlus) {
- value = value.replace(plusRegex, " ");
- }
- if (shouldDecodeValue) {
- value = fastDecode(value) || value;
- }
+ if (valueHasPlus) value = value.replace(plusRegex, " ");
+ if (shouldDecodeValue) value = fastDecode(value) || value;
}
const currentValue = result[key];
- if (currentValue === undefined) {
- result[key] = value;
- } else {
- if (currentValue.pop) {
- currentValue.push(value);
- } else {
- result[key] = [currentValue, value];
- }
- }
+ if (currentValue === void 0) result[key] = value;
+ else if (currentValue.pop) currentValue.push(value);
+ else result[key] = [currentValue, value];
}
value = "";
startingIndex = i;
@@ -107494,31 +98136,17 @@ var require_parse$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
shouldDecodeValue = false;
keyHasPlus = false;
valueHasPlus = false;
- } else if (c === 61) {
- if (equalityIndex <= startingIndex) {
- equalityIndex = i;
- } else {
- shouldDecodeValue = true;
- }
- } else if (c === 43) {
- if (equalityIndex > startingIndex) {
- valueHasPlus = true;
- } else {
- keyHasPlus = true;
- }
- } else if (c === 37) {
- if (equalityIndex > startingIndex) {
- shouldDecodeValue = true;
- } else {
- shouldDecodeKey = true;
- }
- }
+ } else if (c === 61) if (equalityIndex <= startingIndex) equalityIndex = i;
+ else shouldDecodeValue = true;
+ else if (c === 43) if (equalityIndex > startingIndex) valueHasPlus = true;
+ else keyHasPlus = true;
+ else if (c === 37) if (equalityIndex > startingIndex) shouldDecodeValue = true;
+ else shouldDecodeKey = true;
}
return result;
}
module.exports = parse;
}));
-
//#endregion
//#region ../node_modules/fast-querystring/lib/internals/querystring.js
var require_querystring = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -107686,9 +98314,7 @@ var require_querystring = /* @__PURE__ */ __commonJSMin(((exports, module) => {
continue;
}
++i;
- if (i >= len) {
- throw new Error("URI malformed");
- }
+ if (i >= len) throw new Error("URI malformed");
const c2 = str.charCodeAt(i) & 1023;
lastPos = i + 1;
c = 65536 + ((c & 1023) << 10 | c2);
@@ -107700,22 +98326,16 @@ var require_querystring = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = { encodeString };
}));
-
//#endregion
//#region ../node_modules/fast-querystring/lib/stringify.js
var require_stringify$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { encodeString } = require_querystring();
function getAsPrimitive(value) {
const type = typeof value;
- if (type === "string") {
- return encodeString(value);
- } else if (type === "bigint") {
- return value.toString();
- } else if (type === "boolean") {
- return value ? "true" : "false";
- } else if (type === "number" && Number.isFinite(value)) {
- return value < 1e21 ? "" + value : encodeString("" + value);
- }
+ if (type === "string") return encodeString(value);
+ else if (type === "bigint") return value.toString();
+ else if (type === "boolean") return value ? "true" : "false";
+ else if (type === "number" && Number.isFinite(value)) return value < 1e21 ? "" + value : encodeString("" + value);
return "";
}
/**
@@ -107725,9 +98345,7 @@ var require_stringify$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function stringify(input) {
let result = "";
- if (input === null || typeof input !== "object") {
- return result;
- }
+ if (input === null || typeof input !== "object") return result;
const separator = "&";
const keys = Object.keys(input);
const keyLength = keys.length;
@@ -107736,15 +98354,11 @@ var require_stringify$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const key = keys[i];
const value = input[key];
const encodedKey = encodeString(key) + "=";
- if (i) {
- result += separator;
- }
+ if (i) result += separator;
if (Array.isArray(value)) {
valueLength = value.length;
for (let j = 0; j < valueLength; j++) {
- if (j) {
- result += separator;
- }
+ if (j) result += separator;
result += encodedKey;
result += getAsPrimitive(value[j]);
}
@@ -107757,7 +98371,6 @@ var require_stringify$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = stringify;
}));
-
//#endregion
//#region ../node_modules/fast-querystring/lib/index.js
var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -107778,13 +98391,11 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.parse = parse;
module.exports.stringify = stringify;
}));
-
//#endregion
//#region ../node_modules/ret/dist/types/tokens.js
var require_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
}));
-
//#endregion
//#region ../node_modules/ret/dist/types/types.js
var require_types$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -107800,20 +98411,18 @@ var require_types$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
types[types["REPETITION"] = 5] = "REPETITION";
types[types["REFERENCE"] = 6] = "REFERENCE";
types[types["CHAR"] = 7] = "CHAR";
- })(types = exports.types || (exports.types = {}));
+ })(exports.types || (exports.types = {}));
}));
-
//#endregion
//#region ../node_modules/ret/dist/types/set-lookup.js
var require_set_lookup = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
}));
-
//#endregion
//#region ../node_modules/ret/dist/types/index.js
var require_types$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function() {
@@ -107821,7 +98430,7 @@ var require_types$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
});
}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __exportStar = exports && exports.__exportStar || function(m, exports$5) {
@@ -107832,7 +98441,6 @@ var require_types$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
__exportStar(require_types$2(), exports);
__exportStar(require_set_lookup(), exports);
}));
-
//#endregion
//#region ../node_modules/ret/dist/sets.js
var require_sets = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -107982,12 +98590,11 @@ var require_sets = /* @__PURE__ */ __commonJSMin(((exports) => {
not: true
});
}));
-
//#endregion
//#region ../node_modules/ret/dist/util.js
var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function() {
@@ -107995,7 +98602,7 @@ var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
}
});
}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
@@ -108028,11 +98635,8 @@ var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
* @returns {string}
*/
exports.strToChars = (str) => {
- const charsRegex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;
- return str.replace(charsRegex, (s, b, lbs, a16, b16, dctrl, eslsh) => {
- if (lbs) {
- return s;
- }
+ return str.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g, (s, b, lbs, a16, b16, dctrl, eslsh) => {
+ if (lbs) return s;
let code = b ? 8 : a16 ? parseInt(a16, 16) : b16 ? parseInt(b16, 16) : dctrl ? CTRL.indexOf(dctrl) : {
0: 0,
t: 9,
@@ -108066,21 +98670,17 @@ var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
type: types_1.types.CHAR,
value: c.charCodeAt(0)
};
- if (p) {
- tokens.push(p);
- } else {
- return [tokens, regexp.lastIndex];
- }
+ if (p) tokens.push(p);
+ else return [tokens, regexp.lastIndex];
}
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unterminated character class`);
};
}));
-
//#endregion
//#region ../node_modules/ret/dist/tokenizer.js
var require_tokenizer = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function() {
@@ -108088,7 +98688,7 @@ var require_tokenizer = /* @__PURE__ */ __commonJSMin(((exports) => {
}
});
}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
@@ -108134,207 +98734,177 @@ var require_tokenizer = /* @__PURE__ */ __commonJSMin(((exports) => {
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Nothing to repeat at column ${col - 1}`);
};
let str = util.strToChars(regexpStr);
- while (i < str.length) {
- switch (c = str[i++]) {
- case "\\":
- if (i === str.length) {
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: \\ at end of pattern`);
- }
- switch (c = str[i++]) {
- case "b":
- last.push({
- type: types_1.types.POSITION,
- value: "b"
- });
- break;
- case "B":
- last.push({
- type: types_1.types.POSITION,
- value: "B"
- });
- break;
- case "w":
- last.push(sets.words());
- break;
- case "W":
- last.push(sets.notWords());
- break;
- case "d":
- last.push(sets.ints());
- break;
- case "D":
- last.push(sets.notInts());
- break;
- case "s":
- last.push(sets.whitespace());
- break;
- case "S":
- last.push(sets.notWhitespace());
- break;
- default: if (/\d/.test(c)) {
- let digits = c;
- while (i < str.length && /\d/.test(str[i])) {
- digits += str[i++];
- }
- let value = parseInt(digits, 10);
- const reference = {
- type: types_1.types.REFERENCE,
- value
- };
- last.push(reference);
- referenceQueue.push({
- reference,
- stack: last,
- index: last.length - 1
- });
- } else {
- last.push({
- type: types_1.types.CHAR,
- value: c.charCodeAt(0)
- });
- }
- }
- break;
- case "^":
- last.push({
- type: types_1.types.POSITION,
- value: "^"
- });
- break;
- case "$":
- last.push({
- type: types_1.types.POSITION,
- value: "$"
- });
- break;
- case "[": {
- let not;
- if (str[i] === "^") {
- not = true;
- i++;
- } else {
- not = false;
- }
- let classTokens = util.tokenizeClass(str.slice(i), regexpStr);
- i += classTokens[1];
- last.push({
- type: types_1.types.SET,
- set: classTokens[0],
- not
- });
- break;
- }
- case ".":
- last.push(sets.anyChar());
- break;
- case "(": {
- let group = {
- type: types_1.types.GROUP,
- stack: [],
- remember: true
- };
- if (str[i] === "?") {
- c = str[i + 1];
- i += 2;
- if (c === "=") {
- group.followedBy = true;
- } else if (c === "!") {
- group.notFollowedBy = true;
- } else if (c !== ":") {
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid group, character '${c}'` + ` after '?' at column ${i - 1}`);
- }
- group.remember = false;
- } else {
- groupCount += 1;
- }
- last.push(group);
- groupStack.push(lastGroup);
- lastGroup = group;
- last = group.stack;
- break;
- }
- case ")":
- if (groupStack.length === 0) {
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unmatched ) at column ${i - 1}`);
- }
- lastGroup = groupStack.pop();
- last = lastGroup.options ? lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack;
- break;
- case "|": {
- if (!lastGroup.options) {
- lastGroup.options = [lastGroup.stack];
- delete lastGroup.stack;
- }
- let stack = [];
- lastGroup.options.push(stack);
- last = stack;
- break;
- }
- case "{": {
- let rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max;
- if (rs !== null) {
- if (last.length === 0) {
- repeatErr(i);
- }
- min = parseInt(rs[1], 10);
- max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min;
- i += rs[0].length;
+ while (i < str.length) switch (c = str[i++]) {
+ case "\\":
+ if (i === str.length) throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: \\ at end of pattern`);
+ switch (c = str[i++]) {
+ case "b":
last.push({
- type: types_1.types.REPETITION,
- min,
- max,
- value: last.pop()
+ type: types_1.types.POSITION,
+ value: "b"
});
- } else {
+ break;
+ case "B":
last.push({
- type: types_1.types.CHAR,
- value: 123
+ type: types_1.types.POSITION,
+ value: "B"
});
- }
- break;
- }
- case "?":
- if (last.length === 0) {
- repeatErr(i);
- }
- last.push({
- type: types_1.types.REPETITION,
- min: 0,
- max: 1,
- value: last.pop()
- });
- break;
- case "+":
- if (last.length === 0) {
- repeatErr(i);
- }
- last.push({
- type: types_1.types.REPETITION,
- min: 1,
- max: Infinity,
- value: last.pop()
+ break;
+ case "w":
+ last.push(sets.words());
+ break;
+ case "W":
+ last.push(sets.notWords());
+ break;
+ case "d":
+ last.push(sets.ints());
+ break;
+ case "D":
+ last.push(sets.notInts());
+ break;
+ case "s":
+ last.push(sets.whitespace());
+ break;
+ case "S":
+ last.push(sets.notWhitespace());
+ break;
+ default: if (/\d/.test(c)) {
+ let digits = c;
+ while (i < str.length && /\d/.test(str[i])) digits += str[i++];
+ let value = parseInt(digits, 10);
+ const reference = {
+ type: types_1.types.REFERENCE,
+ value
+ };
+ last.push(reference);
+ referenceQueue.push({
+ reference,
+ stack: last,
+ index: last.length - 1
+ });
+ } else last.push({
+ type: types_1.types.CHAR,
+ value: c.charCodeAt(0)
});
- break;
- case "*":
- if (last.length === 0) {
- repeatErr(i);
- }
+ }
+ break;
+ case "^":
+ last.push({
+ type: types_1.types.POSITION,
+ value: "^"
+ });
+ break;
+ case "$":
+ last.push({
+ type: types_1.types.POSITION,
+ value: "$"
+ });
+ break;
+ case "[": {
+ let not;
+ if (str[i] === "^") {
+ not = true;
+ i++;
+ } else not = false;
+ let classTokens = util.tokenizeClass(str.slice(i), regexpStr);
+ i += classTokens[1];
+ last.push({
+ type: types_1.types.SET,
+ set: classTokens[0],
+ not
+ });
+ break;
+ }
+ case ".":
+ last.push(sets.anyChar());
+ break;
+ case "(": {
+ let group = {
+ type: types_1.types.GROUP,
+ stack: [],
+ remember: true
+ };
+ if (str[i] === "?") {
+ c = str[i + 1];
+ i += 2;
+ if (c === "=") group.followedBy = true;
+ else if (c === "!") group.notFollowedBy = true;
+ else if (c !== ":") throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid group, character '${c}' after '?' at column ${i - 1}`);
+ group.remember = false;
+ } else groupCount += 1;
+ last.push(group);
+ groupStack.push(lastGroup);
+ lastGroup = group;
+ last = group.stack;
+ break;
+ }
+ case ")":
+ if (groupStack.length === 0) throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unmatched ) at column ${i - 1}`);
+ lastGroup = groupStack.pop();
+ last = lastGroup.options ? lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack;
+ break;
+ case "|": {
+ if (!lastGroup.options) {
+ lastGroup.options = [lastGroup.stack];
+ delete lastGroup.stack;
+ }
+ let stack = [];
+ lastGroup.options.push(stack);
+ last = stack;
+ break;
+ }
+ case "{": {
+ let rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max;
+ if (rs !== null) {
+ if (last.length === 0) repeatErr(i);
+ min = parseInt(rs[1], 10);
+ max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min;
+ i += rs[0].length;
last.push({
type: types_1.types.REPETITION,
- min: 0,
- max: Infinity,
+ min,
+ max,
value: last.pop()
});
- break;
- default: last.push({
+ } else last.push({
type: types_1.types.CHAR,
- value: c.charCodeAt(0)
+ value: 123
});
+ break;
}
+ case "?":
+ if (last.length === 0) repeatErr(i);
+ last.push({
+ type: types_1.types.REPETITION,
+ min: 0,
+ max: 1,
+ value: last.pop()
+ });
+ break;
+ case "+":
+ if (last.length === 0) repeatErr(i);
+ last.push({
+ type: types_1.types.REPETITION,
+ min: 1,
+ max: Infinity,
+ value: last.pop()
+ });
+ break;
+ case "*":
+ if (last.length === 0) repeatErr(i);
+ last.push({
+ type: types_1.types.REPETITION,
+ min: 0,
+ max: Infinity,
+ value: last.pop()
+ });
+ break;
+ default: last.push({
+ type: types_1.types.CHAR,
+ value: c.charCodeAt(0)
+ });
}
- if (groupStack.length !== 0) {
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unterminated group`);
- }
+ if (groupStack.length !== 0) throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unterminated group`);
updateReferences(referenceQueue, groupCount);
return start;
};
@@ -108348,43 +98918,34 @@ var require_tokenizer = /* @__PURE__ */ __commonJSMin(((exports) => {
* @returns {void}
*/
function updateReferences(referenceQueue, groupCount) {
- for (const elem of referenceQueue.reverse()) {
- if (groupCount < elem.reference.value) {
- elem.reference.type = types_1.types.CHAR;
- const valueString = elem.reference.value.toString();
- elem.reference.value = parseInt(valueString, 8);
- if (!/^[0-7]+$/.test(valueString)) {
- let i = 0;
- while (valueString[i] !== "8" && valueString[i] !== "9") {
- i += 1;
- }
- if (i === 0) {
- elem.reference.value = valueString.charCodeAt(0);
- i += 1;
- } else {
- elem.reference.value = parseInt(valueString.slice(0, i), 8);
- }
- if (valueString.length > i) {
- const tail = elem.stack.splice(elem.index + 1);
- for (const char of valueString.slice(i)) {
- elem.stack.push({
- type: types_1.types.CHAR,
- value: char.charCodeAt(0)
- });
- }
- elem.stack.push(...tail);
- }
+ for (const elem of referenceQueue.reverse()) if (groupCount < elem.reference.value) {
+ elem.reference.type = types_1.types.CHAR;
+ const valueString = elem.reference.value.toString();
+ elem.reference.value = parseInt(valueString, 8);
+ if (!/^[0-7]+$/.test(valueString)) {
+ let i = 0;
+ while (valueString[i] !== "8" && valueString[i] !== "9") i += 1;
+ if (i === 0) {
+ elem.reference.value = valueString.charCodeAt(0);
+ i += 1;
+ } else elem.reference.value = parseInt(valueString.slice(0, i), 8);
+ if (valueString.length > i) {
+ const tail = elem.stack.splice(elem.index + 1);
+ for (const char of valueString.slice(i)) elem.stack.push({
+ type: types_1.types.CHAR,
+ value: char.charCodeAt(0)
+ });
+ elem.stack.push(...tail);
}
}
}
}
}));
-
//#endregion
//#region ../node_modules/ret/dist/sets-lookup.js
var require_sets_lookup = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function() {
@@ -108392,7 +98953,7 @@ var require_sets_lookup = /* @__PURE__ */ __commonJSMin(((exports) => {
}
});
}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
@@ -108420,12 +98981,8 @@ var require_sets_lookup = /* @__PURE__ */ __commonJSMin(((exports) => {
let lookup = {};
let len = 0;
for (const token of tokens) {
- if (token.type === types_1.types.CHAR) {
- lookup[token.value] = true;
- }
- if (token.type === types_1.types.RANGE) {
- lookup[`${token.from}-${token.to}`] = true;
- }
+ if (token.type === types_1.types.CHAR) lookup[token.value] = true;
+ if (token.type === types_1.types.RANGE) lookup[`${token.from}-${token.to}`] = true;
len += 1;
}
return {
@@ -108438,12 +98995,11 @@ var require_sets_lookup = /* @__PURE__ */ __commonJSMin(((exports) => {
exports.WHITESPACE = setToLookup(Sets.whitespace().set);
exports.NOTANYCHAR = setToLookup(Sets.anyChar().set);
}));
-
//#endregion
//#region ../node_modules/ret/dist/write-set-tokens.js
var require_write_set_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function() {
@@ -108451,7 +99007,7 @@ var require_write_set_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
}
});
}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
@@ -108491,20 +99047,13 @@ var require_write_set_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
* @returns {boolean} True if the character set corresponds to the 'set-lookup'
*/
function isSameSet(set, { lookup, len }) {
- if (len !== set.length) {
- return false;
- }
+ if (len !== set.length) return false;
const map = lookup();
for (const elem of set) {
- if (elem.type === types_1.types.SET) {
- return false;
- }
+ if (elem.type === types_1.types.SET) return false;
const key = elem.type === types_1.types.CHAR ? elem.value : `${elem.from}-${elem.to}`;
- if (map[key]) {
- map[key] = false;
- } else {
- return false;
- }
+ if (map[key]) map[key] = false;
+ else return false;
}
return true;
}
@@ -108515,18 +99064,10 @@ var require_write_set_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
* @returns {string} The tokens for the set
*/
function writeSetTokens(set, isNested = false) {
- if (isSameSet(set.set, sets.INTS)) {
- return set.not ? "\\D" : "\\d";
- }
- if (isSameSet(set.set, sets.WORDS)) {
- return set.not ? "\\W" : "\\w";
- }
- if (set.not && isSameSet(set.set, sets.NOTANYCHAR)) {
- return ".";
- }
- if (isSameSet(set.set, sets.WHITESPACE)) {
- return set.not ? "\\S" : "\\s";
- }
+ if (isSameSet(set.set, sets.INTS)) return set.not ? "\\D" : "\\d";
+ if (isSameSet(set.set, sets.WORDS)) return set.not ? "\\W" : "\\w";
+ if (set.not && isSameSet(set.set, sets.NOTANYCHAR)) return ".";
+ if (isSameSet(set.set, sets.WHITESPACE)) return set.not ? "\\S" : "\\s";
let tokenString = "";
for (let i = 0; i < set.set.length; i++) {
const subset = set.set[i];
@@ -108542,15 +99083,11 @@ var require_write_set_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
* @returns {string} The token as a string
*/
function writeSetToken(set) {
- if (set.type === types_1.types.CHAR) {
- return setChar(set.value);
- } else if (set.type === types_1.types.RANGE) {
- return `${setChar(set.from)}-${setChar(set.to)}`;
- }
+ if (set.type === types_1.types.CHAR) return setChar(set.value);
+ else if (set.type === types_1.types.RANGE) return `${setChar(set.from)}-${setChar(set.to)}`;
return writeSetTokens(set, true);
}
}));
-
//#endregion
//#region ../node_modules/ret/dist/reconstruct.js
var require_reconstruct = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -108560,13 +99097,9 @@ var require_reconstruct = /* @__PURE__ */ __commonJSMin(((exports) => {
const write_set_tokens_1 = require_write_set_tokens();
const reduceStack = (stack) => stack.map(exports.reconstruct).join("");
const createAlternate = (token) => {
- if ("options" in token) {
- return token.options.map(reduceStack).join("|");
- } else if ("stack" in token) {
- return reduceStack(token.stack);
- } else {
- throw new Error(`options or stack must be Root or Group token`);
- }
+ if ("options" in token) return token.options.map(reduceStack).join("|");
+ else if ("stack" in token) return reduceStack(token.stack);
+ else throw new Error(`options or stack must be Root or Group token`);
};
exports.reconstruct = (token) => {
switch (token.type) {
@@ -108575,33 +99108,20 @@ var require_reconstruct = /* @__PURE__ */ __commonJSMin(((exports) => {
const c = String.fromCharCode(token.value);
return (/[[\\{}$^.|?*+()]/.test(c) ? "\\" : "") + c;
}
- case types_1.types.POSITION: if (token.value === "^" || token.value === "$") {
- return token.value;
- } else {
- return `\\${token.value}`;
- }
+ case types_1.types.POSITION: if (token.value === "^" || token.value === "$") return token.value;
+ else return `\\${token.value}`;
case types_1.types.REFERENCE: return `\\${token.value}`;
case types_1.types.SET: return write_set_tokens_1.writeSetTokens(token);
- case types_1.types.GROUP: {
- const prefix = token.remember ? "" : token.followedBy ? "?=" : token.notFollowedBy ? "?!" : "?:";
- return `(${prefix}${createAlternate(token)})`;
- }
+ case types_1.types.GROUP: return `(${token.remember ? "" : token.followedBy ? "?=" : token.notFollowedBy ? "?!" : "?:"}${createAlternate(token)})`;
case types_1.types.REPETITION: {
const { min, max } = token;
let endWith;
- if (min === 0 && max === 1) {
- endWith = "?";
- } else if (min === 1 && max === Infinity) {
- endWith = "+";
- } else if (min === 0 && max === Infinity) {
- endWith = "*";
- } else if (max === Infinity) {
- endWith = `{${min},}`;
- } else if (min === max) {
- endWith = `{${min}}`;
- } else {
- endWith = `{${min},${max}}`;
- }
+ if (min === 0 && max === 1) endWith = "?";
+ else if (min === 1 && max === Infinity) endWith = "+";
+ else if (min === 0 && max === Infinity) endWith = "*";
+ else if (max === Infinity) endWith = `{${min},}`;
+ else if (min === max) endWith = `{${min}}`;
+ else endWith = `{${min},${max}}`;
return `${exports.reconstruct(token.value)}${endWith}`;
}
case types_1.types.RANGE: return `${write_set_tokens_1.setChar(token.from)}-${write_set_tokens_1.setChar(token.to)}`;
@@ -108609,12 +99129,11 @@ var require_reconstruct = /* @__PURE__ */ __commonJSMin(((exports) => {
}
};
}));
-
//#endregion
//#region ../node_modules/ret/dist/index.js
var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function() {
@@ -108622,7 +99141,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
});
}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
+ if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __exportStar = exports && exports.__exportStar || function(m, exports$4) {
@@ -108648,7 +99167,6 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.types = types_1.types;
module.exports.reconstruct = reconstruct_1.reconstruct;
}));
-
//#endregion
//#region ../node_modules/safe-regex2/index.js
var require_safe_regex2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -108656,7 +99174,7 @@ var require_safe_regex2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const types = parse.types;
function safeRegex(re, opts) {
if (!opts) opts = {};
- const replimit = opts.limit === undefined ? 25 : opts.limit;
+ const replimit = opts.limit === void 0 ? 25 : opts.limit;
if (isRegExp(re)) re = re.source;
else if (typeof re !== "string") re = String(re);
try {
@@ -108675,11 +99193,9 @@ var require_safe_regex2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (starHeight > 1) return false;
if (reps > replimit) return false;
}
- if (node.options) {
- for (i = 0, len = node.options.length; i < len; i++) {
- ok = walk({ stack: node.options[i] }, starHeight);
- if (!ok) return false;
- }
+ if (node.options) for (i = 0, len = node.options.length; i < len; i++) {
+ ok = walk({ stack: node.options[i] }, starHeight);
+ if (!ok) return false;
}
const stack = node.stack || node.value && node.value.stack;
if (!stack) return true;
@@ -108697,7 +99213,6 @@ var require_safe_regex2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.default = safeRegex;
module.exports.safeRegex = safeRegex;
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/strategies/http-method.js
var require_http_method = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -108718,7 +99233,6 @@ var require_http_method = /* @__PURE__ */ __commonJSMin(((exports, module) => {
mustMatchWhenDerived: true
};
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/pretty-print.js
var require_pretty_print = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -108734,8 +99248,7 @@ var require_pretty_print = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const isLast = i === keys.length - 1;
const nodePrefix = isLast ? "└── " : "├── ";
const childPrefix = isLast ? " " : "│ ";
- const nodeData = value[treeDataSymbol] || "";
- const prefixedNodeData = nodeData.split("\n").join("\n" + parentPrefix + childPrefix);
+ const prefixedNodeData = (value[treeDataSymbol] || "").split("\n").join("\n" + parentPrefix + childPrefix);
tree += parentPrefix + nodePrefix + key + prefixedNodeData + "\n";
tree += printObjectTree(value, parentPrefix + childPrefix);
}
@@ -108758,25 +99271,18 @@ var require_pretty_print = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const metaDataObject = options.buildPrettyMeta(route);
const filteredMetaData = {};
let includeMetaKeys = options.includeMeta;
- if (!Array.isArray(includeMetaKeys)) {
- includeMetaKeys = Reflect.ownKeys(metaDataObject);
- }
+ if (!Array.isArray(includeMetaKeys)) includeMetaKeys = Reflect.ownKeys(metaDataObject);
for (const metaKey of includeMetaKeys) {
if (!Object.prototype.hasOwnProperty.call(metaDataObject, metaKey)) continue;
const serializedKey = metaKey.toString();
const metaValue = metaDataObject[metaKey];
- if (metaValue !== undefined && metaValue !== null) {
- const serializedValue = JSON.stringify(parseMeta(metaValue));
- filteredMetaData[serializedKey] = serializedValue;
- }
+ if (metaValue !== void 0 && metaValue !== null) filteredMetaData[serializedKey] = JSON.stringify(parseMeta(metaValue));
}
return filteredMetaData;
}
function serializeMetaData(metaData) {
let serializedMetaData = "";
- for (const [key, value] of Object.entries(metaData)) {
- serializedMetaData += `\n• (${key}) ${value}`;
- }
+ for (const [key, value] of Object.entries(metaData)) serializedMetaData += `\n• (${key}) ${value}`;
return serializedMetaData;
}
function normalizeRoute(route) {
@@ -108792,19 +99298,15 @@ var require_pretty_print = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function serializeRoute(route) {
let serializedRoute = ` (${route.method})`;
const constraints = route.opts.constraints || {};
- if (Object.keys(constraints).length !== 0) {
- serializedRoute += " " + JSON.stringify(constraints);
- }
+ if (Object.keys(constraints).length !== 0) serializedRoute += " " + JSON.stringify(constraints);
serializedRoute += serializeMetaData(route.metaData);
return serializedRoute;
}
function mergeSimilarRoutes(routes) {
return routes.reduce((mergedRoutes, route) => {
- for (const nodeRoute of mergedRoutes) {
- if (deepEqual(route.opts.constraints, nodeRoute.opts.constraints) && deepEqual(route.metaData, nodeRoute.metaData)) {
- nodeRoute.method += ", " + route.method;
- return mergedRoutes;
- }
+ for (const nodeRoute of mergedRoutes) if (deepEqual(route.opts.constraints, nodeRoute.opts.constraints) && deepEqual(route.metaData, nodeRoute.metaData)) {
+ nodeRoute.method += ", " + route.method;
+ return mergedRoutes;
}
mergedRoutes.push(route);
return mergedRoutes;
@@ -108812,41 +99314,27 @@ var require_pretty_print = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function serializeNode(node, prefix, options) {
let routes = node.routes;
- if (options.method === undefined) {
- routes = routes.map(normalizeRoute);
- }
+ if (options.method === void 0) routes = routes.map(normalizeRoute);
routes = routes.map((route) => {
route.metaData = getRouteMetaData(route, options);
return route;
});
- if (options.method === undefined) {
- routes = mergeSimilarRoutes(routes);
- }
+ if (options.method === void 0) routes = mergeSimilarRoutes(routes);
return routes.map(serializeRoute).join(`\n${prefix}`);
}
function buildObjectTree(node, tree, prefix, options) {
if (node.isLeafNode || options.commonPrefix !== false) {
prefix = prefix || "(empty root node)";
tree = tree[prefix] = {};
- if (node.isLeafNode) {
- tree[treeDataSymbol] = serializeNode(node, prefix, options);
- }
+ if (node.isLeafNode) tree[treeDataSymbol] = serializeNode(node, prefix, options);
prefix = "";
}
- if (node.staticChildren) {
- for (const child of Object.values(node.staticChildren)) {
- buildObjectTree(child, tree, prefix + child.prefix, options);
- }
- }
- if (node.parametricChildren) {
- for (const child of Object.values(node.parametricChildren)) {
- const childPrefix = Array.from(child.nodePaths).join("|");
- buildObjectTree(child, tree, prefix + childPrefix, options);
- }
- }
- if (node.wildcardChild) {
- buildObjectTree(node.wildcardChild, tree, "*", options);
+ if (node.staticChildren) for (const child of Object.values(node.staticChildren)) buildObjectTree(child, tree, prefix + child.prefix, options);
+ if (node.parametricChildren) for (const child of Object.values(node.parametricChildren)) {
+ const childPrefix = Array.from(child.nodePaths).join("|");
+ buildObjectTree(child, tree, prefix + childPrefix, options);
}
+ if (node.wildcardChild) buildObjectTree(node.wildcardChild, tree, "*", options);
}
function prettyPrintTree(root, options) {
const objectTree = {};
@@ -108855,7 +99343,6 @@ var require_pretty_print = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = { prettyPrintTree };
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/handler-storage.js
var require_handler_storage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -108868,9 +99355,7 @@ var require_handler_storage = /* @__PURE__ */ __commonJSMin(((exports, module) =
this.constrainedHandlerStores = null;
}
getMatchingHandler(derivedConstraints) {
- if (derivedConstraints === undefined) {
- return this.unconstrainedHandler;
- }
+ if (derivedConstraints === void 0) return this.unconstrainedHandler;
return this._getHandlerMatchingConstraints(derivedConstraints);
}
addHandler(constrainer, route) {
@@ -108884,33 +99369,18 @@ var require_handler_storage = /* @__PURE__ */ __commonJSMin(((exports, module) =
_createParamsObject: this._compileCreateParamsObject(params)
};
const constraintsNames = Object.keys(constraints);
- if (constraintsNames.length === 0) {
- this.unconstrainedHandler = handlerObject;
- }
- for (const constraint of constraintsNames) {
- if (!this.constraints.includes(constraint)) {
- if (constraint === "version") {
- this.constraints.unshift(constraint);
- } else {
- this.constraints.push(constraint);
- }
- }
- }
+ if (constraintsNames.length === 0) this.unconstrainedHandler = handlerObject;
+ for (const constraint of constraintsNames) if (!this.constraints.includes(constraint)) if (constraint === "version") this.constraints.unshift(constraint);
+ else this.constraints.push(constraint);
const isMergedTree = constraintsNames.includes(httpMethodStrategy.name);
- if (!isMergedTree && this.handlers.length >= 31) {
- throw new Error("find-my-way supports a maximum of 31 route handlers per node when there are constraints, limit reached");
- }
+ if (!isMergedTree && this.handlers.length >= 31) throw new Error("find-my-way supports a maximum of 31 route handlers per node when there are constraints, limit reached");
this.handlers.push(handlerObject);
this.handlers.sort((a, b) => Object.keys(a.constraints).length - Object.keys(b.constraints).length);
- if (!isMergedTree) {
- this._compileGetHandlerMatchingConstraints(constrainer, constraints);
- }
+ if (!isMergedTree) this._compileGetHandlerMatchingConstraints(constrainer, constraints);
}
_compileCreateParamsObject(params) {
const lines = [];
- for (let i = 0; i < params.length; i++) {
- lines.push(`'${params[i]}': paramsArray[${i}]`);
- }
+ for (let i = 0; i < params.length; i++) lines.push(`'${params[i]}': paramsArray[${i}]`);
return new Function("paramsArray", `return {${lines.join(",")}}`);
}
_getHandlerMatchingConstraints() {
@@ -108918,9 +99388,8 @@ var require_handler_storage = /* @__PURE__ */ __commonJSMin(((exports, module) =
}
_buildConstraintStore(store, constraint) {
for (let i = 0; i < this.handlers.length; i++) {
- const handler = this.handlers[i];
- const constraintValue = handler.constraints[constraint];
- if (constraintValue !== undefined) {
+ const constraintValue = this.handlers[i].constraints[constraint];
+ if (constraintValue !== void 0) {
let indexes = store.get(constraintValue) || 0;
indexes |= 1 << i;
store.set(constraintValue, indexes);
@@ -108929,13 +99398,7 @@ var require_handler_storage = /* @__PURE__ */ __commonJSMin(((exports, module) =
}
_constrainedIndexBitmask(constraint) {
let mask = 0;
- for (let i = 0; i < this.handlers.length; i++) {
- const handler = this.handlers[i];
- const constraintValue = handler.constraints[constraint];
- if (constraintValue !== undefined) {
- mask |= 1 << i;
- }
- }
+ for (let i = 0; i < this.handlers.length; i++) if (this.handlers[i].constraints[constraint] !== void 0) mask |= 1 << i;
return ~mask;
}
_compileGetHandlerMatchingConstraints(constrainer) {
@@ -108955,8 +99418,7 @@ var require_handler_storage = /* @__PURE__ */ __commonJSMin(((exports, module) =
mask = ${this._constrainedIndexBitmask(constraint)}
value = derivedConstraints.${constraint}
`);
- const strategy = constrainer.strategies[constraint];
- const matchMask = strategy.mustMatchWhenDerived ? "matches" : "(matches | mask)";
+ const matchMask = constrainer.strategies[constraint].mustMatchWhenDerived ? "matches" : "(matches | mask)";
lines.push(`
if (value === undefined) {
candidates &= mask
@@ -108967,19 +99429,13 @@ var require_handler_storage = /* @__PURE__ */ __commonJSMin(((exports, module) =
if (candidates === 0) return null;
`);
}
- for (const constraint in constrainer.strategies) {
- const strategy = constrainer.strategies[constraint];
- if (strategy.mustMatchWhenDerived && !this.constraints.includes(constraint)) {
- lines.push(`if (derivedConstraints.${constraint} !== undefined) return null`);
- }
- }
+ for (const constraint in constrainer.strategies) if (constrainer.strategies[constraint].mustMatchWhenDerived && !this.constraints.includes(constraint)) lines.push(`if (derivedConstraints.${constraint} !== undefined) return null`);
lines.push("return this.handlers[Math.floor(Math.log2(candidates))]");
this._getHandlerMatchingConstraints = new Function("derivedConstraints", lines.join("\n"));
}
};
module.exports = HandlerStorage;
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/node.js
var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -108996,12 +99452,8 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.handlerStorage = null;
}
addRoute(route, constrainer) {
- if (this.routes === null) {
- this.routes = [];
- }
- if (this.handlerStorage === null) {
- this.handlerStorage = new HandlerStorage();
- }
+ if (this.routes === null) this.routes = [];
+ if (this.handlerStorage === null) this.handlerStorage = new HandlerStorage();
this.isLeafNode = true;
this.routes.push(route);
this.handlerStorage.addHandler(constrainer, route);
@@ -109014,33 +99466,23 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
findStaticMatchingChild(path, pathIndex) {
const staticChild = this.staticChildren[path.charAt(pathIndex)];
- if (staticChild === undefined || !staticChild.matchPrefix(path, pathIndex)) {
- return null;
- }
+ if (staticChild === void 0 || !staticChild.matchPrefix(path, pathIndex)) return null;
return staticChild;
}
getStaticChild(path, pathIndex = 0) {
- if (path.length === pathIndex) {
- return this;
- }
+ if (path.length === pathIndex) return this;
const staticChild = this.findStaticMatchingChild(path, pathIndex);
- if (staticChild) {
- return staticChild.getStaticChild(path, pathIndex + staticChild.prefix.length);
- }
+ if (staticChild) return staticChild.getStaticChild(path, pathIndex + staticChild.prefix.length);
return null;
}
createStaticChild(path) {
- if (path.length === 0) {
- return this;
- }
+ if (path.length === 0) return this;
let staticChild = this.staticChildren[path.charAt(0)];
if (staticChild) {
let i = 1;
- for (; i < staticChild.prefix.length; i++) {
- if (path.charCodeAt(i) !== staticChild.prefix.charCodeAt(i)) {
- staticChild = staticChild.split(this, i);
- break;
- }
+ for (; i < staticChild.prefix.length; i++) if (path.charCodeAt(i) !== staticChild.prefix.charCodeAt(i)) {
+ staticChild = staticChild.split(this, i);
+ break;
}
return staticChild.createStaticChild(path.slice(i));
}
@@ -109061,12 +99503,9 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
getParametricChild(regex) {
const regexpSource = regex && regex.source;
const parametricChild = this.parametricChildren.find((child) => {
- const childRegexSource = child.regex && child.regex.source;
- return childRegexSource === regexpSource;
+ return (child.regex && child.regex.source) === regexpSource;
});
- if (parametricChild) {
- return parametricChild;
- }
+ if (parametricChild) return parametricChild;
return null;
}
createParametricChild(regex, staticSuffix, nodePath) {
@@ -109109,26 +99548,20 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let node = this.findStaticMatchingChild(path, pathIndex);
let parametricBrotherNodeIndex = 0;
if (node === null) {
- if (this.parametricChildren.length === 0) {
- return this.wildcardChild;
- }
+ if (this.parametricChildren.length === 0) return this.wildcardChild;
node = this.parametricChildren[0];
parametricBrotherNodeIndex = 1;
}
- if (this.wildcardChild !== null) {
- nodeStack.push({
- paramsCount,
- brotherPathIndex: pathIndex,
- brotherNode: this.wildcardChild
- });
- }
- for (let i = this.parametricChildren.length - 1; i >= parametricBrotherNodeIndex; i--) {
- nodeStack.push({
- paramsCount,
- brotherPathIndex: pathIndex,
- brotherNode: this.parametricChildren[i]
- });
- }
+ if (this.wildcardChild !== null) nodeStack.push({
+ paramsCount,
+ brotherPathIndex: pathIndex,
+ brotherNode: this.wildcardChild
+ });
+ for (let i = this.parametricChildren.length - 1; i >= parametricBrotherNodeIndex; i--) nodeStack.push({
+ paramsCount,
+ brotherPathIndex: pathIndex,
+ brotherNode: this.parametricChildren[i]
+ });
return node;
}
_compilePrefixMatch() {
@@ -109173,28 +99606,21 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
NODE_TYPES
};
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/strategies/accept-version.js
var require_accept_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const assert$40 = __require("node:assert");
function SemVerStore() {
- if (!(this instanceof SemVerStore)) {
- return new SemVerStore();
- }
+ if (!(this instanceof SemVerStore)) return new SemVerStore();
this.store = {};
this.maxMajor = 0;
this.maxMinors = {};
this.maxPatches = {};
}
SemVerStore.prototype.set = function(version, store) {
- if (typeof version !== "string") {
- throw new TypeError("Version should be a string");
- }
+ if (typeof version !== "string") throw new TypeError("Version should be a string");
let [major, minor, patch] = version.split(".");
- if (isNaN(major)) {
- throw new TypeError("Major version must be a numeric value");
- }
+ if (isNaN(major)) throw new TypeError("Major version must be a numeric value");
major = Number(major);
minor = Number(minor) || 0;
patch = Number(patch) || 0;
@@ -109229,7 +99655,6 @@ var require_accept_version = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}
};
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/strategies/accept-host.js
var require_accept_host = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -109240,24 +99665,15 @@ var require_accept_host = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return {
get: (host) => {
const exact = hosts[host];
- if (exact) {
- return exact;
- }
- for (const regex of regexHosts) {
- if (regex.host.test(host)) {
- return regex.value;
- }
- }
+ if (exact) return exact;
+ for (const regex of regexHosts) if (regex.host.test(host)) return regex.value;
},
set: (host, value) => {
- if (host instanceof RegExp) {
- regexHosts.push({
- host,
- value
- });
- } else {
- hosts[host] = value;
- }
+ if (host instanceof RegExp) regexHosts.push({
+ host,
+ value
+ });
+ else hosts[host] = value;
}
};
}
@@ -109270,7 +99686,6 @@ var require_accept_host = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/constrainer.js
var require_constrainer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -109283,86 +99698,54 @@ var require_constrainer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
version: acceptVersionStrategy,
host: acceptHostStrategy
};
- this.strategiesInUse = new Set();
- this.asyncStrategiesInUse = new Set();
- if (customStrategies) {
- for (const strategy of Object.values(customStrategies)) {
- this.addConstraintStrategy(strategy);
- }
- }
+ this.strategiesInUse = /* @__PURE__ */ new Set();
+ this.asyncStrategiesInUse = /* @__PURE__ */ new Set();
+ if (customStrategies) for (const strategy of Object.values(customStrategies)) this.addConstraintStrategy(strategy);
}
isStrategyUsed(strategyName) {
return this.strategiesInUse.has(strategyName) || this.asyncStrategiesInUse.has(strategyName);
}
hasConstraintStrategy(strategyName) {
const customConstraintStrategy = this.strategies[strategyName];
- if (customConstraintStrategy !== undefined) {
- return customConstraintStrategy.isCustom || this.isStrategyUsed(strategyName);
- }
+ if (customConstraintStrategy !== void 0) return customConstraintStrategy.isCustom || this.isStrategyUsed(strategyName);
return false;
}
addConstraintStrategy(strategy) {
assert$38(typeof strategy.name === "string" && strategy.name !== "", "strategy.name is required.");
assert$38(strategy.storage && typeof strategy.storage === "function", "strategy.storage function is required.");
assert$38(strategy.deriveConstraint && typeof strategy.deriveConstraint === "function", "strategy.deriveConstraint function is required.");
- if (this.strategies[strategy.name] && this.strategies[strategy.name].isCustom) {
- throw new Error(`There already exists a custom constraint with the name ${strategy.name}.`);
- }
- if (this.isStrategyUsed(strategy.name)) {
- throw new Error(`There already exists a route with ${strategy.name} constraint.`);
- }
+ if (this.strategies[strategy.name] && this.strategies[strategy.name].isCustom) throw new Error(`There already exists a custom constraint with the name ${strategy.name}.`);
+ if (this.isStrategyUsed(strategy.name)) throw new Error(`There already exists a route with ${strategy.name} constraint.`);
strategy.isCustom = true;
strategy.isAsync = strategy.deriveConstraint.length === 3;
this.strategies[strategy.name] = strategy;
- if (strategy.mustMatchWhenDerived) {
- this.noteUsage({ [strategy.name]: strategy });
- }
+ if (strategy.mustMatchWhenDerived) this.noteUsage({ [strategy.name]: strategy });
}
deriveConstraints(req, ctx, done) {
const constraints = this.deriveSyncConstraints(req, ctx);
- if (done === undefined) {
- return constraints;
- }
+ if (done === void 0) return constraints;
this.deriveAsyncConstraints(constraints, req, ctx, done);
}
- deriveSyncConstraints(req, ctx) {
- return undefined;
- }
+ deriveSyncConstraints(req, ctx) {}
noteUsage(constraints) {
if (constraints) {
const beforeSize = this.strategiesInUse.size;
- for (const key in constraints) {
- const strategy = this.strategies[key];
- if (strategy.isAsync) {
- this.asyncStrategiesInUse.add(key);
- } else {
- this.strategiesInUse.add(key);
- }
- }
- if (beforeSize !== this.strategiesInUse.size) {
- this._buildDeriveConstraints();
- }
+ for (const key in constraints) if (this.strategies[key].isAsync) this.asyncStrategiesInUse.add(key);
+ else this.strategiesInUse.add(key);
+ if (beforeSize !== this.strategiesInUse.size) this._buildDeriveConstraints();
}
}
newStoreForConstraint(constraint) {
- if (!this.strategies[constraint]) {
- throw new Error(`No strategy registered for constraint key ${constraint}`);
- }
+ if (!this.strategies[constraint]) throw new Error(`No strategy registered for constraint key ${constraint}`);
return this.strategies[constraint].storage();
}
validateConstraints(constraints) {
for (const key in constraints) {
const value = constraints[key];
- if (typeof value === "undefined") {
- throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");
- }
+ if (typeof value === "undefined") throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");
const strategy = this.strategies[key];
- if (!strategy) {
- throw new Error(`No strategy registered for constraint key ${key}`);
- }
- if (strategy.validate) {
- strategy.validate(value);
- }
+ if (!strategy) throw new Error(`No strategy registered for constraint key ${key}`);
+ if (strategy.validate) strategy.validate(value);
}
}
deriveAsyncConstraints(constraints, req, ctx, done) {
@@ -109372,34 +99755,23 @@ var require_constrainer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
constraints = constraints || {};
- for (const key of this.asyncStrategiesInUse) {
- const strategy = this.strategies[key];
- strategy.deriveConstraint(req, ctx, (err, constraintValue) => {
- if (err !== null) {
- done(err);
- return;
- }
- constraints[key] = constraintValue;
- if (--asyncConstraintsCount === 0) {
- done(null, constraints);
- }
- });
- }
+ for (const key of this.asyncStrategiesInUse) this.strategies[key].deriveConstraint(req, ctx, (err, constraintValue) => {
+ if (err !== null) {
+ done(err);
+ return;
+ }
+ constraints[key] = constraintValue;
+ if (--asyncConstraintsCount === 0) done(null, constraints);
+ });
}
_buildDeriveConstraints() {
if (this.strategiesInUse.size === 0) return;
const lines = ["return {"];
for (const key of this.strategiesInUse) {
const strategy = this.strategies[key];
- if (!strategy.isCustom) {
- if (key === "version") {
- lines.push(" version: req.headers['accept-version'],");
- } else {
- lines.push(" host: req.headers.host || req.headers[':authority'],");
- }
- } else {
- lines.push(` ${strategy.name}: this.strategies.${key}.deriveConstraint(req, ctx),`);
- }
+ if (!strategy.isCustom) if (key === "version") lines.push(" version: req.headers['accept-version'],");
+ else lines.push(" host: req.headers.host || req.headers[':authority'],");
+ else lines.push(` ${strategy.name}: this.strategies.${key}.deriveConstraint(req, ctx),`);
}
lines.push("}");
this.deriveSyncConstraints = new Function("req", "ctx", lines.join("\n")).bind(this);
@@ -109407,11 +99779,10 @@ var require_constrainer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
module.exports = Constrainer;
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/http-methods.js
var require_http_methods = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- const httpMethods = [
+ module.exports = [
"ACL",
"BIND",
"CHECKOUT",
@@ -109447,9 +99818,7 @@ var require_http_methods = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"UNLOCK",
"UNSUBSCRIBE"
];
- module.exports = httpMethods;
}));
-
//#endregion
//#region ../node_modules/find-my-way/lib/url-sanitizer.js
var require_url_sanitizer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -109478,9 +99847,7 @@ var require_url_sanitizer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
if (lowCharCode === 102) return "?";
return null;
}
- if (highCharCode === 52 && lowCharCode === 48) {
- return "@";
- }
+ if (highCharCode === 52 && lowCharCode === 48) return "@";
return null;
}
function safeDecodeURI(path, useSemicolonDelimiter) {
@@ -109492,9 +99859,8 @@ var require_url_sanitizer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
if (charCode === 37) {
const highCharCode = path.charCodeAt(i + 1);
const lowCharCode = path.charCodeAt(i + 2);
- if (decodeComponentChar(highCharCode, lowCharCode) === null) {
- shouldDecode = true;
- } else {
+ if (decodeComponentChar(highCharCode, lowCharCode) === null) shouldDecode = true;
+ else {
shouldDecodeParam = true;
if (highCharCode === 50 && lowCharCode === 53) {
shouldDecode = true;
@@ -109509,9 +99875,8 @@ var require_url_sanitizer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
break;
}
}
- const decodedPath = shouldDecode ? decodeURI(path) : path;
return {
- path: decodedPath,
+ path: shouldDecode ? decodeURI(path) : path,
querystring,
shouldDecodeParam
};
@@ -109521,14 +99886,10 @@ var require_url_sanitizer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
if (startIndex === -1) return uriComponent;
let decoded = "";
let lastIndex = startIndex;
- for (let i = startIndex; i < uriComponent.length; i++) {
- if (uriComponent.charCodeAt(i) === 37) {
- const highCharCode = uriComponent.charCodeAt(i + 1);
- const lowCharCode = uriComponent.charCodeAt(i + 2);
- const decodedChar = decodeComponentChar(highCharCode, lowCharCode);
- decoded += uriComponent.slice(lastIndex, i) + decodedChar;
- lastIndex = i + 3;
- }
+ for (let i = startIndex; i < uriComponent.length; i++) if (uriComponent.charCodeAt(i) === 37) {
+ const decodedChar = decodeComponentChar(uriComponent.charCodeAt(i + 1), uriComponent.charCodeAt(i + 2));
+ decoded += uriComponent.slice(lastIndex, i) + decodedChar;
+ lastIndex = i + 3;
}
return uriComponent.slice(0, startIndex) + decoded + uriComponent.slice(lastIndex);
}
@@ -109537,7 +99898,6 @@ var require_url_sanitizer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
safeDecodeURIComponent
};
}));
-
//#endregion
//#region ../node_modules/find-my-way/index.js
var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -109553,43 +99913,29 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { safeDecodeURI, safeDecodeURIComponent } = require_url_sanitizer();
const FULL_PATH_REGEXP = /^https?:\/\/.*?\//;
const OPTIONAL_PARAM_REGEXP = /(\/:[^/()]*?)\?(\/?)/;
- if (!isRegexSafe(FULL_PATH_REGEXP)) {
- throw new Error("the FULL_PATH_REGEXP is not safe, update this module");
- }
- if (!isRegexSafe(OPTIONAL_PARAM_REGEXP)) {
- throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");
- }
+ if (!isRegexSafe(FULL_PATH_REGEXP)) throw new Error("the FULL_PATH_REGEXP is not safe, update this module");
+ if (!isRegexSafe(OPTIONAL_PARAM_REGEXP)) throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");
function Router(opts) {
- if (!(this instanceof Router)) {
- return new Router(opts);
- }
+ if (!(this instanceof Router)) return new Router(opts);
opts = opts || {};
this._opts = opts;
if (opts.defaultRoute) {
assert$37(typeof opts.defaultRoute === "function", "The default route must be a function");
this.defaultRoute = opts.defaultRoute;
- } else {
- this.defaultRoute = null;
- }
+ } else this.defaultRoute = null;
if (opts.onBadUrl) {
assert$37(typeof opts.onBadUrl === "function", "The bad url handler must be a function");
this.onBadUrl = opts.onBadUrl;
- } else {
- this.onBadUrl = null;
- }
+ } else this.onBadUrl = null;
if (opts.buildPrettyMeta) {
assert$37(typeof opts.buildPrettyMeta === "function", "buildPrettyMeta must be a function");
this.buildPrettyMeta = opts.buildPrettyMeta;
- } else {
- this.buildPrettyMeta = defaultBuildPrettyMeta;
- }
+ } else this.buildPrettyMeta = defaultBuildPrettyMeta;
if (opts.querystringParser) {
assert$37(typeof opts.querystringParser === "function", "querystringParser must be a function");
this.querystringParser = opts.querystringParser;
- } else {
- this.querystringParser = (query) => query === "" ? {} : querystring.parse(query);
- }
- this.caseSensitive = opts.caseSensitive === undefined ? true : opts.caseSensitive;
+ } else this.querystringParser = (query) => query === "" ? {} : querystring.parse(query);
+ this.caseSensitive = opts.caseSensitive === void 0 ? true : opts.caseSensitive;
this.ignoreTrailingSlash = opts.ignoreTrailingSlash || false;
this.ignoreDuplicateSlashes = opts.ignoreDuplicateSlashes || false;
this.maxParamLength = opts.maxParamLength || 100;
@@ -109601,9 +99947,7 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
Router.prototype.on = function on(method, path, opts, handler, store) {
if (typeof opts === "function") {
- if (handler !== undefined) {
- store = handler;
- }
+ if (handler !== void 0) store = handler;
handler = opts;
opts = {};
}
@@ -109621,12 +99965,8 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
const route = path;
- if (this.ignoreDuplicateSlashes) {
- path = removeDuplicateSlashes(path);
- }
- if (this.ignoreTrailingSlash) {
- path = trimLastSlash(path);
- }
+ if (this.ignoreDuplicateSlashes) path = removeDuplicateSlashes(path);
+ if (this.ignoreTrailingSlash) path = trimLastSlash(path);
const methods = Array.isArray(method) ? method : [method];
for (const method of methods) {
assert$37(typeof method === "string", "Method should be a string");
@@ -109636,17 +99976,13 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
Router.prototype._on = function _on(method, path, opts, handler, store) {
let constraints = {};
- if (opts.constraints !== undefined) {
+ if (opts.constraints !== void 0) {
assert$37(typeof opts.constraints === "object" && opts.constraints !== null, "Constraints should be an object");
- if (Object.keys(opts.constraints).length !== 0) {
- constraints = opts.constraints;
- }
+ if (Object.keys(opts.constraints).length !== 0) constraints = opts.constraints;
}
this.constrainer.validateConstraints(constraints);
this.constrainer.noteUsage(constraints);
- if (this.trees[method] === undefined) {
- this.trees[method] = new StaticNode("/");
- }
+ if (this.trees[method] === void 0) this.trees[method] = new StaticNode("/");
let pattern = path;
if (pattern === "*" && this.trees[method].prefix.length !== 0) {
const currentRoot = this.trees[method];
@@ -109665,9 +100001,7 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const isWildcardNode = pattern.charCodeAt(i) === 42;
if (isParametricNode || isWildcardNode || i === pattern.length && i !== parentNodePathIndex) {
let staticNodePath = pattern.slice(parentNodePathIndex, i);
- if (!this.caseSensitive) {
- staticNodePath = staticNodePath.toLowerCase();
- }
+ if (!this.caseSensitive) staticNodePath = staticNodePath.toLowerCase();
staticNodePath = staticNodePath.split("::").join(":");
staticNodePath = staticNodePath.split("%").join("%25");
currentNode = currentNode.createStaticChild(staticNodePath);
@@ -109690,9 +100024,7 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (isRegexParam) {
const endOfRegexIndex = getClosingParenthensePosition(pattern, j);
const regexString = pattern.slice(j, endOfRegexIndex + 1);
- if (!this.allowUnsafeRegex) {
- assert$37(isRegexSafe(new RegExp(regexString)), `The regex '${regexString}' is not safe!`);
- }
+ if (!this.allowUnsafeRegex) assert$37(isRegexSafe(new RegExp(regexString)), `The regex '${regexString}' is not safe!`);
regexps.push(trimRegExpStartAndEnd(regexString));
j = endOfRegexIndex + 1;
isParamSafe = true;
@@ -109704,11 +100036,8 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (; j < pattern.length; j++) {
const charCode = pattern.charCodeAt(j);
if (charCode === 47) break;
- if (charCode === 58) {
- const nextCharCode = pattern.charCodeAt(j + 1);
- if (nextCharCode === 58) j++;
- else break;
- }
+ if (charCode === 58) if (pattern.charCodeAt(j + 1) === 58) j++;
+ else break;
}
let staticPart = pattern.slice(staticPartStartIndex, j);
if (staticPart) {
@@ -109733,22 +100062,14 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
params.push("*");
currentNode = currentNode.createWildcardChild();
parentNodePathIndex = i + 1;
- if (i !== pattern.length - 1) {
- throw new Error("Wildcard must be the last character in the route");
- }
+ if (i !== pattern.length - 1) throw new Error("Wildcard must be the last character in the route");
}
}
- if (!this.caseSensitive) {
- pattern = pattern.toLowerCase();
- }
- if (pattern === "*") {
- pattern = "/*";
- }
+ if (!this.caseSensitive) pattern = pattern.toLowerCase();
+ if (pattern === "*") pattern = "/*";
for (const existRoute of this.routes) {
const routeConstraints = existRoute.opts.constraints || {};
- if (existRoute.method === method && existRoute.pattern === pattern && deepEqual(routeConstraints, constraints)) {
- throw new Error(`Method '${method}' already declared for route '${pattern}' with constraints '${JSON.stringify(constraints)}'`);
- }
+ if (existRoute.method === method && existRoute.pattern === pattern && deepEqual(routeConstraints, constraints)) throw new Error(`Method '${method}' already declared for route '${pattern}' with constraints '${JSON.stringify(constraints)}'`);
}
const route = {
method,
@@ -109763,13 +100084,10 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
currentNode.addRoute(route, this.constrainer);
};
Router.prototype.hasRoute = function hasRoute(method, path, constraints) {
- const route = this.findRoute(method, path, constraints);
- return route !== null;
+ return this.findRoute(method, path, constraints) !== null;
};
Router.prototype.findRoute = function findNode(method, path, constraints = {}) {
- if (this.trees[method] === undefined) {
- return null;
- }
+ if (this.trees[method] === void 0) return null;
let pattern = path;
let currentNode = this.trees[method];
let parentNodePathIndex = currentNode.prefix.length;
@@ -109783,15 +100101,11 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const isWildcardNode = pattern.charCodeAt(i) === 42;
if (isParametricNode || isWildcardNode || i === pattern.length && i !== parentNodePathIndex) {
let staticNodePath = pattern.slice(parentNodePathIndex, i);
- if (!this.caseSensitive) {
- staticNodePath = staticNodePath.toLowerCase();
- }
+ if (!this.caseSensitive) staticNodePath = staticNodePath.toLowerCase();
staticNodePath = staticNodePath.split("::").join(":");
staticNodePath = staticNodePath.split("%").join("%25");
currentNode = currentNode.getStaticChild(staticNodePath);
- if (currentNode === null) {
- return null;
- }
+ if (currentNode === null) return null;
}
if (isParametricNode) {
let isRegexNode = false;
@@ -109811,9 +100125,7 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (isRegexParam) {
const endOfRegexIndex = getClosingParenthensePosition(pattern, j);
const regexString = pattern.slice(j, endOfRegexIndex + 1);
- if (!this.allowUnsafeRegex) {
- assert$37(isRegexSafe(new RegExp(regexString)), `The regex '${regexString}' is not safe!`);
- }
+ if (!this.allowUnsafeRegex) assert$37(isRegexSafe(new RegExp(regexString)), `The regex '${regexString}' is not safe!`);
regexps.push(trimRegExpStartAndEnd(regexString));
j = endOfRegexIndex + 1;
isParamSafe = false;
@@ -109825,11 +100137,8 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
for (; j < pattern.length; j++) {
const charCode = pattern.charCodeAt(j);
if (charCode === 47) break;
- if (charCode === 58) {
- const nextCharCode = pattern.charCodeAt(j + 1);
- if (nextCharCode === 58) j++;
- else break;
- }
+ if (charCode === 58) if (pattern.charCodeAt(j + 1) === 58) j++;
+ else break;
}
let staticPart = pattern.slice(staticPartStartIndex, j);
if (staticPart) {
@@ -109845,9 +100154,7 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
i += nodePattern.length;
const regex = isRegexNode ? new RegExp("^" + regexps.join("") + "$") : null;
currentNode = currentNode.getParametricChild(regex, staticPart || null, nodePath);
- if (currentNode === null) {
- return null;
- }
+ if (currentNode === null) return null;
parentNodePathIndex = i + 1;
break;
}
@@ -109857,23 +100164,17 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
params.push("*");
currentNode = currentNode.getWildcardChild();
parentNodePathIndex = i + 1;
- if (i !== pattern.length - 1) {
- throw new Error("Wildcard must be the last character in the route");
- }
+ if (i !== pattern.length - 1) throw new Error("Wildcard must be the last character in the route");
}
}
- if (!this.caseSensitive) {
- pattern = pattern.toLowerCase();
- }
+ if (!this.caseSensitive) pattern = pattern.toLowerCase();
for (const existRoute of this.routes) {
const routeConstraints = existRoute.opts.constraints || {};
- if (existRoute.method === method && existRoute.pattern === pattern && deepEqual(routeConstraints, constraints)) {
- return {
- handler: existRoute.handler,
- store: existRoute.store,
- params: existRoute.params
- };
- }
+ if (existRoute.method === method && existRoute.pattern === pattern && deepEqual(routeConstraints, constraints)) return {
+ handler: existRoute.handler,
+ store: existRoute.store,
+ params: existRoute.params
+ };
}
return null;
};
@@ -109902,16 +100203,10 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this.off(method, pathOptional, constraints);
return;
}
- if (this.ignoreDuplicateSlashes) {
- path = removeDuplicateSlashes(path);
- }
- if (this.ignoreTrailingSlash) {
- path = trimLastSlash(path);
- }
+ if (this.ignoreDuplicateSlashes) path = removeDuplicateSlashes(path);
+ if (this.ignoreTrailingSlash) path = trimLastSlash(path);
const methods = Array.isArray(method) ? method : [method];
- for (const method of methods) {
- this._off(method, path, constraints);
- }
+ for (const method of methods) this._off(method, path, constraints);
};
Router.prototype._off = function _off(method, path, constraints) {
assert$37(typeof method === "string", "Method should be a string");
@@ -109929,9 +100224,9 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Router.prototype.lookup = function lookup(req, res, ctx, done) {
if (typeof ctx === "function") {
done = ctx;
- ctx = undefined;
+ ctx = void 0;
}
- if (done === undefined) {
+ if (done === void 0) {
const constraints = this.constrainer.deriveConstraints(req, ctx);
const handle = this.find(req.method, req.url, constraints);
return this.callHandler(handle, req, res, ctx);
@@ -109952,17 +100247,13 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
Router.prototype.callHandler = function callHandler(handle, req, res, ctx) {
if (handle === null) return this._defaultRoute(req, res, ctx);
- return ctx === undefined ? handle.handler(req, res, handle.params, handle.store, handle.searchParams) : handle.handler.call(ctx, req, res, handle.params, handle.store, handle.searchParams);
+ return ctx === void 0 ? handle.handler(req, res, handle.params, handle.store, handle.searchParams) : handle.handler.call(ctx, req, res, handle.params, handle.store, handle.searchParams);
};
Router.prototype.find = function find(method, path, derivedConstraints) {
let currentNode = this.trees[method];
- if (currentNode === undefined) return null;
- if (path.charCodeAt(0) !== 47) {
- path = path.replace(FULL_PATH_REGEXP, "/");
- }
- if (this.ignoreDuplicateSlashes) {
- path = removeDuplicateSlashes(path);
- }
+ if (currentNode === void 0) return null;
+ if (path.charCodeAt(0) !== 47) path = path.replace(FULL_PATH_REGEXP, "/");
+ if (this.ignoreDuplicateSlashes) path = removeDuplicateSlashes(path);
let sanitizedUrl;
let querystring;
let shouldDecodeParam;
@@ -109974,13 +100265,9 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
} catch (error) {
return this._onBadUrl(path);
}
- if (this.ignoreTrailingSlash) {
- path = trimLastSlash(path);
- }
+ if (this.ignoreTrailingSlash) path = trimLastSlash(path);
const originPath = path;
- if (this.caseSensitive === false) {
- path = path.toLowerCase();
- }
+ if (this.caseSensitive === false) path = path.toLowerCase();
const maxParamLength = this.maxParamLength;
let pathIndex = currentNode.prefix.length;
const params = [];
@@ -109989,20 +100276,16 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
while (true) {
if (pathIndex === pathLen && currentNode.isLeafNode) {
const handle = currentNode.handlerStorage.getMatchingHandler(derivedConstraints);
- if (handle !== null) {
- return {
- handler: handle.handler,
- store: handle.store,
- params: handle._createParamsObject(params),
- searchParams: this.querystringParser(querystring)
- };
- }
+ if (handle !== null) return {
+ handler: handle.handler,
+ store: handle.store,
+ params: handle._createParamsObject(params),
+ searchParams: this.querystringParser(querystring)
+ };
}
let node = currentNode.getNextNode(path, pathIndex, brothersNodesStack, params.length);
if (node === null) {
- if (brothersNodesStack.length === 0) {
- return null;
- }
+ if (brothersNodesStack.length === 0) return null;
const brotherNodeState = brothersNodesStack.pop();
pathIndex = brotherNodeState.brotherPathIndex;
params.splice(brotherNodeState.paramsCount);
@@ -110015,35 +100298,25 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (currentNode.kind === NODE_TYPES.WILDCARD) {
let param = originPath.slice(pathIndex);
- if (shouldDecodeParam) {
- param = safeDecodeURIComponent(param);
- }
+ if (shouldDecodeParam) param = safeDecodeURIComponent(param);
params.push(param);
pathIndex = pathLen;
continue;
}
let paramEndIndex = originPath.indexOf("/", pathIndex);
- if (paramEndIndex === -1) {
- paramEndIndex = pathLen;
- }
+ if (paramEndIndex === -1) paramEndIndex = pathLen;
let param = originPath.slice(pathIndex, paramEndIndex);
- if (shouldDecodeParam) {
- param = safeDecodeURIComponent(param);
- }
+ if (shouldDecodeParam) param = safeDecodeURIComponent(param);
if (currentNode.isRegex) {
const matchedParameters = currentNode.regex.exec(param);
if (matchedParameters === null) continue;
for (let i = 1; i < matchedParameters.length; i++) {
const matchedParam = matchedParameters[i];
- if (matchedParam.length > maxParamLength) {
- return null;
- }
+ if (matchedParam.length > maxParamLength) return null;
params.push(matchedParam);
}
} else {
- if (param.length > maxParamLength) {
- return null;
- }
+ if (param.length > maxParamLength) return null;
params.push(param);
}
pathIndex = paramEndIndex;
@@ -110057,17 +100330,14 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
};
Router.prototype._defaultRoute = function(req, res, ctx) {
- if (this.defaultRoute !== null) {
- return ctx === undefined ? this.defaultRoute(req, res) : this.defaultRoute.call(ctx, req, res);
- } else {
+ if (this.defaultRoute !== null) return ctx === void 0 ? this.defaultRoute(req, res) : this.defaultRoute.call(ctx, req, res);
+ else {
res.statusCode = 404;
res.end();
}
};
Router.prototype._onBadUrl = function(path) {
- if (this.onBadUrl === null) {
- return null;
- }
+ if (this.onBadUrl === null) return null;
const onBadUrl = this.onBadUrl;
return {
handler: (req, res, ctx) => onBadUrl(path, req, res),
@@ -110079,7 +100349,7 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const method = options.method;
options.buildPrettyMeta = this.buildPrettyMeta.bind(this);
let tree = null;
- if (method === undefined) {
+ if (method === void 0) {
const { version, host, ...constraints } = this.constrainer.strategies;
constraints[httpMethodStrategy.name] = httpMethodStrategy;
const mergedRouter = new Router({
@@ -110099,9 +100369,7 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
mergedRouter._rebuild(mergedRoutes);
tree = mergedRouter.trees.MERGED;
- } else {
- tree = this.trees[method];
- }
+ } else tree = this.trees[method];
if (tree == null) return "(empty tree)";
return prettyPrintTree(tree, options);
};
@@ -110124,18 +100392,12 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return path.replace(/\/\/+/g, "/");
}
function trimLastSlash(path) {
- if (path.length > 1 && path.charCodeAt(path.length - 1) === 47) {
- return path.slice(0, -1);
- }
+ if (path.length > 1 && path.charCodeAt(path.length - 1) === 47) return path.slice(0, -1);
return path;
}
function trimRegExpStartAndEnd(regexString) {
- if (regexString.charCodeAt(1) === 94) {
- regexString = regexString.slice(0, 1) + regexString.slice(2);
- }
- if (regexString.charCodeAt(regexString.length - 2) === 36) {
- regexString = regexString.slice(0, regexString.length - 2) + regexString.slice(regexString.length - 1);
- }
+ if (regexString.charCodeAt(1) === 94) regexString = regexString.slice(0, 1) + regexString.slice(2);
+ if (regexString.charCodeAt(regexString.length - 2) === 36) regexString = regexString.slice(0, regexString.length - 2) + regexString.slice(regexString.length - 1);
return regexString;
}
function getClosingParenthensePosition(path, idx) {
@@ -110146,11 +100408,8 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
idx++;
continue;
}
- if (path[idx] === ")") {
- parentheses--;
- } else if (path[idx] === "(") {
- parentheses++;
- }
+ if (path[idx] === ")") parentheses--;
+ else if (path[idx] === "(") parentheses++;
if (!parentheses) return idx;
}
throw new TypeError("Invalid regexp expression in \"" + path + "\"");
@@ -110161,12 +100420,11 @@ var require_find_my_way = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return Object.assign({}, route.store);
}
}));
-
//#endregion
//#region ../node_modules/fastify/lib/headRoute.js
var require_headRoute = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function headRouteOnSendHandler(req, reply, payload, done) {
- if (payload === undefined) {
+ if (payload === void 0) {
reply.header("content-length", "0");
return done(null, null);
}
@@ -110187,7 +100445,6 @@ var require_headRoute = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = { parseHeadOnSendHandlers };
}));
-
//#endregion
//#region ../node_modules/fastify/lib/route.js
var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -110247,9 +100504,7 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
setDefaultRoute: function(defaultRoute) {
FSTDEP014();
- if (typeof defaultRoute !== "function") {
- throw new FST_ERR_DEFAULT_ROUTE_INVALID_TYPE();
- }
+ if (typeof defaultRoute !== "function") throw new FST_ERR_DEFAULT_ROUTE_INVALID_TYPE();
router.defaultRoute = defaultRoute;
},
routeHandler,
@@ -110273,22 +100528,14 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return router.constrainer.asyncStrategiesInUse.size > 0;
}
function prepareRoute({ method, url, options, handler, isFastify }) {
- if (typeof url !== "string") {
- throw new FST_ERR_INVALID_URL(typeof url);
- }
+ if (typeof url !== "string") throw new FST_ERR_INVALID_URL(typeof url);
if (!handler && typeof options === "function") {
handler = options;
options = {};
} else if (handler && typeof handler === "function") {
- if (Object.prototype.toString.call(options) !== "[object Object]") {
- throw new FST_ERR_ROUTE_OPTIONS_NOT_OBJ(method, url);
- } else if (options.handler) {
- if (typeof options.handler === "function") {
- throw new FST_ERR_ROUTE_DUPLICATED_HANDLER(method, url);
- } else {
- throw new FST_ERR_ROUTE_HANDLER_NOT_FN(method, url);
- }
- }
+ if (Object.prototype.toString.call(options) !== "[object Object]") throw new FST_ERR_ROUTE_OPTIONS_NOT_OBJ(method, url);
+ else if (options.handler) if (typeof options.handler === "function") throw new FST_ERR_ROUTE_DUPLICATED_HANDLER(method, url);
+ else throw new FST_ERR_ROUTE_HANDLER_NOT_FN(method, url);
}
options = Object.assign({}, options, {
method,
@@ -110310,15 +100557,12 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function findRoute(options) {
const route = router.find(options.method, options.url || "", options.constraints);
- if (route) {
- return {
- handler: route.handler,
- params: route.params,
- searchParams: route.searchParams
- };
- } else {
- return null;
- }
+ if (route) return {
+ handler: route.handler,
+ params: route.params,
+ searchParams: route.searchParams
+ };
+ else return null;
}
/**
* Route management
@@ -110327,69 +100571,56 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function route({ options, isFastify }) {
const opts = { ...options };
const { exposeHeadRoute } = opts;
- const hasRouteExposeHeadRouteFlag = exposeHeadRoute != null;
- const shouldExposeHead = hasRouteExposeHeadRouteFlag ? exposeHeadRoute : globalExposeHeadRoutes;
+ const shouldExposeHead = exposeHeadRoute != null ? exposeHeadRoute : globalExposeHeadRoutes;
const isGetRoute = opts.method === "GET" || Array.isArray(opts.method) && opts.method.includes("GET");
const isHeadRoute = opts.method === "HEAD" || Array.isArray(opts.method) && opts.method.includes("HEAD");
const headOpts = shouldExposeHead && isGetRoute ? { ...options } : null;
throwIfAlreadyStarted("Cannot add route!");
const path = opts.url || opts.path || "";
- if (Array.isArray(opts.method)) {
- for (var i = 0; i < opts.method.length; ++i) {
- opts.method[i] = normalizeAndValidateMethod(opts.method[i]);
- validateSchemaBodyOption(opts.method[i], path, opts.schema);
- }
- } else {
+ if (Array.isArray(opts.method)) for (var i = 0; i < opts.method.length; ++i) {
+ opts.method[i] = normalizeAndValidateMethod(opts.method[i]);
+ validateSchemaBodyOption(opts.method[i], path, opts.schema);
+ }
+ else {
opts.method = normalizeAndValidateMethod(opts.method);
validateSchemaBodyOption(opts.method, path, opts.schema);
}
- if (!opts.handler) {
- throw new FST_ERR_ROUTE_MISSING_HANDLER(opts.method, path);
- }
- if (opts.errorHandler !== undefined && typeof opts.errorHandler !== "function") {
- throw new FST_ERR_ROUTE_HANDLER_NOT_FN(opts.method, path);
- }
+ if (!opts.handler) throw new FST_ERR_ROUTE_MISSING_HANDLER(opts.method, path);
+ if (opts.errorHandler !== void 0 && typeof opts.errorHandler !== "function") throw new FST_ERR_ROUTE_HANDLER_NOT_FN(opts.method, path);
validateBodyLimitOption(opts.bodyLimit);
const prefix = this[kRoutePrefix];
- if (path === "/" && prefix.length > 0 && opts.method !== "HEAD") {
- switch (opts.prefixTrailingSlash) {
- case "slash":
- addNewRoute.call(this, {
- path,
- isFastify
- });
- break;
- case "no-slash":
- addNewRoute.call(this, {
- path: "",
- isFastify
- });
- break;
- case "both":
- default:
- addNewRoute.call(this, {
- path: "",
- isFastify
- });
- if (ignoreTrailingSlash !== true && (ignoreDuplicateSlashes !== true || !prefix.endsWith("/"))) {
- addNewRoute.call(this, {
- path,
- prefixing: true,
- isFastify
- });
- }
- }
- } else if (path[0] === "/" && prefix.endsWith("/")) {
- addNewRoute.call(this, {
- path: path.slice(1),
- isFastify
- });
- } else {
- addNewRoute.call(this, {
- path,
- isFastify
- });
+ if (path === "/" && prefix.length > 0 && opts.method !== "HEAD") switch (opts.prefixTrailingSlash) {
+ case "slash":
+ addNewRoute.call(this, {
+ path,
+ isFastify
+ });
+ break;
+ case "no-slash":
+ addNewRoute.call(this, {
+ path: "",
+ isFastify
+ });
+ break;
+ default:
+ addNewRoute.call(this, {
+ path: "",
+ isFastify
+ });
+ if (ignoreTrailingSlash !== true && (ignoreDuplicateSlashes !== true || !prefix.endsWith("/"))) addNewRoute.call(this, {
+ path,
+ prefixing: true,
+ isFastify
+ });
}
+ else if (path[0] === "/" && prefix.endsWith("/")) addNewRoute.call(this, {
+ path: path.slice(1),
+ isFastify
+ });
+ else addNewRoute.call(this, {
+ path,
+ isFastify
+ });
return this;
function addNewRoute({ path, prefixing = false, isFastify = false }) {
const url = prefix + path;
@@ -110398,42 +100629,19 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
opts.routePath = path;
opts.prefix = prefix;
opts.logLevel = opts.logLevel || this[kLogLevel];
- if (this[kLogSerializers] || opts.logSerializers) {
- opts.logSerializers = Object.assign(Object.create(this[kLogSerializers]), opts.logSerializers);
- }
- if (opts.attachValidation == null) {
- opts.attachValidation = false;
- }
- if (prefixing === false) {
- for (const hook of this[kHooks].onRoute) {
- hook.call(this, opts);
- }
- }
- for (const hook of lifecycleHooks) {
- if (opts && hook in opts) {
- if (Array.isArray(opts[hook])) {
- for (const func of opts[hook]) {
- if (typeof func !== "function") {
- throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(func));
- }
- if (hook === "onSend" || hook === "preSerialization" || hook === "onError" || hook === "preParsing") {
- if (func.constructor.name === "AsyncFunction" && func.length === 4) {
- throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
- }
- } else if (hook === "onRequestAbort") {
- if (func.constructor.name === "AsyncFunction" && func.length !== 1) {
- throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
- }
- } else {
- if (func.constructor.name === "AsyncFunction" && func.length === 3) {
- throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
- }
- }
- }
- } else if (opts[hook] !== undefined && typeof opts[hook] !== "function") {
- throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(opts[hook]));
- }
- }
+ if (this[kLogSerializers] || opts.logSerializers) opts.logSerializers = Object.assign(Object.create(this[kLogSerializers]), opts.logSerializers);
+ if (opts.attachValidation == null) opts.attachValidation = false;
+ if (prefixing === false) for (const hook of this[kHooks].onRoute) hook.call(this, opts);
+ for (const hook of lifecycleHooks) if (opts && hook in opts) {
+ if (Array.isArray(opts[hook])) for (const func of opts[hook]) {
+ if (typeof func !== "function") throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(func));
+ if (hook === "onSend" || hook === "preSerialization" || hook === "onError" || hook === "preParsing") {
+ if (func.constructor.name === "AsyncFunction" && func.length === 4) throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
+ } else if (hook === "onRequestAbort") {
+ if (func.constructor.name === "AsyncFunction" && func.length !== 1) throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
+ } else if (func.constructor.name === "AsyncFunction" && func.length === 3) throw new FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
+ }
+ else if (opts[hook] !== void 0 && typeof opts[hook] !== "function") throw new FST_ERR_HOOK_INVALID_HANDLER(hook, Object.prototype.toString.call(opts[hook]));
}
const constraints = opts.constraints || {};
const config = {
@@ -110466,17 +100674,12 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
const headHandler = router.findRoute("HEAD", opts.url, constraints);
const hasHEADHandler = headHandler !== null;
- if (isHeadRoute && hasHEADHandler && !context[kRouteByFastify] && headHandler.store[kRouteByFastify]) {
- router.off("HEAD", opts.url, constraints);
- }
+ if (isHeadRoute && hasHEADHandler && !context[kRouteByFastify] && headHandler.store[kRouteByFastify]) router.off("HEAD", opts.url, constraints);
try {
router.on(opts.method, opts.url, { constraints }, routeHandler, context);
} catch (error) {
if (!context[kRouteByFastify]) {
- const isDuplicatedRoute = error.message.includes(`Method '${opts.method}' already declared for route`);
- if (isDuplicatedRoute) {
- throw new FST_ERR_DUPLICATED_ROUTE(opts.method, opts.url);
- }
+ if (error.message.includes(`Method '${opts.method}' already declared for route`)) throw new FST_ERR_DUPLICATED_ROUTE(opts.method, opts.url);
throw error;
}
}
@@ -110493,28 +100696,20 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const toSet = this[kHooks][hook].concat(opts[hook] || []).map((h) => h.bind(this));
context[hook] = toSet.length ? toSet : null;
}
- while (!context.Request[kHasBeenDecorated] && context.Request.parent) {
- context.Request = context.Request.parent;
- }
- while (!context.Reply[kHasBeenDecorated] && context.Reply.parent) {
- context.Reply = context.Reply.parent;
- }
+ while (!context.Request[kHasBeenDecorated] && context.Request.parent) context.Request = context.Request.parent;
+ while (!context.Reply[kHasBeenDecorated] && context.Reply.parent) context.Reply = context.Reply.parent;
fourOhFour.setContext(this, context);
if (opts.schema) {
context.schema = normalizeSchema(opts, context.schema, this.initialConfig);
const schemaController = this[kSchemaController];
- if (!opts.validatorCompiler && (opts.schema.body || opts.schema.headers || opts.schema.querystring || opts.schema.params)) {
- schemaController.setupValidator(this[kOptions]);
- }
+ if (!opts.validatorCompiler && (opts.schema.body || opts.schema.headers || opts.schema.querystring || opts.schema.params)) schemaController.setupValidator(this[kOptions]);
try {
const isCustom = typeof opts?.validatorCompiler === "function" || schemaController.isCustomValidatorCompiler;
compileSchemasForValidation(context, opts.validatorCompiler || schemaController.validatorCompiler, isCustom);
} catch (error) {
throw new FST_ERR_SCH_VALIDATION_BUILD(opts.method, url, error.message);
}
- if (opts.schema.response && !opts.serializerCompiler) {
- schemaController.setupSerializer(this[kOptions]);
- }
+ if (opts.schema.response && !opts.serializerCompiler) schemaController.setupSerializer(this[kOptions]);
try {
compileSchemasForSerialization(context, opts.serializerCompiler || schemaController.serializerCompiler);
} catch (error) {
@@ -110535,49 +100730,40 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
isFastify: true
});
- } else if (hasHEADHandler && exposeHeadRoute) {
- FSTDEP007();
- }
+ } else if (hasHEADHandler && exposeHeadRoute) FSTDEP007();
}
}
function routeHandler(req, res, params, context, query) {
const id = getGenReqId(context.server, req);
const loggerOpts = { level: context.logLevel };
- if (context.logSerializers) {
- loggerOpts.serializers = context.logSerializers;
- }
+ if (context.logSerializers) loggerOpts.serializers = context.logSerializers;
const childLogger = createChildLogger(context, logger, req, id, loggerOpts);
childLogger[kDisableRequestLogging] = disableRequestLogging;
if (!validateHTTPVersion(req.httpVersion)) {
childLogger.info({ res: { statusCode: 505 } }, "request aborted - invalid HTTP version");
const message = "{\"error\":\"HTTP Version Not Supported\",\"message\":\"HTTP Version Not Supported\",\"statusCode\":505}";
- const headers = {
+ res.writeHead(505, {
"Content-Type": "application/json",
- "Content-Length": message.length
- };
- res.writeHead(505, headers);
+ "Content-Length": 94
+ });
res.end(message);
return;
}
if (closing === true) {
/* istanbul ignore next mac, windows */
- if (req.httpVersionMajor !== 2) {
- res.setHeader("Connection", "close");
- }
+ if (req.httpVersionMajor !== 2) res.setHeader("Connection", "close");
/* istanbul ignore else */
if (return503OnClosing) {
- const headers = {
+ res.writeHead(503, {
"Content-Type": "application/json",
"Content-Length": "80"
- };
- res.writeHead(503, headers);
+ });
res.end("{\"error\":\"Service Unavailable\",\"message\":\"Service Unavailable\",\"statusCode\":503}");
childLogger.info({ res: { statusCode: 503 } }, "request aborted - refusing to accept new requests as server is closing");
return;
}
}
- const connHeader = String.prototype.toLowerCase.call(req.headers.connection || "");
- if (connHeader === "keep-alive") {
+ if (String.prototype.toLowerCase.call(req.headers.connection || "") === "keep-alive") {
if (keepAliveConnections.has(req.socket) === false) {
keepAliveConnections.add(req.socket);
req.socket.on("close", removeTrackedSocket.bind({
@@ -110586,35 +100772,22 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));
}
}
- if (req.headers[kRequestAcceptVersion] !== undefined) {
+ if (req.headers[kRequestAcceptVersion] !== void 0) {
req.headers["accept-version"] = req.headers[kRequestAcceptVersion];
- req.headers[kRequestAcceptVersion] = undefined;
+ req.headers[kRequestAcceptVersion] = void 0;
}
const request = new context.Request(id, params, req, query, childLogger, context);
const reply = new context.Reply(res, request, childLogger);
- if (disableRequestLogging === false) {
- childLogger.info({ req: request }, "incoming request");
- }
- if (hasLogger === true || context.onResponse !== null) {
- setupResponseListeners(reply);
- }
- if (context.onRequest !== null) {
- onRequestHookRunner(context.onRequest, request, reply, runPreParsing);
- } else {
- runPreParsing(null, request, reply);
- }
- if (context.onRequestAbort !== null) {
- req.on("close", () => {
- /* istanbul ignore else */
- if (req.aborted) {
- onRequestAbortHookRunner(context.onRequestAbort, request, handleOnRequestAbortHooksErrors.bind(null, reply));
- }
- });
- }
+ if (disableRequestLogging === false) childLogger.info({ req: request }, "incoming request");
+ if (hasLogger === true || context.onResponse !== null) setupResponseListeners(reply);
+ if (context.onRequest !== null) onRequestHookRunner(context.onRequest, request, reply, runPreParsing);
+ else runPreParsing(null, request, reply);
+ if (context.onRequestAbort !== null) req.on("close", () => {
+ /* istanbul ignore else */
+ if (req.aborted) onRequestAbortHookRunner(context.onRequestAbort, request, handleOnRequestAbortHooksErrors.bind(null, reply));
+ });
if (context.onTimeout !== null) {
- if (!request.raw.socket._meta) {
- request.raw.socket.on("timeout", handleTimeout);
- }
+ if (!request.raw.socket._meta) request.raw.socket.on("timeout", handleTimeout);
request.raw.socket._meta = {
context,
request,
@@ -110624,34 +100797,24 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
function handleOnRequestAbortHooksErrors(reply, err) {
- if (err) {
- reply.log.error({ err }, "onRequestAborted hook failed");
- }
+ if (err) reply.log.error({ err }, "onRequestAborted hook failed");
}
function handleTimeout() {
const { context, request, reply } = this._meta;
onTimeoutHookRunner(context.onTimeout, request, reply, noop);
}
function normalizeAndValidateMethod(method) {
- if (typeof method !== "string") {
- throw new FST_ERR_ROUTE_METHOD_INVALID();
- }
+ if (typeof method !== "string") throw new FST_ERR_ROUTE_METHOD_INVALID();
method = method.toUpperCase();
- if (supportedMethods.indexOf(method) === -1) {
- throw new FST_ERR_ROUTE_METHOD_NOT_SUPPORTED(method);
- }
+ if (supportedMethods.indexOf(method) === -1) throw new FST_ERR_ROUTE_METHOD_NOT_SUPPORTED(method);
return method;
}
function validateSchemaBodyOption(method, path, schema) {
- if ((method === "GET" || method === "HEAD") && schema && schema.body) {
- throw new FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED(method, path);
- }
+ if ((method === "GET" || method === "HEAD") && schema && schema.body) throw new FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED(method, path);
}
function validateBodyLimitOption(bodyLimit) {
- if (bodyLimit === undefined) return;
- if (!Number.isInteger(bodyLimit) || bodyLimit <= 0) {
- throw new FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT(bodyLimit);
- }
+ if (bodyLimit === void 0) return;
+ if (!Number.isInteger(bodyLimit) || bodyLimit <= 0) throw new FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT(bodyLimit);
}
function runPreParsing(err, request, reply) {
if (reply.sent === true) return;
@@ -110661,11 +100824,8 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return;
}
request[kRequestPayloadStream] = request.raw;
- if (request[kRouteContext].preParsing !== null) {
- preParsingHookRunner(request[kRouteContext].preParsing, request, reply, handleRequest);
- } else {
- handleRequest(null, request, reply);
- }
+ if (request[kRouteContext].preParsing !== null) preParsingHookRunner(request[kRouteContext].preParsing, request, reply, handleRequest);
+ else handleRequest(null, request, reply);
}
/**
* Used within the route handler as a `net.Socket.close` event handler.
@@ -110681,7 +100841,6 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
validateBodyLimitOption
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/fourOhFour.js
var require_fourOhFour = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -110724,9 +100883,7 @@ var require_fourOhFour = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function basic404(request, reply) {
const { url, method } = request.raw;
const message = `Route ${method}:${url} not found`;
- if (!disableRequestLogging) {
- request.log.info(message);
- }
+ if (!disableRequestLogging) request.log.info(message);
reply.code(404).send({
message,
error: "Not Found",
@@ -110749,36 +100906,20 @@ var require_fourOhFour = /* @__PURE__ */ __commonJSMin(((exports, module) => {
context[kFourOhFourContext] = _404Context;
}
function setNotFoundHandler(opts, handler, avvio, routeHandler) {
- if (this[kCanSetNotFoundHandler] === undefined) {
- this[kCanSetNotFoundHandler] = true;
- }
- if (this[kFourOhFourContext] === undefined) {
- this[kFourOhFourContext] = null;
- }
+ if (this[kCanSetNotFoundHandler] === void 0) this[kCanSetNotFoundHandler] = true;
+ if (this[kFourOhFourContext] === void 0) this[kFourOhFourContext] = null;
const _fastify = this;
const prefix = this[kRoutePrefix] || "/";
- if (this[kCanSetNotFoundHandler] === false) {
- throw new Error(`Not found handler already set for Fastify instance with prefix: '${prefix}'`);
- }
+ if (this[kCanSetNotFoundHandler] === false) throw new Error(`Not found handler already set for Fastify instance with prefix: '${prefix}'`);
if (typeof opts === "object") {
- if (opts.preHandler) {
- if (Array.isArray(opts.preHandler)) {
- opts.preHandler = opts.preHandler.map((hook) => hook.bind(_fastify));
- } else {
- opts.preHandler = opts.preHandler.bind(_fastify);
- }
- }
- if (opts.preValidation) {
- if (Array.isArray(opts.preValidation)) {
- opts.preValidation = opts.preValidation.map((hook) => hook.bind(_fastify));
- } else {
- opts.preValidation = opts.preValidation.bind(_fastify);
- }
- }
+ if (opts.preHandler) if (Array.isArray(opts.preHandler)) opts.preHandler = opts.preHandler.map((hook) => hook.bind(_fastify));
+ else opts.preHandler = opts.preHandler.bind(_fastify);
+ if (opts.preValidation) if (Array.isArray(opts.preValidation)) opts.preValidation = opts.preValidation.map((hook) => hook.bind(_fastify));
+ else opts.preValidation = opts.preValidation.bind(_fastify);
}
if (typeof opts === "function") {
handler = opts;
- opts = undefined;
+ opts = void 0;
}
opts = opts || {};
if (handler) {
@@ -110831,7 +100972,6 @@ var require_fourOhFour = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
module.exports = fourOhFour;
}));
-
//#endregion
//#region ../node_modules/fastify/lib/configValidator.js
/* istanbul ignore file */
@@ -110972,1213 +101112,908 @@ var require_configValidator = /* @__PURE__ */ __commonJSMin(((exports, module) =
}
};
const func2 = Object.prototype.hasOwnProperty;
- const pattern0 = new RegExp("idle", "u");
+ const pattern0 = /* @__PURE__ */ new RegExp("idle", "u");
function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
let vErrors = null;
let errors = 0;
- if (errors === 0) {
- if (data && typeof data == "object" && !Array.isArray(data)) {
- if (data.connectionTimeout === undefined) {
- data.connectionTimeout = 0;
- }
- if (data.keepAliveTimeout === undefined) {
- data.keepAliveTimeout = 72e3;
- }
- if (data.maxRequestsPerSocket === undefined) {
- data.maxRequestsPerSocket = 0;
- }
- if (data.requestTimeout === undefined) {
- data.requestTimeout = 0;
- }
- if (data.bodyLimit === undefined) {
- data.bodyLimit = 1048576;
- }
- if (data.caseSensitive === undefined) {
- data.caseSensitive = true;
- }
- if (data.allowUnsafeRegex === undefined) {
- data.allowUnsafeRegex = false;
- }
- if (data.ignoreTrailingSlash === undefined) {
- data.ignoreTrailingSlash = false;
- }
- if (data.ignoreDuplicateSlashes === undefined) {
- data.ignoreDuplicateSlashes = false;
- }
- if (data.disableRequestLogging === undefined) {
- data.disableRequestLogging = false;
- }
- if (data.jsonShorthand === undefined) {
- data.jsonShorthand = true;
- }
- if (data.maxParamLength === undefined) {
- data.maxParamLength = 100;
- }
- if (data.onProtoPoisoning === undefined) {
- data.onProtoPoisoning = "error";
- }
- if (data.onConstructorPoisoning === undefined) {
- data.onConstructorPoisoning = "error";
- }
- if (data.pluginTimeout === undefined) {
- data.pluginTimeout = 1e4;
- }
- if (data.requestIdHeader === undefined) {
- data.requestIdHeader = "request-id";
- }
- if (data.requestIdLogLabel === undefined) {
- data.requestIdLogLabel = "reqId";
- }
- if (data.http2SessionTimeout === undefined) {
- data.http2SessionTimeout = 72e3;
- }
- if (data.exposeHeadRoutes === undefined) {
- data.exposeHeadRoutes = true;
- }
- if (data.useSemicolonDelimiter === undefined) {
- data.useSemicolonDelimiter = true;
- }
- const _errs1 = errors;
- for (const key0 in data) {
- if (!func2.call(schema11.properties, key0)) {
- delete data[key0];
+ if (errors === 0) if (data && typeof data == "object" && !Array.isArray(data)) {
+ if (data.connectionTimeout === void 0) data.connectionTimeout = 0;
+ if (data.keepAliveTimeout === void 0) data.keepAliveTimeout = 72e3;
+ if (data.maxRequestsPerSocket === void 0) data.maxRequestsPerSocket = 0;
+ if (data.requestTimeout === void 0) data.requestTimeout = 0;
+ if (data.bodyLimit === void 0) data.bodyLimit = 1048576;
+ if (data.caseSensitive === void 0) data.caseSensitive = true;
+ if (data.allowUnsafeRegex === void 0) data.allowUnsafeRegex = false;
+ if (data.ignoreTrailingSlash === void 0) data.ignoreTrailingSlash = false;
+ if (data.ignoreDuplicateSlashes === void 0) data.ignoreDuplicateSlashes = false;
+ if (data.disableRequestLogging === void 0) data.disableRequestLogging = false;
+ if (data.jsonShorthand === void 0) data.jsonShorthand = true;
+ if (data.maxParamLength === void 0) data.maxParamLength = 100;
+ if (data.onProtoPoisoning === void 0) data.onProtoPoisoning = "error";
+ if (data.onConstructorPoisoning === void 0) data.onConstructorPoisoning = "error";
+ if (data.pluginTimeout === void 0) data.pluginTimeout = 1e4;
+ if (data.requestIdHeader === void 0) data.requestIdHeader = "request-id";
+ if (data.requestIdLogLabel === void 0) data.requestIdLogLabel = "reqId";
+ if (data.http2SessionTimeout === void 0) data.http2SessionTimeout = 72e3;
+ if (data.exposeHeadRoutes === void 0) data.exposeHeadRoutes = true;
+ if (data.useSemicolonDelimiter === void 0) data.useSemicolonDelimiter = true;
+ const _errs1 = errors;
+ for (const key0 in data) if (!func2.call(schema11.properties, key0)) delete data[key0];
+ if (_errs1 === errors) {
+ let data0 = data.connectionTimeout;
+ const _errs2 = errors;
+ if (!(typeof data0 == "number" && !(data0 % 1) && !isNaN(data0) && isFinite(data0))) {
+ let dataType0 = typeof data0;
+ let coerced0 = void 0;
+ if (!(coerced0 !== void 0)) if (dataType0 === "boolean" || data0 === null || dataType0 === "string" && data0 && data0 == +data0 && !(data0 % 1)) coerced0 = +data0;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/connectionTimeout",
+ schemaPath: "#/properties/connectionTimeout/type",
+ keyword: "type",
+ params: { type: "integer" },
+ message: "must be integer"
+ }];
+ return false;
+ }
+ if (coerced0 !== void 0) {
+ data0 = coerced0;
+ if (data !== void 0) data["connectionTimeout"] = coerced0;
}
}
- if (_errs1 === errors) {
- let data0 = data.connectionTimeout;
- const _errs2 = errors;
- if (!(typeof data0 == "number" && !(data0 % 1) && !isNaN(data0) && isFinite(data0))) {
- let dataType0 = typeof data0;
- let coerced0 = undefined;
- if (!(coerced0 !== undefined)) {
- if (dataType0 === "boolean" || data0 === null || dataType0 === "string" && data0 && data0 == +data0 && !(data0 % 1)) {
- coerced0 = +data0;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/connectionTimeout",
- schemaPath: "#/properties/connectionTimeout/type",
- keyword: "type",
- params: { type: "integer" },
- message: "must be integer"
- }];
- return false;
- }
+ var valid0 = _errs2 === errors;
+ if (valid0) {
+ let data1 = data.keepAliveTimeout;
+ const _errs4 = errors;
+ if (!(typeof data1 == "number" && !(data1 % 1) && !isNaN(data1) && isFinite(data1))) {
+ let dataType1 = typeof data1;
+ let coerced1 = void 0;
+ if (!(coerced1 !== void 0)) if (dataType1 === "boolean" || data1 === null || dataType1 === "string" && data1 && data1 == +data1 && !(data1 % 1)) coerced1 = +data1;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/keepAliveTimeout",
+ schemaPath: "#/properties/keepAliveTimeout/type",
+ keyword: "type",
+ params: { type: "integer" },
+ message: "must be integer"
+ }];
+ return false;
}
- if (coerced0 !== undefined) {
- data0 = coerced0;
- if (data !== undefined) {
- data["connectionTimeout"] = coerced0;
- }
+ if (coerced1 !== void 0) {
+ data1 = coerced1;
+ if (data !== void 0) data["keepAliveTimeout"] = coerced1;
}
}
- var valid0 = _errs2 === errors;
+ var valid0 = _errs4 === errors;
if (valid0) {
- let data1 = data.keepAliveTimeout;
- const _errs4 = errors;
- if (!(typeof data1 == "number" && !(data1 % 1) && !isNaN(data1) && isFinite(data1))) {
- let dataType1 = typeof data1;
- let coerced1 = undefined;
- if (!(coerced1 !== undefined)) {
- if (dataType1 === "boolean" || data1 === null || dataType1 === "string" && data1 && data1 == +data1 && !(data1 % 1)) {
- coerced1 = +data1;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/keepAliveTimeout",
- schemaPath: "#/properties/keepAliveTimeout/type",
+ if (data.forceCloseConnections !== void 0) {
+ let data2 = data.forceCloseConnections;
+ const _errs6 = errors;
+ const _errs7 = errors;
+ let valid1 = false;
+ let passing0 = null;
+ const _errs8 = errors;
+ if (typeof data2 !== "string") {
+ let dataType2 = typeof data2;
+ let coerced2 = void 0;
+ if (!(coerced2 !== void 0)) if (dataType2 == "number" || dataType2 == "boolean") coerced2 = "" + data2;
+ else if (data2 === null) coerced2 = "";
+ else {
+ const err0 = {
+ instancePath: instancePath + "/forceCloseConnections",
+ schemaPath: "#/properties/forceCloseConnections/oneOf/0/type",
keyword: "type",
- params: { type: "integer" },
- message: "must be integer"
- }];
- return false;
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err0];
+ else vErrors.push(err0);
+ errors++;
}
- }
- if (coerced1 !== undefined) {
- data1 = coerced1;
- if (data !== undefined) {
- data["keepAliveTimeout"] = coerced1;
+ if (coerced2 !== void 0) {
+ data2 = coerced2;
+ if (data !== void 0) data["forceCloseConnections"] = coerced2;
}
}
- }
- var valid0 = _errs4 === errors;
- if (valid0) {
- if (data.forceCloseConnections !== undefined) {
- let data2 = data.forceCloseConnections;
- const _errs6 = errors;
- const _errs7 = errors;
- let valid1 = false;
- let passing0 = null;
- const _errs8 = errors;
- if (typeof data2 !== "string") {
- let dataType2 = typeof data2;
- let coerced2 = undefined;
- if (!(coerced2 !== undefined)) {
- if (dataType2 == "number" || dataType2 == "boolean") {
- coerced2 = "" + data2;
- } else if (data2 === null) {
- coerced2 = "";
- } else {
- const err0 = {
- instancePath: instancePath + "/forceCloseConnections",
- schemaPath: "#/properties/forceCloseConnections/oneOf/0/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err0];
- } else {
- vErrors.push(err0);
- }
- errors++;
- }
- }
- if (coerced2 !== undefined) {
- data2 = coerced2;
- if (data !== undefined) {
- data["forceCloseConnections"] = coerced2;
- }
- }
- }
- if (errors === _errs8) {
- if (typeof data2 === "string") {
- if (!pattern0.test(data2)) {
- const err1 = {
- instancePath: instancePath + "/forceCloseConnections",
- schemaPath: "#/properties/forceCloseConnections/oneOf/0/pattern",
- keyword: "pattern",
- params: { pattern: "idle" },
- message: "must match pattern \"" + "idle" + "\""
- };
- if (vErrors === null) {
- vErrors = [err1];
- } else {
- vErrors.push(err1);
- }
- errors++;
- }
- }
- }
- var _valid0 = _errs8 === errors;
- if (_valid0) {
- valid1 = true;
- passing0 = 0;
- }
- const _errs10 = errors;
- if (typeof data2 !== "boolean") {
- let coerced3 = undefined;
- if (!(coerced3 !== undefined)) {
- if (data2 === "false" || data2 === 0 || data2 === null) {
- coerced3 = false;
- } else if (data2 === "true" || data2 === 1) {
- coerced3 = true;
- } else {
- const err2 = {
- instancePath: instancePath + "/forceCloseConnections",
- schemaPath: "#/properties/forceCloseConnections/oneOf/1/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- };
- if (vErrors === null) {
- vErrors = [err2];
- } else {
- vErrors.push(err2);
- }
- errors++;
- }
- }
- if (coerced3 !== undefined) {
- data2 = coerced3;
- if (data !== undefined) {
- data["forceCloseConnections"] = coerced3;
- }
- }
- }
- var _valid0 = _errs10 === errors;
- if (_valid0 && valid1) {
- valid1 = false;
- passing0 = [passing0, 1];
- } else {
- if (_valid0) {
- valid1 = true;
- passing0 = 1;
+ if (errors === _errs8) {
+ if (typeof data2 === "string") {
+ if (!pattern0.test(data2)) {
+ const err1 = {
+ instancePath: instancePath + "/forceCloseConnections",
+ schemaPath: "#/properties/forceCloseConnections/oneOf/0/pattern",
+ keyword: "pattern",
+ params: { pattern: "idle" },
+ message: "must match pattern \"idle\""
+ };
+ if (vErrors === null) vErrors = [err1];
+ else vErrors.push(err1);
+ errors++;
}
}
- if (!valid1) {
- const err3 = {
+ }
+ var _valid0 = _errs8 === errors;
+ if (_valid0) {
+ valid1 = true;
+ passing0 = 0;
+ }
+ const _errs10 = errors;
+ if (typeof data2 !== "boolean") {
+ let coerced3 = void 0;
+ if (!(coerced3 !== void 0)) if (data2 === "false" || data2 === 0 || data2 === null) coerced3 = false;
+ else if (data2 === "true" || data2 === 1) coerced3 = true;
+ else {
+ const err2 = {
instancePath: instancePath + "/forceCloseConnections",
- schemaPath: "#/properties/forceCloseConnections/oneOf",
- keyword: "oneOf",
- params: { passingSchemas: passing0 },
- message: "must match exactly one schema in oneOf"
+ schemaPath: "#/properties/forceCloseConnections/oneOf/1/type",
+ keyword: "type",
+ params: { type: "boolean" },
+ message: "must be boolean"
};
- if (vErrors === null) {
- vErrors = [err3];
- } else {
- vErrors.push(err3);
- }
+ if (vErrors === null) vErrors = [err2];
+ else vErrors.push(err2);
errors++;
- validate10.errors = vErrors;
- return false;
- } else {
- errors = _errs7;
- if (vErrors !== null) {
- if (_errs7) {
- vErrors.length = _errs7;
- } else {
- vErrors = null;
- }
- }
}
- var valid0 = _errs6 === errors;
+ if (coerced3 !== void 0) {
+ data2 = coerced3;
+ if (data !== void 0) data["forceCloseConnections"] = coerced3;
+ }
+ }
+ var _valid0 = _errs10 === errors;
+ if (_valid0 && valid1) {
+ valid1 = false;
+ passing0 = [passing0, 1];
+ } else if (_valid0) {
+ valid1 = true;
+ passing0 = 1;
+ }
+ if (!valid1) {
+ const err3 = {
+ instancePath: instancePath + "/forceCloseConnections",
+ schemaPath: "#/properties/forceCloseConnections/oneOf",
+ keyword: "oneOf",
+ params: { passingSchemas: passing0 },
+ message: "must match exactly one schema in oneOf"
+ };
+ if (vErrors === null) vErrors = [err3];
+ else vErrors.push(err3);
+ errors++;
+ validate10.errors = vErrors;
+ return false;
} else {
- var valid0 = true;
+ errors = _errs7;
+ if (vErrors !== null) if (_errs7) vErrors.length = _errs7;
+ else vErrors = null;
+ }
+ var valid0 = _errs6 === errors;
+ } else var valid0 = true;
+ if (valid0) {
+ let data3 = data.maxRequestsPerSocket;
+ const _errs12 = errors;
+ if (!(typeof data3 == "number" && !(data3 % 1) && !isNaN(data3) && isFinite(data3)) && data3 !== null) {
+ let dataType4 = typeof data3;
+ let coerced4 = void 0;
+ if (!(coerced4 !== void 0)) if (dataType4 === "boolean" || data3 === null || dataType4 === "string" && data3 && data3 == +data3 && !(data3 % 1)) coerced4 = +data3;
+ else if (data3 === "" || data3 === 0 || data3 === false) coerced4 = null;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/maxRequestsPerSocket",
+ schemaPath: "#/properties/maxRequestsPerSocket/type",
+ keyword: "type",
+ params: { type: "integer" },
+ message: "must be integer"
+ }];
+ return false;
+ }
+ if (coerced4 !== void 0) {
+ data3 = coerced4;
+ if (data !== void 0) data["maxRequestsPerSocket"] = coerced4;
+ }
}
+ var valid0 = _errs12 === errors;
if (valid0) {
- let data3 = data.maxRequestsPerSocket;
- const _errs12 = errors;
- if (!(typeof data3 == "number" && !(data3 % 1) && !isNaN(data3) && isFinite(data3)) && data3 !== null) {
- let dataType4 = typeof data3;
- let coerced4 = undefined;
- if (!(coerced4 !== undefined)) {
- if (dataType4 === "boolean" || data3 === null || dataType4 === "string" && data3 && data3 == +data3 && !(data3 % 1)) {
- coerced4 = +data3;
- } else if (data3 === "" || data3 === 0 || data3 === false) {
- coerced4 = null;
- } else {
+ let data4 = data.requestTimeout;
+ const _errs15 = errors;
+ if (!(typeof data4 == "number" && !(data4 % 1) && !isNaN(data4) && isFinite(data4))) {
+ let dataType5 = typeof data4;
+ let coerced5 = void 0;
+ if (!(coerced5 !== void 0)) if (dataType5 === "boolean" || data4 === null || dataType5 === "string" && data4 && data4 == +data4 && !(data4 % 1)) coerced5 = +data4;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/requestTimeout",
+ schemaPath: "#/properties/requestTimeout/type",
+ keyword: "type",
+ params: { type: "integer" },
+ message: "must be integer"
+ }];
+ return false;
+ }
+ if (coerced5 !== void 0) {
+ data4 = coerced5;
+ if (data !== void 0) data["requestTimeout"] = coerced5;
+ }
+ }
+ var valid0 = _errs15 === errors;
+ if (valid0) {
+ let data5 = data.bodyLimit;
+ const _errs17 = errors;
+ if (!(typeof data5 == "number" && !(data5 % 1) && !isNaN(data5) && isFinite(data5))) {
+ let dataType6 = typeof data5;
+ let coerced6 = void 0;
+ if (!(coerced6 !== void 0)) if (dataType6 === "boolean" || data5 === null || dataType6 === "string" && data5 && data5 == +data5 && !(data5 % 1)) coerced6 = +data5;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/maxRequestsPerSocket",
- schemaPath: "#/properties/maxRequestsPerSocket/type",
+ instancePath: instancePath + "/bodyLimit",
+ schemaPath: "#/properties/bodyLimit/type",
keyword: "type",
params: { type: "integer" },
message: "must be integer"
}];
return false;
}
- }
- if (coerced4 !== undefined) {
- data3 = coerced4;
- if (data !== undefined) {
- data["maxRequestsPerSocket"] = coerced4;
+ if (coerced6 !== void 0) {
+ data5 = coerced6;
+ if (data !== void 0) data["bodyLimit"] = coerced6;
}
}
- }
- var valid0 = _errs12 === errors;
- if (valid0) {
- let data4 = data.requestTimeout;
- const _errs15 = errors;
- if (!(typeof data4 == "number" && !(data4 % 1) && !isNaN(data4) && isFinite(data4))) {
- let dataType5 = typeof data4;
- let coerced5 = undefined;
- if (!(coerced5 !== undefined)) {
- if (dataType5 === "boolean" || data4 === null || dataType5 === "string" && data4 && data4 == +data4 && !(data4 % 1)) {
- coerced5 = +data4;
- } else {
+ var valid0 = _errs17 === errors;
+ if (valid0) {
+ let data6 = data.caseSensitive;
+ const _errs19 = errors;
+ if (typeof data6 !== "boolean") {
+ let coerced7 = void 0;
+ if (!(coerced7 !== void 0)) if (data6 === "false" || data6 === 0 || data6 === null) coerced7 = false;
+ else if (data6 === "true" || data6 === 1) coerced7 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/requestTimeout",
- schemaPath: "#/properties/requestTimeout/type",
+ instancePath: instancePath + "/caseSensitive",
+ schemaPath: "#/properties/caseSensitive/type",
keyword: "type",
- params: { type: "integer" },
- message: "must be integer"
+ params: { type: "boolean" },
+ message: "must be boolean"
}];
return false;
}
- }
- if (coerced5 !== undefined) {
- data4 = coerced5;
- if (data !== undefined) {
- data["requestTimeout"] = coerced5;
+ if (coerced7 !== void 0) {
+ data6 = coerced7;
+ if (data !== void 0) data["caseSensitive"] = coerced7;
}
}
- }
- var valid0 = _errs15 === errors;
- if (valid0) {
- let data5 = data.bodyLimit;
- const _errs17 = errors;
- if (!(typeof data5 == "number" && !(data5 % 1) && !isNaN(data5) && isFinite(data5))) {
- let dataType6 = typeof data5;
- let coerced6 = undefined;
- if (!(coerced6 !== undefined)) {
- if (dataType6 === "boolean" || data5 === null || dataType6 === "string" && data5 && data5 == +data5 && !(data5 % 1)) {
- coerced6 = +data5;
- } else {
+ var valid0 = _errs19 === errors;
+ if (valid0) {
+ let data7 = data.allowUnsafeRegex;
+ const _errs21 = errors;
+ if (typeof data7 !== "boolean") {
+ let coerced8 = void 0;
+ if (!(coerced8 !== void 0)) if (data7 === "false" || data7 === 0 || data7 === null) coerced8 = false;
+ else if (data7 === "true" || data7 === 1) coerced8 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/bodyLimit",
- schemaPath: "#/properties/bodyLimit/type",
+ instancePath: instancePath + "/allowUnsafeRegex",
+ schemaPath: "#/properties/allowUnsafeRegex/type",
keyword: "type",
- params: { type: "integer" },
- message: "must be integer"
+ params: { type: "boolean" },
+ message: "must be boolean"
}];
return false;
}
- }
- if (coerced6 !== undefined) {
- data5 = coerced6;
- if (data !== undefined) {
- data["bodyLimit"] = coerced6;
+ if (coerced8 !== void 0) {
+ data7 = coerced8;
+ if (data !== void 0) data["allowUnsafeRegex"] = coerced8;
}
}
- }
- var valid0 = _errs17 === errors;
- if (valid0) {
- let data6 = data.caseSensitive;
- const _errs19 = errors;
- if (typeof data6 !== "boolean") {
- let coerced7 = undefined;
- if (!(coerced7 !== undefined)) {
- if (data6 === "false" || data6 === 0 || data6 === null) {
- coerced7 = false;
- } else if (data6 === "true" || data6 === 1) {
- coerced7 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/caseSensitive",
- schemaPath: "#/properties/caseSensitive/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
- }
- if (coerced7 !== undefined) {
- data6 = coerced7;
- if (data !== undefined) {
- data["caseSensitive"] = coerced7;
- }
- }
- }
- var valid0 = _errs19 === errors;
+ var valid0 = _errs21 === errors;
if (valid0) {
- let data7 = data.allowUnsafeRegex;
- const _errs21 = errors;
- if (typeof data7 !== "boolean") {
- let coerced8 = undefined;
- if (!(coerced8 !== undefined)) {
- if (data7 === "false" || data7 === 0 || data7 === null) {
- coerced8 = false;
- } else if (data7 === "true" || data7 === 1) {
- coerced8 = true;
- } else {
+ if (data.http2 !== void 0) {
+ let data8 = data.http2;
+ const _errs23 = errors;
+ if (typeof data8 !== "boolean") {
+ let coerced9 = void 0;
+ if (!(coerced9 !== void 0)) if (data8 === "false" || data8 === 0 || data8 === null) coerced9 = false;
+ else if (data8 === "true" || data8 === 1) coerced9 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/allowUnsafeRegex",
- schemaPath: "#/properties/allowUnsafeRegex/type",
+ instancePath: instancePath + "/http2",
+ schemaPath: "#/properties/http2/type",
keyword: "type",
params: { type: "boolean" },
message: "must be boolean"
}];
return false;
}
- }
- if (coerced8 !== undefined) {
- data7 = coerced8;
- if (data !== undefined) {
- data["allowUnsafeRegex"] = coerced8;
+ if (coerced9 !== void 0) {
+ data8 = coerced9;
+ if (data !== void 0) data["http2"] = coerced9;
}
}
- }
- var valid0 = _errs21 === errors;
+ var valid0 = _errs23 === errors;
+ } else var valid0 = true;
if (valid0) {
- if (data.http2 !== undefined) {
- let data8 = data.http2;
- const _errs23 = errors;
- if (typeof data8 !== "boolean") {
- let coerced9 = undefined;
- if (!(coerced9 !== undefined)) {
- if (data8 === "false" || data8 === 0 || data8 === null) {
- coerced9 = false;
- } else if (data8 === "true" || data8 === 1) {
- coerced9 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/http2",
- schemaPath: "#/properties/http2/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
+ if (data.https !== void 0) {
+ let data9 = data.https;
+ const _errs25 = errors;
+ const _errs26 = errors;
+ let valid2 = true;
+ const _errs27 = errors;
+ const _errs28 = errors;
+ const _errs29 = errors;
+ const _errs30 = errors;
+ let valid4 = false;
+ let passing1 = null;
+ const _errs31 = errors;
+ if (typeof data9 !== "boolean") {
+ let coerced10 = void 0;
+ if (!(coerced10 !== void 0)) if (data9 === "false" || data9 === 0 || data9 === null) coerced10 = false;
+ else if (data9 === "true" || data9 === 1) coerced10 = true;
+ else {
+ const err4 = {};
+ if (vErrors === null) vErrors = [err4];
+ else vErrors.push(err4);
+ errors++;
}
- if (coerced9 !== undefined) {
- data8 = coerced9;
- if (data !== undefined) {
- data["http2"] = coerced9;
- }
+ if (coerced10 !== void 0) {
+ data9 = coerced10;
+ if (data !== void 0) data["https"] = coerced10;
}
}
- var valid0 = _errs23 === errors;
- } else {
- var valid0 = true;
- }
- if (valid0) {
- if (data.https !== undefined) {
- let data9 = data.https;
- const _errs25 = errors;
- const _errs26 = errors;
- let valid2 = true;
- const _errs27 = errors;
- const _errs28 = errors;
- const _errs29 = errors;
- const _errs30 = errors;
- let valid4 = false;
- let passing1 = null;
- const _errs31 = errors;
- if (typeof data9 !== "boolean") {
- let coerced10 = undefined;
- if (!(coerced10 !== undefined)) {
- if (data9 === "false" || data9 === 0 || data9 === null) {
- coerced10 = false;
- } else if (data9 === "true" || data9 === 1) {
- coerced10 = true;
- } else {
- const err4 = {};
- if (vErrors === null) {
- vErrors = [err4];
- } else {
- vErrors.push(err4);
- }
- errors++;
- }
- }
- if (coerced10 !== undefined) {
- data9 = coerced10;
- if (data !== undefined) {
- data["https"] = coerced10;
- }
- }
+ var _valid2 = _errs31 === errors;
+ if (_valid2) {
+ valid4 = true;
+ passing1 = 0;
+ }
+ const _errs33 = errors;
+ if (data9 !== null) {
+ let coerced11 = void 0;
+ if (!(coerced11 !== void 0)) if (data9 === "" || data9 === 0 || data9 === false) coerced11 = null;
+ else {
+ const err5 = {};
+ if (vErrors === null) vErrors = [err5];
+ else vErrors.push(err5);
+ errors++;
+ }
+ if (coerced11 !== void 0) {
+ data9 = coerced11;
+ if (data !== void 0) data["https"] = coerced11;
}
- var _valid2 = _errs31 === errors;
+ }
+ var _valid2 = _errs33 === errors;
+ if (_valid2 && valid4) {
+ valid4 = false;
+ passing1 = [passing1, 1];
+ } else {
if (_valid2) {
valid4 = true;
- passing1 = 0;
+ passing1 = 1;
}
- const _errs33 = errors;
- if (data9 !== null) {
- let coerced11 = undefined;
- if (!(coerced11 !== undefined)) {
- if (data9 === "" || data9 === 0 || data9 === false) {
- coerced11 = null;
- } else {
- const err5 = {};
- if (vErrors === null) {
- vErrors = [err5];
- } else {
- vErrors.push(err5);
- }
- errors++;
- }
- }
- if (coerced11 !== undefined) {
- data9 = coerced11;
- if (data !== undefined) {
- data["https"] = coerced11;
- }
- }
- }
- var _valid2 = _errs33 === errors;
- if (_valid2 && valid4) {
- valid4 = false;
- passing1 = [passing1, 1];
- } else {
- if (_valid2) {
- valid4 = true;
- passing1 = 1;
- }
- const _errs35 = errors;
- if (errors === _errs35) {
- if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
- let missing0;
- if (data9.allowHTTP1 === undefined && (missing0 = "allowHTTP1")) {
- const err6 = {};
- if (vErrors === null) {
- vErrors = [err6];
- } else {
- vErrors.push(err6);
- }
- errors++;
- } else {
- const _errs37 = errors;
- for (const key1 in data9) {
- if (!(key1 === "allowHTTP1")) {
- delete data9[key1];
+ const _errs35 = errors;
+ if (errors === _errs35) if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
+ let missing0;
+ if (data9.allowHTTP1 === void 0 && "allowHTTP1") {
+ const err6 = {};
+ if (vErrors === null) vErrors = [err6];
+ else vErrors.push(err6);
+ errors++;
+ } else {
+ const _errs37 = errors;
+ for (const key1 in data9) if (!(key1 === "allowHTTP1")) delete data9[key1];
+ if (_errs37 === errors) {
+ if (data9.allowHTTP1 !== void 0) {
+ let data10 = data9.allowHTTP1;
+ if (typeof data10 !== "boolean") {
+ let coerced12 = void 0;
+ if (!(coerced12 !== void 0)) if (data10 === "false" || data10 === 0 || data10 === null) coerced12 = false;
+ else if (data10 === "true" || data10 === 1) coerced12 = true;
+ else {
+ const err7 = {};
+ if (vErrors === null) vErrors = [err7];
+ else vErrors.push(err7);
+ errors++;
}
- }
- if (_errs37 === errors) {
- if (data9.allowHTTP1 !== undefined) {
- let data10 = data9.allowHTTP1;
- if (typeof data10 !== "boolean") {
- let coerced12 = undefined;
- if (!(coerced12 !== undefined)) {
- if (data10 === "false" || data10 === 0 || data10 === null) {
- coerced12 = false;
- } else if (data10 === "true" || data10 === 1) {
- coerced12 = true;
- } else {
- const err7 = {};
- if (vErrors === null) {
- vErrors = [err7];
- } else {
- vErrors.push(err7);
- }
- errors++;
- }
- }
- if (coerced12 !== undefined) {
- data10 = coerced12;
- if (data9 !== undefined) {
- data9["allowHTTP1"] = coerced12;
- }
- }
- }
+ if (coerced12 !== void 0) {
+ data10 = coerced12;
+ if (data9 !== void 0) data9["allowHTTP1"] = coerced12;
}
}
}
- } else {
- const err8 = {};
- if (vErrors === null) {
- vErrors = [err8];
- } else {
- vErrors.push(err8);
- }
- errors++;
- }
- }
- var _valid2 = _errs35 === errors;
- if (_valid2 && valid4) {
- valid4 = false;
- passing1 = [passing1, 2];
- } else {
- if (_valid2) {
- valid4 = true;
- passing1 = 2;
}
}
- }
- if (!valid4) {
- const err9 = {};
- if (vErrors === null) {
- vErrors = [err9];
- } else {
- vErrors.push(err9);
- }
- errors++;
} else {
- errors = _errs30;
- if (vErrors !== null) {
- if (_errs30) {
- vErrors.length = _errs30;
- } else {
- vErrors = null;
- }
- }
- }
- var valid3 = _errs29 === errors;
- if (valid3) {
- const err10 = {};
- if (vErrors === null) {
- vErrors = [err10];
- } else {
- vErrors.push(err10);
- }
+ const err8 = {};
+ if (vErrors === null) vErrors = [err8];
+ else vErrors.push(err8);
errors++;
- } else {
- errors = _errs28;
- if (vErrors !== null) {
- if (_errs28) {
- vErrors.length = _errs28;
- } else {
- vErrors = null;
- }
- }
- }
- var _valid1 = _errs27 === errors;
- errors = _errs26;
- if (vErrors !== null) {
- if (_errs26) {
- vErrors.length = _errs26;
- } else {
- vErrors = null;
- }
}
- if (_valid1) {
- const _errs40 = errors;
- data["https"] = true;
- var _valid1 = _errs40 === errors;
- valid2 = _valid1;
+ var _valid2 = _errs35 === errors;
+ if (_valid2 && valid4) {
+ valid4 = false;
+ passing1 = [passing1, 2];
+ } else if (_valid2) {
+ valid4 = true;
+ passing1 = 2;
}
- if (!valid2) {
- const err11 = {
- instancePath: instancePath + "/https",
- schemaPath: "#/properties/https/if",
- keyword: "if",
- params: { failingKeyword: "then" },
- message: "must match \"then\" schema"
- };
- if (vErrors === null) {
- vErrors = [err11];
- } else {
- vErrors.push(err11);
- }
- errors++;
- validate10.errors = vErrors;
+ }
+ if (!valid4) {
+ const err9 = {};
+ if (vErrors === null) vErrors = [err9];
+ else vErrors.push(err9);
+ errors++;
+ } else {
+ errors = _errs30;
+ if (vErrors !== null) if (_errs30) vErrors.length = _errs30;
+ else vErrors = null;
+ }
+ if (_errs29 === errors) {
+ const err10 = {};
+ if (vErrors === null) vErrors = [err10];
+ else vErrors.push(err10);
+ errors++;
+ } else {
+ errors = _errs28;
+ if (vErrors !== null) if (_errs28) vErrors.length = _errs28;
+ else vErrors = null;
+ }
+ var _valid1 = _errs27 === errors;
+ errors = _errs26;
+ if (vErrors !== null) if (_errs26) vErrors.length = _errs26;
+ else vErrors = null;
+ if (_valid1) {
+ const _errs40 = errors;
+ data["https"] = true;
+ var _valid1 = _errs40 === errors;
+ valid2 = _valid1;
+ }
+ if (!valid2) {
+ const err11 = {
+ instancePath: instancePath + "/https",
+ schemaPath: "#/properties/https/if",
+ keyword: "if",
+ params: { failingKeyword: "then" },
+ message: "must match \"then\" schema"
+ };
+ if (vErrors === null) vErrors = [err11];
+ else vErrors.push(err11);
+ errors++;
+ validate10.errors = vErrors;
+ return false;
+ }
+ var valid0 = _errs25 === errors;
+ } else var valid0 = true;
+ if (valid0) {
+ let data11 = data.ignoreTrailingSlash;
+ const _errs41 = errors;
+ if (typeof data11 !== "boolean") {
+ let coerced13 = void 0;
+ if (!(coerced13 !== void 0)) if (data11 === "false" || data11 === 0 || data11 === null) coerced13 = false;
+ else if (data11 === "true" || data11 === 1) coerced13 = true;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/ignoreTrailingSlash",
+ schemaPath: "#/properties/ignoreTrailingSlash/type",
+ keyword: "type",
+ params: { type: "boolean" },
+ message: "must be boolean"
+ }];
return false;
}
- var valid0 = _errs25 === errors;
- } else {
- var valid0 = true;
+ if (coerced13 !== void 0) {
+ data11 = coerced13;
+ if (data !== void 0) data["ignoreTrailingSlash"] = coerced13;
+ }
}
+ var valid0 = _errs41 === errors;
if (valid0) {
- let data11 = data.ignoreTrailingSlash;
- const _errs41 = errors;
- if (typeof data11 !== "boolean") {
- let coerced13 = undefined;
- if (!(coerced13 !== undefined)) {
- if (data11 === "false" || data11 === 0 || data11 === null) {
- coerced13 = false;
- } else if (data11 === "true" || data11 === 1) {
- coerced13 = true;
- } else {
+ let data12 = data.ignoreDuplicateSlashes;
+ const _errs43 = errors;
+ if (typeof data12 !== "boolean") {
+ let coerced14 = void 0;
+ if (!(coerced14 !== void 0)) if (data12 === "false" || data12 === 0 || data12 === null) coerced14 = false;
+ else if (data12 === "true" || data12 === 1) coerced14 = true;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/ignoreDuplicateSlashes",
+ schemaPath: "#/properties/ignoreDuplicateSlashes/type",
+ keyword: "type",
+ params: { type: "boolean" },
+ message: "must be boolean"
+ }];
+ return false;
+ }
+ if (coerced14 !== void 0) {
+ data12 = coerced14;
+ if (data !== void 0) data["ignoreDuplicateSlashes"] = coerced14;
+ }
+ }
+ var valid0 = _errs43 === errors;
+ if (valid0) {
+ let data13 = data.disableRequestLogging;
+ const _errs45 = errors;
+ if (typeof data13 !== "boolean") {
+ let coerced15 = void 0;
+ if (!(coerced15 !== void 0)) if (data13 === "false" || data13 === 0 || data13 === null) coerced15 = false;
+ else if (data13 === "true" || data13 === 1) coerced15 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/ignoreTrailingSlash",
- schemaPath: "#/properties/ignoreTrailingSlash/type",
+ instancePath: instancePath + "/disableRequestLogging",
+ schemaPath: "#/properties/disableRequestLogging/type",
keyword: "type",
params: { type: "boolean" },
message: "must be boolean"
}];
return false;
}
- }
- if (coerced13 !== undefined) {
- data11 = coerced13;
- if (data !== undefined) {
- data["ignoreTrailingSlash"] = coerced13;
+ if (coerced15 !== void 0) {
+ data13 = coerced15;
+ if (data !== void 0) data["disableRequestLogging"] = coerced15;
}
}
- }
- var valid0 = _errs41 === errors;
- if (valid0) {
- let data12 = data.ignoreDuplicateSlashes;
- const _errs43 = errors;
- if (typeof data12 !== "boolean") {
- let coerced14 = undefined;
- if (!(coerced14 !== undefined)) {
- if (data12 === "false" || data12 === 0 || data12 === null) {
- coerced14 = false;
- } else if (data12 === "true" || data12 === 1) {
- coerced14 = true;
- } else {
+ var valid0 = _errs45 === errors;
+ if (valid0) {
+ let data14 = data.jsonShorthand;
+ const _errs47 = errors;
+ if (typeof data14 !== "boolean") {
+ let coerced16 = void 0;
+ if (!(coerced16 !== void 0)) if (data14 === "false" || data14 === 0 || data14 === null) coerced16 = false;
+ else if (data14 === "true" || data14 === 1) coerced16 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/ignoreDuplicateSlashes",
- schemaPath: "#/properties/ignoreDuplicateSlashes/type",
+ instancePath: instancePath + "/jsonShorthand",
+ schemaPath: "#/properties/jsonShorthand/type",
keyword: "type",
params: { type: "boolean" },
message: "must be boolean"
}];
return false;
}
- }
- if (coerced14 !== undefined) {
- data12 = coerced14;
- if (data !== undefined) {
- data["ignoreDuplicateSlashes"] = coerced14;
+ if (coerced16 !== void 0) {
+ data14 = coerced16;
+ if (data !== void 0) data["jsonShorthand"] = coerced16;
}
}
- }
- var valid0 = _errs43 === errors;
- if (valid0) {
- let data13 = data.disableRequestLogging;
- const _errs45 = errors;
- if (typeof data13 !== "boolean") {
- let coerced15 = undefined;
- if (!(coerced15 !== undefined)) {
- if (data13 === "false" || data13 === 0 || data13 === null) {
- coerced15 = false;
- } else if (data13 === "true" || data13 === 1) {
- coerced15 = true;
- } else {
+ var valid0 = _errs47 === errors;
+ if (valid0) {
+ let data15 = data.maxParamLength;
+ const _errs49 = errors;
+ if (!(typeof data15 == "number" && !(data15 % 1) && !isNaN(data15) && isFinite(data15))) {
+ let dataType17 = typeof data15;
+ let coerced17 = void 0;
+ if (!(coerced17 !== void 0)) if (dataType17 === "boolean" || data15 === null || dataType17 === "string" && data15 && data15 == +data15 && !(data15 % 1)) coerced17 = +data15;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/disableRequestLogging",
- schemaPath: "#/properties/disableRequestLogging/type",
+ instancePath: instancePath + "/maxParamLength",
+ schemaPath: "#/properties/maxParamLength/type",
keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
+ params: { type: "integer" },
+ message: "must be integer"
}];
return false;
}
- }
- if (coerced15 !== undefined) {
- data13 = coerced15;
- if (data !== undefined) {
- data["disableRequestLogging"] = coerced15;
+ if (coerced17 !== void 0) {
+ data15 = coerced17;
+ if (data !== void 0) data["maxParamLength"] = coerced17;
}
}
- }
- var valid0 = _errs45 === errors;
- if (valid0) {
- let data14 = data.jsonShorthand;
- const _errs47 = errors;
- if (typeof data14 !== "boolean") {
- let coerced16 = undefined;
- if (!(coerced16 !== undefined)) {
- if (data14 === "false" || data14 === 0 || data14 === null) {
- coerced16 = false;
- } else if (data14 === "true" || data14 === 1) {
- coerced16 = true;
- } else {
+ var valid0 = _errs49 === errors;
+ if (valid0) {
+ let data16 = data.onProtoPoisoning;
+ const _errs51 = errors;
+ if (typeof data16 !== "string") {
+ let dataType18 = typeof data16;
+ let coerced18 = void 0;
+ if (!(coerced18 !== void 0)) if (dataType18 == "number" || dataType18 == "boolean") coerced18 = "" + data16;
+ else if (data16 === null) coerced18 = "";
+ else {
validate10.errors = [{
- instancePath: instancePath + "/jsonShorthand",
- schemaPath: "#/properties/jsonShorthand/type",
+ instancePath: instancePath + "/onProtoPoisoning",
+ schemaPath: "#/properties/onProtoPoisoning/type",
keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
+ params: { type: "string" },
+ message: "must be string"
}];
return false;
}
- }
- if (coerced16 !== undefined) {
- data14 = coerced16;
- if (data !== undefined) {
- data["jsonShorthand"] = coerced16;
+ if (coerced18 !== void 0) {
+ data16 = coerced18;
+ if (data !== void 0) data["onProtoPoisoning"] = coerced18;
}
}
- }
- var valid0 = _errs47 === errors;
- if (valid0) {
- let data15 = data.maxParamLength;
- const _errs49 = errors;
- if (!(typeof data15 == "number" && !(data15 % 1) && !isNaN(data15) && isFinite(data15))) {
- let dataType17 = typeof data15;
- let coerced17 = undefined;
- if (!(coerced17 !== undefined)) {
- if (dataType17 === "boolean" || data15 === null || dataType17 === "string" && data15 && data15 == +data15 && !(data15 % 1)) {
- coerced17 = +data15;
- } else {
+ var valid0 = _errs51 === errors;
+ if (valid0) {
+ let data17 = data.onConstructorPoisoning;
+ const _errs53 = errors;
+ if (typeof data17 !== "string") {
+ let dataType19 = typeof data17;
+ let coerced19 = void 0;
+ if (!(coerced19 !== void 0)) if (dataType19 == "number" || dataType19 == "boolean") coerced19 = "" + data17;
+ else if (data17 === null) coerced19 = "";
+ else {
validate10.errors = [{
- instancePath: instancePath + "/maxParamLength",
- schemaPath: "#/properties/maxParamLength/type",
+ instancePath: instancePath + "/onConstructorPoisoning",
+ schemaPath: "#/properties/onConstructorPoisoning/type",
keyword: "type",
- params: { type: "integer" },
- message: "must be integer"
+ params: { type: "string" },
+ message: "must be string"
}];
return false;
}
- }
- if (coerced17 !== undefined) {
- data15 = coerced17;
- if (data !== undefined) {
- data["maxParamLength"] = coerced17;
+ if (coerced19 !== void 0) {
+ data17 = coerced19;
+ if (data !== void 0) data["onConstructorPoisoning"] = coerced19;
}
}
- }
- var valid0 = _errs49 === errors;
- if (valid0) {
- let data16 = data.onProtoPoisoning;
- const _errs51 = errors;
- if (typeof data16 !== "string") {
- let dataType18 = typeof data16;
- let coerced18 = undefined;
- if (!(coerced18 !== undefined)) {
- if (dataType18 == "number" || dataType18 == "boolean") {
- coerced18 = "" + data16;
- } else if (data16 === null) {
- coerced18 = "";
- } else {
+ var valid0 = _errs53 === errors;
+ if (valid0) {
+ let data18 = data.pluginTimeout;
+ const _errs55 = errors;
+ if (!(typeof data18 == "number" && !(data18 % 1) && !isNaN(data18) && isFinite(data18))) {
+ let dataType20 = typeof data18;
+ let coerced20 = void 0;
+ if (!(coerced20 !== void 0)) if (dataType20 === "boolean" || data18 === null || dataType20 === "string" && data18 && data18 == +data18 && !(data18 % 1)) coerced20 = +data18;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/onProtoPoisoning",
- schemaPath: "#/properties/onProtoPoisoning/type",
+ instancePath: instancePath + "/pluginTimeout",
+ schemaPath: "#/properties/pluginTimeout/type",
keyword: "type",
- params: { type: "string" },
- message: "must be string"
+ params: { type: "integer" },
+ message: "must be integer"
}];
return false;
}
- }
- if (coerced18 !== undefined) {
- data16 = coerced18;
- if (data !== undefined) {
- data["onProtoPoisoning"] = coerced18;
+ if (coerced20 !== void 0) {
+ data18 = coerced20;
+ if (data !== void 0) data["pluginTimeout"] = coerced20;
}
}
- }
- var valid0 = _errs51 === errors;
- if (valid0) {
- let data17 = data.onConstructorPoisoning;
- const _errs53 = errors;
- if (typeof data17 !== "string") {
- let dataType19 = typeof data17;
- let coerced19 = undefined;
- if (!(coerced19 !== undefined)) {
- if (dataType19 == "number" || dataType19 == "boolean") {
- coerced19 = "" + data17;
- } else if (data17 === null) {
- coerced19 = "";
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/onConstructorPoisoning",
- schemaPath: "#/properties/onConstructorPoisoning/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- }];
- return false;
- }
+ var valid0 = _errs55 === errors;
+ if (valid0) {
+ let data19 = data.requestIdHeader;
+ const _errs57 = errors;
+ const _errs58 = errors;
+ let valid6 = false;
+ const _errs59 = errors;
+ if (!(data19 === false)) {
+ const err12 = {
+ instancePath: instancePath + "/requestIdHeader",
+ schemaPath: "#/properties/requestIdHeader/anyOf/0/enum",
+ keyword: "enum",
+ params: { allowedValues: schema11.properties.requestIdHeader.anyOf[0].enum },
+ message: "must be equal to one of the allowed values"
+ };
+ if (vErrors === null) vErrors = [err12];
+ else vErrors.push(err12);
+ errors++;
}
- if (coerced19 !== undefined) {
- data17 = coerced19;
- if (data !== undefined) {
- data["onConstructorPoisoning"] = coerced19;
+ var _valid3 = _errs59 === errors;
+ valid6 = valid6 || _valid3;
+ if (!valid6) {
+ const _errs60 = errors;
+ if (typeof data19 !== "string") {
+ let dataType21 = typeof data19;
+ let coerced21 = void 0;
+ if (!(coerced21 !== void 0)) if (dataType21 == "number" || dataType21 == "boolean") coerced21 = "" + data19;
+ else if (data19 === null) coerced21 = "";
+ else {
+ const err13 = {
+ instancePath: instancePath + "/requestIdHeader",
+ schemaPath: "#/properties/requestIdHeader/anyOf/1/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err13];
+ else vErrors.push(err13);
+ errors++;
+ }
+ if (coerced21 !== void 0) {
+ data19 = coerced21;
+ if (data !== void 0) data["requestIdHeader"] = coerced21;
+ }
}
+ var _valid3 = _errs60 === errors;
+ valid6 = valid6 || _valid3;
}
- }
- var valid0 = _errs53 === errors;
- if (valid0) {
- let data18 = data.pluginTimeout;
- const _errs55 = errors;
- if (!(typeof data18 == "number" && !(data18 % 1) && !isNaN(data18) && isFinite(data18))) {
- let dataType20 = typeof data18;
- let coerced20 = undefined;
- if (!(coerced20 !== undefined)) {
- if (dataType20 === "boolean" || data18 === null || dataType20 === "string" && data18 && data18 == +data18 && !(data18 % 1)) {
- coerced20 = +data18;
- } else {
+ if (!valid6) {
+ const err14 = {
+ instancePath: instancePath + "/requestIdHeader",
+ schemaPath: "#/properties/requestIdHeader/anyOf",
+ keyword: "anyOf",
+ params: {},
+ message: "must match a schema in anyOf"
+ };
+ if (vErrors === null) vErrors = [err14];
+ else vErrors.push(err14);
+ errors++;
+ validate10.errors = vErrors;
+ return false;
+ } else {
+ errors = _errs58;
+ if (vErrors !== null) if (_errs58) vErrors.length = _errs58;
+ else vErrors = null;
+ }
+ var valid0 = _errs57 === errors;
+ if (valid0) {
+ let data20 = data.requestIdLogLabel;
+ const _errs62 = errors;
+ if (typeof data20 !== "string") {
+ let dataType22 = typeof data20;
+ let coerced22 = void 0;
+ if (!(coerced22 !== void 0)) if (dataType22 == "number" || dataType22 == "boolean") coerced22 = "" + data20;
+ else if (data20 === null) coerced22 = "";
+ else {
validate10.errors = [{
- instancePath: instancePath + "/pluginTimeout",
- schemaPath: "#/properties/pluginTimeout/type",
+ instancePath: instancePath + "/requestIdLogLabel",
+ schemaPath: "#/properties/requestIdLogLabel/type",
keyword: "type",
- params: { type: "integer" },
- message: "must be integer"
+ params: { type: "string" },
+ message: "must be string"
}];
return false;
}
- }
- if (coerced20 !== undefined) {
- data18 = coerced20;
- if (data !== undefined) {
- data["pluginTimeout"] = coerced20;
- }
- }
- }
- var valid0 = _errs55 === errors;
- if (valid0) {
- let data19 = data.requestIdHeader;
- const _errs57 = errors;
- const _errs58 = errors;
- let valid6 = false;
- const _errs59 = errors;
- if (!(data19 === false)) {
- const err12 = {
- instancePath: instancePath + "/requestIdHeader",
- schemaPath: "#/properties/requestIdHeader/anyOf/0/enum",
- keyword: "enum",
- params: { allowedValues: schema11.properties.requestIdHeader.anyOf[0].enum },
- message: "must be equal to one of the allowed values"
- };
- if (vErrors === null) {
- vErrors = [err12];
- } else {
- vErrors.push(err12);
+ if (coerced22 !== void 0) {
+ data20 = coerced22;
+ if (data !== void 0) data["requestIdLogLabel"] = coerced22;
}
- errors++;
}
- var _valid3 = _errs59 === errors;
- valid6 = valid6 || _valid3;
- if (!valid6) {
- const _errs60 = errors;
- if (typeof data19 !== "string") {
- let dataType21 = typeof data19;
- let coerced21 = undefined;
- if (!(coerced21 !== undefined)) {
- if (dataType21 == "number" || dataType21 == "boolean") {
- coerced21 = "" + data19;
- } else if (data19 === null) {
- coerced21 = "";
- } else {
- const err13 = {
- instancePath: instancePath + "/requestIdHeader",
- schemaPath: "#/properties/requestIdHeader/anyOf/1/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err13];
- } else {
- vErrors.push(err13);
- }
- errors++;
- }
- }
- if (coerced21 !== undefined) {
- data19 = coerced21;
- if (data !== undefined) {
- data["requestIdHeader"] = coerced21;
- }
+ var valid0 = _errs62 === errors;
+ if (valid0) {
+ let data21 = data.http2SessionTimeout;
+ const _errs64 = errors;
+ if (!(typeof data21 == "number" && !(data21 % 1) && !isNaN(data21) && isFinite(data21))) {
+ let dataType23 = typeof data21;
+ let coerced23 = void 0;
+ if (!(coerced23 !== void 0)) if (dataType23 === "boolean" || data21 === null || dataType23 === "string" && data21 && data21 == +data21 && !(data21 % 1)) coerced23 = +data21;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/http2SessionTimeout",
+ schemaPath: "#/properties/http2SessionTimeout/type",
+ keyword: "type",
+ params: { type: "integer" },
+ message: "must be integer"
+ }];
+ return false;
}
- }
- var _valid3 = _errs60 === errors;
- valid6 = valid6 || _valid3;
- }
- if (!valid6) {
- const err14 = {
- instancePath: instancePath + "/requestIdHeader",
- schemaPath: "#/properties/requestIdHeader/anyOf",
- keyword: "anyOf",
- params: {},
- message: "must match a schema in anyOf"
- };
- if (vErrors === null) {
- vErrors = [err14];
- } else {
- vErrors.push(err14);
- }
- errors++;
- validate10.errors = vErrors;
- return false;
- } else {
- errors = _errs58;
- if (vErrors !== null) {
- if (_errs58) {
- vErrors.length = _errs58;
- } else {
- vErrors = null;
+ if (coerced23 !== void 0) {
+ data21 = coerced23;
+ if (data !== void 0) data["http2SessionTimeout"] = coerced23;
}
}
- }
- var valid0 = _errs57 === errors;
- if (valid0) {
- let data20 = data.requestIdLogLabel;
- const _errs62 = errors;
- if (typeof data20 !== "string") {
- let dataType22 = typeof data20;
- let coerced22 = undefined;
- if (!(coerced22 !== undefined)) {
- if (dataType22 == "number" || dataType22 == "boolean") {
- coerced22 = "" + data20;
- } else if (data20 === null) {
- coerced22 = "";
- } else {
+ var valid0 = _errs64 === errors;
+ if (valid0) {
+ let data22 = data.exposeHeadRoutes;
+ const _errs66 = errors;
+ if (typeof data22 !== "boolean") {
+ let coerced24 = void 0;
+ if (!(coerced24 !== void 0)) if (data22 === "false" || data22 === 0 || data22 === null) coerced24 = false;
+ else if (data22 === "true" || data22 === 1) coerced24 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/requestIdLogLabel",
- schemaPath: "#/properties/requestIdLogLabel/type",
+ instancePath: instancePath + "/exposeHeadRoutes",
+ schemaPath: "#/properties/exposeHeadRoutes/type",
keyword: "type",
- params: { type: "string" },
- message: "must be string"
+ params: { type: "boolean" },
+ message: "must be boolean"
}];
return false;
}
- }
- if (coerced22 !== undefined) {
- data20 = coerced22;
- if (data !== undefined) {
- data["requestIdLogLabel"] = coerced22;
+ if (coerced24 !== void 0) {
+ data22 = coerced24;
+ if (data !== void 0) data["exposeHeadRoutes"] = coerced24;
}
}
- }
- var valid0 = _errs62 === errors;
- if (valid0) {
- let data21 = data.http2SessionTimeout;
- const _errs64 = errors;
- if (!(typeof data21 == "number" && !(data21 % 1) && !isNaN(data21) && isFinite(data21))) {
- let dataType23 = typeof data21;
- let coerced23 = undefined;
- if (!(coerced23 !== undefined)) {
- if (dataType23 === "boolean" || data21 === null || dataType23 === "string" && data21 && data21 == +data21 && !(data21 % 1)) {
- coerced23 = +data21;
- } else {
+ var valid0 = _errs66 === errors;
+ if (valid0) {
+ let data23 = data.useSemicolonDelimiter;
+ const _errs68 = errors;
+ if (typeof data23 !== "boolean") {
+ let coerced25 = void 0;
+ if (!(coerced25 !== void 0)) if (data23 === "false" || data23 === 0 || data23 === null) coerced25 = false;
+ else if (data23 === "true" || data23 === 1) coerced25 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/http2SessionTimeout",
- schemaPath: "#/properties/http2SessionTimeout/type",
+ instancePath: instancePath + "/useSemicolonDelimiter",
+ schemaPath: "#/properties/useSemicolonDelimiter/type",
keyword: "type",
- params: { type: "integer" },
- message: "must be integer"
+ params: { type: "boolean" },
+ message: "must be boolean"
}];
return false;
}
- }
- if (coerced23 !== undefined) {
- data21 = coerced23;
- if (data !== undefined) {
- data["http2SessionTimeout"] = coerced23;
- }
- }
- }
- var valid0 = _errs64 === errors;
- if (valid0) {
- let data22 = data.exposeHeadRoutes;
- const _errs66 = errors;
- if (typeof data22 !== "boolean") {
- let coerced24 = undefined;
- if (!(coerced24 !== undefined)) {
- if (data22 === "false" || data22 === 0 || data22 === null) {
- coerced24 = false;
- } else if (data22 === "true" || data22 === 1) {
- coerced24 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/exposeHeadRoutes",
- schemaPath: "#/properties/exposeHeadRoutes/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
- }
- if (coerced24 !== undefined) {
- data22 = coerced24;
- if (data !== undefined) {
- data["exposeHeadRoutes"] = coerced24;
- }
+ if (coerced25 !== void 0) {
+ data23 = coerced25;
+ if (data !== void 0) data["useSemicolonDelimiter"] = coerced25;
}
}
- var valid0 = _errs66 === errors;
+ var valid0 = _errs68 === errors;
if (valid0) {
- let data23 = data.useSemicolonDelimiter;
- const _errs68 = errors;
- if (typeof data23 !== "boolean") {
- let coerced25 = undefined;
- if (!(coerced25 !== undefined)) {
- if (data23 === "false" || data23 === 0 || data23 === null) {
- coerced25 = false;
- } else if (data23 === "true" || data23 === 1) {
- coerced25 = true;
- } else {
+ if (data.versioning !== void 0) {
+ let data24 = data.versioning;
+ const _errs70 = errors;
+ if (errors === _errs70) if (data24 && typeof data24 == "object" && !Array.isArray(data24)) {
+ let missing1;
+ if (data24.storage === void 0 && (missing1 = "storage") || data24.deriveVersion === void 0 && (missing1 = "deriveVersion")) {
validate10.errors = [{
- instancePath: instancePath + "/useSemicolonDelimiter",
- schemaPath: "#/properties/useSemicolonDelimiter/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
+ instancePath: instancePath + "/versioning",
+ schemaPath: "#/properties/versioning/required",
+ keyword: "required",
+ params: { missingProperty: missing1 },
+ message: "must have required property '" + missing1 + "'"
}];
return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/versioning",
+ schemaPath: "#/properties/versioning/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ }];
+ return false;
}
- if (coerced25 !== undefined) {
- data23 = coerced25;
- if (data !== undefined) {
- data["useSemicolonDelimiter"] = coerced25;
- }
- }
- }
- var valid0 = _errs68 === errors;
- if (valid0) {
- if (data.versioning !== undefined) {
- let data24 = data.versioning;
- const _errs70 = errors;
- if (errors === _errs70) {
- if (data24 && typeof data24 == "object" && !Array.isArray(data24)) {
- let missing1;
- if (data24.storage === undefined && (missing1 = "storage") || data24.deriveVersion === undefined && (missing1 = "deriveVersion")) {
- validate10.errors = [{
- instancePath: instancePath + "/versioning",
- schemaPath: "#/properties/versioning/required",
- keyword: "required",
- params: { missingProperty: missing1 },
- message: "must have required property '" + missing1 + "'"
- }];
- return false;
- }
- } else {
+ var valid0 = _errs70 === errors;
+ } else var valid0 = true;
+ if (valid0) if (data.constraints !== void 0) {
+ let data25 = data.constraints;
+ const _errs73 = errors;
+ if (errors === _errs73) if (data25 && typeof data25 == "object" && !Array.isArray(data25)) for (const key2 in data25) {
+ let data26 = data25[key2];
+ const _errs76 = errors;
+ if (errors === _errs76) if (data26 && typeof data26 == "object" && !Array.isArray(data26)) {
+ let missing2;
+ if (data26.name === void 0 && (missing2 = "name") || data26.storage === void 0 && (missing2 = "storage") || data26.validate === void 0 && (missing2 = "validate") || data26.deriveConstraint === void 0 && (missing2 = "deriveConstraint")) {
validate10.errors = [{
- instancePath: instancePath + "/versioning",
- schemaPath: "#/properties/versioning/type",
- keyword: "type",
- params: { type: "object" },
- message: "must be object"
+ instancePath: instancePath + "/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),
+ schemaPath: "#/properties/constraints/additionalProperties/required",
+ keyword: "required",
+ params: { missingProperty: missing2 },
+ message: "must have required property '" + missing2 + "'"
}];
return false;
- }
- }
- var valid0 = _errs70 === errors;
- } else {
- var valid0 = true;
- }
- if (valid0) {
- if (data.constraints !== undefined) {
- let data25 = data.constraints;
- const _errs73 = errors;
- if (errors === _errs73) {
- if (data25 && typeof data25 == "object" && !Array.isArray(data25)) {
- for (const key2 in data25) {
- let data26 = data25[key2];
- const _errs76 = errors;
- if (errors === _errs76) {
- if (data26 && typeof data26 == "object" && !Array.isArray(data26)) {
- let missing2;
- if (data26.name === undefined && (missing2 = "name") || data26.storage === undefined && (missing2 = "storage") || data26.validate === undefined && (missing2 = "validate") || data26.deriveConstraint === undefined && (missing2 = "deriveConstraint")) {
- validate10.errors = [{
- instancePath: instancePath + "/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),
- schemaPath: "#/properties/constraints/additionalProperties/required",
- keyword: "required",
- params: { missingProperty: missing2 },
- message: "must have required property '" + missing2 + "'"
- }];
- return false;
- } else {
- if (data26.name !== undefined) {
- let data27 = data26.name;
- if (typeof data27 !== "string") {
- let dataType26 = typeof data27;
- let coerced26 = undefined;
- if (!(coerced26 !== undefined)) {
- if (dataType26 == "number" || dataType26 == "boolean") {
- coerced26 = "" + data27;
- } else if (data27 === null) {
- coerced26 = "";
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/name",
- schemaPath: "#/properties/constraints/additionalProperties/properties/name/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- }];
- return false;
- }
- }
- if (coerced26 !== undefined) {
- data27 = coerced26;
- if (data26 !== undefined) {
- data26["name"] = coerced26;
- }
- }
- }
- }
- }
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),
- schemaPath: "#/properties/constraints/additionalProperties/type",
- keyword: "type",
- params: { type: "object" },
- message: "must be object"
- }];
- return false;
- }
- }
- var valid7 = _errs76 === errors;
- if (!valid7) {
- break;
- }
+ } else if (data26.name !== void 0) {
+ let data27 = data26.name;
+ if (typeof data27 !== "string") {
+ let dataType26 = typeof data27;
+ let coerced26 = void 0;
+ if (!(coerced26 !== void 0)) if (dataType26 == "number" || dataType26 == "boolean") coerced26 = "" + data27;
+ else if (data27 === null) coerced26 = "";
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1") + "/name",
+ schemaPath: "#/properties/constraints/additionalProperties/properties/name/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ }];
+ return false;
+ }
+ if (coerced26 !== void 0) {
+ data27 = coerced26;
+ if (data26 !== void 0) data26["name"] = coerced26;
}
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/constraints",
- schemaPath: "#/properties/constraints/type",
- keyword: "type",
- params: { type: "object" },
- message: "must be object"
- }];
- return false;
}
}
- var valid0 = _errs73 === errors;
} else {
- var valid0 = true;
+ validate10.errors = [{
+ instancePath: instancePath + "/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),
+ schemaPath: "#/properties/constraints/additionalProperties/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ }];
+ return false;
}
+ if (!(_errs76 === errors)) break;
}
- }
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/constraints",
+ schemaPath: "#/properties/constraints/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ }];
+ return false;
+ }
+ var valid0 = _errs73 === errors;
+ } else var valid0 = true;
}
}
}
@@ -112202,16 +102037,16 @@ var require_configValidator = /* @__PURE__ */ __commonJSMin(((exports, module) =
}
}
}
- } else {
- validate10.errors = [{
- instancePath,
- schemaPath: "#/type",
- keyword: "type",
- params: { type: "object" },
- message: "must be object"
- }];
- return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath,
+ schemaPath: "#/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ }];
+ return false;
}
validate10.errors = vErrors;
return errors === 0;
@@ -112239,7 +102074,6 @@ var require_configValidator = /* @__PURE__ */ __commonJSMin(((exports, module) =
"useSemicolonDelimiter": true
};
}));
-
//#endregion
//#region ../node_modules/fastify/lib/initialConfigValidation.js
var require_initialConfigValidation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -112262,9 +102096,7 @@ var require_initialConfigValidation = /* @__PURE__ */ __commonJSMin(((exports, m
const properties = Object.getOwnPropertyNames(object);
for (const name of properties) {
const value = object[name];
- if (ArrayBuffer.isView(value) && !(value instanceof DataView)) {
- continue;
- }
+ if (ArrayBuffer.isView(value) && !(value instanceof DataView)) continue;
object[name] = value && typeof value === "object" ? deepFreezeObject(value) : value;
}
return Object.freeze(object);
@@ -112273,7 +102105,6 @@ var require_initialConfigValidation = /* @__PURE__ */ __commonJSMin(((exports, m
module.exports.defaultInitOptions = validate.defaultInitOptions;
module.exports.utils = { deepFreezeObject };
}));
-
//#endregion
//#region ../node_modules/fastify/lib/pluginOverride.js
var require_pluginOverride = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -112306,28 +102137,18 @@ var require_pluginOverride = /* @__PURE__ */ __commonJSMin(((exports, module) =>
instance.getSchemas = instance[kSchemaController].getSchemas.bind(instance[kSchemaController]);
instance[pluginUtils.kRegisteredPlugins] = Object.create(instance[pluginUtils.kRegisteredPlugins]);
instance[kPluginNameChain] = [fnName];
- if (instance[kLogSerializers] || opts.logSerializers) {
- instance[kLogSerializers] = Object.assign(Object.create(instance[kLogSerializers]), opts.logSerializers);
- }
- if (opts.prefix) {
- instance[kFourOhFour].arrange404(instance);
- }
+ if (instance[kLogSerializers] || opts.logSerializers) instance[kLogSerializers] = Object.assign(Object.create(instance[kLogSerializers]), opts.logSerializers);
+ if (opts.prefix) instance[kFourOhFour].arrange404(instance);
for (const hook of instance[kHooks].onRegister) hook.call(this, instance, opts);
return instance;
};
function buildRoutePrefix(instancePrefix, pluginPrefix) {
- if (!pluginPrefix) {
- return instancePrefix;
- }
- if (instancePrefix.endsWith("/") && pluginPrefix[0] === "/") {
- pluginPrefix = pluginPrefix.slice(1);
- } else if (pluginPrefix[0] !== "/") {
- pluginPrefix = "/" + pluginPrefix;
- }
+ if (!pluginPrefix) return instancePrefix;
+ if (instancePrefix.endsWith("/") && pluginPrefix[0] === "/") pluginPrefix = pluginPrefix.slice(1);
+ else if (pluginPrefix[0] !== "/") pluginPrefix = "/" + pluginPrefix;
return instancePrefix + pluginPrefix;
}
}));
-
//#endregion
//#region ../node_modules/fastify/lib/noop-set.js
var require_noop_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -112342,7 +102163,6 @@ var require_noop_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
};
}));
-
//#endregion
//#region ../node_modules/cookie/index.js
/*!
@@ -112430,9 +102250,7 @@ var require_cookie = /* @__PURE__ */ __commonJSMin(((exports) => {
* @public
*/
function parse(str, opt) {
- if (typeof str !== "string") {
- throw new TypeError("argument str must be a string");
- }
+ if (typeof str !== "string") throw new TypeError("argument str must be a string");
var obj = {};
var len = str.length;
if (len < 2) return obj;
@@ -112444,9 +102262,8 @@ var require_cookie = /* @__PURE__ */ __commonJSMin(((exports) => {
eqIdx = str.indexOf("=", index);
if (eqIdx === -1) break;
endIdx = str.indexOf(";", index);
- if (endIdx === -1) {
- endIdx = len;
- } else if (eqIdx > endIdx) {
+ if (endIdx === -1) endIdx = len;
+ else if (eqIdx > endIdx) {
index = str.lastIndexOf(";", eqIdx - 1) + 1;
continue;
}
@@ -112460,8 +102277,7 @@ var require_cookie = /* @__PURE__ */ __commonJSMin(((exports) => {
valStartIdx++;
valEndIdx--;
}
- var val = str.slice(valStartIdx, valEndIdx);
- obj[key] = tryDecode(val, dec);
+ obj[key] = tryDecode(str.slice(valStartIdx, valEndIdx), dec);
}
index = endIdx + 1;
} while (index < len);
@@ -112498,85 +102314,59 @@ var require_cookie = /* @__PURE__ */ __commonJSMin(((exports) => {
*/
function serialize(name, val, opt) {
var enc = opt && opt.encode || encodeURIComponent;
- if (typeof enc !== "function") {
- throw new TypeError("option encode is invalid");
- }
- if (!cookieNameRegExp.test(name)) {
- throw new TypeError("argument name is invalid");
- }
+ if (typeof enc !== "function") throw new TypeError("option encode is invalid");
+ if (!cookieNameRegExp.test(name)) throw new TypeError("argument name is invalid");
var value = enc(val);
- if (!cookieValueRegExp.test(value)) {
- throw new TypeError("argument val is invalid");
- }
+ if (!cookieValueRegExp.test(value)) throw new TypeError("argument val is invalid");
var str = name + "=" + value;
if (!opt) return str;
if (null != opt.maxAge) {
var maxAge = Math.floor(opt.maxAge);
- if (!isFinite(maxAge)) {
- throw new TypeError("option maxAge is invalid");
- }
+ if (!isFinite(maxAge)) throw new TypeError("option maxAge is invalid");
str += "; Max-Age=" + maxAge;
}
if (opt.domain) {
- if (!domainValueRegExp.test(opt.domain)) {
- throw new TypeError("option domain is invalid");
- }
+ if (!domainValueRegExp.test(opt.domain)) throw new TypeError("option domain is invalid");
str += "; Domain=" + opt.domain;
}
if (opt.path) {
- if (!pathValueRegExp.test(opt.path)) {
- throw new TypeError("option path is invalid");
- }
+ if (!pathValueRegExp.test(opt.path)) throw new TypeError("option path is invalid");
str += "; Path=" + opt.path;
}
if (opt.expires) {
var expires = opt.expires;
- if (!isDate(expires) || isNaN(expires.valueOf())) {
- throw new TypeError("option expires is invalid");
- }
+ if (!isDate(expires) || isNaN(expires.valueOf())) throw new TypeError("option expires is invalid");
str += "; Expires=" + expires.toUTCString();
}
- if (opt.httpOnly) {
- str += "; HttpOnly";
- }
- if (opt.secure) {
- str += "; Secure";
- }
- if (opt.partitioned) {
- str += "; Partitioned";
- }
- if (opt.priority) {
- var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
- switch (priority) {
- case "low":
- str += "; Priority=Low";
- break;
- case "medium":
- str += "; Priority=Medium";
- break;
- case "high":
- str += "; Priority=High";
- break;
- default: throw new TypeError("option priority is invalid");
- }
+ if (opt.httpOnly) str += "; HttpOnly";
+ if (opt.secure) str += "; Secure";
+ if (opt.partitioned) str += "; Partitioned";
+ if (opt.priority) switch (typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority) {
+ case "low":
+ str += "; Priority=Low";
+ break;
+ case "medium":
+ str += "; Priority=Medium";
+ break;
+ case "high":
+ str += "; Priority=High";
+ break;
+ default: throw new TypeError("option priority is invalid");
}
- if (opt.sameSite) {
- var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite;
- switch (sameSite) {
- case true:
- str += "; SameSite=Strict";
- break;
- case "lax":
- str += "; SameSite=Lax";
- break;
- case "strict":
- str += "; SameSite=Strict";
- break;
- case "none":
- str += "; SameSite=None";
- break;
- default: throw new TypeError("option sameSite is invalid");
- }
+ if (opt.sameSite) switch (typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite) {
+ case true:
+ str += "; SameSite=Strict";
+ break;
+ case "lax":
+ str += "; SameSite=Lax";
+ break;
+ case "strict":
+ str += "; SameSite=Strict";
+ break;
+ case "none":
+ str += "; SameSite=None";
+ break;
+ default: throw new TypeError("option sameSite is invalid");
}
return str;
}
@@ -112613,7 +102403,6 @@ var require_cookie = /* @__PURE__ */ __commonJSMin(((exports) => {
}
}
}));
-
//#endregion
//#region ../node_modules/light-my-request/lib/parse-url.js
var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -112627,17 +102416,13 @@ var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* @return {URL}
*/
module.exports = function parseURL(url, query) {
- if ((typeof url === "string" || Object.prototype.toString.call(url) === "[object String]") && url.startsWith("//")) {
- url = BASE_URL + url;
- }
+ if ((typeof url === "string" || Object.prototype.toString.call(url) === "[object String]") && url.startsWith("//")) url = BASE_URL + url;
const result = typeof url === "object" ? Object.assign(new URL$1(BASE_URL), url) : new URL$1(url, BASE_URL);
if (typeof query === "string") {
query = new URLSearchParams(query);
for (const key of query.keys()) {
result.searchParams.delete(key);
- for (const value of query.getAll(key)) {
- result.searchParams.append(key, value);
- }
+ for (const value of query.getAll(key)) result.searchParams.append(key, value);
}
} else {
const merged = Object.assign({}, url.query, query);
@@ -112645,18 +102430,13 @@ var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const value = merged[key];
if (Array.isArray(value)) {
result.searchParams.delete(key);
- for (const param of value) {
- result.searchParams.append(key, param);
- }
- } else {
- result.searchParams.set(key, value);
- }
+ for (const param of value) result.searchParams.append(key, param);
+ } else result.searchParams.set(key, value);
}
}
return result;
};
}));
-
//#endregion
//#region ../node_modules/light-my-request/lib/form-data.js
var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -112675,37 +102455,31 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n");
const linebreak = new Uint8Array([13, 10]);
async function* asyncIterator() {
- for (const [name, value] of formdata) {
- if (typeof value === "string") {
- yield textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n`);
- yield textEncoder.encode(`${normalizeLinefeeds(value)}\r\n`);
- } else {
- let header = `${prefix}; name="${escape(normalizeLinefeeds(name))}"`;
- value.name && (header += `; filename="${escape(value.name)}"`);
- header += `\r\nContent-Type: ${value.type || "application/octet-stream"}\r\n\r\n`;
- yield textEncoder.encode(header);
- /* istanbul ignore else */
- if (value.stream) {
- yield* value.stream();
- } else {
- /* istanbul ignore next */
- yield value;
- }
- yield linebreak;
- }
+ for (const [name, value] of formdata) if (typeof value === "string") {
+ yield textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n`);
+ yield textEncoder.encode(`${normalizeLinefeeds(value)}\r\n`);
+ } else {
+ let header = `${prefix}; name="${escape(normalizeLinefeeds(name))}"`;
+ value.name && (header += `; filename="${escape(value.name)}"`);
+ header += `\r\nContent-Type: ${value.type || "application/octet-stream"}\r\n\r\n`;
+ yield textEncoder.encode(header);
+ /* istanbul ignore else */
+ if (value.stream) yield* value.stream();
+ else
+ /* istanbul ignore next */
+ yield value;
+ yield linebreak;
}
yield textEncoder.encode(`--${boundary}--`);
}
- const stream = Readable$7.from(asyncIterator());
return {
- stream,
+ stream: Readable$7.from(asyncIterator()),
contentType: `multipart/form-data; boundary=${boundary}`
};
}
module.exports.isFormDataLike = isFormDataLike;
module.exports.formDataToStream = formDataToStream;
}));
-
//#endregion
//#region ../node_modules/light-my-request/lib/request.js
var require_request$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -112762,12 +102536,10 @@ var require_request$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _CustomLMRRequest(obj) {
Request.call(obj, {
...options,
- Request: undefined
+ Request: void 0
});
Object.assign(this, obj);
- for (const fn of Object.keys(Request.prototype)) {
- this.constructor.prototype[fn] = Request.prototype[fn];
- }
+ for (const fn of Object.keys(Request.prototype)) this.constructor.prototype[fn] = Request.prototype[fn];
util$8.inherits(this.constructor, options.Request);
return this;
}
@@ -112799,24 +102571,20 @@ var require_request$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const headers = options.headers || {};
for (const field in headers) {
const fieldLowerCase = field.toLowerCase();
- if ((fieldLowerCase === "user-agent" || fieldLowerCase === "content-type") && headers[field] === undefined) {
- this.headers[fieldLowerCase] = undefined;
+ if ((fieldLowerCase === "user-agent" || fieldLowerCase === "content-type") && headers[field] === void 0) {
+ this.headers[fieldLowerCase] = void 0;
continue;
}
const value = headers[field];
- assert$36(value !== undefined, "invalid value \"undefined\" for header " + field);
+ assert$36(value !== void 0, "invalid value \"undefined\" for header " + field);
this.headers[fieldLowerCase] = "" + value;
}
- if ("user-agent" in this.headers === false) {
- this.headers["user-agent"] = "lightMyRequest";
- }
+ if ("user-agent" in this.headers === false) this.headers["user-agent"] = "lightMyRequest";
this.headers.host = this.headers.host || options.authority || hostHeaderFromURL(parsedURL);
if (options.cookies) {
const { cookies } = options;
const cookieValues = Object.keys(cookies).map((key) => cookie.serialize(key, cookies[key]));
- if (this.headers.cookie) {
- cookieValues.unshift(this.headers.cookie);
- }
+ if (this.headers.cookie) cookieValues.unshift(this.headers.cookie);
this.headers.cookie = cookieValues.join("; ");
}
this.socket = new MockSocket(options.remoteAddress || "127.0.0.1");
@@ -112837,16 +102605,10 @@ var require_request$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (payload && typeof payload !== "string" && !payloadResume && !Buffer.isBuffer(payload)) {
payload = JSON.stringify(payload);
- if ("content-type" in this.headers === false) {
- this.headers["content-type"] = "application/json";
- }
- }
- if (payload && !payloadResume && !Object.prototype.hasOwnProperty.call(this.headers, "content-length")) {
- this.headers["content-length"] = (Buffer.isBuffer(payload) ? payload.length : Buffer.byteLength(payload)).toString();
- }
- for (const header of Object.keys(this.headers)) {
- this.rawHeaders.push(header, this.headers[header]);
+ if ("content-type" in this.headers === false) this.headers["content-type"] = "application/json";
}
+ if (payload && !payloadResume && !Object.prototype.hasOwnProperty.call(this.headers, "content-length")) this.headers["content-length"] = (Buffer.isBuffer(payload) ? payload.length : Buffer.byteLength(payload)).toString();
+ for (const header of Object.keys(this.headers)) this.rawHeaders.push(header, this.headers[header]);
this._lightMyRequest = {
payload,
isDone: false,
@@ -112854,18 +102616,14 @@ var require_request$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
};
const signal = options.signal;
/* istanbul ignore if */
- if (signal) {
- addAbortSignal(signal, this);
- }
+ if (signal) addAbortSignal(signal, this);
return this;
}
util$8.inherits(Request, Readable$6);
util$8.inherits(CustomRequest, Request);
Request.prototype.prepare = function(next) {
const payload = this._lightMyRequest.payload;
- if (!payload || typeof payload.resume !== "function") {
- return next();
- }
+ if (!payload || typeof payload.resume !== "function") return next();
const chunks = [];
payload.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
payload.on("end", () => {
@@ -112879,29 +102637,17 @@ var require_request$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Request.prototype._read = function(size) {
setImmediate(() => {
if (this._lightMyRequest.isDone) {
- if (this._lightMyRequest.simulate.end !== false) {
- this.push(null);
- }
+ if (this._lightMyRequest.simulate.end !== false) this.push(null);
return;
}
this._lightMyRequest.isDone = true;
- if (this._lightMyRequest.payload) {
- if (this._lightMyRequest.simulate.split) {
- this.push(this._lightMyRequest.payload.slice(0, 1));
- this.push(this._lightMyRequest.payload.slice(1));
- } else {
- this.push(this._lightMyRequest.payload);
- }
- }
- if (this._lightMyRequest.simulate.error) {
- this.emit("error", new Error("Simulated"));
- }
- if (this._lightMyRequest.simulate.close) {
- this.emit("close");
- }
- if (this._lightMyRequest.simulate.end !== false) {
- this.push(null);
- }
+ if (this._lightMyRequest.payload) if (this._lightMyRequest.simulate.split) {
+ this.push(this._lightMyRequest.payload.slice(0, 1));
+ this.push(this._lightMyRequest.payload.slice(1));
+ } else this.push(this._lightMyRequest.payload);
+ if (this._lightMyRequest.simulate.error) this.emit("error", /* @__PURE__ */ new Error("Simulated"));
+ if (this._lightMyRequest.simulate.close) this.emit("close");
+ if (this._lightMyRequest.simulate.end !== false) this.push(null);
});
};
Request.prototype.destroy = function(error) {
@@ -112917,7 +102663,6 @@ var require_request$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.Request = Request;
module.exports.CustomRequest = CustomRequest;
}));
-
//#endregion
//#region ../node_modules/set-cookie-parser/lib/set-cookie.js
var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -112931,8 +102676,7 @@ var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function parseString(setCookieValue, options) {
var parts = setCookieValue.split(";").filter(isNonEmptyString);
- var nameValuePairStr = parts.shift();
- var parsed = parseNameValuePair(nameValuePairStr);
+ var parsed = parseNameValuePair(parts.shift());
var name = parsed.name;
var value = parsed.value;
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
@@ -112949,21 +102693,13 @@ var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var sides = part.split("=");
var key = sides.shift().trimLeft().toLowerCase();
var value = sides.join("=");
- if (key === "expires") {
- cookie.expires = new Date(value);
- } else if (key === "max-age") {
- cookie.maxAge = parseInt(value, 10);
- } else if (key === "secure") {
- cookie.secure = true;
- } else if (key === "httponly") {
- cookie.httpOnly = true;
- } else if (key === "samesite") {
- cookie.sameSite = value;
- } else if (key === "partitioned") {
- cookie.partitioned = true;
- } else {
- cookie[key] = value;
- }
+ if (key === "expires") cookie.expires = new Date(value);
+ else if (key === "max-age") cookie.maxAge = parseInt(value, 10);
+ else if (key === "secure") cookie.secure = true;
+ else if (key === "httponly") cookie.httpOnly = true;
+ else if (key === "samesite") cookie.sameSite = value;
+ else if (key === "partitioned") cookie.partitioned = true;
+ else cookie[key] = value;
});
return cookie;
}
@@ -112974,9 +102710,7 @@ var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (nameValueArr.length > 1) {
name = nameValueArr.shift();
value = nameValueArr.join("=");
- } else {
- value = nameValuePairStr;
- }
+ } else value = nameValuePairStr;
return {
name,
value
@@ -112984,51 +102718,30 @@ var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function parse(input, options) {
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
- if (!input) {
- if (!options.map) {
- return [];
- } else {
- return {};
- }
- }
- if (input.headers) {
- if (typeof input.headers.getSetCookie === "function") {
- input = input.headers.getSetCookie();
- } else if (input.headers["set-cookie"]) {
- input = input.headers["set-cookie"];
- } else {
- var sch = input.headers[Object.keys(input.headers).find(function(key) {
- return key.toLowerCase() === "set-cookie";
- })];
- if (!sch && input.headers.cookie && !options.silent) {
- console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning.");
- }
- input = sch;
- }
- }
- if (!Array.isArray(input)) {
- input = [input];
- }
- if (!options.map) {
- return input.filter(isNonEmptyString).map(function(str) {
- return parseString(str, options);
- });
- } else {
- var cookies = {};
- return input.filter(isNonEmptyString).reduce(function(cookies, str) {
- var cookie = parseString(str, options);
- cookies[cookie.name] = cookie;
- return cookies;
- }, cookies);
+ if (!input) if (!options.map) return [];
+ else return {};
+ if (input.headers) if (typeof input.headers.getSetCookie === "function") input = input.headers.getSetCookie();
+ else if (input.headers["set-cookie"]) input = input.headers["set-cookie"];
+ else {
+ var sch = input.headers[Object.keys(input.headers).find(function(key) {
+ return key.toLowerCase() === "set-cookie";
+ })];
+ if (!sch && input.headers.cookie && !options.silent) console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning.");
+ input = sch;
}
+ if (!Array.isArray(input)) input = [input];
+ if (!options.map) return input.filter(isNonEmptyString).map(function(str) {
+ return parseString(str, options);
+ });
+ else return input.filter(isNonEmptyString).reduce(function(cookies, str) {
+ var cookie = parseString(str, options);
+ cookies[cookie.name] = cookie;
+ return cookies;
+ }, {});
}
function splitCookiesString(cookiesString) {
- if (Array.isArray(cookiesString)) {
- return cookiesString;
- }
- if (typeof cookiesString !== "string") {
- return [];
- }
+ if (Array.isArray(cookiesString)) return cookiesString;
+ if (typeof cookiesString !== "string") return [];
var cookiesStrings = [];
var pos = 0;
var start;
@@ -113037,9 +102750,7 @@ var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var nextStart;
var cookiesSeparatorFound;
function skipWhitespace() {
- while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
- pos += 1;
- }
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) pos += 1;
return pos < cookiesString.length;
}
function notSpecialChar() {
@@ -113056,24 +102767,16 @@ var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
pos += 1;
skipWhitespace();
nextStart = pos;
- while (pos < cookiesString.length && notSpecialChar()) {
- pos += 1;
- }
+ while (pos < cookiesString.length && notSpecialChar()) pos += 1;
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
cookiesSeparatorFound = true;
pos = nextStart;
cookiesStrings.push(cookiesString.substring(start, lastComma));
start = pos;
- } else {
- pos = lastComma + 1;
- }
- } else {
- pos += 1;
- }
- }
- if (!cookiesSeparatorFound || pos >= cookiesString.length) {
- cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
+ } else pos = lastComma + 1;
+ } else pos += 1;
}
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
}
return cookiesStrings;
}
@@ -113082,7 +102785,6 @@ var require_set_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.parseString = parseString;
module.exports.splitCookiesString = splitCookiesString;
}));
-
//#endregion
//#region ../node_modules/light-my-request/lib/response.js
var require_response$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -113104,17 +102806,13 @@ var require_response$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let called = false;
const onEndSuccess = (payload) => {
called = true;
- if (this._promiseCallback) {
- return process.nextTick(() => onEnd(payload));
- }
+ if (this._promiseCallback) return process.nextTick(() => onEnd(payload));
process.nextTick(() => onEnd(null, payload));
};
const onEndFailure = (err) => {
if (called) return;
called = true;
- if (this._promiseCallback) {
- return process.nextTick(() => reject(err));
- }
+ if (this._promiseCallback) return process.nextTick(() => reject(err));
process.nextTick(() => onEnd(err, null));
};
this.once("finish", () => {
@@ -113140,17 +102838,13 @@ var require_response$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return result;
};
Response.prototype.write = function(data, encoding, callback) {
- if (this.timeoutHandle) {
- clearTimeout(this.timeoutHandle);
- }
+ if (this.timeoutHandle) clearTimeout(this.timeoutHandle);
http$5.ServerResponse.prototype.write.call(this, data, encoding, callback);
this._lightMyRequest.payloadChunks.push(Buffer.from(data, encoding));
return true;
};
Response.prototype.end = function(data, encoding, callback) {
- if (data) {
- this.write(data, encoding);
- }
+ if (data) this.write(data, encoding);
http$5.ServerResponse.prototype.end.call(this, callback);
this.emit("finish");
this.destroy();
@@ -113158,21 +102852,15 @@ var require_response$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
Response.prototype.destroy = function(error) {
if (this.destroyed) return;
this.destroyed = true;
- if (error) {
- process.nextTick(() => this.emit("error", error));
- }
+ if (error) process.nextTick(() => this.emit("error", error));
process.nextTick(() => this.emit("close"));
};
Response.prototype.addTrailers = function(trailers) {
- for (const key in trailers) {
- this._lightMyRequest.trailers[key.toLowerCase().trim()] = trailers[key].toString().trim();
- }
+ for (const key in trailers) this._lightMyRequest.trailers[key.toLowerCase().trim()] = trailers[key].toString().trim();
};
function generatePayload(response) {
/* istanbul ignore if */
- if (response._lightMyRequest.headers === null) {
- copyHeaders(response);
- }
+ if (response._lightMyRequest.headers === null) copyHeaders(response);
serializeHeaders(response);
const res = {
raw: { res: response },
@@ -113206,11 +102894,8 @@ var require_response$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const headers = response._lightMyRequest.headers;
for (const headerName of Object.keys(headers)) {
const headerValue = headers[headerName];
- if (Array.isArray(headerValue)) {
- headers[headerName] = headerValue.map((value) => "" + value);
- } else {
- headers[headerName] = "" + headerValue;
- }
+ if (Array.isArray(headerValue)) headers[headerName] = headerValue.map((value) => "" + value);
+ else headers[headerName] = "" + headerValue;
}
}
function copyHeaders(response) {
@@ -113222,14 +102907,11 @@ var require_response$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
].forEach((name) => {
const regex = new RegExp("\\r\\n" + name + ": ([^\\r]*)\\r\\n");
const field = response._header.match(regex);
- if (field) {
- response._lightMyRequest.headers[name.toLowerCase()] = field[1];
- }
+ if (field) response._lightMyRequest.headers[name.toLowerCase()] = field[1];
});
}
module.exports = Response;
}));
-
//#endregion
//#region ../node_modules/light-my-request/lib/config-validator.js
/* istanbul ignore file */
@@ -113369,7 +103051,7 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
const _errs2 = errors;
if (data && typeof data == "object" && !Array.isArray(data)) {
let missing0;
- if (data.url === undefined && (missing0 = "url")) {
+ if (data.url === void 0 && (missing0 = "url")) {
const err0 = {
instancePath,
schemaPath: "#/oneOf/0/required",
@@ -113377,11 +103059,8 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
params: { missingProperty: missing0 },
message: "must have required property '" + missing0 + "'"
};
- if (vErrors === null) {
- vErrors = [err0];
- } else {
- vErrors.push(err0);
- }
+ if (vErrors === null) vErrors = [err0];
+ else vErrors.push(err0);
errors++;
}
}
@@ -113393,7 +103072,7 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
const _errs3 = errors;
if (data && typeof data == "object" && !Array.isArray(data)) {
let missing1;
- if (data.path === undefined && (missing1 = "path")) {
+ if (data.path === void 0 && (missing1 = "path")) {
const err1 = {
instancePath,
schemaPath: "#/oneOf/1/required",
@@ -113401,11 +103080,8 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
params: { missingProperty: missing1 },
message: "must have required property '" + missing1 + "'"
};
- if (vErrors === null) {
- vErrors = [err1];
- } else {
- vErrors.push(err1);
- }
+ if (vErrors === null) vErrors = [err1];
+ else vErrors.push(err1);
errors++;
}
}
@@ -113413,11 +103089,9 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
if (_valid0 && valid0) {
valid0 = false;
passing0 = [passing0, 1];
- } else {
- if (_valid0) {
- valid0 = true;
- passing0 = 1;
- }
+ } else if (_valid0) {
+ valid0 = true;
+ passing0 = 1;
}
if (!valid0) {
const err2 = {
@@ -113427,510 +103101,391 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
params: { passingSchemas: passing0 },
message: "must match exactly one schema in oneOf"
};
- if (vErrors === null) {
- vErrors = [err2];
- } else {
- vErrors.push(err2);
- }
+ if (vErrors === null) vErrors = [err2];
+ else vErrors.push(err2);
errors++;
validate10.errors = vErrors;
return false;
} else {
errors = _errs1;
- if (vErrors !== null) {
- if (_errs1) {
- vErrors.length = _errs1;
- } else {
- vErrors = null;
+ if (vErrors !== null) if (_errs1) vErrors.length = _errs1;
+ else vErrors = null;
+ }
+ if (errors === 0) if (data && typeof data == "object" && !Array.isArray(data)) {
+ if (data.url !== void 0) {
+ let data0 = data.url;
+ const _errs5 = errors;
+ const _errs6 = errors;
+ let valid2 = false;
+ let passing1 = null;
+ const _errs7 = errors;
+ if (typeof data0 !== "string") {
+ let dataType0 = typeof data0;
+ let coerced0 = void 0;
+ if (!(coerced0 !== void 0)) if (dataType0 == "number" || dataType0 == "boolean") coerced0 = "" + data0;
+ else if (data0 === null) coerced0 = "";
+ else {
+ const err3 = {
+ instancePath: instancePath + "/url",
+ schemaPath: "#/properties/url/oneOf/0/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err3];
+ else vErrors.push(err3);
+ errors++;
+ }
+ if (coerced0 !== void 0) {
+ data0 = coerced0;
+ if (data !== void 0) data["url"] = coerced0;
+ }
}
- }
- }
- if (errors === 0) {
- if (data && typeof data == "object" && !Array.isArray(data)) {
- if (data.url !== undefined) {
- let data0 = data.url;
- const _errs5 = errors;
- const _errs6 = errors;
- let valid2 = false;
- let passing1 = null;
- const _errs7 = errors;
- if (typeof data0 !== "string") {
- let dataType0 = typeof data0;
- let coerced0 = undefined;
- if (!(coerced0 !== undefined)) {
- if (dataType0 == "number" || dataType0 == "boolean") {
- coerced0 = "" + data0;
- } else if (data0 === null) {
- coerced0 = "";
- } else {
- const err3 = {
- instancePath: instancePath + "/url",
- schemaPath: "#/properties/url/oneOf/0/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err3];
- } else {
- vErrors.push(err3);
+ var _valid1 = _errs7 === errors;
+ if (_valid1) {
+ valid2 = true;
+ passing1 = 0;
+ }
+ const _errs9 = errors;
+ if (errors === _errs9) if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
+ let missing2;
+ if (data0.pathname === void 0 && (missing2 = "pathname")) {
+ const err4 = {
+ instancePath: instancePath + "/url",
+ schemaPath: "#/properties/url/oneOf/1/required",
+ keyword: "required",
+ params: { missingProperty: missing2 },
+ message: "must have required property '" + missing2 + "'"
+ };
+ if (vErrors === null) vErrors = [err4];
+ else vErrors.push(err4);
+ errors++;
+ } else {
+ if (data0.protocol !== void 0) {
+ let data1 = data0.protocol;
+ const _errs12 = errors;
+ if (typeof data1 !== "string") {
+ let dataType1 = typeof data1;
+ let coerced1 = void 0;
+ if (!(coerced1 !== void 0)) if (dataType1 == "number" || dataType1 == "boolean") coerced1 = "" + data1;
+ else if (data1 === null) coerced1 = "";
+ else {
+ const err5 = {
+ instancePath: instancePath + "/url/protocol",
+ schemaPath: "#/properties/url/oneOf/1/properties/protocol/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err5];
+ else vErrors.push(err5);
+ errors++;
+ }
+ if (coerced1 !== void 0) {
+ data1 = coerced1;
+ if (data0 !== void 0) data0["protocol"] = coerced1;
}
- errors++;
}
+ var valid3 = _errs12 === errors;
+ } else var valid3 = true;
+ if (valid3) {
+ if (data0.hostname !== void 0) {
+ let data2 = data0.hostname;
+ const _errs14 = errors;
+ if (typeof data2 !== "string") {
+ let dataType2 = typeof data2;
+ let coerced2 = void 0;
+ if (!(coerced2 !== void 0)) if (dataType2 == "number" || dataType2 == "boolean") coerced2 = "" + data2;
+ else if (data2 === null) coerced2 = "";
+ else {
+ const err6 = {
+ instancePath: instancePath + "/url/hostname",
+ schemaPath: "#/properties/url/oneOf/1/properties/hostname/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err6];
+ else vErrors.push(err6);
+ errors++;
+ }
+ if (coerced2 !== void 0) {
+ data2 = coerced2;
+ if (data0 !== void 0) data0["hostname"] = coerced2;
+ }
+ }
+ var valid3 = _errs14 === errors;
+ } else var valid3 = true;
+ if (valid3) if (data0.pathname !== void 0) {
+ let data3 = data0.pathname;
+ const _errs16 = errors;
+ if (typeof data3 !== "string") {
+ let dataType3 = typeof data3;
+ let coerced3 = void 0;
+ if (!(coerced3 !== void 0)) if (dataType3 == "number" || dataType3 == "boolean") coerced3 = "" + data3;
+ else if (data3 === null) coerced3 = "";
+ else {
+ const err7 = {
+ instancePath: instancePath + "/url/pathname",
+ schemaPath: "#/properties/url/oneOf/1/properties/pathname/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err7];
+ else vErrors.push(err7);
+ errors++;
+ }
+ if (coerced3 !== void 0) {
+ data3 = coerced3;
+ if (data0 !== void 0) data0["pathname"] = coerced3;
+ }
+ }
+ var valid3 = _errs16 === errors;
+ } else var valid3 = true;
}
- if (coerced0 !== undefined) {
- data0 = coerced0;
- if (data !== undefined) {
- data["url"] = coerced0;
- }
+ }
+ } else {
+ const err8 = {
+ instancePath: instancePath + "/url",
+ schemaPath: "#/properties/url/oneOf/1/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ };
+ if (vErrors === null) vErrors = [err8];
+ else vErrors.push(err8);
+ errors++;
+ }
+ var _valid1 = _errs9 === errors;
+ if (_valid1 && valid2) {
+ valid2 = false;
+ passing1 = [passing1, 1];
+ } else if (_valid1) {
+ valid2 = true;
+ passing1 = 1;
+ }
+ if (!valid2) {
+ const err9 = {
+ instancePath: instancePath + "/url",
+ schemaPath: "#/properties/url/oneOf",
+ keyword: "oneOf",
+ params: { passingSchemas: passing1 },
+ message: "must match exactly one schema in oneOf"
+ };
+ if (vErrors === null) vErrors = [err9];
+ else vErrors.push(err9);
+ errors++;
+ validate10.errors = vErrors;
+ return false;
+ } else {
+ errors = _errs6;
+ if (vErrors !== null) if (_errs6) vErrors.length = _errs6;
+ else vErrors = null;
+ }
+ var valid1 = _errs5 === errors;
+ } else var valid1 = true;
+ if (valid1) {
+ if (data.path !== void 0) {
+ let data4 = data.path;
+ const _errs18 = errors;
+ const _errs19 = errors;
+ let valid4 = false;
+ let passing2 = null;
+ const _errs20 = errors;
+ if (typeof data4 !== "string") {
+ let dataType4 = typeof data4;
+ let coerced4 = void 0;
+ if (!(coerced4 !== void 0)) if (dataType4 == "number" || dataType4 == "boolean") coerced4 = "" + data4;
+ else if (data4 === null) coerced4 = "";
+ else {
+ const err10 = {
+ instancePath: instancePath + "/path",
+ schemaPath: "#/properties/path/oneOf/0/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err10];
+ else vErrors.push(err10);
+ errors++;
+ }
+ if (coerced4 !== void 0) {
+ data4 = coerced4;
+ if (data !== void 0) data["path"] = coerced4;
}
}
- var _valid1 = _errs7 === errors;
- if (_valid1) {
- valid2 = true;
- passing1 = 0;
+ var _valid2 = _errs20 === errors;
+ if (_valid2) {
+ valid4 = true;
+ passing2 = 0;
}
- const _errs9 = errors;
- if (errors === _errs9) {
- if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
- let missing2;
- if (data0.pathname === undefined && (missing2 = "pathname")) {
- const err4 = {
- instancePath: instancePath + "/url",
- schemaPath: "#/properties/url/oneOf/1/required",
- keyword: "required",
- params: { missingProperty: missing2 },
- message: "must have required property '" + missing2 + "'"
- };
- if (vErrors === null) {
- vErrors = [err4];
- } else {
- vErrors.push(err4);
+ const _errs22 = errors;
+ if (errors === _errs22) if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
+ let missing3;
+ if (data4.pathname === void 0 && (missing3 = "pathname")) {
+ const err11 = {
+ instancePath: instancePath + "/path",
+ schemaPath: "#/properties/path/oneOf/1/required",
+ keyword: "required",
+ params: { missingProperty: missing3 },
+ message: "must have required property '" + missing3 + "'"
+ };
+ if (vErrors === null) vErrors = [err11];
+ else vErrors.push(err11);
+ errors++;
+ } else {
+ if (data4.protocol !== void 0) {
+ let data5 = data4.protocol;
+ const _errs25 = errors;
+ if (typeof data5 !== "string") {
+ let dataType5 = typeof data5;
+ let coerced5 = void 0;
+ if (!(coerced5 !== void 0)) if (dataType5 == "number" || dataType5 == "boolean") coerced5 = "" + data5;
+ else if (data5 === null) coerced5 = "";
+ else {
+ const err12 = {
+ instancePath: instancePath + "/path/protocol",
+ schemaPath: "#/properties/path/oneOf/1/properties/protocol/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err12];
+ else vErrors.push(err12);
+ errors++;
+ }
+ if (coerced5 !== void 0) {
+ data5 = coerced5;
+ if (data4 !== void 0) data4["protocol"] = coerced5;
+ }
}
- errors++;
- } else {
- if (data0.protocol !== undefined) {
- let data1 = data0.protocol;
- const _errs12 = errors;
- if (typeof data1 !== "string") {
- let dataType1 = typeof data1;
- let coerced1 = undefined;
- if (!(coerced1 !== undefined)) {
- if (dataType1 == "number" || dataType1 == "boolean") {
- coerced1 = "" + data1;
- } else if (data1 === null) {
- coerced1 = "";
- } else {
- const err5 = {
- instancePath: instancePath + "/url/protocol",
- schemaPath: "#/properties/url/oneOf/1/properties/protocol/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err5];
- } else {
- vErrors.push(err5);
- }
- errors++;
- }
+ var valid5 = _errs25 === errors;
+ } else var valid5 = true;
+ if (valid5) {
+ if (data4.hostname !== void 0) {
+ let data6 = data4.hostname;
+ const _errs27 = errors;
+ if (typeof data6 !== "string") {
+ let dataType6 = typeof data6;
+ let coerced6 = void 0;
+ if (!(coerced6 !== void 0)) if (dataType6 == "number" || dataType6 == "boolean") coerced6 = "" + data6;
+ else if (data6 === null) coerced6 = "";
+ else {
+ const err13 = {
+ instancePath: instancePath + "/path/hostname",
+ schemaPath: "#/properties/path/oneOf/1/properties/hostname/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err13];
+ else vErrors.push(err13);
+ errors++;
}
- if (coerced1 !== undefined) {
- data1 = coerced1;
- if (data0 !== undefined) {
- data0["protocol"] = coerced1;
- }
+ if (coerced6 !== void 0) {
+ data6 = coerced6;
+ if (data4 !== void 0) data4["hostname"] = coerced6;
}
}
- var valid3 = _errs12 === errors;
- } else {
- var valid3 = true;
- }
- if (valid3) {
- if (data0.hostname !== undefined) {
- let data2 = data0.hostname;
- const _errs14 = errors;
- if (typeof data2 !== "string") {
- let dataType2 = typeof data2;
- let coerced2 = undefined;
- if (!(coerced2 !== undefined)) {
- if (dataType2 == "number" || dataType2 == "boolean") {
- coerced2 = "" + data2;
- } else if (data2 === null) {
- coerced2 = "";
- } else {
- const err6 = {
- instancePath: instancePath + "/url/hostname",
- schemaPath: "#/properties/url/oneOf/1/properties/hostname/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err6];
- } else {
- vErrors.push(err6);
- }
- errors++;
- }
- }
- if (coerced2 !== undefined) {
- data2 = coerced2;
- if (data0 !== undefined) {
- data0["hostname"] = coerced2;
- }
- }
+ var valid5 = _errs27 === errors;
+ } else var valid5 = true;
+ if (valid5) if (data4.pathname !== void 0) {
+ let data7 = data4.pathname;
+ const _errs29 = errors;
+ if (typeof data7 !== "string") {
+ let dataType7 = typeof data7;
+ let coerced7 = void 0;
+ if (!(coerced7 !== void 0)) if (dataType7 == "number" || dataType7 == "boolean") coerced7 = "" + data7;
+ else if (data7 === null) coerced7 = "";
+ else {
+ const err14 = {
+ instancePath: instancePath + "/path/pathname",
+ schemaPath: "#/properties/path/oneOf/1/properties/pathname/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ };
+ if (vErrors === null) vErrors = [err14];
+ else vErrors.push(err14);
+ errors++;
}
- var valid3 = _errs14 === errors;
- } else {
- var valid3 = true;
- }
- if (valid3) {
- if (data0.pathname !== undefined) {
- let data3 = data0.pathname;
- const _errs16 = errors;
- if (typeof data3 !== "string") {
- let dataType3 = typeof data3;
- let coerced3 = undefined;
- if (!(coerced3 !== undefined)) {
- if (dataType3 == "number" || dataType3 == "boolean") {
- coerced3 = "" + data3;
- } else if (data3 === null) {
- coerced3 = "";
- } else {
- const err7 = {
- instancePath: instancePath + "/url/pathname",
- schemaPath: "#/properties/url/oneOf/1/properties/pathname/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err7];
- } else {
- vErrors.push(err7);
- }
- errors++;
- }
- }
- if (coerced3 !== undefined) {
- data3 = coerced3;
- if (data0 !== undefined) {
- data0["pathname"] = coerced3;
- }
- }
- }
- var valid3 = _errs16 === errors;
- } else {
- var valid3 = true;
+ if (coerced7 !== void 0) {
+ data7 = coerced7;
+ if (data4 !== void 0) data4["pathname"] = coerced7;
}
}
- }
- }
- } else {
- const err8 = {
- instancePath: instancePath + "/url",
- schemaPath: "#/properties/url/oneOf/1/type",
- keyword: "type",
- params: { type: "object" },
- message: "must be object"
- };
- if (vErrors === null) {
- vErrors = [err8];
- } else {
- vErrors.push(err8);
+ var valid5 = _errs29 === errors;
+ } else var valid5 = true;
}
- errors++;
}
- }
- var _valid1 = _errs9 === errors;
- if (_valid1 && valid2) {
- valid2 = false;
- passing1 = [passing1, 1];
} else {
- if (_valid1) {
- valid2 = true;
- passing1 = 1;
- }
+ const err15 = {
+ instancePath: instancePath + "/path",
+ schemaPath: "#/properties/path/oneOf/1/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ };
+ if (vErrors === null) vErrors = [err15];
+ else vErrors.push(err15);
+ errors++;
}
- if (!valid2) {
- const err9 = {
- instancePath: instancePath + "/url",
- schemaPath: "#/properties/url/oneOf",
+ var _valid2 = _errs22 === errors;
+ if (_valid2 && valid4) {
+ valid4 = false;
+ passing2 = [passing2, 1];
+ } else if (_valid2) {
+ valid4 = true;
+ passing2 = 1;
+ }
+ if (!valid4) {
+ const err16 = {
+ instancePath: instancePath + "/path",
+ schemaPath: "#/properties/path/oneOf",
keyword: "oneOf",
- params: { passingSchemas: passing1 },
+ params: { passingSchemas: passing2 },
message: "must match exactly one schema in oneOf"
};
- if (vErrors === null) {
- vErrors = [err9];
- } else {
- vErrors.push(err9);
- }
+ if (vErrors === null) vErrors = [err16];
+ else vErrors.push(err16);
errors++;
validate10.errors = vErrors;
return false;
} else {
- errors = _errs6;
- if (vErrors !== null) {
- if (_errs6) {
- vErrors.length = _errs6;
- } else {
- vErrors = null;
- }
- }
+ errors = _errs19;
+ if (vErrors !== null) if (_errs19) vErrors.length = _errs19;
+ else vErrors = null;
}
- var valid1 = _errs5 === errors;
- } else {
- var valid1 = true;
- }
+ var valid1 = _errs18 === errors;
+ } else var valid1 = true;
if (valid1) {
- if (data.path !== undefined) {
- let data4 = data.path;
- const _errs18 = errors;
- const _errs19 = errors;
- let valid4 = false;
- let passing2 = null;
- const _errs20 = errors;
- if (typeof data4 !== "string") {
- let dataType4 = typeof data4;
- let coerced4 = undefined;
- if (!(coerced4 !== undefined)) {
- if (dataType4 == "number" || dataType4 == "boolean") {
- coerced4 = "" + data4;
- } else if (data4 === null) {
- coerced4 = "";
- } else {
- const err10 = {
- instancePath: instancePath + "/path",
- schemaPath: "#/properties/path/oneOf/0/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err10];
- } else {
- vErrors.push(err10);
- }
- errors++;
- }
- }
- if (coerced4 !== undefined) {
- data4 = coerced4;
- if (data !== undefined) {
- data["path"] = coerced4;
- }
- }
- }
- var _valid2 = _errs20 === errors;
- if (_valid2) {
- valid4 = true;
- passing2 = 0;
- }
- const _errs22 = errors;
- if (errors === _errs22) {
- if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
- let missing3;
- if (data4.pathname === undefined && (missing3 = "pathname")) {
- const err11 = {
- instancePath: instancePath + "/path",
- schemaPath: "#/properties/path/oneOf/1/required",
- keyword: "required",
- params: { missingProperty: missing3 },
- message: "must have required property '" + missing3 + "'"
- };
- if (vErrors === null) {
- vErrors = [err11];
- } else {
- vErrors.push(err11);
- }
- errors++;
- } else {
- if (data4.protocol !== undefined) {
- let data5 = data4.protocol;
- const _errs25 = errors;
- if (typeof data5 !== "string") {
- let dataType5 = typeof data5;
- let coerced5 = undefined;
- if (!(coerced5 !== undefined)) {
- if (dataType5 == "number" || dataType5 == "boolean") {
- coerced5 = "" + data5;
- } else if (data5 === null) {
- coerced5 = "";
- } else {
- const err12 = {
- instancePath: instancePath + "/path/protocol",
- schemaPath: "#/properties/path/oneOf/1/properties/protocol/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err12];
- } else {
- vErrors.push(err12);
- }
- errors++;
- }
- }
- if (coerced5 !== undefined) {
- data5 = coerced5;
- if (data4 !== undefined) {
- data4["protocol"] = coerced5;
- }
- }
- }
- var valid5 = _errs25 === errors;
- } else {
- var valid5 = true;
- }
- if (valid5) {
- if (data4.hostname !== undefined) {
- let data6 = data4.hostname;
- const _errs27 = errors;
- if (typeof data6 !== "string") {
- let dataType6 = typeof data6;
- let coerced6 = undefined;
- if (!(coerced6 !== undefined)) {
- if (dataType6 == "number" || dataType6 == "boolean") {
- coerced6 = "" + data6;
- } else if (data6 === null) {
- coerced6 = "";
- } else {
- const err13 = {
- instancePath: instancePath + "/path/hostname",
- schemaPath: "#/properties/path/oneOf/1/properties/hostname/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err13];
- } else {
- vErrors.push(err13);
- }
- errors++;
- }
- }
- if (coerced6 !== undefined) {
- data6 = coerced6;
- if (data4 !== undefined) {
- data4["hostname"] = coerced6;
- }
- }
- }
- var valid5 = _errs27 === errors;
- } else {
- var valid5 = true;
- }
- if (valid5) {
- if (data4.pathname !== undefined) {
- let data7 = data4.pathname;
- const _errs29 = errors;
- if (typeof data7 !== "string") {
- let dataType7 = typeof data7;
- let coerced7 = undefined;
- if (!(coerced7 !== undefined)) {
- if (dataType7 == "number" || dataType7 == "boolean") {
- coerced7 = "" + data7;
- } else if (data7 === null) {
- coerced7 = "";
- } else {
- const err14 = {
- instancePath: instancePath + "/path/pathname",
- schemaPath: "#/properties/path/oneOf/1/properties/pathname/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err14];
- } else {
- vErrors.push(err14);
- }
- errors++;
- }
- }
- if (coerced7 !== undefined) {
- data7 = coerced7;
- if (data4 !== undefined) {
- data4["pathname"] = coerced7;
- }
- }
- }
- var valid5 = _errs29 === errors;
- } else {
- var valid5 = true;
- }
- }
- }
- }
- } else {
- const err15 = {
- instancePath: instancePath + "/path",
- schemaPath: "#/properties/path/oneOf/1/type",
+ if (data.cookies !== void 0) {
+ let data8 = data.cookies;
+ const _errs31 = errors;
+ if (errors === _errs31) {
+ if (!(data8 && typeof data8 == "object" && !Array.isArray(data8))) {
+ validate10.errors = [{
+ instancePath: instancePath + "/cookies",
+ schemaPath: "#/properties/cookies/type",
keyword: "type",
params: { type: "object" },
message: "must be object"
- };
- if (vErrors === null) {
- vErrors = [err15];
- } else {
- vErrors.push(err15);
- }
- errors++;
- }
- }
- var _valid2 = _errs22 === errors;
- if (_valid2 && valid4) {
- valid4 = false;
- passing2 = [passing2, 1];
- } else {
- if (_valid2) {
- valid4 = true;
- passing2 = 1;
- }
- }
- if (!valid4) {
- const err16 = {
- instancePath: instancePath + "/path",
- schemaPath: "#/properties/path/oneOf",
- keyword: "oneOf",
- params: { passingSchemas: passing2 },
- message: "must match exactly one schema in oneOf"
- };
- if (vErrors === null) {
- vErrors = [err16];
- } else {
- vErrors.push(err16);
- }
- errors++;
- validate10.errors = vErrors;
- return false;
- } else {
- errors = _errs19;
- if (vErrors !== null) {
- if (_errs19) {
- vErrors.length = _errs19;
- } else {
- vErrors = null;
- }
+ }];
+ return false;
}
}
- var valid1 = _errs18 === errors;
- } else {
- var valid1 = true;
- }
+ var valid1 = _errs31 === errors;
+ } else var valid1 = true;
if (valid1) {
- if (data.cookies !== undefined) {
- let data8 = data.cookies;
- const _errs31 = errors;
- if (errors === _errs31) {
- if (!(data8 && typeof data8 == "object" && !Array.isArray(data8))) {
+ if (data.headers !== void 0) {
+ let data9 = data.headers;
+ const _errs34 = errors;
+ if (errors === _errs34) {
+ if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
validate10.errors = [{
- instancePath: instancePath + "/cookies",
- schemaPath: "#/properties/cookies/type",
+ instancePath: instancePath + "/headers",
+ schemaPath: "#/properties/headers/type",
keyword: "type",
params: { type: "object" },
message: "must be object"
@@ -113938,424 +103493,307 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
return false;
}
}
- var valid1 = _errs31 === errors;
- } else {
- var valid1 = true;
- }
+ var valid1 = _errs34 === errors;
+ } else var valid1 = true;
if (valid1) {
- if (data.headers !== undefined) {
- let data9 = data.headers;
- const _errs34 = errors;
- if (errors === _errs34) {
- if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
- validate10.errors = [{
- instancePath: instancePath + "/headers",
- schemaPath: "#/properties/headers/type",
+ if (data.query !== void 0) {
+ let data10 = data.query;
+ const _errs37 = errors;
+ const _errs38 = errors;
+ let valid6 = false;
+ const _errs39 = errors;
+ if (errors === _errs39) {
+ if (!(data10 && typeof data10 == "object" && !Array.isArray(data10))) {
+ const err17 = {
+ instancePath: instancePath + "/query",
+ schemaPath: "#/properties/query/anyOf/0/type",
keyword: "type",
params: { type: "object" },
message: "must be object"
- }];
- return false;
+ };
+ if (vErrors === null) vErrors = [err17];
+ else vErrors.push(err17);
+ errors++;
}
}
- var valid1 = _errs34 === errors;
- } else {
- var valid1 = true;
- }
- if (valid1) {
- if (data.query !== undefined) {
- let data10 = data.query;
- const _errs37 = errors;
- const _errs38 = errors;
- let valid6 = false;
- const _errs39 = errors;
- if (errors === _errs39) {
- if (!(data10 && typeof data10 == "object" && !Array.isArray(data10))) {
- const err17 = {
+ var _valid3 = _errs39 === errors;
+ valid6 = valid6 || _valid3;
+ if (!valid6) {
+ const _errs42 = errors;
+ if (typeof data10 !== "string") {
+ let dataType8 = typeof data10;
+ let coerced8 = void 0;
+ if (!(coerced8 !== void 0)) if (dataType8 == "number" || dataType8 == "boolean") coerced8 = "" + data10;
+ else if (data10 === null) coerced8 = "";
+ else {
+ const err18 = {
instancePath: instancePath + "/query",
- schemaPath: "#/properties/query/anyOf/0/type",
+ schemaPath: "#/properties/query/anyOf/1/type",
keyword: "type",
- params: { type: "object" },
- message: "must be object"
+ params: { type: "string" },
+ message: "must be string"
};
- if (vErrors === null) {
- vErrors = [err17];
- } else {
- vErrors.push(err17);
- }
+ if (vErrors === null) vErrors = [err18];
+ else vErrors.push(err18);
errors++;
}
+ if (coerced8 !== void 0) {
+ data10 = coerced8;
+ if (data !== void 0) data["query"] = coerced8;
+ }
}
- var _valid3 = _errs39 === errors;
+ var _valid3 = _errs42 === errors;
valid6 = valid6 || _valid3;
- if (!valid6) {
- const _errs42 = errors;
- if (typeof data10 !== "string") {
- let dataType8 = typeof data10;
- let coerced8 = undefined;
- if (!(coerced8 !== undefined)) {
- if (dataType8 == "number" || dataType8 == "boolean") {
- coerced8 = "" + data10;
- } else if (data10 === null) {
- coerced8 = "";
- } else {
- const err18 = {
- instancePath: instancePath + "/query",
- schemaPath: "#/properties/query/anyOf/1/type",
+ }
+ if (!valid6) {
+ const err19 = {
+ instancePath: instancePath + "/query",
+ schemaPath: "#/properties/query/anyOf",
+ keyword: "anyOf",
+ params: {},
+ message: "must match a schema in anyOf"
+ };
+ if (vErrors === null) vErrors = [err19];
+ else vErrors.push(err19);
+ errors++;
+ validate10.errors = vErrors;
+ return false;
+ } else {
+ errors = _errs38;
+ if (vErrors !== null) if (_errs38) vErrors.length = _errs38;
+ else vErrors = null;
+ }
+ var valid1 = _errs37 === errors;
+ } else var valid1 = true;
+ if (valid1) {
+ if (data.simulate !== void 0) {
+ let data11 = data.simulate;
+ const _errs44 = errors;
+ if (errors === _errs44) if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
+ if (data11.end !== void 0) {
+ let data12 = data11.end;
+ const _errs46 = errors;
+ if (typeof data12 !== "boolean") {
+ let coerced9 = void 0;
+ if (!(coerced9 !== void 0)) if (data12 === "false" || data12 === 0 || data12 === null) coerced9 = false;
+ else if (data12 === "true" || data12 === 1) coerced9 = true;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/simulate/end",
+ schemaPath: "#/properties/simulate/properties/end/type",
keyword: "type",
- params: { type: "string" },
- message: "must be string"
- };
- if (vErrors === null) {
- vErrors = [err18];
- } else {
- vErrors.push(err18);
- }
- errors++;
+ params: { type: "boolean" },
+ message: "must be boolean"
+ }];
+ return false;
}
- }
- if (coerced8 !== undefined) {
- data10 = coerced8;
- if (data !== undefined) {
- data["query"] = coerced8;
+ if (coerced9 !== void 0) {
+ data12 = coerced9;
+ if (data11 !== void 0) data11["end"] = coerced9;
}
}
- }
- var _valid3 = _errs42 === errors;
- valid6 = valid6 || _valid3;
- }
- if (!valid6) {
- const err19 = {
- instancePath: instancePath + "/query",
- schemaPath: "#/properties/query/anyOf",
- keyword: "anyOf",
- params: {},
- message: "must match a schema in anyOf"
- };
- if (vErrors === null) {
- vErrors = [err19];
- } else {
- vErrors.push(err19);
- }
- errors++;
- validate10.errors = vErrors;
- return false;
- } else {
- errors = _errs38;
- if (vErrors !== null) {
- if (_errs38) {
- vErrors.length = _errs38;
- } else {
- vErrors = null;
- }
- }
- }
- var valid1 = _errs37 === errors;
- } else {
- var valid1 = true;
- }
- if (valid1) {
- if (data.simulate !== undefined) {
- let data11 = data.simulate;
- const _errs44 = errors;
- if (errors === _errs44) {
- if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
- if (data11.end !== undefined) {
- let data12 = data11.end;
- const _errs46 = errors;
- if (typeof data12 !== "boolean") {
- let coerced9 = undefined;
- if (!(coerced9 !== undefined)) {
- if (data12 === "false" || data12 === 0 || data12 === null) {
- coerced9 = false;
- } else if (data12 === "true" || data12 === 1) {
- coerced9 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/simulate/end",
- schemaPath: "#/properties/simulate/properties/end/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
- }
- if (coerced9 !== undefined) {
- data12 = coerced9;
- if (data11 !== undefined) {
- data11["end"] = coerced9;
- }
- }
+ var valid7 = _errs46 === errors;
+ } else var valid7 = true;
+ if (valid7) {
+ if (data11.split !== void 0) {
+ let data13 = data11.split;
+ const _errs48 = errors;
+ if (typeof data13 !== "boolean") {
+ let coerced10 = void 0;
+ if (!(coerced10 !== void 0)) if (data13 === "false" || data13 === 0 || data13 === null) coerced10 = false;
+ else if (data13 === "true" || data13 === 1) coerced10 = true;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/simulate/split",
+ schemaPath: "#/properties/simulate/properties/split/type",
+ keyword: "type",
+ params: { type: "boolean" },
+ message: "must be boolean"
+ }];
+ return false;
+ }
+ if (coerced10 !== void 0) {
+ data13 = coerced10;
+ if (data11 !== void 0) data11["split"] = coerced10;
}
- var valid7 = _errs46 === errors;
- } else {
- var valid7 = true;
}
- if (valid7) {
- if (data11.split !== undefined) {
- let data13 = data11.split;
- const _errs48 = errors;
- if (typeof data13 !== "boolean") {
- let coerced10 = undefined;
- if (!(coerced10 !== undefined)) {
- if (data13 === "false" || data13 === 0 || data13 === null) {
- coerced10 = false;
- } else if (data13 === "true" || data13 === 1) {
- coerced10 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/simulate/split",
- schemaPath: "#/properties/simulate/properties/split/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
- }
- if (coerced10 !== undefined) {
- data13 = coerced10;
- if (data11 !== undefined) {
- data11["split"] = coerced10;
- }
- }
+ var valid7 = _errs48 === errors;
+ } else var valid7 = true;
+ if (valid7) {
+ if (data11.error !== void 0) {
+ let data14 = data11.error;
+ const _errs50 = errors;
+ if (typeof data14 !== "boolean") {
+ let coerced11 = void 0;
+ if (!(coerced11 !== void 0)) if (data14 === "false" || data14 === 0 || data14 === null) coerced11 = false;
+ else if (data14 === "true" || data14 === 1) coerced11 = true;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/simulate/error",
+ schemaPath: "#/properties/simulate/properties/error/type",
+ keyword: "type",
+ params: { type: "boolean" },
+ message: "must be boolean"
+ }];
+ return false;
+ }
+ if (coerced11 !== void 0) {
+ data14 = coerced11;
+ if (data11 !== void 0) data11["error"] = coerced11;
}
- var valid7 = _errs48 === errors;
- } else {
- var valid7 = true;
}
- if (valid7) {
- if (data11.error !== undefined) {
- let data14 = data11.error;
- const _errs50 = errors;
- if (typeof data14 !== "boolean") {
- let coerced11 = undefined;
- if (!(coerced11 !== undefined)) {
- if (data14 === "false" || data14 === 0 || data14 === null) {
- coerced11 = false;
- } else if (data14 === "true" || data14 === 1) {
- coerced11 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/simulate/error",
- schemaPath: "#/properties/simulate/properties/error/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
- }
- if (coerced11 !== undefined) {
- data14 = coerced11;
- if (data11 !== undefined) {
- data11["error"] = coerced11;
- }
- }
- }
- var valid7 = _errs50 === errors;
- } else {
- var valid7 = true;
+ var valid7 = _errs50 === errors;
+ } else var valid7 = true;
+ if (valid7) if (data11.close !== void 0) {
+ let data15 = data11.close;
+ const _errs52 = errors;
+ if (typeof data15 !== "boolean") {
+ let coerced12 = void 0;
+ if (!(coerced12 !== void 0)) if (data15 === "false" || data15 === 0 || data15 === null) coerced12 = false;
+ else if (data15 === "true" || data15 === 1) coerced12 = true;
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/simulate/close",
+ schemaPath: "#/properties/simulate/properties/close/type",
+ keyword: "type",
+ params: { type: "boolean" },
+ message: "must be boolean"
+ }];
+ return false;
}
- if (valid7) {
- if (data11.close !== undefined) {
- let data15 = data11.close;
- const _errs52 = errors;
- if (typeof data15 !== "boolean") {
- let coerced12 = undefined;
- if (!(coerced12 !== undefined)) {
- if (data15 === "false" || data15 === 0 || data15 === null) {
- coerced12 = false;
- } else if (data15 === "true" || data15 === 1) {
- coerced12 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/simulate/close",
- schemaPath: "#/properties/simulate/properties/close/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
- }
- if (coerced12 !== undefined) {
- data15 = coerced12;
- if (data11 !== undefined) {
- data11["close"] = coerced12;
- }
- }
- }
- var valid7 = _errs52 === errors;
- } else {
- var valid7 = true;
- }
+ if (coerced12 !== void 0) {
+ data15 = coerced12;
+ if (data11 !== void 0) data11["close"] = coerced12;
}
}
- }
- } else {
+ var valid7 = _errs52 === errors;
+ } else var valid7 = true;
+ }
+ }
+ } else {
+ validate10.errors = [{
+ instancePath: instancePath + "/simulate",
+ schemaPath: "#/properties/simulate/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ }];
+ return false;
+ }
+ var valid1 = _errs44 === errors;
+ } else var valid1 = true;
+ if (valid1) {
+ if (data.authority !== void 0) {
+ let data16 = data.authority;
+ const _errs54 = errors;
+ if (typeof data16 !== "string") {
+ let dataType13 = typeof data16;
+ let coerced13 = void 0;
+ if (!(coerced13 !== void 0)) if (dataType13 == "number" || dataType13 == "boolean") coerced13 = "" + data16;
+ else if (data16 === null) coerced13 = "";
+ else {
validate10.errors = [{
- instancePath: instancePath + "/simulate",
- schemaPath: "#/properties/simulate/type",
+ instancePath: instancePath + "/authority",
+ schemaPath: "#/properties/authority/type",
keyword: "type",
- params: { type: "object" },
- message: "must be object"
+ params: { type: "string" },
+ message: "must be string"
}];
return false;
}
+ if (coerced13 !== void 0) {
+ data16 = coerced13;
+ if (data !== void 0) data["authority"] = coerced13;
+ }
}
- var valid1 = _errs44 === errors;
- } else {
- var valid1 = true;
- }
+ var valid1 = _errs54 === errors;
+ } else var valid1 = true;
if (valid1) {
- if (data.authority !== undefined) {
- let data16 = data.authority;
- const _errs54 = errors;
- if (typeof data16 !== "string") {
- let dataType13 = typeof data16;
- let coerced13 = undefined;
- if (!(coerced13 !== undefined)) {
- if (dataType13 == "number" || dataType13 == "boolean") {
- coerced13 = "" + data16;
- } else if (data16 === null) {
- coerced13 = "";
- } else {
+ if (data.remoteAddress !== void 0) {
+ let data17 = data.remoteAddress;
+ const _errs56 = errors;
+ if (typeof data17 !== "string") {
+ let dataType14 = typeof data17;
+ let coerced14 = void 0;
+ if (!(coerced14 !== void 0)) if (dataType14 == "number" || dataType14 == "boolean") coerced14 = "" + data17;
+ else if (data17 === null) coerced14 = "";
+ else {
+ validate10.errors = [{
+ instancePath: instancePath + "/remoteAddress",
+ schemaPath: "#/properties/remoteAddress/type",
+ keyword: "type",
+ params: { type: "string" },
+ message: "must be string"
+ }];
+ return false;
+ }
+ if (coerced14 !== void 0) {
+ data17 = coerced14;
+ if (data !== void 0) data["remoteAddress"] = coerced14;
+ }
+ }
+ var valid1 = _errs56 === errors;
+ } else var valid1 = true;
+ if (valid1) {
+ if (data.method !== void 0) {
+ let data18 = data.method;
+ const _errs58 = errors;
+ if (typeof data18 !== "string") {
+ let dataType15 = typeof data18;
+ let coerced15 = void 0;
+ if (!(coerced15 !== void 0)) if (dataType15 == "number" || dataType15 == "boolean") coerced15 = "" + data18;
+ else if (data18 === null) coerced15 = "";
+ else {
validate10.errors = [{
- instancePath: instancePath + "/authority",
- schemaPath: "#/properties/authority/type",
+ instancePath: instancePath + "/method",
+ schemaPath: "#/properties/method/type",
keyword: "type",
params: { type: "string" },
message: "must be string"
}];
return false;
}
- }
- if (coerced13 !== undefined) {
- data16 = coerced13;
- if (data !== undefined) {
- data["authority"] = coerced13;
+ if (coerced15 !== void 0) {
+ data18 = coerced15;
+ if (data !== void 0) data["method"] = coerced15;
}
}
- }
- var valid1 = _errs54 === errors;
- } else {
- var valid1 = true;
- }
- if (valid1) {
- if (data.remoteAddress !== undefined) {
- let data17 = data.remoteAddress;
- const _errs56 = errors;
- if (typeof data17 !== "string") {
- let dataType14 = typeof data17;
- let coerced14 = undefined;
- if (!(coerced14 !== undefined)) {
- if (dataType14 == "number" || dataType14 == "boolean") {
- coerced14 = "" + data17;
- } else if (data17 === null) {
- coerced14 = "";
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/remoteAddress",
- schemaPath: "#/properties/remoteAddress/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- }];
- return false;
- }
- }
- if (coerced14 !== undefined) {
- data17 = coerced14;
- if (data !== undefined) {
- data["remoteAddress"] = coerced14;
- }
- }
+ if (!(data18 === "ACL" || data18 === "BIND" || data18 === "CHECKOUT" || data18 === "CONNECT" || data18 === "COPY" || data18 === "DELETE" || data18 === "GET" || data18 === "HEAD" || data18 === "LINK" || data18 === "LOCK" || data18 === "M-SEARCH" || data18 === "MERGE" || data18 === "MKACTIVITY" || data18 === "MKCALENDAR" || data18 === "MKCOL" || data18 === "MOVE" || data18 === "NOTIFY" || data18 === "OPTIONS" || data18 === "PATCH" || data18 === "POST" || data18 === "PROPFIND" || data18 === "PROPPATCH" || data18 === "PURGE" || data18 === "PUT" || data18 === "REBIND" || data18 === "REPORT" || data18 === "SEARCH" || data18 === "SOURCE" || data18 === "SUBSCRIBE" || data18 === "TRACE" || data18 === "UNBIND" || data18 === "UNLINK" || data18 === "UNLOCK" || data18 === "UNSUBSCRIBE" || data18 === "acl" || data18 === "bind" || data18 === "checkout" || data18 === "connect" || data18 === "copy" || data18 === "delete" || data18 === "get" || data18 === "head" || data18 === "link" || data18 === "lock" || data18 === "m-search" || data18 === "merge" || data18 === "mkactivity" || data18 === "mkcalendar" || data18 === "mkcol" || data18 === "move" || data18 === "notify" || data18 === "options" || data18 === "patch" || data18 === "post" || data18 === "propfind" || data18 === "proppatch" || data18 === "purge" || data18 === "put" || data18 === "rebind" || data18 === "report" || data18 === "search" || data18 === "source" || data18 === "subscribe" || data18 === "trace" || data18 === "unbind" || data18 === "unlink" || data18 === "unlock" || data18 === "unsubscribe")) {
+ validate10.errors = [{
+ instancePath: instancePath + "/method",
+ schemaPath: "#/properties/method/enum",
+ keyword: "enum",
+ params: { allowedValues: schema11.properties.method.enum },
+ message: "must be equal to one of the allowed values"
+ }];
+ return false;
}
- var valid1 = _errs56 === errors;
- } else {
- var valid1 = true;
- }
- if (valid1) {
- if (data.method !== undefined) {
- let data18 = data.method;
- const _errs58 = errors;
- if (typeof data18 !== "string") {
- let dataType15 = typeof data18;
- let coerced15 = undefined;
- if (!(coerced15 !== undefined)) {
- if (dataType15 == "number" || dataType15 == "boolean") {
- coerced15 = "" + data18;
- } else if (data18 === null) {
- coerced15 = "";
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/method",
- schemaPath: "#/properties/method/type",
- keyword: "type",
- params: { type: "string" },
- message: "must be string"
- }];
- return false;
- }
- }
- if (coerced15 !== undefined) {
- data18 = coerced15;
- if (data !== undefined) {
- data["method"] = coerced15;
- }
- }
- }
- if (!(data18 === "ACL" || data18 === "BIND" || data18 === "CHECKOUT" || data18 === "CONNECT" || data18 === "COPY" || data18 === "DELETE" || data18 === "GET" || data18 === "HEAD" || data18 === "LINK" || data18 === "LOCK" || data18 === "M-SEARCH" || data18 === "MERGE" || data18 === "MKACTIVITY" || data18 === "MKCALENDAR" || data18 === "MKCOL" || data18 === "MOVE" || data18 === "NOTIFY" || data18 === "OPTIONS" || data18 === "PATCH" || data18 === "POST" || data18 === "PROPFIND" || data18 === "PROPPATCH" || data18 === "PURGE" || data18 === "PUT" || data18 === "REBIND" || data18 === "REPORT" || data18 === "SEARCH" || data18 === "SOURCE" || data18 === "SUBSCRIBE" || data18 === "TRACE" || data18 === "UNBIND" || data18 === "UNLINK" || data18 === "UNLOCK" || data18 === "UNSUBSCRIBE" || data18 === "acl" || data18 === "bind" || data18 === "checkout" || data18 === "connect" || data18 === "copy" || data18 === "delete" || data18 === "get" || data18 === "head" || data18 === "link" || data18 === "lock" || data18 === "m-search" || data18 === "merge" || data18 === "mkactivity" || data18 === "mkcalendar" || data18 === "mkcol" || data18 === "move" || data18 === "notify" || data18 === "options" || data18 === "patch" || data18 === "post" || data18 === "propfind" || data18 === "proppatch" || data18 === "purge" || data18 === "put" || data18 === "rebind" || data18 === "report" || data18 === "search" || data18 === "source" || data18 === "subscribe" || data18 === "trace" || data18 === "unbind" || data18 === "unlink" || data18 === "unlock" || data18 === "unsubscribe")) {
+ var valid1 = _errs58 === errors;
+ } else var valid1 = true;
+ if (valid1) if (data.validate !== void 0) {
+ let data19 = data.validate;
+ const _errs60 = errors;
+ if (typeof data19 !== "boolean") {
+ let coerced16 = void 0;
+ if (!(coerced16 !== void 0)) if (data19 === "false" || data19 === 0 || data19 === null) coerced16 = false;
+ else if (data19 === "true" || data19 === 1) coerced16 = true;
+ else {
validate10.errors = [{
- instancePath: instancePath + "/method",
- schemaPath: "#/properties/method/enum",
- keyword: "enum",
- params: { allowedValues: schema11.properties.method.enum },
- message: "must be equal to one of the allowed values"
+ instancePath: instancePath + "/validate",
+ schemaPath: "#/properties/validate/type",
+ keyword: "type",
+ params: { type: "boolean" },
+ message: "must be boolean"
}];
return false;
}
- var valid1 = _errs58 === errors;
- } else {
- var valid1 = true;
- }
- if (valid1) {
- if (data.validate !== undefined) {
- let data19 = data.validate;
- const _errs60 = errors;
- if (typeof data19 !== "boolean") {
- let coerced16 = undefined;
- if (!(coerced16 !== undefined)) {
- if (data19 === "false" || data19 === 0 || data19 === null) {
- coerced16 = false;
- } else if (data19 === "true" || data19 === 1) {
- coerced16 = true;
- } else {
- validate10.errors = [{
- instancePath: instancePath + "/validate",
- schemaPath: "#/properties/validate/type",
- keyword: "type",
- params: { type: "boolean" },
- message: "must be boolean"
- }];
- return false;
- }
- }
- if (coerced16 !== undefined) {
- data19 = coerced16;
- if (data !== undefined) {
- data["validate"] = coerced16;
- }
- }
- }
- var valid1 = _errs60 === errors;
- } else {
- var valid1 = true;
+ if (coerced16 !== void 0) {
+ data19 = coerced16;
+ if (data !== void 0) data["validate"] = coerced16;
}
}
- }
+ var valid1 = _errs60 === errors;
+ } else var valid1 = true;
}
}
}
@@ -114363,22 +103801,21 @@ var require_config_validator = /* @__PURE__ */ __commonJSMin(((exports, module)
}
}
}
- } else {
- validate10.errors = [{
- instancePath,
- schemaPath: "#/type",
- keyword: "type",
- params: { type: "object" },
- message: "must be object"
- }];
- return false;
}
+ } else {
+ validate10.errors = [{
+ instancePath,
+ schemaPath: "#/type",
+ keyword: "type",
+ params: { type: "object" },
+ message: "must be object"
+ }];
+ return false;
}
validate10.errors = vErrors;
return errors === 0;
}
}));
-
//#endregion
//#region ../node_modules/light-my-request/index.js
var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -114388,11 +103825,8 @@ var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module)
const errorMessage = "The dispatch function has already been invoked";
const optsValidator = require_config_validator();
function inject(dispatchFunc, options, callback) {
- if (callback === undefined) {
- return new Chain(dispatchFunc, options);
- } else {
- return doInject(dispatchFunc, options, callback);
- }
+ if (callback === void 0) return new Chain(dispatchFunc, options);
+ else return doInject(dispatchFunc, options, callback);
}
function makeRequest(dispatchFunc, server, req, res) {
req.once("error", function(err) {
@@ -114407,10 +103841,7 @@ var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module)
options = typeof options === "string" ? { url: options } : options;
if (options.validate !== false) {
assert$35(typeof dispatchFunc === "function", "dispatchFunc should be a function");
- const isOptionValid = optsValidator(options);
- if (!isOptionValid) {
- throw new Error(optsValidator.errors.map((e) => e.message));
- }
+ if (!optsValidator(options)) throw new Error(optsValidator.errors.map((e) => e.message));
}
const server = options.server || {};
const RequestConstructor = options.Request ? Request.CustomRequest : Request;
@@ -114420,34 +103851,23 @@ var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module)
}
if (typeof callback === "function") {
const req = new RequestConstructor(options);
- const res = new Response(req, callback);
- return makeRequest(dispatchFunc, server, req, res);
- } else {
- return new Promise((resolve, reject) => {
- const req = new RequestConstructor(options);
- const res = new Response(req, resolve, reject);
- makeRequest(dispatchFunc, server, req, res);
- });
- }
+ return makeRequest(dispatchFunc, server, req, new Response(req, callback));
+ } else return new Promise((resolve, reject) => {
+ const req = new RequestConstructor(options);
+ makeRequest(dispatchFunc, server, req, new Response(req, resolve, reject));
+ });
}
function Chain(dispatch, option) {
- if (typeof option === "string") {
- this.option = { url: option };
- } else {
- this.option = Object.assign({}, option);
- }
+ if (typeof option === "string") this.option = { url: option };
+ else this.option = Object.assign({}, option);
this.dispatch = dispatch;
this._hasInvoked = false;
this._promise = null;
- if (this.option.autoStart !== false) {
- process.nextTick(() => {
- if (!this._hasInvoked) {
- this.end();
- }
- });
- }
+ if (this.option.autoStart !== false) process.nextTick(() => {
+ if (!this._hasInvoked) this.end();
+ });
}
- const httpMethods = [
+ [
"delete",
"get",
"head",
@@ -114456,41 +103876,32 @@ var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module)
"post",
"put",
"trace"
- ];
- httpMethods.forEach((method) => {
+ ].forEach((method) => {
Chain.prototype[method] = function(url) {
- if (this._hasInvoked === true || this._promise) {
- throw new Error(errorMessage);
- }
+ if (this._hasInvoked === true || this._promise) throw new Error(errorMessage);
this.option.url = url;
this.option.method = method.toUpperCase();
return this;
};
});
- const chainMethods = [
+ [
"body",
"cookies",
"headers",
"payload",
"query"
- ];
- chainMethods.forEach((method) => {
+ ].forEach((method) => {
Chain.prototype[method] = function(value) {
- if (this._hasInvoked === true || this._promise) {
- throw new Error(errorMessage);
- }
+ if (this._hasInvoked === true || this._promise) throw new Error(errorMessage);
this.option[method] = value;
return this;
};
});
Chain.prototype.end = function(callback) {
- if (this._hasInvoked === true || this._promise) {
- throw new Error(errorMessage);
- }
+ if (this._hasInvoked === true || this._promise) throw new Error(errorMessage);
this._hasInvoked = true;
- if (typeof callback === "function") {
- doInject(this.dispatch, this.option, callback);
- } else {
+ if (typeof callback === "function") doInject(this.dispatch, this.option, callback);
+ else {
this._promise = doInject(this.dispatch, this.option);
return this._promise;
}
@@ -114499,9 +103910,7 @@ var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module)
if (method === "constructor") return;
Chain.prototype[method] = function(...args) {
if (!this._promise) {
- if (this._hasInvoked === true) {
- throw new Error(errorMessage);
- }
+ if (this._hasInvoked === true) throw new Error(errorMessage);
this._hasInvoked = true;
this._promise = doInject(this.dispatch, this.option);
}
@@ -114516,7 +103925,6 @@ var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module)
module.exports.inject = inject;
module.exports.isInjection = isInjection;
}));
-
//#endregion
//#region ../node_modules/fastify/fastify.js
var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -114549,12 +103957,11 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { buildErrorHandler } = require_error_handler();
function defaultBuildPrettyMeta(route) {
const cleanKeys = {};
- const allowedProps = [
+ [
"errorHandler",
"logLevel",
"logSerializers"
- ];
- allowedProps.concat(supportedHooks).forEach((k) => {
+ ].concat(supportedHooks).forEach((k) => {
cleanKeys[k] = route.store[k];
});
return Object.assign({}, cleanKeys);
@@ -114564,15 +103971,9 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
function fastify$1(options) {
options = options || {};
- if (typeof options !== "object") {
- throw new FST_ERR_OPTIONS_NOT_OBJ();
- }
- if (options.querystringParser && typeof options.querystringParser !== "function") {
- throw new FST_ERR_QSP_NOT_FN(typeof options.querystringParser);
- }
- if (options.schemaController && options.schemaController.bucket && typeof options.schemaController.bucket !== "function") {
- throw new FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN(typeof options.schemaController.bucket);
- }
+ if (typeof options !== "object") throw new FST_ERR_OPTIONS_NOT_OBJ();
+ if (options.querystringParser && typeof options.querystringParser !== "function") throw new FST_ERR_QSP_NOT_FN(typeof options.querystringParser);
+ if (options.schemaController && options.schemaController.bucket && typeof options.schemaController.bucket !== "function") throw new FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN(typeof options.schemaController.bucket);
validateBodyLimitOption(options.bodyLimit);
const requestIdHeader = options.requestIdHeader === false ? false : (options.requestIdHeader || defaultInitOptions.requestIdHeader).toLowerCase();
const genReqId = reqIdGenFactory(requestIdHeader, options.genReqId);
@@ -114584,12 +103985,8 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
plugins: []
}, options.ajv);
const frameworkErrors = options.frameworkErrors;
- if (!ajvOptions.customOptions || Object.prototype.toString.call(ajvOptions.customOptions) !== "[object Object]") {
- throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ(typeof ajvOptions.customOptions);
- }
- if (!ajvOptions.plugins || !Array.isArray(ajvOptions.plugins)) {
- throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR(typeof ajvOptions.plugins);
- }
+ if (!ajvOptions.customOptions || Object.prototype.toString.call(ajvOptions.customOptions) !== "[object Object]") throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ(typeof ajvOptions.customOptions);
+ if (!ajvOptions.plugins || !Array.isArray(ajvOptions.plugins)) throw new FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR(typeof ajvOptions.plugins);
const { logger, hasLogger } = createLogger(options);
options.connectionTimeout = options.connectionTimeout || defaultInitOptions.connectionTimeout;
options.keepAliveTimeout = options.keepAliveTimeout || defaultInitOptions.keepAliveTimeout;
@@ -114614,9 +104011,7 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
storage: options.versioning.storage,
deriveConstraint: options.versioning.deriveVersion,
validate(value) {
- if (typeof value !== "string") {
- throw new FST_ERR_VERSION_CONSTRAINT_NOT_STR();
- }
+ if (typeof value !== "string") throw new FST_ERR_VERSION_CONSTRAINT_NOT_STR();
}
}
};
@@ -114641,13 +104036,11 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const serverHasCloseAllConnections = typeof server.closeAllConnections === "function";
const serverHasCloseIdleConnections = typeof server.closeIdleConnections === "function";
let forceCloseConnections = options.forceCloseConnections;
- if (forceCloseConnections === "idle" && !serverHasCloseIdleConnections) {
- throw new FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE();
- } else if (typeof forceCloseConnections !== "boolean") {
- /* istanbul ignore next: only one branch can be valid in a given Node.js version */
- forceCloseConnections = serverHasCloseIdleConnections ? "idle" : false;
- }
- const keepAliveConnections = !serverHasCloseAllConnections && forceCloseConnections === true ? new Set() : noopSet();
+ if (forceCloseConnections === "idle" && !serverHasCloseIdleConnections) throw new FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE();
+ else if (typeof forceCloseConnections !== "boolean")
+ /* istanbul ignore next: only one branch can be valid in a given Node.js version */
+ forceCloseConnections = serverHasCloseIdleConnections ? "idle" : false;
+ const keepAliveConnections = !serverHasCloseAllConnections && forceCloseConnections === true ? /* @__PURE__ */ new Set() : noopSet();
const setupResponseListeners = Reply.setupResponseListeners;
const schemaController = SchemaController.buildSchemaController(null, options.schemaController);
const fastify = {
@@ -114811,18 +104204,14 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
listeningOrigin: { get() {
const address = this.addresses().slice(-1).pop();
/* c8 ignore next 3 */
- if (typeof address === "string") {
- return address;
- }
+ if (typeof address === "string") return address;
const host = address.family === "IPv6" ? `[${address.address}]` : address.address;
return `${this[kOptions].https ? "https" : "http"}://${host}:${address.port}`;
} },
pluginName: {
configurable: true,
get() {
- if (this[kPluginNameChain].length > 1) {
- return this[kPluginNameChain].join(" -> ");
- }
+ if (this[kPluginNameChain].length > 1) return this[kPluginNameChain].join(" -> ");
return this[kPluginNameChain][0];
}
},
@@ -114891,29 +104280,19 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
hookRunnerApplication("preClose", fastify[kAvvioBoot], fastify, function() {
if (fastify[kState].listening) {
/* istanbul ignore next: Cannot test this without Node.js core support */
- if (forceCloseConnections === "idle") {
- instance.server.closeIdleConnections();
- } else if (serverHasCloseAllConnections && forceCloseConnections) {
- instance.server.closeAllConnections();
- } else if (forceCloseConnections === true) {
- for (const conn of fastify[kKeepAliveConnections]) {
- conn.destroy();
- fastify[kKeepAliveConnections].delete(conn);
- }
+ if (forceCloseConnections === "idle") instance.server.closeIdleConnections();
+ else if (serverHasCloseAllConnections && forceCloseConnections) instance.server.closeAllConnections();
+ else if (forceCloseConnections === true) for (const conn of fastify[kKeepAliveConnections]) {
+ conn.destroy();
+ fastify[kKeepAliveConnections].delete(conn);
}
}
- if (!options.serverFactory || fastify[kState].listening) {
- instance.server.close(function(err) {
- /* c8 ignore next 6 */
- if (err && err.code !== "ERR_SERVER_NOT_RUNNING") {
- done(null);
- } else {
- done();
- }
- });
- } else {
- process.nextTick(done, null);
- }
+ if (!options.serverFactory || fastify[kState].listening) instance.server.close(function(err) {
+ /* c8 ignore next 6 */
+ if (err && err.code !== "ERR_SERVER_NOT_RUNNING") done(null);
+ else done();
+ });
+ else process.nextTick(done, null);
});
});
});
@@ -114935,53 +104314,41 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
});
server.on("clientError", options.clientErrorHandler.bind(fastify));
try {
- const dc = __require("node:diagnostics_channel");
- const initChannel = dc.channel("fastify.initialization");
- if (initChannel.hasSubscribers) {
- initChannel.publish({ fastify });
- }
+ const initChannel = __require("node:diagnostics_channel").channel("fastify.initialization");
+ if (initChannel.hasSubscribers) initChannel.publish({ fastify });
} catch (e) {}
- if ("asyncDispose" in Symbol) {
- fastify[Symbol.asyncDispose] = function dispose() {
- return fastify.close();
- };
- }
+ if ("asyncDispose" in Symbol) fastify[Symbol.asyncDispose] = function dispose() {
+ return fastify.close();
+ };
return fastify;
function throwIfAlreadyStarted(msg) {
if (fastify[kState].started) throw new FST_ERR_INSTANCE_ALREADY_LISTENING(msg);
}
function inject(opts, cb) {
- if (lightMyRequest === undefined) {
- lightMyRequest = require_light_my_request();
- }
+ if (lightMyRequest === void 0) lightMyRequest = require_light_my_request();
if (fastify[kState].started) {
if (fastify[kState].closing) {
const error = new FST_ERR_REOPENED_CLOSE_SERVER();
if (cb) {
cb(error);
return;
- } else {
- return Promise.reject(error);
- }
+ } else return Promise.reject(error);
}
return lightMyRequest(httpHandler, opts, cb);
}
- if (cb) {
- this.ready((err) => {
- if (err) cb(err, null);
- else lightMyRequest(httpHandler, opts, cb);
+ if (cb) this.ready((err) => {
+ if (err) cb(err, null);
+ else lightMyRequest(httpHandler, opts, cb);
+ });
+ else return lightMyRequest((req, res) => {
+ this.ready(function(err) {
+ if (err) {
+ res.emit("error", err);
+ return;
+ }
+ httpHandler(req, res);
});
- } else {
- return lightMyRequest((req, res) => {
- this.ready(function(err) {
- if (err) {
- res.emit("error", err);
- return;
- }
- httpHandler(req, res);
- });
- }, opts);
- }
+ }, opts);
}
function ready(cb) {
if (this[kState].readyPromise !== null) {
@@ -114998,16 +104365,12 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
resolveReady = resolve;
rejectReady = reject;
});
- if (!cb) {
- return this[kState].readyPromise;
- } else {
- this[kState].readyPromise.then(() => cb(null, fastify), cb);
- }
+ if (!cb) return this[kState].readyPromise;
+ else this[kState].readyPromise.then(() => cb(null, fastify), cb);
function runHooks() {
fastify[kAvvioBoot]((err, done) => {
- if (err || fastify[kState].started || fastify[kState].ready || fastify[kState].booting) {
- manageErr(err);
- } else {
+ if (err || fastify[kState].started || fastify[kState].ready || fastify[kState].booting) manageErr(err);
+ else {
fastify[kState].booting = true;
hookRunnerApplication("onReady", fastify[kAvvioBoot], fastify, manageErr);
}
@@ -115016,9 +104379,7 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function manageErr(err) {
err = err != null && AVVIO_ERRORS_MAP[err.code] != null ? appendStackTrace(err, new AVVIO_ERRORS_MAP[err.code](err.message)) : err;
- if (err) {
- return rejectReady(err);
- }
+ if (err) return rejectReady(err);
resolveReady(fastify);
fastify[kState].booting = false;
fastify[kState].ready = true;
@@ -115030,36 +104391,20 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function addHook(name, fn) {
throwIfAlreadyStarted("Cannot call \"addHook\"!");
- if (fn == null) {
- throw new errorCodes.FST_ERR_HOOK_INVALID_HANDLER(name, fn);
- }
+ if (fn == null) throw new errorCodes.FST_ERR_HOOK_INVALID_HANDLER(name, fn);
if (name === "onSend" || name === "preSerialization" || name === "onError" || name === "preParsing") {
- if (fn.constructor.name === "AsyncFunction" && fn.length === 4) {
- throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
- }
+ if (fn.constructor.name === "AsyncFunction" && fn.length === 4) throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
} else if (name === "onReady" || name === "onListen") {
- if (fn.constructor.name === "AsyncFunction" && fn.length !== 0) {
- throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
- }
+ if (fn.constructor.name === "AsyncFunction" && fn.length !== 0) throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
} else if (name === "onRequestAbort") {
- if (fn.constructor.name === "AsyncFunction" && fn.length !== 1) {
- throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
- }
- } else {
- if (fn.constructor.name === "AsyncFunction" && fn.length === 3) {
- throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
- }
- }
- if (name === "onClose") {
- this.onClose(fn.bind(this));
- } else if (name === "onReady" || name === "onListen" || name === "onRoute") {
- this[kHooks].add(name, fn);
- } else {
- this.after((err, done) => {
- _addHook.call(this, name, fn);
- done(err);
- });
- }
+ if (fn.constructor.name === "AsyncFunction" && fn.length !== 1) throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
+ } else if (fn.constructor.name === "AsyncFunction" && fn.length === 3) throw new errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER();
+ if (name === "onClose") this.onClose(fn.bind(this));
+ else if (name === "onReady" || name === "onListen" || name === "onRoute") this[kHooks].add(name, fn);
+ else this.after((err, done) => {
+ _addHook.call(this, name, fn);
+ done(err);
+ });
return this;
function _addHook(name, fn) {
this[kHooks].add(name, fn);
@@ -115073,9 +104418,7 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
}
function defaultClientErrorHandler(err, socket) {
- if (err.code === "ECONNRESET" || socket.destroyed) {
- return;
- }
+ if (err.code === "ECONNRESET" || socket.destroyed) return;
let body, errorCode, errorStatus, errorLabel;
if (err.code === "ERR_HTTP_REQUEST_TIMEOUT") {
errorCode = "408";
@@ -115094,15 +104437,13 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
errorLabel = "error";
}
this.log.trace({ err }, `client ${errorLabel}`);
- if (socket.writable) {
- socket.write(`HTTP/1.1 ${errorCode} ${errorStatus}\r\nContent-Length: ${body.length}\r\nContent-Type: application/json\r\n\r\n${body}`);
- }
+ if (socket.writable) socket.write(`HTTP/1.1 ${errorCode} ${errorStatus}\r\nContent-Length: ${body.length}\r\nContent-Type: application/json\r\n\r\n${body}`);
socket.destroy(err);
}
function defaultRoute(req, res) {
- if (req.headers["accept-version"] !== undefined) {
+ if (req.headers["accept-version"] !== void 0) {
req.headers[kRequestAcceptVersion] = req.headers["accept-version"];
- req.headers["accept-version"] = undefined;
+ req.headers["accept-version"] = void 0;
}
fourOhFour.router.lookup(req, res);
}
@@ -115112,9 +104453,7 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const childLogger = createChildLogger(onBadUrlContext, logger, req, id);
const request = new Request(id, null, req, null, childLogger, onBadUrlContext);
const reply = new Reply(res, request, childLogger);
- if (disableRequestLogging === false) {
- childLogger.info({ req: request }, "incoming request");
- }
+ if (disableRequestLogging === false) childLogger.info({ req: request }, "incoming request");
return frameworkErrors(new FST_ERR_BAD_URL(path), request, reply);
}
const body = `{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${path}' is not a valid url component","statusCode":400}`;
@@ -115125,7 +104464,7 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
res.end(body);
}
function buildAsyncConstraintCallback(isAsync, req, res) {
- if (isAsync === false) return undefined;
+ if (isAsync === false) return void 0;
return function onAsyncConstraintError(err) {
if (err) {
if (frameworkErrors) {
@@ -115133,15 +104472,13 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const childLogger = createChildLogger(onBadUrlContext, logger, req, id);
const request = new Request(id, null, req, null, childLogger, onBadUrlContext);
const reply = new Reply(res, request, childLogger);
- if (disableRequestLogging === false) {
- childLogger.info({ req: request }, "incoming request");
- }
+ if (disableRequestLogging === false) childLogger.info({ req: request }, "incoming request");
return frameworkErrors(new FST_ERR_ASYNC_CONSTRAINT(), request, reply);
}
const body = "{\"error\":\"Internal Server Error\",\"message\":\"Unexpected error from async constraint\",\"statusCode\":500}";
res.writeHead(500, {
"Content-Type": "application/json",
- "Content-Length": body.length
+ "Content-Length": 101
});
res.end(body);
}
@@ -115184,9 +104521,7 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function setErrorHandler(func) {
throwIfAlreadyStarted("Cannot call \"setErrorHandler\"!");
- if (typeof func !== "function") {
- throw new FST_ERR_ERROR_HANDLER_NOT_FN();
- }
+ if (typeof func !== "function") throw new FST_ERR_ERROR_HANDLER_NOT_FN();
this[kErrorHandler] = buildErrorHandler(this[kErrorHandler], func.bind(this));
return this;
}
@@ -115202,13 +104537,12 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function wrapRouting(router, { rewriteUrl, logger }) {
let isAsync;
return function preRouting(req, res) {
- if (isAsync === undefined) isAsync = router.isAsyncConstraint();
+ if (isAsync === void 0) isAsync = router.isAsyncConstraint();
if (rewriteUrl) {
req.originalUrl = req.url;
const url = rewriteUrl.call(fastify, req);
- if (typeof url === "string") {
- req.url = url;
- } else {
+ if (typeof url === "string") req.url = url;
+ else {
const err = new FST_ERR_ROUTE_REWRITE_NOT_STR(req.url, typeof url);
req.destroy(err);
}
@@ -115223,11 +104557,8 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
}
function validateSchemaErrorFormatter(schemaErrorFormatter) {
- if (typeof schemaErrorFormatter !== "function") {
- throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN(typeof schemaErrorFormatter);
- } else if (schemaErrorFormatter.constructor.name === "AsyncFunction") {
- throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN("AsyncFunction");
- }
+ if (typeof schemaErrorFormatter !== "function") throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN(typeof schemaErrorFormatter);
+ else if (schemaErrorFormatter.constructor.name === "AsyncFunction") throw new FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN("AsyncFunction");
}
/**
* These export configurations enable JS and TS developers
@@ -115245,11 +104576,11 @@ var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.fastify = fastify$1;
module.exports.default = fastify$1;
}));
-
//#endregion
//#region ../node_modules/rotating-file-stream/dist/esm/index.js
var import_fastify = /* @__PURE__ */ __toESM(require_fastify(), 1);
var import_pino = /* @__PURE__ */ __toESM(require_pino(), 1);
+var import_dist$1 = require_dist$4();
async function exists(filename) {
return new Promise((resolve) => access(filename, constants.F_OK, (error) => resolve(!error)));
}
@@ -115317,7 +104648,7 @@ var RotatingFileStream = class extends Writable {
this.refinal(error, callback);
}
_final(callback) {
- this.refinal(undefined, callback);
+ this.refinal(void 0, callback);
}
_write(chunk, encoding, callback) {
this.rewrite([{
@@ -115402,7 +104733,7 @@ var RotatingFileStream = class extends Writable {
return file.close();
}
now() {
- return new Date();
+ return /* @__PURE__ */ new Date();
}
async rotate() {
const { immutable, rotate } = this.options;
@@ -115452,14 +104783,12 @@ var RotatingFileStream = class extends Writable {
if (!await exists(prevName)) continue;
if (!rotatedName) rotatedName = currName;
if (count === 1 && compress) await this.compress(currName);
- else {
- try {
- await rename(prevName, currName);
- } catch (e) {
- if (e.code !== "ENOENT") throw e;
- await this.makePath(currName);
- await rename(prevName, currName);
- }
+ else try {
+ await rename(prevName, currName);
+ } catch (e) {
+ if (e.code !== "ENOENT") throw e;
+ await this.makePath(currName);
+ await rename(prevName, currName);
}
}
return this.rotated(rotatedName);
@@ -115504,13 +104833,12 @@ var RotatingFileStream = class extends Writable {
this.intervalBounds(this.now());
const set = async () => {
const time = this.next - this.now().getTime();
- if (time <= 0) {
- try {
- this.timeoutPromise = this.rotate();
- await this.timeoutPromise;
- delete this.timeoutPromise;
- } catch (e) {}
- } else {
+ if (time <= 0) try {
+ this.timeoutPromise = this.rotate();
+ await this.timeoutPromise;
+ delete this.timeoutPromise;
+ } catch (e) {}
+ else {
this.timeout = setTimeout$1(set, time > this.maxTimeout ? this.maxTimeout : time);
this.timeout.unref();
}
@@ -115519,14 +104847,13 @@ var RotatingFileStream = class extends Writable {
}
async compress(filename) {
const { compress } = this.options;
- if (typeof compress === "function") {
- await new Promise((resolve, reject) => {
- this.exec(compress(this.filename, filename), (error, stdout, stderr) => {
- this.emit("external", stdout, stderr);
- error ? reject(error) : resolve();
- });
+ if (typeof compress === "function") await new Promise((resolve, reject) => {
+ this.exec(compress(this.filename, filename), (error, stdout, stderr) => {
+ this.emit("external", stdout, stderr);
+ error ? reject(error) : resolve();
});
- } else await this.gzip(filename);
+ });
+ else await this.gzip(filename);
return this.unlink(this.filename);
}
async gzip(filename) {
@@ -115554,41 +104881,31 @@ var RotatingFileStream = class extends Writable {
const res = [];
let files = [filename];
try {
- const content = await this.fsReadFile(history, "utf8");
- files = [...content.toString().split("\n"), filename];
+ files = [...(await this.fsReadFile(history, "utf8")).toString().split("\n"), filename];
} catch (e) {
if (e.code !== "ENOENT") throw e;
}
- for (const file of files) {
- if (file) {
- try {
- const stats = await this.fsStat(file);
- if (stats.isFile()) {
- res.push({
- name: file,
- size: stats.size,
- time: stats.mtime.getTime()
- });
- } else this.emit("warning", new Error(`File '${file}' contained in history is not a regular file`));
- } catch (e) {
- if (e.code !== "ENOENT") throw e;
- }
- }
+ for (const file of files) if (file) try {
+ const stats = await this.fsStat(file);
+ if (stats.isFile()) res.push({
+ name: file,
+ size: stats.size,
+ time: stats.mtime.getTime()
+ });
+ else this.emit("warning", /* @__PURE__ */ new Error(`File '${file}' contained in history is not a regular file`));
+ } catch (e) {
+ if (e.code !== "ENOENT") throw e;
}
res.sort((a, b) => a.time - b.time);
- if (maxFiles) {
- while (res.length > maxFiles) {
- const file = res.shift();
- await this.unlink(file.name);
- this.emit("removed", file.name, true);
- }
+ if (maxFiles) while (res.length > maxFiles) {
+ const file = res.shift();
+ await this.unlink(file.name);
+ this.emit("removed", file.name, true);
}
- if (maxSize) {
- while (res.reduce((size, file) => size + file.size, 0) > maxSize) {
- const file = res.shift();
- await this.unlink(file.name);
- this.emit("removed", file.name, false);
- }
+ if (maxSize) while (res.reduce((size, file) => size + file.size, 0) > maxSize) {
+ const file = res.shift();
+ await this.unlink(file.name);
+ this.emit("removed", file.name, false);
}
await writeFile(history, res.map((e) => e.name).join("\n") + "\n", "utf-8");
this.emit("history");
@@ -115598,7 +104915,7 @@ var RotatingFileStream = class extends Writable {
const now = this.now();
for (let index = 1; index < 1e3; ++index) {
let fileSize = 0;
- let stats = undefined;
+ let stats = void 0;
this.filename = this.options.path + this.generator(now, index);
try {
stats = await this.fsStat(this.filename);
@@ -115703,22 +105020,20 @@ const checks = {
rotate: buildNumberCheck("rotate"),
size: buildStringCheck("size", checkSize),
teeToStdout: () => {},
- ...{
- compress: (type, options, value) => {
- if (value === false) return;
- if (!value) throw new Error("A value for 'options.compress' must be specified");
- if (type === "boolean") return options.compress = (source, dest) => `cat ${source} | gzip -c9 > ${dest}`;
- if (type === "function") return;
- if (type !== "string") throw new Error(`Don't know how to handle 'options.compress' type: ${type}`);
- if (value !== "gzip") throw new Error(`Don't know how to handle compression method: ${value}`);
- },
- history: (type) => {
- if (type !== "string") throw new Error(`Don't know how to handle 'options.history' type: ${type}`);
- },
- path: (type, options, value) => {
- if (type !== "string") throw new Error(`Don't know how to handle 'options.path' type: ${type}`);
- if (value[value.length - 1] !== sep) options.path = value + sep;
- }
+ compress: (type, options, value) => {
+ if (value === false) return;
+ if (!value) throw new Error("A value for 'options.compress' must be specified");
+ if (type === "boolean") return options.compress = (source, dest) => `cat ${source} | gzip -c9 > ${dest}`;
+ if (type === "function") return;
+ if (type !== "string") throw new Error(`Don't know how to handle 'options.compress' type: ${type}`);
+ if (value !== "gzip") throw new Error(`Don't know how to handle compression method: ${value}`);
+ },
+ history: (type) => {
+ if (type !== "string") throw new Error(`Don't know how to handle 'options.history' type: ${type}`);
+ },
+ path: (type, options, value) => {
+ if (type !== "string") throw new Error(`Don't know how to handle 'options.path' type: ${type}`);
+ if (value[value.length - 1] !== sep) options.path = value + sep;
}
};
function checkOpts(options) {
@@ -115775,7 +105090,6 @@ function createStream(filename, options) {
else throw new Error(`The "filename" argument must be one of type string or function. Received type ${typeof filename}`);
return new RotatingFileStream(generator, opts);
}
-
//#endregion
//#region ../node_modules/dotenv/package.json
var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -115838,7 +105152,6 @@ var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
"browser": { "fs": false }
};
}));
-
//#endregion
//#region ../node_modules/dotenv/lib/main.js
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -115846,8 +105159,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const path$4 = __require("path");
const os$1 = __require("os");
const crypto$5 = __require("crypto");
- const packageJson = require_package();
- const version = packageJson.version;
+ const version = require_package().version;
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
function parse(src) {
const obj = {};
@@ -115874,24 +105186,19 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
options.path = vaultPath;
const result = DotenvModule.configDotenv(options);
if (!result.parsed) {
- const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
+ const err = /* @__PURE__ */ new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
err.code = "MISSING_DATA";
throw err;
}
const keys = _dotenvKey(options).split(",");
const length = keys.length;
let decrypted;
- for (let i = 0; i < length; i++) {
- try {
- const key = keys[i].trim();
- const attrs = _instructions(result, key);
- decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
- break;
- } catch (error) {
- if (i + 1 >= length) {
- throw error;
- }
- }
+ for (let i = 0; i < length; i++) try {
+ const attrs = _instructions(result, keys[i].trim());
+ decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
+ break;
+ } catch (error) {
+ if (i + 1 >= length) throw error;
}
return DotenvModule.parse(decrypted);
}
@@ -115905,12 +105212,8 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
console.log(`[dotenv@${version}] ${message}`);
}
function _dotenvKey(options) {
- if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
- return options.DOTENV_KEY;
- }
- if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
- return process.env.DOTENV_KEY;
- }
+ if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) return options.DOTENV_KEY;
+ if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) return process.env.DOTENV_KEY;
return "";
}
function _instructions(result, dotenvKey) {
@@ -115919,7 +105222,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
uri = new URL(dotenvKey);
} catch (error) {
if (error.code === "ERR_INVALID_URL") {
- const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
+ const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
err.code = "INVALID_DOTENV_KEY";
throw err;
}
@@ -115927,20 +105230,20 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
const key = uri.password;
if (!key) {
- const err = new Error("INVALID_DOTENV_KEY: Missing key part");
+ const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing key part");
err.code = "INVALID_DOTENV_KEY";
throw err;
}
const environment = uri.searchParams.get("environment");
if (!environment) {
- const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
+ const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing environment part");
err.code = "INVALID_DOTENV_KEY";
throw err;
}
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
const ciphertext = result.parsed[environmentKey];
if (!ciphertext) {
- const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
+ const err = /* @__PURE__ */ new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
throw err;
}
@@ -115951,22 +105254,11 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
function _vaultPath(options) {
let possibleVaultPath = null;
- if (options && options.path && options.path.length > 0) {
- if (Array.isArray(options.path)) {
- for (const filepath of options.path) {
- if (fs$3.existsSync(filepath)) {
- possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
- }
- }
- } else {
- possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
- }
- } else {
- possibleVaultPath = path$4.resolve(process.cwd(), ".env.vault");
- }
- if (fs$3.existsSync(possibleVaultPath)) {
- return possibleVaultPath;
- }
+ if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
+ for (const filepath of options.path) if (fs$3.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
+ } else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
+ else possibleVaultPath = path$4.resolve(process.cwd(), ".env.vault");
+ if (fs$3.existsSync(possibleVaultPath)) return possibleVaultPath;
return null;
}
function _resolveHome(envPath) {
@@ -115975,14 +105267,10 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _configVault(options) {
const debug = Boolean(options && options.debug);
const quiet = options && "quiet" in options ? options.quiet : true;
- if (debug || !quiet) {
- _log("Loading env from encrypted .env.vault");
- }
+ if (debug || !quiet) _log("Loading env from encrypted .env.vault");
const parsed = DotenvModule._parseVault(options);
let processEnv = process.env;
- if (options && options.processEnv != null) {
- processEnv = options.processEnv;
- }
+ if (options && options.processEnv != null) processEnv = options.processEnv;
DotenvModule.populate(processEnv, parsed, options);
return { parsed };
}
@@ -115991,71 +105279,46 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
let encoding = "utf8";
const debug = Boolean(options && options.debug);
const quiet = options && "quiet" in options ? options.quiet : true;
- if (options && options.encoding) {
- encoding = options.encoding;
- } else {
- if (debug) {
- _debug("No encoding is specified. UTF-8 is used by default");
- }
- }
+ if (options && options.encoding) encoding = options.encoding;
+ else if (debug) _debug("No encoding is specified. UTF-8 is used by default");
let optionPaths = [dotenvPath];
- if (options && options.path) {
- if (!Array.isArray(options.path)) {
- optionPaths = [_resolveHome(options.path)];
- } else {
- optionPaths = [];
- for (const filepath of options.path) {
- optionPaths.push(_resolveHome(filepath));
- }
- }
+ if (options && options.path) if (!Array.isArray(options.path)) optionPaths = [_resolveHome(options.path)];
+ else {
+ optionPaths = [];
+ for (const filepath of options.path) optionPaths.push(_resolveHome(filepath));
}
let lastError;
const parsedAll = {};
- for (const path of optionPaths) {
- try {
- const parsed = DotenvModule.parse(fs$3.readFileSync(path, { encoding }));
- DotenvModule.populate(parsedAll, parsed, options);
- } catch (e) {
- if (debug) {
- _debug(`Failed to load ${path} ${e.message}`);
- }
- lastError = e;
- }
+ for (const path of optionPaths) try {
+ const parsed = DotenvModule.parse(fs$3.readFileSync(path, { encoding }));
+ DotenvModule.populate(parsedAll, parsed, options);
+ } catch (e) {
+ if (debug) _debug(`Failed to load ${path} ${e.message}`);
+ lastError = e;
}
let processEnv = process.env;
- if (options && options.processEnv != null) {
- processEnv = options.processEnv;
- }
+ if (options && options.processEnv != null) processEnv = options.processEnv;
DotenvModule.populate(processEnv, parsedAll, options);
if (debug || !quiet) {
const keysCount = Object.keys(parsedAll).length;
const shortPaths = [];
- for (const filePath of optionPaths) {
- try {
- const relative = path$4.relative(process.cwd(), filePath);
- shortPaths.push(relative);
- } catch (e) {
- if (debug) {
- _debug(`Failed to load ${filePath} ${e.message}`);
- }
- lastError = e;
- }
+ for (const filePath of optionPaths) try {
+ const relative = path$4.relative(process.cwd(), filePath);
+ shortPaths.push(relative);
+ } catch (e) {
+ if (debug) _debug(`Failed to load ${filePath} ${e.message}`);
+ lastError = e;
}
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`);
}
- if (lastError) {
- return {
- parsed: parsedAll,
- error: lastError
- };
- } else {
- return { parsed: parsedAll };
- }
+ if (lastError) return {
+ parsed: parsedAll,
+ error: lastError
+ };
+ else return { parsed: parsedAll };
}
function config(options) {
- if (_dotenvKey(options).length === 0) {
- return DotenvModule.configDotenv(options);
- }
+ if (_dotenvKey(options).length === 0) return DotenvModule.configDotenv(options);
const vaultPath = _vaultPath(options);
if (!vaultPath) {
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
@@ -116078,42 +105341,29 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const invalidKeyLength = error.message === "Invalid key length";
const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
if (isRange || invalidKeyLength) {
- const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
+ const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
err.code = "INVALID_DOTENV_KEY";
throw err;
} else if (decryptionFailed) {
- const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
+ const err = /* @__PURE__ */ new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
err.code = "DECRYPTION_FAILED";
throw err;
- } else {
- throw error;
- }
+ } else throw error;
}
}
function populate(processEnv, parsed, options = {}) {
const debug = Boolean(options && options.debug);
const override = Boolean(options && options.override);
if (typeof parsed !== "object") {
- const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
+ const err = /* @__PURE__ */ new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
err.code = "OBJECT_REQUIRED";
throw err;
}
- for (const key of Object.keys(parsed)) {
- if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
- if (override === true) {
- processEnv[key] = parsed[key];
- }
- if (debug) {
- if (override === true) {
- _debug(`"${key}" is already defined and WAS overwritten`);
- } else {
- _debug(`"${key}" is already defined and was NOT overwritten`);
- }
- }
- } else {
- processEnv[key] = parsed[key];
- }
- }
+ for (const key of Object.keys(parsed)) if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
+ if (override === true) processEnv[key] = parsed[key];
+ if (debug) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
+ else _debug(`"${key}" is already defined and was NOT overwritten`);
+ } else processEnv[key] = parsed[key];
}
const DotenvModule = {
configDotenv,
@@ -116133,7 +105383,6 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports.populate = DotenvModule.populate;
module.exports = DotenvModule;
}));
-
//#endregion
//#region ../controllers/fastlogger.js
var import_main = /* @__PURE__ */ __toESM(require_main(), 1);
@@ -116141,9 +105390,7 @@ const __filename$1 = fileURLToPath(import.meta.url);
const __dirname$9 = path.dirname(__filename$1);
const FASTIFY_INSTANCE_KEY = Symbol.for("drpy-node.fastify.instances");
function initializeFastify() {
- if (globalThis[FASTIFY_INSTANCE_KEY]) {
- return globalThis[FASTIFY_INSTANCE_KEY];
- }
+ if (globalThis[FASTIFY_INSTANCE_KEY]) return globalThis[FASTIFY_INSTANCE_KEY];
import_main.default.config();
const LOG_WITH_FILE = Number(process.env.LOG_WITH_FILE) || 0;
const LOG_LEVEL = process.env.LOG_LEVEL && [
@@ -116158,21 +105405,18 @@ function initializeFastify() {
let logStream = null;
const logDirectory = path.join(__dirname$9, "../logs");
const customTimestamp = () => {
- const now = new Date();
+ const now = /* @__PURE__ */ new Date();
return `,"time":"${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")} ${String(now.getHours()).padStart(2, "0")}:${String(now.getMinutes()).padStart(2, "0")}:${String(now.getSeconds()).padStart(2, "0")}"`;
};
const safeFileNameGenerator = (time, index) => {
if (!time) return "output.log";
- const dateStr = `${time.getFullYear()}-${String(time.getMonth() + 1).padStart(2, "0")}-${String(time.getDate()).padStart(2, "0")}`;
- return `output-${dateStr}.log.${index || 1}`;
+ return `output-${`${time.getFullYear()}-${String(time.getMonth() + 1).padStart(2, "0")}-${String(time.getDate()).padStart(2, "0")}`}.log.${index || 1}`;
};
if (LOG_WITH_FILE) {
- if (!fs.existsSync(logDirectory)) {
- try {
- fs.mkdirSync(logDirectory, { recursive: true });
- } catch (e) {
- console.error("[FastLogger] Failed to create log directory:", e);
- }
+ if (!fs.existsSync(logDirectory)) try {
+ fs.mkdirSync(logDirectory, { recursive: true });
+ } catch (e) {
+ console.error("[FastLogger] Failed to create log directory:", e);
}
const streamOptions = {
size: "500M",
@@ -116239,7 +105483,6 @@ function initializeFastify() {
const { fastify: fastifyInstance, wsApp: wsAppInstance } = initializeFastify();
const fastify = fastifyInstance;
const wsApp = wsAppInstance;
-
//#endregion
//#region ../utils/env.js
const __dirname$8 = path.dirname(fileURLToPath(import.meta.url));
@@ -116255,9 +105498,7 @@ const ENV = {
_lockPath,
_envObj: {},
_readEnvFile() {
- if (!existsSync(this._envPath)) {
- return {};
- }
+ if (!existsSync(this._envPath)) return {};
try {
const content = readFileSync(this._envPath, "utf-8");
return JSON.parse(content);
@@ -116277,48 +105518,34 @@ const ENV = {
} catch (e) {
fastify.log.error(`[_writeEnvFile] Failed to write to env file: ${e.message}`);
} finally {
- if (existsSync(this._lockPath)) {
- unlinkSync(this._lockPath);
- }
+ if (existsSync(this._lockPath)) unlinkSync(this._lockPath);
}
},
get(key, _value = "", isObject = 0) {
if (!key) {
- if (cache.has(FULL_ENV_CACHE_KEY)) {
- return cache.get(FULL_ENV_CACHE_KEY);
- }
+ if (cache.has(FULL_ENV_CACHE_KEY)) return cache.get(FULL_ENV_CACHE_KEY);
const envObj = this._readEnvFile();
cache.set(FULL_ENV_CACHE_KEY, envObj);
return envObj;
}
- if (cache.has(key)) {
- return cache.get(key);
- }
- fastify.log.info(`[get] 从文件中读取: ${key}`);
- const envObj = this._readEnvFile();
- let value = envObj[key] || _value;
- if (isObject && typeof value !== "object") {
- try {
- value = JSON.parse(value);
- } catch (e) {
- value = {};
- fastify.log.error(`[get] Failed to parse value for key "${key}" as object: ${e.message}`);
- }
+ if (cache.has(key)) return cache.get(key);
+ let value = this._readEnvFile()[key] || _value;
+ if (isObject && typeof value !== "object") try {
+ value = JSON.parse(value);
+ } catch (e) {
+ value = {};
+ fastify.log.error(`[get] Failed to parse value for key "${key}" as object: ${e.message}`);
}
cache.set(key, value);
return value;
},
set(key, value = "", isObject = 0) {
- if (!key || typeof key !== "string") {
- throw new Error("Key must be a non-empty string.");
- }
- if (isObject && typeof value !== "object") {
- try {
- value = JSON.parse(value);
- } catch (e) {
- value = {};
- fastify.log.error(`[set] Failed to parse value for key "${key}" as object: ${e.message}`);
- }
+ if (!key || typeof key !== "string") throw new Error("Key must be a non-empty string.");
+ if (isObject && typeof value !== "object") try {
+ value = JSON.parse(value);
+ } catch (e) {
+ value = {};
+ fastify.log.error(`[set] Failed to parse value for key "${key}" as object: ${e.message}`);
}
const envObj = this._readEnvFile();
envObj[key] = value;
@@ -116327,21 +105554,16 @@ const ENV = {
cache.delete(FULL_ENV_CACHE_KEY);
},
delete(key) {
- if (!key || typeof key !== "string") {
- throw new Error("Key must be a non-empty string.");
- }
+ if (!key || typeof key !== "string") throw new Error("Key must be a non-empty string.");
const envObj = this._readEnvFile();
if (key in envObj) {
delete envObj[key];
this._writeEnvFile(envObj);
cache.delete(key);
cache.delete(FULL_ENV_CACHE_KEY);
- } else {
- fastify.log.warn(`[delete] Key "${key}" does not exist in env file.`);
- }
+ } else fastify.log.warn(`[delete] Key "${key}" does not exist in env file.`);
}
};
-
//#endregion
//#region ../utils/dns_doh.js
/**
@@ -116357,32 +105579,25 @@ let dohServers = null;
let resolver = null;
const configPath = path.resolve(__dirname$7, "../config/player.json");
function getResolver() {
- const enableDoh = ENV.get("enable_doh", "0") === "1" || ENV.get("enable_doh") === "true";
- if (!enableDoh) {
- return null;
- }
+ if (!(ENV.get("enable_doh", "0") === "1" || ENV.get("enable_doh") === "true")) return null;
if (resolver) return resolver;
try {
- if (!dohServers) {
- try {
- if (fs.existsSync(configPath)) {
- const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
- if (config.doh && Array.isArray(config.doh) && config.doh.length > 0) {
- dohServers = config.doh.map((server) => server.url);
- console.log(`[DOH] Loaded ${dohServers.length} DOH servers from config.`);
- }
+ if (!dohServers) try {
+ if (fs.existsSync(configPath)) {
+ const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
+ if (config.doh && Array.isArray(config.doh) && config.doh.length > 0) {
+ dohServers = config.doh.map((server) => server.url);
+ console.log(`[DOH] Loaded ${dohServers.length} DOH servers from config.`);
}
- } catch (e) {
- console.error("[DOH] Failed to load DOH config:", e.message);
}
+ } catch (e) {
+ console.error("[DOH] Failed to load DOH config:", e.message);
}
resolver = new Resolver({
maxCache: 1e3,
request: customRequest
});
- if (dohServers && dohServers.length > 0) {
- resolver.setServers(dohServers);
- }
+ if (dohServers && dohServers.length > 0) resolver.setServers(dohServers);
} catch (e) {
console.error("[DOH] Init failed:", e.message);
return null;
@@ -116394,84 +105609,57 @@ let lastCheckTime = 0;
let checkPromise = null;
const PROXY_CACHE_TTL = 6e4;
function getSystemProxy() {
- const enableProxy = ENV.get("enable_system_proxy", "1") === "1" || ENV.get("enable_system_proxy") === "true";
- if (!enableProxy) {
- return Promise.resolve(null);
- }
- const now = Date.now();
- if (lastCheckTime > 0 && now - lastCheckTime < PROXY_CACHE_TTL) {
- return Promise.resolve(cachedProxy);
- }
- if (checkPromise) {
- return checkPromise;
- }
+ if (!(ENV.get("enable_system_proxy", "1") === "1" || ENV.get("enable_system_proxy") === "true")) return Promise.resolve(null);
+ if (lastCheckTime > 0 && Date.now() - lastCheckTime < PROXY_CACHE_TTL) return Promise.resolve(cachedProxy);
+ if (checkPromise) return checkPromise;
checkPromise = (async () => {
const execOpts = { timeout: 300 };
let detectedProxy = null;
try {
const envProxy = process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy;
- if (envProxy) {
- detectedProxy = envProxy;
- } else if (process.platform === "win32") {
- try {
- const { stdout: enableOut } = await execAsync("reg query \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" /v ProxyEnable", execOpts);
- if (/0x1/.test(enableOut)) {
- const { stdout: serverOut } = await execAsync("reg query \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" /v ProxyServer", execOpts);
- const match = serverOut.match(/ProxyServer\s+REG_SZ\s+(.*)/i);
- if (match && match[1]) {
- let proxyStr = match[1].trim();
- if (proxyStr.includes("=")) {
- const parts = proxyStr.split(";");
- for (const part of parts) {
- if (part.startsWith("https=")) {
- proxyStr = part.substring(6);
- break;
- }
- }
- }
- if (!proxyStr.startsWith("http")) {
- proxyStr = "http://" + proxyStr;
+ if (envProxy) detectedProxy = envProxy;
+ else if (process.platform === "win32") try {
+ const { stdout: enableOut } = await execAsync("reg query \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" /v ProxyEnable", execOpts);
+ if (/0x1/.test(enableOut)) {
+ const { stdout: serverOut } = await execAsync("reg query \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" /v ProxyServer", execOpts);
+ const match = serverOut.match(/ProxyServer\s+REG_SZ\s+(.*)/i);
+ if (match && match[1]) {
+ let proxyStr = match[1].trim();
+ if (proxyStr.includes("=")) {
+ const parts = proxyStr.split(";");
+ for (const part of parts) if (part.startsWith("https=")) {
+ proxyStr = part.substring(6);
+ break;
}
- detectedProxy = proxyStr;
- }
- }
- } catch (e) {}
- } else if (process.platform === "android" || process.platform === "linux") {
- try {
- const { stdout } = await execAsync("settings get global http_proxy", execOpts);
- const proxyStr = stdout ? stdout.trim() : "";
- if (proxyStr && proxyStr !== "null" && proxyStr !== ":0") {
- const finalProxy = proxyStr.startsWith("http") ? proxyStr : `http://${proxyStr}`;
- detectedProxy = finalProxy;
- }
- } catch (e) {}
- }
- if (!detectedProxy && process.platform === "linux") {
- try {
- const { stdout: mode } = await execAsync("gsettings get org.gnome.system.proxy mode", execOpts);
- if (mode && mode.trim().replace(/'/g, "") === "manual") {
- const { stdout: host } = await execAsync("gsettings get org.gnome.system.proxy.http host", execOpts);
- const { stdout: port } = await execAsync("gsettings get org.gnome.system.proxy.http port", execOpts);
- const hostStr = host ? host.trim().replace(/'/g, "") : "";
- const portStr = port ? port.trim() : "";
- if (hostStr && portStr && portStr !== "0") {
- detectedProxy = `http://${hostStr}:${portStr}`;
}
+ if (!proxyStr.startsWith("http")) proxyStr = "http://" + proxyStr;
+ detectedProxy = proxyStr;
}
- } catch (e) {}
- }
- if (!detectedProxy && process.platform === "darwin") {
- try {
- const { stdout } = await execAsync("scutil --proxy", execOpts);
- if (/HTTPEnable\s*:\s*1/.test(stdout)) {
- const hostMatch = stdout.match(/HTTPProxy\s*:\s*([^\s]+)/);
- const portMatch = stdout.match(/HTTPPort\s*:\s*(\d+)/);
- if (hostMatch && hostMatch[1]) {
- detectedProxy = `http://${hostMatch[1]}:${portMatch && portMatch[1] ? portMatch[1] : "80"}`;
- }
- }
- } catch (e) {}
- }
+ }
+ } catch (e) {}
+ else if (process.platform === "android" || process.platform === "linux") try {
+ const { stdout } = await execAsync("settings get global http_proxy", execOpts);
+ const proxyStr = stdout ? stdout.trim() : "";
+ if (proxyStr && proxyStr !== "null" && proxyStr !== ":0") detectedProxy = proxyStr.startsWith("http") ? proxyStr : `http://${proxyStr}`;
+ } catch (e) {}
+ if (!detectedProxy && process.platform === "linux") try {
+ const { stdout: mode } = await execAsync("gsettings get org.gnome.system.proxy mode", execOpts);
+ if (mode && mode.trim().replace(/'/g, "") === "manual") {
+ const { stdout: host } = await execAsync("gsettings get org.gnome.system.proxy.http host", execOpts);
+ const { stdout: port } = await execAsync("gsettings get org.gnome.system.proxy.http port", execOpts);
+ const hostStr = host ? host.trim().replace(/'/g, "") : "";
+ const portStr = port ? port.trim() : "";
+ if (hostStr && portStr && portStr !== "0") detectedProxy = `http://${hostStr}:${portStr}`;
+ }
+ } catch (e) {}
+ if (!detectedProxy && process.platform === "darwin") try {
+ const { stdout } = await execAsync("scutil --proxy", execOpts);
+ if (/HTTPEnable\s*:\s*1/.test(stdout)) {
+ const hostMatch = stdout.match(/HTTPProxy\s*:\s*([^\s]+)/);
+ const portMatch = stdout.match(/HTTPPort\s*:\s*(\d+)/);
+ if (hostMatch && hostMatch[1]) detectedProxy = `http://${hostMatch[1]}:${portMatch && portMatch[1] ? portMatch[1] : "80"}`;
+ }
+ } catch (e) {}
} catch (e) {
console.error("[DOH] Error detecting proxy:", e.message);
} finally {
@@ -116498,11 +105686,8 @@ const customRequest = async (resource, signal) => {
if (proxy) {
config.httpsAgent = new import_dist$1.HttpsProxyAgent(proxy);
config.proxy = false;
- } else {
- config.httpsAgent = new https.Agent({ rejectUnauthorized: false });
- }
- const response = await axios$1.get(resource, config);
- return response.data;
+ } else config.httpsAgent = new https.Agent({ rejectUnauthorized: false });
+ return (await axios$1.get(resource, config)).data;
} catch (error) {
throw error;
}
@@ -116519,13 +105704,10 @@ async function resolveDoh(domain) {
const resolver = getResolver();
if (!resolver) return null;
const ips = await resolver.resolve(domain, "A");
- if (ips && ips.length > 0) {
- return ips[0];
- }
+ if (ips && ips.length > 0) return ips[0];
} catch (e) {}
return null;
}
-
//#endregion
//#region ../utils/req.js
/**
@@ -116559,42 +105741,30 @@ req$1.interceptors.request.use(async (config) => {
try {
const proxy = await getSystemProxy();
if (proxy) {
- const agent = new import_dist$1.HttpsProxyAgent(proxy);
- config.httpsAgent = agent;
+ config.httpsAgent = new import_dist$1.HttpsProxyAgent(proxy);
config.proxy = false;
return config;
}
let fullUrl = config.url;
- if (config.baseURL && !/^https?:\/\//i.test(fullUrl)) {
- try {
- const parsed = new URL(fullUrl, config.baseURL);
- fullUrl = parsed.toString();
- } catch (e) {}
- }
+ if (config.baseURL && !/^https?:\/\//i.test(fullUrl)) try {
+ fullUrl = new URL(fullUrl, config.baseURL).toString();
+ } catch (e) {}
const urlObj = new URL(fullUrl);
const hostname = urlObj.hostname;
- if (!hostname || /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname) || hostname === "localhost") {
- return config;
- }
+ if (!hostname || /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname) || hostname === "localhost") return config;
const ip = await resolveDoh(hostname);
if (ip && ip !== hostname) {
if (!config.headers) config.headers = {};
let hasHost = false;
const keys = Object.keys(config.headers);
- for (const k of keys) {
- if (k.toLowerCase() === "host") {
- hasHost = true;
- break;
- }
- }
- if (!hasHost) {
- config.headers.Host = hostname;
+ for (const k of keys) if (k.toLowerCase() === "host") {
+ hasHost = true;
+ break;
}
+ if (!hasHost) config.headers.Host = hostname;
urlObj.hostname = ip;
config.url = urlObj.toString();
- if (config.baseURL) {
- delete config.baseURL;
- }
+ if (config.baseURL) delete config.baseURL;
}
} catch (e) {}
return config;
@@ -116610,46 +105780,6 @@ req$1.interceptors.request.use(async (config) => {
* - 自动继承系统代理
*/
const reqs = new axios$1.create({ httpsAgent: new https.Agent({ rejectUnauthorized: false }) });
-reqs.interceptors.request.use(async (config) => {
- if (!config.url) return config;
- try {
- const proxy = await getSystemProxy();
- if (proxy) {
- const agent = new import_dist$1.HttpsProxyAgent(proxy);
- config.httpsAgent = agent;
- config.proxy = false;
- return config;
- }
- let fullUrl = config.url;
- if (config.baseURL && !/^https?:\/\//i.test(fullUrl)) {
- try {
- const parsed = new URL(fullUrl, config.baseURL);
- fullUrl = parsed.toString();
- } catch (e) {}
- }
- const urlObj = new URL(fullUrl);
- const hostname = urlObj.hostname;
- if (!hostname || /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname) || hostname === "localhost") return config;
- const ip = await resolveDoh(hostname);
- if (ip && ip !== hostname) {
- if (!config.headers) config.headers = {};
- let hasHost = false;
- const keys = Object.keys(config.headers);
- for (const k of keys) {
- if (k.toLowerCase() === "host") {
- hasHost = true;
- break;
- }
- }
- if (!hasHost) config.headers.Host = hostname;
- urlObj.hostname = ip;
- config.url = urlObj.toString();
- if (config.baseURL) delete config.baseURL;
- }
- } catch (e) {}
- return config;
-});
-
//#endregion
//#region ../utils/pan/ali.js
const apiUrl = "https://api.aliyundrive.com";
@@ -116678,12 +105808,9 @@ var AliDrive = class {
};
}
async init() {
- if (this.token) {
- console.log("阿里token获取成功:" + this.token);
- }
- if (this.ali_refresh_token === "") {
- this.oauth.access_token = null;
- } else {
+ if (this.token) console.log("阿里token获取成功:" + this.token);
+ if (this.ali_refresh_token === "") this.oauth.access_token = null;
+ else {
let exp = JSON.parse(CryptoJS.enc.Base64.parse(this.ali_refresh_token.split(".")[1]).toString(CryptoJS.enc.Utf8));
let now = Math.floor(Date.now() / 1e3);
if (exp.exp < now) {
@@ -116691,7 +105818,7 @@ var AliDrive = class {
console.log("阿里ali_refresh_token已过期,重新获取阿里ali_refresh_token");
} else {
this.oauth.access_token = this.ali_refresh_token;
- console.log("阿里ali_refresh_token未过期,继续使用,可使用时间截止到:" + new Date(exp.exp * 1e3).toLocaleString());
+ console.log("阿里ali_refresh_token未过期,继续使用,可使用时间截止到:" + (/* @__PURE__ */ new Date(exp.exp * 1e3)).toLocaleString());
console.log("阿里ali_refresh_token获取成功:" + this.ali_refresh_token);
}
}
@@ -116703,24 +105830,19 @@ var AliDrive = class {
return ENV.get("ali_refresh_token");
}
getShareData(url) {
- const regex = /https:\/\/www\.alipan\.com\/s\/([^\\/]+)(\/folder\/([^\\/]+))?|https:\/\/www\.aliyundrive\.com\/s\/([^\\/]+)(\/folder\/([^\\/]+))?/;
- const matches = regex.exec(url);
- if (matches) {
- return {
- shareId: matches[1] || matches[4],
- folderId: matches[3] || matches[6] || "root"
- };
- }
+ const matches = /https:\/\/www\.alipan\.com\/s\/([^\\/]+)(\/folder\/([^\\/]+))?|https:\/\/www\.aliyundrive\.com\/s\/([^\\/]+)(\/folder\/([^\\/]+))?/.exec(url);
+ if (matches) return {
+ shareId: matches[1] || matches[4],
+ folderId: matches[3] || matches[6] || "root"
+ };
return null;
}
lcs(str1, str2) {
- if (!str1 || !str2) {
- return {
- length: 0,
- sequence: "",
- offset: 0
- };
- }
+ if (!str1 || !str2) return {
+ length: 0,
+ sequence: "",
+ offset: 0
+ };
let sequence = "";
const str1Length = str1.length;
const str2Length = str2.length;
@@ -116729,33 +105851,22 @@ var AliDrive = class {
let lastSubsBegin = 0;
for (let i = 0; i < str1Length; i++) {
const subArray = new Array(str2Length);
- for (let j = 0; j < str2Length; j++) {
- subArray[j] = 0;
- }
+ for (let j = 0; j < str2Length; j++) subArray[j] = 0;
num[i] = subArray;
}
let thisSubsBegin = null;
- for (let i = 0; i < str1Length; i++) {
- for (let j = 0; j < str2Length; j++) {
- if (str1[i] !== str2[j]) {
- num[i][j] = 0;
- } else {
- if (i === 0 || j === 0) {
- num[i][j] = 1;
- } else {
- num[i][j] = 1 + num[i - 1][j - 1];
- }
- if (num[i][j] > maxlen) {
- maxlen = num[i][j];
- thisSubsBegin = i - num[i][j] + 1;
- if (lastSubsBegin === thisSubsBegin) {
- sequence += str1[i];
- } else {
- lastSubsBegin = thisSubsBegin;
- sequence = "";
- sequence += str1.substr(lastSubsBegin, i + 1 - lastSubsBegin);
- }
- }
+ for (let i = 0; i < str1Length; i++) for (let j = 0; j < str2Length; j++) if (str1[i] !== str2[j]) num[i][j] = 0;
+ else {
+ if (i === 0 || j === 0) num[i][j] = 1;
+ else num[i][j] = 1 + num[i - 1][j - 1];
+ if (num[i][j] > maxlen) {
+ maxlen = num[i][j];
+ thisSubsBegin = i - num[i][j] + 1;
+ if (lastSubsBegin === thisSubsBegin) sequence += str1[i];
+ else {
+ lastSubsBegin = thisSubsBegin;
+ sequence = "";
+ sequence += str1.substr(lastSubsBegin, i + 1 - lastSubsBegin);
}
}
}
@@ -116774,14 +105885,11 @@ var AliDrive = class {
target: targetItems[i],
lcs: currentLCS
});
- if (currentLCS.length > results[bestMatchIndex].lcs.length) {
- bestMatchIndex = i;
- }
+ if (currentLCS.length > results[bestMatchIndex].lcs.length) bestMatchIndex = i;
}
- const bestMatch = results[bestMatchIndex];
return {
allLCS: results,
- bestMatch,
+ bestMatch: results[bestMatchIndex],
bestMatchIndex
};
}
@@ -116796,7 +105904,7 @@ var AliDrive = class {
await this.refreshAccessToken();
Object.assign(headers, { Authorization: this.user.auth });
}
- const resp = await req$1.post(`${apiUrl}/${url}`, data, { headers }).catch((err) => {
+ const resp = await reqs.post(`${apiUrl}/${url}`, data, { headers }).catch((err) => {
console.error(err);
return err.response || {
status: 500,
@@ -116821,7 +105929,7 @@ var AliDrive = class {
let resp = "";
if (url.startsWith("http")) {
Object.assign(headers, { Authorization: "Bearer " + this.oauth.access_token });
- resp = await req$1.post(`${url}`, data, { headers }).catch((err) => {
+ resp = await reqs.post(`${url}`, data, { headers }).catch((err) => {
console.error(err);
return err.response || {
status: 500,
@@ -116830,7 +105938,7 @@ var AliDrive = class {
});
} else {
Object.assign(headers, { Authorization: this.user.auth });
- resp = await req$1.post(`${apiUrl}/${url}`, data, { headers }).catch((err) => {
+ resp = await reqs.post(`${apiUrl}/${url}`, data, { headers }).catch((err) => {
console.error(err);
return err.response || {
status: 500,
@@ -116854,11 +105962,8 @@ var AliDrive = class {
"width": 300,
"height": 300
});
- let headers = { "Content-Type": "application/json" };
- let resp = await req$1.post("https://aliyundrive-oauth.messense.me/oauth/authorize/qrcode", data, { headers });
- if (resp.data.sid) {
- this.sid = resp.data.sid;
- }
+ let resp = await reqs.post("https://aliyundrive-oauth.messense.me/oauth/authorize/qrcode", data, { headers: { "Content-Type": "application/json" } });
+ if (resp.data.sid) this.sid = resp.data.sid;
}
async getDriveFlag() {
let body = {
@@ -116873,14 +105978,11 @@ var AliDrive = class {
"sid": this.sid
};
let headers = { "authorization": this.user.auth };
- let resp = await req$1.post("https://open.aliyundrive.com/oauth/users/qrcode/authorize?sid=" + this.sid, body, { headers });
- return resp.data.result;
+ return (await reqs.post("https://open.aliyundrive.com/oauth/users/qrcode/authorize?sid=" + this.sid, body, { headers })).data.result;
}
async getDriveCode() {
- let status = await req$1.get(`https://openapi.aliyundrive.com/oauth/qrcode/${this.sid}/status`);
- if (status.data.status === "LoginSuccess") {
- return status.data.authCode;
- }
+ let status = await reqs.get(`https://openapi.aliyundrive.com/oauth/qrcode/${this.sid}/status`);
+ if (status.data.status === "LoginSuccess") return status.data.authCode;
}
async driveAuth() {
await this.init();
@@ -116888,14 +105990,12 @@ var AliDrive = class {
let headers = this.baseHeaders;
Object.assign(headers, { "Authorization": this.user.auth });
await this.getDriveSid();
- let flag = await this.getDriveFlag();
- if (flag) {
- let code = await this.getDriveCode();
+ if (await this.getDriveFlag()) {
let data = {
- code,
+ code: await this.getDriveCode(),
grant_type: "authorization_code"
};
- let response = await req$1.post("https://aliyundrive-oauth.messense.me/oauth/access_token", data);
+ let response = await reqs.post("https://aliyundrive-oauth.messense.me/oauth/access_token", data);
if (response.status === 200) {
this.oauth = response.data;
const info = JSON.parse(CryptoJS.enc.Base64.parse(this.oauth.access_token.split(".")[1]).toString(CryptoJS.enc.Utf8));
@@ -116905,13 +106005,11 @@ var AliDrive = class {
console.log("授权成功");
}
}
- } else {
- console.log("已授权,无需再授权");
- }
+ } else console.log("已授权,无需再授权");
}
async refreshAccessToken() {
if (!this.user.user_id || this.user.expire_time - (0, import_dayjs_min.default)().unix() < 120) {
- let loginResp = await req$1.post("https://auth.aliyundrive.com/v2/account/token", {
+ let loginResp = await reqs.post("https://auth.aliyundrive.com/v2/account/token", {
refresh_token: this.user.refresh_token || this.token,
grant_type: "refresh_token"
}, { headers: this.baseHeaders }).catch((err) => {
@@ -116925,9 +106023,7 @@ var AliDrive = class {
this.user.expire_time = (0, import_dayjs_min.default)(loginResp.data.expire_time).unix();
this.user.auth = `${this.user.token_type} ${this.user.access_token}`;
ENV.set("ali_token", this.user.refresh_token);
- } else {
- console.error("刷新 Access Token 失败");
- }
+ } else console.error("刷新 Access Token 失败");
}
}
async clearSaveDir() {
@@ -116938,14 +106034,12 @@ var AliDrive = class {
order_by: "updated_at",
order_direction: "DESC"
});
- if (listData.items) {
- for (const item of listData.items) {
- const del = await this.openApi(`v2/recyclebin/trash`, {
- drive_id: this.user.drive.resource_drive_id,
- file_id: item.file_id
- });
- console.log(del);
- }
+ if (listData.items) for (const item of listData.items) {
+ const del = await this.openApi(`v2/recyclebin/trash`, {
+ drive_id: this.user.drive.resource_drive_id,
+ file_id: item.file_id
+ });
+ console.log(del);
}
}
async createSaveDir(clean) {
@@ -116966,12 +106060,10 @@ var AliDrive = class {
order_direction: "DESC"
});
if (listData.items) {
- for (const item of listData.items) {
- if (item.name === this.saveDirName) {
- this.saveDirId = item.file_id;
- await this.clearSaveDir();
- break;
- }
+ for (const item of listData.items) if (item.name === this.saveDirName) {
+ this.saveDirId = item.file_id;
+ await this.clearSaveDir();
+ break;
}
if (!this.saveDirId) {
const create = await this.openApi(`adrive/v2/file/createWithFolders`, {
@@ -116982,9 +106074,7 @@ var AliDrive = class {
type: "folder"
});
console.log(create);
- if (create.file_id) {
- this.saveDirId = create.file_id;
- }
+ if (create.file_id) this.saveDirId = create.file_id;
}
}
}
@@ -117022,39 +106112,28 @@ var AliDrive = class {
if (!items) return [];
if (listData.next_marker) {
const nextItems = await listFile(shareId, folderId, listData.next_marker);
- for (const item of nextItems) {
- items.push(item);
- }
+ for (const item of nextItems) items.push(item);
}
const subDir = [];
- for (const item of items) {
- if (item.type === "folder") {
- subDir.push(item);
- } else if (item.type === "file" && item.category === "video") {
- if (item.size < 1024 * 1024 * 5) continue;
- item.name = item.name.replace(/玩偶哥.*【神秘的哥哥们】/g, "");
- videos.push(item);
- } else if (item.type === "file" && subtitleExts.some((x) => item.file_extension.endsWith(x))) {
- subtitles.push(item);
- }
- }
+ for (const item of items) if (item.type === "folder") subDir.push(item);
+ else if (item.type === "file" && item.category === "video") {
+ let text = /[#|'"\[\]&<>]/g;
+ if (item.size < 1024 * 1024 * 5) continue;
+ item.name = item.name.replace(/玩偶哥.*【神秘的哥哥们】/g, "");
+ item.name = text.test(item.name) ? item.name.replace(text, "") : item.name;
+ videos.push(item);
+ } else if (item.type === "file" && subtitleExts.some((x) => item.file_extension.endsWith(x))) subtitles.push(item);
for (const dir of subDir) {
const subItems = await listFile(dir.share_id, dir.file_id);
- for (const item of subItems) {
- items.push(item);
- }
+ for (const item of subItems) items.push(item);
}
return items;
};
await listFile(shareData.shareId, shareData.folderId);
- if (subtitles.length > 0) {
- videos.forEach((item) => {
- const matchSubtitle = this.findBestLCS(item, subtitles);
- if (matchSubtitle.bestMatch) {
- item.subtitle = matchSubtitle.bestMatch.target;
- }
- });
- }
+ if (subtitles.length > 0) videos.forEach((item) => {
+ const matchSubtitle = this.findBestLCS(item, subtitles);
+ if (matchSubtitle.bestMatch) item.subtitle = matchSubtitle.bestMatch.target;
+ });
return videos;
}
async save(shareId, fileId, clean) {
@@ -117063,9 +106142,7 @@ var AliDrive = class {
await this.createSaveDir(clean);
if (clean) {
const saves = Object.keys(this.saveFileIdCaches);
- for (const save of saves) {
- delete this.saveFileIdCaches[save];
- }
+ for (const save of saves) delete this.saveFileIdCaches[save];
}
if (!this.saveDirId) return null;
await this.getShareToken({ shareId });
@@ -117092,9 +106169,7 @@ var AliDrive = class {
category: "live_transcoding",
url_expire_sec: "14400"
});
- if (transcoding.video_preview_play_info && transcoding.video_preview_play_info.live_transcoding_task_list) {
- return transcoding.video_preview_play_info.live_transcoding_task_list;
- }
+ if (transcoding.video_preview_play_info && transcoding.video_preview_play_info.live_transcoding_task_list) return transcoding.video_preview_play_info.live_transcoding_task_list;
return null;
}
async getDownload(shareId, fileId) {
@@ -117111,9 +106186,7 @@ var AliDrive = class {
"Content-Type": "application/json",
"x-canary": "client=windows,app=adrive,version=v6.7.3"
});
- if (down.url) {
- return down;
- }
+ if (down.url) return down;
return null;
}
async userApi(url, param) {
@@ -117126,67 +106199,44 @@ var AliDrive = class {
"referer": "https://www.alipan.com/"
};
Object.assign(headers, { Authorization: this.user.auth });
- let resp = await req$1.post(url, { param }, { headers });
- if (resp.status === 200) {
- return resp.data;
- } else {
+ let resp = await reqs.post(url, { param }, { headers });
+ if (resp.status === 200) return resp.data;
+ else {
console.log("获取用户信息失败");
return null;
}
}
};
const Ali$1 = new AliDrive();
-
//#endregion
//#region ../node_modules/crypto-js/core.js
var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory();
- } else if (typeof define === "function" && define.amd) {
- define([], factory);
- } else {
- root.CryptoJS = factory();
- }
+ if (typeof exports === "object") module.exports = exports = factory();
+ else if (typeof define === "function" && define.amd) define([], factory);
+ else root.CryptoJS = factory();
})(exports, function() {
/**
* CryptoJS core components.
*/
var CryptoJS = CryptoJS || function(Math, undefined) {
var crypto;
- if (typeof window !== "undefined" && window.crypto) {
- crypto = window.crypto;
- }
- if (typeof self !== "undefined" && self.crypto) {
- crypto = self.crypto;
- }
- if (typeof globalThis !== "undefined" && globalThis.crypto) {
- crypto = globalThis.crypto;
- }
- if (!crypto && typeof window !== "undefined" && window.msCrypto) {
- crypto = window.msCrypto;
- }
- if (!crypto && typeof global !== "undefined" && global.crypto) {
- crypto = global.crypto;
- }
- if (!crypto && typeof __require === "function") {
- try {
- crypto = __require("crypto");
- } catch (err) {}
- }
+ if (typeof window !== "undefined" && window.crypto) crypto = window.crypto;
+ if (typeof self !== "undefined" && self.crypto) crypto = self.crypto;
+ if (typeof globalThis !== "undefined" && globalThis.crypto) crypto = globalThis.crypto;
+ if (!crypto && typeof window !== "undefined" && window.msCrypto) crypto = window.msCrypto;
+ if (!crypto && typeof global !== "undefined" && global.crypto) crypto = global.crypto;
+ if (!crypto && typeof __require === "function") try {
+ crypto = __require("crypto");
+ } catch (err) {}
var cryptoSecureRandomInt = function() {
if (crypto) {
- if (typeof crypto.getRandomValues === "function") {
- try {
- return crypto.getRandomValues(new Uint32Array(1))[0];
- } catch (err) {}
- }
- if (typeof crypto.randomBytes === "function") {
- try {
- return crypto.randomBytes(4).readInt32LE();
- } catch (err) {}
- }
+ if (typeof crypto.getRandomValues === "function") try {
+ return crypto.getRandomValues(new Uint32Array(1))[0];
+ } catch (err) {}
+ if (typeof crypto.randomBytes === "function") try {
+ return crypto.randomBytes(4).readInt32LE();
+ } catch (err) {}
}
throw new Error("Native crypto module could not be used to get secure random number.");
};
@@ -117215,14 +106265,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return {
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);
- };
- }
+ 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;
@@ -117234,14 +106280,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
init: function() {},
mixIn: function(properties) {
- for (var propertyName in properties) {
- if (properties.hasOwnProperty(propertyName)) {
- this[propertyName] = properties[propertyName];
- }
- }
- if (properties.hasOwnProperty("toString")) {
- this.toString = properties.toString;
- }
+ for (var propertyName in properties) if (properties.hasOwnProperty(propertyName)) this[propertyName] = properties[propertyName];
+ if (properties.hasOwnProperty("toString")) this.toString = properties.toString;
},
clone: function() {
return this.init.prototype.extend(this);
@@ -117257,11 +106297,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var WordArray = C_lib.WordArray = Base.extend({
init: function(words, sigBytes) {
words = this.words = words || [];
- if (sigBytes != undefined) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 4;
- }
+ if (sigBytes != undefined) this.sigBytes = sigBytes;
+ else this.sigBytes = words.length * 4;
},
toString: function(encoder) {
return (encoder || Hex).stringify(this);
@@ -117272,16 +106309,11 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var thisSigBytes = this.sigBytes;
var thatSigBytes = wordArray.sigBytes;
this.clamp();
- if (thisSigBytes % 4) {
- for (var i = 0; i < thatSigBytes; i++) {
- var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
- }
- } else {
- for (var j = 0; j < thatSigBytes; j += 4) {
- thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
- }
+ if (thisSigBytes % 4) for (var i = 0; i < thatSigBytes; i++) {
+ var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
+ thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
}
+ else for (var j = 0; j < thatSigBytes; j += 4) thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
this.sigBytes += thatSigBytes;
return this;
},
@@ -117298,9 +106330,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
},
random: function(nBytes) {
var words = [];
- for (var i = 0; i < nBytes; i += 4) {
- words.push(cryptoSecureRandomInt());
- }
+ for (var i = 0; i < nBytes; i += 4) words.push(cryptoSecureRandomInt());
return new WordArray.init(words, nBytes);
}
});
@@ -117326,9 +106356,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(hexStr) {
var hexStrLength = hexStr.length;
var words = [];
- for (var i = 0; i < hexStrLength; i += 2) {
- words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
- }
+ for (var i = 0; i < hexStrLength; i += 2) words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
return new WordArray.init(words, hexStrLength / 2);
}
};
@@ -117349,9 +106377,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(latin1Str) {
var latin1StrLength = latin1Str.length;
var words = [];
- for (var i = 0; i < latin1StrLength; i++) {
- words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
- }
+ for (var i = 0; i < latin1StrLength; i++) words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
return new WordArray.init(words, latin1StrLength);
}
};
@@ -117383,9 +106409,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
this._nDataBytes = 0;
},
_append: function(data) {
- if (typeof data == "string") {
- data = Utf8.parse(data);
- }
+ if (typeof data == "string") data = Utf8.parse(data);
this._data.concat(data);
this._nDataBytes += data.sigBytes;
},
@@ -117395,19 +106419,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var dataWords = data.words;
var dataSigBytes = data.sigBytes;
var blockSize = this.blockSize;
- var blockSizeBytes = blockSize * 4;
- var nBlocksReady = dataSigBytes / blockSizeBytes;
- if (doFlush) {
- nBlocksReady = Math.ceil(nBlocksReady);
- } else {
- nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
- }
+ var nBlocksReady = dataSigBytes / (blockSize * 4);
+ if (doFlush) nBlocksReady = Math.ceil(nBlocksReady);
+ else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
var nWordsReady = nBlocksReady * blockSize;
var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
if (nWordsReady) {
- for (var offset = 0; offset < nWordsReady; offset += blockSize) {
- this._doProcessBlock(dataWords, offset);
- }
+ for (var offset = 0; offset < nWordsReady; offset += blockSize) this._doProcessBlock(dataWords, offset);
processedWords = dataWords.splice(0, nWordsReady);
data.sigBytes -= nBytesReady;
}
@@ -117441,11 +106459,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this;
},
finalize: function(messageUpdate) {
- if (messageUpdate) {
- this._append(messageUpdate);
- }
- var hash = this._doFinalize();
- return hash;
+ if (messageUpdate) this._append(messageUpdate);
+ return this._doFinalize();
},
blockSize: 512 / 32,
_createHelper: function(hasher) {
@@ -117468,19 +106483,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/x64-core.js
var require_x64_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function(undefined) {
var C = CryptoJS;
@@ -117507,11 +106516,8 @@ var require_x64_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var X64WordArray = C_x64.WordArray = Base.extend({
init: function(words, sigBytes) {
words = this.words = words || [];
- if (sigBytes != undefined) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 8;
- }
+ if (sigBytes != undefined) this.sigBytes = sigBytes;
+ else this.sigBytes = words.length * 8;
},
toX32: function() {
var x64Words = this.words;
@@ -117528,9 +106534,7 @@ var require_x64_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var clone = Base.clone.call(this);
var words = clone.words = this.words.slice(0);
var wordsLength = words.length;
- for (var i = 0; i < wordsLength; i++) {
- words[i] = words[i].clone();
- }
+ for (var i = 0; i < wordsLength; i++) words[i] = words[i].clone();
return clone;
}
});
@@ -117538,69 +106542,44 @@ var require_x64_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/lib-typedarrays.js
var require_lib_typedarrays = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
- if (typeof ArrayBuffer != "function") {
- return;
- }
- var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ if (typeof ArrayBuffer != "function") return;
+ var WordArray = CryptoJS.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 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 i = 0; i < typedArrayByteLength; i++) {
- words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
- }
+ for (var i = 0; i < typedArrayByteLength; i++) words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
superInit.call(this, words, typedArrayByteLength);
- } else {
- superInit.apply(this, arguments);
- }
+ } else superInit.apply(this, arguments);
};
subInit.prototype = WordArray;
})();
return CryptoJS.lib.WordArray;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/enc-utf16.js
var require_enc_utf16 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_enc = C.enc;
/**
* UTF-16 BE encoding strategy.
@@ -117619,9 +106598,7 @@ var require_enc_utf16 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(utf16Str) {
var utf16StrLength = utf16Str.length;
var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
- }
+ for (var i = 0; i < utf16StrLength; i++) words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
return WordArray.create(words, utf16StrLength * 2);
}
};
@@ -117642,9 +106619,7 @@ var require_enc_utf16 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
parse: function(utf16Str) {
var utf16StrLength = utf16Str.length;
var words = [];
- for (var i = 0; i < utf16StrLength; i++) {
- words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
- }
+ for (var i = 0; i < utf16StrLength; i++) words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
return WordArray.create(words, utf16StrLength * 2);
}
};
@@ -117655,24 +106630,17 @@ var require_enc_utf16 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.enc.Utf16;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/enc-base64.js
var require_enc_base64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_enc = C.enc;
/**
* Base64 encoding strategy.
@@ -117689,16 +106657,10 @@ var require_enc_base64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * .75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
- }
+ for (var j = 0; j < 4 && i + j * .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);
- }
- }
+ if (paddingChar) while (base64Chars.length % 4) base64Chars.push(paddingChar);
return base64Chars.join("");
},
parse: function(base64Str) {
@@ -117707,16 +106669,12 @@ var require_enc_base64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var reverseMap = this._reverseMap;
if (!reverseMap) {
reverseMap = this._reverseMap = [];
- for (var j = 0; j < map.length; j++) {
- reverseMap[map.charCodeAt(j)] = j;
- }
+ 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;
- }
+ if (paddingIndex !== -1) base64StrLength = paddingIndex;
}
return parseLoop(base64Str, base64StrLength, reverseMap);
},
@@ -117725,14 +106683,10 @@ var require_enc_base64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function parseLoop(base64Str, base64StrLength, reverseMap) {
var words = [];
var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
+ for (var i = 0; i < base64StrLength; i++) if (i % 4) {
+ var bitsCombined = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2 | reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
+ words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
+ nBytes++;
}
return WordArray.create(words, nBytes);
}
@@ -117740,33 +106694,24 @@ var require_enc_base64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.enc.Base64;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/enc-base64url.js
var require_enc_base64url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_enc = C.enc;
/**
* Base64url encoding strategy.
*/
var Base64url = C_enc.Base64url = {
stringify: function(wordArray, urlSafe) {
- if (urlSafe === undefined) {
- urlSafe = true;
- }
+ if (urlSafe === void 0) urlSafe = true;
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var map = urlSafe ? this._safe_map : this._map;
@@ -117777,37 +106722,25 @@ var require_enc_base64url = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
var triplet = byte1 << 16 | byte2 << 8 | byte3;
- for (var j = 0; j < 4 && i + j * .75 < sigBytes; j++) {
- base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
- }
+ for (var j = 0; j < 4 && i + j * .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);
- }
- }
+ if (paddingChar) while (base64Chars.length % 4) base64Chars.push(paddingChar);
return base64Chars.join("");
},
parse: function(base64Str, urlSafe) {
- if (urlSafe === undefined) {
- urlSafe = true;
- }
+ 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;
- }
+ 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;
- }
+ if (paddingIndex !== -1) base64StrLength = paddingIndex;
}
return parseLoop(base64Str, base64StrLength, reverseMap);
},
@@ -117817,14 +106750,10 @@ var require_enc_base64url = /* @__PURE__ */ __commonJSMin(((exports, module) =>
function parseLoop(base64Str, base64StrLength, reverseMap) {
var words = [];
var nBytes = 0;
- for (var i = 0; i < base64StrLength; i++) {
- if (i % 4) {
- var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
- var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
- var bitsCombined = bits1 | bits2;
- words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
- nBytes++;
- }
+ for (var i = 0; i < base64StrLength; i++) if (i % 4) {
+ var bitsCombined = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2 | reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
+ words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
+ nBytes++;
}
return WordArray.create(words, nBytes);
}
@@ -117832,19 +106761,13 @@ var require_enc_base64url = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return CryptoJS.enc.Base64url;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/md5.js
var require_md5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function(Math) {
var C = CryptoJS;
@@ -117854,9 +106777,7 @@ var require_md5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var C_algo = C.algo;
var T = [];
(function() {
- for (var i = 0; i < 64; i++) {
- T[i] = Math.abs(Math.sin(i + 1)) * 4294967296 | 0;
- }
+ for (var i = 0; i < 64; i++) T[i] = Math.abs(Math.sin(i + 1)) * 4294967296 | 0;
})();
/**
* MD5 hash algorithm.
@@ -118042,19 +106963,13 @@ var require_md5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.MD5;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/sha1.js
var require_sha1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
@@ -118084,22 +106999,16 @@ var require_sha1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var d = H[3];
var e = H[4];
for (var i = 0; i < 80; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
+ if (i < 16) W[i] = M[offset + i] | 0;
+ else {
var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
W[i] = n << 1 | n >>> 31;
}
var t = (a << 5 | a >>> 27) + e + W[i];
- if (i < 20) {
- t += (b & c | ~b & d) + 1518500249;
- } else if (i < 40) {
- t += (b ^ c ^ d) + 1859775393;
- } else if (i < 60) {
- t += (b & c | b & d | c & d) - 1894007588;
- } else {
- t += (b ^ c ^ d) - 899497514;
- }
+ if (i < 20) t += (b & c | ~b & d) + 1518500249;
+ else if (i < 40) t += (b ^ c ^ d) + 1859775393;
+ else if (i < 60) t += (b & c | b & d | c & d) - 1894007588;
+ else t += (b ^ c ^ d) - 899497514;
e = d;
d = c;
c = b << 30 | b >>> 2;
@@ -118164,19 +107073,13 @@ var require_sha1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.SHA1;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/sha256.js
var require_sha256 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function(Math) {
var C = CryptoJS;
@@ -118189,11 +107092,7 @@ var require_sha256 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
(function() {
function isPrime(n) {
var sqrtN = Math.sqrt(n);
- for (var factor = 2; factor <= sqrtN; factor++) {
- if (!(n % factor)) {
- return false;
- }
- }
+ for (var factor = 2; factor <= sqrtN; factor++) if (!(n % factor)) return false;
return true;
}
function getFractionalBits(n) {
@@ -118203,9 +107102,7 @@ var require_sha256 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var nPrime = 0;
while (nPrime < 64) {
if (isPrime(n)) {
- if (nPrime < 8) {
- H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
- }
+ if (nPrime < 8) H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
nPrime++;
}
@@ -118231,9 +107128,8 @@ var require_sha256 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var g = H[6];
var h = H[7];
for (var i = 0; i < 64; i++) {
- if (i < 16) {
- W[i] = M[offset + i] | 0;
- } else {
+ if (i < 16) W[i] = M[offset + i] | 0;
+ else {
var gamma0x = W[i - 15];
var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
var gamma1x = W[i - 2];
@@ -118316,24 +107212,17 @@ var require_sha256 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.SHA256;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/sha224.js
var require_sha224 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_sha256());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./sha256"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_sha256());
+ else if (typeof define === "function" && define.amd) define(["./core", "./sha256"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var WordArray = C_lib.WordArray;
+ var WordArray = C.lib.WordArray;
var C_algo = C.algo;
var SHA256 = C_algo.SHA256;
/**
@@ -118392,24 +107281,17 @@ var require_sha224 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.SHA224;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/sha512.js
var require_sha512 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_x64_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./x64-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_x64_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./x64-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var Hasher = C_lib.Hasher;
+ var Hasher = C.lib.Hasher;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var X64WordArray = C_x64.WordArray;
@@ -118501,9 +107383,7 @@ var require_sha512 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
];
var W = [];
(function() {
- for (var i = 0; i < 80; i++) {
- W[i] = X64Word_create();
- }
+ for (var i = 0; i < 80; i++) W[i] = X64Word_create();
})();
/**
* SHA-512 hash algorithm.
@@ -118661,8 +107541,7 @@ var require_sha512 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
this._process();
- var hash = this._hash.toX32();
- return hash;
+ return this._hash.toX32();
},
clone: function() {
var clone = Hasher.clone.call(this);
@@ -118705,23 +107584,17 @@ var require_sha512 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.SHA512;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/sha384.js
var require_sha384 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
@@ -118786,27 +107659,20 @@ var require_sha384 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.SHA384;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/sha3.js
var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_x64_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./x64-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_x64_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./x64-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function(Math) {
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 X64Word = C.x64.Word;
var C_algo = C.algo;
var RHO_OFFSETS = [];
var PI_INDEXES = [];
@@ -118820,11 +107686,7 @@ var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
- }
- }
+ 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 i = 0; i < 24; i++) {
var roundConstantMsw = 0;
@@ -118832,26 +107694,18 @@ var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
+ if (bitPosition < 32) roundConstantLsw ^= 1 << bitPosition;
+ else roundConstantMsw ^= 1 << bitPosition - 32;
}
+ if (LFSR & 128) LFSR = LFSR << 1 ^ 113;
+ else LFSR <<= 1;
}
ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
}
})();
var T = [];
(function() {
- for (var i = 0; i < 25; i++) {
- T[i] = X64Word.create();
- }
+ for (var i = 0; i < 25; i++) T[i] = X64Word.create();
})();
/**
* SHA-3 hash algorithm.
@@ -118860,9 +107714,7 @@ var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cfg: Hasher.cfg.extend({ outputLength: 512 }),
_doReset: function() {
var state = this._state = [];
- for (var i = 0; i < 25; i++) {
- state[i] = new X64Word.init();
- }
+ for (var i = 0; i < 25; i++) state[i] = new X64Word.init();
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
},
_doProcessBlock: function(M, offset) {
@@ -118924,16 +107776,14 @@ var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
- }
+ 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];
@@ -118969,9 +107819,7 @@ var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
clone: function() {
var clone = Hasher.clone.call(this);
var state = clone._state = this._state.slice(0);
- for (var i = 0; i < 25; i++) {
- state[i] = state[i].clone();
- }
+ for (var i = 0; i < 25; i++) state[i] = state[i].clone();
return clone;
}
});
@@ -119009,19 +107857,13 @@ var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.SHA3;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/ripemd160.js
var require_ripemd160 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
@@ -119408,26 +108250,15 @@ var require_ripemd160 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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 ar = al = H[0], br = bl = H[1], cr = cl = H[2], dr = dl = H[3], er = el = H[4];
var t;
for (var i = 0; i < 80; i += 1) {
t = al + M[offset + zl[i]] | 0;
- if (i < 16) {
- t += f1(bl, cl, dl) + hl[0];
- } else if (i < 32) {
- t += f2(bl, cl, dl) + hl[1];
- } else if (i < 48) {
- t += f3(bl, cl, dl) + hl[2];
- } else if (i < 64) {
- t += f4(bl, cl, dl) + hl[3];
- } else {
- t += f5(bl, cl, dl) + hl[4];
- }
+ if (i < 16) t += f1(bl, cl, dl) + hl[0];
+ else if (i < 32) t += f2(bl, cl, dl) + hl[1];
+ else if (i < 48) t += f3(bl, cl, dl) + hl[2];
+ else if (i < 64) t += f4(bl, cl, dl) + hl[3];
+ else t += f5(bl, cl, dl) + hl[4];
t = t | 0;
t = rotl(t, sl[i]);
t = t + el | 0;
@@ -119437,17 +108268,11 @@ var require_ripemd160 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cl = bl;
bl = t;
t = ar + M[offset + zr[i]] | 0;
- if (i < 16) {
- t += f5(br, cr, dr) + hr[0];
- } else if (i < 32) {
- t += f4(br, cr, dr) + hr[1];
- } else if (i < 48) {
- t += f3(br, cr, dr) + hr[2];
- } else if (i < 64) {
- t += f2(br, cr, dr) + hr[3];
- } else {
- t += f1(br, cr, dr) + hr[4];
- }
+ if (i < 16) t += f5(br, cr, dr) + hr[0];
+ else if (i < 32) t += f4(br, cr, dr) + hr[1];
+ else if (i < 48) t += f3(br, cr, dr) + hr[2];
+ else if (i < 64) t += f2(br, cr, dr) + hr[3];
+ else t += f1(br, cr, dr) + hr[4];
t = t | 0;
t = rotl(t, sr[i]);
t = t + er | 0;
@@ -119539,26 +108364,18 @@ var require_ripemd160 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.RIPEMD160;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/hmac.js
var require_hmac = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core());
+ else if (typeof define === "function" && define.amd) define(["./core"], factory);
+ else factory(root.CryptoJS);
})(exports, 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 Base = C.lib.Base;
+ var Utf8 = C.enc.Utf8;
var C_algo = C.algo;
/**
* HMAC algorithm.
@@ -119566,14 +108383,10 @@ var require_hmac = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var HMAC = C_algo.HMAC = Base.extend({
init: function(hasher, key) {
hasher = this._hasher = new hasher.init();
- if (typeof key == "string") {
- key = Utf8.parse(key);
- }
+ if (typeof key == "string") key = Utf8.parse(key);
var hasherBlockSize = hasher.blockSize;
var hasherBlockSizeBytes = hasherBlockSize * 4;
- if (key.sigBytes > hasherBlockSizeBytes) {
- key = hasher.finalize(key);
- }
+ if (key.sigBytes > hasherBlockSizeBytes) key = hasher.finalize(key);
key.clamp();
var oKey = this._oKey = key.clone();
var iKey = this._iKey = key.clone();
@@ -119599,30 +108412,23 @@ var require_hmac = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var hasher = this._hasher;
var innerHash = hasher.finalize(messageUpdate);
hasher.reset();
- var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
- return hmac;
+ return hasher.finalize(this._oKey.clone().concat(innerHash));
}
});
})();
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/pbkdf2.js
var require_pbkdf2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_sha256(), require_hmac());
- } else if (typeof define === "function" && define.amd) {
- define([
- "./core",
- "./sha256",
- "./hmac"
- ], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_sha256(), require_hmac());
+ else if (typeof define === "function" && define.amd) define([
+ "./core",
+ "./sha256",
+ "./hmac"
+ ], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
@@ -119663,9 +108469,7 @@ var require_pbkdf2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
intermediate = hmac.finalize(intermediate);
hmac.reset();
var intermediateWords = intermediate.words;
- for (var j = 0; j < blockWordsLength; j++) {
- blockWords[j] ^= intermediateWords[j];
- }
+ for (var j = 0; j < blockWordsLength; j++) blockWords[j] ^= intermediateWords[j];
}
derivedKey.concat(block);
blockIndexWords[0]++;
@@ -119698,23 +108502,17 @@ var require_pbkdf2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.PBKDF2;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/evpkdf.js
var require_evpkdf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_sha1(), require_hmac());
- } else if (typeof define === "function" && define.amd) {
- define([
- "./core",
- "./sha1",
- "./hmac"
- ], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_sha1(), require_hmac());
+ else if (typeof define === "function" && define.amd) define([
+ "./core",
+ "./sha1",
+ "./hmac"
+ ], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
@@ -119745,9 +108543,7 @@ var require_evpkdf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var keySize = cfg.keySize;
var iterations = cfg.iterations;
while (derivedKeyWords.length < keySize) {
- if (block) {
- hasher.update(block);
- }
+ if (block) hasher.update(block);
block = hasher.update(password).finalize(salt);
hasher.reset();
for (var i = 1; i < iterations; i++) {
@@ -119784,19 +108580,13 @@ var require_evpkdf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.EvpKDF;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/cipher-core.js
var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_evpkdf());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./evpkdf"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_evpkdf());
+ else if (typeof define === "function" && define.amd) define(["./core", "./evpkdf"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* Cipher core components.
@@ -119810,8 +108600,7 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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 EvpKDF = C.algo.EvpKDF;
/**
* Abstract base cipher template.
*
@@ -119843,11 +108632,8 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return this._process();
},
finalize: function(dataUpdate) {
- if (dataUpdate) {
- this._append(dataUpdate);
- }
- var finalProcessedData = this._doFinalize();
- return finalProcessedData;
+ if (dataUpdate) this._append(dataUpdate);
+ return this._doFinalize();
},
keySize: 128 / 32,
ivSize: 128 / 32,
@@ -119855,11 +108641,8 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_DEC_XFORM_MODE: 2,
_createHelper: function() {
function selectCipherStrategy(key) {
- if (typeof key == "string") {
- return PasswordBasedCipher;
- } else {
- return SerializableCipher;
- }
+ if (typeof key == "string") return PasswordBasedCipher;
+ else return SerializableCipher;
}
return function(cipher) {
return {
@@ -119880,8 +108663,7 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var StreamCipher = C_lib.StreamCipher = Cipher.extend({
_doFinalize: function() {
- var finalProcessedBlocks = this._process(!!"flush");
- return finalProcessedBlocks;
+ return this._process(true);
},
blockSize: 1
});
@@ -119939,12 +108721,8 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (iv) {
block = iv;
this._iv = undefined;
- } else {
- block = this._prevBlock;
- }
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= block[i];
- }
+ } else block = this._prevBlock;
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= block[i];
}
return CBC;
}();
@@ -119961,9 +108739,7 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes;
var paddingWords = [];
- for (var i = 0; i < nPaddingBytes; i += 4) {
- paddingWords.push(paddingWord);
- }
+ for (var i = 0; i < nPaddingBytes; i += 4) paddingWords.push(paddingWord);
var padding = WordArray.create(paddingWords, nPaddingBytes);
data.concat(padding);
},
@@ -119988,15 +108764,13 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var cfg = this.cfg;
var iv = cfg.iv;
var mode = cfg.mode;
- if (this._xformMode == this._ENC_XFORM_MODE) {
- modeCreator = mode.createEncryptor;
- } else {
+ 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 {
+ 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;
}
@@ -120009,9 +108783,9 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var padding = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
padding.pad(this._data, this.blockSize);
- finalProcessedBlocks = this._process(!!"flush");
+ finalProcessedBlocks = this._process(true);
} else {
- finalProcessedBlocks = this._process(!!"flush");
+ finalProcessedBlocks = this._process(true);
padding.unpad(finalProcessedBlocks);
}
return finalProcessedBlocks;
@@ -120051,11 +108825,8 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var wordArray;
var ciphertext = cipherParams.ciphertext;
var salt = cipherParams.salt;
- if (salt) {
- wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
- } else {
- wordArray = ciphertext;
- }
+ if (salt) wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
+ else wordArray = ciphertext;
return wordArray.toString(Base64);
},
parse: function(openSSLStr) {
@@ -120097,15 +108868,11 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
+ return cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
},
_parse: function(ciphertext, format) {
- if (typeof ciphertext == "string") {
- return format.parse(ciphertext, this);
- } else {
- return ciphertext;
- }
+ if (typeof ciphertext == "string") return format.parse(ciphertext, this);
+ else return ciphertext;
}
});
/**
@@ -120116,17 +108883,12 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
* OpenSSL key derivation function.
*/
var OpenSSLKdf = C_kdf.OpenSSL = { 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);
- }
+ 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({
@@ -120154,26 +108916,19 @@ var require_cipher_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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;
+ return SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
}
});
}();
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/mode-cfb.js
var require_mode_cfb = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* Cipher Feedback block mode.
@@ -120198,74 +108953,55 @@ var require_mode_cfb = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var iv = this._iv;
if (iv) {
keystream = iv.slice(0);
- this._iv = undefined;
- } else {
- keystream = this._prevBlock;
- }
+ this._iv = void 0;
+ } else keystream = this._prevBlock;
cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
}
return CFB;
}();
return CryptoJS.mode.CFB;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/mode-ctr.js
var require_mode_ctr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* Counter block mode.
*/
CryptoJS.mode.CTR = function() {
var CTR = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = CTR.Encryptor = CTR.extend({ processBlock: function(words, offset) {
+ CTR.Decryptor = CTR.Encryptor = CTR.extend({ processBlock: function(words, offset) {
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 = undefined;
+ this._iv = void 0;
}
var keystream = counter.slice(0);
cipher.encryptBlock(keystream, 0);
counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
} });
- CTR.Decryptor = Encryptor;
return CTR;
}();
return CryptoJS.mode.CTR;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/mode-ctr-gladman.js
var require_mode_ctr_gladman = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
@@ -120283,106 +109019,77 @@ var require_mode_ctr_gladman = /* @__PURE__ */ __commonJSMin(((exports, module)
b1 = 0;
if (b2 === 255) {
b2 = 0;
- if (b3 === 255) {
- b3 = 0;
- } else {
- ++b3;
- }
- } else {
- ++b2;
- }
- } else {
- ++b1;
- }
+ 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;
- }
+ } else word += 1 << 24;
return word;
}
function incCounter(counter) {
- if ((counter[0] = incWord(counter[0])) === 0) {
- counter[1] = incWord(counter[1]);
- }
+ if ((counter[0] = incWord(counter[0])) === 0) counter[1] = incWord(counter[1]);
return counter;
}
- var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ processBlock: function(words, offset) {
+ CTRGladman.Decryptor = CTRGladman.Encryptor = CTRGladman.extend({ processBlock: function(words, offset) {
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 = undefined;
+ this._iv = void 0;
}
incCounter(counter);
var keystream = counter.slice(0);
cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
} });
- CTRGladman.Decryptor = Encryptor;
return CTRGladman;
}();
return CryptoJS.mode.CTRGladman;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/mode-ofb.js
var require_mode_ofb = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* Output Feedback block mode.
*/
CryptoJS.mode.OFB = function() {
var OFB = CryptoJS.lib.BlockCipherMode.extend();
- var Encryptor = OFB.Encryptor = OFB.extend({ processBlock: function(words, offset) {
+ OFB.Decryptor = OFB.Encryptor = OFB.extend({ processBlock: function(words, offset) {
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 = undefined;
+ this._iv = void 0;
}
cipher.encryptBlock(keystream, 0);
- for (var i = 0; i < blockSize; i++) {
- words[offset + i] ^= keystream[i];
- }
+ for (var i = 0; i < blockSize; i++) words[offset + i] ^= keystream[i];
} });
- OFB.Decryptor = Encryptor;
return OFB;
}();
return CryptoJS.mode.OFB;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/mode-ecb.js
var require_mode_ecb = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* Electronic Codebook block mode.
@@ -120400,19 +109107,13 @@ var require_mode_ecb = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.mode.ECB;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/pad-ansix923.js
var require_pad_ansix923 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* ANSI X.923 padding strategy.
@@ -120435,19 +109136,13 @@ var require_pad_ansix923 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.pad.Ansix923;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/pad-iso10126.js
var require_pad_iso10126 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* ISO 10126 padding strategy.
@@ -120466,19 +109161,13 @@ var require_pad_iso10126 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.pad.Iso10126;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/pad-iso97971.js
var require_pad_iso97971 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* ISO/IEC 9797-1 Padding Method 2.
@@ -120496,19 +109185,13 @@ var require_pad_iso97971 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.pad.Iso97971;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/pad-zeropadding.js
var require_pad_zeropadding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* Zero padding strategy.
@@ -120522,30 +109205,22 @@ var require_pad_zeropadding = /* @__PURE__ */ __commonJSMin(((exports, module) =
unpad: function(data) {
var dataWords = data.words;
var i = data.sigBytes - 1;
- for (var i = data.sigBytes - 1; i >= 0; i--) {
- if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) {
- data.sigBytes = i + 1;
- break;
- }
+ for (var i = data.sigBytes - 1; i >= 0; i--) if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) {
+ data.sigBytes = i + 1;
+ break;
}
}
};
return CryptoJS.pad.ZeroPadding;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/pad-nopadding.js
var require_pad_nopadding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
/**
* A noop padding strategy.
@@ -120557,26 +109232,18 @@ var require_pad_nopadding = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return CryptoJS.pad.NoPadding;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/format-hex.js
var require_format_hex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = factory(require_core(), require_cipher_core());
- } else if (typeof define === "function" && define.amd) {
- define(["./core", "./cipher-core"], factory);
- } else {
- factory(root.CryptoJS);
- }
+ if (typeof exports === "object") module.exports = exports = factory(require_core(), require_cipher_core());
+ else if (typeof define === "function" && define.amd) define(["./core", "./cipher-core"], factory);
+ else factory(root.CryptoJS);
})(exports, function(CryptoJS) {
(function(undefined) {
var C = CryptoJS;
- var C_lib = C.lib;
- var CipherParams = C_lib.CipherParams;
- var C_enc = C.enc;
- var Hex = C_enc.Hex;
+ var CipherParams = C.lib.CipherParams;
+ var Hex = C.enc.Hex;
var C_format = C.format;
var HexFormatter = C_format.Hex = {
stringify: function(cipherParams) {
@@ -120591,30 +109258,23 @@ var require_format_hex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.format.Hex;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/aes.js
var require_aes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var BlockCipher = C_lib.BlockCipher;
+ var BlockCipher = C.lib.BlockCipher;
var C_algo = C.algo;
var SBOX = [];
var INV_SBOX = [];
@@ -120628,13 +109288,8 @@ var require_aes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var INV_SUB_MIX_3 = [];
(function() {
var d = [];
- for (var i = 0; i < 256; i++) {
- if (i < 128) {
- d[i] = i << 1;
- } else {
- d[i] = i << 1 ^ 283;
- }
- }
+ for (var i = 0; i < 256; i++) if (i < 128) d[i] = i << 1;
+ else d[i] = i << 1 ^ 283;
var x = 0;
var xi = 0;
for (var i = 0; i < 256; i++) {
@@ -120655,9 +109310,8 @@ var require_aes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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 {
+ if (!x) x = xi = 1;
+ else {
x = x2 ^ d[d[d[x8 ^ x2]]];
xi ^= d[d[xi]];
}
@@ -120682,43 +109336,29 @@ var require_aes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var AES = C_algo.AES = BlockCipher.extend({
_doReset: function() {
var t;
- if (this._nRounds && this._keyPriorReset === this._key) {
- return;
- }
+ 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 ksRows = ((this._nRounds = keySize + 6) + 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;
- }
+ 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]];
- }
+ 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(M, offset) {
@@ -120774,25 +109414,19 @@ var require_aes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.AES;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/tripledes.js
var require_tripledes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
@@ -121471,8 +110105,7 @@ var require_tripledes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var DES = C_algo.DES = BlockCipher.extend({
_doReset: function() {
- var key = this._key;
- var keyWords = key.words;
+ var keyWords = this._key.words;
var keyBits = [];
for (var i = 0; i < 56; i++) {
var keyBitPos = PC1[i] - 1;
@@ -121487,15 +110120,11 @@ var require_tripledes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
}
subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
- for (var i = 1; i < 7; i++) {
- subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
- }
+ for (var i = 1; i < 7; i++) subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
}
var invSubKeys = this._invSubKeys = [];
- for (var i = 0; i < 16; i++) {
- invSubKeys[i] = subKeys[15 - i];
- }
+ for (var i = 0; i < 16; i++) invSubKeys[i] = subKeys[15 - i];
},
encryptBlock: function(M, offset) {
this._doCryptBlock(M, offset, this._subKeys);
@@ -121516,9 +110145,7 @@ var require_tripledes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var lBlock = this._lBlock;
var rBlock = this._rBlock;
var f = 0;
- for (var i = 0; i < 8; i++) {
- f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
- }
+ for (var i = 0; i < 8; i++) f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
this._lBlock = rBlock;
this._rBlock = lBlock ^ f;
}
@@ -121561,11 +110188,8 @@ var require_tripledes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
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 keyWords = this._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);
@@ -121600,30 +110224,23 @@ var require_tripledes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.TripleDES;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/rc4.js
var require_rc4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
+ var StreamCipher = C.lib.StreamCipher;
var C_algo = C.algo;
/**
* RC4 stream cipher algorithm.
@@ -121634,9 +110251,7 @@ var require_rc4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var keyWords = key.words;
var keySigBytes = key.sigBytes;
var S = this._S = [];
- for (var i = 0; i < 256; i++) {
- S[i] = i;
- }
+ for (var i = 0; i < 256; i++) S[i] = i;
for (var i = 0, j = 0; i < 256; i++) {
var keyByteIndex = i % keySigBytes;
var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255;
@@ -121686,9 +110301,7 @@ var require_rc4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
cfg: RC4.cfg.extend({ drop: 192 }),
_doReset: function() {
RC4._doReset.call(this);
- for (var i = this.cfg.drop; i > 0; i--) {
- generateKeystreamWord.call(this);
- }
+ for (var i = this.cfg.drop; i > 0; i--) generateKeystreamWord.call(this);
}
});
/**
@@ -121704,30 +110317,23 @@ var require_rc4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.RC4;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/rabbit.js
var require_rabbit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
+ var StreamCipher = C.lib.StreamCipher;
var C_algo = C.algo;
var S = [];
var C_ = [];
@@ -121739,9 +110345,7 @@ var require_rabbit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
_doReset: function() {
var K = this._key.words;
var iv = this.cfg.iv;
- for (var i = 0; i < 4; i++) {
- K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
- }
+ for (var i = 0; i < 4; i++) K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
var X = this._X = [
K[0],
K[3] << 16 | K[2] >>> 16,
@@ -121763,12 +110367,8 @@ var require_rabbit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
K[3] & 4294901760 | K[0] & 65535
];
this._b = 0;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- for (var i = 0; i < 8; i++) {
- C[i] ^= X[i + 4 & 7];
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
+ for (var i = 0; i < 8; i++) C[i] ^= X[i + 4 & 7];
if (iv) {
var IV = iv.words;
var IV_0 = IV[0];
@@ -121785,9 +110385,7 @@ var require_rabbit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
C[5] ^= i1;
C[6] ^= i2;
C[7] ^= i3;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
}
},
_doProcessBlock: function(M, offset) {
@@ -121808,9 +110406,7 @@ var require_rabbit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function nextState() {
var X = this._X;
var C = this._C;
- for (var i = 0; i < 8; i++) {
- C_[i] = C[i];
- }
+ for (var i = 0; i < 8; i++) C_[i] = C[i];
C[0] = C[0] + 1295307597 + this._b | 0;
C[1] = C[1] + 3545052371 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
C[2] = C[2] + 886263092 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
@@ -121824,9 +110420,7 @@ var require_rabbit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
var gx = X[i] + C[i];
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[i] = gh ^ gl;
+ G[i] = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb ^ ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
}
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;
@@ -121850,30 +110444,23 @@ var require_rabbit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.Rabbit;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/rabbit-legacy.js
var require_rabbit_legacy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var StreamCipher = C_lib.StreamCipher;
+ var StreamCipher = C.lib.StreamCipher;
var C_algo = C.algo;
var S = [];
var C_ = [];
@@ -121910,12 +110497,8 @@ var require_rabbit_legacy = /* @__PURE__ */ __commonJSMin(((exports, module) =>
K[3] & 4294901760 | K[0] & 65535
];
this._b = 0;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
- for (var i = 0; i < 8; i++) {
- C[i] ^= X[i + 4 & 7];
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
+ for (var i = 0; i < 8; i++) C[i] ^= X[i + 4 & 7];
if (iv) {
var IV = iv.words;
var IV_0 = IV[0];
@@ -121932,9 +110515,7 @@ var require_rabbit_legacy = /* @__PURE__ */ __commonJSMin(((exports, module) =>
C[5] ^= i1;
C[6] ^= i2;
C[7] ^= i3;
- for (var i = 0; i < 4; i++) {
- nextState.call(this);
- }
+ for (var i = 0; i < 4; i++) nextState.call(this);
}
},
_doProcessBlock: function(M, offset) {
@@ -121955,9 +110536,7 @@ var require_rabbit_legacy = /* @__PURE__ */ __commonJSMin(((exports, module) =>
function nextState() {
var X = this._X;
var C = this._C;
- for (var i = 0; i < 8; i++) {
- C_[i] = C[i];
- }
+ for (var i = 0; i < 8; i++) C_[i] = C[i];
C[0] = C[0] + 1295307597 + this._b | 0;
C[1] = C[1] + 3545052371 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
C[2] = C[2] + 886263092 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
@@ -121971,9 +110550,7 @@ var require_rabbit_legacy = /* @__PURE__ */ __commonJSMin(((exports, module) =>
var gx = X[i] + C[i];
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[i] = gh ^ gl;
+ G[i] = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb ^ ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
}
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;
@@ -121997,30 +110574,23 @@ var require_rabbit_legacy = /* @__PURE__ */ __commonJSMin(((exports, module) =>
return CryptoJS.RabbitLegacy;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/blowfish.js
var require_blowfish = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
(function() {
var C = CryptoJS;
- var C_lib = C.lib;
- var BlockCipher = C_lib.BlockCipher;
+ var BlockCipher = C.lib.BlockCipher;
var C_algo = C.algo;
const N = 16;
const ORIG_P = [
@@ -123147,17 +111717,13 @@ var require_blowfish = /* @__PURE__ */ __commonJSMin(((exports, module) => {
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];
- }
+ for (let Col = 0; Col < 256; Col++) ctx.sbox[Row][Col] = ORIG_S[Row][Col];
}
let keyIndex = 0;
for (let index = 0; index < N + 2; index++) {
ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex];
keyIndex++;
- if (keyIndex >= keysize) {
- keyIndex = 0;
- }
+ if (keyIndex >= keysize) keyIndex = 0;
}
let Data1 = 0;
let Data2 = 0;
@@ -123169,14 +111735,12 @@ var require_blowfish = /* @__PURE__ */ __commonJSMin(((exports, module) => {
ctx.pbox[i] = Data1;
ctx.pbox[i + 1] = Data2;
}
- for (let i = 0; i < 4; i++) {
- for (let j = 0; j < 256; j += 2) {
- res = BlowFish_Encrypt(ctx, Data1, Data2);
- Data1 = res.left;
- Data2 = res.right;
- ctx.sbox[i][j] = Data1;
- ctx.sbox[i][j + 1] = Data2;
- }
+ for (let i = 0; i < 4; i++) for (let j = 0; j < 256; j += 2) {
+ res = BlowFish_Encrypt(ctx, Data1, Data2);
+ Data1 = res.left;
+ Data2 = res.right;
+ ctx.sbox[i][j] = Data1;
+ ctx.sbox[i][j + 1] = Data2;
}
return true;
}
@@ -123185,13 +111749,10 @@ var require_blowfish = /* @__PURE__ */ __commonJSMin(((exports, module) => {
*/
var Blowfish = C_algo.Blowfish = BlockCipher.extend({
_doReset: function() {
- if (this._keyPriorReset === this._key) {
- return;
- }
+ 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);
+ BlowFishInit(BLOWFISH_CTX, keyWords, key.sigBytes / 4);
},
encryptBlock: function(M, offset) {
var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);
@@ -123220,60 +111781,53 @@ var require_blowfish = /* @__PURE__ */ __commonJSMin(((exports, module) => {
return CryptoJS.Blowfish;
});
}));
-
//#endregion
//#region ../node_modules/crypto-js/index.js
var require_crypto_js = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- ;
(function(root, factory, undef) {
- if (typeof exports === "object") {
- module.exports = exports = 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);
- }
+ if (typeof exports === "object") module.exports = exports = 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);
})(exports, function(CryptoJS) {
return CryptoJS;
});
}));
-
//#endregion
//#region ../utils/pan/baidu.js
/**
@@ -123339,10 +111893,8 @@ var BaiduHandler = class {
];
this.cleanupInterval = setInterval(() => {
this.clearSaveDir();
- }, 2 * 60 * 60 * 1e3);
- if (this.cleanupInterval.unref) {
- this.cleanupInterval.unref();
- }
+ }, 7200 * 1e3);
+ if (this.cleanupInterval.unref) this.cleanupInterval.unref();
}
/**
* 获取完整的Cookie
@@ -123371,13 +111923,9 @@ var BaiduHandler = class {
let shareId = "";
let sharePwd = "";
const match = url.match(/pan\.baidu\.com\/(s\/|wap\/init\?surl=)([^?]+)/);
- if (!match) {
- return null;
- }
+ if (!match) return null;
shareId = match[2].replace(/^1+/, "").split("?")[0].split("#")[0];
- if (!shareId) {
- return null;
- }
+ if (!shareId) return null;
const pwdMatch = url.match(/(提取码|密码|pwd)=([^&\s]{4})/i);
sharePwd = pwdMatch ? pwdMatch[2] : "";
return {
@@ -123394,18 +111942,14 @@ var BaiduHandler = class {
* @param {Object} cfg - 配置对象
*/
async initBaidu(db, cfg) {
- if (this.cookie) {
- await this.createSaveDir();
- }
+ if (this.cookie) await this.createSaveDir();
}
/**
* 创建保存目录
* @returns {string|null} 保存目录ID,失败时返回null
*/
async createSaveDir() {
- if (!this.cookie) {
- return null;
- }
+ if (!this.cookie) return null;
try {
const listResp = await this.api("api/list", {
dir: "/",
@@ -123415,9 +111959,7 @@ var BaiduHandler = class {
web: 1,
app_id: 250528
}, { Cookie: this.cookie }, "get");
- if (listResp.errno !== 0) {
- return null;
- }
+ if (listResp.errno !== 0) return null;
const drpyDir = listResp.list.find((item) => item.isdir === 1 && item.server_filename === this.saveDirName);
if (drpyDir) {
this.saveDirId = drpyDir.fs_id;
@@ -123430,9 +111972,7 @@ var BaiduHandler = class {
web: 1,
app_id: 250528
}, { Cookie: this.cookie }, "post");
- if (createResp.errno !== 0) {
- return null;
- }
+ if (createResp.errno !== 0) return null;
this.saveDirId = createResp.fs_id;
return this.saveDirId;
} catch (error) {
@@ -123450,7 +111990,7 @@ var BaiduHandler = class {
*/
async api(url, data = {}, headers = {}, method = "post", retry = 3) {
const objectToQuery = (obj) => {
- return Object.entries(obj).filter(([_, value]) => value !== undefined && value !== null).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&");
+ return Object.entries(obj).filter(([_, value]) => value !== void 0 && value !== null).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&");
};
const fullUrl = `${this.apiUrl}${url}`;
headers = {
@@ -123464,9 +112004,7 @@ var BaiduHandler = class {
const query = objectToQuery(data);
const finalUrl = query ? `${fullUrl}?${query}` : fullUrl;
resp = await req$1.get(finalUrl, { headers });
- } else {
- resp = await req$1.post(fullUrl, data, { headers });
- }
+ } else resp = await req$1.post(fullUrl, data, { headers });
} catch (err) {
resp = err.response || {
status: 500,
@@ -123478,7 +112016,7 @@ var BaiduHandler = class {
await this.delay(waitTime);
return this.api(url, data, headers, method, retry - 1);
}
- return resp.data !== undefined ? resp.data : resp;
+ return resp.data !== void 0 ? resp.data : resp;
}
/**
* 验证分享链接
@@ -123491,9 +112029,7 @@ var BaiduHandler = class {
try {
const shareVerify = await this.api(`share/verify?t=${Date.now()}&surl=${shareData.shareId}`, { pwd: shareData.sharePwd || "" }, { Cookie: this.cookie }, "post");
if (shareVerify.errno !== 0) {
- if (shareVerify.errno === -62 || shareVerify.errno === -9) {
- console.log("提取码错误");
- }
+ if (shareVerify.errno === -62 || shareVerify.errno === -9) console.log("提取码错误");
console.log("验证提取码失败");
}
if (shareVerify.randsk) {
@@ -123517,9 +112053,7 @@ var BaiduHandler = class {
* @returns {Promise